diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-08-17 09:24:42 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-19 15:46:47 -0700 |
commit | a1e3b669faf7a157f31507213a098076ff1dad7e (patch) | |
tree | 2537c8e08db8ac60440d126329ef7b692e0dbf56 /configure.ac | |
parent | 7e36de5859afd77976b7583b2012c238b1ffbb7c (diff) | |
download | git-a1e3b669faf7a157f31507213a098076ff1dad7e.tar.gz |
autoconf: don't use platform regex if it lacks REG_STARTEND
If the platform regex cannot match null bytes, we might as well
use the glibc version instead.
Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Cc: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Tested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 5601e8bac9..71ac89fab3 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=yes]) +]) +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], |