Mercurial > hg > octave-lyh
diff configure.ac @ 14025:9867be070ee1
use pcre/pcre.h if it is present
* configure.ac: Check for pcre/pcre.h.
* liboctave/regexp.cc: Include either pcre.h or pcre/pcre.h depending
on which is available.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 11 Dec 2011 22:35:13 -0500 |
parents | 43cc49c7abd1 |
children | 3781981be535 |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -662,12 +662,17 @@ pcre_fail_msg="to build Octave, you must have the PCRE library and header files installed" -## NB: no need to do separate check for pcre.h header -- checking -## macros is good enough +AC_CHECK_HEADERS([pcre.h pcre/pcre.h]) + AC_CACHE_CHECK([whether pcre.h defines the macros we need], [ac_cv_pcre_h_macros_present], [AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ +#if defined (HAVE_PCRE_H) #include <pcre.h> +#elif defined (HAVE_PCRE_PCRE_H) +#include <pcre.h> +#error "NO PCRE HEADER" +#endif #if defined (PCRE_INFO_NAMECOUNT) \ && defined (PCRE_INFO_NAMEENTRYSIZE) \ && defined (PCRE_INFO_NAMETABLE)