Improve getopt and readline support, from Peter Eisentraut.

This commit is contained in:
Bruce Momjian 1999-11-04 21:46:40 +00:00
parent 1696dd1121
commit 7791e8c001
2 changed files with 13 additions and 3 deletions

View File

@ -583,9 +583,10 @@ for curses in ncurses curses ; do
[LIBS="-l${curses} $LIBS"; break]) [LIBS="-l${curses} $LIBS"; break])
done done
AC_CHECK_LIB(termcap, main) AC_CHECK_LIB(termcap, main)
AC_CHECK_LIB(history, main)
AC_CHECK_LIB(readline, main) AC_CHECK_LIB(readline, main)
AC_CHECK_LIB(readline, write_history, AC_DEFINE(HAVE_HISTORY)) AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
AC_CHECK_LIB(history, main) )
if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha" if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
then then
AC_CHECK_LIB(bsd, main) AC_CHECK_LIB(bsd, main)
@ -791,6 +792,11 @@ AC_CHECK_FUNC(rint,
AC_DEFINE(HAVE_RINT), AC_DEFINE(HAVE_RINT),
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB)) AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB))
dnl Check for GNU style long options support (getopt_long)
AC_CHECK_FUNCS(getopt_long)
AC_MSG_CHECKING(for finite() macro or function) AC_MSG_CHECKING(for finite() macro or function)
AC_TRY_LINK([#include <math.h>], AC_TRY_LINK([#include <math.h>],
[int dummy=finite(1.0);], [int dummy=finite(1.0);],

View File

@ -285,7 +285,7 @@
#undef HAVE_STRICMP #undef HAVE_STRICMP
/* Set to 1 if you have libreadline and it includes history functions */ /* Set to 1 if you have libreadline and it includes history functions */
#undef HAVE_HISTORY #undef HAVE_HISTORY_IN_READLINE
/* /*
* Block of parameters for the ODBC code. * Block of parameters for the ODBC code.
@ -431,6 +431,10 @@ extern void srandom(unsigned int seed);
/* Set to 1 if you have libhistory.a */ /* Set to 1 if you have libhistory.a */
#undef HAVE_LIBHISTORY #undef HAVE_LIBHISTORY
/* Set to 1 if you have getopt_long() (GNU long options) */
#undef HAVE_GETOPT_LONG
/* /*
* On architectures for which we have not implemented spinlocks (or * On architectures for which we have not implemented spinlocks (or
* cannot do so), we use System V semaphores. We also use them for * cannot do so), we use System V semaphores. We also use them for