configure: error out when building static XOR shared
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 7 Dec 2016 13:25:01 +0000 (13:25 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 18 Jan 2017 16:01:15 +0000 (16:01 +0000)
Current code warns out in such cases and falls-back to either static or
shared. That can be easily missed amongst the volume produced by our
configure script.

Replace the warning with an error such that one gets direct feedback
when they're doing something wrong.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
configure.ac

index 6771aa64e16fcc96fc7a0e90cdf1ee0a579b6c35..33f1c42c8bed48c7d86672fd87b9e1c037b9968b 100644 (file)
@@ -468,12 +468,10 @@ dnl explicitly requested. If both disabled, set to static since shared
 dnl was explicitly requested.
 case "x$enable_static$enable_shared" in
 xyesyes)
-    AC_MSG_WARN([Cannot build static and shared libraries, disabling shared])
-    enable_shared=no
+    AC_MSG_ERROR([Cannot enable both static and shared. Building using --enable-shared is strongly recommended])
     ;;
 xnono)
-    AC_MSG_WARN([Cannot disable both static and shared libraries, enabling shared])
-    enable_shared=yes
+    AC_MSG_ERROR([Cannot disable both static and shared. Building using --enable-shared is strongly recommended])
     ;;
 esac