/[pcre]/code/trunk/configure.ac
ViewVC logotype

Diff of /code/trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 550 by ph10, Sun Oct 10 16:24:11 2010 UTC revision 666 by ph10, Mon Aug 22 14:56:43 2011 UTC
# Line 9  dnl The PCRE_PRERELEASE feature is for i Line 9  dnl The PCRE_PRERELEASE feature is for i
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, [11])  m4_define(pcre_minor, [20])
13  m4_define(pcre_prerelease, [-RC1])  m4_define(pcre_prerelease, [-RC1])
14  m4_define(pcre_date, [2010-10-09])  m4_define(pcre_date, [2011-08-18])
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])
# Line 68  fi Line 68  fi
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
# Line 76  AC_TYPE_INT64_T Line 76  AC_TYPE_INT64_T
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"
# Line 112  AC_ARG_ENABLE(cpp, Line 112  AC_ARG_ENABLE(cpp,
112                , enable_cpp=yes)                , enable_cpp=yes)
113  AC_SUBST(enable_cpp)  AC_SUBST(enable_cpp)
114    
115    # Handle --enable-jit (disabled by default)
116    AC_ARG_ENABLE(jit,
117                  AS_HELP_STRING([--enable-jit],
118                                 [enable Just-In-Time compiling support]),
119                  , enable_jit=no)
120    
121  # Handle --enable-rebuild-chartables  # Handle --enable-rebuild-chartables
122  AC_ARG_ENABLE(rebuild-chartables,  AC_ARG_ENABLE(rebuild-chartables,
123                AS_HELP_STRING([--enable-rebuild-chartables],                AS_HELP_STRING([--enable-rebuild-chartables],
# Line 190  AC_ARG_ENABLE(pcregrep-libbz2, Line 196  AC_ARG_ENABLE(pcregrep-libbz2,
196                               [link pcregrep with libbz2 to handle .bz2 files]),                               [link pcregrep with libbz2 to handle .bz2 files]),
197                , enable_pcregrep_libbz2=no)                , enable_pcregrep_libbz2=no)
198    
199    # Handle --with-pcregrep-bufsize=N
200    AC_ARG_WITH(pcregrep-bufsize,
201                  AS_HELP_STRING([--with-pcregrep-bufsize=N],
202                                 [pcregrep buffer size (default=20480)]),
203                  , with_pcregrep_bufsize=20480)
204    
205  # Handle --enable-pcretest-libreadline  # Handle --enable-pcretest-libreadline
206  AC_ARG_ENABLE(pcretest-libreadline,  AC_ARG_ENABLE(pcretest-libreadline,
207                AS_HELP_STRING([--enable-pcretest-libreadline],                AS_HELP_STRING([--enable-pcretest-libreadline],
# Line 320  for flag in "-alias,__ZN7pcrecpp2RE6no_a Line 332  for flag in "-alias,__ZN7pcrecpp2RE6no_a
332    LDFLAGS="$OLD_LDFLAGS -Wl,$flag"    LDFLAGS="$OLD_LDFLAGS -Wl,$flag"
333    # 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,
334    # we give up and remove the new flag from LDFLAGS.    # we give up and remove the new flag from LDFLAGS.
335    AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp {    AC_LINK_IFELSE([AC_LANG_PROGRAM([namespace pcrecpp {
336                                      class RE { static int no_arg; };                                      class RE { static int no_arg; };
337                                      int RE::no_arg;                                      int RE::no_arg;
338                                    }],                                    }],
339                                   []),                                   [])],
340                   [AC_MSG_RESULT([yes]);                   [AC_MSG_RESULT([yes]);
341                    EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";                    EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";
342                    break;],                    break;],
# Line 361  for fn in strtoq strtoll _strtoi64 strto Line 373  for fn in strtoq strtoll _strtoi64 strto
373    else    else
374      include=stdlib.h      include=stdlib.h
375    fi    fi
376    AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <$include>],    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <$include>],
377                                      [char* e; return $fn("100", &e, 10)]),                                      [char* e; return $fn("100", &e, 10)])],
378                      [AC_MSG_RESULT(yes)                      [AC_MSG_RESULT(yes)
379                       AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1,                       AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1,
380                                          [Define to 1 if you have `$fn'.])                                          [Define to 1 if you have `$fn'.])
# Line 394  AC_SUBST(pcre_have_bits_type_traits) Line 406  AC_SUBST(pcre_have_bits_type_traits)
406  # Conditional compilation  # Conditional compilation
407  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")
408  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
409    AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
410    
411  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
412    
# Line 434  AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_ Line 447  AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_
447  AC_MSG_CHECKING([for libbz2])  AC_MSG_CHECKING([for libbz2])
448  OLD_LIBS="$LIBS"  OLD_LIBS="$LIBS"
449  LIBS="$LIBS -lbz2"  LIBS="$LIBS -lbz2"
450  AC_LINK_IFELSE( AC_LANG_PROGRAM([[  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
451  #ifdef HAVE_BZLIB_H  #ifdef HAVE_BZLIB_H
452  #include <bzlib.h>  #include <bzlib.h>
453  #endif]],  #endif]],
454  [[return (int)BZ2_bzopen("conftest", "rb");]]),  [[return (int)BZ2_bzopen("conftest", "rb");]])],
455  [AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;],  [AC_MSG_RESULT([yes]);HAVE_LIBBZ2=1; break;],
456  AC_MSG_RESULT([no]))  AC_MSG_RESULT([no]))
457  LIBS="$OLD_LIBS"  LIBS="$OLD_LIBS"
# Line 462  AC_SUBST(PCRE_STATIC_CFLAG) Line 475  AC_SUBST(PCRE_STATIC_CFLAG)
475    
476  # Here is where pcre specific defines are handled  # Here is where pcre specific defines are handled
477    
478    if test "$enable_jit" = "yes"; then
479      AC_DEFINE([SUPPORT_JIT], [], [
480        Define to enable support for Just-In-Time compiling.])
481    fi
482    
483  if test "$enable_utf8" = "yes"; then  if test "$enable_utf8" = "yes"; then
484    AC_DEFINE([SUPPORT_UTF8], [], [    AC_DEFINE([SUPPORT_UTF8], [], [
485      Define to enable support for the UTF-8 Unicode encoding. This will      Define to enable support for the UTF-8 Unicode encoding. This will
# Line 472  fi Line 490  fi
490    
491  if test "$enable_unicode_properties" = "yes"; then  if test "$enable_unicode_properties" = "yes"; then
492    AC_DEFINE([SUPPORT_UCP], [], [    AC_DEFINE([SUPPORT_UCP], [], [
493      Define to enable support for Unicode properties])      Define to enable support for Unicode properties.])
494  fi  fi
495    
496  if test "$enable_stack_for_recursion" = "no"; then  if test "$enable_stack_for_recursion" = "no"; then
# Line 500  if test "$enable_pcregrep_libbz2" = "yes Line 518  if test "$enable_pcregrep_libbz2" = "yes
518      able to handle .bz2 files.])      able to handle .bz2 files.])
519  fi  fi
520    
521    if test $with_pcregrep_bufsize -lt 8192 ; then
522      with_pcregrep_bufsize="8192"
523    fi
524    
525    AC_DEFINE_UNQUOTED([PCREGREP_BUFSIZE], [$with_pcregrep_bufsize], [
526      The value of PCREGREP_BUFSIZE determines the size of buffer used by
527      pcregrep to hold parts of the file it is searching. On systems that
528      support it, "configure" can be used to override the default, which is
529      8192. This is also the minimum value. The actual amount of memory used by
530      pcregrep is three times this number, because it allows for the buffering of
531      "before" and "after" lines.])
532    
533  if test "$enable_pcretest_libreadline" = "yes"; then  if test "$enable_pcretest_libreadline" = "yes"; then
534    AC_DEFINE([SUPPORT_LIBREADLINE], [], [    AC_DEFINE([SUPPORT_LIBREADLINE], [], [
535      Define to allow pcretest to be linked with libreadline.])      Define to allow pcretest to be linked with libreadline.])
# Line 625  AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS) Line 655  AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS)
655  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)
656    
657  # When we run 'make distcheck', use these arguments.  # When we run 'make distcheck', use these arguments.
658  DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties"  DISTCHECK_CONFIGURE_FLAGS="--enable-jit --enable-cpp --enable-unicode-properties"
659  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
660    
661  # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is  # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
# Line 713  $PACKAGE-$VERSION configuration summary: Line 743  $PACKAGE-$VERSION configuration summary:
743      Extra libraries ................. : ${LIBS}      Extra libraries ................. : ${LIBS}
744    
745      Build C++ library ............... : ${enable_cpp}      Build C++ library ............... : ${enable_cpp}
746        Enable JIT compiling support .... : ${enable_jit}
747      Enable UTF-8 support ............ : ${enable_utf8}      Enable UTF-8 support ............ : ${enable_utf8}
748      Unicode properties .............. : ${enable_unicode_properties}      Unicode properties .............. : ${enable_unicode_properties}
749      Newline char/sequence ........... : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
# Line 726  $PACKAGE-$VERSION configuration summary: Line 757  $PACKAGE-$VERSION configuration summary:
757      Match limit recursion ........... : ${with_match_limit_recursion}      Match limit recursion ........... : ${with_match_limit_recursion}
758      Build shared libs ............... : ${enable_shared}      Build shared libs ............... : ${enable_shared}
759      Build static libs ............... : ${enable_static}      Build static libs ............... : ${enable_static}
760        Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}
761      Link pcregrep with libz ......... : ${enable_pcregrep_libz}      Link pcregrep with libz ......... : ${enable_pcregrep_libz}
762      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
763      Link pcretest with libreadline .. : ${enable_pcretest_libreadline}      Link pcretest with libreadline .. : ${enable_pcretest_libreadline}

Legend:
Removed from v.550  
changed lines
  Added in v.666

  ViewVC Help
Powered by ViewVC 1.1.5