diff options
author | Matt Rogers <mrogers@redhat.com> | 2016-02-24 16:06:53 -0500 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2016-03-31 11:27:38 -0400 |
commit | 8f9ade8ec50cde1176411085294f85ecfb2820a4 (patch) | |
tree | 80cb15f1fa7209259e197aee62d83e711a1e3027 /src/configure.in | |
parent | 33b862799efa65b16e2acd1510c84d9f1ded2cbb (diff) | |
download | krb5-8f9ade8ec50cde1176411085294f85ecfb2820a4.zip krb5-8f9ade8ec50cde1176411085294f85ecfb2820a4.tar.gz krb5-8f9ade8ec50cde1176411085294f85ecfb2820a4.tar.bz2 |
Move the util/windows getopt to libkrb5support
Relocate the internal getopt() and getopt_long() code to util/support,
and build conditionally. Put declarations in k5-platform.h. Adjust
Windows build directives for src/clients. Remove getopt-related #defines
from kinit.c, allowing kinit to use getopt_long() on all platforms.
[ghudson@mit.edu: fix some Windows build issues]
ticket: 8391
Diffstat (limited to 'src/configure.in')
-rw-r--r-- | src/configure.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/configure.in b/src/configure.in index 605b0c0..8216045 100644 --- a/src/configure.in +++ b/src/configure.in @@ -145,6 +145,26 @@ EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS krb5int_strlcpy krb5int_strlcat"]) AC_SUBST(STRLCPY_OBJ) AC_SUBST(STRLCPY_ST_OBJ) +AC_CHECK_FUNC(getopt, +[GETOPT_ST_OBJ= +GETOPT_OBJ= +AC_DEFINE(HAVE_GETOPT, 1, [Define if system getopt should be used.])], +[GETOPT_ST_OBJ='getopt.o' +GETOPT_OBJ='$(OUTPRE)getopt.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_optind k5_optarg k5_opterr k5_optopt k5_getopt"]) +AC_SUBST(GETOPT_OBJ) +AC_SUBST(GETOPT_ST_OBJ) + +AC_CHECK_FUNC(getopt_long, +[GETOPT_LONG_ST_OBJ= +GETOPT_LONG_OBJ= +AC_DEFINE(HAVE_GETOPT_LONG, 1, [Define if system getopt_long should be used.])], +[GETOPT_LONG_ST_OBJ='getopt_long.o' +GETOPT_LONG_OBJ='$(OUTPRE)getopt_long.$(OBJEXT)' +EXTRA_SUPPORT_SYMS="$EXTRA_SUPPORT_SYMS k5_getopt_long"]) +AC_SUBST(GETOPT_LONG_OBJ) +AC_SUBST(GETOPT_LONG_ST_OBJ) + AC_CHECK_FUNC(fnmatch, [FNMATCH_ST_OBJ= FNMATCH_OBJ=], |