summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-03 16:43:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-09-03 16:43:45 (GMT)
commitcd1547d2049f32a5c13ba1828fcd1a553b844e97 (patch)
tree2e5442dda4e239b74473bb86acf7e55950375a8f /configure.ac
parentc6babe5762f2f4e0d57e08c1362e05053348919a (diff)
parentce518bbd6c891f1b9e172b8cb9212c05d731c18e (diff)
downloadgit-cd1547d2049f32a5c13ba1828fcd1a553b844e97.zip
git-cd1547d2049f32a5c13ba1828fcd1a553b844e97.tar.gz
git-cd1547d2049f32a5c13ba1828fcd1a553b844e97.tar.bz2
Merge branch 'ab/compat-regex'
* ab/compat-regex: Fix compat/regex ANSIfication on MinGW autoconf: regex library detection typofix autoconf: don't use platform regex if it lacks REG_STARTEND t/t7008-grep-binary.sh: un-TODO a test that needs REG_STARTEND compat/regex: get rid of old-style definition compat/regex: define out variables only used under RE_ENABLE_I18N Change regerror() declaration from K&R style to ANSI C (C89) compat/regex: get the gawk regex engine to compile within git compat/regex: use the regex engine from gawk for compat Conflicts: compat/regex/regex.c
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 708e7b8..56731c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -706,6 +706,27 @@ else
fi
AC_SUBST(NO_C99_FORMAT)
#
+# Define NO_REGEX if you have no or inferior regex support in your C library.
+AC_CACHE_CHECK([whether the platform regex can handle null bytes],
+ [ac_cv_c_excellent_regex], [
+AC_EGREP_CPP(yippeeyeswehaveit,
+ AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
+#include <regex.h>
+],
+[#ifdef REG_STARTEND
+yippeeyeswehaveit
+#endif
+]),
+ [ac_cv_c_excellent_regex=yes],
+ [ac_cv_c_excellent_regex=no])
+])
+if test $ac_cv_c_excellent_regex = yes; then
+ NO_REGEX=
+else
+ NO_REGEX=YesPlease
+fi
+AC_SUBST(NO_REGEX)
+#
# Define FREAD_READS_DIRECTORIES if your are on a system which succeeds
# when attempting to read from an fopen'ed directory.
AC_CACHE_CHECK([whether system succeeds to read fopen'ed directory],