/[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 1031 by ph10, Sat Sep 8 15:59:01 2012 UTC revision 1320 by ph10, Wed May 1 16:39:35 2013 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, [32])  m4_define(pcre_minor, [33])
13  m4_define(pcre_prerelease, [-RC1])  m4_define(pcre_prerelease, [-RC1])
14  m4_define(pcre_date, [2012-08-08])  m4_define(pcre_date, [2013-04-28])
15    
16  # NOTE: The CMakeLists.txt file searches for the above variables in the first  # NOTE: The CMakeLists.txt file searches for the above variables in the first
17  # 50 lines of this file. Please update that if the variables above are moved.  # 50 lines of this file. Please update that if the variables above are moved.
18    
19  # Libtool shared library interface versions (current:revision:age)  # Libtool shared library interface versions (current:revision:age)
20  m4_define(libpcre_version, [1:1:0])  m4_define(libpcre_version, [3:1:2])
21  m4_define(libpcre16_version, [0:1:0])  m4_define(libpcre16_version, [2:1:2])
22  m4_define(libpcreposix_version, [0:1:0])  m4_define(libpcre32_version, [0:1:0])
23    m4_define(libpcreposix_version, [0:2:0])
24  m4_define(libpcrecpp_version, [0:0:0])  m4_define(libpcrecpp_version, [0:0:0])
25    
26  AC_PREREQ(2.57)  AC_PREREQ(2.57)
# Line 29  AM_INIT_AUTOMAKE([dist-bzip2 dist-zip]) Line 30  AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])
30  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
31  AC_CONFIG_HEADERS(config.h)  AC_CONFIG_HEADERS(config.h)
32    
33    # This is a new thing required to stop a warning from automake 1.12
34    m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
35    
36  # This was added at the suggestion of libtoolize (03-Jan-10)  # This was added at the suggestion of libtoolize (03-Jan-10)
37  AC_CONFIG_MACRO_DIR([m4])  AC_CONFIG_MACRO_DIR([m4])
38    
# Line 47  remember_set_CXXFLAGS="$CXXFLAGS" Line 51  remember_set_CXXFLAGS="$CXXFLAGS"
51    
52  AC_PROG_CC  AC_PROG_CC
53  AC_PROG_CXX  AC_PROG_CXX
54    AM_PROG_CC_C_O
55    
56  if test "x$remember_set_CFLAGS" = "x"  if test "x$remember_set_CFLAGS" = "x"
57  then  then
# Line 84  AC_LIBTOOL_WIN32_DLL Line 89  AC_LIBTOOL_WIN32_DLL
89  LT_INIT  LT_INIT
90  AC_PROG_LN_S  AC_PROG_LN_S
91    
92    # Check for GCC visibility feature
93    
94    PCRE_VISIBILITY
95    
96    # Versioning
97    
98  PCRE_MAJOR="pcre_major"  PCRE_MAJOR="pcre_major"
99  PCRE_MINOR="pcre_minor"  PCRE_MINOR="pcre_minor"
100  PCRE_PRERELEASE="pcre_prerelease"  PCRE_PRERELEASE="pcre_prerelease"
# Line 123  AC_ARG_ENABLE(pcre16, Line 134  AC_ARG_ENABLE(pcre16,
134                , enable_pcre16=unset)                , enable_pcre16=unset)
135  AC_SUBST(enable_pcre16)  AC_SUBST(enable_pcre16)
136    
137    # Handle --enable-pcre32 (disabled by default)
138    AC_ARG_ENABLE(pcre32,
139                  AS_HELP_STRING([--enable-pcre32],
140                                 [enable 32 bit character support]),
141                  , enable_pcre32=unset)
142    AC_SUBST(enable_pcre32)
143    
144  # 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
145  # pcre-config.  # pcre-config.
146  AC_ARG_ENABLE(cpp,  AC_ARG_ENABLE(cpp,
# Line 158  AC_ARG_ENABLE(utf8, Line 176  AC_ARG_ENABLE(utf8,
176  # Handle --enable-utf (disabled by default)  # Handle --enable-utf (disabled by default)
177  AC_ARG_ENABLE(utf,  AC_ARG_ENABLE(utf,
178                AS_HELP_STRING([--enable-utf],                AS_HELP_STRING([--enable-utf],
179                               [enable UTF-8/16 support (incompatible with --enable-ebcdic)]),                               [enable UTF-8/16/32 support (incompatible with --enable-ebcdic)]),
180                , enable_utf=unset)                , enable_utf=unset)
181    
182  # Handle --enable-unicode-properties  # Handle --enable-unicode-properties
# Line 276  AC_ARG_WITH(match-limit-recursion, Line 294  AC_ARG_WITH(match-limit-recursion,
294                             [default limit on internal recursion (default=MATCH_LIMIT)]),                             [default limit on internal recursion (default=MATCH_LIMIT)]),
295              , with_match_limit_recursion=MATCH_LIMIT)              , with_match_limit_recursion=MATCH_LIMIT)
296    
297    # Handle --enable-valgrind
298    AC_ARG_ENABLE(valgrind,
299                  AS_HELP_STRING([--enable-valgrind],
300                                 [valgrind support]),
301                  , enable_valgrind=no)
302    
303    # Enable code coverage reports using gcov
304    AC_ARG_ENABLE(coverage,
305                  AS_HELP_STRING([--enable-coverage],
306                                 [enable code coverage reports using gcov]),
307                  , enable_coverage=no)
308    
309  # Copy enable_utf8 value to enable_utf for compatibility reasons  # Copy enable_utf8 value to enable_utf for compatibility reasons
310  if test "x$enable_utf8" != "xunset"  if test "x$enable_utf8" != "xunset"
311  then  then
# Line 298  then Line 328  then
328    enable_pcre16=no    enable_pcre16=no
329  fi  fi
330    
331    # Set the default value for pcre32
332    if test "x$enable_pcre32" = "xunset"
333    then
334      enable_pcre32=no
335    fi
336    
337  # Make sure enable_pcre8 or enable_pcre16 was set  # Make sure enable_pcre8 or enable_pcre16 was set
338  if test "x$enable_pcre8$enable_pcre16" = "xnono"  if test "x$enable_pcre8$enable_pcre16$enable_pcre32" = "xnonono"
339  then  then
340    AC_MSG_ERROR([Either 8 or 16 bit (or both) pcre library must be enabled])    AC_MSG_ERROR([At least one of 8, 16 or 32 bit pcre library must be enabled])
341  fi  fi
342    
343  # Make sure that if enable_unicode_properties was set, that UTF support is enabled.  # Make sure that if enable_unicode_properties was set, that UTF support is enabled.
# Line 309  if test "x$enable_unicode_properties" = Line 345  if test "x$enable_unicode_properties" =
345  then  then
346    if test "x$enable_utf" = "xno"    if test "x$enable_utf" = "xno"
347    then    then
348      AC_MSG_ERROR([support for Unicode properties requires UTF-8/16 support])      AC_MSG_ERROR([support for Unicode properties requires UTF-8/16/32 support])
349    fi    fi
350    enable_utf=yes    enable_utf=yes
351  fi  fi
# Line 335  then Line 371  then
371    fi    fi
372  fi  fi
373    
374  # Convert the newline identifier into the appropriate integer value. The first  # Convert the newline identifier into the appropriate integer value. The first
375  # three are ASCII values 0x0a, 0x0d, and 0x0d0a, but if EBCDIC is enabled, they  # three are ASCII values 0x0a, 0x0d, and 0x0d0a, but if EBCDIC is enabled, they
376  # are changed below.  # are changed below.
377    
# Line 353  esac Line 389  esac
389  # --enable-ebcdic-nl25 implies --enable-ebcdic  # --enable-ebcdic-nl25 implies --enable-ebcdic
390  if test "x$enable_ebcdic_nl25" = "xyes"; then  if test "x$enable_ebcdic_nl25" = "xyes"; then
391    enable_ebcdic=yes    enable_ebcdic=yes
392  fi  fi
393    
394  # 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,
395  # and the newline value is adjusted appropriately (CR is still 13, but LF is  # and the newline value is adjusted appropriately (CR is still 13, but LF is
# Line 365  if test "x$enable_ebcdic" = "xyes"; then Line 401  if test "x$enable_ebcdic" = "xyes"; then
401    enable_rebuild_chartables=yes    enable_rebuild_chartables=yes
402    
403    if test "x$enable_utf" = "xyes"; then    if test "x$enable_utf" = "xyes"; then
404      AC_MSG_ERROR([support for EBCDIC and UTF-8/16 cannot be enabled at the same time])      AC_MSG_ERROR([support for EBCDIC and UTF-8/16/32 cannot be enabled at the same time])
405    fi    fi
406    
407    if test "x$enable_ebcdic_nl25" = "xno"; then    if test "x$enable_ebcdic_nl25" = "xno"; then
408      case "$ac_pcre_newline_value" in      case "$ac_pcre_newline_value" in
409        10)   ac_pcre_newline_value=21 ;;        10)   ac_pcre_newline_value=21 ;;
410        3338) ac_pcre_newline_value=3349 ;;        3338) ac_pcre_newline_value=3349 ;;
411      esac      esac
412    else    else
413      case "$ac_pcre_newline_value" in      case "$ac_pcre_newline_value" in
414        10)   ac_pcre_newline_value=37 ;;        10)   ac_pcre_newline_value=37 ;;
415        3338) ac_pcre_newline_value=3365 ;;        3338) ac_pcre_newline_value=3365 ;;
416      esac      esac
417    fi    fi
418  fi  fi
419    
420  # Check argument to --with-link-size  # Check argument to --with-link-size
# Line 394  AH_TOP([ Line 430  AH_TOP([
430  can cope with, allowing it to run on SunOS4 and other "close to standard"  can cope with, allowing it to run on SunOS4 and other "close to standard"
431  systems.  systems.
432    
433  In environments that support the facilities, config.h.in is converted by  In environments that support the GNU autotools, config.h.in is converted into
434  "configure", or config-cmake.h.in is converted by CMake, into config.h. If you  config.h by the "configure" script. In environments that use CMake,
435  are going to build PCRE "by hand" without using "configure" or CMake, you  config-cmake.in is converted into config.h. If you are going to build PCRE "by
436  should copy the distributed config.h.generic to config.h, and then edit the  hand" without using "configure" or CMake, you should copy the distributed
437  macro definitions to be the way you need them. You must then add  config.h.generic to config.h, and edit the macro definitions to be the way you
438  -DHAVE_CONFIG_H to all of your compile commands, so that config.h is included  need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
439  at the start of every source.  so that config.h is included at the start of every source.
440    
441  Alternatively, you can avoid editing by using -D on the compiler command line  Alternatively, you can avoid editing by using -D on the compiler command line
442  to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.  to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
443    but if you do, default values will be taken from config.h for non-boolean
444  PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if  macros that are not defined on the command line.
445  HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set  
446  them both to 0; an emulation function will be used. */])  Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE8 should either be defined
447    (conventionally to 1) for TRUE, and not defined at all for FALSE. All such
448    macros are listed as a commented #undef in config.h.generic. Macros such as
449    MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
450    surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
451    
452    PCRE uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
453    HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
454    sure both macros are undefined; an emulation function will then be used. */])
455    
456  # Checks for header files.  # Checks for header files.
457  AC_HEADER_STDC  AC_HEADER_STDC
# Line 416  AC_CHECK_HEADERS(limits.h sys/types.h sy Line 460  AC_CHECK_HEADERS(limits.h sys/types.h sy
460  # The files below are C++ header files.  # The files below are C++ header files.
461  pcre_have_type_traits="0"  pcre_have_type_traits="0"
462  pcre_have_bits_type_traits="0"  pcre_have_bits_type_traits="0"
463    
464    if test "x$enable_cpp" = "xyes" -a -z "$CXX"; then
465       AC_MSG_ERROR([You need a C++ compiler for C++ support.])
466    fi
467    
468  if test "x$enable_cpp" = "xyes" -a -n "$CXX"  if test "x$enable_cpp" = "xyes" -a -n "$CXX"
469  then  then
470  AC_LANG_PUSH(C++)  AC_LANG_PUSH(C++)
# Line 506  AC_SUBST(pcre_have_bits_type_traits) Line 555  AC_SUBST(pcre_have_bits_type_traits)
555  # Conditional compilation  # Conditional compilation
556  AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes")  AM_CONDITIONAL(WITH_PCRE8, test "x$enable_pcre8" = "xyes")
557  AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes")  AM_CONDITIONAL(WITH_PCRE16, test "x$enable_pcre16" = "xyes")
558    AM_CONDITIONAL(WITH_PCRE32, test "x$enable_pcre32" = "xyes")
559  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")  AM_CONDITIONAL(WITH_PCRE_CPP, test "x$enable_cpp" = "xyes")
560  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, test "x$enable_rebuild_chartables" = "xyes")
561  AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")  AM_CONDITIONAL(WITH_JIT, test "x$enable_jit" = "xyes")
562  AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes")  AM_CONDITIONAL(WITH_UTF, test "x$enable_utf" = "xyes")
563    AM_CONDITIONAL(WITH_VALGRIND, test "x$enable_valgrind" = "xyes")
564    
565  # Checks for typedefs, structures, and compiler characteristics.  # Checks for typedefs, structures, and compiler characteristics.
566    
# Line 624  if test "$enable_pcre16" = "yes"; then Line 675  if test "$enable_pcre16" = "yes"; then
675      Define to any value to enable the 16 bit PCRE library.])      Define to any value to enable the 16 bit PCRE library.])
676  fi  fi
677    
678    if test "$enable_pcre32" = "yes"; then
679      AC_DEFINE([SUPPORT_PCRE32], [], [
680        Define to any value to enable the 32 bit PCRE library.])
681    fi
682    
683  if test "$enable_jit" = "yes"; then  if test "$enable_jit" = "yes"; then
684    AX_PTHREAD([], [AC_MSG_ERROR([JIT support requires pthreads])])    AX_PTHREAD([], [AC_MSG_ERROR([JIT support requires pthreads])])
685    CC="$PTHREAD_CC"    CC="$PTHREAD_CC"
# Line 642  fi Line 698  fi
698    
699  if test "$enable_utf" = "yes"; then  if test "$enable_utf" = "yes"; then
700    AC_DEFINE([SUPPORT_UTF], [], [    AC_DEFINE([SUPPORT_UTF], [], [
701      Define to any value to enable support for the UTF-8/16 Unicode encoding.      Define to any value to enable support for the UTF-8/16/32 Unicode encoding.
702      This will work even in an EBCDIC environment, but it is incompatible      This will work even in an EBCDIC environment, but it is incompatible
703      with the EBCDIC macro. That is, PCRE can support *either* EBCDIC      with the EBCDIC macro. That is, PCRE can support *either* EBCDIC
704      code *or* ASCII/UTF-8/16, but not both at once.])      code *or* ASCII/UTF-8/16/32, but not both at once.])
705  fi  fi
706    
707  if test "$enable_unicode_properties" = "yes"; then  if test "$enable_unicode_properties" = "yes"; then
# Line 657  if test "$enable_stack_for_recursion" = Line 713  if test "$enable_stack_for_recursion" =
713    AC_DEFINE([NO_RECURSE], [], [    AC_DEFINE([NO_RECURSE], [], [
714      PCRE uses recursive function calls to handle backtracking while      PCRE uses recursive function calls to handle backtracking while
715      matching. This can sometimes be a problem on systems that have      matching. This can sometimes be a problem on systems that have
716      stacks of limited size. Define NO_RECURSE to any value to get a      stacks of limited size. Define NO_RECURSE to any value to get a
717      version that doesn't use recursion in the match() function; instead      version that doesn't use recursion in the match() function; instead
718      it creates its own stack by steam using pcre_recurse_malloc() to obtain      it creates its own stack by steam using pcre_recurse_malloc() to obtain
719      memory from the heap. For more detail, see the comments and other stuff      memory from the heap. For more detail, see the comments and other stuff
720      just above the match() function.])      just above the match() function.])
# Line 708  if test "$enable_bsr_anycrlf" = "yes"; t Line 764  if test "$enable_bsr_anycrlf" = "yes"; t
764    AC_DEFINE([BSR_ANYCRLF], [], [    AC_DEFINE([BSR_ANYCRLF], [], [
765      By default, the \R escape sequence matches any Unicode line ending      By default, the \R escape sequence matches any Unicode line ending
766      character or sequence of characters. If BSR_ANYCRLF is defined (to any      character or sequence of characters. If BSR_ANYCRLF is defined (to any
767      value), this is changed so that backslash-R matches only CR, LF, or CRLF.      value), this is changed so that backslash-R matches only CR, LF, or CRLF.
768      The build-time default can be overridden by the user of PCRE at runtime.])      The build-time default can be overridden by the user of PCRE at runtime.])
769  fi  fi
770    
# Line 763  AH_VERBATIM([PCRE_EXP_DEFN], [ Line 819  AH_VERBATIM([PCRE_EXP_DEFN], [
819     Win32, and it needs some magic to be inserted before the definition     Win32, and it needs some magic to be inserted before the definition
820     of a function that is exported by the library, define this macro to     of a function that is exported by the library, define this macro to
821     contain the relevant magic. If you do not define this macro, a suitable     contain the relevant magic. If you do not define this macro, a suitable
822      __declspec value is used for Windows systems; in other environments      __declspec value is used for Windows systems; in other environments
823     "extern" is used for a C compiler and "extern C" for a C++ compiler.     "extern" is used for a C compiler and "extern C" for a C++ compiler.
824     This macro apears at the start of every exported function that is part     This macro apears at the start of every exported function that is part
825     of the external API. It does not appear on functions that are "external"     of the external API. It does not appear on functions that are "external"
826     in the C sense, but which are internal to the library. */     in the C sense, but which are internal to the library. */
827  #undef PCRE_EXP_DEFN])  #undef PCRE_EXP_DEFN])
828    
# Line 778  if test "$enable_ebcdic" = "yes"; then Line 834  if test "$enable_ebcdic" = "yes"; then
834      On systems that can use "configure" or CMake to set EBCDIC, NEWLINE is      On systems that can use "configure" or CMake to set EBCDIC, NEWLINE is
835      automatically adjusted. When EBCDIC is set, PCRE assumes that all input      automatically adjusted. When EBCDIC is set, PCRE assumes that all input
836      strings are in EBCDIC. If you do not define this macro, PCRE will assume      strings are in EBCDIC. If you do not define this macro, PCRE will assume
837      input strings are ASCII or UTF-8/16 Unicode. It is not possible to build a      input strings are ASCII or UTF-8/16/32 Unicode. It is not possible to build
838      version of PCRE that supports both EBCDIC and UTF-8/16.])      a version of PCRE that supports both EBCDIC and UTF-8/16/32.])
839  fi  fi
840    
841  if test "$enable_ebcdic_nl25" = "yes"; then  if test "$enable_ebcdic_nl25" = "yes"; then
# Line 789  if test "$enable_ebcdic_nl25" = "yes"; t Line 845  if test "$enable_ebcdic_nl25" = "yes"; t
845      that LF does in an ASCII/Unicode environment. The value must also be set in      that LF does in an ASCII/Unicode environment. The value must also be set in
846      the NEWLINE macro below. On systems that can use "configure" or CMake to      the NEWLINE macro below. On systems that can use "configure" or CMake to
847      set EBCDIC_NL25, the adjustment of NEWLINE is automatic.])      set EBCDIC_NL25, the adjustment of NEWLINE is automatic.])
848  fi  fi
849    
850    if test "$enable_valgrind" = "yes"; then
851      AC_DEFINE_UNQUOTED([SUPPORT_VALGRIND], [], [
852         Define to any value for valgrind support to find invalid memory reads.])
853    fi
854    
855  # Platform specific issues  # Platform specific issues
856  NO_UNDEFINED=  NO_UNDEFINED=
# Line 812  EXTRA_LIBPCRE_LDFLAGS="$EXTRA_LIBPCRE_LD Line 873  EXTRA_LIBPCRE_LDFLAGS="$EXTRA_LIBPCRE_LD
873  EXTRA_LIBPCRE16_LDFLAGS="$EXTRA_LIBPCRE16_LDFLAGS \  EXTRA_LIBPCRE16_LDFLAGS="$EXTRA_LIBPCRE16_LDFLAGS \
874                         $NO_UNDEFINED -version-info libpcre16_version"                         $NO_UNDEFINED -version-info libpcre16_version"
875    
876    EXTRA_LIBPCRE32_LDFLAGS="$EXTRA_LIBPCRE32_LDFLAGS \
877                           $NO_UNDEFINED -version-info libpcre32_version"
878    
879  EXTRA_LIBPCREPOSIX_LDFLAGS="$EXTRA_LIBPCREPOSIX_LDFLAGS \  EXTRA_LIBPCREPOSIX_LDFLAGS="$EXTRA_LIBPCREPOSIX_LDFLAGS \
880                              $NO_UNDEFINED -version-info libpcreposix_version"                              $NO_UNDEFINED -version-info libpcreposix_version"
881    
# Line 821  EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRE Line 885  EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRE
885    
886  AC_SUBST(EXTRA_LIBPCRE_LDFLAGS)  AC_SUBST(EXTRA_LIBPCRE_LDFLAGS)
887  AC_SUBST(EXTRA_LIBPCRE16_LDFLAGS)  AC_SUBST(EXTRA_LIBPCRE16_LDFLAGS)
888    AC_SUBST(EXTRA_LIBPCRE32_LDFLAGS)
889  AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS)  AC_SUBST(EXTRA_LIBPCREPOSIX_LDFLAGS)
890  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)
891    
892  # When we run 'make distcheck', use these arguments. Turning off compiler  # When we run 'make distcheck', use these arguments. Turning off compiler
893  # optimization makes it run faster.  # optimization makes it run faster.
894  DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre16 --enable-jit --enable-cpp --enable-unicode-properties"  DISTCHECK_CONFIGURE_FLAGS="CFLAGS='' CXXFLAGS='' --enable-pcre16 --enable-pcre32 --enable-jit --enable-cpp --enable-unicode-properties"
895  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
896    
897  # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is  # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
# Line 892  if test "$enable_pcretest_libreadline" = Line 957  if test "$enable_pcretest_libreadline" =
957    fi    fi
958  fi  fi
959    
960    # Check for valgrind
961    
962    if test "$enable_valgrind" = "yes"; then
963      m4_ifdef([PKG_CHECK_MODULES],
964               [PKG_CHECK_MODULES([VALGRIND],[valgrind])],
965               [AC_MSG_ERROR([pkg-config not supported])])
966    fi
967    
968    # test code coverage reporting
969    if test "$enable_coverage" = "yes"; then
970      if test "x$GCC" != "xyes"; then
971        AC_MSG_ERROR([Code coverage reports can only be generated when using GCC])
972      fi
973    
974      # ccache is incompatible with gcov
975      AC_PATH_PROG([SHTOOL],[shtool],[false])
976      case `$SHTOOL path $CC` in
977        *ccache*) cc_ccache=yes;;
978        *) cc_ccache=no;;
979      esac
980    
981      if test "$cc_ccache" = "yes"; then
982        if test -z "$CCACHE_DISABLE" -o "$CCACHE_DISABLE" != "1"; then
983          AC_MSG_ERROR([must export CCACHE_DISABLE=1 to disable ccache for code coverage])
984        fi
985      fi
986    
987      AC_ARG_VAR([LCOV],[the ltp lcov program])
988      AC_PATH_PROG([LCOV],[lcov],[false])
989      if test "x$LCOV" = "xfalse"; then
990        AC_MSG_ERROR([lcov not found])
991      fi
992    
993      AC_ARG_VAR([GENHTML],[the ltp genhtml program])
994      AC_PATH_PROG([GENHTML],[genhtml],[false])
995      if test "x$GENHTML" = "xfalse"; then
996        AC_MSG_ERROR([genhtml not found])
997      fi
998    
999      AC_DEFINE([SUPPORT_GCOV],[1], [
1000        Define to allow pcretest and pcregrep to be linked with gcov, so that they
1001        are able to generate code coverage reports.])
1002    
1003      # And add flags needed for gcov
1004      GCOV_CFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
1005      GCOV_CXXFLAGS="-O0 -ggdb3 -fprofile-arcs -ftest-coverage"
1006      GCOV_LIBS="-lgcov"
1007      AC_SUBST([GCOV_CFLAGS])
1008      AC_SUBST([GCOV_CXXFLAGS])
1009      AC_SUBST([GCOV_LIBS])
1010    fi # enable_coverage
1011    
1012    AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"])
1013    
1014  # Produce these files, in addition to config.h.  # Produce these files, in addition to config.h.
1015  AC_CONFIG_FILES(  AC_CONFIG_FILES(
1016          Makefile          Makefile
1017          libpcre.pc          libpcre.pc
1018          libpcre16.pc          libpcre16.pc
1019            libpcre32.pc
1020          libpcreposix.pc          libpcreposix.pc
1021          libpcrecpp.pc          libpcrecpp.pc
1022          pcre-config          pcre-config
# Line 922  if test "$enable_ebcdic_nl25" = "yes"; t Line 1042  if test "$enable_ebcdic_nl25" = "yes"; t
1042    ebcdic_nl_code=0x25    ebcdic_nl_code=0x25
1043  elif test "$enable_ebcdic" = "yes"; then  elif test "$enable_ebcdic" = "yes"; then
1044    ebcdic_nl_code=0x15    ebcdic_nl_code=0x15
1045  fi  fi
1046    
1047  cat <<EOF  cat <<EOF
1048    
# Line 935  $PACKAGE-$VERSION configuration summary: Line 1055  $PACKAGE-$VERSION configuration summary:
1055      C++ compiler .................... : ${CXX}      C++ compiler .................... : ${CXX}
1056      Linker .......................... : ${LD}      Linker .......................... : ${LD}
1057      C preprocessor flags ............ : ${CPPFLAGS}      C preprocessor flags ............ : ${CPPFLAGS}
1058      C compiler flags ................ : ${CFLAGS}      C compiler flags ................ : ${CFLAGS} ${VISIBILITY_CFLAGS}
1059      C++ compiler flags .............. : ${CXXFLAGS}      C++ compiler flags .............. : ${CXXFLAGS} ${VISIBILITY_CXXFLAGS}
1060      Linker flags .................... : ${LDFLAGS}      Linker flags .................... : ${LDFLAGS}
1061      Extra libraries ................. : ${LIBS}      Extra libraries ................. : ${LIBS}
1062    
1063      Build 8 bit pcre library ........ : ${enable_pcre8}      Build 8 bit pcre library ........ : ${enable_pcre8}
1064      Build 16 bit pcre library ....... : ${enable_pcre16}      Build 16 bit pcre library ....... : ${enable_pcre16}
1065        Build 32 bit pcre library ....... : ${enable_pcre32}
1066      Build C++ library ............... : ${enable_cpp}      Build C++ library ............... : ${enable_cpp}
1067      Enable JIT compiling support .... : ${enable_jit}      Enable JIT compiling support .... : ${enable_jit}
1068      Enable UTF-8/16 support ......... : ${enable_utf}      Enable UTF-8/16/32 support ...... : ${enable_utf}
1069      Unicode properties .............. : ${enable_unicode_properties}      Unicode properties .............. : ${enable_unicode_properties}
1070      Newline char/sequence ........... : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
1071      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
1072      EBCDIC coding ................... : ${enable_ebcdic}      EBCDIC coding ................... : ${enable_ebcdic}
1073      EBCDIC code for NL .............. : ${ebcdic_nl_code}      EBCDIC code for NL .............. : ${ebcdic_nl_code}
1074      Rebuild char tables ............. : ${enable_rebuild_chartables}      Rebuild char tables ............. : ${enable_rebuild_chartables}
1075      Use stack recursion ............. : ${enable_stack_for_recursion}      Use stack recursion ............. : ${enable_stack_for_recursion}
1076      POSIX mem threshold ............. : ${with_posix_malloc_threshold}      POSIX mem threshold ............. : ${with_posix_malloc_threshold}
# Line 964  $PACKAGE-$VERSION configuration summary: Line 1085  $PACKAGE-$VERSION configuration summary:
1085      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
1086      Link pcretest with libedit ...... : ${enable_pcretest_libedit}      Link pcretest with libedit ...... : ${enable_pcretest_libedit}
1087      Link pcretest with libreadline .. : ${enable_pcretest_libreadline}      Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
1088        Valgrind support ................ : ${enable_valgrind}
1089        Code coverage ................... : ${enable_coverage}
1090    
1091  EOF  EOF
1092    

Legend:
Removed from v.1031  
changed lines
  Added in v.1320

  ViewVC Help
Powered by ViewVC 1.1.5