/[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 912 by ph10, Sun Feb 12 16:53:39 2012 UTC revision 981 by ph10, Mon Jun 18 18:22:51 2012 UTC
# Line 10  dnl be defined as -RC2, for example. For Line 10  dnl be defined as -RC2, for example. For
10    
11  m4_define(pcre_major, [8])  m4_define(pcre_major, [8])
12  m4_define(pcre_minor, [31])  m4_define(pcre_minor, [31])
13  m4_define(pcre_prerelease, [-RC1])  m4_define(pcre_prerelease, [-RC2])
14  m4_define(pcre_date, [2012-02-012])  m4_define(pcre_date, [2012-06-18])
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.
# Line 233  AC_ARG_WITH(pcregrep-bufsize, Line 233  AC_ARG_WITH(pcregrep-bufsize,
233                               [pcregrep buffer size (default=20480)]),                               [pcregrep buffer size (default=20480)]),
234                , with_pcregrep_bufsize=20480)                , with_pcregrep_bufsize=20480)
235    
236    # Handle --enable-pcretest-libedit
237    AC_ARG_ENABLE(pcretest-libedit,
238                  AS_HELP_STRING([--enable-pcretest-libedit],
239                                 [link pcretest with libedit]),
240                  , enable_pcretest_libedit=no)
241    
242  # Handle --enable-pcretest-libreadline  # Handle --enable-pcretest-libreadline
243  AC_ARG_ENABLE(pcretest-libreadline,  AC_ARG_ENABLE(pcretest-libreadline,
244                AS_HELP_STRING([--enable-pcretest-libreadline],                AS_HELP_STRING([--enable-pcretest-libreadline],
# Line 534  LIBS="$OLD_LIBS" Line 540  LIBS="$OLD_LIBS"
540    
541  # Check for the availabiity of libreadline  # Check for the availabiity of libreadline
542    
543  AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])  if test "$enable_pcretest_libreadline" = "yes"; then
544  AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])   AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_H=1])
545  AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lreadline"],   AC_CHECK_HEADERS([readline/history.h], [HAVE_HISTORY_H=1])
546    [unset ac_cv_lib_readline_readline;   AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lreadline"],
547     AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltinfo"],     [unset ac_cv_lib_readline_readline;
548      [unset ac_cv_lib_readline_readline;      AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltinfo"],
549       AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lcurses"],       [unset ac_cv_lib_readline_readline;
550        [unset ac_cv_lib_readline_readline;        AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lcurses"],
551         AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncurses"],         [unset ac_cv_lib_readline_readline;
552          [unset ac_cv_lib_readline_readline;          AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncurses"],
553           AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"],           [unset ac_cv_lib_readline_readline;
554            [unset ac_cv_lib_readline_readline;            AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-lncursesw"],
555             AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"],             [unset ac_cv_lib_readline_readline;
556              [LIBREADLINE=""],              AC_CHECK_LIB([readline], [readline], [LIBREADLINE="-ltermcap"],
557              [-ltermcap])],               [LIBREADLINE=""],
558            [-lncursesw])],               [-ltermcap])],
559          [-lncurses])],             [-lncursesw])],
560        [-lcurses])],           [-lncurses])],
561      [-ltinfo])])         [-lcurses])],
562  AC_SUBST(LIBREADLINE)       [-ltinfo])])
563  if test -n "$LIBREADLINE"; then   AC_SUBST(LIBREADLINE)
564    if test "$LIBREADLINE" != "-lreadline"; then   if test -n "$LIBREADLINE"; then
565      echo "-lreadline needs $LIBREADLINE"     if test "$LIBREADLINE" != "-lreadline"; then
566      LIBREADLINE="-lreadline $LIBREADLINE"       echo "-lreadline needs $LIBREADLINE"
567    fi       LIBREADLINE="-lreadline $LIBREADLINE"
568       fi
569     fi
570    fi
571    
572    
573    # Check for the availability of libedit. Different distributions put its
574    # headers in different places. Try to cover the most common ones.
575    
576    if test "$enable_pcretest_libedit" = "yes"; then
577      AC_CHECK_HEADERS([editline/readline.h], [HAVE_EDITLINE_READLINE_H=1],
578        [AC_CHECK_HEADERS([edit/readline/readline.h], [HAVE_READLINE_READLINE_H=1],
579          [AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_READLINE_H=1])])])
580      AC_CHECK_LIB([edit], [readline], [LIBEDIT="-ledit"])
581  fi  fi
582    
583  # This facilitates -ansi builds under Linux  # This facilitates -ansi builds under Linux
# Line 646  AC_DEFINE_UNQUOTED([PCREGREP_BUFSIZE], [ Line 665  AC_DEFINE_UNQUOTED([PCREGREP_BUFSIZE], [
665    pcregrep is three times this number, because it allows for the buffering of    pcregrep is three times this number, because it allows for the buffering of
666    "before" and "after" lines.])    "before" and "after" lines.])
667    
668  if test "$enable_pcretest_libreadline" = "yes"; then  if test "$enable_pcretest_libedit" = "yes"; then
669      AC_DEFINE([SUPPORT_LIBEDIT], [], [
670        Define to allow pcretest to be linked with libedit.])
671      LIBREADLINE="$LIBEDIT"
672    elif test "$enable_pcretest_libreadline" = "yes"; then
673    AC_DEFINE([SUPPORT_LIBREADLINE], [], [    AC_DEFINE([SUPPORT_LIBREADLINE], [], [
674      Define to allow pcretest to be linked with libreadline.])      Define to allow pcretest to be linked with libreadline.])
675  fi  fi
# Line 810  AC_SUBST(LIBBZ2) Line 833  AC_SUBST(LIBBZ2)
833    
834  # Similarly for --enable-pcretest-readline  # Similarly for --enable-pcretest-readline
835    
836    if test "$enable_pcretest_libedit" = "yes"; then
837      if test "$enable_pcretest_libreadline" = "yes"; then
838        echo "** Cannot use both --enable-pcretest-libedit and --enable-pcretest-readline"
839        exit 1
840      fi
841      if test "$HAVE_EDITLINE_READLINE_H" != "1" -a \
842              "$HAVE_READLINE_READLINE_H" != "1"; then
843        echo "** Cannot --enable-pcretest-libedit because neither editline/readline.h"
844        echo "** nor readline/readline.h was found."
845        exit 1
846      fi
847      if test -z "$LIBEDIT"; then
848        echo "** Cannot --enable-pcretest-libedit because libedit library was not found."
849        exit 1
850      fi
851    fi
852    
853  if test "$enable_pcretest_libreadline" = "yes"; then  if test "$enable_pcretest_libreadline" = "yes"; then
854    if test "$HAVE_READLINE_H" != "1"; then    if test "$HAVE_READLINE_H" != "1"; then
855      echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found."      echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found."
# Line 887  $PACKAGE-$VERSION configuration summary: Line 927  $PACKAGE-$VERSION configuration summary:
927      Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}      Buffer size for pcregrep ........ : ${with_pcregrep_bufsize}
928      Link pcregrep with libz ......... : ${enable_pcregrep_libz}      Link pcregrep with libz ......... : ${enable_pcregrep_libz}
929      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}      Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2}
930        Link pcretest with libedit ...... : ${enable_pcretest_libedit}
931      Link pcretest with libreadline .. : ${enable_pcretest_libreadline}      Link pcretest with libreadline .. : ${enable_pcretest_libreadline}
932    
933  EOF  EOF

Legend:
Removed from v.912  
changed lines
  Added in v.981

  ViewVC Help
Powered by ViewVC 1.1.5