diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-07-26 22:05:56 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-07-26 22:05:56 +0000 |
commit | 8bc9c724d51312906be6e965b45a7bc071cfb931 (patch) | |
tree | 0211f7c63d26f89ba02b13903e7eeeeba95ae2de /configure.ac | |
parent | 4a3627d5b883c0f66c9f2b770a427c18df51203f (diff) |
Work around the fact that we may have regex support without having
regex.h (e.g. from pcreposix.h/libpcreposix) and disabuse HAVE_REGEX_H,
define and use HAVE_REGEX_SUPPORT instead, thanks Gary!
(refs #3, merges [1677] [1678] [1679])
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index e52ba99f..cab2ee97 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,23 @@ AC_CHECK_HEADER([regex.h], [have_regex_h=yes]) if test "$have_regex_h" = "yes"; then AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if regex.h is available]) - AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"]) +else + AC_CHECK_HEADER([pcreposix.h], [have_pcreposix_h=yes]) +fi + +if test "$have_pcreposix_h" = "yes"; then + AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"],,[have_pcreposix_h=no_regcomp]) +fi + +if test "$have_pcreposix_h" = "yes"; then + AC_DEFINE([HAVE_PCREPOSIX_H], [1], [Define to 1 if pcreposix.h is available]) +fi + +if test "$have_regex_h" = "yes" -o "$have_pcreposix_h" = "yes"; then + have_regex_support=yes + AC_DEFINE([HAVE_REGEX_SUPPORT], [1], [Define to 1 if regular expressions are supported]) +else + have_regex_support=no fi AC_SEARCH_LIBS([dlsym], ["dl"]) @@ -274,7 +290,7 @@ A summary of the build configuration is below. Box Backup will function without these features, but will work better where they are present. Refer to the documentation for more information on each feature. -Regular expressions: $have_regex_h +Regular expressions: $have_regex_support Large files: $have_large_file_support Berkeley DB: $ax_path_bdb_ok Readline: $have_libreadline |