diff --git a/src/configure.in b/src/configure.in index 404c9c3f075d89d396d8abaf3c65167cc52601c1..8826a8ec2f5bca4c1af3bd353d5abaccfd732354 100644 --- a/src/configure.in +++ b/src/configure.in @@ -583,9 +583,10 @@ for curses in ncurses curses ; do [LIBS="-l${curses} $LIBS"; break]) done AC_CHECK_LIB(termcap, main) -AC_CHECK_LIB(history, 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" then AC_CHECK_LIB(bsd, main) @@ -791,6 +792,11 @@ AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT), 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_TRY_LINK([#include ], [int dummy=finite(1.0);], diff --git a/src/include/config.h.in b/src/include/config.h.in index 698526e7da2bfd3f55fc16bab0f16239cf8ca255..ef25d6ddcb3a1b6b662ec327d3a9621d519cd5c8 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -285,7 +285,7 @@ #undef HAVE_STRICMP /* 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. @@ -431,6 +431,10 @@ extern void srandom(unsigned int seed); /* Set to 1 if you have libhistory.a */ #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 * cannot do so), we use System V semaphores. We also use them for