| 9 |
dnl be defined as -RC2, for example. For real releases, it should be empty. |
dnl be defined as -RC2, for example. For real releases, it should be empty. |
| 10 |
|
|
| 11 |
m4_define(pcre_major, [8]) |
m4_define(pcre_major, [8]) |
| 12 |
m4_define(pcre_minor, [02]) |
m4_define(pcre_minor, [13]) |
| 13 |
m4_define(pcre_prerelease, [-RC1]) |
m4_define(pcre_prerelease, []) |
| 14 |
m4_define(pcre_date, [2010-03-01]) |
m4_define(pcre_date, [2011-08-16]) |
| 15 |
|
|
| 16 |
# Libtool shared library interface versions (current:revision:age) |
# Libtool shared library interface versions (current:revision:age) |
| 17 |
m4_define(libpcre_version, [0:1:0]) |
m4_define(libpcre_version, [0:1:0]) |
| 68 |
# AC_PROG_CXX will return "g++" even if no c++ compiler is installed. |
# AC_PROG_CXX will return "g++" even if no c++ compiler is installed. |
| 69 |
# Check for that case, and just disable c++ code if g++ doesn't run. |
# Check for that case, and just disable c++ code if g++ doesn't run. |
| 70 |
AC_LANG_PUSH(C++) |
AC_LANG_PUSH(C++) |
| 71 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[]),, CXX=""; CXXCP=""; CXXFLAGS="") |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],, CXX=""; CXXCP=""; CXXFLAGS="") |
| 72 |
AC_LANG_POP |
AC_LANG_POP |
| 73 |
|
|
| 74 |
# Check for a 64-bit integer type |
# Check for a 64-bit integer type |
| 76 |
|
|
| 77 |
AC_PROG_INSTALL |
AC_PROG_INSTALL |
| 78 |
AC_LIBTOOL_WIN32_DLL |
AC_LIBTOOL_WIN32_DLL |
| 79 |
AC_PROG_LIBTOOL |
LT_INIT |
| 80 |
AC_PROG_LN_S |
AC_PROG_LN_S |
| 81 |
|
|
| 82 |
PCRE_MAJOR="pcre_major" |
PCRE_MAJOR="pcre_major" |
| 110 |
AS_HELP_STRING([--disable-cpp], |
AS_HELP_STRING([--disable-cpp], |
| 111 |
[disable C++ support]), |
[disable C++ support]), |
| 112 |
, enable_cpp=yes) |
, enable_cpp=yes) |
| 113 |
AC_SUBST(enable_cpp) |
AC_SUBST(enable_cpp) |
| 114 |
|
|
| 115 |
# Handle --enable-rebuild-chartables |
# Handle --enable-rebuild-chartables |
| 116 |
AC_ARG_ENABLE(rebuild-chartables, |
AC_ARG_ENABLE(rebuild-chartables, |
| 190 |
[link pcregrep with libbz2 to handle .bz2 files]), |
[link pcregrep with libbz2 to handle .bz2 files]), |
| 191 |
, enable_pcregrep_libbz2=no) |
, enable_pcregrep_libbz2=no) |
| 192 |
|
|
| 193 |
|
# Handle --with-pcregrep-bufsize=N |
| 194 |
|
AC_ARG_WITH(pcregrep-bufsize, |
| 195 |
|
AS_HELP_STRING([--with-pcregrep-bufsize=N], |
| 196 |
|
[pcregrep buffer size (default=20480)]), |
| 197 |
|
, with_pcregrep_bufsize=20480) |
| 198 |
|
|
| 199 |
# Handle --enable-pcretest-libreadline |
# Handle --enable-pcretest-libreadline |
| 200 |
AC_ARG_ENABLE(pcretest-libreadline, |
AC_ARG_ENABLE(pcretest-libreadline, |
| 201 |
AS_HELP_STRING([--enable-pcretest-libreadline], |
AS_HELP_STRING([--enable-pcretest-libreadline], |
| 326 |
LDFLAGS="$OLD_LDFLAGS -Wl,$flag" |
LDFLAGS="$OLD_LDFLAGS -Wl,$flag" |
| 327 |
# We try to run the linker with this new ld flag. If the link fails, |
# We try to run the linker with this new ld flag. If the link fails, |
| 328 |
# we give up and remove the new flag from LDFLAGS. |
# we give up and remove the new flag from LDFLAGS. |
| 329 |
AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp { |
AC_LINK_IFELSE([AC_LANG_PROGRAM([namespace pcrecpp { |
| 330 |
class RE { static int no_arg; }; |
class RE { static int no_arg; }; |
| 331 |
int RE::no_arg; |
int RE::no_arg; |
| 332 |
}], |
}], |
| 333 |
[]), |
[])], |
| 334 |
[AC_MSG_RESULT([yes]); |
[AC_MSG_RESULT([yes]); |
| 335 |
EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag"; |
EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag"; |
| 336 |
break;], |
break;], |
| 367 |
else |
else |
| 368 |
include=stdlib.h |
include=stdlib.h |
| 369 |
fi |
fi |
| 370 |
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <$include>], |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <$include>], |
| 371 |
[char* e; return $fn("100", &e, 10)]), |
[char* e; return $fn("100", &e, 10)])], |
| 372 |
[AC_MSG_RESULT(yes) |
[AC_MSG_RESULT(yes) |
| 373 |
AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1, |
AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1, |
| 374 |
[Define to 1 if you have `$fn'.]) |
[Define to 1 if you have `$fn'.]) |
| 440 |
AC_MSG_CHECKING([for libbz2]) |
AC_MSG_CHECKING([for libbz2]) |
| 441 |
OLD_LIBS="$LIBS" |
OLD_LIBS="$LIBS" |
| 442 |
LIBS="$LIBS -lbz2" |
LIBS="$LIBS -lbz2" |
| 443 |
AC_LINK_IFELSE( AC_LANG_PROGRAM([[ |
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ |
| 444 |
#ifdef HAVE_BZLIB_H |
#ifdef HAVE_BZLIB_H |
| 445 |
#include <bzlib.h> |
#include <bzlib.h> |
| 446 |
#endif]], |
#endif]], |
| 447 |
[[return (int)BZ2_bzopen("conftest", "rb");]]), |
[[return (int)BZ2_bzopen("conftest", "rb");]])], |
| 448 |
[AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;], |
[AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;], |
| 449 |
AC_MSG_RESULT([no])) |
AC_MSG_RESULT([no])) |
| 450 |
LIBS="$OLD_LIBS" |
LIBS="$OLD_LIBS" |
| 506 |
able to handle .bz2 files.]) |
able to handle .bz2 files.]) |
| 507 |
fi |
fi |
| 508 |
|
|
| 509 |
|
if test $with_pcregrep_bufsize -lt 8192 ; then |
| 510 |
|
with_pcregrep_bufsize="8192" |
| 511 |
|
fi |
| 512 |
|
|
| 513 |
|
AC_DEFINE_UNQUOTED([PCREGREP_BUFSIZE], [$with_pcregrep_bufsize], [ |
| 514 |
|
The value of PCREGREP_BUFSIZE determines the size of buffer used by |
| 515 |
|
pcregrep to hold parts of the file it is searching. On systems that |
| 516 |
|
support it, "configure" can be used to override the default, which is |
| 517 |
|
8192. This is also the minimum value. The actual amount of memory used by |
| 518 |
|
pcregrep is three times this number, because it allows for the buffering of |
| 519 |
|
"before" and "after" lines.]) |
| 520 |
|
|
| 521 |
if test "$enable_pcretest_libreadline" = "yes"; then |
if test "$enable_pcretest_libreadline" = "yes"; then |
| 522 |
AC_DEFINE([SUPPORT_LIBREADLINE], [], [ |
AC_DEFINE([SUPPORT_LIBREADLINE], [], [ |
| 523 |
Define to allow pcretest to be linked with libreadline.]) |
Define to allow pcretest to be linked with libreadline.]) |
| 744 |
Match limit recursion ........... : ${with_match_limit_recursion} |
Match limit recursion ........... : ${with_match_limit_recursion} |
| 745 |
Build shared libs ............... : ${enable_shared} |
Build shared libs ............... : ${enable_shared} |
| 746 |
Build static libs ............... : ${enable_static} |
Build static libs ............... : ${enable_static} |
| 747 |
|
Buffer size for pcregrep ........ : ${with_pcregrep_bufsize} |
| 748 |
Link pcregrep with libz ......... : ${enable_pcregrep_libz} |
Link pcregrep with libz ......... : ${enable_pcregrep_libz} |
| 749 |
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} |
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} |
| 750 |
Link pcretest with libreadline .. : ${enable_pcretest_libreadline} |
Link pcretest with libreadline .. : ${enable_pcretest_libreadline} |