/[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 685 by ph10, Tue Sep 6 15:02:07 2011 UTC revision 843 by ph10, Sun Jan 1 14:36:56 2012 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, [20])  m4_define(pcre_minor, [30])
13  m4_define(pcre_prerelease, [-RC1])  m4_define(pcre_prerelease, [-PT1])
14  m4_define(pcre_date, [2011-08-18])  m4_define(pcre_date, [2012-01-01])
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 104  then Line 104  then
104    htmldir='${docdir}/html'    htmldir='${docdir}/html'
105  fi  fi
106    
107    # Handle --disable-pcre8 (enabled by default)
108    AC_ARG_ENABLE(pcre8,
109                  AS_HELP_STRING([--disable-pcre8],
110                                 [enable 8 bit character support]),
111                  , enable_pcre8=unset)
112    AC_SUBST(enable_pcre8)
113    
114    # Handle --enable-pcre16 (disabled by default)
115    AC_ARG_ENABLE(pcre16,
116                  AS_HELP_STRING([--enable-pcre16],
117                                 [enable 16 bit character support]),
118                  , enable_pcre16=unset)
119    AC_SUBST(enable_pcre16)
120    
121  # Handle --disable-cpp. The substitution of enable_cpp is needed for use in  # Handle --disable-cpp. The substitution of enable_cpp is needed for use in
122  # pcre-config.  # pcre-config.
123  AC_ARG_ENABLE(cpp,  AC_ARG_ENABLE(cpp,
124                AS_HELP_STRING([--disable-cpp],                AS_HELP_STRING([--disable-cpp],
125                               [disable C++ support]),                               [disable C++ support]),
126                , enable_cpp=yes)                , enable_cpp=unset)
127  AC_SUBST(enable_cpp)  AC_SUBST(enable_cpp)
128    
129  # Handle --enable-jit (disabled by default)  # Handle --enable-jit (disabled by default)
# Line 133  AC_ARG_ENABLE(rebuild-chartables, Line 147  AC_ARG_ENABLE(rebuild-chartables,
147  # Handle --enable-utf8 (disabled by default)  # Handle --enable-utf8 (disabled by default)
148  AC_ARG_ENABLE(utf8,  AC_ARG_ENABLE(utf8,
149                AS_HELP_STRING([--enable-utf8],                AS_HELP_STRING([--enable-utf8],
150                               [enable UTF-8 support (incompatible with --enable-ebcdic)]),                               [another name for --enable-utf. Kept only for compatibility reasons]),
151                , enable_utf8=unset)                , enable_utf8=unset)
152    
153    # Handle --enable-utf (disabled by default)
154    AC_ARG_ENABLE(utf,
155                  AS_HELP_STRING([--enable-utf],
156                                 [enable UTF-8/16 support (incompatible with --enable-ebcdic)]),
157                  , enable_utf=unset)
158    
159  # Handle --enable-unicode-properties  # Handle --enable-unicode-properties
160  AC_ARG_ENABLE(unicode-properties,  AC_ARG_ENABLE(unicode-properties,
161                AS_HELP_STRING([--enable-unicode-properties],                AS_HELP_STRING([--enable-unicode-properties],
162                               [enable Unicode properties support (implies --enable-utf8)]),                               [enable Unicode properties support (implies --enable-utf)]),
163                , enable_unicode_properties=no)                , enable_unicode_properties=no)
164    
165  # Handle --enable-newline=NL  # Handle --enable-newline=NL
# Line 181  AC_ARG_ENABLE(bsr-anycrlf, Line 201  AC_ARG_ENABLE(bsr-anycrlf,
201  # Handle --enable-ebcdic  # Handle --enable-ebcdic
202  AC_ARG_ENABLE(ebcdic,  AC_ARG_ENABLE(ebcdic,
203                AS_HELP_STRING([--enable-ebcdic],                AS_HELP_STRING([--enable-ebcdic],
204                               [assume EBCDIC coding rather than ASCII; incompatible with --enable-utf8; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),                               [assume EBCDIC coding rather than ASCII; incompatible with --enable-utf; use only in (uncommon) EBCDIC environments; it implies --enable-rebuild-chartables]),
205                , enable_ebcdic=no)                , enable_ebcdic=no)
206    
207  # Handle --disable-stack-for-recursion  # Handle --disable-stack-for-recursion
# Line 245  AC_ARG_WITH(match-limit-recursion, Line 265  AC_ARG_WITH(match-limit-recursion,
265                             [default limit on internal recursion (default=MATCH_LIMIT)]),                             [default limit on internal recursion (default=MATCH_LIMIT)]),
266              , with_match_limit_recursion=MATCH_LIMIT)              , with_match_limit_recursion=MATCH_LIMIT)
267    
268  # Make sure that if enable_unicode_properties was set, that UTF-8 support  # Copy enable_utf8 value to enable_utf for compatibility reasons
269  # is enabled.  if test "x$enable_utf8" != "xunset"
270  #  then
271      if test "x$enable_utf" != "xunset"
272      then
273        AC_MSG_ERROR([--enable/disable-utf8 is kept only for compatibility reasons and its value is copied to --enable/disable-utf. Newer code must use --enable/disable-utf alone.])
274      fi
275      enable_utf=$enable_utf8
276    fi
277    
278    # Set the default value for pcre8
279    if test "x$enable_pcre8" = "xunset"
280    then
281      enable_pcre8=yes
282    fi
283    
284    # Set the default value for pcre16
285    if test "x$enable_pcre16" = "xunset"
286    then
287      enable_pcre16=no
288    fi
289    
290    # Make sure enable_pcre8 or enable_pcre16 was set
291    if test "x$enable_pcre8$enable_pcre16" = "xnono"
292    then
293      AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled])
294    fi
295    
296    # Make sure that if enable_unicode_properties was set, that UTF support is enabled.
297  if test "x$enable_unicode_properties" = "xyes"  if test "x$enable_unicode_properties" = "xyes"
298  then  then
299    if test "x$enable_utf8" = "xno"    if test "x$enable_utf" = "xno"
300    then    then
301      AC_MSG_ERROR([support for Unicode properties requires UTF-8 support])      AC_MSG_ERROR([support for Unicode properties requires UTF-8/16 support])
302    fi    fi
303    enable_utf8=yes    enable_utf=yes
304    fi
305    
306    # enable_utf is disabled by default.
307    if test "x$enable_utf" = "xunset"
308    then
309      enable_utf=no
310    fi
311    
312    # enable_cpp copies the value of enable_pcre8 by default
313    if test "x$enable_cpp" = "xunset"
314    then
315      enable_cpp=$enable_pcre8
316  fi  fi
317    
318  if test "x$enable_utf8" = "xunset"  # Make sure that if enable_cpp was set, that enable_pcre8 support is enabled
319    if test "x$enable_cpp" = "xyes"
320  then  then
321    enable_utf8=no    if test "x$enable_pcre8" = "xno"
322      then
323        AC_MSG_ERROR([C++ library requires pcre library with 8 bit characters])
324      fi
325  fi  fi
326    
327  # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.  # Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.
328  # Also check that UTF-8 support is not requested, because PCRE cannot handle  # Also check that UTF support is not requested, because PCRE cannot handle
329  # EBCDIC and UTF-8 in the same build. To do so it would need to use different  # EBCDIC and UTF in the same build. To do so it would need to use different
330  # character constants depending on the mode.  # character constants depending on the mode.
331  #  #
332  if test "x$enable_ebcdic" = "xyes"  if test "x$enable_ebcdic" = "xyes"
333  then  then
334    enable_rebuild_chartables=yes    enable_rebuild_chartables=yes
335    if test "x$enable_utf8" = "xyes"    if test "x$enable_utf" = "xyes"
336    then    then
337      AC_MSG_ERROR([support for EBCDIC and UTF-8 cannot be enabled at the same time])      AC_MSG_ERROR([support for EBCDIC and UTF-8/16 cannot be enabled at the same time])
338    fi    fi
339  fi  fi
340    
# Line 410  AC_SUBST(pcre_have_type_traits) Line 472  AC_SUBST(pcre_have_type_traits)
472  AC_SUBST(pcre_have_bits_type_traits)  AC_SUBST(pcre_have_bits_type_traits)
473    
474  # Conditional compilation  # Conditional compilation
475    AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes")
476    AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes")
477  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")
478  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
479  AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")  AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
480    AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes")
481    
482  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
483    
# Line 481  AC_SUBST(PCRE_STATIC_CFLAG) Line 546  AC_SUBST(PCRE_STATIC_CFLAG)
546    
547  # Here is where pcre specific defines are handled  # Here is where pcre specific defines are handled
548    
549    if test "$enable_pcre8" = "yes"; then
550      AC_DEFINE([SUPPORT_PCRE8], [], [
551        Define to enable the 8 bit PCRE library.])
552    fi
553    
554    if test "$enable_pcre16" = "yes"; then
555      AC_DEFINE([SUPPORT_PCRE16], [], [
556        Define to enable the 16 bit PCRE library.])
557    fi
558    
559  if test "$enable_jit" = "yes"; then  if test "$enable_jit" = "yes"; then
560    AC_DEFINE([SUPPORT_JIT], [], [    AC_DEFINE([SUPPORT_JIT], [], [
561      Define to enable support for Just-In-Time compiling.])      Define to enable support for Just-In-Time compiling.])
# Line 490  fi Line 565  fi
565    
566  if test "$enable_pcregrep_jit" = "yes"; then  if test "$enable_pcregrep_jit" = "yes"; then
567    AC_DEFINE([SUPPORT_PCREGREP_JIT], [], [    AC_DEFINE([SUPPORT_PCREGREP_JIT], [], [
568      Define to enable JIT support in pcregrep.])      Define to enable JIT support in pcregrep.])
569  fi  fi
570    
571  if test "$enable_utf8" = "yes"; then  if test "$enable_utf" = "yes"; then
572    AC_DEFINE([SUPPORT_UTF8], [], [    AC_DEFINE([SUPPORT_UTF], [], [
573      Define to enable support for the UTF-8 Unicode encoding. This will      Define to enable support for the UTF-8/16 Unicode encoding. This
574      work even in an EBCDIC environment, but it is incompatible with      will work even in an EBCDIC environment, but it is incompatible
575      the EBCDIC macro. That is, PCRE can support *either* EBCDIC code      with the EBCDIC macro. That is, PCRE can support *either* EBCDIC
576      *or* ASCII/UTF-8, but not both at once.])      code *or* ASCII/UTF-8/16, but not both at once.])
577  fi  fi
578    
579  if test "$enable_unicode_properties" = "yes"; then  if test "$enable_unicode_properties" = "yes"; then
# Line 633  if test "$enable_ebcdic" = "yes"; then Line 708  if test "$enable_ebcdic" = "yes"; then
708      character codes, define this macro as 1. On systems that can use      character codes, define this macro as 1. On systems that can use
709      "configure", this can be done via --enable-ebcdic. PCRE will then      "configure", this can be done via --enable-ebcdic. PCRE will then
710      assume that all input strings are in EBCDIC. If you do not define      assume that all input strings are in EBCDIC. If you do not define
711      this macro, PCRE will assume input strings are ASCII or UTF-8 Unicode.      this macro, PCRE will assume input strings are ASCII or UTF-8/16
712      It is not possible to build a version of PCRE that supports both      Unicode. It is not possible to build a version of PCRE that
713      EBCDIC and UTF-8.])      supports both EBCDIC and UTF-8/16.])
714  fi  fi
715    
716  # Platform specific issues  # Platform specific issues
# Line 668  AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS) Line 743  AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS)
743  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)
744    
745  # When we run 'make distcheck', use these arguments.  # When we run 'make distcheck', use these arguments.
746  DISTCHECK_CONFIGURE_FLAGS="--enable-jit --enable-cpp --enable-unicode-properties"  DISTCHECK_CONFIGURE_FLAGS="--enable-pcre16 --enable-jit --enable-cpp --enable-unicode-properties"
747  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
748    
749  # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is  # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
# Line 719  AC_SUBST(LIBREADLINE) Line 794  AC_SUBST(LIBREADLINE)
794  AC_CONFIG_FILES(  AC_CONFIG_FILES(
795          Makefile          Makefile
796          libpcre.pc          libpcre.pc
797          libpcreposix.pc          libpcre16.pc
798            libpcreposix.pc
799          libpcrecpp.pc          libpcrecpp.pc
800          pcre-config          pcre-config
801          pcre.h          pcre.h
# Line 755  $PACKAGE-$VERSION configuration summary: Line 831  $PACKAGE-$VERSION configuration summary:
831      Linker flags .................... : ${LDFLAGS}      Linker flags .................... : ${LDFLAGS}
832      Extra libraries ................. : ${LIBS}      Extra libraries ................. : ${LIBS}
833    
834        Build 8 bit pcre library ........ : ${enable_pcre8}
835        Build 16 bit pcre library ....... : ${enable_pcre16}
836      Build C++ library ............... : ${enable_cpp}      Build C++ library ............... : ${enable_cpp}
837      Enable JIT compiling support .... : ${enable_jit}      Enable JIT compiling support .... : ${enable_jit}
838      Enable UTF-8 support ............ : ${enable_utf8}      Enable UTF-8/16 support ......... : ${enable_utf}
839      Unicode properties .............. : ${enable_unicode_properties}      Unicode properties .............. : ${enable_unicode_properties}
840      Newline char/sequence ........... : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
841      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
# Line 770  $PACKAGE-$VERSION configuration summary: Line 848  $PACKAGE-$VERSION configuration summary:
848      Match limit recursion ........... : ${with_match_limit_recursion}      Match limit recursion ........... : ${with_match_limit_recursion}
849      Build shared libs ............... : ${enable_shared}      Build shared libs ............... : ${enable_shared}
850      Build static libs ............... : ${enable_static}      Build static libs ............... : ${enable_static}
851      Use JIT in pcregrep ............. : ${enable_pcregrep_jit}      Use JIT in pcregrep ............. : ${enable_pcregrep_jit}
852      Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}      Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}
853      Link pcregrep with libz ......... : ${enable_pcregrep_libz}      Link pcregrep with libz ......... : ${enable_pcregrep_libz}
854      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}

Legend:
Removed from v.685  
changed lines
  Added in v.843

  ViewVC Help
Powered by ViewVC 1.1.5