test/configure

changeset 175
4869b7779d6d
parent 173
16324bb74fb1
child 176
f0f3d19a0aa1
--- a/test/configure	Mon Dec 01 20:31:54 2025 +0100
+++ b/test/configure	Mon Dec 01 20:32:12 2025 +0100
@@ -85,23 +85,26 @@
 printhelp()
 {
     echo "Usage: $0 [OPTIONS]..."
-    echo 'Configuration:'
+    if [ $has_config_vars__ -eq 1 ] ; then
+        echo
+        echo "Configuration:"
+    fi
 if true \
       ; then
     :
-    if test -z "$prefix__described__"; then
+    if [ -z "$prefix__described__" ] ; then
         prefix__described__=1
         cat << '__EOF__'
   --prefix                path prefix for architecture-independent files [/usr]
 __EOF__
     fi
-    if test -z "$exec_prefix__described__"; then
+    if [ -z "$exec_prefix__described__" ] ; then
         exec_prefix__described__=1
         cat << '__EOF__'
   --exec-prefix           path prefix for architecture-dependent files [PREFIX]
 __EOF__
     fi
-    if test -z "$libdir__described__"; then
+    if [ -z "$libdir__described__" ] ; then
         libdir__described__=1
         cat << '__EOF__'
   --libdir                object code libraries [EPREFIX/lib]
@@ -145,22 +148,27 @@
 touch "$TEMP_DIR/features"
 
 # config variables
+has_config_vars__=0
 if true \
       ; then
     :
-    if test -z "$prefix__initialized__"; then
+    if [ -z "$prefix__initialized__" ] ; then
+        has_config_vars__=1
         prefix__initialized__=1
         prefix='/usr'
     fi
-    if test -z "$exec_prefix__initialized__"; then
+    if [ -z "$exec_prefix__initialized__" ] ; then
+        has_config_vars__=1
         exec_prefix__initialized__=1
         exec_prefix=''
     fi
-    if test -z "$libdir__initialized__"; then
+    if [ -z "$libdir__initialized__" ] ; then
+        has_config_vars__=1
         libdir__initialized__=1
         libdir=''
     fi
-    if test -z "$HOST__initialized__"; then
+    if [ -z "$HOST__initialized__" ] ; then
+        has_config_vars__=1
         HOST__initialized__=1
         HOST=`uname -n`
     fi
@@ -169,7 +177,8 @@
       && notisplatform "mingw" \
       ; then
     :
-    if test -z "$PWD__initialized__"; then
+    if [ -z "$PWD__initialized__" ] ; then
+        has_config_vars__=1
         PWD__initialized__=1
         PWD='pwd'
     fi
@@ -178,7 +187,8 @@
     && isplatform "mingw" \
       ; then
     :
-    if test -z "$PWD__initialized__"; then
+    if [ -z "$PWD__initialized__" ] ; then
+        has_config_vars__=1
         PWD__initialized__=1
         PWD='pwd -W'
     fi
@@ -685,14 +695,22 @@
 if [ -n "$TOOLCHAIN_CSTD" ]; then
     echo "  default C std:  $TOOLCHAIN_CSTD"
 fi
-echo
-echo "Config:"
-    printf '  %-16s' 'prefix:'
-    echo "$prefix"
-    printf '  %-16s' 'exec-prefix:'
-    echo "$exec_prefix"
-    printf '  %-16s' 'libdir:'
-    echo "$libdir"
+if [ $has_config_vars__ -eq 1 ]; then
+    echo
+    echo "Config:"
+    if [ -n "$prefix__initialized__" ]; then
+        printf '  %-16s' 'prefix:'
+        echo "$prefix"
+    fi
+    if [ -n "$exec_prefix__initialized__" ]; then
+        printf '  %-16s' 'exec-prefix:'
+        echo "$exec_prefix"
+    fi
+    if [ -n "$libdir__initialized__" ]; then
+        printf '  %-16s' 'libdir:'
+        echo "$libdir"
+    fi
+fi
 echo
 echo "Features:"
 printf '  %-16s' 'pg:'

mercurial