From: Theodore Tso Date: Sat, 28 Feb 1998 02:45:11 +0000 (+0000) Subject: aclocal.m4 (KRB5_AC_REGEX_FUNCS): Take the regular expression function X-Git-Tag: krb5-1.1-beta1~796 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bb2e324aa43d5c98b2945dba26e1606e7a1da7f0;p=krb5.git aclocal.m4 (KRB5_AC_REGEX_FUNCS): Take the regular expression function code from lib/krb5/os/configure.in and turn it into a generalized regular expression function tester. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10477 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 46ebd6e79..4a84275e4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +Fri Feb 27 21:43:41 1998 Theodore Ts'o + + * aclocal.m4 (KRB5_AC_REGEX_FUNCS): Take the regular expression + function code from lib/krb5/os/configure.in and turn it + into a generalized regular expression function tester. + Wed Feb 18 15:23:08 1998 Tom Yu * Makefile.in (thisconfigdir): Remove trailing slash from diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 4d54270d3..853e593ad 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -560,6 +560,41 @@ fi dnl stdarg test failure ])dnl +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) +dnl +dnl regcomp is present but non-functional on Solaris 2.4 +dnl +AC_C_CROSS +AC_MSG_CHECKING(for working regcomp) +AC_CACHE_VAL(ac_cv_func_regcomp,[ +AC_TRY_RUN([ +#include +#include +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_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 +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" +dnl +dnl Set GEN_LIB if necessary +dnl +AC_CHECK_LIB(gen, compile, GEN_LIB=-lgen, GEN_LIB=) +AC_SUBST(GEN_LIB) +])dnl dnl dnl AC_KRB5_TCL - determine if the TCL library is present on system dnl