]> git.proxmox.com Git - mirror_frr.git/commitdiff
* configure.ac, vtysh/Makefile.am: Only vtysh needs to be linked
authorhasso <hasso>
Thu, 25 Aug 2005 12:00:58 +0000 (12:00 +0000)
committerhasso <hasso>
Thu, 25 Aug 2005 12:00:58 +0000 (12:00 +0000)
  against libreadline and friends.

ChangeLog
configure.ac
vtysh/Makefile.am

index 47ce84fd342869d8a86dc83f5a5b593e20954d09..5a465b423e1ff635a575bf130d97d01308318e6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-25 Hasso Tepper <hasso at quagga.net>
+
+       * configure.ac, vtysh/Makefile.am: Only vtysh needs to be linked
+         against libreadline and friends.
+
 2005-08-13 Paul Jakma <paul@jakma.org>
 
        * Makefile.am: (EXTRA_DIST) Add the trailing slash back in which
index 6aa0050dfff1fa7532e26e53dbc1300afb0b5ff3..904831163ff12f9959a94964fa6d2adc9c8effd2 100755 (executable)
@@ -5,7 +5,7 @@
 ##  Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
 ##  Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
 ##
-## $Id: configure.ac,v 1.109 2005/06/30 13:52:20 hasso Exp $
+## $Id: configure.ac,v 1.110 2005/08/25 12:00:58 hasso Exp $
 AC_PREREQ(2.53)
 
 AC_INIT(Quagga, 0.99.1, [http://bugzilla.quagga.net])
@@ -397,11 +397,11 @@ dnl        Vtysh uses libreadline, which looks for termcap functions at
 dnl     configure time.  We follow readline's search order.
 dnl     The required procedures are in libtermcap on NetBSD, in
 dnl     [TODO] on Linux, and in [TODO] on Solaris.
-        AC_CHECK_LIB(termcap, tputs, ,
-               AC_CHECK_LIB(tinfo, tputs, ,
-               AC_CHECK_LIB(curses, tputs, ,
-               AC_CHECK_LIB(ncurses, tputs))))
-         AC_CHECK_LIB(readline, main)
+        AC_CHECK_LIB(termcap, tputs, LIBREADLINE="$LIBREADLINE -ltermcap",
+               AC_CHECK_LIB(tinfo, tputs, LIBREADLINE="$LIBREADLINE -ltinfo",
+               AC_CHECK_LIB(curses, tputs, LIBREADLINE="$LIBREADLINE -lcurses",
+               AC_CHECK_LIB(ncurses, tputs, LIBREADLINE="$LIBREADLINE -lncurses"))))
+         AC_CHECK_LIB(readline, main, LIBREADLINE="$LIBREADLINE -lreadline")
          if test $ac_cv_lib_readline_main = no; then
            AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.])
          fi
@@ -409,7 +409,7 @@ dnl  [TODO] on Linux, and in [TODO] on Solaris.
         if test $ac_cv_header_readline_history_h = no;then
            AC_MSG_ERROR([readline is too old to have readline/history.h, please update to the latest readline library.])
         fi
-        AC_CHECK_LIB(readline, rl_completion_matches)
+        AC_CHECK_LIB(readline, rl_completion_matches, LIBREADLINE="$LIBREADLINE")
          if test $ac_cv_lib_readline_rl_completion_matches = no; then
            AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
         fi
@@ -417,6 +417,7 @@ dnl  [TODO] on Linux, and in [TODO] on Solaris.
   "no" ) VTYSH="";;
   *    ) ;;
 esac
+AC_SUBST(LIBREADLINE)
 
 dnl ----------
 dnl PAM module
@@ -1363,7 +1364,7 @@ source code location    : ${srcdir}
 compiler                : ${CC}
 compiler flags          : ${CFLAGS}
 includes                : ${INCLUDES} ${SNMP_INCLUDES}
-linker flags            : ${LDFLAGS} ${LIBS}
+linker flags            : ${LDFLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE}
 state file directory    : ${quagga_statedir}
 config file directory   : `eval echo \`echo ${sysconfdir}\``
 example directory       : `eval echo \`echo ${exampledir}\``
index 35dc76373606bea0a26a01fe3d79d4abaf7761ab..dbd1d3d2c029a3d3344821d44ba9efa4e7404ce4 100644 (file)
@@ -11,7 +11,7 @@ vtysh_SOURCES = vtysh_main.c vtysh.c vtysh_user.c vtysh_config.c
 nodist_vtysh_SOURCES = vtysh_cmd.c
 CLEANFILES = vtysh_cmd.c
 noinst_HEADERS = vtysh.h vtysh_user.h
-vtysh_LDADD = ../lib/libzebra.la @LIBCAP@
+vtysh_LDADD = ../lib/libzebra.la @LIBCAP@ @LIBREADLINE@
 
 examplesdir = $(exampledir)
 dist_examples_DATA = vtysh.conf.sample