[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)
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);],
#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.
/* 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