-#line 6895 "configure"
+#line 6822 "configure"
#include "confdefs.h"
#include
struct { char filler; double field; } mystruct;
exit(0);
}
EOF
-if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
pgac_cv_alignof_double=`cat conftestval`
else
echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6
-echo "configure:6945: checking for POSIX signal interface" >&5
+echo "configure:6872: checking for POSIX signal interface" >&5
if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <
-#line 6950 "configure"
+#line 6877 "configure"
#include "confdefs.h"
#include
sigaction(0, &act, &oact);
; return 0; }
EOF
-if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
pgac_cv_func_posix_signals=yes
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6991: checking for $ac_word" >&5
+echo "configure:6918: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
done
echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6
-echo "configure:7027: checking for tclConfig.sh" >&5
+echo "configure:6954: checking for tclConfig.sh" >&5
# Let user override test
if test -z "$TCL_CONFIG_SH"; then
pgac_test_dirs="$with_tclconfig"
# Check for Tk configuration script tkConfig.sh
if test "$with_tk" = yes; then
echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6
-echo "configure:7060: checking for tkConfig.sh" >&5
+echo "configure:6987: checking for tkConfig.sh" >&5
# Let user override test
if test -z "$TK_CONFIG_SH"; then
pgac_test_dirs="$with_tkconfig $with_tclconfig"
s%@STRTOUL@%$STRTOUL%g
s%@STRCASECMP@%$STRCASECMP%g
s%@HPUXMATHLIB@%$HPUXMATHLIB%g
-s%@HAVE_RL_COMPLETION_APPEND_CHARACTER@%$HAVE_RL_COMPLETION_APPEND_CHARACTER%g
-s%@HAVE_FILENAME_COMPLETION_FUNCTION@%$HAVE_FILENAME_COMPLETION_FUNCTION%g
-s%@HAVE_FILENAME_COMPLETION_FUNCTION_DECL@%$HAVE_FILENAME_COMPLETION_FUNCTION_DECL%g
s%@HAVE_POSIX_SIGNALS@%$HAVE_POSIX_SIGNALS%g
s%@TCLSH@%$TCLSH%g
s%@TCL_CONFIG_SH@%$TCL_CONFIG_SH%g
AC_CHECK_LIB(sfio, main)
AC_CHECK_LIB(ncurses, main, [], [AC_CHECK_LIB(curses, main)])
AC_CHECK_LIB(termcap, main)
-AC_CHECK_LIB(readline, main)
-AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
- AC_CHECK_LIB(history, main) )
+AC_CHECK_LIB(readline, readline)
+AC_SEARCH_LIBS(using_history, history, [AC_DEFINE(HAVE_HISTORY_FUNCTIONS)])
if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
then
AC_DEFINE(HAVE_RINT),
AC_CHECK_LIB(m, rint, AC_DEFINE(HAVE_RINT), , $HPUXMATHLIB))
-dnl Some old versions of libreadline don't have rl_completion_append_character
-AC_EGREP_HEADER(rl_completion_append_character, readline.h,
- AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER),
- [AC_EGREP_HEADER(rl_completion_append_character, readline/readline.h,
- AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER))])
-AC_SUBST(HAVE_RL_COMPLETION_APPEND_CHARACTER)
-
-dnl Check for readline's filename_completion_function.
-dnl Some versions have it but it's not in the headers, so we have to take
-dnl care of that, too.
-AC_CHECK_FUNCS(filename_completion_function,
- AC_EGREP_HEADER(filename_completion_function, readline.h,
- AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL),
- [AC_EGREP_HEADER(filename_completion_function, readline/readline.h,
- AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL))])
-)
-AC_SUBST(HAVE_FILENAME_COMPLETION_FUNCTION)
-AC_SUBST(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
+
+# Readline versions < 2.1 don't have rl_completion_append_character
+AC_MSG_CHECKING([for rl_completion_append_character])
+AC_TRY_LINK([#include
+#ifdef HAVE_READLINE_H
+# include
+#endif
+#ifdef HAVE_READLINE_READLINE_H
+# include
+#endif],
+[rl_completion_append_character = 'x';],
+[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'
+elif test "$ac_cv_header_readline_readline_h" = yes; then
+ _readline_header='readline/readline.h'
+else
+ _readline_header='xxx'
+fi
+AC_EGREP_HEADER([filename_completion_function], [$_readline_header],
+[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
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.10 2000/04/12 17:16:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.11 2000/10/03 19:50:20 petere Exp $
*/
#ifndef INPUT_H
#define INPUT_H
#endif
#endif
-#if defined(HAVE_LIBHISTORY) || (defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_IN_READLINE))
+#if defined(HAVE_HISTORY_FUNCTIONS)
#if defined(HAVE_READLINE_HISTORY_H)
#include
#define USE_HISTORY 1
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.20 2000/06/25 14:25:51 petere Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.21 2000/10/03 19:50:20 petere Exp $
*/
/*----------------------------------------------------------------------
#include "common.h"
#include "settings.h"
-#if defined(HAVE_FILENAME_COMPLETION_FUNCTION) && !defined(HAVE_FILENAME_COMPLETION_FUNCTION_DECL)
+#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
char *filename_completion_function(char *, int);
#endif
strcmp(prev_wd, "\\w") == 0 || strcmp(prev_wd, "\\write") == 0
)
{
-#ifdef HAVE_FILENAME_COMPLETION_FUNCTION
matches = completion_matches(text, filename_completion_function);
-#else
-
- /*
- * This will probably have the same effect, but you never know
- * what the heck some readline incarnation out there is going to
- * do.
- */
- matches = NULL;
-#endif
}
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: config.h.in,v 1.139 2000/10/03 03:11:23 momjian Exp $
+ * $Id: config.h.in,v 1.140 2000/10/03 19:50:21 petere Exp $
*/
#ifndef CONFIG_H
/* Define if you have the stricmp function. */
#undef HAVE_STRICMP
-/* Set to 1 if you have libreadline and it includes history functions */
-#undef HAVE_HISTORY_IN_READLINE
+/* Set to 1 if you have history functions (either in libhistory or libreadline) */
+#undef HAVE_HISTORY_FUNCTIONS
/* Set to 1 if you have
*/
#undef HAVE_PWD_H
/* Set to 1 if your libreadline defines rl_completion_append_character */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
-/* Set to 1 if your libreadline has filename_completion_function */
-#undef HAVE_FILENAME_COMPLETION_FUNCTION
-
-/* Set to 1 if your readline headers actually declare the above */
+/* Set to 1 if filename_completion_function is declared in the readline header */
#undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
/* Set to 1 if you have getopt_long() (GNU long options) */