Author: sveinung
Date: Wed Nov  4 10:08:08 2015
New Revision: 30403

URL: http://svn.gna.org/viewcvs/freeciv?rev=30403&view=rev
Log:
Fail on invalid --enable-delta-protocol values

Have ./configure fail if --enable-delta-protocol is set to an invalid
value. This makes it behave like Freeciv's other AC_ARG_ENABLE options.

Reported by Marko Lindqvist <cazfi>

See bug #23999

Modified:
    trunk/configure.ac

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=30403&r1=30402&r2=30403&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Wed Nov  4 10:08:08 2015
@@ -274,7 +274,14 @@
 dnl make it possible to disable the delta network protocol
 AC_ARG_ENABLE([delta-protocol],
   AS_HELP_STRING([--disable-delta-protocol],
-                 [disable the delta network protocol]))
+                 [disable the delta network protocol]),
+  [case "${enableval}" in
+   yes|no)
+     enable_delta_protocol=${enableval} ;;
+   *)
+     AC_MSG_ERROR([bad value ${enableval} for --enable-delta-protocol]) ;;
+   esac],
+  [enable_delta_protocol=yes])
 
 AS_IF([test "x$enable_delta_protocol" = "xno"], [
   AC_MSG_WARN([delta network protocol is off])


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to