summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rwxr-xr-xconfigure.ac109
-rw-r--r--debianpkg/control2
-rw-r--r--debianpkg/frr.dirs1
-rw-r--r--debianpkg/frr.install1
-rwxr-xr-xdebianpkg/rules57
-rw-r--r--vtysh/subdir.am2
7 files changed, 89 insertions, 87 deletions
diff --git a/Makefile.am b/Makefile.am
index 4cbf111b04..474f8ab5b5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,10 @@ AM_LDFLAGS = \
DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
LIBCAP = @LIBCAP@
+AR_FLAGS = @AR_FLAGS@
+ARFLAGS = @ARFLAGS@
+RANLIB = @RANLIB@
+
# these two targets are provided to easily grab autoconf/Makefile variables
# you can use either:
# eval `make VARFD=3 shvar-CFLAGS 3>&1 1>&2`
diff --git a/configure.ac b/configure.ac
index 60d3a876a8..15bf059c89 100755
--- a/configure.ac
+++ b/configure.ac
@@ -323,6 +323,32 @@ fi
AC_SUBST(AC_LDFLAGS)
AM_CONDITIONAL([STATIC_BIN], [test "x$enable_static_bin" = "xyes"])
+dnl $AR and $RANLIB are set by LT_INIT above
+AC_MSG_CHECKING([whether $AR supports D option])
+if $AR crD conftest.a; then
+ AC_MSG_RESULT([yes])
+ dnl ARFLAGS is for automake, AR_FLAGS for libtool m-(
+ ARFLAGS="crD"
+ AR_FLAGS="crD"
+else
+ AC_MSG_RESULT([no])
+ ARFLAGS="cru"
+ AR_FLAGS="cru"
+fi
+AC_SUBST(ARFLAGS)
+AC_SUBST(AR_FLAGS)
+
+AC_MSG_CHECKING([whether $RANLIB supports D option])
+if $RANLIB -D conftest.a; then
+ AC_MSG_RESULT([yes])
+ RANLIB="$RANLIB -D"
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(RANLIB)
+
+test -f conftest.a && rm conftest.a
+
dnl ----------------------
dnl Packages configuration
dnl ----------------------
@@ -462,9 +488,9 @@ AC_ARG_ENABLE([memory-sanitizer],
AS_IF([test "${enable_clippy_only}" != "yes"], [
AC_CHECK_HEADERS(json-c/json.h)
AC_CHECK_LIB(json-c, json_object_get, LIBS="$LIBS -ljson-c", [], [-lm])
-if test $ac_cv_lib_json_c_json_object_get = no; then
+if test "$ac_cv_lib_json_c_json_object_get" = no; then
AC_CHECK_LIB(json, json_object_get, LIBS="$LIBS -ljson")
- if test $ac_cv_lib_json_json_object_get = no; then
+ if test "$ac_cv_lib_json_json_object_get" = no; then
AC_MSG_ERROR([lib json is needed to compile])
fi
fi
@@ -958,7 +984,6 @@ case "$host_os" in
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(umem, main)
- CURSES=-lcurses
SOLARIS="solaris"
;;
linux*)
@@ -1024,40 +1049,47 @@ dnl ---------------------
dnl Integrated VTY option
dnl ---------------------
case "${enable_vtysh}" in
- "no") VTYSH="";;
- *) VTYSH="vtysh";
- AC_DEFINE(VTYSH,,VTY shell)
-dnl Vtysh uses libreadline, which looks for termcap functions at
-dnl configure time. We follow readlines 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, 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="-lreadline $LIBREADLINE",,
- "$LIBREADLINE")
- 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
- AC_CHECK_HEADER(readline/history.h)
- 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,
- LIBREADLINE="$LIBREADLINE",, "$LIBREADLINE")
- if test $ac_cv_lib_readline_rl_completion_matches = no; then
- AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
- fi
- AC_SEARCH_LIBS([append_history], [readline], [frr_cv_append_history=yes], [frr_cv_append_history=no])
- if test "$frr_cv_append_history" = yes; then
- AC_DEFINE(HAVE_APPEND_HISTORY, 1, [Have history.h append_history])
- fi
- ;;
+"no")
+ VTYSH="";;
+*)
+ VTYSH="vtysh";
+ AC_DEFINE(VTYSH,,VTY shell)
+
+ prev_libs="$LIBS"
+ AC_CHECK_LIB(readline, main, [
+ LIBREADLINE="-lreadline"
+ ], [
+ dnl readline failed - it might be incorrectly linked and missing its
+ dnl termcap/tinfo/curses dependency. see if we can fix that...
+ AC_SEARCH_LIBS(tputs, [termcap tinfo curses ncurses], [
+ LIBREADLINE="$ac_cv_search_tputs"
+ ], [
+ AC_MSG_ERROR([libreadline (needed for vtysh) not found and/or missing dependencies])
+ ])
+
+ dnl re-try with the lib we found above
+ unset ac_cv_lib_readline_main
+ AC_CHECK_LIB(readline, main, [
+ LIBREADLINE="-lreadline $LIBREADLINE"
+ ], [
+ AC_MSG_ERROR([libreadline (needed for vtysh) not found and/or missing dependencies])
+ ], [$LIBREADLINE])
+ ], [])
+ LIBS="$prev_libs"
+
+ AC_CHECK_HEADER(readline/history.h)
+ 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, [true], [], [$LIBREADLINE])
+ if test $ac_cv_lib_readline_rl_completion_matches = no; then
+ AC_DEFINE(rl_completion_matches,completion_matches,Old readline)
+ fi
+ AC_CHECK_LIB(readline, [append_history], [frr_cv_append_history=yes], [frr_cv_append_history=no], [$LIBREADLINE])
+ if test "$frr_cv_append_history" = yes; then
+ AC_DEFINE(HAVE_APPEND_HISTORY, 1, [Have history.h append_history])
+ fi
+ ;;
esac
AC_SUBST(LIBREADLINE)
AM_CONDITIONAL(VTYSH, test "x$VTYSH" = "xvtysh")
@@ -1398,7 +1430,7 @@ fi
AM_CONDITIONAL(BFDD, [test "x$BFDD" = "xbfdd"])
-if test $ac_cv_lib_json_c_json_object_get = no -a "x$BFDD" = "xbfdd"; then
+if test "$ac_cv_lib_json_c_json_object_get" = no -a "x$BFDD" = "xbfdd"; then
AC_MSG_ERROR(["you must use json-c library to use bfdd"])
fi
@@ -1458,7 +1490,6 @@ fi
AM_CONDITIONAL([ENABLE_BGP_VNC], [test x${enable_bgp_vnc} != xno])
AC_SUBST(SOLARIS)
-AC_SUBST(CURSES)
AC_CHECK_LIB(crypt, crypt, [],
[AC_CHECK_LIB(crypto, DES_crypt)])
AC_CHECK_LIB(resolv, res_init)
diff --git a/debianpkg/control b/debianpkg/control
index 71c412a960..ea977937bf 100644
--- a/debianpkg/control
+++ b/debianpkg/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Nobody <nobody@frrouting.org>
Uploaders: Nobody <nobody@frrouting.org>
XSBC-Original-Maintainer: <maintainers@frrouting.org>
-Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, libreadline-dev, texlive-latex-base, texlive-generic-recommended, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7), python-ipaddr, python-sphinx, libpython-dev, install-info
+Build-Depends: debhelper (>= 7.0.50~), libreadline-dev, libpam0g-dev | libpam-dev, libcap-dev, texinfo (>= 4.7), autotools-dev, libpcre3-dev, gawk, chrpath, libsnmp-dev, git, dh-autoreconf, libjson-c-dev, libjson-c2 | libjson-c3, dh-systemd, libsystemd-dev, bison, flex, libc-ares-dev, pkg-config, python (>= 2.7) | python3, python-sphinx | python3-sphinx, libpython-dev | libpython3-dev, install-info
Standards-Version: 3.9.6
Homepage: http://www.frrouting.org/
diff --git a/debianpkg/frr.dirs b/debianpkg/frr.dirs
index 56699b2daa..f3fff26441 100644
--- a/debianpkg/frr.dirs
+++ b/debianpkg/frr.dirs
@@ -4,5 +4,4 @@ etc/iproute2/rt_protos.d/
usr/share/doc/frr/
usr/share/doc/frr/examples/
usr/share/lintian/overrides/
-usr/share/snmp/mibs/
var/log/frr/
diff --git a/debianpkg/frr.install b/debianpkg/frr.install
index 20a58bb0e9..e430868fe3 100644
--- a/debianpkg/frr.install
+++ b/debianpkg/frr.install
@@ -5,7 +5,6 @@ usr/include/frr/
usr/lib/
tools/frr usr/lib/frr
usr/share/doc/frr/
-usr/share/snmp/mibs/
tools/etc/* etc/
tools/*.service lib/systemd/system
tools/frr-reload usr/lib/frr/
diff --git a/debianpkg/rules b/debianpkg/rules
index 811d45bc0b..894cd7f198 100755
--- a/debianpkg/rules
+++ b/debianpkg/rules
@@ -7,15 +7,15 @@
# The following are the defaults. They can be overridden by setting a
# env variable to a different value
-WANT_LDP ?= 1
-WANT_PIM ?= 1
+# -Werror - don't enable this unless you're doing a dev package build
+WANT_WERROR ?= 0
+
WANT_OSPFAPI ?= 1
WANT_BGP_VNC ?= 1
WANT_CUMULUS_MODE ?= 0
WANT_MULTIPATH ?= 1
WANT_SNMP ?= 0
WANT_RPKI ?= 0
-WANT_BFD ?= 1
# NOTES:
#
@@ -39,6 +39,7 @@ WANT_FRR_USER ?= frr
WANT_FRR_VTY_GROUP ?= frrvty
# Don't build PDF docs by default
+# add build deps: texlive-latex-base, texlive-generic-recommended
GENERATE_PDF ?= 0
#
@@ -56,18 +57,6 @@ else
$(warning "DEBIAN: SNMP disabled, see README.Debian")
endif
-ifeq ($(WANT_LDP), 1)
- USE_LDP=--enable-ldpd
-else
- USE_LDP=--disable-ldpd
-endif
-
-ifeq ($(WANT_PIM), 1)
- USE_PIM=--enable-pimd
-else
- USE_PIM=--disable-pimd
-endif
-
ifeq ($(WANT_OSPFAPI), 1)
USE_OSPFAPI=--enable-ospfapi=yes
else
@@ -102,10 +91,10 @@ else
USE_RPKI=--disable-rpki
endif
-ifeq ($(WANT_BFD), 1)
- USE_BFD=--enable-bfdd
+ifeq ($(WANT_WERROR), 1)
+ USE_WERROR=--enable-werror
else
- USE_BFD=--disable-bfdd
+ USE_WERROR=--disable-werror
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -127,14 +116,6 @@ else
endif
override_dh_auto_configure:
- # Frr needs /proc to check some BSD vs Linux specific stuff.
- # Else it fails with an obscure error message pointing out that
- # IPCTL_FORWARDING is an undefined symbol which is not very helpful.
- @if ! [ -d /proc/1 ]; then \
- echo "./configure needs a mounted /proc"; \
- exit 1; \
- fi
-
if ! [ -e config.status ]; then \
dh_auto_configure -- \
--enable-exampledir=/usr/share/doc/frr/examples/ \
@@ -144,32 +125,23 @@ override_dh_auto_configure:
$(USE_SNMP) \
$(USE_OSPFAPI) \
$(USE_MULTIPATH) \
- $(USE_LDP) \
--enable-fpm \
$(USE_FRR_USER) $(USE_FRR_GROUP) \
$(USE_FRR_VTY_GROUP) \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640 \
- --enable-werror \
+ $(USE_WERROR) \
--with-libpam \
--enable-systemd=yes \
- --enable-poll=yes \
$(USE_CUMULUS) \
- $(USE_PIM) \
- --enable-dependency-tracking \
+ --disable-dependency-tracking \
$(USE_BGP_VNC) \
$(USE_RPKI) \
- $(USE_BFD) \
$(shell dpkg-buildflags --export=configure); \
fi
override_dh_auto_build:
- # doc/ is a bit crazy
-ifeq ($(GENERATE_PDF), 1)
- dh_auto_build -- -C doc pdf
-endif
- rm -vf doc/user/_build/texinfo/frr.info
- dh_auto_build -- -C doc info
+ dh_auto_build
override_dh_auto_test:
@@ -186,12 +158,9 @@ override_dh_auto_install:
mkdir -p debian/tmp/etc/frr/
perl -pi -e 's#^!log file #!log file /var/log/frr/#' debian/tmp/usr/share/doc/frr/examples/*sample*
- # leftover from previously shipping SMUX client OID MIB
- mkdir -p debian/tmp/usr/share/snmp/mibs/
-
- # cleaning .la files
- sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/*.la
- sed -i "/dependency_libs/ s/'.*'/''/" debian/tmp/usr/lib/frr/modules/*.la
+ # we don't need .la files
+ rm debian/tmp/usr/lib/*.la
+ rm debian/tmp/usr/lib/frr/modules/*.la
override_dh_systemd_start:
dh_systemd_start frr.service
diff --git a/vtysh/subdir.am b/vtysh/subdir.am
index 932429a87c..66a31ffff3 100644
--- a/vtysh/subdir.am
+++ b/vtysh/subdir.am
@@ -24,7 +24,7 @@ noinst_HEADERS += \
vtysh/vtysh_user.h \
# end
-vtysh_vtysh_LDADD = lib/libfrr.la @LIBCAP@ @LIBREADLINE@ @LIBS@ @CURSES@ @LIBPAM@
+vtysh_vtysh_LDADD = lib/libfrr.la @LIBCAP@ @LIBREADLINE@ @LIBS@ @LIBPAM@
EXTRA_DIST += vtysh/extract.pl