diff options
| author | Ezra Peisach <epeisach@mit.edu> | 2001-06-18 18:25:22 +0000 |
|---|---|---|
| committer | Ezra Peisach <epeisach@mit.edu> | 2001-06-18 18:25:22 +0000 |
| commit | 35a7cdb867f1b4377092055be6dd51cf88ca1a68 (patch) | |
| tree | 54b481d75cc7eac6de34cab02a37ce4b35b93e1a /src | |
| parent | b12d8a18662a4c44d42e2a381e3410b073a0207c (diff) | |
| download | krb5-35a7cdb867f1b4377092055be6dd51cf88ca1a68.tar.gz krb5-35a7cdb867f1b4377092055be6dd51cf88ca1a68.tar.xz krb5-35a7cdb867f1b4377092055be6dd51cf88ca1a68.zip | |
* acconfig.h: Add HAVE_REGCOMP
* aclocal.m4 (KRB5_AC_NEED_LIBGEN): Determins if libgen is really
needed to be linked with executables by determining if regcomp()
is missing or non-functionl and then if compile/step will be used.
(KRB5_AC_REGEX_FUNCS): Rewritten to require KRB5_AC_NEED_LIBGEN.
(KRB5_BUILD_PROGRAM): Use KRB5_AC_NEED_LIBGEN instead of testing
for compile in libgen.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13365 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/acconfig.h | 1 | ||||
| -rw-r--r-- | src/aclocal.m4 | 39 |
3 files changed, 36 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0325cd6790..2211db0e12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2001-06-18 Ezra Peisach <epeisach@mit.edu> + + * acconfig.h: Add HAVE_REGCOMP. + + * aclocal.m4 (KRB5_AC_NEED_LIBGEN): Determins if libgen is really + needed to be linked with executables by determining if regcomp() + is missing or non-functionl and then if compile/step will be used. + (KRB5_AC_REGEX_FUNCS): Rewritten to require KRB5_AC_NEED_LIBGEN. + (KRB5_BUILD_PROGRAM): Use KRB5_AC_NEED_LIBGEN instead of testing + for compile in libgen. + 2001-06-11 Ezra Peisach <epeisach@mit.edu> * aclocal.m4 (KRB5_NEED_PROTO): Determines if the OS provides a diff --git a/src/acconfig.h b/src/acconfig.h index 263d00adbe..74e4b66446 100644 --- a/src/acconfig.h +++ b/src/acconfig.h @@ -18,6 +18,7 @@ #undef HAVE_STDARG_H #undef HAVE_VARARGS_H +#undef HAVE_REGCOMP /* Define if struct sockaddr and friends (sockaddr_in etc) have the sa_len field. */ diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 95a08a5d25..8ee10e4ec7 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -655,15 +655,15 @@ fi dnl stdarg test failure ])dnl dnl -dnl KRB5_AC_REGEX_FUNCS --- check for different regular expression -dnl support functions +dnl KRB5_AC_NEED_LIBGEN --- check if libgen needs to be linked in for +dnl compile/step dnl -AC_DEFUN(KRB5_AC_REGEX_FUNCS,[ -AC_CHECK_FUNCS(re_comp re_exec regexec) +dnl +AC_DEFUN(KRB5_AC_NEED_LIBGEN,[ +AC_REQUIRE([AC_PROG_CC]) dnl dnl regcomp is present but non-functional on Solaris 2.4 dnl -AC_REQUIRE([AC_PROG_CC]) AC_MSG_CHECKING(for working regcomp) AC_CACHE_VAL(ac_cv_func_regcomp,[ AC_TRY_RUN([ @@ -671,23 +671,33 @@ AC_TRY_RUN([ #include <regex.h> regex_t x; regmatch_t m; int main() { return regcomp(&x,"pat.*",0) || regexec(&x,"pattern",1,&m,0); } -], ac_cv_func_regcomp=yes, ac_cv_func_regcomp=no)]) +], ac_cv_func_regcomp=yes, ac_cv_func_regcomp=no, AC_ERROR([Cannot test regcomp when cross compiling]))]) AC_MSG_RESULT($ac_cv_func_regcomp) test $ac_cv_func_regcomp = yes && AC_DEFINE(HAVE_REGCOMP) dnl -dnl Check for the compile and step functions +dnl Check for the compile and step functions - only if regcomp is not available dnl -save_LIBS="$LIBS" -LIBS=-lgen +if test $ac_cv_func_regcomp = no; then + save_LIBS="$LIBS" + LIBS=-lgen dnl this will fail if there's no compile/step in -lgen, or if there's dnl no -lgen. This is fine. -AC_CHECK_FUNCS(compile step) -LIBS="$save_LIBS" + AC_CHECK_FUNCS(compile step) + LIBS="$save_LIBS" dnl dnl Set GEN_LIB if necessary dnl -AC_CHECK_LIB(gen, compile, GEN_LIB=-lgen, GEN_LIB=) -AC_SUBST(GEN_LIB) + AC_CHECK_LIB(gen, compile, GEN_LIB=-lgen, GEN_LIB=) + AC_SUBST(GEN_LIB) +fi +]) +dnl +dnl KRB5_AC_REGEX_FUNCS --- check for different regular expression +dnl support functions +dnl +AC_DEFUN(KRB5_AC_REGEX_FUNCS,[ +AC_CHECK_FUNCS(re_comp re_exec regexec) +AC_REQUIRE([KRB5_AC_NEED_LIBGEN]) ])dnl dnl dnl AC_KRB5_TCL_FIND_CONFIG (uses tcl_dir) @@ -986,8 +996,7 @@ dnl Set variables to build a program. AC_DEFUN(KRB5_BUILD_PROGRAM, [AC_REQUIRE([KRB5_LIB_AUX]) -AC_CHECK_LIB(gen, compile, GEN_LIB=-lgen, GEN_LIB=) -AC_SUBST(GEN_LIB) +AC_REQUIRE([KRB5_AC_NEED_LIBGEN]) AC_SUBST(CC_LINK) AC_SUBST(DEPLIBEXT)]) |
