Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
14024:fc9f204faea0 | 14025:9867be070ee1 |
---|---|
660 | 660 |
661 REGEX_LIBS= | 661 REGEX_LIBS= |
662 | 662 |
663 pcre_fail_msg="to build Octave, you must have the PCRE library and header files installed" | 663 pcre_fail_msg="to build Octave, you must have the PCRE library and header files installed" |
664 | 664 |
665 ## NB: no need to do separate check for pcre.h header -- checking | 665 AC_CHECK_HEADERS([pcre.h pcre/pcre.h]) |
666 ## macros is good enough | 666 |
667 AC_CACHE_CHECK([whether pcre.h defines the macros we need], | 667 AC_CACHE_CHECK([whether pcre.h defines the macros we need], |
668 [ac_cv_pcre_h_macros_present], | 668 [ac_cv_pcre_h_macros_present], |
669 [AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ | 669 [AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ |
670 #if defined (HAVE_PCRE_H) | |
670 #include <pcre.h> | 671 #include <pcre.h> |
672 #elif defined (HAVE_PCRE_PCRE_H) | |
673 #include <pcre.h> | |
674 #error "NO PCRE HEADER" | |
675 #endif | |
671 #if defined (PCRE_INFO_NAMECOUNT) \ | 676 #if defined (PCRE_INFO_NAMECOUNT) \ |
672 && defined (PCRE_INFO_NAMEENTRYSIZE) \ | 677 && defined (PCRE_INFO_NAMEENTRYSIZE) \ |
673 && defined (PCRE_INFO_NAMETABLE) | 678 && defined (PCRE_INFO_NAMETABLE) |
674 PCRE_HAS_MACROS_WE_NEED | 679 PCRE_HAS_MACROS_WE_NEED |
675 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) | 680 #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) |