src/main/resources/make/configure.vm

changeset 168
4cd9757c1ad9
parent 167
fa31a6d0ec56
child 169
a85cb6c4275d
--- a/src/main/resources/make/configure.vm	Sat Nov 29 18:11:18 2025 +0100
+++ b/src/main/resources/make/configure.vm	Sun Nov 30 10:14:33 2025 +0100
@@ -206,6 +206,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. **
 #[[
 
@@ -244,6 +256,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
@@ -264,7 +277,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
@@ -273,13 +286,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
@@ -293,21 +308,12 @@
 #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"

mercurial