summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1998-02-28 02:45:11 +0000
committerTheodore Tso <tytso@mit.edu>1998-02-28 02:45:11 +0000
commitbb2e324aa43d5c98b2945dba26e1606e7a1da7f0 (patch)
tree85c371acfd80233ecaacd961444d6c3e74c1d32f
parent2a13b121fea5616045a3879b18b3f8b69d61c96a (diff)
downloadkrb5-bb2e324aa43d5c98b2945dba26e1606e7a1da7f0.tar.gz
krb5-bb2e324aa43d5c98b2945dba26e1606e7a1da7f0.tar.xz
krb5-bb2e324aa43d5c98b2945dba26e1606e7a1da7f0.zip
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
-rw-r--r--src/ChangeLog6
-rw-r--r--src/aclocal.m435
2 files changed, 41 insertions, 0 deletions
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 <tytso@rsts-11.mit.edu>
+
+ * 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 <tlyu@mit.edu>
* 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
@@ -561,6 +561,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 <sys/types.h>
+#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_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
AC_DEFUN(AC_KRB5_TCL,[