[Mesa-dev] [PATCH 5/5] configure: error out when building static XOR shared

Emil Velikov emil.l.velikov at gmail.com
Wed Dec 7 13:25:01 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

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 at collabora.com>
---
 configure.ac | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index f1f41db..4459103 100644
--- a/configure.ac
+++ b/configure.ac
@@ -466,12 +466,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
 
-- 
2.10.2



More information about the mesa-dev mailing list