This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge branch 'Add script_run feature' into blead
[perl5.git] / hints / dos_djgpp.sh
index 73bae63..8f5fa33 100644 (file)
@@ -3,6 +3,7 @@
 
 # 971015 - archname changed from 'djgpp' to 'dos-djgpp'
 # 971210 - threads support
+# 000222 - added -DPERL_EXTERNAL_GLOB to ccflags
 
 archname='dos-djgpp'
 archobjs='djgpp.o'
@@ -27,6 +28,9 @@ lns='cp'
 
 usenm='true'
 
+# this reportedly causes compile errors in system includes
+i_ieeefp='undef'
+
 d_link='undef'      # these are empty functions in libc.a
 d_symlink='undef'
 d_fork='undef'
@@ -36,10 +40,19 @@ startperl='#!perl'
 
 case "X$optimize" in
   X)
-       optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+       case `gcc -v 2>&1|grep "gcc version"` in
+       "gcc version 1."*|"gcc version 2."*)
+         optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;;
+       *)
+         optimize="-O2 -falign-loops=2 -falign-jumps=2 -falign-functions=2" ;;
+       esac
+       ldflags='-s'
+       ;;
+  X*)
+       ldflags=' '
        ;;
 esac
-ldflags='-s'
+ccflags="$ccflags -DPERL_EXTERNAL_GLOB"
 usemymalloc='n'
 timetype='time_t'
 
@@ -52,8 +65,17 @@ sitearch=$sitelib
 eagain='EAGAIN'
 rd_nodata='-1'
 
-if [ "X$usethreads" = "X$define" ]; then
-    set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
-    shift
-    libswanted="$*"
-fi
+# 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]*)
+        set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
+        shift
+        libswanted="$*"
+       ;;
+esac
+EOCBU
+
+useperlio='undef'
+uselargefiles='undef'