postgres.git / summary / log / commit / refs
commit 7791e8c0010aa5f9cc028ec876e24b047637c494
Author: Bruce Momjian <bruce@momjian.us>
Date: Thu Nov 04 21:46:40 1999 +0000
First released in: 7.0
Improve getopt and readline support, from Peter Eisentraut.
src/configure.in | 10 ++++++++--
src/include/config.h.in | 6 +++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/configure.in b/src/configure.in
index 404c9c3f075..8826a8ec2f5 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 <math.h>],
[int dummy=finite(1.0);],
diff --git a/src/include/config.h.in b/src/include/config.h.in
index 698526e7da2..ef25d6ddcb3 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
[parent: 1696dd11214d]