]> git.proxmox.com Git - mirror_frr.git/blobdiff - configure.ac
debian/tools: new init script
[mirror_frr.git] / configure.ac
index 28cb5cb8f64c9fb994117f8b686835627381a35e..cb517a1a9485a797c7839abcae9760c238566123 100755 (executable)
@@ -330,9 +330,19 @@ test -f conftest.a && rm conftest.a
 dnl ----------------------
 dnl Packages configuration
 dnl ----------------------
+if test -f config.version; then
+  . ./config.version
+elif test -f "${srcdir}/config.version"; then
+  . "${srcdir}/config.version"
+fi
 AC_ARG_WITH(pkg-extra-version,
-       AS_HELP_STRING([--with-pkg-extra-version=VER], [add extra version field, for packagers/distributions]),
-       [EXTRAVERSION=$withval],)
+  AS_HELP_STRING([--with-pkg-extra-version=VER], [add extra version field, for packagers/distributions]), [
+  if test "$withval" = "no"; then
+    EXTRAVERSION=
+  else
+    EXTRAVERSION=$withval
+  fi
+], [])
 AC_ARG_WITH(pkg-git-version,
        AS_HELP_STRING([--with-pkg-git-version], [add git information to MOTD and build version string]),
        [ test "x$withval" != "xno" && with_pkg_git_version="yes" ])
@@ -741,6 +751,7 @@ if test "x${EXTRAVERSION}" != "x" ; then
   AC_SUBST(PACKAGE_EXTRAVERSION, ["${EXTRAVERSION}"])
   PACKAGE_STRING="${PACKAGE_STRING}${EXTRAVERSION}"
 fi
+AC_SUBST(EXTRAVERSION)
 
 if test "x$with_pkg_git_version" = "xyes"; then
        if test -d "${srcdir}/.git"; then
@@ -1478,6 +1489,11 @@ if test "${enable_snmp}" != "" -a "${enable_snmp}" != "no"; then
    fi
    SNMP_LIBS="`${NETSNMP_CONFIG} --agent-libs`"
    SNMP_CFLAGS="`${NETSNMP_CONFIG} --base-cflags`"
+   # net-snmp lists all of its own dependencies.  we absolutely do not want that
+   # among other things we avoid a GPL vs. OpenSSL license conflict here
+   for removelib in crypto ssl sensors pci wrap; do
+     SNMP_LIBS="`echo $SNMP_LIBS | sed -e 's/\(^\|\s\)-l'$removelib'\b/ /g' -e 's/\(^\|\s\)\([^\s]*\/\)\?lib'$removelib'\.[^\s]\+\b/ /g'`"
+   done
    AC_MSG_CHECKING([whether we can link to Net-SNMP])
    AC_LINK_IFELSE_FLAGS([$SNMP_CFLAGS], [$SNMP_LIBS], [AC_LANG_PROGRAM([
 int main(void);
@@ -1996,6 +2012,7 @@ AC_MSG_RESULT($ac_cv_htonl_works)
 AC_CONFIG_FILES([Makefile],[sed -e 's/^#AUTODERP# //' -i Makefile])
 
 AC_CONFIG_FILES([
+         config.version
          redhat/frr.spec
          solaris/Makefile
          debianpkg/changelog
@@ -2009,6 +2026,9 @@ AC_CONFIG_FILES([
 
 AC_CONFIG_FILES([vtysh/extract.pl],[chmod +x vtysh/extract.pl])
 AC_CONFIG_FILES([tools/frr],[chmod +x tools/frr])
+AC_CONFIG_FILES([tools/watchfrr.sh],[chmod +x tools/watchfrr.sh])
+AC_CONFIG_FILES([tools/frrinit.sh],[chmod +x tools/frrinit.sh])
+AC_CONFIG_FILES([tools/frrcommon.sh])
 
 AC_CONFIG_COMMANDS([lib/route_types.h], [
        dst="${ac_abs_top_builddir}/lib/route_types.h"