diff options
author | Andres Mejia <amejia004@gmail.com> | 2013-02-03 01:42:59 -0500 |
---|---|---|
committer | Andres Mejia <amejia004@gmail.com> | 2013-02-03 01:42:59 -0500 |
commit | 91717f721e126d3f00f60665df44a93aa733d2a4 (patch) | |
tree | 7ec653aa47a8e6bfc347fbd230bf920cc43e7f4b | |
parent | 9797fb4e49a0ce9fad6f011571cc04417d053516 (diff) | |
download | libarchive-91717f721e126d3f00f60665df44a93aa733d2a4.tar.gz |
Fix mingw build because of bad check for libpcreposix.
-rw-r--r-- | configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7f405d76..43f10485 100644 --- a/configure.ac +++ b/configure.ac @@ -372,9 +372,28 @@ if test "$enable_posix_regex_lib" = "auto" || test "$enable_posix_regex_lib" = " fi if test -z $posix_regex_lib_found && (test "$enable_posix_regex_lib" = "auto" || test "$enable_posix_regex_lib" = "libpcreposix"); then AC_CHECK_HEADERS([pcreposix.h]) + AC_CHECK_LIB(pcre,pcre_exec) AC_CHECK_LIB(pcreposix,regcomp) if test "x$ac_cv_lib_pcreposix_regcomp" = xyes; then posix_regex_lib_found=1 + AC_MSG_CHECKING(if PCRE_STATIC needs to be defined) + AC_LINK_IFELSE( + [AC_LANG_SOURCE(#include <pcreposix.h> + int main() { return regcomp(NULL, NULL, 0); })], + [without_pcre_static=yes], + [without_pcre_static=no]) + AC_LINK_IFELSE( + [AC_LANG_SOURCE(#define PCRE_STATIC + #include <pcreposix.h> + int main() { return regcomp(NULL, NULL, 0); })], + [with_pcre_static=yes], + [with_pcre_static=no]) + if test "x$without_pcre_static" != xyes && test "x$with_pcre_static" = xyes; then + AC_MSG_RESULT(yes) + AC_DEFINE([PCRE_STATIC], [1], [Define to 1 if PCRE_STATIC needs to be defined.]) + else + AC_MSG_RESULT(no) + fi fi fi |