/[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 244 by ph10, Fri Sep 14 09:14:24 2007 UTC revision 321 by ph10, Wed Mar 5 17:10:45 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, [4])  m4_define(pcre_minor, [7])
11  m4_define(pcre_prerelease, [-RC2])  m4_define(pcre_prerelease, [-RC1])
12  m4_define(pcre_date, [2007-09-10])  m4_define(pcre_date, [2008-03-05])
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 154  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 283  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES, Line 301  AM_CONDITIONAL(WITH_REBUILD_CHARTABLES,
301  AC_C_CONST  AC_C_CONST
302  AC_TYPE_SIZE_T  AC_TYPE_SIZE_T
303    
304  AC_CHECK_TYPES([long long],  pcre_have_strotolonglong=0
305                 [pcre_have_long_long="1"],  AC_CHECK_FUNCS(strtoq strtoll _strtoi64, [pcre_have_strotolonglong="1"; break])
306                 [pcre_have_long_long="0"])  # If we can't convert a string to a long long, pretend we don't even
307  AC_CHECK_TYPES([unsigned long long],  # have a long long.
308                 [pcre_have_ulong_long="1"],  if test $pcre_have_strotolonglong = "0"; then
309                 [pcre_have_ulong_long="0"])     pcre_have_long_long="0"
310       pcre_have_ulong_long="0"
311    else
312      AC_CHECK_TYPES([long long],
313                     [pcre_have_long_long="1"],
314                     [pcre_have_long_long="0"])
315      AC_CHECK_TYPES([unsigned long long],
316                     [pcre_have_ulong_long="1"],
317                     [pcre_have_ulong_long="0"])
318    fi
319  AC_SUBST(pcre_have_long_long)  AC_SUBST(pcre_have_long_long)
320  AC_SUBST(pcre_have_ulong_long)  AC_SUBST(pcre_have_ulong_long)
321    
322  # Checks for library functions.  # Checks for library functions.
323    
324  AC_CHECK_FUNCS(bcopy memmove strerror strtoq strtoll)  AC_CHECK_FUNCS(bcopy memmove strerror)
325    
326    # Check for the availability of libz (aka zlib)
327    
328    AC_CHECK_HEADERS([zlib.h], [HAVE_ZLIB_H=1])
329    AC_CHECK_LIB([z], [gzopen], [HAVE_LIBZ=1])
330    
331    # Check for the availability of libbz2
332    
333    AC_CHECK_HEADERS([bzlib.h], [HAVE_BZLIB_H=1])
334    AC_CHECK_LIB([bz2], [BZ2_bzopen], [HAVE_LIBBZ2=1])
335    
336    # Check for the availabiity of libreadline
337    
338    AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])
339    AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])
340    AC_CHECK_LIB([readline], [readline], [HAVE_LIB_READLINE=1])
341    
342  # This facilitates -ansi builds under Linux  # This facilitates -ansi builds under Linux
343  dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc])  dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc])
# Line 329  if test "$enable_stack_for_recursion" = Line 372  if test "$enable_stack_for_recursion" =
372      (use --disable-stack-for-recursion).])      (use --disable-stack-for-recursion).])
373  fi  fi
374    
375    if test "$enable_pcregrep_libz" = "yes"; then
376      AC_DEFINE([SUPPORT_LIBZ], [], [
377        Define to allow pcregrep to be linked with libz, so that it is
378        able to handle .gz files.])
379    fi
380    
381    if test "$enable_pcregrep_libbz2" = "yes"; then
382      AC_DEFINE([SUPPORT_LIBBZ2], [], [
383        Define to allow pcregrep to be linked with libbz2, so that it is
384        able to handle .bz2 files.])
385    fi
386    
387    if test "$enable_pcretest_libreadline" = "yes"; then
388      AC_DEFINE([SUPPORT_LIBREADLINE], [], [
389        Define to allow pcretest to be linked with libreadline.])
390    fi
391    
392  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [  AC_DEFINE_UNQUOTED([NEWLINE], [$ac_pcre_newline_value], [
393    The value of NEWLINE determines the newline character sequence. On    The value of NEWLINE determines the newline character sequence. On
394    systems that support it, "configure" can be used to override the    systems that support it, "configure" can be used to override the
# Line 444  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS) Line 504  AC_SUBST(EXTRA_LIBPCRECPP_LDFLAGS)
504  DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties"  DISTCHECK_CONFIGURE_FLAGS="--enable-cpp --enable-unicode-properties"
505  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)  AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)
506    
507    # Check that, if --enable-pcregrep-libz or --enable-pcregrep-libbz2 is
508    # specified, the relevant library is available. If so, add it to LIBS.
509    
510    if test "$enable_pcregrep_libz" = "yes"; then
511      if test "$HAVE_ZLIB_H" != "1"; then
512        echo "** Cannot --enable-pcregrep-libz because zlib.h was not found"
513        exit 1
514      fi
515      if test "$HAVE_LIBZ" != "1"; then
516        echo "** Cannot --enable-pcregrep-libz because libz was not found"
517        exit 1
518      fi
519      if test "$LIBS" = ""; then LIBS=-lz; else LIBS="$LIBS -lz"; fi
520    fi
521    
522    if test "$enable_pcregrep_libbz2" = "yes"; then
523      if test "$HAVE_BZLIB_H" != "1"; then
524        echo "** Cannot --enable-pcregrep-libbz2 because bzlib.h was not found"
525        exit 1
526      fi
527      if test "$HAVE_LIBBZ2" != "1"; then
528        echo "** Cannot --enable-pcregrep-libbz2 because libbz2 was not found"
529        exit 1
530      fi
531      if test "$LIBS" = ""; then LIBS=-lbz2; else LIBS="$LIBS -lbz2"; fi
532    fi
533    
534    # Similarly for --enable-pcretest-readline
535    
536    if test "$enable_pcretest_libreadline" = "yes"; then
537      if test "$HAVE_READLINE_H" != "1"; then
538        echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found."
539        exit 1
540      fi
541      if test "$HAVE_HISTORY_H" != "1"; then
542        echo "** Cannot --enable-pcretest-readline because readline/history.h was not found."
543        exit 1
544      fi
545      if test "$LIBS" = ""; then LIBS=-lreadline; else LIBS="$LIBS -lreadline"; fi
546    fi
547    
548  # Produce these files, in addition to config.h.  # Produce these files, in addition to config.h.
549  AC_CONFIG_FILES(  AC_CONFIG_FILES(
550          Makefile          Makefile
# Line 466  AC_OUTPUT Line 567  AC_OUTPUT
567    
568  # Print out a nice little message after configure is run displaying your  # Print out a nice little message after configure is run displaying your
569  # chosen options.  # chosen options.
570  #  
571  cat <<EOF  cat <<EOF
572    
573  $PACKAGE-$VERSION configuration summary:  $PACKAGE-$VERSION configuration summary:
574    
575      Install prefix ........... : ${prefix}      Install prefix .................. : ${prefix}
576      C preprocessor ........... : ${CPP}      C preprocessor .................. : ${CPP}
577      C compiler ............... : ${CC}      C compiler ...................... : ${CC}
578      C++ preprocessor ......... : ${CXXCPP}      C++ preprocessor ................ : ${CXXCPP}
579      C++ compiler ............. : ${CXX}      C++ compiler .................... : ${CXX}
580      Linker ................... : ${LD}      Linker .......................... : ${LD}
581      C preprocessor flags ..... : ${CPPFLAGS}      C preprocessor flags ............ : ${CPPFLAGS}
582      C compiler flags ......... : ${CFLAGS}      C compiler flags ................ : ${CFLAGS}
583      C++ compiler flags ....... : ${CXXFLAGS}      C++ compiler flags .............. : ${CXXFLAGS}
584      Linker flags ............. : ${LDFLAGS}      Linker flags .................... : ${LDFLAGS}
585      Extra libraries .......... : ${LIBS}      Extra libraries ................. : ${LIBS}
586    
587      Build C++ library ........ : ${enable_cpp}      Build C++ library ............... : ${enable_cpp}
588      Enable UTF-8 support ..... : ${enable_utf8}      Enable UTF-8 support ............ : ${enable_utf8}
589      Unicode properties ....... : ${enable_unicode_properties}      Unicode properties .............. : ${enable_unicode_properties}
590      Newline char/sequence .... : ${enable_newline}      Newline char/sequence ........... : ${enable_newline}
591      \R matches only ANYCRLF .. : ${enable_bsr_anycrlf}      \R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
592      EBCDIC coding ............ : ${enable_ebcdic}      EBCDIC coding ................... : ${enable_ebcdic}
593      Rebuild char tables ...... : ${enable_rebuild_chartables}      Rebuild char tables ............. : ${enable_rebuild_chartables}
594      Use stack recursion ...... : ${enable_stack_for_recursion}      Use stack recursion ............. : ${enable_stack_for_recursion}
595      POSIX mem threshold ...... : ${with_posix_malloc_threshold}      POSIX mem threshold ............. : ${with_posix_malloc_threshold}
596      Internal link size ....... : ${with_link_size}      Internal link size .............. : ${with_link_size}
597      Match limit .............. : ${with_match_limit}      Match limit ..................... : ${with_match_limit}
598      Match limit recursion .... : ${with_match_limit_recursion}      Match limit recursion ........... : ${with_match_limit_recursion}
599      Build shared libs ........ : ${enable_shared}      Build shared libs ............... : ${enable_shared}
600      Build static libs ........ : ${enable_static}      Build static libs ............... : ${enable_static}
601        Link pcregrep with libz ......... : ${enable_pcregrep_libz}
602        Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
603        Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
604    
605  EOF  EOF
606    

Legend:
Removed from v.244  
changed lines
  Added in v.321

  ViewVC Help
Powered by ViewVC 1.1.5