Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5610b6d

Browse files
committed
Only use termcap xor [n]curses, depending on what readline needs. Solaris
has problems when linking with both.
1 parent659a1d6 commit5610b6d

File tree

3 files changed

+345
-461
lines changed

3 files changed

+345
-461
lines changed

‎config/programs.m4

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/config/programs.m4,v 1.2 2000/10/26 16:28:00 petere Exp $
1+
# $Header: /cvsroot/pgsql/config/programs.m4,v 1.3 2001/02/06 19:20:16 petere Exp $
22

33

44
# PGAC_PATH_FLEX
@@ -70,3 +70,35 @@ fi
7070
AC_SUBST(FLEX)
7171
AC_SUBST(FLEXFLAGS)
7272
])# PGAC_PATH_FLEX
73+
74+
75+
76+
# PGAC_CHECK_READLINE
77+
# -------------------
78+
# Check for the readline library and dependent libraries, either
79+
# termcap or curses. Also try libedit, since NetBSD's is compatible.
80+
# Add the required flags to LIBS, define HAVE_LIBREADLINE.
81+
82+
AC_DEFUN([PGAC_CHECK_READLINE],
83+
[AC_MSG_CHECKING([for readline])
84+
85+
AC_CACHE_VAL([pgac_cv_check_readline],
86+
[pgac_cv_check_readline=no
87+
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
88+
for pgac_rllib in -lreadline -ledit ; do
89+
pgac_save_LIBS=$LIBS
90+
LIBS="${pgac_rllib}${pgac_lib} $LIBS"
91+
AC_TRY_LINK_FUNC([readline],[pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2])
92+
LIBS=$pgac_save_LIBS
93+
done
94+
done
95+
LIBS=$pgac_save_LIBS
96+
])[]dnl AC_CACHE_VAL
97+
98+
if test "$pgac_cv_check_readline" != no ; then
99+
AC_DEFINE(HAVE_LIBREADLINE)
100+
LIBS="$pgac_cv_check_readline $LIBS"
101+
AC_MSG_RESULT([yes ($pgac_cv_check_readline)])
102+
else
103+
AC_MSG_RESULT(no)
104+
fi])# PGAC_CHECK_READLINE

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp