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 ae6a7ca..8f5fa33 100644 (file)
@@ -3,11 +3,12 @@
 
 # 971015 - archname changed from 'djgpp' to 'dos-djgpp'
 # 971210 - threads support
+# 000222 - added -DPERL_EXTERNAL_GLOB to ccflags
 
 archname='dos-djgpp'
 archobjs='djgpp.o'
 path_sep=\;
-startsh="#!sh"
+startsh="#! /bin/sh"
 
 cc='gcc'
 ld='gcc'
@@ -23,12 +24,13 @@ firstmakefile='GNUmakefile'
 exe_ext='.exe'
 
 randbits=31
-
-ln='cp'             # no REAL ln on dos
 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'
@@ -38,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'
 
@@ -54,19 +65,17 @@ sitearch=$sitelib
 eagain='EAGAIN'
 rd_nodata='-1'
 
-: set up the translation script tr
-
-cat > UU/tr <<EOSC
-$startsh
-case "\$1\$2" in
-'[A-Z][a-z]') exec tr.exe '[:upper:]' '[:lower:]';;
-'[a-z][A-Z]') exec tr.exe '[:lower:]' '[:upper:]';;
+# 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
-exec tr.exe "\$@"
-EOSC
-
-if [ "X$usethreads" = "X$define" ]; then
-    set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'`
-    shift
-    libswanted="$*"
-fi
+EOCBU
+
+useperlio='undef'
+uselargefiles='undef'