This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Scratch #3008 and introduce $crosscompile and $multiarch
[perl5.git] / hints / os2.sh
index 58086c5..5365522 100644 (file)
@@ -250,15 +250,6 @@ nm_opt='-p'
 d_getprior='define'
 d_setprior='define'
 
-if [ "X$usethreads" = "X$define" ]; then
-    ccflags="-Zmt $ccflags"
-    cppflags="-Zmt $cppflags"  # Do we really need to set this?
-    aout_ccflags="-DUSE_THREADS $aout_ccflags"
-    aout_cppflags="-DUSE_THREADS $aout_cppflags"
-    aout_lddlflags="-Zmt $aout_lddlflags"
-    aout_ldflags="-Zmt $aout_ldflags"
-fi
-
 # The next two are commented. pdksh handles #!, extproc gives no path part.
 # sharpbang='extproc '
 # shsharp='false'
@@ -270,6 +261,21 @@ fi
 
 cp ./README.os2 ./pod/perlos2.pod
 
+# This script UU/usethreads.cbu will get 'called-back' by Configure 
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+       ccflags="-Zmt $ccflags"
+        cppflags="-Zmt $cppflags"  # Do we really need to set this?
+        aout_ccflags="-DUSE_THREADS $aout_ccflags"
+        aout_cppflags="-DUSE_THREADS $aout_cppflags"
+        aout_lddlflags="-Zmt $aout_lddlflags"
+        aout_ldflags="-Zmt $aout_ldflags"
+       ;;
+esac
+EOCBU
+
 # Now install the external modules. We are in the ./hints directory.
 
 cd ./os2/OS2
@@ -298,6 +304,5 @@ for xxx in * ; do
        fi
 done
 
-
 # Now go back
 cd ../..