From 33647bd841c1c74e7dc50e93379e372056ac2df1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 12 Mar 2006 13:36:08 +0000 Subject: r14240: fix summary output (step 2) we now need to explicit enable external libraries in *.m4 files again... metze (This used to be commit ca809a7910b16a248fffddc640298bbe4cdedc01) --- source4/lib/replace/readline.m4 | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'source4/lib/replace') diff --git a/source4/lib/replace/readline.m4 b/source4/lib/replace/readline.m4 index 0d1aa60d17..8248a1d900 100644 --- a/source4/lib/replace/readline.m4 +++ b/source4/lib/replace/readline.m4 @@ -2,6 +2,7 @@ # Readline included by default unless explicitly asked not to test "${with_readline+set}" != "set" && with_readline=yes +EXTERNAL_READLINE=no # test for where we get readline() from AC_MSG_CHECKING(whether to use readline) AC_ARG_WITH(readline, @@ -19,7 +20,7 @@ AC_ARG_WITH(readline, done AC_CHECK_LIB(readline, rl_callback_handler_install, [TERMLIBS="-lreadline $TERMLIBS" - AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) + EXTERNAL_READLINE=yes break], [TERMLIBS=], $TERMLIBS)]) ;; no) @@ -50,7 +51,7 @@ AC_ARG_WITH(readline, LDFLAGS="-L$with_readline/lib $LDFLAGS" CPPFLAGS="-I$with_readline/include $CPPFLAGS" TERMLIBS="-lreadline $TERMLIBS" - AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) + EXTERNAL_READLINE=yes break], [TERMLIBS= CPPFLAGS=$_cppflags], $TERMLIBS)]) ;; @@ -67,6 +68,18 @@ AC_CHECK_LIB(readline, rl_completion_matches, [], [$TERMLIBS]) -SMB_EXT_LIB(READLINE, [${TERMLIBS}]) - -SMB_SUBSYSTEM(LIBREADLINE, [lib/replace/readline.o], [EXT_LIB_READLINE]) +AC_MSG_CHECKING(whether to use extern readline) +if test x"$EXTERNAL_READLINE" = x"yes"; then + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) + SMB_SUBSYSTEM(LIBREADLINE, + [lib/replace/readline.o], + [EXT_LIB_READLINE]) + SMB_EXT_LIB(READLINE, [${TERMLIBS}]) + SMB_EXT_LIB_ENABLE(READLINE,YES) +else + SMB_SUBSYSTEM(LIBREADLINE, + [lib/replace/readline.o], + []) + AC_MSG_RESULT(no) +fi -- cgit