File tree 2 files changed +348
-322
lines changed
2 files changed +348
-322
lines changed Original file line number Diff line number Diff line change 1
- # $Header: /cvsroot/pgsql/config/programs.m4,v 1.6 2001/08/06 15:46:44 petere Exp $
1
+ # $Header: /cvsroot/pgsql/config/programs.m4,v 1.7 2001/08/28 14:59:11 petere Exp $
2
2
3
3
4
4
# PGAC_PATH_FLEX
@@ -77,15 +77,28 @@ AC_SUBST(FLEXFLAGS)
77
77
# Add the required flags to LIBS, define HAVE_LIBREADLINE.
78
78
79
79
AC_DEFUN ( [ PGAC_CHECK_READLINE] ,
80
- [ AC_MSG_CHECKING ( [ for readline] )
80
+ [ AC_REQUIRE ( [ AC_CANONICAL_HOST ] )
81
+ AC_MSG_CHECKING ( [ for readline] )
81
82
82
83
AC_CACHE_VAL ( [ pgac_cv_check_readline] ,
83
84
[ pgac_cv_check_readline=no
84
85
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
85
86
for pgac_rllib in -lreadline -ledit ; do
86
87
pgac_save_LIBS=$LIBS
87
88
LIBS="${pgac_rllib}${pgac_lib} $LIBS"
88
- AC_TRY_LINK_FUNC ( [ readline] , [ pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"; break 2] )
89
+ AC_TRY_LINK_FUNC ( [ readline] , [ [
90
+ # NetBSD and OpenBSD have a broken linker that does not
91
+ # recognize dependent libraries
92
+ case $host_os in netbsd* | openbsd* )
93
+ case $pgac_lib in
94
+ *curses*) ;;
95
+ *) pgac_lib=" -lcurses" ;;
96
+ esac
97
+ esac
98
+
99
+ pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
100
+ break 2
101
+ ] ] )
89
102
LIBS=$pgac_save_LIBS
90
103
done
91
104
done
You can’t perform that action at this time.
0 commit comments