blob: 69e25287260f4c9b339c7f5cdc7183de5d69cff4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$NetBSD: patch-ab,v 1.13 2002/04/04 07:48:24 jlam Exp $
--- config/programs.m4.orig Tue Aug 28 10:59:11 2001
+++ config/programs.m4
@@ -80,6 +80,14 @@
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_MSG_CHECKING([for readline])
+case $host_os in netbsd* | openbsd* )
+ if echo __ELF__ | $CPP - 2>/dev/null | grep __ELF__ >/dev/null; then
+ objformat=a.out
+ else
+ objformat=ELF
+ fi
+esac
+
AC_CACHE_VAL([pgac_cv_check_readline],
[pgac_cv_check_readline=no
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
@@ -87,12 +95,14 @@
pgac_save_LIBS=$LIBS
LIBS="${pgac_rllib}${pgac_lib} $LIBS"
AC_TRY_LINK_FUNC([readline], [[
- # NetBSD and OpenBSD have a broken linker that does not
+ # NetBSD and OpenBSD have a broken a.out linker that does not
# recognize dependent libraries
case $host_os in netbsd* | openbsd* )
- case $pgac_lib in
- *curses*) ;;
- *) pgac_lib=" -lcurses" ;;
+ case $objformat in a.out )
+ case $pgac_lib in
+ *curses*) ;;
+ *) pgac_lib=" -lcurses" ;;
+ esac
esac
esac
|