# HG changeset patch # User jwe # Date 1195064450 0 # Node ID ff2ff2c09865b940e9527e536aaea4fed2a4a757 # Parent e9a590a137d88dd7688d7d948257c7e097f3da75 [project @ 2007-11-14 18:20:49 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-11-14 Joseph P. Skudlarek + + * configure.in: Rework pcre.h tests to work with autoconf 2.59, + and avoid explicit pcre/pcre.h check by using pcre-config. + 2007-11-13 Joseph P. Skudlarek * octave-bug.in: Try mailx, then Mail, then /usr/ucb/mail, then diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.593 $) +AC_REVISION($Revision: 1.594 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -423,40 +423,39 @@ AC_SUBST(TEXINFO_QHULL) ### Check for pcre/regex library. -WITH_PCRE=no -REGEX_LIBS= -AC_CHECK_LIB(pcre, pcre_compile, [ - m4_foreach_w([hdr], [pcre/pcre.h pcre.h], - [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([hdr])), - [Define to 1 if you have the <]m4_defn([hdr])[> - header file, and it defines PCRE_INFO_NAMECOUNT, - PCRE_INFO_NAMEENTRYSIZE, and PCRE_INFO_NAMETABLE.])]) - for hdr in pcre/pcre.h pcre.h; do - AC_MSG_CHECKING([whether $hdr defines the macros we need]) - AC_EGREP_CPP([PCRE_HAS_MACROS_WE_NEED], [ -#include <$hdr> + +## check for pcre-config, and if so, set CPPFLAGS appropriately +AC_CHECK_PROG(WITH_PCRE_CONFIG, pcre-config, yes, no) +if test $WITH_PCRE_CONFIG = yes ; then + CPPFLAGS="$CPPFLAGS $(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], [ +#include #if defined (PCRE_INFO_NAMECOUNT) \ && defined (PCRE_INFO_NAMEENTRYSIZE) \ && defined (PCRE_INFO_NAMETABLE) PCRE_HAS_MACROS_WE_NEED -#endif], [ -dnl We check the header after the egrep to avoid defining HAVE_X_H macros -dnl for headers that we can't use. - AC_MSG_RESULT([yes]) - AC_CHECK_HEADER($hdr, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$hdr), 1)]) - AC_DEFINE(HAVE_PCRE, 1, [Define if PCRE is available.]) - WITH_PCRE=yes - REGEX_LIBS=-lpcre - break - ], [AC_MSG_RESULT([no])]) - done -]) +#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= +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 --libs) + else + REGEX_LIBS=-lpcre + fi +fi if test $WITH_PCRE = no; then 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) fi +## not sure why we need to check for regex like this if pcre is defined, but it was like this when I got here ... AC_CHECK_FUNCS(regexec, WITH_REGEX=yes , [ AC_CHECK_LIB(regex, regexec, WITH_REGEX=yes, WITH_REGEX=no)]) if test $WITH_REGEX = yes ; then @@ -470,6 +469,7 @@ warn_regex="regular expression functions not found. The regular expression matching functions will be disabled." AC_MSG_WARN($warn_regex) fi + AC_SUBST(REGEX_LIBS) ### Check for ZLIB library. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-11-14 John W. Eaton + + * specfun/bessel.m: Update doc string from + src/DLD-FUNCTIONS/besselj.cc. + 2007-11-12 David Bateman * plot/contour.m: Allow handles to be passed and returned. Split diff --git a/scripts/specfun/bessel.m b/scripts/specfun/bessel.m --- a/scripts/specfun/bessel.m +++ b/scripts/specfun/bessel.m @@ -17,36 +17,60 @@ ## . ## -*- texinfo -*- -## @deftypefn {Mapping Function} {} besseli (@var{alpha}, @var{x}) -## @deftypefnx {Mapping Function} {} besselj (@var{alpha}, @var{x}) -## @deftypefnx {Mapping Function} {} besselk (@var{alpha}, @var{x}) -## @deftypefnx {Mapping Function} {} bessely (@var{alpha}, @var{x}) -## Compute Bessel functions of the following types: -## +## @deftypefn {Loadable Function} {[@var{j}, @var{ierr}] =} besselj (@var{alpha}, @var{x}, @var{opt}) +## @deftypefnx {Loadable Function} {[@var{y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt}) +## @deftypefnx {Loadable Function} {[@var{i}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt}) +## @deftypefnx {Loadable Function} {[@var{k}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt}) +## @deftypefnx {Loadable Function} {[@var{h}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt}) +## Compute Bessel or Hankel functions of various kinds: +## ## @table @code ## @item besselj ## Bessel functions of the first kind. -## ## @item bessely ## Bessel functions of the second kind. -## ## @item besseli ## Modified Bessel functions of the first kind. -## ## @item besselk ## Modified Bessel functions of the second kind. +## @item besselh +## Compute Hankel functions of the first (@var{k} = 1) or second (@var{k} +## = 2) kind. ## @end table -## -## The second argument, @var{x}, must be a real matrix, vector, or scalar. -## -## The first argument, @var{alpha}, must be greater than or equal to zero. -## If @var{alpha} is a range, it must have an increment equal to one. -## +## +## If the argument @var{opt} is supplied, the result is scaled by the +## @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for +## @var{k} = 2. +## ## If @var{alpha} is a scalar, the result is the same size as @var{x}. -## -## If @var{alpha} is a range, @var{x} must be a vector or scalar, and the -## result is a matrix with @code{length(@var{x})} rows and -## @code{length(@var{alpha})} columns. +## If @var{x} is a scalar, the result is the same size as @var{alpha}. +## If @var{alpha} is a row vector and @var{x} is a column vector, the +## result is a matrix with @code{length (@var{x})} rows and +## @code{length (@var{alpha})} columns. Otherwise, @var{alpha} and +## @var{x} must conform and the result will be the same size. +## +## The value of @var{alpha} must be real. The value of @var{x} may be +## complex. +## +## If requested, @var{ierr} contains the following status information +## and is the same size as the result. +## +## @enumerate 0 +## @item +## Normal return. +## @item +## Input error, return @code{NaN}. +## @item +## Overflow, return @code{Inf}. +## @item +## Loss of significance by argument reduction results in less than +## half of machine accuracy. +## @item +## Complete loss of significance by argument reduction, return @code{NaN}. +## @item +## Error---no computation, algorithm termination condition not met, +## return @code{NaN}. +## @end enumerate ## @end deftypefn function bessel () diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-11-14 Joseph P. Skudlarek + + * DLD-FUNCTIONS/regexp.cc: Undo previous change. + 2007-11-14 John W. Eaton * mex.cc (mex::mark, mex::unmark): Now public. diff --git a/src/DLD-FUNCTIONS/regexp.cc b/src/DLD-FUNCTIONS/regexp.cc --- a/src/DLD-FUNCTIONS/regexp.cc +++ b/src/DLD-FUNCTIONS/regexp.cc @@ -40,9 +40,7 @@ #include "quit.h" #include "parse.h" -#if defined (HAVE_PCRE_PCRE_H) -#include -#elif defined (HAVE_PCRE_H) +#if defined (HAVE_PCRE) #include #elif defined (HAVE_REGEX) #if defined (__MINGW32__)