]> git.proxmox.com Git - mirror_frr.git/commitdiff
build: refuse non-working linking options
authorDavid Lamparter <equinox@opensourcerouting.org>
Mon, 19 Nov 2018 15:32:14 +0000 (16:32 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 19 Nov 2018 15:32:14 +0000 (16:32 +0100)
We only support:
* --enable-shared --disable-static --disable-static-bin
* --enable-shared --enable-static --disable-static-bin
* --enable-shared --enable-static --enable-static-bin

(The second option is not particularly useful.)

Signed-off-by: David Lamparter <equinox@diac24.net>
configure.ac

index 13f6fdab72af98c4ba49170666724adae14594f7..c925509fafac96f46bf451f13aa3f9ae425b06dd 100755 (executable)
@@ -334,6 +334,12 @@ _LT_CONFIG_LIBTOOL([
 ])
 if test "$enable_static_bin" = "yes"; then
   AC_LDFLAGS="-static"
+  if test "$enable_static" != "yes"; then
+    AC_MSG_ERROR([The --enable-static-bin option must be combined with --enable-static.])
+  fi
+fi
+if test "$enable_shared" != "yes"; then
+  AC_MSG_ERROR([FRR cannot be built with --disable-shared.  If you want statically linked daemons, use --enable-shared --enable-static --enable-static-bin])
 fi
 AC_SUBST([AC_LDFLAGS])
 AM_CONDITIONAL([STATIC_BIN], [test "x$enable_static_bin" = "xyes"])