test/configure

changeset 168
4cd9757c1ad9
parent 167
fa31a6d0ec56
child 169
a85cb6c4275d
--- a/test/configure	Sat Nov 29 18:11:18 2025 +0100
+++ b/test/configure	Sun Nov 30 10:14:33 2025 +0100
@@ -194,6 +194,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
@@ -231,6 +244,7 @@
 : ${mandir:='${datarootdir}/man'}
 : ${localedir:='${datarootdir}/locale'}
 
+
 # check if a config.site exists and load it
 if [ -n "$CONFIG_SITE" ]; then
     # CONFIG_SITE may contain space separated file names
@@ -251,7 +265,7 @@
     # 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/64" && libdir='${exec_prefix}/lib/64'
+            test -d "${exec_prefix}/lib/64" && test "$TOOLCHAIN_WSIZE" = "64" && libdir='${exec_prefix}/lib/64'
         else
             # check if the standard libdir even exists
             if test -d "${exec_prefix}/lib" ; then
@@ -260,13 +274,15 @@
                 # if it does not, maybe a lib32 exists
                 test -d "${exec_prefix}/lib32" && libdir='${exec_prefix}/lib32'
             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
+            if [ "$TOOLCHAIN_WSIZE" = "64" ]; then
+                # 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
+            fi
         fi
     fi
 fi
@@ -280,22 +296,12 @@
 HOST=$HOST
 __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"

mercurial