configure doesn't detect normal curses
Christoph Badura
bad at bsd.de
Sat Jun 16 15:40:13 EDT 2007
Hi Carter,
I think the following patch will correct the detection of initscr()
in -lcurses.
I moved the check for initscr() in -lcurses from the "else" part
of "AC_CHECK_LIB(ncurses, initscr..." to the "else" part of
"AC_CHECK_HEADER(ncurses.h...". This seems more logical to me: If the
the ncurses.h header file is there we want to check for initscr() by
linking against -lncurses. If ncurses.h doesn't exist we'd want to check
for initscr() by linking against -lcurses.
I believe you also have to quote the nested calls to AC_CHECK_LIB with
[brackets] or autoconf will generate invalid syntax.
--- configure.in.orig 2007-05-28 21:58:14.000000000 +0200
+++ configure.in 2007-06-16 21:20:23.000000000 +0200
@@ -192,10 +192,10 @@
CURSESLIB=""
-AC_CHECK_HEADER(ncurses.h, AC_CHECK_LIB(ncurses, initscr,
- CURSESLIB="-lncurses",
- AC_CHECK_LIB(curses, initscr,
- CURSESLIB="-lcurses"),))
+AC_CHECK_HEADER(ncurses.h, [AC_CHECK_LIB(ncurses, initscr,
+ CURSESLIB="-lncurses")],
+ [AC_CHECK_LIB(curses, initscr,
+ CURSESLIB="-lcurses")],)
if test $CURSESLIB = "-lncurses"; then
cat >> confdefs.h <<\EOF
ratop now compiles correctly for me.
Cheers,
--chris
More information about the argus
mailing list