configure

changeset 1017
b0098854071f
parent 990
f708863e7ec6
--- a/configure	Sun Dec 15 15:22:45 2024 +0100
+++ b/configure	Sun Dec 15 15:23:29 2024 +0100
@@ -106,9 +106,11 @@
   --mandir=DIR            man documentation [DATAROOTDIR/man]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
 
+Build Types:
+--debug                 add extra compile flags for debug builds
+--release               add extra compile flags for release builds
+
 Options:
-  --debug                 add extra compile flags for debug builds
-  --release               add extra compile flags for release builds
   --with-docs=(all|html|api|none)
 
 Optional Features:
@@ -185,10 +187,11 @@
         "--infodir="*)        infodir=${ARG#--infodir=} ;;
         "--mandir"*)          mandir=${ARG#--mandir} ;;
         "--localedir"*)       localedir=${ARG#--localedir} ;;
-        "--help"*) printhelp; abort_configure ;;
-        "--debug")           BUILD_TYPE="debug" ;;
-        "--release")         BUILD_TYPE="release" ;;
+        "--help"*)            printhelp; abort_configure ;;
+        "--debug")            BUILD_TYPE="debug" ;;
+        "--release")          BUILD_TYPE="release" ;;
         "--with-docs="*) OPT_WITH_DOCS=${ARG#--with-docs=} ;;
+        "--with-docs")  echo "option '$ARG' needs a value:"; echo "  $ARG=(all|html|api|none)"; abort_configure ;;
         "--enable-coverage") FEATURE_COVERAGE=on ;;
         "--disable-coverage") unset FEATURE_COVERAGE ;;
         "--enable-cxx-tests") FEATURE_CXX_TESTS=on ;;
@@ -505,9 +508,9 @@
 DEPENDENCIES_FAILED=
 ERROR=0
 # unnamed dependencies
-TEMP_CFLAGS=
-TEMP_CXXFLAGS=
-TEMP_LDFLAGS=
+TEMP_CFLAGS="$CFLAGS"
+TEMP_CXXFLAGS="$CXXFLAGS"
+TEMP_LDFLAGS="$LDFLAGS"
 while true
 do
     while true
@@ -776,6 +779,11 @@
             ERROR=1
             DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED"
         fi
+    else
+        echo
+        echo "Invalid option value - usage:"
+        echo "  --with-docs=(all|html|api|none)"
+        abort_configure
     fi
 fi
 

mercurial