merge with remote changes

Sun, 30 Nov 2025 13:29:35 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 30 Nov 2025 13:29:35 +0100
changeset 1524
5b24ad070bb0
parent 1523
b5c32391802f (diff)
parent 1522
d0b5eb033b2a (current diff)
child 1525
f675a4e99fb5

merge with remote changes

--- a/configure	Sat Nov 29 12:10:27 2025 +0100
+++ b/configure	Sun Nov 30 13:29:35 2025 +0100
@@ -85,27 +85,52 @@
 printhelp()
 {
     echo "Usage: $0 [OPTIONS]..."
-    cat << __EOF__
-Installation directories:
-  --prefix=PREFIX         path prefix for architecture-independent files
-                          [$prefix]
-  --exec-prefix=EPREFIX   path prefix for architecture-dependent files
-                          [PREFIX]
-
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        system configuration files [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+    echo 'Configuration:'
+if true \
+      ; then
+    :
+    if test -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
+        exec_prefix__described__=1
+        cat << '__EOF__'
+  --exec-prefix           path prefix for architecture-dependent files [PREFIX]
+__EOF__
+    fi
+    if test -z "$libdir__described__"; then
+        libdir__described__=1
+        cat << '__EOF__'
+  --libdir                object code libraries [EPREFIX/lib]
+__EOF__
+    fi
+    if test -z "$includedir__described__"; then
+        includedir__described__=1
+        cat << '__EOF__'
+  --includedir            C header files [PREFIX/include]
+__EOF__
+    fi
+    if test -z "$DOXYGEN__described__"; then
+        DOXYGEN__described__=1
+        cat << '__EOF__'
+  --doxygen               path of the Doxygen executable
+__EOF__
+    fi
+fi
+if true \
+    && isplatform "bsd" \
+      ; then
+    :
+fi
+if true \
+      && notisplatform "bsd" \
+      ; then
+    :
+fi
+    cat << '__EOF__'
 
 Build Types:
   --debug                 add extra compile flags for debug builds
@@ -120,6 +145,7 @@
   --disable-szmul-builtin use custom implementation, instead
 
 __EOF__
+    abort_configure
 }
 
 # create temporary directory
@@ -135,30 +161,100 @@
 touch "$TEMP_DIR/options"
 touch "$TEMP_DIR/features"
 
-# define standard variables
-# also define standard prefix (this is where we will search for config.site)
-prefix=/usr
-exec_prefix=
-bindir=
-sbindir=
-libdir=
-libexecdir=
-datarootdir=
-datadir=
-sysconfdir=
-sharedstatedir=
-localstatedir=
-runstatedir=
-includedir=
-infodir=
-localedir=
-mandir=
-
-# custom variables
+# config variables
 if true \
       ; then
-    root_dir=`pwd`
-    DOXYGEN=`command -v doxygen`
+    :
+    if test -z "$prefix__initialized__"; then
+        prefix__initialized__=1
+        prefix="/usr"
+    fi
+    if test -z "$exec_prefix__initialized__"; then
+        exec_prefix__initialized__=1
+        exec_prefix=""
+    fi
+    if test -z "$libdir__initialized__"; then
+        libdir__initialized__=1
+        libdir=""
+    fi
+    if test -z "$includedir__initialized__"; then
+        includedir__initialized__=1
+        includedir=""
+    fi
+    if test -z "$VERSION__initialized__"; then
+        VERSION__initialized__=1
+        VERSION="3.2.0"
+    fi
+    if test -z "$LIBVERSION__initialized__"; then
+        LIBVERSION__initialized__=1
+        LIBVERSION="6.0.0"
+    fi
+    if test -z "$LIBVERSION_MAJOR__initialized__"; then
+        LIBVERSION_MAJOR__initialized__=1
+        LIBVERSION_MAJOR="6"
+    fi
+    if test -z "$root_dir__initialized__"; then
+        root_dir__initialized__=1
+        root_dir=`pwd`
+    fi
+    if test -z "$build_dir__initialized__"; then
+        build_dir__initialized__=1
+        build_dir="\${root_dir}/build"
+    fi
+    if test -z "$docs_dir__initialized__"; then
+        docs_dir__initialized__=1
+        docs_dir="\${root_dir}/build/docs"
+    fi
+    if test -z "$dist_dir__initialized__"; then
+        dist_dir__initialized__=1
+        dist_dir="\${root_dir}/dist"
+    fi
+    if test -z "$DOXYGEN__initialized__"; then
+        DOXYGEN__initialized__=1
+        DOXYGEN=`command -v doxygen`
+    fi
+    if test -z "$MKDIR__initialized__"; then
+        MKDIR__initialized__=1
+        MKDIR="/bin/mkdir -p"
+    fi
+    if test -z "$RMFILE__initialized__"; then
+        RMFILE__initialized__=1
+        RMFILE="/bin/rm -f"
+    fi
+    if test -z "$RMDIR__initialized__"; then
+        RMDIR__initialized__=1
+        RMDIR="/bin/rm -f -R"
+    fi
+    if test -z "$COPYFILE__initialized__"; then
+        COPYFILE__initialized__=1
+        COPYFILE="/bin/cp -f"
+    fi
+    if test -z "$COPYALL__initialized__"; then
+        COPYALL__initialized__=1
+        COPYALL="/bin/cp -f -R"
+    fi
+    if test -z "$SYMLINK__initialized__"; then
+        SYMLINK__initialized__=1
+        SYMLINK="/bin/ln -s"
+    fi
+fi
+if true \
+    && isplatform "bsd" \
+      ; then
+    :
+    if test -z "$pkgconfigdir__initialized__"; then
+        pkgconfigdir__initialized__=1
+        pkgconfigdir="\${exec_prefix}/libdata/pkgconfig"
+    fi
+fi
+if true \
+      && notisplatform "bsd" \
+      ; then
+    :
+    if test -z "$pkgconfigdir__initialized__"; then
+        pkgconfigdir__initialized__=1
+        pkgconfigdir="\${libdir}/pkgconfig"
+    fi
 fi
 
 # features
@@ -173,25 +269,14 @@
 for ARG in "$@"
 do
     case "$ARG" in
-        "--prefix="*)         prefix=${ARG#--prefix=} ;;
-        "--exec-prefix="*)    exec_prefix=${ARG#--exec-prefix=} ;;
-        "--bindir="*)         bindir=${ARG#----bindir=} ;;
-        "--sbindir="*)        sbindir=${ARG#--sbindir=} ;;
-        "--libdir="*)         libdir=${ARG#--libdir=} ;;
-        "--libexecdir="*)     libexecdir=${ARG#--libexecdir=} ;;
-        "--datarootdir="*)    datarootdir=${ARG#--datarootdir=} ;;
-        "--datadir="*)        datadir=${ARG#--datadir=} ;;
-        "--sysconfdir="*)     sysconfdir=${ARG#--sysconfdir=} ;;
-        "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
-        "--localstatedir="*)  localstatedir=${ARG#--localstatedir=} ;;
-        "--runstatedir="*)    runstatedir=${ARG#--runstatedir=} ;;
-        "--includedir="*)     includedir=${ARG#--includedir=} ;;
-        "--infodir="*)        infodir=${ARG#--infodir=} ;;
-        "--mandir"*)          mandir=${ARG#--mandir} ;;
-        "--localedir"*)       localedir=${ARG#--localedir} ;;
-        "--help"*)            printhelp; abort_configure ;;
-        "--debug")            BUILD_TYPE="debug" ;;
-        "--release")          BUILD_TYPE="release" ;;
+        "--prefix="*) prefix=${ARG#--prefix=} ;;
+        "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;;
+        "--libdir="*) libdir=${ARG#--libdir=} ;;
+        "--includedir="*) includedir=${ARG#--includedir=} ;;
+        "--doxygen="*) DOXYGEN=${ARG#--doxygen=} ;;
+        "--help"*) printhelp ;;
+        "--debug") BUILD_TYPE="debug" ;;
+        "--release") BUILD_TYPE="release" ;;
         "--enable-api-docs") FEATURE_API_DOCS=on ;;
         "--disable-api-docs") unset FEATURE_API_DOCS ;;
         "--enable-coverage") FEATURE_COVERAGE=on ;;
@@ -208,6 +293,19 @@
     esac
 done
 
+# toolchain detection utilities
+. make/toolchain.sh
+
+# check languages
+lang_c=
+lang_cpp=
+if detect_cpp_compiler ; then
+    lang_cpp=1
+fi
+if detect_c_compiler ; then
+    lang_c=1
+fi
+
 
 
 # set defaults for dir variables
@@ -245,58 +343,49 @@
 : ${mandir:='${datarootdir}/man'}
 : ${localedir:='${datarootdir}/locale'}
 
-# remember the above values and compare them later
-orig_bindir="$bindir"
-orig_sbindir="$sbindir"
-orig_libdir="$libdir"
-orig_libexecdir="$libexecdir"
-orig_datarootdir="$datarootdir"
-orig_datadir="$datadir"
-orig_sysconfdir="$sysconfdir"
-orig_sharedstatedir="$sharedstatedir"
-orig_localstatedir="$localstatedir"
-orig_runstatedir="$runstatedir"
-orig_includedir="$includedir"
-orig_infodir="$infodir"
-orig_mandir="$mandir"
-orig_localedir="$localedir"
 
 # check if a config.site exists and load it
+CONFIG_SITE_OK=0
 if [ -n "$CONFIG_SITE" ]; then
     # CONFIG_SITE may contain space separated file names
     for cs in $CONFIG_SITE; do
         printf "loading defaults from $cs... "
-        . "$cs"
-        echo ok
+        if [ -f "$cs" ]; then
+            . "$cs"
+            echo ok
+            CONFIG_SITE_OK=1
+            break
+        else
+            echo "not found"
+        fi
     done
 elif [ -f "$prefix/share/config.site" ]; then
     printf "loading site defaults... "
     . "$prefix/share/config.site"
     echo ok
+    CONFIG_SITE_OK=1
 elif [ -f "$prefix/etc/config.site" ]; then
     printf "loading site defaults... "
     . "$prefix/etc/config.site"
     echo ok
-else
+    CONFIG_SITE_OK=1
+fi
+
+if [ $CONFIG_SITE_OK -eq 0 ]; then
     # try to detect the correct libdir on our own, except it was changed by the user
-    if test "$libdir" = '${exec_prefix}/lib'; then
-        if [ "$OS" = "SunOS" ]; then
-            test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64'
-        else
-            # check if the standard libdir even exists
-            if test -d "${exec_prefix}/lib" ; then
-                :
+    if [ "$libdir" = '${exec_prefix}/lib' ] ; then
+        if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then
+            if [ "$OS" = "SunOS" ]; then
+                [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64'
             else
-                # if it does not, maybe a lib32 exists
-                test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32'
+                [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64'
             fi
-            # now check if there is a special 64bit libdir that we should use
-            for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do
-                if [ $ARCH = $i ]; then
-                    test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64'
-                    break
-                fi
-            done
+        elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then
+            if [ "$OS" = "SunOS" ]; then
+                [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32'
+            else
+                [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32'
+            fi
         fi
     fi
 fi
@@ -306,38 +395,31 @@
 cat > "$TEMP_DIR/vars.mk" << __EOF__
 prefix=$prefix
 exec_prefix=$exec_prefix
-bindir=$bindir
-sbindir=$sbindir
 libdir=$libdir
-libexecdir=$libexecdir
-datarootdir=$datarootdir
-datadir=$datadir
-sysconfdir=$sysconfdir
-sharedstatedir=$sharedstatedir
-localstatedir=$localstatedir
-runstatedir=$runstatedir
 includedir=$includedir
-infodir=$infodir
-mandir=$mandir
-localedir=$localedir
+VERSION=$VERSION
+LIBVERSION=$LIBVERSION
+LIBVERSION_MAJOR=$LIBVERSION_MAJOR
+root_dir=$root_dir
+build_dir=$build_dir
+docs_dir=$docs_dir
+dist_dir=$dist_dir
+DOXYGEN=$DOXYGEN
+MKDIR=$MKDIR
+RMFILE=$RMFILE
+RMDIR=$RMDIR
+COPYFILE=$COPYFILE
+COPYALL=$COPYALL
+SYMLINK=$SYMLINK
+pkgconfigdir=$pkgconfigdir
 __EOF__
 
-# toolchain detection utilities
-. make/toolchain.sh
 
 #
 # DEPENDENCIES
 #
 
-# check languages
-lang_c=
-lang_cpp=
-if detect_cpp_compiler ; then
-    lang_cpp=1
-fi
-if detect_c_compiler ; then
-    lang_c=1
-fi
+
 
 # create buffer for make variables required by dependencies
 echo > "$TEMP_DIR/make.mk"
@@ -472,10 +554,6 @@
         else
             break
         fi
-        cat >> $TEMP_DIR/make.mk << __EOF__
-# Dependency: doxygen
-DOXYGEN=$DOXYGEN
-__EOF__
         print_check_msg "$dep_checked_doxygen" "yes\n"
         dep_checked_doxygen=1
         return 1
@@ -517,44 +595,6 @@
 TEMP_LDFLAGS="$LDFLAGS"
 while true
 do
-    while true
-    do
-
-        cat >> "$TEMP_DIR/make.mk" << __EOF__
-# library version
-VERSION=3.2.0
-LIBVERSION=6.0.0
-LIBVERSION_MAJOR=6
-
-# build directory structure !! do not change or override !!
-root_dir=${root_dir}
-build_dir=${root_dir}/build
-docs_dir=${root_dir}/build/docs
-dist_dir=${root_dir}/dist
-__EOF__
-        break
-    done
-    break
-done
-while true
-do
-    while true
-    do
-
-        cat >> "$TEMP_DIR/make.mk" << __EOF__
-MKDIR=/bin/mkdir -p
-RMFILE=/bin/rm -f
-RMDIR=/bin/rm -f -R
-COPYFILE=/bin/cp -f
-COPYALL=/bin/cp -f -R
-SYMLINK=/bin/ln -s
-__EOF__
-        break
-    done
-    break
-done
-while true
-do
     if notisplatform "macos"; then
         break
     fi
@@ -843,7 +883,7 @@
 
 echo "configure finished"
 echo
-echo "Toolchain"
+echo "Toolchain:"
 echo "  name:           $TOOLCHAIN_NAME"
 if [ -n "$TOOLCHAIN_CC" ]; then
     echo "  cc:             $TOOLCHAIN_CC"
@@ -858,82 +898,54 @@
     echo "  default C std:  $TOOLCHAIN_CSTD"
 fi
 echo
-echo "Build Config:"
-echo "  prefix:         $prefix"
-echo "  exec_prefix:    $exec_prefix"
-if [ "$orig_bindir" != "$bindir" ]; then
-    echo "  bindir:      $bindir"
-fi
-if [ "$orig_sbindir" != "$sbindir" ]; then
-    echo "  sbindir:     $sbindir"
-fi
-if [ "$orig_libdir" != "$libdir" ]; then
-    echo "  libdir:         $libdir"
-fi
-if [ "$orig_libexecdir" != "$libexecdir" ]; then
-    echo "  libexecdir:     $libexecdir"
-fi
-if [ "$orig_datarootdir" != "$datarootdir" ]; then
-    echo "  datarootdir:    $datarootdir"
-fi
-if [ "$orig_datadir" != "$datadir" ]; then
-    echo "  datadir:        $datadir"
-fi
-if [ "$orig_sysconfdir" != "$sysconfdir" ]; then
-    echo "  sysconfdir:     $sysconfdir"
-fi
-if [ "$orig_sharedstatedir" != "$sharedstatedir" ]; then
-    echo "  sharedstatedir: $sharedstatedir"
-fi
-if [ "$orig_localstatedir" != "$localstatedir" ]; then
-    echo "  localstatedir:  $localstatedir"
-fi
-if [ "$orig_runstatedir" != "$runstatedir" ]; then
-    echo "  runstatedir:    $runstatedir"
-fi
-if [ "$orig_includedir" != "$includedir" ]; then
-    echo "  includedir:     $includedir"
-fi
-if [ "$orig_infodir" != "$infodir" ]; then
-    echo "  infodir:        $infodir"
-fi
-if [ "$orig_mandir" != "$mandir" ]; then
-    echo "  mandir:         $mandir"
-fi
-if [ "$orig_localedir" != "$localedir" ]; then
-    echo "  localedir:      $localedir"
-fi
+echo "Config:"
+    printf '  %-16s' 'prefix:'
+    echo "$prefix"
+    printf '  %-16s' 'exec-prefix:'
+    echo "$exec_prefix"
+    printf '  %-16s' 'libdir:'
+    echo "$libdir"
+    printf '  %-16s' 'includedir:'
+    echo "$includedir"
+    printf '  %-16s' 'doxygen:'
+    echo "$DOXYGEN"
 echo
 echo "Features:"
+printf '  %-16s' 'api-docs:'
 if [ -n "$FEATURE_API_DOCS" ]; then
-echo "  api-docs: on"
+    echo 'on'
 else
-echo "  api-docs: off"
+    echo 'off'
 fi
+printf '  %-16s' 'coverage:'
 if [ -n "$FEATURE_COVERAGE" ]; then
-echo "  coverage: on"
+    echo 'on'
 else
-echo "  coverage: off"
+    echo 'off'
 fi
+printf '  %-16s' 'asan:'
 if [ -n "$FEATURE_ASAN" ]; then
-echo "  asan: on"
+    echo 'on'
 else
-echo "  asan: off"
+    echo 'off'
 fi
+printf '  %-16s' 'memrchr:'
 if [ -n "$FEATURE_MEMRCHR" ]; then
-echo "  memrchr: on"
+    echo 'on'
 else
-echo "  memrchr: off"
+    echo 'off'
 fi
+printf '  %-16s' 'cxx-tests:'
 if [ -n "$FEATURE_CXX_TESTS" ]; then
-echo "  cxx-tests: on"
+    echo 'on'
 else
-echo "  cxx-tests: off"
+    echo 'off'
 fi
+printf '  %-16s' 'szmul-builtin:'
 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
-echo "  szmul-builtin: on"
+    echo 'on'
 else
-echo "  szmul-builtin: off"
+    echo 'off'
 fi
 echo
 
--- a/make/configure.vm	Sat Nov 29 12:10:27 2025 +0100
+++ b/make/configure.vm	Sun Nov 30 13:29:35 2025 +0100
@@ -86,27 +86,30 @@
 printhelp()
 {
     echo "Usage: $0 [OPTIONS]..."
-    cat << __EOF__
-Installation directories:
-  --prefix=PREFIX         path prefix for architecture-independent files
-                          [${D}prefix]
-  --exec-prefix=EPREFIX   path prefix for architecture-dependent files
-                          [PREFIX]
-
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        system configuration files [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       run-time variable data [LOCALSTATEDIR/run]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+    echo 'Configuration:'
+#foreach( $cfg in $config )
+if true \
+#if( $cfg.platform )
+    && isplatform "${cfg.platform}" \
+#end
+#foreach( $np in $cfg.notList )
+      && notisplatform "${np}" \
+#end
+      ; then
+    :
+    #foreach( $var in $cfg.vars )
+    #if( $var.overridable )
+    if test -z "${D}${var.varName}__described__"; then
+        ${var.varName}__described__=1
+        cat << '__EOF__'
+${var.helpText}
+__EOF__
+    fi
+    #end
+    #end
+fi
+#end
+    cat << '__EOF__'
 
 Build Types:
   --debug                 add extra compile flags for debug builds
@@ -127,6 +130,7 @@
 #end
 
 __EOF__
+    abort_configure
 }
 
 # create temporary directory
@@ -142,26 +146,7 @@
 touch "$TEMP_DIR/options"
 touch "$TEMP_DIR/features"
 
-# define standard variables
-# also define standard prefix (this is where we will search for config.site)
-prefix=/usr
-exec_prefix=
-bindir=
-sbindir=
-libdir=
-libexecdir=
-datarootdir=
-datadir=
-sysconfdir=
-sharedstatedir=
-localstatedir=
-runstatedir=
-includedir=
-infodir=
-localedir=
-mandir=
-
-# custom variables
+# config variables
 #foreach( $cfg in $config )
 if true \
 #if( $cfg.platform )
@@ -171,12 +156,16 @@
       && notisplatform "${np}" \
 #end
       ; then
+    :
     #foreach( $var in $cfg.vars )
-    #if( $var.exec )
-    ${var.varName}=`${var.value}`
-    #else
-    ${var.varName}="${var.value}"
-    #end
+    if test -z "${D}${var.varName}__initialized__"; then
+        ${var.varName}__initialized__=1
+        #if( $var.exec )
+        ${var.varName}=`${var.value}`
+        #else
+        ${var.varName}="${var.value}"
+        #end
+    fi
     #end
 fi
 #end
@@ -195,28 +184,17 @@
 for ARG in "$@"
 do
     case "$ARG" in
-        "--prefix="*)         prefix=${D}{ARG#--prefix=} ;;
-        "--exec-prefix="*)    exec_prefix=${D}{ARG#--exec-prefix=} ;;
-        "--bindir="*)         bindir=${D}{ARG#----bindir=} ;;
-        "--sbindir="*)        sbindir=${D}{ARG#--sbindir=} ;;
-        "--libdir="*)         libdir=${D}{ARG#--libdir=} ;;
-        "--libexecdir="*)     libexecdir=${D}{ARG#--libexecdir=} ;;
-        "--datarootdir="*)    datarootdir=${D}{ARG#--datarootdir=} ;;
-        "--datadir="*)        datadir=${D}{ARG#--datadir=} ;;
-        "--sysconfdir="*)     sysconfdir=${D}{ARG#--sysconfdir=} ;;
-        "--sharedstatedir="*) sharedstatedir=${D}{ARG#--sharedstatedir=} ;;
-        "--localstatedir="*)  localstatedir=${D}{ARG#--localstatedir=} ;;
-        "--runstatedir="*)    runstatedir=${D}{ARG#--runstatedir=} ;;
-        "--includedir="*)     includedir=${D}{ARG#--includedir=} ;;
-        "--infodir="*)        infodir=${D}{ARG#--infodir=} ;;
-        "--mandir"*)          mandir=${D}{ARG#--mandir} ;;
-        "--localedir"*)       localedir=${D}{ARG#--localedir} ;;
-        "--help"*)            printhelp; abort_configure ;;
-        "--debug")            BUILD_TYPE="debug" ;;
-        "--release")          BUILD_TYPE="release" ;;
+    #foreach( $var in $vars )
+    #if ($var.overridable)
+        "--${var.arg}="*) ${var.varName}=${D}{ARG#--${var.arg}=} ;;
+    #end
+    #end
+        "--help"*) printhelp ;;
+        "--debug") BUILD_TYPE="debug" ;;
+        "--release") BUILD_TYPE="release" ;;
     #foreach( $opt in $options )
         "--${opt.arg}="*) ${opt.varName}=${D}{ARG#--${opt.arg}=} ;;
-        "--${opt.arg}")  echo "option '$ARG' needs a value:"; echo "  $ARG=${opt.valuesString}"; abort_configure ;;
+        "--${opt.arg}") echo "option '$ARG' needs a value:"; echo "  $ARG=${opt.valuesString}"; abort_configure ;;
     #end
     #foreach( $feature in $features )
         "--enable-${feature.arg}") ${feature.varName}=on ;;
@@ -226,6 +204,18 @@
     esac
 done
 
+# toolchain detection utilities
+. make/toolchain.sh
+
+# check languages
+lang_c=
+lang_cpp=
+#foreach( $lang in $languages )
+if detect_${lang}_compiler ; then
+    lang_${lang}=1
+fi
+#end
+
 ## Begin unparsed content. **
 #[[
 
@@ -264,58 +254,49 @@
 : ${mandir:='${datarootdir}/man'}
 : ${localedir:='${datarootdir}/locale'}
 
-# remember the above values and compare them later
-orig_bindir="$bindir"
-orig_sbindir="$sbindir"
-orig_libdir="$libdir"
-orig_libexecdir="$libexecdir"
-orig_datarootdir="$datarootdir"
-orig_datadir="$datadir"
-orig_sysconfdir="$sysconfdir"
-orig_sharedstatedir="$sharedstatedir"
-orig_localstatedir="$localstatedir"
-orig_runstatedir="$runstatedir"
-orig_includedir="$includedir"
-orig_infodir="$infodir"
-orig_mandir="$mandir"
-orig_localedir="$localedir"
 
 # check if a config.site exists and load it
+CONFIG_SITE_OK=0
 if [ -n "$CONFIG_SITE" ]; then
     # CONFIG_SITE may contain space separated file names
     for cs in $CONFIG_SITE; do
         printf "loading defaults from $cs... "
-        . "$cs"
-        echo ok
+        if [ -f "$cs" ]; then
+            . "$cs"
+            echo ok
+            CONFIG_SITE_OK=1
+            break
+        else
+            echo "not found"
+        fi
     done
 elif [ -f "$prefix/share/config.site" ]; then
     printf "loading site defaults... "
     . "$prefix/share/config.site"
     echo ok
+    CONFIG_SITE_OK=1
 elif [ -f "$prefix/etc/config.site" ]; then
     printf "loading site defaults... "
     . "$prefix/etc/config.site"
     echo ok
-else
+    CONFIG_SITE_OK=1
+fi
+
+if [ $CONFIG_SITE_OK -eq 0 ]; then
     # try to detect the correct libdir on our own, except it was changed by the user
-    if test "$libdir" = '${exec_prefix}/lib'; then
-        if [ "$OS" = "SunOS" ]; then
-            test -d "${exec_prefix}/lib/amd64" && libdir='${exec_prefix}/lib/amd64'
-        else
-            # check if the standard libdir even exists
-            if test -d "${exec_prefix}/lib" ; then
-                :
+    if [ "$libdir" = '${exec_prefix}/lib' ] ; then
+        if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then
+            if [ "$OS" = "SunOS" ]; then
+                [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64'
             else
-                # if it does not, maybe a lib32 exists
-                test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32'
+                [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64'
             fi
-            # now check if there is a special 64bit libdir that we should use
-            for i in x86_64 ppc64 s390x aarch64 aarch64_be arm64 ; do
-                if [ $ARCH = $i ]; then
-                    test -d "${exec_prefix}/lib64" && libdir='${exec_prefix}/lib64'
-                    break
-                fi
-            done
+        elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then
+            if [ "$OS" = "SunOS" ]; then
+                [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32'
+            else
+                [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32'
+            fi
         fi
     fi
 fi
@@ -324,42 +305,17 @@
 
 # generate vars.mk
 cat > "$TEMP_DIR/vars.mk" << __EOF__
-prefix=$prefix
-exec_prefix=$exec_prefix
-bindir=$bindir
-sbindir=$sbindir
-libdir=$libdir
-libexecdir=$libexecdir
-datarootdir=$datarootdir
-datadir=$datadir
-sysconfdir=$sysconfdir
-sharedstatedir=$sharedstatedir
-localstatedir=$localstatedir
-runstatedir=$runstatedir
-includedir=$includedir
-infodir=$infodir
-mandir=$mandir
-localedir=$localedir
 #foreach( $var in $vars )
 ${var.varName}=${D}${var.varName}
 #end
 __EOF__
 
-# toolchain detection utilities
-. make/toolchain.sh
 
 #
 # DEPENDENCIES
 #
 
-# check languages
-lang_c=
-lang_cpp=
-#foreach( $lang in $languages )
-if detect_${lang}_compiler ; then
-    lang_${lang}=1
-fi
-#end
+
 
 # create buffer for make variables required by dependencies
 echo > "$TEMP_DIR/make.mk"
@@ -744,7 +700,7 @@
 
 echo "configure finished"
 echo
-echo "Toolchain"
+echo "Toolchain:"
 echo "  name:           $TOOLCHAIN_NAME"
 if [ -n "$TOOLCHAIN_CC" ]; then
     echo "  cc:             $TOOLCHAIN_CC"
@@ -759,51 +715,13 @@
     echo "  default C std:  $TOOLCHAIN_CSTD"
 fi
 echo
-echo "Build Config:"
-echo "  prefix:         $prefix"
-echo "  exec_prefix:    $exec_prefix"
-if [ "$orig_bindir" != "$bindir" ]; then
-    echo "  bindir:      $bindir"
-fi
-if [ "$orig_sbindir" != "$sbindir" ]; then
-    echo "  sbindir:     $sbindir"
-fi
-if [ "$orig_libdir" != "$libdir" ]; then
-    echo "  libdir:         $libdir"
-fi
-if [ "$orig_libexecdir" != "$libexecdir" ]; then
-    echo "  libexecdir:     $libexecdir"
-fi
-if [ "$orig_datarootdir" != "$datarootdir" ]; then
-    echo "  datarootdir:    $datarootdir"
-fi
-if [ "$orig_datadir" != "$datadir" ]; then
-    echo "  datadir:        $datadir"
-fi
-if [ "$orig_sysconfdir" != "$sysconfdir" ]; then
-    echo "  sysconfdir:     $sysconfdir"
-fi
-if [ "$orig_sharedstatedir" != "$sharedstatedir" ]; then
-    echo "  sharedstatedir: $sharedstatedir"
-fi
-if [ "$orig_localstatedir" != "$localstatedir" ]; then
-    echo "  localstatedir:  $localstatedir"
-fi
-if [ "$orig_runstatedir" != "$runstatedir" ]; then
-    echo "  runstatedir:    $runstatedir"
-fi
-if [ "$orig_includedir" != "$includedir" ]; then
-    echo "  includedir:     $includedir"
-fi
-if [ "$orig_infodir" != "$infodir" ]; then
-    echo "  infodir:        $infodir"
-fi
-if [ "$orig_mandir" != "$mandir" ]; then
-    echo "  mandir:         $mandir"
-fi
-if [ "$orig_localedir" != "$localedir" ]; then
-    echo "  localedir:      $localedir"
-fi
+echo "Config:"
+#foreach( $var in $vars )
+#if ($var.overridable)
+    printf '  %-16s' '${var.arg}:'
+    echo "${D}${var.varName}"
+#end
+#end
 #if ( $options.size() > 0 )
 echo
 echo "Options:"
@@ -813,10 +731,11 @@
 echo
 echo "Features:"
 #foreach( $feature in $features )
+printf '  %-16s' '$feature.name:'
 if [ -n "${D}${feature.varName}" ]; then
-echo "  $feature.name: on"
+    echo 'on'
 else
-echo "  $feature.name: off"
+    echo 'off'
 fi
 #end
 #end
--- a/make/install-pc-file.sh	Sat Nov 29 12:10:27 2025 +0100
+++ b/make/install-pc-file.sh	Sun Nov 30 13:29:35 2025 +0100
@@ -1,16 +1,17 @@
 #!/bin/sh
 
-if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] ; then
-  echo "Usage: $0 <version> <libdir> <includedir> [destdir]"
+if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ] ; then
+  echo "Usage: $0 <pkgconfigdir> <version> <libdir> <includedir> [destdir]"
   exit 1
 fi
 
-version="$1"
-libdir="$2"
-includedir="$3"
-destdir="$4"
+pkgconfigdir="$1"
+version="$2"
+libdir="$3"
+includedir="$4"
+destdir="$5"
 
-cat << EOF > "$destdir$libdir/pkgconfig/ucx.pc"
+cat << EOF > "$destdir$pkgconfigdir/ucx.pc"
 libdir=$libdir
 includedir=$includedir
 
--- a/make/makefile.mk	Sat Nov 29 12:10:27 2025 +0100
+++ b/make/makefile.mk	Sun Nov 30 13:29:35 2025 +0100
@@ -69,7 +69,7 @@
 	test -n "$(WITH_CXX_TEST)"
 
 docs: $(build_dir) FORCE
-	@(test "$(WITH_API_DOCS)" = "yes" && cd $(root_dir); $(DOXYGEN) ) \
+	@(test "$(WITH_API_DOCS)" = "yes" && cd $(root_dir) && $(DOXYGEN) ) \
 		|| echo "[ Generation of API Docs disabled - skipped ]"
 
 update-rules: FORCE
--- a/make/project.xml	Sat Nov 29 12:10:27 2025 +0100
+++ b/make/project.xml	Sun Nov 30 13:29:35 2025 +0100
@@ -1,35 +1,31 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="0.4" xmlns="http://unixwork.de/uwproj">
     <config>
+        <prefix/>
+        <exec-prefix/>
+        <libdir/>
+        <includedir/>
+        <var name="VERSION">3.2.0</var>
+        <var name="LIBVERSION">6.0.0</var>
+        <var name="LIBVERSION_MAJOR">6</var>
         <var name="root_dir" exec="true">pwd</var>
-        <var name="DOXYGEN" exec="true">command -v doxygen</var>
+        <var name="build_dir">\${root_dir}/build</var>
+        <var name="docs_dir">\${root_dir}/build/docs</var>
+        <var name="dist_dir">\${root_dir}/dist</var>
+        <var name="DOXYGEN" exec="true" option-help="path of the Doxygen executable">command -v doxygen</var>
+        <var name="MKDIR">/bin/mkdir -p</var>
+        <var name="RMFILE">/bin/rm -f</var>
+        <var name="RMDIR">/bin/rm -f -R</var>
+        <var name="COPYFILE">/bin/cp -f</var>
+        <var name="COPYALL">/bin/cp -f -R</var>
+        <var name="SYMLINK">/bin/ln -s</var>
     </config>
-
-    <dependency>
-        <make>
-            # library version
-            VERSION=3.2.0
-            LIBVERSION=6.0.0
-            LIBVERSION_MAJOR=6
-
-            # build directory structure !! do not change or override !!
-            root_dir=${root_dir}
-            build_dir=${root_dir}/build
-            docs_dir=${root_dir}/build/docs
-            dist_dir=${root_dir}/dist
-        </make>
-    </dependency>
-    
-    <dependency>
-        <make>
-            MKDIR=/bin/mkdir -p
-            RMFILE=/bin/rm -f
-            RMDIR=/bin/rm -f -R
-            COPYFILE=/bin/cp -f
-            COPYALL=/bin/cp -f -R
-            SYMLINK=/bin/ln -s
-        </make>
-    </dependency>
+    <config platform="bsd">
+        <var name="pkgconfigdir">\${exec_prefix}/libdata/pkgconfig</var>
+    </config>
+    <config not="bsd">
+        <var name="pkgconfigdir">\${libdir}/pkgconfig</var>
+    </config>
 
     <dependency platform="macos">
         <lang>c</lang>
@@ -77,7 +73,6 @@
 
     <dependency name="doxygen">
         <test>test -n "$DOXYGEN"</test>
-        <make>DOXYGEN=$DOXYGEN</make>
     </dependency>
 
     <dependency name="coverage" toolchain="gcc">
--- a/make/toolchain.sh	Sat Nov 29 12:10:27 2025 +0100
+++ b/make/toolchain.sh	Sun Nov 30 13:29:35 2025 +0100
@@ -24,7 +24,9 @@
 
 check_c_compiler()
 {
-  if ! command -v "$1" >/dev/null 2>&1 ; then
+  if command -v "$1" >/dev/null 2>&1 ; then
+    :
+  else
     return 1
   fi
   cat > "$TEMP_DIR/test.c" << __EOF__
@@ -55,7 +57,9 @@
 
 check_cpp_compiler()
 {
-  if ! command -v "$1" >/dev/null 2>&1 ; then
+  if command -v "$1" >/dev/null 2>&1 ; then
+    :
+  else
     return 1
   fi
   cat > "$TEMP_DIR/test.cpp" << __EOF__
--- a/make/uwproj.xsd	Sat Nov 29 12:10:27 2025 +0100
+++ b/make/uwproj.xsd	Sun Nov 30 13:29:35 2025 +0100
@@ -29,23 +29,61 @@
             <xs:documentation>
                 <p>
                     The configuration section.
-                    Consists of an arbitrary number of <code>var</code> elements.
+                    Consists of an arbitrary number of <code>var</code> elements and pre-defined elements for
+                    standard installation directories. If you want to use standard installation directories, you
+                    must list the wanted variables here.
                 </p>
                 <p>
                     The optional <code>platform</code> attribute may specify a <em>single</em> platform identifier and
                     the optional <code>not</code> attribute may specify a comma-separated list of platform identifiers.
                     The configure script shall skip this config declaration if the detected platform is not matching
                     the filter specification of these attributes.
+                    When multiple config sections have a matching filter, and declare the same variables, the settings
+                    of the first matching config section will be used for the affected variables.
                 </p>
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
+            <xs:element name="prefix" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="exec-prefix" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="bindir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="sbindir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="libdir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="libexecdir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="datarootdir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="datadir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="sysconfdir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="sharedstatedir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="localstatedir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="runstatedir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="includedir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="infodir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="localedir" type="StandardConfigVarType" minOccurs="0"/>
+            <xs:element name="mandir" type="StandardConfigVarType" minOccurs="0"/>
             <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute name="platform" type="xs:string"/>
         <xs:attribute name="not" type="xs:string"/>
     </xs:complexType>
 
+    <xs:complexType name="StandardConfigVarType">
+        <xs:annotation>
+            <xs:documentation>
+                The definition of a standard configuration variable.
+                <p>
+                    You may customize the value and the help text,
+                    but the variable name and the option name are pre-defined.
+                </p>
+            </xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="option-help" type="xs:string"/>
+                <xs:attribute name="exec" type="xs:boolean" default="false"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
     <xs:complexType name="ConfigVarType">
         <xs:annotation>
             <xs:documentation>
@@ -55,14 +93,23 @@
                     written to the resulting config file (in contrast to make variables, which are only
                     written to the config file).
                     The <code>name</code> attribute is mandatory, the value is defined by the text body of the element.
-                    The optional Boolean <code>exec</code> attribute (false by default) controls, whether the entire
-                    definition is automatically executed under command substitution.
+                    The optional Boolean <code>exec</code> attribute (false by default) controls, whether value denotes
+                    a command which shall be executed at configuration time to produce the value.
+                    With <code>option</code> and <code>option-help</code> you can control how the variable can be
+                    overridden on the command line. When you don't specify either of those attributes, no command
+                    line option will be generated. When you provide a <code>option-help</code>, but do not specify the
+                    <code>option</code> name, a name is generated.
+                    You can use the string <code>%default</code> in your help text when you want to show the default
+                    value in the text. When <code>exec</code> is used, the default will not be resolved in the help
+                    text and instead the command is shown (to avoid breaking the formatting).
                 </p>
             </xs:documentation>
         </xs:annotation>
         <xs:simpleContent>
             <xs:extension base="xs:string">
                 <xs:attribute name="name" type="xs:string" use="required"/>
+                <xs:attribute name="option" type="xs:string"/>
+                <xs:attribute name="option-help" type="xs:string"/>
                 <xs:attribute name="exec" type="xs:boolean" default="false"/>
             </xs:extension>
         </xs:simpleContent>
--- a/src/Makefile	Sat Nov 29 12:10:27 2025 +0100
+++ b/src/Makefile	Sun Nov 30 13:29:35 2025 +0100
@@ -64,7 +64,7 @@
 	$(COPYFILE) $(build_dir)/libucx_static$(STLIB_EXT) $(DESTDIR)$(libdir)/libucx_static$(STLIB_EXT)
 	$(SHELL) "$(INSTALL_LIB)" "$(build_dir)/libucx$(SHLIB_EXT)" "$(libdir)" $(LIBVERSION) $(LIBVERSION_MAJOR) "$(DESTDIR)"
 	$(COPYALL) $(root_dir)/src/cx $(DESTDIR)$(includedir)
-	$(SHELL) "$(root_dir)/make/install-pc-file.sh" "$(VERSION)" "$(libdir)" "$(includedir)" "$(DESTDIR)"
+	$(SHELL) "$(root_dir)/make/install-pc-file.sh" "$(pkgconfigdir)" "$(VERSION)" "$(libdir)" "$(includedir)" "$(DESTDIR)"
 
 FORCE:
 

mercurial