]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5337] Improved syntax and error message in test for enable-static test
authorThomas Markwalder <tmark@isc.org>
Wed, 26 Jul 2017 15:15:35 +0000 (11:15 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 26 Jul 2017 15:15:35 +0000 (11:15 -0400)
configure.ac

index 2469a09be9745573a62f8815e6007ed666e250b5..6b4c21cf89962268f1089c2984e8ce524e02dcc3 100644 (file)
@@ -441,15 +441,15 @@ if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
 fi
 
 # Look for glib static libs if they're trying to do static builds
-if test $enable_static = yes; then
+if test $enable_static != "no"; then
    CXX_SAVED=$CXX
    CXX="$CXX -static"
 
    AC_LINK_IFELSE(
-     [AC_LANG_PROGRAM([#include <math.h>],[sqrt(-1.0);])],
+     [AC_LANG_PROGRAM([#include <math.h>],[(void)sqrt(-1.0);])],
      [AC_MSG_RESULT([checking for static glib libraries... yes])],
      [AC_MSG_RESULT([checking for static glib libraries... no])
-      AC_MSG_ERROR([Static building will not work. You appear to be missing glib static libraries. Check config.log for details.])])
+      AC_MSG_ERROR([Building with --enable-static does not work. You appear to be missing glib static libraries. Check config.log for details.])])
 
    CXX=$CXX_SAVED
 fi