| 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], |
| 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 |
fi |
| 569 |
|
fi |
| 570 |
|
fi |
| 571 |
|
|
| 572 |
|
|
| 573 |
|
# Check for the availability of libedit |
| 574 |
|
|
| 575 |
|
if test "$enable_pcretest_libedit" = "yes"; then |
| 576 |
|
AC_CHECK_HEADERS([editline/readline.h], [HAVE_EDITLINE_READLINE_H=1], |
| 577 |
|
[AC_CHECK_HEADERS([readline/readline.h], [HAVE_READLINE_READLINE_H=1])]) |
| 578 |
|
AC_CHECK_LIB([edit], [readline], [LIBEDIT="-ledit"]) |
| 579 |
|
fi |
| 580 |
|
|
| 581 |
# This facilitates -ansi builds under Linux |
# This facilitates -ansi builds under Linux |
| 582 |
dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc]) |
dnl AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions in glibc]) |
| 663 |
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 |
| 664 |
"before" and "after" lines.]) |
"before" and "after" lines.]) |
| 665 |
|
|
| 666 |
if test "$enable_pcretest_libreadline" = "yes"; then |
if test "$enable_pcretest_libedit" = "yes"; then |
| 667 |
|
AC_DEFINE([SUPPORT_LIBEDIT], [], [ |
| 668 |
|
Define to allow pcretest to be linked with libedit.]) |
| 669 |
|
LIBREADLINE="$LIBEDIT" |
| 670 |
|
elif test "$enable_pcretest_libreadline" = "yes"; then |
| 671 |
AC_DEFINE([SUPPORT_LIBREADLINE], [], [ |
AC_DEFINE([SUPPORT_LIBREADLINE], [], [ |
| 672 |
Define to allow pcretest to be linked with libreadline.]) |
Define to allow pcretest to be linked with libreadline.]) |
| 673 |
fi |
fi |
| 831 |
|
|
| 832 |
# Similarly for --enable-pcretest-readline |
# Similarly for --enable-pcretest-readline |
| 833 |
|
|
| 834 |
|
if test "$enable_pcretest_libedit" = "yes"; then |
| 835 |
|
if test "$enable_pcretest_libreadline" = "yes"; then |
| 836 |
|
echo "** Cannot use both --enable-pcretest-libedit and --enable-pcretest-readline" |
| 837 |
|
exit 1 |
| 838 |
|
fi |
| 839 |
|
if test "$HAVE_EDITLINE_READLINE_H" != "1" -a \ |
| 840 |
|
"$HAVE_READLINE_READLINE_H" != "1"; then |
| 841 |
|
echo "** Cannot --enable-pcretest-libedit because neither editline/readline.h" |
| 842 |
|
echo "** nor readline/readline.h was found." |
| 843 |
|
exit 1 |
| 844 |
|
fi |
| 845 |
|
if test -z "$LIBEDIT"; then |
| 846 |
|
echo "** Cannot --enable-pcretest-libedit because libedit library was not found." |
| 847 |
|
exit 1 |
| 848 |
|
fi |
| 849 |
|
fi |
| 850 |
|
|
| 851 |
if test "$enable_pcretest_libreadline" = "yes"; then |
if test "$enable_pcretest_libreadline" = "yes"; then |
| 852 |
if test "$HAVE_READLINE_H" != "1"; then |
if test "$HAVE_READLINE_H" != "1"; then |
| 853 |
echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found." |
echo "** Cannot --enable-pcretest-readline because readline/readline.h was not found." |
| 925 |
Buffer size for pcregrep ........ : ${with_pcregrep_bufsize} |
Buffer size for pcregrep ........ : ${with_pcregrep_bufsize} |
| 926 |
Link pcregrep with libz ......... : ${enable_pcregrep_libz} |
Link pcregrep with libz ......... : ${enable_pcregrep_libz} |
| 927 |
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} |
Link pcregrep with libbz2 ....... : ${enable_pcregrep_libbz2} |
| 928 |
|
Link pcretest with libedit ...... : ${enable_pcretest_libedit} |
| 929 |
Link pcretest with libreadline .. : ${enable_pcretest_libreadline} |
Link pcretest with libreadline .. : ${enable_pcretest_libreadline} |
| 930 |
|
|
| 931 |
EOF |
EOF |