/[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 213 by ph10, Wed Aug 15 11:34:14 2007 UTC revision 300 by ph10, Mon Jan 14 19:43:19 2008 UTC
# Line 7  dnl be defined as -RC2, for example. For Line 7  dnl be defined as -RC2, for example. For
7  dnl empty.  dnl empty.
8    
9  m4_define(pcre_major, [7])  m4_define(pcre_major, [7])
10  m4_define(pcre_minor, [3])  m4_define(pcre_minor, [6])
11  m4_define(pcre_prerelease, [-RC5])  m4_define(pcre_prerelease, [])
12  m4_define(pcre_date, [2007-08-15])  m4_define(pcre_date, [2008-01-14])
13    
14  # Libtool shared library interface versions (current:revision:age)  # Libtool shared library interface versions (current:revision:age)
15  m4_define(libpcre_version, [0:1:0])  m4_define(libpcre_version, [0:1:0])
# Line 136  AC_ARG_ENABLE(newline-is-any, Line 136  AC_ARG_ENABLE(newline-is-any,
136                ac_pcre_newline=any)                ac_pcre_newline=any)
137  enable_newline="$ac_pcre_newline"  enable_newline="$ac_pcre_newline"
138    
139    # Handle --enable-bsr-anycrlf
140    AC_ARG_ENABLE(bsr-anycrlf,
141                  AS_HELP_STRING([--enable-bsr-anycrlf],
142                                 [\R matches only CR, LF, CRLF by default]),
143                  , enable_bsr_anycrlf=no)
144    
145  # Handle --enable-ebcdic  # Handle --enable-ebcdic
146  AC_ARG_ENABLE(ebcdic,  AC_ARG_ENABLE(ebcdic,
147                AS_HELP_STRING([--enable-ebcdic],                AS_HELP_STRING([--enable-ebcdic],
# Line 148  AC_ARG_ENABLE(stack-for-recursion, Line 154  AC_ARG_ENABLE(stack-for-recursion,
154                               [don't use stack recursion when matching]),                               [don't use stack recursion when matching]),
155                , enable_stack_for_recursion=yes)                , enable_stack_for_recursion=yes)
156    
157    # Handle --enable-pcregrep-libz
158    AC_ARG_ENABLE(pcregrep-libz,
159                  AS_HELP_STRING([--enable-pcregrep-libz],
160                                 [link pcregrep with libz to handle .gz files]),
161                  , enable_pcregrep_libz=no)
162    
163    # Handle --enable-pcregrep-libbz2
164    AC_ARG_ENABLE(pcregrep-libbz2,
165                  AS_HELP_STRING([--enable-pcregrep-libbz2],
166                                 [link pcregrep with libbz2 to handle .bz2 files]),
167                  , enable_pcregrep_libbz2=no)
168    
169    # Handle --enable-pcretest-libreadline
170    AC_ARG_ENABLE(pcretest-libreadline,
171                  AS_HELP_STRING([--enable-pcretest-libreadline],
172                                 [link pcretest with libreadline]),
173                  , enable_pcretest_libreadline=no)
174    
175  # Handle --with-posix-malloc-threshold=NBYTES  # Handle --with-posix-malloc-threshold=NBYTES
176  AC_ARG_WITH(posix-malloc-threshold,  AC_ARG_WITH(posix-malloc-threshold,
177              AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES],              AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES],
# Line 231  it to run on SunOS4 and other "close to Line 255  it to run on SunOS4 and other "close to
255    
256  If you are going to build PCRE "by hand" on a system without "configure" you  If you are going to build PCRE "by hand" on a system without "configure" you
257  should copy the distributed config.h.generic to config.h, and then set up the  should copy the distributed config.h.generic to config.h, and then set up the
258  macros the way you need them. Alternatively, you can avoid editing by using -D  macro definitions the way you need them. You must then add -DHAVE_CONFIG_H to
259  on the compiler command line to set the macro values.  all of your compile commands, so that config.h is included at the start of
260    every source.
261    
262    Alternatively, you can avoid editing by using -D on the compiler command line
263    to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H.
264    
265  PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if  PCRE uses memmove() if HAVE_MEMMOVE is set to 1; otherwise it uses bcopy() if
266  HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set  HAVE_BCOPY is set to 1. If your system has neither bcopy() nor memmove(), set
# Line 284  AC_SUBST(pcre_have_ulong_long) Line 312  AC_SUBST(pcre_have_ulong_long)
312    
313  # Checks for library functions.  # Checks for library functions.
314    
315  AC_CHECK_FUNCS(bcopy memmove strerror strtoq strtoll)  AC_CHECK_FUNCS(bcopy memmove strerror strtoq strtoll _strtoi64)
316    
317    # Check for the availability of libz (aka zlib)
318    
319    AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])
320    AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])
321    
322    # Check for the availability of libbz2
323    
324    AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])
325    AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])
326    
327    # Check for the availabiity of libreadline
328    
329    AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])
330    AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])
331    AC_CHECK_LIB([readline], [readline], [HAVE_LIB_READLINE=1])
332    
333  # This facilitates -ansi builds under Linux  # This facilitates -ansi builds under Linux
334  dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc])  dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc])
# Line 319  if test "$enable_stack_for_recursion" = Line 363  if test "$enable_stack_for_recursion" =
363      (use --disable-stack-for-recursion).])      (use --disable-stack-for-recursion).])
364  fi  fi
365    
366    if test "$enable_pcregrep_libz" = "yes"; then
367      AC_DEFINE([SUPPORT_LIBZ], [], [
368        Define to allow pcregrep to be linked with libz, so that it is
369        able to handle .gz files.])
370    fi
371    
372    if test "$enable_pcregrep_libbz2" = "yes"; then
373      AC_DEFINE([SUPPORT_LIBBZ2], [], [
374        Define to allow pcregrep to be linked with libbz2, so that it is
375        able to handle .bz2 files.])
376    fi
377    
378    if test "$enable_pcretest_libreadline" = "yes"; then
379      AC_DEFINE([SUPPORT_LIBREADLINE], [], [
380        Define to allow pcretest to be linked with libreadline.])
381    fi
382    
383  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [
384    The value of NEWLINE determines the newline character sequence. On    The value of NEWLINE determines the newline character sequence. On
385    Unix-like systems, "configure" can be used to override the default,    systems that support it, "configure" can be used to override the
386    which is 10. The possible values are 10 (LF), 13 (CR), 3338 (CRLF),    default, which is 10. The possible values are 10 (LF), 13 (CR),
387    -1 (ANY), or -2 (ANYCRLF).])    3338 (CRLF), -1 (ANY), or -2 (ANYCRLF).])
388    
389    if test "$enable_bsr_anycrlf" = "yes"; then
390      AC_DEFINE([BSR_ANYCRLF], [], [
391        By default, the \R escape sequence matches any Unicode line ending
392        character or sequence of characters. If BSR_ANYCRLF is defined, this is
393        changed so that backslash-R matches only CR, LF, or CRLF. The build-
394        time default can be overridden by the user of PCRE at runtime. On
395        systems that support it, "configure" can be used to override the
396        default.])
397    fi
398    
399  AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [  AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [
400    The value of LINK_SIZE determines the number of bytes used to store    The value of LINK_SIZE determines the number of bytes used to store
# Line 424  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS) Line 495  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)
495  DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties"  DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties"
496  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
497    
498    # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
499    # specified, the relevant library is available. If so, add it to LIBS.
500    
501    if test "$enable_pcregrep_libz" = "yes"; then
502      if test "$HAVE_ZLIB_H" != "1"; then
503        echo "** Cannot --enable-pcregrep-libz because zlib.h was not found"
504        exit 1
505      fi
506      if test "$HAVE_LIBZ" != "1"; then
507        echo "** Cannot --enable-pcregrep-libz because libz was not found"
508        exit 1
509      fi
510      if test "$LIBS" = ""; then LIBS=-lz; else LIBS="$LIBS -lz"; fi
511    fi
512    
513    if test "$enable_pcregrep_libbz2" = "yes"; then
514      if test "$HAVE_BZLIB_H" != "1"; then
515        echo "** Cannot --enable-pcregrep-libbz2 because bzlib.h was not found"
516        exit 1
517      fi
518      if test "$HAVE_LIBBZ2" != "1"; then
519        echo "** Cannot --enable-pcregrep-libbz2 because libbz2 was not found"
520        exit 1
521      fi
522      if test "$LIBS" = ""; then LIBS=-lbz2; else LIBS="$LIBS -lbz2"; fi
523    fi
524    
525    # Similarly for --enable-pcretest-readline
526    
527    if test "$enable_pcretest_libreadline" = "yes"; then
528      if test "$HAVE_READLINE_H" != "1"; then
529        echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found."
530        exit 1
531      fi
532      if test "$HAVE_HISTORY_H" != "1"; then
533        echo "** Cannot --enable-pcretest-readline because readline/history.h was not found."
534        exit 1
535      fi
536      if test "$LIBS" = ""; then LIBS=-lreadline; else LIBS="$LIBS -lreadline"; fi
537    fi
538    
539  # Produce these files, in addition to config.h.  # Produce these files, in addition to config.h.
540  AC_CONFIG_FILES(  AC_CONFIG_FILES(
541          Makefile          Makefile
# Line 446  AC_OUTPUT Line 558  AC_OUTPUT
558    
559  # Print out a nice little message after configure is run displaying your  # Print out a nice little message after configure is run displaying your
560  # chosen options.  # chosen options.
561  #  
562  cat <<EOF  cat <<EOF
563    
564  $PACKAGE-$VERSION configuration summary:  $PACKAGE-$VERSION configuration summary:
565    
566      Install prefix ......... : ${prefix}      Install prefix .................. : ${prefix}
567      C preprocessor ......... : ${CPP}      C preprocessor .................. : ${CPP}
568      C compiler ............. : ${CC}      C compiler ...................... : ${CC}
569      C++ preprocessor ....... : ${CXXCPP}      C++ preprocessor ................ : ${CXXCPP}
570      C++ compiler ........... : ${CXX}      C++ compiler .................... : ${CXX}
571      Linker ................. : ${LD}      Linker .......................... : ${LD}
572      C preprocessor flags ... : ${CPPFLAGS}      C preprocessor flags ............ : ${CPPFLAGS}
573      C compiler flags ....... : ${CFLAGS}      C compiler flags ................ : ${CFLAGS}
574      C++ compiler flags ..... : ${CXXFLAGS}      C++ compiler flags .............. : ${CXXFLAGS}
575      Linker flags ........... : ${LDFLAGS}      Linker flags .................... : ${LDFLAGS}
576      Extra libraries ........ : ${LIBS}      Extra libraries ................. : ${LIBS}
577    
578      Build C++ library ...... : ${enable_cpp}      Build C++ library ............... : ${enable_cpp}
579      Enable UTF-8 support ... : ${enable_utf8}      Enable UTF-8 support ............ : ${enable_utf8}
580      Unicode properties ..... : ${enable_unicode_properties}      Unicode properties .............. : ${enable_unicode_properties}
581      Newline char/sequence .. : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
582      EBCDIC coding .......... : ${enable_ebcdic}      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
583      Rebuild char tables .... : ${enable_rebuild_chartables}      EBCDIC coding ................... : ${enable_ebcdic}
584      Use stack recursion .... : ${enable_stack_for_recursion}      Rebuild char tables ............. : ${enable_rebuild_chartables}
585      POSIX mem threshold .... : ${with_posix_malloc_threshold}      Use stack recursion ............. : ${enable_stack_for_recursion}
586      Internal link size ..... : ${with_link_size}      POSIX mem threshold ............. : ${with_posix_malloc_threshold}
587      Match limit ............ : ${with_match_limit}      Internal link size .............. : ${with_link_size}
588      Match limit recursion .. : ${with_match_limit_recursion}      Match limit ..................... : ${with_match_limit}
589      Build shared libs ...... : ${enable_shared}      Match limit recursion ........... : ${with_match_limit_recursion}
590      Build static libs ...... : ${enable_static}      Build shared libs ............... : ${enable_shared}
591        Build static libs ............... : ${enable_static}
592        Link pcregrep with libz ......... : ${enable_pcregrep_libz}
593        Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
594        Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
595    
596  EOF  EOF
597    

Legend:
Removed from v.213  
changed lines
  Added in v.300

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12