]> git.proxmox.com Git - mirror_frr.git/blobdiff - configure.ac
Merge pull request #42 from donaldsharp/pim_lib_work2
[mirror_frr.git] / configure.ac
index d883063ddb80c9ac09867a9969bb99cc551e1350..6ce5d0cc2ce683497207ce66f5298e66b781c1ec 100755 (executable)
@@ -33,6 +33,7 @@ AM_SILENT_RULES([yes])
 AC_CONFIG_HEADERS(config.h)
 
 AC_PATH_PROG(PERL, perl)
+PKG_PROG_PKG_CONFIG
 
 dnl default is to match previous behavior
 exampledir=${sysconfdir}
@@ -282,6 +283,8 @@ AC_ARG_ENABLE(rr-semantics,
   AS_HELP_STRING([--disable-rr-semantics], [disable the v6 Route Replace semantics]))
 AC_ARG_ENABLE([protobuf],
   AS_HELP_STRING([--enable-protobuf], [Enable experimental protobuf support]))
+AC_ARG_ENABLE([oldvpn_commands],
+  AS_HELP_STRING([--enable-old-vpn-commands], [Keep old vpn commands]))
 
 AC_CHECK_HEADERS(json-c/json.h)
 AC_CHECK_LIB(json-c, json_object_get, LIBS="$LIBS -ljson-c")
@@ -387,6 +390,13 @@ if test "$enable_protobuf" = "yes"; then
    fi
 fi
 
+#
+# Logic for old vpn commans support.
+#
+if test "$enable_old_vpn_commands" = "yes"; then
+   AC_DEFINE(KEEP_OLD_VPN_COMMANDS,, [Define for compiling with old vpn commands])
+fi
+
 # Fail if the user explicity enabled protobuf support and we couldn't
 # find the compiler or libraries.
 if test "x$have_protobuf" = "xno" && test "x$enable_protobuf" = "xyes"; then
@@ -779,7 +789,6 @@ AC_CHECK_HEADER([math.h],
   [AC_CHECK_LIB([m], [pow],
     [LIBM="-lm"
      LIBS="$LIBS $LIBM"
-     AC_DEFINE(HAVE_LIBM,, Have libm)
      AC_CHECK_FUNCS(pow,[],[LIBM=""])
     ])
 ])
@@ -1097,9 +1106,6 @@ dnl ----------
     AC_MSG_ERROR([Failed to detect IPv6 stack])
   fi
 
-dnl this is unconditial, for compatibility
-AC_DEFINE(HAVE_IPV6,1,IPv6)
-
 dnl ------------------
 dnl IPv6 header checks
 dnl ------------------
@@ -1165,6 +1171,14 @@ AM_CONDITIONAL(OSPFD, test "x$OSPFD" = "xospfd")
 if test "${enable_ldpd}" = "no";then
   LDPD=""
 else
+  AX_PROG_PERL_MODULES(XML::LibXML, , [
+    if test -f "${srcdir}/ldpd/ldp_vty_cmds.c"; then
+      AC_MSG_WARN([XML::LibXML perl module not found, using pregenerated ldp_vty_cmds.c])
+    else
+      AC_MSG_ERROR([XML::LibXML perl module not found and pregenerated ldp_vty_cmds.c missing])
+    fi
+  ])
+
   LDPD="ldpd"
   AC_DEFINE(HAVE_LDPD, 1, ldpd)
 fi