configure.in patch for readline and curses. - Mailing list pgsql-patches
From | Jason Schroeder |
---|---|
Subject | configure.in patch for readline and curses. |
Date | |
Msg-id | 15E6537E180CC545848148F30F6688D80DB3E9@navajo.astanetworks.com Whole thread Raw |
Responses |
Re: configure.in patch for readline and curses.
Re: configure.in patch for readline and curses. |
List | pgsql-patches |
hi, The following configure.in patch changes the following: 1) It adds --without-readline to control whether the readling package is used Obviously, this could be extended to the general --with[out]-readline[=DIR] pattern, but this is as far as I got. 2) It permits the termcap library to be used IFF ncurses and curses are not available. (Some indenting has not be performed to save maintainer stress.) The following patch is against cvs tag: REL7_1_BETA3. *** orig/configure.in 2001/01/10 09:05:42 --- new/configure.in 2001/01/26 22:28:26 *************** *** 354,359 **** --- 354,365 ---- done IFS=$ac_save_IFS + # + # Readline + # + AC_MSG_CHECKING([whether to build with readline]) + PGAC_ARG_BOOL(with, readline, yes, [ --without-readline do not use readline]) + AC_MSG_RESULT([$with_readline]) # # Tcl/Tk *************** *** 654,664 **** ## AC_CHECK_LIB(sfio, main) ! AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main)]) ! AC_CHECK_LIB(termcap, main) ! AC_SEARCH_LIBS(readline, [readline edit], [AC_DEFINE(HAVE_LIBREADLINE)]) ! AC_SEARCH_LIBS(using_history, history, [AC_DEFINE(HAVE_HISTORY_FUNCTIONS)]) if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha" then AC_CHECK_LIB(bsd, main) --- 660,672 ---- ## AC_CHECK_LIB(sfio, main) ! AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main, [], [AC_CHECK_LIB(termcap, main)])]) + if test "$with_readline" = yes; then + AC_SEARCH_LIBS(readline, [readline edit], [AC_DEFINE(HAVE_LIBREADLINE)]) + AC_SEARCH_LIBS(using_history, history, [AC_DEFINE(HAVE_HISTORY_FUNCTIONS)]) + fi + if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha" then AC_CHECK_LIB(bsd, main) *************** *** 724,731 **** PGAC_HEADER_STRING ! AC_CHECK_HEADERS([readline/readline.h readline.h], [break]) ! AC_CHECK_HEADERS([readline/history.h history.h], [break]) if test "$with_krb4" = yes ; then AC_CHECK_HEADER(krb.h, [], [AC_MSG_ERROR([header file <krb.h> is required for Kerberos 4])]) --- 732,741 ---- PGAC_HEADER_STRING ! if test "$with_readline" = yes; then ! AC_CHECK_HEADERS([readline/readline.h readline.h], [break]) ! AC_CHECK_HEADERS([readline/history.h history.h], [break]) ! fi if test "$with_krb4" = yes ; then AC_CHECK_HEADER(krb.h, [], [AC_MSG_ERROR([header file <krb.h> is required for Kerberos 4])]) *************** *** 878,883 **** --- 888,894 ---- AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)) + if test "$with_readline" = yes; then # Readline versions < 2.1 don't have rl_completion_append_character AC_MSG_CHECKING([for rl_completion_append_character]) AC_TRY_LINK([#include <stdio.h> *************** *** 891,902 **** [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER)], [AC_MSG_RESULT(no)]) ! # Check whether readline's filename_completion_function is declared. # Some prehistoric versions of readline, in particular those shipped # with earlier Cygwins don't have this declared, although it's in the # library. AC_MSG_CHECKING([whether filename_completion_function is declared]) if test "$ac_cv_header_readline_h" = yes; then _readline_header='readline.h' --- 902,914 ---- [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER)], [AC_MSG_RESULT(no)]) ! fi # Check whether readline's filename_completion_function is declared. # Some prehistoric versions of readline, in particular those shipped # with earlier Cygwins don't have this declared, although it's in the # library. + if test "$with_readline" = yes; then AC_MSG_CHECKING([whether filename_completion_function is declared]) if test "$ac_cv_header_readline_h" = yes; then _readline_header='readline.h' *************** *** 909,915 **** [AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) ! dnl Cannot use AC_CHECK_FUNC because finite may be a macro --- 921,927 ---- [AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) ! fi dnl Cannot use AC_CHECK_FUNC because finite may be a macr jason
pgsql-patches by date: