Mercurial > hg > octave-max
changeset 12464:dfeea9cae79e
require PCRE to build Octave
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 21 Feb 2011 03:50:59 -0500 |
parents | 189baf055143 |
children | 6b2abcd20fef |
files | ChangeLog NEWS configure.ac src/ChangeLog src/DLD-FUNCTIONS/regexp.cc |
diffstat | 5 files changed, 37 insertions(+), 137 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-02-21 John W. Eaton <jwe@octave.org> + + * NEWS: Note that PCRE is now required to build Octave. + * configure.ac: Improve check for PCRE, which is now required. + Don't check for -lregex. + 2011-02-19 Rik <octave@nomad.inbox5.com> * README.MacOS: Keep line length below 80, use 2 spaces to start
--- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ spchol splchol unmark_command spchol2inv split unmark_rawcommand + ** The PCRE library is now required to build Octave. + Summary of important user-visible changes for version 3.4: ---------------------------------------------------------
--- a/configure.ac +++ b/configure.ac @@ -637,61 +637,43 @@ AC_DEFINE(HAVE_QHULL, 1, [Define if QHull is available.])], [ warn_qhull="Qhull library found, but seems not to work properly -- this will result in loss of functionality of some geometry functions. Please try recompiling the library with -fno-strict-aliasing."])]) -### Check for pcre/regex library. +### Check for pcre regex library. + +REGEX_LIBS= + +pcre_fail_msg="to build Octave, you must have the PCRE library and header files installed" -## check for pcre-config, and if so, set XTRA_CXXFLAGS appropriately -AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) -if test $WITH_PCRE_CONFIG = yes ; then - XTRA_CXXFLAGS="$XTRA_CXXFLAGS $(pcre-config --cflags)" -fi - -## NB: no need to do separate check for pcre.h header -- checking macros is good enough -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], [ +## NB: no need to do separate check for pcre.h header -- checking +## macros is good enough +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], [ #include <pcre.h> #if defined (PCRE_INFO_NAMECOUNT) \ && defined (PCRE_INFO_NAMEENTRYSIZE) \ && defined (PCRE_INFO_NAMETABLE) PCRE_HAS_MACROS_WE_NEED #endif], ac_cv_pcre_h_macros_present=yes, ac_cv_pcre_h_macros_present=no)]) -WITH_PCRE="$ac_cv_pcre_h_macros_present" -REGEX_LIBS= - -using_pcre=no -using_regex=no - -if test "$WITH_PCRE" = yes; then - if test "$WITH_PCRE_CONFIG" = yes; then - REGEX_LIBS=$(pcre-config --libs) +if test $ac_cv_pcre_h_macros_present = yes; then + ## check for pcre-config, and if so, set XTRA_CXXFLAGS appropriately + AC_CHECK_PROG(HAVE_PCRE_CONFIG, pcre-config, [yes], [no]) + if test $HAVE_PCRE_CONFIG = yes; then + XTRA_CXXFLAGS="$XTRA_CXXFLAGS `pcre-config --cflags`" + REGEX_LIBS="`pcre-config --libs`" else - REGEX_LIBS=-lpcre + REGEX_LIBS="-lpcre" fi save_LIBS="$LIBS" LIBS="$REGEX_LIBS $LIBS" - AC_CHECK_FUNCS(pcre_compile, [using_pcre=yes - AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE library is available.])], [ - REGEX_LIBS= - warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." - AC_MSG_WARN([$warn_pcre])]) + AC_CHECK_FUNCS(pcre_compile, + [AC_SUBST(REGEX_LIBS)], + [AC_MSG_ERROR([$pcre_fail_msg])]) LIBS="$save_LIBS" else - warn_pcre="PCRE library not found. This will result in some loss of functionality for the regular expression matching functions." - AC_MSG_WARN([$warn_pcre]) + AC_MSG_ERROR([$pcre_fail_msg]) fi -AC_CHECK_FUNCS(regexec, [using_regex=yes], [ - AC_CHECK_LIB(regex, regexec, [using_regex=yes - REGEX_LIBS="-lregex $REGEX_LIBS"], [ - warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." - AC_MSG_WARN([$warn_regex])])]) - -if test "$using_regex" = yes; then - AC_DEFINE(HAVE_REGEX, 1, [Define if regex library is available.])