Mercurial > hg > octave-nkf
changeset 5585:6dbb3f6d0054
[project @ 2005-12-15 01:40:58 by jwe]
author | jwe |
---|---|
date | Thu, 15 Dec 2005 01:45:37 +0000 |
parents | 3d9ddfdc6d3e |
children | d37b96139376 |
files | ChangeLog Makeconf.in configure.in scripts/Makefile.in |
diffstat | 4 files changed, 38 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-12-14 David Bateman <dbateman@free.fr> + + * Makeconf.in: New tests of regex and pcre. + 2005-12-13 John W. Eaton <jwe@octave.org> * examples/Makefile.in (install install-strip): Fix typo.
--- a/Makeconf.in +++ b/Makeconf.in @@ -191,6 +191,7 @@ LIBREADLINE = @LIBREADLINE@ TERMLIBS = @TERMLIBS@ +REGEX_LIBS = @REGEX_LIBS@ BLAS_LIBS = @BLAS_LIBS@ FFTW_LIBS = @FFTW_LIBS@ GLPK_LIBS = @GLPK_LIBS@
--- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.493 $) +AC_REVISION($Revision: 1.494 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -418,6 +418,37 @@ ;; esac +### Check for pcre/regex library. +AC_SUBST(REGEX_LIBS) +WITH_PCRE_CONFIG=no +AC_CHECK_HEADER(pcre.h, WITH_PCRE=yes, WITH_PCRE=no) +if test $WITH_PCRE = no ; then + AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) + if test $WITH_PCRE_CONFIG = yes ; then + WITH_PCRE=yes + fi +fi +if test $WITH_PCRE = yes ; then + AC_CHECK_LIB(pcre, pcre_compile, WITH_PCRE=yes, WITH_PCRE=no) + if test $WITH_PCRE = yes ; then + AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) + if test $WITH_PCRE_CONFIG = yes ; then + REGEX_LIBS=`pcre-config --cflags --libs` + else + REGEX_LIBS="-lpcre" + fi + fi +fi +AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ + AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) +if test $WITH_REGEX = yes ; then + AC_DEFINE(HAVE_REGEX, 1, [Define if regex is available.]) + if test $HAVE_PCRE = no ; then + AC_CHECK_FUNCS(regexec, REGEX_LIBS= , [ + AC_CHECK_LIB(regex, regexec, REGEX_LIBS="-lregex")]) + fi +fi + ### Check for ZLIB library. WITH_ZLIB=true
--- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -32,7 +32,7 @@ SUBDIRS = audio control deprecated elfun finance general image io \ linear-algebra miscellaneous optimization plot polynomial \ quaternion set signal sparse specfun special-matrix startup \ - statistics strings testfun time + statistics strings time DISTSUBDIRS = $(SUBDIRS)