From 5bd2d5c608f11b67dc2dcb8a22ceeab97172d2db Mon Sep 17 00:00:00 2001 From: joq Date: Fri, 23 Apr 2004 03:01:56 +0000 Subject: [PATCH] fix AC_CHECK_LIB caching problem git-svn-id: svn+ssh://jackaudio.org/trunk/jack@705 0c269be4-1314-0410-8aa9-9f06e86f4224 --- configure.in | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index ba6d77b..fcbd4b4 100644 --- a/configure.in +++ b/configure.in @@ -502,12 +502,21 @@ if test x$HAVE_SNDFILE = xfalse; then AC_MSG_WARN([*** the jackrec example client will not be built]) fi -# on some systems, readline depends on termcap or ncurses, respectively +# On some systems, readline depends on termcap or ncurses. But, the +# MacOSX linker complains bitterly if these libraries are explicitly +# referenced. +# +# AC_CHECK_LIB() foolishly assumes that checking a library for an entry +# point always returns the same result regardless of any dependent +# libraries specified. The `unset ac_cv_lib_readline_readline' erases +# the cached result to work around this problem. READLINE_DEPS="" HAVE_READLINE=true AC_CHECK_LIB(readline, readline, [], - [AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-ltermcap"], - [AC_CHECK_LIB(readline, readline, + [unset ac_cv_lib_readline_readline + AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-ltermcap"], + [unset ac_cv_lib_readline_readline + AC_CHECK_LIB(readline, readline, [READLINE_DEPS="-lncurses"], [HAVE_READLINE=false], "-lncurses")], "-ltermcap")]) if test x$HAVE_READLINE = xfalse; then