summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-09-06 20:21:43 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-09-06 20:21:43 +0000
commitbaf1cb1df0b1d8b9315d5abdcf60b88c04686b78 (patch)
tree81562dd41298843f0df75065cb3f065a9ca253d2
parenta524b0119187f09f76273f30b44de05b8ffa799a (diff)
downloadperl-baf1cb1df0b1d8b9315d5abdcf60b88c04686b78.tar.gz
Copy the Configure hint files from bleadperl.
p4raw-id: //depot/maint-5.6/perl-5.6.2@21059
-rw-r--r--MANIFEST5
-rw-r--r--hints/README.hints81
-rw-r--r--hints/aix.sh316
-rw-r--r--hints/amigaos.sh7
-rw-r--r--hints/apollo.sh2
-rw-r--r--hints/atheos.sh35
-rw-r--r--hints/beos.sh23
-rw-r--r--hints/bsdos.sh1
-rwxr-xr-xhints/cygwin.sh9
-rw-r--r--hints/darwin.sh207
-rw-r--r--hints/dec_osf.sh199
-rw-r--r--hints/dgux.sh207
-rw-r--r--hints/dos_djgpp.sh10
-rw-r--r--hints/dynixptx.sh2
-rw-r--r--hints/epix.sh2
-rw-r--r--hints/freebsd.sh47
-rwxr-xr-xhints/hpux.sh894
-rw-r--r--hints/irix_5.sh19
-rw-r--r--hints/irix_6.sh435
-rw-r--r--hints/isc.sh2
-rw-r--r--hints/isc_2.sh2
-rw-r--r--hints/linux.sh124
-rwxr-xr-xhints/machten.sh2
-rw-r--r--hints/machten_2.sh2
-rw-r--r--hints/mpeix.sh36
-rw-r--r--hints/netbsd.sh155
-rw-r--r--hints/newsos4.sh2
-rw-r--r--hints/next_3.sh2
-rw-r--r--hints/nonstopux.sh3
-rw-r--r--hints/openbsd.sh74
-rwxr-xr-xhints/os2.sh173
-rw-r--r--hints/os390.sh26
-rw-r--r--hints/os400.sh24
-rwxr-xr-xhints/posix-bc.sh145
-rw-r--r--hints/powerux.sh180
-rw-r--r--hints/qnx.sh295
-rw-r--r--hints/rhapsody.sh106
-rw-r--r--hints/sco.sh2
-rw-r--r--hints/solaris_2.sh224
-rw-r--r--hints/sunos_4_1.sh13
-rw-r--r--hints/super-ux.sh20
-rw-r--r--hints/svr4.sh7
-rw-r--r--hints/svr5.sh22
-rw-r--r--hints/t001.c90
-rw-r--r--hints/titanos.sh2
-rw-r--r--hints/ultrix_4.sh8
-rw-r--r--hints/umips.sh2
-rw-r--r--hints/unicos.sh34
-rw-r--r--hints/unicosmk.sh18
-rw-r--r--hints/utekv.sh2
-rw-r--r--hints/uts.sh36
-rw-r--r--hints/uwin.sh139
-rw-r--r--hints/vmesa.sh3
-rw-r--r--hints/vos.sh147
54 files changed, 3519 insertions, 1104 deletions
diff --git a/MANIFEST b/MANIFEST
index 899784006d..f1d8151757 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -400,6 +400,7 @@ hints/aix.sh Hints for named architecture
hints/altos486.sh Hints for named architecture
hints/amigaos.sh Hints for named architecture
hints/apollo.sh Hints for named architecture
+hints/atheos.sh Hints for named architecture
hints/aux_3.sh Hints for named architecture
hints/beos.sh Hints for named architecture
hints/broken-db.msg Warning message for systems with broken DB library
@@ -449,6 +450,7 @@ hints/openbsd.sh Hints for named architecture
hints/opus.sh Hints for named architecture
hints/os2.sh Hints for named architecture
hints/os390.sh Hints for named architecture
+hints/os400.sh Hints for named architecture
hints/posix-bc.sh Hints for named architecture
hints/powerux.sh Hints for named architecture
hints/qnx.sh Hints for named architecture
@@ -464,8 +466,10 @@ hints/solaris_2.sh Hints for named architecture
hints/stellar.sh Hints for named architecture
hints/sunos_4_0.sh Hints for named architecture
hints/sunos_4_1.sh Hints for named architecture
+hints/super-ux.sh Hints for named architecture
hints/svr4.sh Hints for named architecture
hints/svr5.sh Hints for named architecture
+hints/t001.c Test case for gcc bug
hints/ti1500.sh Hints for named architecture
hints/titanos.sh Hints for named architecture
hints/ultrix_4.sh Hints for named architecture
@@ -477,6 +481,7 @@ hints/utekv.sh Hints for named architecture
hints/uts.sh Hints for named architecture
hints/uwin.sh Hints for named architecture
hints/vmesa.sh Hints for named architecture
+hints/vos.sh Hints for named architecture
hv.c Hash value code
hv.h Hash value header
INSTALL Detailed installation instructions
diff --git a/hints/README.hints b/hints/README.hints
index 0666771952..9b49a398bc 100644
--- a/hints/README.hints
+++ b/hints/README.hints
@@ -103,6 +103,70 @@ In general, try to avoid hard-wiring something that Configure will
figure out anyway. Also try to allow for Configure command-line
overrides.
+=head1 Working around compiler bugs
+
+Occasionally, the root cause of a bug in perl turns out to be due to a bug
+in the compiler. Often, changing the compilation options (particularly the
+optimization level) can work around the bug. However, if you try to do
+this on the command line, you will be changing the compilation options for
+every component of perl, which can really hurt perl's performance.
+Instead, consider placing a test case into the hints directory to detect
+whether the compiler bug is present, and add logic to the hints file to
+take a specific and appropriate action
+
+=head2 Test-case conventions
+
+Test cases should be named "tNNN.c", where NNN is the next unused sequence
+number. The test case must be executable and should display a message
+containing the word "fails" when the compiler bug is present. It should
+display the word "works" with the compiler bug is not present. The test
+cases should be liberally commented and may be used by any hints file that
+needs them. See the first hints file (t001.c) for an example.
+
+=head2 Hint file processing
+
+The hint file must define a call-back unit (see below) that will compile,
+link, and run the test case, and then check for the presence of the string
+"fails" in the output. If it finds this string, it sets a special variable
+to specify the compilation option(s) for the specific perl source file that
+is affected by the bug.
+
+The special variable is named "XXX_cflags" where "XXX" is the name of
+the source file (without the ".c" suffix). The value of this variable
+is the string "optimize=YYY", where "YYY" is the compilation option
+necessary to work around the bug. The default value of this variable
+is "-O" (letter O), which specifies that the C compiler should compile
+the source program at the default optimization level. If you can
+avoid the compiler bug by disabling optimization, just reset the
+"optimize" variable to the null string. Sometimes a bug is present at
+a higher optimization level (say, O3) and not present at a lower
+optimization level (say, O1). In this case, you should specify the
+highest optimization level at which the bug is not present, so that
+you will retain as many of the benefits of code optimization as
+possible.
+
+For example, if the pp_pack.c source file must be compiled at
+optimization level 0 to work around a problem on a particular
+platform, one of the statements
+
+ pp_pack_cflags="optimize=-O0" or
+ pp_pack_cflags="optimize="
+
+will do the trick, since level 0 is equivalent to no optimization.
+(In case your printer or display device does not distinguish the
+letter O from the digit 0, that is the letter O followed by the digit
+0). You can specify any compiler option or set of options here, not
+just optimizer options. These options are appended to the list of all
+other compiler options, so you should be able to override almost any
+compiler option prepared by Configure. (Obviously this depends on how
+the compiler treats conflicting options, but most seem to go with the
+last value specified on the command line).
+
+You should also allow for the XXX_cflags variable to be overridden on the
+command line.
+
+See the vos.sh hints file for an extended example of these techniques.
+
=head1 Hint file tricks
=head2 Printing critical messages
@@ -209,16 +273,10 @@ aix 4.1.1.
=over 4
-=item Warning
-
-All of the following is experimental and subject to change. But it
-probably won't change much. :-)
-
=item Compiler-related flags
The settings of some things, such as optimization flags, may depend on
-the particular compiler used. For example, for ISC we have the
-following:
+the particular compiler used. For example, consider the following:
case "$cc" in
*gcc*) ccflags="$ccflags -posix"
@@ -239,7 +297,11 @@ be circumvented by the use of "call-back units". That is, the hints
file can tuck this information away into a file UU/cc.cbu. Then,
after Configure prompts the user for the C compiler, it will load in
and run the UU/cc.cbu "call-back" unit. See hints/solaris_2.sh for an
-example.
+example. Some callbacks exist for other variables than cc, such as for
+uselongdouble. At the present time, these callbacks are only called if the
+variable in question is defined; however, this may change, so the scheme in
+hints/solaris_2.sh of checking to see if uselongdouble is defined is a good
+idea.
=item Future status
@@ -256,4 +318,5 @@ say things like "sh Configure -Dcc=gcc -Dusethreads" on the command line.
Have the appropriate amount of fun :-)
- Andy Dougherty doughera@lafayette.edu
+ Andy Dougherty doughera@lafayette.edu (author)
+ Paul Green paul.green@stratus.com (compiler bugs)
diff --git a/hints/aix.sh b/hints/aix.sh
index 25a15e4979..04eba5237f 100644
--- a/hints/aix.sh
+++ b/hints/aix.sh
@@ -5,7 +5,7 @@
# Jarkko Hietaniemi <jhi@iki.fi>.
# AIX 4.3.x LP64 build by Steven Hirsch <hirschs@btv.ibm.com>
# Merged on Mon Feb 6 10:22:35 EST 1995 by
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
#
# Contact dfavor@corridor.com for any of the following:
@@ -51,13 +51,21 @@ esac
# Intuiting the existence of system calls under AIX is difficult,
# at best; the safest technique is to find them empirically.
-# AIX 4.3.* and above default to using nm for symbol extraction
+# AIX 4.3.* and above default to letting Configure test if nm
+# extraction will work.
case "$osvers" in
3.*|4.1.*|4.2.*)
- usenm='undef'
+ case "$usenm" in
+ '') usenm='undef'
+ esac
+ case "$usenativedlopen" in
+ '') usenativedlopen='false'
+ esac
;;
*)
- usenm='true'
+ case "$usenativedlopen" in
+ '') usenativedlopen='true'
+ esac
;;
esac
@@ -113,7 +121,7 @@ case "$osvers" in
ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
case "$cc" in
*gcc*) ;;
- *) ccflags="$ccflags -qmaxmem=16384" ;;
+ *) ccflags="$ccflags -qmaxmem=16384 -qnoansialias" ;;
esac
nm_opt='-B'
;;
@@ -126,43 +134,155 @@ d_setreuid='undef'
# Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com>
#
# Tell perl which symbols to export for dynamic linking.
+cccdlflags='none' # All AIX code is position independent
+ cc_type=xlc # do not export to config.sh
case "$cc" in
-*gcc*) ccdlflags='-Xlinker' ;;
-*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | awk '{print $2}'`
+*gcc*)
+ cc_type=gcc
+ ccdlflags='-Xlinker'
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//`
+ fi
+ ;;
+*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -v '\.msg\.[A-Za-z_]*\.' | awk '{print $1,$2}'`
case "$ccversion" in
+ '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$'`
+ ;;
+ *.*.*.*.*.*.*) # Ahhrgg, more than one C compiler installed
+ first_cc_path=`which ${cc:-cc}`
+ case "$first_cc_path" in
+ *vac*)
+ cc_type=vac ;;
+ /usr/bin/cc) # Check the symlink
+ if [ -h $first_cc_path ] ; then
+ ls -l $first_cc_path > reflect
+ if grep -i vac reflect >/dev/null 2>&1 ; then
+ cc_type=vac
+ fi
+ rm -f reflect
+ fi
+ ;;
+ esac
+ ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -i $cc_type | head -1`
+ ;;
+ vac*.*.*.*)
+ cc_type=vac
+ ;;
+ esac
+ ccversion=`echo "$ccversion" | awk '{print $2}'`
+ case "$ccversion" in
+ 3.6.6.0)
+ optimize='none'
+ ;;
4.4.0.0|4.4.0.1|4.4.0.2)
- echo >&4 "*** This C compiler ($ccversion) is outdated."
- echo >&4 "*** Please upgrade to at least 4.4.0.3."
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is outdated.
+***
+*** Please upgrade to at least 4.4.0.3.
+***
+EOF
+ ;;
+ 5.0.0.0)
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is known to have too many optimizer
+*** bugs to compile a working Perl.
+***
+*** Consider upgrading your C compiler, or getting the GNU cc (gcc).
+***
+*** Cannot continue, aborting.
+EOF
+ exit 1
+ ;;
+ 5.0.1.0)
+ cat >&4 <<EOF
+***
+*** This C compiler ($ccversion) is known to have optimizer problems
+*** when compiling regcomp.c.
+***
+*** Disabling optimization for that file but consider upgrading
+*** your C compiler.
+***
+EOF
+regcomp_cflags='optimize='
;;
esac
esac
# the required -bE:$installarchlib/CORE/perl.exp is added by
# libperl.U (Configure) later.
-case "$ldlibpthname" in
-'') ldlibpthname=LIBPATH ;;
-esac
-
# The first 3 options would not be needed if dynamic libs. could be linked
# with the compiler instead of ld.
# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
# -bE:$(BASEEXT).exp Export these symbols. This file contains only one
# symbol: boot_$(EXP) can it be auto-generated?
case "$osvers" in
-3*)
- lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc"
- ;;
-*)
- lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -b noentry -lc"
- ;;
+ 3*)
+ lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc"
+ ;;
+ *)
+ lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -bnoentry -lc"
+ ;;
+ esac
+
+case "$use64bitall" in
+ $define|true|[yY]*) use64bitint="$define" ;;
+ esac
+
+case "$usemorebits" in
+ $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
+ esac
+
+case $cc_type in
+ vac|xlc)
+ case "$uselongdouble" in
+ $define|true|[yY]*)
+ ccflags="$ccflags -qlongdouble"
+ libswanted="c128 $libswanted"
+ lddlflags=`echo "$lddlflags " | sed -e 's/ -lc / -lc128 -lc /'`
+ ;;
+ esac
+ esac
+
+case "$cc" in
+*gcc*) ;;
+cc*|xlc*) # cc should've been set by line 116 or so if empty.
+ if test ! -x /usr/bin/$cc -a -x /usr/vac/bin/$cc; then
+ case ":$PATH:" in
+ *:/usr/vac/bin:*) ;;
+ *) if test ! -x /QOpenSys/usr/bin/$cc; then
+ # The /QOpenSys/usr/bin/$cc saves us if we are
+ # building natively in OS/400 PASE.
+ cat >&4 <<EOF
+
+***
+*** You either implicitly or explicitly specified an IBM C compiler,
+*** but you do not seem to have one in /usr/bin, but you seem to have
+*** the VAC installed in /usr/vac, but you do not have the /usr/vac/bin
+*** in your PATH. I suggest adding that and retrying Configure.
+***
+EOF
+ exit 1
+ fi
+ ;;
+ esac
+ fi
+ ;;
esac
+
+case "$ldlibpthname" in
+'') ldlibpthname=LIBPATH ;;
+esac
+
# AIX 4.2 (using latest patchlevels on 20001130) has a broken bind
# library (getprotobyname and getprotobynumber are outversioned by
# the same calls in libc, at least for xlc version 3...
case "`oslevel`" in
- 4.2.1.*) # Test for xlc version too, should we?
+ 4.2.1.*)
case "$ccversion" in # Don't know if needed for gcc
- 3.1.4.*) # libswanted "bind ... c ..." => "... c bind ..."
+ 3.1.4.*|5.0.2.*) # libswanted "bind ... c ..." => "... c bind ..."
set `echo X "$libswanted "| sed -e 's/ bind\( .*\) \([cC]\) / \1 \2 bind /'`
shift
libswanted="$*"
@@ -178,7 +298,21 @@ case "$usethreads" in
$define|true|[yY]*)
ccflags="$ccflags -DNEED_PTHREAD_INIT"
case "$cc" in
- gcc) ;;
+ *gcc*)
+ ccflags="-D_THREAD_SAFE $ccflags"
+ echo "GCC $gccversion disabling some _r functions" >&4
+ case "$gccversion" in
+ 3*) d_drand48_r='undef'
+ d_endgrent_r='undef'
+ d_endpwent_r='undef'
+ d_getgrent_r='undef'
+ d_getpwent_r='undef'
+ d_random_r='undef'
+ d_srand48_r='undef'
+ d_strerror_r='undef'
+ ;;
+ esac
+ ;;
cc_r) ;;
cc|xl[cC]_r)
echo >&4 "Switching cc to cc_r because of POSIX threads."
@@ -186,6 +320,10 @@ $define|true|[yY]*)
# (e.g. pragma/overload core dumps) Let's suspect xlC_r, too.
# --jhi@iki.fi
cc=cc_r
+
+ case "`oslevel`" in
+ 4.2.1.*) i_crypt='undef' ;;
+ esac
;;
'')
cc=cc_r
@@ -210,11 +348,11 @@ EOM
lddlflags="$*"
# Insert pthreads to libswanted, before any libc or libC.
- set `echo X "$libswanted "| sed -e 's/ \([cC]\) / pthreads \1 /'`
+ set `echo X "$libswanted "| sed -e 's/ \([cC]_r\) / pthreads \1 /'`
shift
libswanted="$*"
# Insert pthreads to lddlflags, before any libc or libC.
- set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]\) / -lpthreads \1 /'`
+ set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]_r\) / -lpthreads \1 /'`
shift
lddlflags="$*"
@@ -227,9 +365,17 @@ EOCBU
cat > UU/uselargefiles.cbu <<'EOCBU'
case "$uselargefiles" in
''|$define|true|[yY]*)
+ # Configure should take care of use64bitint and use64bitall being
+ # defined before uselargefiles.cbu is consulted.
+ if test X"$use64bitint:$quadtype" = X"$define:long" -o X"$use64bitall" = Xdefine; then
+# Keep these at the left margin.
+ccflags_uselargefiles="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
+ldflags_uselargefiles="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ else
# Keep these at the left margin.
ccflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`"
ldflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`"
+ fi
# _Somehow_ in AIX 4.3.1.0 the above getconf call manages to
# insert(?) *something* to $ldflags so that later (in Configure) evaluating
# $ldflags causes a newline after the '-b64' (the result of the getconf).
@@ -241,8 +387,13 @@ ldflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`"
# Therefore the line re-evaluating ldflags_uselargefiles: it seems to fix
# the whatever it was that AIX managed to break. --jhi
ldflags_uselargefiles="`echo $ldflags_uselargefiles`"
+ if test X"$use64bitint:$quadtype" = X"$define:long" -o X"$use64bitall" = Xdefine; then
+# Keep this at the left margin.
+libswanted_uselargefiles="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+ else
# Keep this at the left margin.
libswanted_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`"
+ fi
case "$ccflags_uselargefiles$ldflags_uselargefiles$libs_uselargefiles" in
'');;
*) ccflags="$ccflags $ccflags_uselargefiles"
@@ -252,20 +403,18 @@ libswanted_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@
esac
case "$gccversion" in
'') ;;
- *)
- cat >&4 <<EOM
-
-*** Warning: gcc in AIX might not work with the largefile support of Perl
-*** (default since 5.6.0), this combination hasn't been tested.
-*** I will try, though.
-
-EOM
- # Remove xlc-spefific -qflags.
- ccflags="`echo $ccflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"
- ldflags="`echo $ldflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"
- echo >&4 "(using ccflags $ccflags)"
- echo >&4 "(using ldflags $ldflags)"
- ;;
+ *) # Remove xlc-spefific -qflags.
+ ccflags="`echo $ccflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"
+ ldflags="`echo $ldflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`"
+ # Move xld-spefific -bflags.
+ ccflags="`echo $ccflags | sed -e 's@ -b@ -Wl,-b@g'`"
+ ldflags="`echo ' '$ldflags | sed -e 's@ -b@ -Wl,-b@g'`"
+ lddlflags="`echo ' '$lddlflags | sed -e 's@ -b@ -Wl,-b@g'`"
+ ld='gcc'
+ echo >&4 "(using ccflags $ccflags)"
+ echo >&4 "(using ldflags $ldflags)"
+ echo >&4 "(using lddlflags $lddlflags)"
+ ;;
esac
;;
esac
@@ -378,9 +527,6 @@ EOM
''|64*) archname64=64all ;;
esac
longsize="8"
- # Don't try backwards compatibility
- bincompat="$undef"
- d_bincompat5005="$undef"
qacflags=''
qaldflags=''
qalibs=''
@@ -389,36 +535,66 @@ EOM
esac
EOCBU
-cat > UU/uselongdouble.cbu <<'EOCBU'
-# This script UU/uselongdouble.cbu will get 'called-back' by Configure
-# after it has prompted the user for whether to use long doubles.
-case "$uselongdouble" in
-$define|true|[yY]*)
- case "$cc" in
- *gcc*) ;;
- *) ccflags="$ccflags -qlongdouble" ;;
- esac
- # The explicit cc128, xlc128, xlC128 are not needed,
- # the -qlongdouble should do the trick. --jhi
- d_Gconvert='sprintf((b),"%.*llg",(n),(x))'
+if test $usenativedlopen = 'true'
+then
+ ccflags="$ccflags -DUSE_NATIVE_DLOPEN"
+ case "$cc" in
+ *gcc*) ldflags="$ldflags -Wl,-brtl" ;;
+ *) ldflags="$ldflags -brtl" ;;
+ esac
+else
+ case `oslevel` in
+ 4.2.*) ;; # libC_r has broke gettimeofday
+ *) # If the C++ libraries, libC and libC_r, are available we will
+ # prefer them over the vanilla libc, because the libC contain
+ # loadAndInit() and terminateAndUnload() which work correctly
+ # with C++ statics while libc load() and unload() do not. See
+ # ext/DynaLoader/dl_aix.xs. The C-to-C_r switch is done by
+ # usethreads.cbu, if needed.
+ if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then
+ # Cify libswanted.
+ set `echo X "$libswanted "| sed -e 's/ c / C c /'`
+ shift
+ libswanted="$*"
+ # Cify lddlflags.
+ set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'`
+ shift
+ lddlflags="$*"
+ fi
+ esac
+fi
+
+case "$PASE" in
+define)
+ case "$prefix" in
+ '') prefix=/QOpenSys/perl ;;
+ esac
+ cat >&4 <<EOF
+
+***
+*** You seem to be compiling in AIX for the OS/400 PASE environment.
+*** I'm not going to use the AIX bind, nsl, and possible util libraries, then.
+*** I'm also not going to install perl as /usr/bin/perl.
+*** Perl will be installed under $prefix.
+*** For instructions how to install this build from AIX to PASE,
+*** see the file README.os400. Accept the "aix" for the question
+*** about "Operating system name".
+***
+EOF
+ set `echo " $libswanted " | sed -e 's@ bind @ @' -e 's@ nsl @ @' -e 's@ util @ @'`
+ shift
+ libswanted="$*"
+ installusrbinperl="$undef"
+
+ # V5R1 doesn't have this (V5R2 does), without knowing
+ # which one we have it's safer to be pessimistic.
+ # Cwd will work fine even without fchdir(), but if
+ # V5R1 tries to use code compiled assuming fchdir(),
+ # lots of grief will issue forth from Cwd.
+ case "$d_fchdir" in
+ '') d_fchdir="$undef" ;;
+ esac
;;
esac
-EOCBU
-
-# If the C++ libraries, libC and libC_r, are available we will prefer them
-# over the vanilla libc, because the libC contain loadAndInit() and
-# terminateAndUnload() which work correctly with C++ statics while libc
-# load() and unload() do not. See ext/DynaLoader/dl_aix.xs.
-# The C-to-C_r switch is done by usethreads.cbu, if needed.
-if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then
- # Cify libswanted.
- set `echo X "$libswanted "| sed -e 's/ c / C c /'`
- shift
- libswanted="$*"
- # Cify lddlflags.
- set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'`
- shift
- lddlflags="$*"
-fi
# EOF
diff --git a/hints/amigaos.sh b/hints/amigaos.sh
index fff55b082c..c5ba6ff591 100644
--- a/hints/amigaos.sh
+++ b/hints/amigaos.sh
@@ -7,13 +7,11 @@ archname='m68k-amigaos'
cc='gcc'
firstmakefile='GNUmakefile'
usenm='true'
+d_fork='undef' # available but ENOSYS
usemymalloc='n'
-usevfork='true'
useperlio='true'
d_eofnblk='define'
-d_fork='undef'
-d_vfork='define'
groupstype='int'
# libs
@@ -26,11 +24,12 @@ xlibpth="$libpth"
# to just these few. E.g. what about Berkeley DB?
libswanted='gdbm m dld'
so=' '
+libs='-lm'
# compiler & linker flags
# Respect command-line values.
-ccflags="$ccflags -DAMIGAOS -mstackextend"
+ccflags="$ccflags -DAMIGAOS"
case "$optimize" in
'') optimize='-O2 -fomit-frame-pointer';;
esac
diff --git a/hints/apollo.sh b/hints/apollo.sh
index 05f433dfc1..9b88a9307a 100644
--- a/hints/apollo.sh
+++ b/hints/apollo.sh
@@ -1,5 +1,5 @@
# Info from Johann Klasek <jk@auto.tuwien.ac.at>
-# Merged by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Merged by Andy Dougherty <doughera@lafayette.edu>
# Last revised Tue Mar 16 19:12:22 EET 1999 by
# Jarkko Hietaniemi <jhi@iki.fi>
diff --git a/hints/atheos.sh b/hints/atheos.sh
new file mode 100644
index 0000000000..c3acdbb910
--- /dev/null
+++ b/hints/atheos.sh
@@ -0,0 +1,35 @@
+# AtheOS hints file ( http://www.atheos.cx/ )
+# Kurt Skauen, kurt@atheos.cx
+
+prefix="/usr/perl5"
+
+libpth='/system/libs /usr/lib'
+usrinc='/include'
+
+libs=' '
+
+d_htonl='define'
+d_htons='define'
+d_ntohl='define'
+d_ntohs='define'
+
+d_locconv='undef'
+
+# POSIX and BSD functions are scattered over several non-standard libraries
+# in AtheOS, so I figured it would be safer to let the linker figure out
+# which symbols are available.
+
+usenm='false'
+
+# Hopefully, the native malloc knows better than perl's.
+usemymalloc='n'
+
+# AtheOS native FS does not support hard-links, but link() is defined
+# (for other FS's).
+
+d_link='undef'
+dont_use_nlink='define'
+
+ld='gcc'
+cc='gcc'
+
diff --git a/hints/beos.sh b/hints/beos.sh
index 8017dce9cc..25b99a1f16 100644
--- a/hints/beos.sh
+++ b/hints/beos.sh
@@ -38,20 +38,25 @@ d_syserrlst='undef'
# the array syserrlst[] is useless for the most part.
# large negative numbers really kind of suck in arrays.
-d_socket='undef'
-d_gethbyaddr='undef'
-d_gethbyname='undef'
-d_getsbyname='undef'
+# Sockets didn't use to be real sockets but BONE changes this.
+# How does one test for BONEness?
+if [ ! -f /some/bone/file.h ]; then
+ d_socket='undef'
+ d_gethbyaddr='undef'
+ d_gethbyname='undef'
+ d_getsbyname='undef'
+fi
ld='gcc'
-# Sockets really don't work with the current version of perl and the
-# current BeOS sockets; I suspect that a new module a la GSAR's WIN32 port
-# will be required.
-# Of course, this may also change with R5.
-
export PATH="$PATH:$PWD/beos"
case "$ldlibpthname" in
'') ldlibpthname=LIBRARY_PATH ;;
esac
+
+# the waitpid() wrapper
+archobjs="beos.o"
+test -f beos.c || cp beos/beos.c .
+
+
diff --git a/hints/bsdos.sh b/hints/bsdos.sh
index 58755434a3..f16a56efc7 100644
--- a/hints/bsdos.sh
+++ b/hints/bsdos.sh
@@ -98,7 +98,6 @@ case "$osvers" in
case "$cc" in
'') cc='cc' # cc is gcc2 in 4.0
cccdlflags="-fPIC"
- ccdlflags="-rdynamic -Wl,-rpath,$privlib/$archname/CORE"
;;
esac
diff --git a/hints/cygwin.sh b/hints/cygwin.sh
index c57d3f6fdf..b075b5c121 100755
--- a/hints/cygwin.sh
+++ b/hints/cygwin.sh
@@ -23,7 +23,10 @@ so='dll'
libswanted=`echo " $libswanted " | sed -e 's/ c / /g'`
# - eliminate -lm, symlink to libcygwin.a
libswanted=`echo " $libswanted " | sed -e 's/ m / /g'`
-libswanted="$libswanted cygipc"
+# - add libgdbm_compat $libswanted
+# - libcygipc doesn't work much at all with
+# the Perl SysV IPC tests so not adding it --jhi 2003-08-09
+libswanted="$libswanted gdbm_compat"
test -z "$optimize" && optimize='-O2'
ccflags="$ccflags -DPERL_USE_SAFE_PUTENV"
# - otherwise i686-cygwin
@@ -34,10 +37,6 @@ archname='cygwin'
cccdlflags=' '
ld='ld2'
-# optional(ish)
-# - perl malloc needs to be unpolluted
-bincompat5005='undef'
-
# Win9x problem with non-blocking read from a closed pipe
d_eofnblk='define'
diff --git a/hints/darwin.sh b/hints/darwin.sh
index 8625798d53..6d2c11244a 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -1,26 +1,59 @@
##
# Darwin (Mac OS) hints
-# Wilfredo Sanchez <wsanchez@apple.com>
+# Wilfredo Sanchez <wsanchez@wsanchez.net>
##
##
# Paths
##
-# BSD paths
-prefix='/usr';
-siteprefix='/usr/local';
-vendorprefix='/usr/local'; usevendorprefix='define';
+# Configure hasn't figured out the version number yet. Bummer.
+perl_revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $src/patchlevel.h`
+perl_version=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h`
+perl_subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
+version="${perl_revision}.${perl_version}.${perl_subversion}"
-# 4BSD uses /usr/share/man, not /usr/man.
-# Don't put man pages in /usr/lib; that's goofy.
-man1dir='/usr/share/man/man1';
-man3dir='/usr/share/man/man3';
+# This was previously used in all but causes three cases
+# (no -Ddprefix=, -Dprefix=/usr, -Dprefix=/some/thing/else)
+# but that caused too much grief.
+# vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
-# Where to put modules.
-privlib='/System/Library/Perl';
-sitelib='/Local/Library/Perl';
-vendorlib='/Network/Library/Perl';
+# BSD paths
+case "$prefix" in
+'') # Default install; use non-system directories
+ prefix='/usr/local';
+ siteprefix='/usr/local';
+ ;;
+'/usr') # We are building/replacing the built-in perl
+ prefix='/';
+ installprefix='/';
+ bin='/usr/bin';
+ siteprefix='/usr/local';
+ # We don't want /usr/bin/HEAD issues.
+ sitebin='/usr/local/bin';
+ sitescript='/usr/local/bin';
+ installusrbinperl='define'; # You knew what you were doing.
+ privlib="/System/Library/Perl/${version}";
+ sitelib="/Library/Perl/${version}";
+ vendorprefix='/';
+ usevendorprefix='define';
+ vendorbin='/usr/bin';
+ vendorscript='/usr/bin';
+ vendorlib="/Network/Library/Perl/${version}";
+ # 4BSD uses ${prefix}/share/man, not ${prefix}/man.
+ man1dir='/usr/share/man/man1';
+ man3dir='/usr/share/man/man3';
+ # But users' installs shouldn't touch the system man pages.
+ # Transient obsoleted style.
+ siteman1='/usr/local/share/man/man1';
+ siteman3='/usr/local/share/man/man3';
+ # New style.
+ siteman1dir='/usr/local/share/man/man1';
+ siteman3dir='/usr/local/share/man/man3';
+ ;;
+ *) # Anything else; use non-system directories, use Configure defaults
+ ;;
+esac
##
# Tool chain settings
@@ -32,14 +65,67 @@ archname='darwin';
# nm works.
usenm='true';
-# Libc is in libsystem.
-libc='/System/Library/Frameworks/System.framework/System';
+case "$optimize" in
+'')
+# Optimizing for size also mean less resident memory usage on the part
+# of Perl. Apple asserts that this is a more important optimization than
+# saving on CPU cycles. Given that memory speed has not increased at
+# pace with CPU speed over time (on any platform), this is probably a
+# reasonable assertion.
+if [ -z "${optimize}" ]; then
+ case "`${cc:-gcc} -v 2>&1`" in
+ *"gcc version 3."*) optimize='-Os' ;;
+ *) optimize='-O3' ;;
+ esac
+else
+ optimize='-O3'
+fi
+;;
+esac
+
+# -pipe: makes compilation go faster.
+# -fno-common because common symbols are not allowed in MH_DYLIB
+# -DPERL_DARWIN: apparently the __APPLE__ is not sanctioned by Apple
+# as the way to differentiate Mac OS X. (The official line is that
+# *no* cpp symbol does differentiate Mac OS X.)
+ccflags="${ccflags} -pipe -fno-common -DPERL_DARWIN"
+
+# At least on Darwin 1.3.x:
+#
+# # define INT32_MIN -2147483648
+# int main () {
+# double a = INT32_MIN;
+# printf ("INT32_MIN=%g\n", a);
+# return 0;
+# }
+# will output:
+# INT32_MIN=2.14748e+09
+# Note that the INT32_MIN has become positive.
+# INT32_MIN is set in /usr/include/stdint.h by:
+# #define INT32_MIN -2147483648
+# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1)
+# seems to work. INT64_MIN seems to be similarly broken.
+# -- Nicholas Clark, Ken Williams, and Edward Moy
+#
+# This seems to have been fixed since at least Mac OS X 10.1.3,
+# stdint.h defining INT32_MIN as (-INT32_MAX-1)
+# -- Edward Moy
+#
+case "$(grep '^#define INT32_MIN' /usr/include/stdint.h)" in
+ *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;;
+esac
+
+# Avoid Apple's cpp precompiler, better for extensions
+cppflags="${cppflags} -no-cpp-precomp"
-# Optimize.
-optimize='-O3';
+# This is necessary because perl's build system doesn't
+# apply cppflags to cc compile lines as it should.
+ccflags="${ccflags} ${cppflags}"
-# We have a prototype for telldir.
-ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
+# Known optimizer problems.
+case "`cc -v 2>&1`" in
+ *"3.1 20020105"*) toke_cflags='optimize=""' ;;
+esac
# Shared library extension is .dylib.
# Bundle extension is .bundle.
@@ -48,9 +134,41 @@ so='dylib';
dlext='bundle';
dlsrc='dl_dyld.xs'; usedl='define';
cccdlflags=' '; # space, not empty, because otherwise we get -fpic
-lddlflags="${ldflags} -bundle -undefined suppress";
+# Perl bundles do not expect two-level namespace, added in Darwin 1.4.
+# But starting from perl 5.8.1/Darwin 7 the default is the two-level.
+case "$osvers" in
+1.[0-3].*)
+ lddlflags="${ldflags} -bundle -undefined suppress"
+ ;;
+1.*)
+ ldflags="${ldflags} -flat_namespace"
+ lddlflags="${ldflags} -bundle -undefined suppress"
+ ;;
+[2-6].*)
+ ldflags="${ldflags} -flat_namespace"
+ lddlflags="${ldflags} -bundle -undefined suppress"
+ ;;
+*) lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
+ case "$ld" in
+ *MACOSX_DEVELOPMENT_TARGET*) ;;
+ *) ld="MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
+ esac
+ ;;
+esac
ldlibpthname='DYLD_LIBRARY_PATH';
-useshrplib='true';
+
+# useshrplib=true results in much slower startup times.
+# 'false' is the default value. Use Configure -Duseshrplib to override.
+
+cat > UU/archname.cbu <<'EOCBU'
+# This script UU/archname.cbu will get 'called-back' by Configure
+# after it has otherwise determined the architecture name.
+case "$ldflags" in
+*"-flat_namespace"*) ;; # Backward compat, be flat.
+# If we are using two-level namespace, we will munge the archname to show it.
+*) archname="${archname}-2level" ;;
+esac
+EOCBU
##
# System libraries
@@ -59,5 +177,48 @@ useshrplib='true';
# vfork works
usevfork='true';
-# malloc works
-usemymalloc='n';
+# our malloc works (but allow users to override)
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+# Locales aren't feeling well.
+LC_ALL=C; export LC_ALL;
+LANG=C; export LANG;
+
+#
+# The libraries are not threadsafe as of OS X 10.1.
+#
+# Fix when Apple fixes libc.
+#
+case "$usethreads$useithreads" in
+ *define*)
+ case "$osvers" in
+ [12345].*) cat <<EOM >&4
+
+
+
+*** Warning, there might be problems with your libraries with
+*** regards to threading. The test ext/threads/t/libc.t is likely
+*** to fail.
+
+EOM
+ ;;
+ *) usereentrant='define';;
+ esac
+
+esac
+
+# Fink can install a GDBM library that claims to have the ODBM interfaces
+# but Perl dynaloader cannot for some reason use that library. We don't
+# really need ODBM_FIle, though, so let's just hint ODBM away.
+i_dbm=undef;
+
+##
+# Build process
+##
+
+# Case-insensitive filesystems don't get along with Makefile and
+# makefile in the same place. Since Darwin uses GNU make, this dodges
+# the problem.
+firstmakefile=GNUmakefile;
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index ce3a40c77d..114aca1df2 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -60,18 +60,25 @@
cc=${cc:-cc}
+case "`$cc -v 2>&1 | grep cc`" in
+*gcc*) isgcc=gcc ;;
+esac
+
# do NOT, I repeat, *NOT* take away the leading tabs
# Configure Black Magic (TM)
# reset
_DEC_cc_style=
-case "`$cc -v 2>&1 | grep cc`" in
-*gcc*) _gcc_version=`$cc --version 2>&1 | tr . ' '`
- set $_gcc_version
- if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 2 \) \) \); then
+case "$isgcc" in
+gcc) if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ set $gccversion
+ if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 3 \) \) \); then
cat >&4 <<EOF
-*** Your cc seems to be gcc and its version ($_gcc_version) seems to be
-*** less than 2.95.2. This is not a good idea since old versions of gcc
+*** Your cc seems to be gcc and its version ($gccversion) seems to be
+*** less than 2.95.3. This is not a good idea since old versions of gcc
*** are known to produce buggy code when compiling Perl (and no doubt for
*** other programs, too).
***
@@ -100,7 +107,7 @@ EOF
fi
;;
*) # compile something small: taint.c is fine for this.
- ccversion=`cc -V | awk '/(Compaq|DEC) C/ {print $3}'`
+ ccversion=`cc -V | awk '/(Compaq|DEC) C/ {print $3}' | grep '^V'`
# the main point is the '-v' flag of 'cc'.
case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in
*/gemc_cc*) # we have the new DEC GEM CC
@@ -116,8 +123,8 @@ EOF
esac
# be nauseatingly ANSI
-case "`$cc -v 2>&1 | grep gcc`" in
-*gcc*) ccflags="$ccflags -ansi"
+case "$isgcc" in
+gcc) ccflags="$ccflags -ansi"
;;
*) ccflags="$ccflags -std"
;;
@@ -129,13 +136,10 @@ esac
# we want optimisation
case "$optimize" in
-'') case "`$cc -v 2>&1 | grep gcc`" in
- *gcc*)
- optimize='-O3' ;;
+'') case "$isgcc" in
+ gcc) optimize='-O3' ;;
*) case "$_DEC_cc_style" in
- new) optimize='-O4'
- ccflags="$ccflags -fprm d -ieee"
- ;;
+ new) optimize='-O4' ;;
old) optimize='-O2 -Olimit 3200' ;;
esac
ccflags="$ccflags -D_INTRINSICS"
@@ -144,6 +148,51 @@ case "$optimize" in
;;
esac
+## Optimization limits
+case "$isgcc" in
+gcc) # gcc 3.2.1 wants a lot of memory for -O3'ing toke.c
+cat >try.c <<EOF
+#include <sys/resource.h>
+
+int main ()
+{
+ struct rlimit rl;
+ int i = getrlimit (RLIMIT_DATA, &rl);
+ printf ("%d\n", rl.rlim_cur / (1024 * 1024));
+ } /* main */
+EOF
+$cc -o try $ccflags $ldflags try.c
+ maxdsiz=`./try`
+rm -f try try.c core
+if [ $maxdsiz -lt 256 ]; then
+ # less than 256 MB is probably not enough to optimize toke.c with gcc -O3
+ cat <<EOM >&4
+
+Your process datasize is limited to $maxdsiz MB, which is (sadly) not
+always enough to fully optimize some source code files of Perl,
+at least 256 MB seems to be necessary as of Perl 5.8.0. I'll try to
+use a lower optimization level for those parts. You could either try
+using your shell's ulimit/limit/limits command to raise your datasize
+(assuming the system-wide hard resource limits allow you to go higher),
+or if you can't go higher and if you are a sysadmin, and you *do* want
+the full optimization, you can tune the 'max_per_proc_data_size'
+kernel parameter: see man sysconfigtab, and man sys_attrs_proc.
+
+EOM
+toke_cflags='optimize=-O2'
+ fi
+;;
+esac
+
+# we want dynamic fp rounding mode, and we want ieee exception semantics
+case "$isgcc" in
+gcc) ;;
+*) case "$_DEC_cc_style" in
+ new) ccflags="$ccflags -fprm d -ieee" ;;
+ esac
+ ;;
+esac
+
# Make glibpth agree with the compiler suite. Note that /shlib
# is not here. That's on purpose. Even though that's where libc
# really lives from V4.0 on, the linker (and /sbin/loader) won't
@@ -176,6 +225,9 @@ libswanted="`echo $libswanted | sed -e 's/ ndbm / /'`"
# the basic lddlflags used always
lddlflags='-shared -expect_unresolved "*"'
+# Intentional leading tab.
+ myosvers="`/usr/sbin/sizer -v 2>/dev/null || uname -r`"
+
# Fancy compiler suites use optimising linker as well as compiler.
# <spider@Orb.Nashua.NH.US>
case "`uname -r`" in
@@ -185,7 +237,7 @@ case "`uname -r`" in
*) if $test "X$optimize" = "X$undef"; then
lddlflags="$lddlflags -msym"
else
- case "`/usr/sbin/sizer -v`" in
+ case "$myosvers" in
*4.0D*)
# QAR 56761: -O4 + .so may produce broken code,
# fixed in 4.0E or better.
@@ -203,6 +255,10 @@ esac
# Yes, the above loses if gcc does not use the system linker.
# If that happens, let me know about it. <jhi@iki.fi>
+# Because there is no other handy way to recognize 3.X.
+case "`uname -r`" in
+*3.*) ccflags="$ccflags -DDEC_OSF1_3_X" ;;
+esac
# If debugging or (old systems and doing shared)
# then do not strip the lib, otherwise, strip.
@@ -237,7 +293,7 @@ esac
# emulate_eaccess().
# Fixed in V5.0A.
-case "`/usr/sbin/sizer -v`" in
+case "$myosvers" in
*5.0[A-Z]*|*5.[1-9]*|*[6-9].[0-9]*)
: ok
;;
@@ -254,9 +310,32 @@ cat > UU/usethreads.cbu <<'EOCBU'
# after it has prompted the user for whether to use threads.
case "$usethreads" in
$define|true|[yY]*)
+ # In Tru64 V5 (at least V5.1A, V5.1B) gcc (at least 3.2.2)
+ # cannot be used to compile a threaded Perl.
+ cat > pthread.c <<EOF
+#include <pthread.h>
+extern int foo;
+EOF
+ $cc -c pthread.c 2> pthread.err
+ if grep -q "unrecognized compiler" pthread.err; then
+ cat >&4 <<EOF
+***
+*** I'm sorry but your C compiler ($cc) cannot be used to
+*** compile Perl with threads. The system C compiler should work.
+***
+
+Cannot continue, aborting.
+
+EOF
+ rm -f pthread.*
+ exit 1
+ fi
+ rm -f pthread.*
# Threads interfaces changed with V4.0.
- case "`$cc -v 2>&1 | grep gcc`" in
- *gcc*)ccflags="-D_REENTRANT $ccflags" ;;
+ case "$isgcc" in
+ gcc)
+ ccflags="-D_REENTRANT $ccflags"
+ ;;
*) case "`uname -r`" in
*[123].*) ccflags="-threads $ccflags" ;;
*) ccflags="-pthread $ccflags" ;;
@@ -273,6 +352,12 @@ $define|true|[yY]*)
usemymalloc='n'
;;
esac
+ # These symbols are renamed in <time.h> so
+ # that the Configure hasproto doesn't see them.
+ d_asctime_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
;;
esac
EOCBU
@@ -281,10 +366,84 @@ cat > UU/uselongdouble.cbu <<'EOCBU'
# This script UU/uselongdouble.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use long doubles.
case "$uselongdouble" in
-$define|true|[yY]*) d_Gconvert='sprintf((b),"%.*Lg",(n),(x))' ;;
+$define|true|[yY]*)
+ case "$myosvers" in
+ *[1-4].0*) cat >&4 <<EOF
+
+***
+*** Sorry, you cannot use long doubles in pre-V5.0 releases of Tru64.
+***
+
+Cannot continue, aborting.
+
+EOF
+ exit 1
+ ;;
+ *)
+ # Test whether libc's been fixed yet.
+ cat >try.c <<\TRY
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ unsigned long uvmax = ~0UL;
+ long double ld = uvmax + 0.0L;
+ char buf1[30], buf2[30];
+
+ (void) sprintf(buf1, "%lu", uvmax);
+ (void) sprintf(buf2, "%.0Lf", ld);
+ return strcmp(buf1, buf2) != 0;
+}
+TRY
+ # Don't bother trying to work with Configure's idea of
+ # cc and the various flags. This might not work as-is
+ # with gcc -- but we're testing libc, not the compiler.
+ if cc -o try -std try.c && ./try
+ then
+ : ok
+ else
+ cat <<\UGLY >&4
+!
+Warning! Your libc has not yet been patched so that its "%Lf" format for
+printing long doubles shows all the significant digits. You will get errors
+in the t/op/numconvert test because of this. (The data is still good
+internally, and the "%e" format of printf() or sprintf() in perl will still
+produce valid results.) See README.tru64 for additional details.
+
+Continuing anyway.
+!
+UGLY
+ fi
+ $rm -f try try.c
+ esac
+ ;;
esac
EOCBU
+case "$myosvers" in
+*[1-4].0*) d_modfl=undef ;; # must wait till 5.0
+esac
+
+# Keep that leading tab.
+ old_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+for p in $loclibpth
+do
+ if test -d $p; then
+ echo "Appending $p to LD_LIBRARY_PATH." >& 4
+ case "$LD_LIBRARY_PATH" in
+ '') LD_LIBRARY_PATH=$p ;;
+ *) LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;;
+ esac
+ fi
+done
+case "$LD_LIBRARY_PATH" in
+"$old_LD_LIBRARY_PATH") ;;
+*) echo "LD_LIBRARY_PATH is now $LD_LIBRARY_PATH." >& 4 ;;
+esac
+case "$LD_LIBRARY_PATH" in
+'') ;;
+* ) export LD_LIBRARY_PATH ;;
+esac
+
#
# Unset temporary variables no more needed.
#
diff --git a/hints/dgux.sh b/hints/dgux.sh
index 9a6f7a4879..53a39c8a73 100644
--- a/hints/dgux.sh
+++ b/hints/dgux.sh
@@ -1,12 +1,12 @@
-# $Id: dgux.sh,v 1.8 1996-11-29 18:16:43-05 roderick Exp $
+# $Id: dgux.sh,v 1.9 2001-05-07 00:06:00-05 Takis Exp $
-# This is a hints file for DGUX, which is Data General's Unix. It was
-# originally developed with version 5.4.3.10 of the OS, and then was
+# This is a hints file for DGUX, which is EMC's Data General's Unix. It
+# was originally developed with version 5.4.3.10 of the OS, and then was
# later updated running under version 4.11.2 (running on m88k hardware).
# The gross features should work with versions going back to 2.nil but
# some tweaking will probably be necessary.
#
-# DGUX is a SVR4 derivative. It ships with gcc as the standard
+# DGUX is an SVR4 derivative. It ships with gcc as the standard
# compiler. Since version 3.0 it has shipped with Perl 4.036
# installed in /usr/bin, which is kind of neat. Be careful when you
# install that you don't overwrite the system version, though (by
@@ -16,57 +16,76 @@
#
# -Roderick Schertler <roderick@argon.org>
-# Here are the things from some old DGUX hints files which are different
-# from what's in here now. I don't know the exact reasons that most of
-# these settings were in the hints files, presumably they can be chalked
-# up to old Configure inadequacies and changes in the OS headers and the
-# like. These settings might make a good place to start looking if you
-# have problems.
-#
-# This was specified the the 4.036 hints file. That hints file didn't
-# say what version of the OS it was developed using.
-#
-# cppstdin='/lib/cpp'
-#
-# The 4.036 and 5.001 hints files both contained these. The 5.001 hints
-# file said it was developed with version 2.01 of DGUX.
-#
-# gidtype='gid_t'
-# groupstype='gid_t'
-# uidtype='uid_t'
-# d_index='define'
-# cc='gcc'
-#
-# These were peculiar to the 5.001 hints file.
-#
-# ccflags='-D_POSIX_SOURCE -D_DGUX_SOURCE'
-#
-# # an ugly hack, since the Configure test for "gcc -P -" hangs.
-# # can't just use 'cppstdin', since our DG has a broken cppstdin :-(
-# cppstdin=`cd ..; pwd`/cppstdin
-# cpprun=`cd ..; pwd`/cppstdin
-#
-# One last note: The 5.001 hints file said "you don't want to use
-# /usr/ucb/cc" in the place at which it set cc to gcc. That in
-# particular baffles me, as I used to have 2.01 loaded and my memory
-# is telling me that even then /usr/ucb was a symlink to /usr/bin.
-
-
# The standard system compiler is gcc, but invoking it as cc changes its
# behavior. I have to pick one name or the other so I can get the
# dynamic loading switches right (they vary depending on this). I'm
# picking gcc because there's no way to get at the optimization options
# and so on when you call it cc.
-case $cc in
- '')
- cc=gcc
- case $optimize in
- '') optimize=-O2;;
- esac
- ;;
+
+##########################################
+# Modified by Takis Psarogiannakopoulos
+# Universirty of Cambridge
+# Centre for Mathematical Sciences
+# Department of Pure Mathematics
+# Wilberforce road
+# Cambridge CB3 0WB , UK
+# e-mail <takis@XFree86.Org>
+# Use GCC-2.95.2/3 rev (DG/UX) for threads
+# This compiler supports the -pthread switch
+# to link correctly DG/UX 's -lthread.
+# March 2002
+###########################################
+
+cc=gcc
+ccflags="-DDGUX -D_DGUX_SOURCE"
+# Debug build. If using GNU as,ld use the flag -gstabs+
+# ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING"
+# Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX)
+# even if you debugging the program!
+optimize="-mno-legend -O2"
+
+archname="ix86-dgux"
+libpth="/usr/lib"
+
+#####################################
+# <takis@XFree86.Org>
+# Change this if you want.
+# prefix =/usr/local
+#####################################
+
+prefix=/usr/local
+perlpath="$prefix/bin/perl59"
+startperl="#! $prefix/bin/perl59"
+privlib="$prefix/lib/perl59"
+man1dir="$prefix/man/man1"
+man3dir="$prefix/man/man3"
+
+sitearch="$prefix/lib/perl59/$archname"
+sitelib="$prefix/lib/perl59"
+
+#Do not overwrite by default /usr/bin/perl of DG/UX
+installusrbinperl="$undef"
+
+# Configure may fail to find lstat()
+# function in <sys/stat.h>.
+d_lstat='define'
+
+# Internal (perl) malloc is causing serious problems and
+# test failures in DG/UX. Most notable Embed.t
+# So for perl-5.7.3 and on do NOT use.
+# I have no time to investigate more.
+# <takis@XFree86.Org>
+
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
esac
-usevfork=true
+case "$uselongdouble" in
+'') uselongdouble='y' ;;
+esac
+
+#usevfork=true
+usevfork=false
# DG has this thing set up with symlinks which point to different places
# depending on environment variables (see elink(5)) and the compiler and
@@ -117,20 +136,104 @@ done
plibpth="$plibpth $sde_path/$sde/usr/lib"
unset sde_path default_sde sde
+#####################################
+# <takis@XFree86.Org>
+#####################################
+
+libperl="libperl59.so"
+
# Many functions (eg, gethostent(), killpg(), getpriority(), setruid()
# dbm_*(), and plenty more) are defined in -ldgc. Usually you don't
# need to know this (it seems that libdgc.so is searched automatically
# by ld), but Configure needs to check it otherwise it will report all
# those functions as missing.
-libswanted="dgc $libswanted"
+
+#####################################
+# <takis@XFree86.Org>
+#####################################
+
+# libswanted="dgc gdbm $libswanted"
+#libswanted="dbm posix $libswanted"
+# Do *NOT* add there the malloc native
+# DG/UX library!
+libswanted="dbm posix resolv socket nsl dl m"
+
+#####################################
+# <takis@XFree86.Org>
+#####################################
+
+mydomain='.localhost'
+cf_by=`(whoami) 2>/dev/null`
+cf_email="$cf_by@localhost"
# Dynamic loading works using the dlopen() functions. Note that dlfcn.h
# used to be broken, it declared _dl*() rather than dl*(). This was the
# case up to 3.10, it has been fixed in 4.11. I'm not sure if it was
# fixed in 4.10. If you have the older header just ignore the warnings
# (since pointers and integers have the same format on m88k).
-usedl=true
+
+# usedl=true
+usedl=false
+
# For cc rather than gcc the flags would be `-K PIC' for compiling and
# -G for loading. I haven't tested this.
-cccdlflags=-fpic
-lddlflags=-shared
+
+#####################################
+# <takis@XFree86.Org>
+# Use -fPIC instead -fpic
+#####################################
+
+cccdlflags=-fPIC
+#We must use gcc
+ld="gcc"
+lddlflags="-shared"
+
+############################################################################
+# DGUX Posix 4A Draft 10 Thread support
+# <takis@XFree86.Org>
+# use Configure -Dusethreads to enable
+############################################################################
+
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+ ccflags="$ccflags"
+ # DG/UX has this for sure! Main Configure fails to
+ # detect it but it is needed!
+ d_pthread_atfork='define'
+ shift
+ # DG/UX's sched_yield is in -lrte
+ # Do *NOT* add there the malloc native
+ # DG/UX library!
+ libswanted="dbm posix resolv socket nsl dl m rte"
+ archname="ix86-dgux-thread"
+ sitearch="$prefix/lib/perl59/$archname"
+ sitelib="$prefix/lib/perl59"
+ case "$cc" in
+ *gcc*)
+ #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
+ #### Otherwise take out the switch -pthread
+ #### And add manually the -D_POSIX4A_DRAFT10_SOURCE flag.
+ ld="gcc"
+ ccflags="$ccflags -D_POSIX4A_DRAFT10_SOURCE"
+ # Debug build : use -DS flag on command line perl
+ # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread"
+ cccdlflags='-fPIC'
+ lddlflags="-shared"
+ #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread
+ #### Otherwise take out the switch -pthread
+ #### And add manually the -lthread library.
+ ldflags="$ldflags -pthread"
+ ;;
+
+ *)
+ echo "Not supported DG/UX cc and threads !"
+ ;;
+ esac
+esac
+EOCBU
+
+# "./Configure -d" can't figure this out easily
+d_suidsafe='define'
+
+###################################################
diff --git a/hints/dos_djgpp.sh b/hints/dos_djgpp.sh
index ebbd786b45..2b032cdece 100644
--- a/hints/dos_djgpp.sh
+++ b/hints/dos_djgpp.sh
@@ -40,7 +40,12 @@ 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 3."*)
+ optimize="-O2 -falign-loops=2 -falign-jumps=2 -falign-functions=2" ;;
+ *)
+ optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;;
+ esac
ldflags='-s'
;;
X*)
@@ -71,3 +76,6 @@ $define|true|[yY]*)
;;
esac
EOCBU
+
+useperlio='undef'
+uselargefiles='undef'
diff --git a/hints/dynixptx.sh b/hints/dynixptx.sh
index 11c6b5b3b0..b08dbc29d7 100644
--- a/hints/dynixptx.sh
+++ b/hints/dynixptx.sh
@@ -44,7 +44,7 @@ esac
# Jarkko Hietaniemi November 1998
case "$osvers" in
-4.4*) # configure doesn't find sockets, as they're in libsocket, not libc
+4.[45]*) # configure doesn't find sockets, as they're in libsocket, not libc
d_socket='define'
d_oldsock='undef'
d_sockpair='define'
diff --git a/hints/epix.sh b/hints/epix.sh
index dcad3c5d47..86ddf9a71f 100644
--- a/hints/epix.sh
+++ b/hints/epix.sh
@@ -2,7 +2,7 @@
# Hint file for EP/IX on CDC RISC boxes.
#
# From: Stanley Donald Capelik <sd9sdc@hp100.den.mmc.com>
-# Modified by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Modified by Andy Dougherty <doughera@lafayette.edu>
# Last modified: Mon May 8 15:29:18 EDT 1995
#
# This hint file appears to be based on the svr4 hints for perl5.000,
diff --git a/hints/freebsd.sh b/hints/freebsd.sh
index 8eb6ac47b0..0a74e6e4b8 100644
--- a/hints/freebsd.sh
+++ b/hints/freebsd.sh
@@ -20,7 +20,7 @@
#
# Modified to ensure we replace -lc with -lc_r, and
# to put in place-holders for various specific hints.
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
# Date: Tue Mar 10 16:07:00 EST 1998
#
# Support for FreeBSD/ELF
@@ -67,7 +67,10 @@ case "$osvers" in
#
2.0.5*|2.0-built*|2.1*)
usevfork='true'
- usemymalloc='n'
+ case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+ esac
d_setregid='define'
d_setreuid='define'
d_setegid='undef'
@@ -79,15 +82,25 @@ case "$osvers" in
# don't use -lmalloc (maybe there's an old one from 1.1.5.1 floating around)
2.2*)
usevfork='true'
- usemymalloc='n'
+ case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+ esac
libswanted=`echo $libswanted | sed 's/ malloc / /'`
+ libswanted=`echo $libswanted | sed 's/ bind / /'`
+ # iconv gone in Perl 5.8.1, but if someone compiles 5.8.0 or earlier.
+ libswanted=`echo $libswanted | sed 's/ iconv / /'`
d_setregid='define'
d_setreuid='define'
- d_setegid='undef'
- d_seteuid='undef'
+ d_setegid='define'
+ d_seteuid='define'
+ # d_dosuid='define' # Obsolete.
;;
*) usevfork='true'
- usemymalloc='n'
+ case "$usemymalloc" in
+ "") usemymalloc='n'
+ ;;
+ esac
libswanted=`echo $libswanted | sed 's/ malloc / /'`
;;
esac
@@ -115,7 +128,7 @@ case "$osvers" in
fi
lddlflags='-Bshareable'
fi
- cccdlflags='-DPIC -fpic'
+ cccdlflags='-DPIC -fPIC'
;;
esac
@@ -123,6 +136,7 @@ case "$osvers" in
0*|1*|2*|3*) ;;
*)
+ ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H"
if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then
usenm=false
fi
@@ -172,7 +186,7 @@ esac
cat > UU/usethreads.cbu <<'EOCBU'
case "$usethreads" in
$define|true|[yY]*)
- lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|tail -1`
+ lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'`
case "$osvers" in
0*|1*|2.0*|2.1*) cat <<EOM >&4
I did not know that FreeBSD $osvers supports POSIX threads.
@@ -209,6 +223,17 @@ EOM
exit 1
fi
ldflags="-pthread $ldflags"
+ case "$osvers" in
+ # Both in 4.x and 5.x gethostbyaddr_r exists but
+ # it is "Temporary function, not threadsafe"...
+ 4.*) d_gethostbyaddr_r="undef"
+ d_gethostbyaddr_r_proto="0"
+ ;;
+ 5.*) d_gethostbyaddr_r="undef"
+ d_gethostbyaddr_r_proto="0"
+
+ ;;
+ esac
;;
esac
@@ -229,5 +254,11 @@ EOM
esac
unset lc_r
+
+ # Even with the malloc mutexes the Perl malloc does not
+ # seem to be threadsafe in FreeBSD?
+ usemymalloc=n
+
esac
EOCBU
+
diff --git a/hints/hpux.sh b/hints/hpux.sh
index 464f301427..b2a888c164 100755
--- a/hints/hpux.sh
+++ b/hints/hpux.sh
@@ -1,239 +1,287 @@
-#! /bin/sh
+#!/usr/bin/sh
-# hints/hpux.sh
-# Perl Configure hints file for Hewlett-Packard's HP-UX 9.x and 10.x
-# (Hopefully, 7.x through 11.x.)
-#
-# This file is based on hints/hpux_9.sh, Perl Configure hints file for
-# Hewlett Packard HP-UX 9.x
-#
-# Use Configure -Dcc=gcc to use gcc.
-#
-# From: Jeff Okamoto <okamoto@corp.hp.com>
-# and
-# hints/hpux_10.sh, Perl Configure hints file for Hewlett Packard HP-UX 10.x
-# From: Giles Lean <giles@nemeton.com.au>
-# and
-# Use #define CPU_* instead of comments for >= 10.x.
-# Support PA1.2 under 10.x.
-# Distinguish between PA2.0, PA2.1, etc.
-# Distinguish between MC68020, MC68030, MC68040
-# Don't assume every OS != 10 is < 10, (e.g., 11).
-# From: Chuck Phillips <cdp@fc.hp.com>
-# HP-UX 10 pthreads hints: Matthew T Harden <mthard@mthard1.monsanto.com>
-# From: Dominic Dunlop <domo@computer.org>
-# Abort and offer advice if bundled (non-ANSI) C compiler selected
-# From: H.Merijn Brand <h.m.brand@hccnet.nl>
-# ccversion detection
-# perl/64/HP-UX wants libdb-3.0 to be shared ELF 64
-# generic pthread support detection for PTH package
-
-
-# This version: March 8, 2000
-# Current maintainer: Jeff Okamoto <okamoto@corp.hp.com>
-
-#--------------------------------------------------------------------
-# Use Configure -Dcc=gcc to use gcc.
-# Use Configure -Dprefix=/usr/local to install in /usr/local.
-#
-# You may have dynamic loading problems if the environment variable
-# LDOPTS='-a archive'. Under >= 10.x, you can instead LDOPTS='-a
-# archive_shared' to prefer archive libraries without requiring them.
-# Regardless of HPUX release, in the "libs" variable or the ext.libs
-# file, you can always give explicit path names to archive libraries
-# that may not exist on the target machine. E.g., /usr/lib/libndbm.a
-# instead of -lndbm. See also note below on ndbm.
-#
-# ALSO, bear in mind that gdbm and Berkely DB contain incompatible
-# replacements for ndbm (and dbm) routines. If you want concurrent
-# access to ndbm files, you need to make sure libndbm is linked in
-# *before* gdbm and Berkely DB. Lastly, remember to check the
-# "ext.libs" file which is *probably* messing up the order. Often,
-# you can replace ext.libs with an empty file to fix the problem.
-#
-# If you get a message about "too much defining", as may happen
-# in HPUX < 10, you might have to append a single entry to your
-# ccflags: '-Wp,-H256000'
-# NOTE: This is a single entry (-W takes the argument 'p,-H256000').
-#--------------------------------------------------------------------
-
-# Turn on the _HPUX_SOURCE flag to get many of the HP add-ons
-# regardless of compiler. For the HP ANSI C compiler, you may also
-# want to include +e to enable "long long" and "long double".
-#
-# HP compiler flags to include (if at all) *both* as part of ccflags
-# and cc itself so Configure finds (and builds) everything
-# consistently:
-# -Aa -D_HPUX_SOURCE +e
-#
-# Lastly, you may want to include the "-z" HP linker flag so that
-# reading from a NULL pointer causes a SEGV.
-ccflags="$ccflags -D_HPUX_SOURCE"
-
-# Check if you're using the bundled C compiler. This compiler doesn't support
-# ANSI C (the -Aa flag) and so is not suitable for perl 5.5 and later.
-case "$cc" in
-'') if cc $ccflags -Aa 2>&1 | $contains 'option' >/dev/null
- then
- cat <<'EOM' >&4
+### SYSTEM ARCHITECTURE
-The bundled C compiler is not ANSI-compliant, and so cannot be used to
-build perl. Please see the file README.hpux for advice on alternative
-compilers.
+# Determine the architecture type of this system.
+# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
+ xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`;
+if [ "$xxOsRevMajor" -ge 10 ]; then
+ # This system is running >= 10.x
+
+ # Tested on 10.01 PA1.x and 10.20 PA[12].x.
+ # Idea: Scan /usr/include/sys/unistd.h for matches with
+ # "#define CPU_* `getconf # CPU_VERSION`" to determine CPU type.
+ # Note the text following "CPU_" is used, *NOT* the comment.
+ #
+ # ASSUMPTIONS: Numbers will continue to be defined in hex -- and in
+ # /usr/include/sys/unistd.h -- and the CPU_* #defines will be kept
+ # up to date with new CPU/OS releases.
+ xxcpu=`getconf CPU_VERSION`; # Get the number.
+ xxcpu=`printf '0x%x' $xxcpu`; # convert to hex
+ archname=`sed -n -e "s/^#[[:space:]]*define[[:space:]]*CPU_//p" /usr/include/sys/unistd.h |
+ sed -n -e "s/[[:space:]]*$xxcpu[[:space:]].*//p" |
+ sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./ -e "s/[[:space:]]*//g"`;
+else
+ # This system is running <= 9.x
+ # Tested on 9.0[57] PA and [78].0 MC680[23]0. Idea: After removing
+ # MC6888[12] from context string, use first CPU identifier.
+ #
+ # ASSUMPTION: Only CPU identifiers contain no lowercase letters.
+ archname=`getcontext | tr ' ' '\012' | grep -v '[a-z]' | grep -v MC688 |
+ sed -e 's/HP-//' -e 1q`;
+ selecttype='int *'
+ fi
-Cannot continue, aborting.
-EOM
- exit 1
- else
- ccflags="$ccflags -Aa" # The add-on compiler supports ANSI C
- # cppstdin and cpprun need the -Aa option if you use the unbundled
- # ANSI C compiler (*not* the bundled K&R compiler or gcc)
- # [XXX this should be set automatically by Configure, but isn't yet.]
- # [XXX This is reported not to work. You may have to edit config.sh.
- # After running Configure, set cpprun and cppstdin in config.sh,
- # run "Configure -S" and then "make".]
- cpprun="${cc:-cc} -E -Aa"
- cppstdin="$cpprun"
- cppminus='-'
- cpplast='-'
+# For some strange reason, the u32align test from Configure hangs in
+# HP-UX 10.20 since the December 2001 patches. So hint it to avoid
+# the test.
+if [ "$xxOsRevMajor" -le 10 ]; then
+ d_u32align=$define
fi
- case "$optimize" in
- # For HP's ANSI C compiler, up to "+O3" is safe for everything
- # except shared libraries (PIC code). Max safe for PIC is "+O2".
- # Setting both causes innocuous warnings.
- '') optimize='-O'
- #optimize='+O3'
- #cccdlflags='+z +O2'
- ;;
- esac
- cc=cc
- ;;
-esac
+
+echo "Archname is $archname"
+
+# Fix XSlib (CPAN) confusion when re-using a prefix but changing from ILP32
+# to LP64 builds. They're NOT binary compatible, so quit claiming they are.
+archname64=LP64
+
+
+### HP-UX OS specific behaviour
+
+# -ldbm is obsolete and should not be used
+# -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
+# -lPW is obsolete and should not be used
+# The libraries crypt, malloc, ndir, and net are empty.
+set `echo "X $libswanted " | sed -e 's/ ld / /' -e 's/ dbm / /' -e 's/ BSD / /' -e 's/ PW / /'`
+shift
+libswanted="$*"
cc=${cc:-cc}
+ar=/usr/bin/ar # Yes, truly override. We do not want the GNU ar.
+full_ar=$ar # I repeat, no GNU ar. arrr.
+
+set `echo "X $ccflags " | sed -e 's/ -A[ea] / /' -e 's/ -D_HPUX_SOURCE / /'`
+shift
+ cc_cppflags="$* -D_HPUX_SOURCE"
+cppflags="-Aa -D__STDC_EXT__ $cc_cppflags"
+
+case "$prefix" in
+ "") prefix='/opt/perl5' ;;
+ esac
+ gnu_as=no
+ gnu_ld=no
case `$cc -v 2>&1`"" in
-*gcc*) ccisgcc="$define" ;;
-*) ccisgcc=''
- ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'`
- ;;
-esac
+ *gcc*) ccisgcc="$define"
+ ccflags="$cc_cppflags"
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case "$gccversion" in
+ [012]*) # HP-UX and gcc-2.* break UINT32_MAX :-(
+ ccflags="$ccflags -DUINT32_MAX_BROKEN"
+ ;;
+ 3*) # GCC (both 32bit and 64bit) will define __STDC_EXT__
+ # by default when using GCC 3.0 and newer versions of
+ # the compiler.
+ cppflags="$cc_cppflags"
+ ;;
+ esac
+ case "`getconf KERNEL_BITS 2>/dev/null`" in
+ *64*)
+ echo "main(){}">try.c
+ case "$gccversion" in
+ 3*)
+ case "$archname" in
+ PA-RISC*)
+ case "$ccflags" in
+ *-mpa-risc*) ;;
+ *) ccflags="$ccflags -mpa-risc-2-0" ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) # gcc with gas will not accept +DA2.0
+ case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in
+ *"+DA2.0"*) # gas
+ gnu_as=yes
+ ;;
+ *) # HPas
+ ccflags="$ccflags -Wa,+DA2.0"
+ ;;
+ esac
+ ;;
+ esac
+ # gcc with gld will not accept +vnocompatwarnings
+ case "`$cc -o try -Wl,+vnocompatwarnings try.c 2>&1`" in
+ *"+vnocompat"*) # gld
+ gnu_ld=yes
+ ;;
+ *) # HPld
+ case "$gccversion" in
+ [12]*)
+ # Why not 3 as well here?
+ # Since not relevant to IA64, not changed.
+ ldflags="$ldflags -Wl,+vnocompatwarnings"
+ ccflags="$ccflags -Wl,+vnocompatwarnings"
+ ;;
+ esac
+ ;;
+ esac
+ rm -f try.c
+ ;;
+ esac
+ ;;
+ *) ccisgcc=''
+ ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'`
+ case "$ccflags" in
+ "-Ae "*) ;;
+ *) ccflags="-Ae $cc_cppflags -Wl,+vnocompatwarnings" ;;
+ esac
+ # Needed because cpp does only support -Aa (not -Ae)
+ cpplast='-'
+ cppminus='-'
+ cppstdin='cc -E -Aa -D__STDC_EXT__'
+ cpprun=$cppstdin
+# case "$d_casti32" in
+# "") d_casti32='undef' ;;
+# esac
+ ;;
+ esac
+
+# When HP-UX runs a script with "#!", it sets argv[0] to the script name.
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+
+### 64 BITNESS
+
+# Some gcc versions do native 64 bit long (e.g. 2.9-hppa-000310 and gcc-3.0)
+# We have to force 64bitness to go search the right libraries
+ gcc_64native=no
+case "$ccisgcc" in
+ $define|true|[Yy])
+ echo 'int main(){long l;printf("%d\\n",sizeof(l));}'>try.c
+ $cc -o try $ccflags $ldflags try.c
+ if [ "`try`" = "8" ]; then
+ cat <<EOM >&4
+
+*** This version of gcc uses 64 bit longs. -Duse64bitall is
+*** implicitly set to enable continuation
+EOM
+ use64bitall=$define
+ gcc_64native=yes
+ fi
+ ;;
+ esac
-# Determine the architecture type of this system.
-# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
- xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`;
- #xxOsRevMinor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f2`;
-if [ "$xxOsRevMajor" -ge 10 ]
-then
- # This system is running >= 10.x
-
- # Tested on 10.01 PA1.x and 10.20 PA[12].x. Idea: Scan
- # /usr/include/sys/unistd.h for matches with "#define CPU_* `getconf
- # CPU_VERSION`" to determine CPU type. Note the part following
- # "CPU_" is used, *NOT* the comment.
- #
- # ASSUMPTIONS: Numbers will continue to be defined in hex -- and in
- # /usr/include/sys/unistd.h -- and the CPU_* #defines will be kept
- # up to date with new CPU/OS releases.
- xxcpu=`getconf CPU_VERSION`; # Get the number.
- xxcpu=`printf '0x%x' $xxcpu`; # convert to hex
- archname=`sed -n -e "s/^#[ \t]*define[ \t]*CPU_//p" /usr/include/sys/unistd.h |
- sed -n -e "s/[ \t]*$xxcpu[ \t].*//p" |
- sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./`;
-else
- # This system is running <= 9.x
- # Tested on 9.0[57] PA and [78].0 MC680[23]0. Idea: After removing
- # MC6888[12] from context string, use first CPU identifier.
- #
- # ASSUMPTION: Only CPU identifiers contain no lowercase letters.
- archname=`getcontext | tr ' ' '\012' | grep -v '[a-z]' | grep -v MC688 |
- sed -e 's/HP-//' -e 1q`;
- selecttype='int *'
-fi
-
-# Do this right now instead of the delayed callback unit approach.
case "$use64bitall" in
-$define|true|[yY]*) use64bitint="$define" ;;
-esac
-case "$use64bitint" in
-$define|true|[yY]*)
- if [ "$xxOsRevMajor" -lt 11 ]; then
+ $define|true|[yY]*) use64bitint="$define" ;;
+ esac
+
+case "$usemorebits" in
+ $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
+ esac
+
+case "$archname" in
+ IA64*)
+ # While here, override so=sl auto-detection
+ so='so'
+ ;;
+ *)
+ case "$uselongdouble" in
+ *) ;;
+ $define|true|[yY]*)
cat <<EOM >&4
-64-bit compilation is not supported on HP-UX $xxOsRevMajor.
-You need at least HP-UX 11.0.
-Cannot continue, aborting.
+*** long doubles are not (yet) supported on HP-UX (any version)
+*** Until it does, we cannot continue, aborting.
EOM
- exit 1
- fi
+ exit 1 ;;
+ esac
+ ;;
+ esac
- # Without the 64-bit libc we cannot do much.
- libc='/lib/pa20_64/libc.sl'
- if [ ! -f "$libc" ]; then
- cat <<EOM >&4
+case "$use64bitint" in
+ $define|true|[Yy])
-*** You do not seem to have the 64-bit libraries in /lib/pa20_64.
-*** Most importantly, I cannot find the $libc.
+ if [ "$xxOsRevMajor" -lt 11 ]; then
+ cat <<EOM >&4
+
+*** 64-bit compilation is not supported on HP-UX $xxOsRevMajor.
+*** You need at least HP-UX 11.0.
*** Cannot continue, aborting.
EOM
- exit 1
- fi
+ exit 1
+ fi
- ccflags="$ccflags +DD64"
- ldflags="$ldflags +DD64"
- test -d /lib/pa20_64 && loclibpth="$loclibpth /lib/pa20_64"
- libswanted="$libswanted pthread"
- libscheck='case "`/usr/bin/file $xxx`" in
-*LP64*|*PA-RISC2.0*) ;;
-*) xxx=/no/64-bit$xxx ;;
-esac'
- if test -n "$ccisgcc" -o -n "$gccversion"; then
- ld="$cc"
- else
- ld=/usr/bin/ld
- fi
- ar=/usr/bin/ar
- full_ar=$ar
-
- if test -z "$ccisgcc" -a -z "$gccversion"; then
- # The strict ANSI mode (-Aa) doesn't like the LL suffixes.
- ccflags=`echo " $ccflags "|sed 's@ -Aa @ @g'`
- case "$ccflags" in
- *-Ae*) ;;
- *) ccflags="$ccflags -Ae" ;;
- esac
- fi
+ # Set libc and the library paths
+ case "$archname" in
+ PA-RISC*)
+ loclibpth="$loclibpth /lib/pa20_64"
+ libc='/lib/pa20_64/libc.sl' ;;
+ IA64*)
+ loclibpth="$loclibpth /usr/lib/hpux64"
+ libc='/usr/lib/hpux64/libc.so' ;;
+ esac
+ if [ ! -f "$libc" ]; then
+ cat <<EOM >&4
+
+*** You do not seem to have the 64-bit libc.
+*** I cannot find the file $libc.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ fi
- set `echo " $libswanted " | sed -e 's@ dl @ @'`
- libswanted="$*"
+ case "$ccisgcc" in
+ $define|true|[Yy])
+ # For the moment, don't care that it ain't supported (yet)
+ # by gcc (up to and including 2.95.3), cause it'll crash
+ # anyway. Expect auto-detection of 64-bit enabled gcc on
+ # HP-UX soon, including a user-friendly exit
+ case $gcc_64native in
+ no) case "$gccversion" in
+ [123]*) ccflags="$ccflags -mlp64"
+ case "$archname" in
+ PA-RISC*)
+ ldflags="$ldflags -Wl,+DD64"
+ ;;
+ IA64*)
+ ldflags="$ldflags -mlp64"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ ;;
+ esac
- ;;
-esac
+ # Reset the library checker to make sure libraries
+ # are the right type
+ # (NOTE: on IA64, this doesn't work with .a files.)
+ libscheck='case "`/usr/bin/file $xxx`" in
+ *ELF-64*|*LP64*|*PA-RISC2.0*) ;;
+ *) xxx=/no/64-bit$xxx ;;
+ esac'
-case "$ccisgcc" in
-# Even if you use gcc, prefer the HP math library over the GNU one.
-"$define") test -d /lib/pa1.1 && ccflags="$ccflags -L/lib/pa1.1" ;;
-esac
-
-case "$ccisgcc" in
-"$define") ;;
-*) case "`getconf KERNEL_BITS 2>/dev/null`" in
- *64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
- esac
- ;;
-esac
+ ;;
-# Remove bad libraries that will cause problems
-# (This doesn't remove libraries that don't actually exist)
-# -lld is unneeded (and I can't figure out what it's used for anyway)
-# -ldbm is obsolete and should not be used
-# -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
-# -lPW is obsolete and should not be used
-# The libraries crypt, malloc, ndir, and net are empty.
-# Although -lndbm should be included, it will make perl blow up if you should
-# copy the binary to a system without libndbm.sl. See ccdlflags below.
-set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ dbm @ @' -e 's@ BSD @ @' -e 's@ PW @ @'`
-libswanted="$*"
+ *) # Not in 64-bit mode
+
+ case "$archname" in
+ PA-RISC*)
+ libc='/lib/libc.sl' ;;
+ IA64*)
+ loclibpth="$loclibpth /usr/lib/hpux32"
+ libc='/usr/lib/hpux32/libc.so' ;;
+ esac
+ ;;
+ esac
# By setting the deferred flag below, this means that if you run perl
# on a system that does not have the required shared library that you
@@ -246,106 +294,247 @@ libswanted="$*"
# adding the "nonfatal" option.
# ccdlflags="-Wl,-E -Wl,-B,immediate $ccdlflags"
# ccdlflags="-Wl,-E -Wl,-B,immediate,-B,nonfatal $ccdlflags"
-ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags"
+if [ "$gnu_ld" = "yes" ]; then
+ ccdlflags="-Wl,-E $ccdlflags"
+else
+ ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags"
+ fi
-case "$usemymalloc" in
-'') usemymalloc='y' ;;
-esac
-alignbytes=8
-# For native nm, you need "-p" to produce BSD format output.
-nm_opt='-p'
+### COMPILER SPECIFICS
-# When HP-UX runs a script with "#!", it sets argv[0] to the script name.
-toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+## Local restrictions (point to README.hpux to lift these)
-# If your compile complains about FLT_MIN, uncomment the next line
-# POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'
+## Optimization limits
+cat >try.c <<EOF
+#include <sys/resource.h>
-# Comment this out if you don't want to follow the SVR4 filesystem layout
-# that HP-UX 10.0 uses
-case "$prefix" in
-'') prefix='/opt/perl5' ;;
-esac
+int main ()
+{
+ struct rlimit rl;
+ int i = getrlimit (RLIMIT_DATA, &rl);
+ printf ("%d\n", rl.rlim_cur / (1024 * 1024));
+ } /* main */
+EOF
+$cc -o try $ccflags $ldflags try.c
+ maxdsiz=`try`
+rm -f try try.c core
+if [ $maxdsiz -le 64 ]; then
+ # 64 Mb is probably not enough to optimize toke.c
+ # and regexp.c with -O2
+ cat <<EOM >&4
+Your kernel limits the data section of your programs to $maxdsiz Mb,
+which is (sadly) not enough to fully optimize some parts of the
+perl binary. I'll try to use a lower optimization level for
+those parts. If you are a sysadmin, and you *do* want full
+optimization, raise the 'maxdsiz' kernel configuration parameter
+to at least 0x08000000 (128 Mb) and rebuild your kernel.
+EOM
+regexec_cflags=''
+doop_cflags=''
+ fi
+
+case "$ccisgcc" in
+ $define|true|[Yy])
+
+ case "$optimize" in
+ "") optimize="-g -O" ;;
+ *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
+ esac
+ #ld="$cc"
+ ld=/usr/bin/ld
+ cccdlflags='-fPIC'
+ #lddlflags='-shared'
+ lddlflags='-b'
+ case "$optimize" in
+ *-g*-O*|*-O*-g*)
+ # gcc without gas will not accept -g
+ echo "main(){}">try.c
+ case "`$cc $optimize -c try.c 2>&1`" in
+ *"-g option disabled"*)
+ set `echo "X $optimize " | sed -e 's/ -g / /'`
+ shift
+ optimize="$*"
+ ;;
+ esac
+ ;;
+ esac
+ if [ $maxdsiz -le 64 ]; then
+ case "$optimize" in
+ *O2*) opt=`echo "$optimize" | sed -e 's/O2/O1/'`
+ toke_cflags="$toke_cflags;optimize=\"$opt\""
+ regexec_cflags="optimize=\"$opt\""
+ ;;
+ esac
+ fi
+ ;;
-# HP-UX can't do setuid emulation offered by Configure
-case "$d_dosuid" in
-'') d_dosuid="$undef" ;;
-esac
+ *) # HP's compiler cannot combine -g and -O
+ case "$optimize" in
+ "") optimize="+O2 +Onolimit" ;;
+ *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
+ esac
+ case "$optimize" in
+ *-O*|\
+ *O2*) opt=`echo "$optimize" | sed -e 's/-O/+O2/' -e 's/O2/O1/' -e 's/ *+Onolimit//'`
+ ;;
+ *) opt="$optimize"
+ ;;
+ esac
+ if [ $maxdsiz -le 64 ]; then
+ toke_cflags="$toke_cflags;optimize=\"$opt\""
+ regexec_cflags="optimize=\"$opt\""
+ fi
+ case "$archname" in
+ IA64*)
+ doop_cflags="optimize=\"$opt\""
+ ;;
+ esac
+ ld=/usr/bin/ld
+ cccdlflags='+Z'
+ lddlflags='-b +vnocompatwarnings'
+ ;;
+ esac
-# HP-UX 11 groks also LD_LIBRARY_PATH but SHLIB_PATH
-# is recommended for compatibility.
-case "$ldlibpthname" in
-'') ldlibpthname=SHLIB_PATH ;;
-esac
+## LARGEFILES
-# HP-UX 10.20 and gcc 2.8.1 break UINT32_MAX.
-case "$ccisgcc" in
-"$define") ccflags="$ccflags -DUINT32_MAX_BROKEN" ;;
-esac
-
-cat > UU/cc.cbu <<'EOSH'
-# XXX This script UU/cc.cbu will get 'called-back' by Configure after it
-# XXX has prompted the user for the C compiler to use.
-# Get gcc to share its secrets.
-echo 'main() { return 0; }' > try.c
- # Indent to avoid propagation to config.sh
- verbose=`${cc:-cc} -v -o try try.c 2>&1`
-if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
- # Using gcc.
- : nothing to see here, move on.
+#case "$uselargefiles-$ccisgcc" in
+# "$define-$define"|'-define')
+# cat <<EOM >&4
+#
+#*** I'm ignoring large files for this build because
+#*** I don't know how to do use large files in HP-UX using gcc.
+#
+#EOM
+# uselargefiles="$undef"
+# ;;
+# esac
+
+# Once we have the compiler flags defined, Configure will
+# execute the following call-back script. See hints/README.hints
+# for details.
+cat > UU/cc.cbu <<'EOCBU'
+# This script UU/cc.cbu will get 'called-back' by Configure after it
+# has prompted the user for the C compiler to use.
+
+# Compile and run the a test case to see if a certain gcc bug is
+# present. If so, lower the optimization level when compiling
+# pp_pack.c. This works around a bug in unpack.
+
+if test -z "$ccisgcc" -a -z "$gccversion"; then
+ : no tests needed for HPc
else
- # Using cc.
- ar=${ar:-ar}
- case "`$ar -V 2>&1`" in
- *GNU*)
- if test -x /usr/bin/ar; then
- cat <<END >&2
-
-*** You are using HP cc(1) but GNU ar(1). This might lead into trouble
-*** later on, I'm switching to HP ar to play safe.
-
-END
- ar=/usr/bin/ar
+ echo " "
+ echo "Testing for a certain gcc bug is fixed in your compiler..."
+
+ # Try compiling the test case.
+ if $cc -o t001 -O $ccflags $ldflags -lm ../hints/t001.c; then
+ gccbug=`$run ./t001`
+ case "$gccbug" in
+ *fails*)
+ cat >&4 <<EOF
+This C compiler ($gccversion) is known to have optimizer
+problems when compiling pp_pack.c.
+
+Disabling optimization for pp_pack.c.
+EOF
+ case "$pp_pack_cflags" in
+ '') pp_pack_cflags='optimize='
+ echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;;
+ *) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;;
+ esac
+ ;;
+ *) echo "Your compiler is ok." >&4
+ ;;
+ esac
+ else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
+ '') echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
+ ;;
+ esac
+ fi
+
+ rm -f t001$_o t001$_exe
+ fi
+EOCBU
+
+cat >UU/uselargefiles.cbu <<'EOCBU'
+# This script UU/uselargefiles.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use large files.
+case "$uselargefiles" in
+ ""|$define|true|[yY]*)
+ # there are largefile flags available via getconf(1)
+ # but we cheat for now. (Keep that in the left margin.)
+ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
+ case " $ccflags " in
+ *" $ccflags_uselargefiles "*) ;;
+ *) ccflags="$ccflags $ccflags_uselargefiles" ;;
+ esac
+
+ if test -z "$ccisgcc" -a -z "$gccversion"; then
+ # The strict ANSI mode (-Aa) doesn't like large files.
+ ccflags=`echo " $ccflags "|sed 's@ -Aa @ @g'`
+ case "$ccflags" in
+ *-Ae*) ;;
+ *) ccflags="$ccflags -Ae" ;;
+ esac
fi
;;
esac
-fi
-
-EOSH
+EOCBU
-# Date: Fri, 6 Sep 96 23:15:31 CDT
-# From: "Daniel S. Lewart" <d-lewart@uiuc.edu>
-# I looked through the gcc.info and found this:
-# * GNU CC compiled code sometimes emits warnings from the HP-UX
-# assembler of the form:
-# (warning) Use of GR3 when frame >= 8192 may cause conflict.
-# These warnings are harmless and can be safely ignored.
+# THREADING
-cat > UU/usethreads.cbu <<'EOCBU'
# 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]*)
- if [ "$xxOsRevMajor" -lt 10 ]; then
- cat <<EOM >&4
+ $define|true|[yY]*)
+ if [ "$xxOsRevMajor" -lt 10 ]; then
+ cat <<EOM >&4
HP-UX $xxOsRevMajor cannot support POSIX threads.
Consider upgrading to at least HP-UX 11.
Cannot continue, aborting.
EOM
- exit 1
- fi
- case "$xxOsRevMajor" in
- 10)
- # Under 10.X, a threaded perl can be built
- if [ -f /usr/include/pthread.h ]; then
+ exit 1
+ fi
+
+ if [ "$xxOsRevMajor" -eq 10 ]; then
+ # Under 10.X, a threaded perl can be built
+ if [ -f /usr/include/pthread.h ]; then
if [ -f /usr/lib/libcma.sl ]; then
# DCE (from Core OS CD) is installed
- # It needs # libcma and OLD_PTHREADS_API. Also <pthread.h>
- # needs to be #included before any other includes
- # (in perl.h)
+ # Check if it is pristine, or patched
+ cmavsn=`what /usr/lib/libcma.sl 2>&1 | grep 1996`
+ if [ ! -z "$cmavsn" ]; then
+ cat <<EOM >&4
+
+***************************************************************************
+
+Perl will support threading through /usr/lib/libcma.sl from
+the HP DCE package, but the version found is too old to be
+reliable.
+
+If you are not depending on this specific version of the library,
+consider to upgrade using patch PHSS_23672 (read README.hpux)
+
+***************************************************************************
+
+(sleeping for 10 seconds...)
+EOM
+ sleep 10
+ fi
+
+ # It needs # libcma and OLD_PTHREADS_API. Also
+ # <pthread.h> needs to be #included before any
+ # other includes (in perl.h)
# HP-UX 10.X uses the old pthreads API
d_oldpthreads="$define"
@@ -353,11 +542,27 @@ EOM
# include libcma before all the others
libswanted="cma $libswanted"
- # tell perl.h to include <pthread.h> before other include files
+ # tell perl.h to include <pthread.h> before other
+ # include files
ccflags="$ccflags -DPTHREAD_H_FIRST"
-
- # CMA redefines select to cma_select, and cma_select expects int *
- # instead of fd_set * (just like 9.X)
+# First column on purpose:
+# this is not a standard Configure variable
+# but we need to get this noticed.
+pthread_h_first="$define"
+
+ # HP-UX 10.X seems to have no easy
+ # way of detecting these *time_r protos.
+ d_gmtime_r_proto='define'
+ gmtime_r_proto='REENTRANT_PROTO_I_TS'
+ d_localtime_r_proto='define'
+ localtime_r_proto='REENTRANT_PROTO_I_TS'
+
+ # Avoid the poisonous conflicting (and irrelevant)
+ # prototypes of setkey().
+ i_crypt="$undef"
+
+ # CMA redefines select to cma_select, and cma_select
+ # expects int * instead of fd_set * (just like 9.X)
selecttype='int *'
elif [ -f /usr/lib/libpthread.sl ]; then
@@ -370,8 +575,8 @@ EOM
libswanted="no_threads_available"
fi
- if [ $libswanted = "no_threads_available" ]; then
- cat <<EOM >&4
+ if [ $libswanted = "no_threads_available" ]; then
+ cat <<EOM >&4
In HP-UX 10.X for POSIX threads you need both of the files
/usr/include/pthread.h and either /usr/lib/libcma.sl or /usr/lib/libpthread.sl.
@@ -381,62 +586,65 @@ Either you must upgrade to HP-UX 11 or install a posix thread library:
or
- PTH package from http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html
+ PTH package from e.g. http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html
Cannot continue, aborting.
EOM
- exit 1
+ exit 1
fi
+ else
+ # 12 may want upping the _POSIX_C_SOURCE datestamp...
+ ccflags=" -D_POSIX_C_SOURCE=199506L -D_REENTRANT $ccflags"
+ set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+ shift
+ libswanted="$*"
+ fi
- ;;
- 11 | 12) # 12 may want upping the _POSIX_C_SOURCE datestamp...
- ccflags=" -D_POSIX_C_SOURCE=199506L $ccflags"
- set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
- shift
- libswanted="$*"
- ;;
- esac
- usemymalloc='n'
;;
-esac
+ esac
EOCBU
-case "$uselargefiles-$ccisgcc" in
-"$define-$define"|'-define')
- cat <<EOM >&4
-
-*** I'm ignoring large files for this build because
-*** I don't know how to do use large files in HP-UX using gcc.
-
-EOM
- uselargefiles="$undef"
- ;;
-esac
-
-cat > UU/uselargefiles.cbu <<'EOCBU'
-# This script UU/uselargefiles.cbu will get 'called-back' by Configure
-# after it has prompted the user for whether to use large files.
-case "$uselargefiles" in
-''|$define|true|[yY]*)
- # there are largefile flags available via getconf(1)
- # but we cheat for now. (Keep that in the left margin.)
-ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-
- ccflags="$ccflags $ccflags_uselargefiles"
-
- if test -z "$ccisgcc" -a -z "$gccversion"; then
- # The strict ANSI mode (-Aa) doesn't like large files.
- ccflags=`echo " $ccflags "|sed 's@ -Aa @ @g'`
- case "$ccflags" in
- *-Ae*) ;;
- *) ccflags="$ccflags -Ae" ;;
+# The mysterious io_xs memory corruption in 11.00 32bit seems to get
+# fixed by not using Perl's malloc. Flip side is performance loss.
+# So we want mymalloc for all situations possible
+usemymalloc='y'
+case "$usethreads" in
+ $define|true|[yY]*) usemymalloc='n' ;;
+ *) case "$ccisgcc" in
+ $undef|false|[nN]*)
+ case "$use64bitint" in
+ $undef|false|[nN]*)
+ case "$ccflags" in
+ *-DDEBUGGING*) ;;
+ *) usemymalloc='n' ;;
+ esac
+ ;;
+ esac
+ ;;
esac
- fi
-
- ;;
-esac
-EOCBU
+ ;;
+ esac
-# keep that leading tab.
- ccisgcc=''
+usemymalloc='n'
+case "$useperlio" in
+ $undef|false|[nN]*) usemymalloc='y' ;;
+ esac
+# fpclassify() is a macro, the library call is Fpclassify
+# Similarly with the others below.
+d_fpclassify='define'
+d_isnan='define'
+d_isinf='define'
+d_isfinite='define'
+d_unordered='define'
+# Next one(s) need the leading tab. These are special 'hint' symbols that
+# are not to be propagated to config.sh, all related to pthreads draft 4
+# interfaces.
+case "$d_oldpthreads" in
+ ''|$undef)
+ d_crypt_r_proto='undef'
+ d_getgrent_r_proto='undef'
+ d_getpwent_r_proto='undef'
+ d_strerror_r_proto='undef'
+ ;;
+ esac
diff --git a/hints/irix_5.sh b/hints/irix_5.sh
index f895bcc5f6..025596d863 100644
--- a/hints/irix_5.sh
+++ b/hints/irix_5.sh
@@ -12,7 +12,17 @@ i_time='define'
case "$cc" in
*gcc*) ccflags="$ccflags -D_BSD_TYPES" ;;
-*) ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 4000" ;;
+*)
+ # The warnings turned off are:
+ # 608: Undefined the ANSI standard library defined macro stderr (nostdio.h)
+ # 658: bit-field 'th_off' type required to be int, unsigned int, or signed int. <netinet/tcp.h>
+ # 734: enum declaration must contain enum literals <sys/vnode.h>
+ # 799: 'long long' is not standard ANSI.
+ ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 4000 -woff 608,658,734,799"
+# Without this the cc thinks that a struct timeval * is not equivalent to
+# a struct timeval *. Yeah, you read that right.
+pp_sys_cflags='ccflags="$ccflags -DPERL_IRIX5_SELECT_TIMEVAL_VOID_CAST"'
+ ;;
esac
lddlflags="-shared"
@@ -22,6 +32,13 @@ set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'
shift
libswanted="$*"
+# IRIX 5.x does not have -woff for ld.
+# Don't groan about unused libraries.
+# case "$ldflags" in
+# *-Wl,-woff,84*) ;;
+# *) ldflags="$ldflags -Wl,-woff,84" ;;
+# esac
+
# Date: Fri, 22 Dec 1995 11:49:17 -0800
# From: Matthew Black <black@csulb.edu>
# Subject: sockets broken under IRIX 5.3? YES...how to fix
diff --git a/hints/irix_6.sh b/hints/irix_6.sh
index e6117cf1af..51a4d75bc1 100644
--- a/hints/irix_6.sh
+++ b/hints/irix_6.sh
@@ -3,7 +3,7 @@
# original from Krishna Sethuraman, krishna@sgi.com
#
# Modified Mon Jul 22 14:52:25 EDT 1996
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
# with help from Dean Roehrich <roehrich@cray.com>.
# cc -n32 update info from Krishna Sethuraman, krishna@sgi.com.
# additional update from Scott Henry, scotth@sgi.com
@@ -13,9 +13,8 @@
# - tries to check for various compiler versions and do the right
# thing when it can
# - warnings turned off (-n32 messages):
-# 1116 - non-void function should return a value
-# 1048 - cast between pointer-to-object and pointer-to-function
-# 1042 - operand types are incompatible
+# 1184 - "=" is used where where "==" may have been intended
+# 1552 - variable "foo" set but never used
# Tweaked by Chip Salzenberg <chip@perl.com> on 5/13/97
# - don't assume 'cc -n32' if the n32 libm.so is missing
@@ -38,7 +37,43 @@
# If that fails, or you didn't use that, then try adjusting other
# optimization options (-LNO, -INLINE, -O3 to -O2, etcetera).
# The compiler bug has been reported to SGI.
-# -- Allen Smith <easmith@beatrice.rutgers.edu>
+# -- Allen Smith <allens@cpan.org>
+
+case "$use64bitall" in
+$define|true|[yY]*)
+ case "`uname -s`" in
+ IRIX)
+ cat <<END >&2
+You have asked for use64bitall but you aren't running on 64-bit IRIX.
+I'll try changing it to use64bitint.
+END
+ use64bitall="$undef"
+
+ case "`uname -r`" in
+ [1-5]*|6.[01])
+ cat <<END >&2
+Sorry, can't do use64bitint either. Try upgrading to IRIX 6.2 or later.
+END
+ use64bitint="$undef"
+ ;;
+ *) use64bitint="$define"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
+
+# Until we figure out what to be probed for in Configure (ditto for hpux.sh)
+case "$usemorebits" in # Need to expand this now, then.
+$define|true|[yY]*)
+ case "`uname -r`" in
+ [1-5]*|6.[01])
+ uselongdouble="$define"
+ ;;
+ *) use64bitint="$define" uselongdouble="$define" ;;
+ esac
+esac
# Let's assume we want to use 'cc -n32' by default, unless the
# necessary libm is missing (which has happened at least twice)
@@ -49,53 +84,40 @@ case "$cc" in
esac
esac
-cc=${cc:-cc}
-
-case "$cc" in
-*gcc*) ;;
-*) ccversion=`cc -version` ;;
-esac
-
case "$use64bitint" in
-$define|true|[yY]*)
- case "`uname -r`" in
- [1-5]*|6.[01])
- cat >&4 <<EOM
-IRIX `uname -r` does not support 64-bit types.
-You should upgrade to at least IRIX 6.2.
-Cannot continue, aborting.
-EOM
- exit 1
- ;;
- esac
- ;;
+ "$define"|true|[yY]*) ;;
+ *) d_casti32="$undef" ;;
esac
-case "$use64bitall" in
-"$define"|true|[yY]*)
- case "`uname -s`" in
- IRIX)
- cat >&4 <<EOM
-You cannot use -Duse64bitall in 32-bit IRIX, sorry.
+cc=${cc:-cc}
+cat=${cat:-cat}
-Cannot continue, aborting.
-EOM
- exit 1
- ;;
- esac
- ;;
+$cat > UU/cc.cbu <<'EOCCBU'
+# This script UU/cc.cbu will get 'called-back' by Configure after it
+# has prompted the user for the C compiler to use.
+
+case "$cc" in
+*gcc*) ;;
+*) ccversion=`cc -version 2>&1` ;;
esac
# Check for which compiler we're using
case "$cc" in
*"cc -n32"*)
+ test -z "$ldlibpthname" && ldlibpthname='LD_LIBRARYN32_PATH'
# If a library is requested to link against, make sure the
# objects in the library are of the same ABI we are compiling
# against. Albert Chin-A-Young <china@thewrittenword.com>
+
+ # In other words, you no longer have to worry regarding having old
+ # library paths (/usr/lib) in the searchpath for -n32 or -64; thank
+ # you very much, Albert! Now if we could just get more module authors
+ # to use something like this... - Allen
+
libscheck='case "$xxx" in
-*.a) /bin/ar p $xxx `/bin/ar t $xxx | /usr/bsd/head -1` >$$.o;
+*.a) /bin/ar p $xxx `/bin/ar t $xxx | sed q` >$$.o;
case "`/usr/bin/file $$.o`" in
*N32*) rm -f $$.o ;;
*) rm -f $$.o; xxx=/no/n32$xxx ;;
@@ -107,37 +129,49 @@ case "$cc" in
esac'
# NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker
- ldflags=' -L/usr/local/lib32 -L/usr/local/lib'
+ test -z "$ldflags" && ldflags=' -L/usr/local/lib32 -L/usr/local/lib'
cccdlflags=' '
# From: David Billinghurst <David.Billinghurst@riotinto.com.au>
# If you get complaints about so_locations then change the following
# line to something like:
# lddlflags="-n32 -shared -check_registry /usr/lib32/so_locations"
- lddlflags="-n32 -shared"
- libc='/usr/lib32/libc.so'
- plibpth='/usr/lib32 /lib32 /usr/ccs/lib'
+ test -z "$lddlflags" && lddlflags="-n32 -shared"
+ test -z "$libc" && libc='/usr/lib32/libc.so'
+ test -z "$plibpth" && plibpth='/usr/lib32 /lib32 /usr/ccs/lib'
;;
*"cc -64"*)
-
+ case "`uname -s`" in
+ IRIX)
+ $cat >&4 <<EOM
+You cannot use cc -64 or -Duse64bitall in 32-bit IRIX, sorry.
+Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+ test -z "$ldlibpthname" && ldlibpthname='LD_LIBRARY64_PATH'
+ test -z "$use64bitall" && use64bitall="$define"
+ test -z "$use64bitint" && use64bitint="$define"
loclibpth="$loclibpth /usr/lib64"
libscheck='case "`/usr/bin/file $xxx`" in
*64-bit*) ;;
*) xxx=/no/64-bit$xxx ;;
esac'
# NOTE: -L/usr/lib64 -L/lib64 are automatically selected by the linker
- ldflags=' -L/usr/local/lib64 -L/usr/local/lib'
+ test -z "$ldflags" && ldflags=' -L/usr/local/lib64 -L/usr/local/lib'
cccdlflags=' '
+ test -z "$archname64" && archname64='64all'
# From: David Billinghurst <David.Billinghurst@riotinto.com.au>
# If you get complaints about so_locations then change the following
# line to something like:
# lddlflags="-64 -shared -check_registry /usr/lib64/so_locations"
- lddlflags="-64 -shared"
- libc='/usr/lib64/libc.so'
- plibpth='/usr/lib64 /lib64 /usr/ccs/lib'
+ test -z lddlflags="-64 -shared"
+ test -z "$libc" && libc='/usr/lib64/libc.so'
+ test -z "$plibpth" && plibpth='/usr/lib64 /lib64 /usr/ccs/lib'
;;
*gcc*)
- ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -D_POSIX_C_SOURCE"
- optimize="-O3"
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME"
+ test -z "$optimize" && optimize="-O3"
usenm='undef'
case "`uname -s`" in
# Without the -mabi=64 gcc in 64-bit IRIX has problems passing
@@ -163,7 +197,7 @@ esac
# Settings common to both native compiler modes.
case "$cc" in
*"cc -n32"*|*"cc -64"*)
- ld=$cc
+ test -z "$ld" && ld=$cc
# perl's malloc can return improperly aligned buffer
# which (under 5.6.0RC1) leads into really bizarre bus errors
@@ -176,10 +210,18 @@ case "$cc" in
# miniperl, as was Scott Henry with snapshots from just before
# the RC1. --jhi
usemymalloc='undef'
-#malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"'
- nm_opt='-p'
- nm_so_opt='-p'
+ # Was at the first of the line - Allen
+ #malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"'
+
+ nm_opt="$nm_opt -p"
+ nm_so_opt="$nm_so_opt -p"
+
+ # Warnings to turn off because the source code hasn't
+ # been cleaned up enough yet to satisfy the IRIX cc.
+ # 1184: "=" is used where where "==" may have been intended.
+ # 1552: The variable "foobar" is set but never used.
+ woff=1184,1552
# Perl 5.004_57 introduced new qsort code into pp_ctl.c that
# makes IRIX cc prior to 7.2.1 to emit bad code.
@@ -188,28 +230,49 @@ case "$cc" in
# Check for which version of the compiler we're running
case "`$cc -version 2>&1`" in
*7.0*) # Mongoose 7.0
- ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1042,1048,1110,1116,1174,1184,1552 -OPT:Olimit=0"
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0"
optimize='none'
;;
*7.1*|*7.2|*7.20) # Mongoose 7.1+
- ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0"
- optimize='-O3'
-# This is a temporary fix for 5.005.
-# Leave pp_ctl_cflags line at left margin for Configure. See
-# hints/README.hints, especially the section
-# =head2 Propagating variables to config.sh
-pp_ctl_cflags='optimize=-O'
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff"
+ case "$optimize" in
+ '') optimize='-O3 -OPT:Olimit=0' ;;
+ '-O') optimize='-O3 -OPT:Olimit=0' ;;
+ *) ;;
+ esac
+
+ # This is a temporary fix for 5.005+.
+ # See hints/README.hints, especially the section
+ # =head2 Propagating variables to config.sh
+
+ # Note the part about case statements not working without
+ # weirdness like the below echo statement... and, since
+ # we're in a callback unit, it's to config.sh, not UU/config.sh
+ # - Allen
+
+
+ pp_ctl_cflags="$pp_ctl_flags optimize=\"$optimize -O1\""
+ echo "pp_ctl_cflags=\"$pp_ctl_flags optimize=\\\"\$optimize -O1\\\"\"" >> config.sh
;;
+
+
+
+# XXX What is space=ON doing in here? Could someone ask Scott Henry? - Allen
+
*7.*) # Mongoose 7.2.1+
- ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0:space=ON"
- optimize='-O3'
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff"
+ case "$optimize" in
+ '') optimize='-O3 -OPT:Olimit=0:space=ON' ;;
+ '-O') optimize='-O3 -OPT:Olimit=0:space=ON' ;;
+ *) ;;
+ esac
;;
*6.2*) # Ragnarok 6.2
- ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552"
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff"
optimize='none'
;;
*) # Be safe and not optimize
- ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0"
+ ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff"
optimize='none'
;;
esac
@@ -237,31 +300,41 @@ pp_ctl_cflags='optimize=-O'
;;
esac
-# Don't groan about unused libraries.
-ldflags="$ldflags -Wl,-woff,84"
-
# workaround for an optimizer bug
+# Made to work via UU/config.sh thing (or, rather, config.sh, since we're in
+# a callback) from README.hints, plus further stuff; doesn't handle -g still,
+# unfortunately - Allen
case "`$cc -version 2>&1`" in
-*7.2.*) op_cflags='optimize=-O1'; opmini_cflags='optimize=-O1' ;;
-*7.3.1.*) op_cflags='optimize=-O2'; opmini_cflags='optimize=-O2' ;;
+*7.2.*)
+ test -z "$op_cflags" && echo "op_cflags=\"optimize=\\\"\$optimize -O1\\\"\"" >> config.sh
+ test -z "$op_cflags" && op_cflags="optimize=\"\$optimize -O1\""
+ test -z "$opmini_cflags" && echo "opmini_cflags=\"optimize=\\\"\$optimize -O1\\\"\"" >> config.sh
+ test -z "$opmini_cflags" && opmini_cflags="optimize=\"\$optimize -O1\""
+ ;;
+*7.3.1.*)
+ test -z "$op_cflags" && echo "op_cflags=\"optimize=\\\"\$optimize -O2\\\"\"" >> config.sh
+ test -z "$op_cflags" && op_cflags="$op_cflags optimize=\"\$optimize -O2\""
+ test -z "$opmini_cflags" && echo "opmini_cflags=\"optimize=\\\"\$optimize -O2\\\"\"" >> config.sh
+ test -z "$opmini_cflags" && opmini_cflags="optimize=\"\$optimize -O2\""
+ ;;
esac
+EOCCBU
+
+# End of cc.cbu callback unit. - Allen
+
# We don't want these libraries.
# Socket networking is in libc, these are not installed by default,
# and just slow perl down. (scotth@sgi.com)
-set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'`
+# librt contains nothing we need (some places need it for Time::HiRes) --jhi
+set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /' -e 's/ rt / /'`
shift
libswanted="$*"
-# Irix 6.5.6 seems to have a broken header <sys/mode.h>
-# don't include that (it doesn't contain S_IFMT, S_IFREG, et al)
-
-i_sysmode="$undef"
-
# I have conflicting reports about the sun, crypt, bsd, and PW
# libraries on Irix 6.2.
#
-# One user rerports:
+# One user reports:
# Don't need sun crypt bsd PW under 6.2. You *may* need to link
# with these if you want to run perl built under 6.2 on a 5.3 machine
# (I haven't checked)
@@ -282,7 +355,33 @@ set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /'
shift
libswanted="$*"
-cat > UU/usethreads.cbu <<'EOCBU'
+# libbind.{so|a} would be from a BIND/named installation - IRIX 6.5.* has
+# pretty much everything that would be useful in libbind in libc, including
+# accessing a local caching server (nsd) that will also look in /etc/hosts,
+# NIS (yuck!), etcetera. libbind also doesn't have the _r (thread-safe
+# reentrant) functions.
+# - Allen <easmith@beatrice.rutgers.edu>
+
+case "`uname -r`" in
+6.5)
+ set `echo X "$libswanted "|sed -e 's/ bind / /'`
+ shift
+ libswanted="$*"
+ ;;
+esac
+
+# Don't groan about unused libraries.
+case "$ldflags" in
+ *-Wl,-woff,84*) ;;
+ *) ldflags="$ldflags -Wl,-woff,84" ;;
+esac
+
+# Irix 6.5.6 seems to have a broken header <sys/mode.h>
+# don't include that (it doesn't contain S_IFMT, S_IFREG, et al)
+
+i_sysmode="$undef"
+
+$cat > UU/usethreads.cbu <<'EOCBU'
# This script UU/usethreads.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use threads.
case "$usethreads" in
@@ -323,14 +422,194 @@ EOM
exit 1
fi
set `echo X "$libswanted "| sed -e 's/ c / pthread /'`
- ld="${cc:-cc}"
shift
libswanted="$*"
usemymalloc='n'
+
+ # These are hidden behind a _POSIX1C ifdef that would
+ # require including <pthread.h> for the Configure hasproto
+ # to see these.
+
+# d_asctime_r_proto="$define"
+# d_ctime_r_proto="$define"
+# d_gmtime_r_proto="$define"
+# d_localtime_r_proto="$define"
+
+ # Safer just to go ahead and include it, for other ifdefs like them
+ # (there are a lot, such as in netdb.h). - Allen
+ ccflags="$ccflags -DPTHREAD_H_FIRST"
+
+ pthread_h_first="$define"
+ echo "pthread_h_first='define'" >> config.sh
+
;;
+
esac
EOCBU
# The -n32 makes off_t to be 8 bytes, so we should have largefileness.
+$cat > UU/use64bitint.cbu <<'EOCBU'
+# This script UU/use64bitint.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use 64 bit integers.
+
+case "$use64bitint" in
+$define|true|[yY]*)
+ case "`uname -r`" in
+ [1-5]*|6.[01])
+ cat >&4 <<EOM
+IRIX `uname -r` does not support 64-bit types.
+You should upgrade to at least IRIX 6.2.
+Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+ usemymalloc="$undef"
+ ;;
+*) d_casti32="$undef" ;;
+esac
+
+EOCBU
+
+$cat > UU/use64bitall.cbu <<'EOCBU'
+# This script UU/use64bitall.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to be maximally 64 bitty.
+
+case "$use64bitall" in
+$define|true|[yY]*)
+ case "$cc" in
+ *-n32*|*-32*)
+ cat >&4 <<EOM
+You cannot use a non-64 bit cc for -Duse64bitall, sorry.
+Cannot continue, aborting.
+EOM
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+EOCBU
+
+$cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+
+# This script is designed to test IRIX (and other machines, once it's put into
+# Configure) for a bug in which they fail to round correctly when using
+# sprintf/printf/etcetera on a long double with precision specified (%.0Lf or
+# whatever). Sometimes, this only happens when the number in question is
+# between 1 and -1, weirdly enough. - Allen
+
+case "$uselongdouble" in
+$define|true|[yY]*)
+
+case "$d_PRIfldbl" in
+$define|true|[yY]*)
+
+ echo " " >try.c
+ $cat >>try.c <<EOP
+#include <stdio.h>
+
+#define sPRIfldbl $sPRIfldbl
+
+#define I_STDLIB $i_stdlib
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+
+int main()
+{
+ char buf1[64];
+ char buf2[64];
+ buf1[63] = '\0';
+ buf2[63] = '\0';
+
+ (void)sprintf(buf1,"%.0"sPRIfldbl,(long double)0.6L);
+ (void)sprintf(buf2,"%.0f",(double)0.6);
+ if (strcmp(buf1,buf2)) {
+ exit(1);
+ }
+ (void)sprintf(buf1,"%.0"sPRIfldbl,(long double)-0.6L);
+ (void)sprintf(buf2,"%.0f",(double)-0.6);
+ if (strcmp(buf1,buf2)) {
+ exit(1);
+ } else {
+ exit(0);
+ }
+}
+
+EOP
+
+ set try
+ if eval $compile && $run ./try; then
+ rm -f try try.* >/dev/null
+ else
+ rm -f try try.* core a.out >/dev/null
+ ccflags="$ccflags -DHAS_LDBL_SPRINTF_BUG"
+ cppflags="$cppflags -DHAS_LDBL_SPRINTF_BUG"
+
+ echo " " >try.c
+ $cat >>try.c <<EOP
+#include <stdio.h>
+
+#define sPRIfldbl $sPRIfldbl
+
+#define I_STDLIB $i_stdlib
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+
+int main()
+{
+ char buf1[64];
+ char buf2[64];
+ buf1[63] = '\0';
+ buf2[63] = '\0';
+
+ (void)sprintf(buf1,"%.0"sPRIfldbl,(long double)1.6L);
+ (void)sprintf(buf2,"%.0f",(double)1.6);
+ if (strcmp(buf1,buf2)) {
+ exit(1);
+ }
+ (void)sprintf(buf1,"%.0"sPRIfldbl,(long double)-1.6L);
+ (void)sprintf(buf2,"%.0f",(double)-1.6);
+ if (strcmp(buf1,buf2)) {
+ exit(1);
+ } else {
+ exit(0);
+ }
+}
+
+EOP
+
+ set try
+ if eval $compile && $run ./try; then
+ rm -f try try.c >/dev/null
+ ccflags="$ccflags -DHAS_LDBL_SPRINTF_BUG_LESS1"
+ cppflags="$cppflags -DHAS_LDBL_SPRINTF_BUG_LESS1"
+ else
+ rm -f try try.c core try.o a.out >/dev/null
+ fi
+ fi
+;;
+*) # Can't tell!
+ ccflags="$ccflags -DHAS_LDBL_SPRINTF_BUG"
+ cppflags="$cppflags -DHAS_LDBL_SPRINTF_BUG"
+ ;;
+esac
+
+# end of case statement for how to print ldbl with 'f'
+;;
+*) ;;
+esac
+
+# end of case statement for whether to do long doubles
+
+EOCBU
+
+# Helmut Jarausch reports that Perl's malloc is rather unusable
+# with IRIX, and SGI confirms the problem.
+usemymalloc=${usemymalloc:-false}
diff --git a/hints/isc.sh b/hints/isc.sh
index cdfe91c605..2b97618d44 100644
--- a/hints/isc.sh
+++ b/hints/isc.sh
@@ -1,7 +1,7 @@
# isc.sh
# Interactive Unix Versions 3 and 4.
# Compile perl entirely in posix mode.
-# Andy Dougherty doughera@lafcol.lafayette.edu
+# Andy Dougherty doughera@lafayette.edu
# Wed Oct 5 15:57:37 EDT 1994
#
# Use Configure -Dcc=gcc to use gcc
diff --git a/hints/isc_2.sh b/hints/isc_2.sh
index d8ca7dc63a..9a7da8c7eb 100644
--- a/hints/isc_2.sh
+++ b/hints/isc_2.sh
@@ -1,7 +1,7 @@
# isc_2.sh
# Interactive Unix Version 2.2
# Compile perl entirely in posix mode.
-# Andy Dougherty doughera@lafcol.lafayette.edu
+# Andy Dougherty doughera@lafayette.edu
# Wed Oct 5 15:57:37 EDT 1994
#
# Use Configure -Dcc=gcc to use gcc
diff --git a/hints/linux.sh b/hints/linux.sh
index a6b2bd985a..caf380a5ab 100644
--- a/hints/linux.sh
+++ b/hints/linux.sh
@@ -6,11 +6,11 @@
# Additional info from Nigel Head <nhead@ESOC.bitnet>
# and Kenneth Albanowski <kjahds@kjahds.com>
#
-# Consolidated by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Consolidated by Andy Dougherty <doughera@lafayette.edu>
#
# Updated Thu Feb 8 11:56:10 EST 1996
-# Updated Thu May 30 10:50:22 EDT 1996 by <doughera@lafcol.lafayette.edu>
+# Updated Thu May 30 10:50:22 EDT 1996 by <doughera@lafayette.edu>
# Updated Fri Jun 21 11:07:54 EDT 1996
# NDBM support for ELF renabled by <kjahds@kjahds.com>
@@ -39,35 +39,6 @@ d_suidsafe='undef'
# do the implicit mapping.
ignore_versioned_solibs='y'
-# perl goes into the /usr tree. See the Filesystem Standard
-# available via anonymous FTP at tsx-11.mit.edu in
-# /pub/linux/docs/linux-standards/fsstnd.
-# Allow a command line override, e.g. Configure -Dprefix=/foo/bar
-#
-# Addendum for 5.005_57 and beyond:
-#
-# However, most Linux users probably already have a /usr/bin/perl.
-# We can't know whether the current user is intending to *replace*
-# that /usr/bin/perl or whether the user is intending to install
-# a *different* installation.
-#
-# Here is what we used to do:
-# Allow a command line override, e.g. Configure -Dprefix=/foo/bar
-# case "$prefix" in
-# '') prefix='/usr' ;;
-# esac
-#
-# For now, let's assume that most Linux users get their /usr/bin/perl
-# from some packaging system, so that those compiling from source are
-# probably the more experimental folks and hence probably aren't
-# intending to replace /usr/bin/perl (at least just yet).
-# This change makes linux consistent with most other unix platforms
-# in having a default of prefix=/usr/local.
-# These notes can probably safely be removed in 5.005_50 and beyond.
-#
-# 9 April 1999 Andy Dougherty <doughera@lafayette.edu>
-#
-
# BSD compatability library no longer needed
# 'kaffe' has a /usr/lib/libnet.so which is not at all relevent for perl.
set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /'`
@@ -77,9 +48,7 @@ libswanted="$*"
# If you have glibc, then report the version for ./myconfig bug reporting.
# (Configure doesn't need to know the specific version since it just uses
# gcc to load the library for all tests.)
-# Is this sufficiently robust for libc5 systems as well as
-# glibc-2.1.x systems?
-# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
+# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
# are insufficiently precise to distinguish things like
# libc-2.0.6 and libc-2.0.7.
if test -L /lib/libc.so.6; then
@@ -91,13 +60,27 @@ fi
# function in <sys/stat.h>.
d_lstat=define
-# Explanation?
+# The system malloc() is about as fast and as frugal as perl's.
+# Since the system malloc() has been the default since at least
+# 5.001, we might as well leave it that way. --AD 10 Jan 2002
case "$usemymalloc" in
'') usemymalloc='n' ;;
esac
case "$optimize" in
-'') optimize='-O2' ;;
+'') # If we have modern enough gcc and well-supported enough CPU,
+ # crank up the optimization level.
+ case "`${cc:-gcc} -v 2>&1`" in
+ *"gcc version 2.95"*|*"gcc version 3."*)
+ case "`arch 2>&1`" in
+ i?86|ppc) optimize='-O3' ;;
+ esac
+ ;;
+ esac
+ case "$optimize" in
+ '') optimize='-O2' ;;
+ esac
+ ;;
esac
# Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com>
@@ -119,17 +102,13 @@ main() {
exit(0); /* succeed (yes, it's ELF) */
}
EOM
-if ${cc:-gcc} try.c >/dev/null 2>&1 && ./a.out; then
+if ${cc:-gcc} try.c >/dev/null 2>&1 && $run ./a.out; then
cat <<'EOM' >&4
You appear to have ELF support. I'll try to use it for dynamic loading.
If dynamic loading doesn't work, read hints/linux.sh for further information.
EOM
-#For RedHat Linux 3.0.3, you may need to fetch
-# ftp://ftp.redhat.com/pub/redhat-3.0.3/i386/updates/RPMS/ld.so-1.7.14-3.i386.rpm
-#
-
else
cat <<'EOM' >&4
@@ -155,8 +134,8 @@ EOM
#so='none'
# In addition, on some systems there is a problem with perl and NDBM
- # which causes AnyDBM and NDBM_File to lock up. This is evidenced
- # in the tests as AnyDBM just freezing. Apparently, this only
+ # which causes AnyDBM and NDBM_File to lock up. This is evidenced
+ # in the tests as AnyDBM just freezing. Apparently, this only
# happens on a.out systems, so we disable NDBM for all a.out linux
# systems. If someone can suggest a more robust test
# that would be appreciated.
@@ -169,7 +148,7 @@ EOM
# just as advertised. Checking into it, I found that the lockup was
# during the call to dbm_open. Not *in* dbm_open -- but between the call
# to and the jump into.
- #
+ #
# To make a long story short, making sure that the *.a and *.sa pairs of
# /usr/lib/lib{m,db,gdbm}.{a,sa}
# were perfectly in sync took care of it.
@@ -219,32 +198,33 @@ fi
# For this reason I suggest using the much bug-fixed tcsh for globbing
# where available.
-if [ ! "`csh -c 'echo $version' 2>/dev/null`" ]
-then
- echo 'Real csh found (might break); looking for tcsh ...'
- # Use ./UU/loc to find tcsh. (We no longer run in the hints/ directory)
+# November 2001: That warning's pretty old now and probably not so
+# relevant, especially since perl now uses File::Glob for globbing.
+# We'll still look for tcsh, but tone down the warnings.
+# Andy Dougherty, Nov. 6, 2001
+if $csh -c 'echo $version' >/dev/null 2>&1; then
+ echo 'Your csh is really tcsh. Good.'
+else
if xxx=`./UU/loc tcsh blurfl $pth`; $test -f "$xxx"; then
echo "Found tcsh. I'll use it for globbing."
# We can't change Configure's setting of $csh, due to the way
# Configure handles $d_portable and commands found in $loclist.
# We can set the value for CSH in config.h by setting full_csh.
full_csh=$xxx
- else
- echo "Couldn't find tcsh. BEWARE: GLOBBING MIGHT BE BROKEN."
+ elif [ -f "$csh" ]; then
+ echo "Couldn't find tcsh. Csh-based globbing might be broken."
fi
-else
- echo 'Your csh is really tcsh. Good.'
fi
# Shimpei Yamashita <shimpei@socrates.patnet.caltech.edu>
# Message-Id: <33EF1634.B36B6500@pobox.com>
-#
+#
# The DR2 of MkLinux (osname=linux,archname=ppc-linux) may need
# special flags passed in order for dynamic loading to work.
# instead of the recommended:
#
# ccdlflags='-rdynamic'
-#
+#
# it should be:
# ccdlflags='-Wl,-E'
#
@@ -264,21 +244,51 @@ sparc-linux)
;;
esac
-# This script UU/usethreads.cbu will get 'called-back' by Configure
+# SuSE8.2 has /usr/lib/libndbm* which are ld scripts rather than
+# true libraries. The scripts cause binding against static
+# version of -lgdbm which is a bad idea. So if we have 'nm'
+# make sure it can read the file
+# NI-S 2003/08/07
+if [ -r /usr/lib/libndbm.so -a -x /usr/bin/nm ] ; then
+ if /usr/bin/nm /usr/lib/libndbm.so >/dev/null 2>&1 ; then
+ echo 'Your shared -lndbm seems to be a real library.'
+ else
+ echo 'Your shared -lndbm is not a real library.'
+ set `echo X "$libswanted "| sed -e 's/ ndbm / /'`
+ shift
+ libswanted="$*"
+ fi
+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]*)
- ccflags="-D_REENTRANT $ccflags"
+ ccflags="-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS $ccflags"
set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
shift
libswanted="$*"
+
+ # Somehow at least in Debian 2.2 these manage to escape
+ # the #define forest of <features.h> and <time.h> so that
+ # the hasproto macro of Configure doesn't see these protos,
+ # even with the -D_GNU_SOURCE.
+
+ d_asctime_r_proto="$define"
+ d_crypt_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
+ d_random_r_proto="$define"
+
;;
esac
EOCBU
cat > UU/uselargefiles.cbu <<'EOCBU'
-# This script UU/uselargefiles.cbu will get 'called-back' by Configure
+# This script UU/uselargefiles.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use large files.
case "$uselargefiles" in
''|$define|true|[yY]*)
diff --git a/hints/machten.sh b/hints/machten.sh
index 3a311a1746..46fb144ec6 100755
--- a/hints/machten.sh
+++ b/hints/machten.sh
@@ -9,7 +9,7 @@
# MachTen 2.x has its own hint file.
#
# The original version of this file was put together by Andy Dougherty
-# <doughera@lafcol.lafayette.edu> based on comments from lots of
+# <doughera@lafayette.edu> based on comments from lots of
# folks, especially
# Mark Pease <peasem@primenet.com>
# Martijn Koster <m.koster@webcrawler.com>
diff --git a/hints/machten_2.sh b/hints/machten_2.sh
index bc7dde4e3f..af8fe6fd05 100644
--- a/hints/machten_2.sh
+++ b/hints/machten_2.sh
@@ -13,7 +13,7 @@
# tsx-11.mit.edu:/pub/linux/sources/libs/dld-3.2.7.tar.gz
#
# Original version was for MachTen 2.1.1.
-# Last modified by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Last modified by Andy Dougherty <doughera@lafayette.edu>
# Tue Aug 13 12:31:01 EDT 1996
#
# Warning about tests which no longer fail
diff --git a/hints/mpeix.sh b/hints/mpeix.sh
index d2ca5f09af..5126bcf3b8 100644
--- a/hints/mpeix.sh
+++ b/hints/mpeix.sh
@@ -11,6 +11,8 @@
# Substantially revised for 5.004_01 by Mark Bixby, markb@cccd.edu.
# Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu.
# Revised for 5.6.0 by Mark Bixby, mbixby@power.net.
+# Revised for 5.7.3 by Mark Bixby, mark@bixby.org.
+# Revised for 5.8.0 by Mark Bixby, mark@bixby.org.
#
osname='mpeix'
osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'`
@@ -23,10 +25,14 @@ _nm=$nm
nm_opt='-configperl'
usenm='true'
#
+# Work around the broken inline cat bug that corrupts here docs
+#
+alias -x cat=/bin/cat
+#
# Various directory locations.
#
# Which ones of these does Configure get wrong?
-test -z "$prefix" && prefix='/PERL/PUB'
+test -z "$prefix" && prefix="/$HPACCOUNT/$HPGROUP"
archname='PA-RISC1.1'
bin="$prefix"
installman1dir="$prefix/man/man1"
@@ -43,7 +49,7 @@ startsh='#!/bin/sh'
test -z "$cc" && cc='gcc'
cccdlflags='none'
ccflags="$ccflags -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL -DIS_SOCKET_CLIB_ITSELF"
-locincpth="$locincpth /usr/local/include /usr/contrib/include /BIND/PUB/include"
+locincpth="$locincpth /usr/local/include /usr/contrib/include /BINDFW/CURRENT/include /SYSLOG/PUB"
test -z "$optimize" && optimize="-O2"
ranlib='/bin/true'
# Special compiling options for certain source files.
@@ -62,7 +68,7 @@ for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do
libswanted="$*"
done
libswanted="$libswanted bind syslog curses svipc socket str m c"
-loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BIND/PUB/lib /SYSLOG/PUB"
+loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BINDFW/CURRENT/lib /SYSLOG/PUB"
#
# External functions and data items.
#
@@ -83,15 +89,24 @@ loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BIND/PUB/lib /SYSLOG/PUB"
# Unix named functions that are really vanilla MPE functions that do something
# completely different than on POSIX or Unix.
d_crypt='define'
+d_dbmclose='undef'
d_difftime='define'
d_dlerror='undef'
d_dlopen='undef'
d_Gconvert='gcvt((x),(n),(b))'
+d_getnbyaddr='define'
+d_getnbyname='define'
+d_getpbyname='define'
+d_getpbynumber='define'
+d_getsbyname='define'
+d_getsbyport='define'
+d_gettimeod='undef'
d_inetaton='undef'
d_link='undef'
d_mblen='define'
d_mbstowcs='define'
d_mbtowc='define'
+d_memchr='define'
d_memcmp='define'
d_memcpy='define'
d_memmove='define'
@@ -100,6 +115,9 @@ d_pwage='undef'
d_pwcomment='undef'
d_pwgecos='undef'
d_pwpasswd='undef'
+d_setegid='undef'
+d_seteuid='undef'
+d_setitimer='undef'
d_setpgid='undef'
d_setsid='undef'
d_setvbuf='define'
@@ -119,6 +137,7 @@ d_wctomb='define'
#
# Include files.
#
+i_gdbm='undef' # the port is currently incomplete
i_termios='undef' # we have termios, but not the full set (just tcget/setattr)
i_time='define'
i_systime='undef'
@@ -131,5 +150,14 @@ timetype='time_t'
#
# Functionality.
#
-bincompat5005="$undef"
uselargefiles="$undef"
+#
+# Expected functionality provided in mpeix.c.
+#
+archobjs='mpeix.o'
+
+# Help gmake find mpeix.c
+test -h mpeix.c || ln -s mpeix/mpeix.c mpeix.c
+
+d_gettimeod='define'
+d_truncate='define'
diff --git a/hints/netbsd.sh b/hints/netbsd.sh
index 7bd0a25c1d..07c6099e28 100644
--- a/hints/netbsd.sh
+++ b/hints/netbsd.sh
@@ -1,11 +1,7 @@
# hints/netbsd.sh
#
-# talk to packages@netbsd.org if you want to change this file.
-#
-# netbsd keeps dynamic loading dl*() functions in /usr/lib/crt0.o,
-# so Configure doesn't find them (unless you abandon the nm scan).
-# this should be *just* 0.9 below as netbsd 0.9a was the first to
-# introduce shared libraries.
+# Please check with packages@netbsd.org before making modifications
+# to this file.
case "$archname" in
'')
@@ -13,30 +9,59 @@ case "$archname" in
;;
esac
+# NetBSD keeps dynamic loading dl*() functions in /usr/lib/crt0.o,
+# so Configure doesn't find them (unless you abandon the nm scan).
+# Also, NetBSD 0.9a was the first release to introduce shared
+# libraries.
+#
case "$osvers" in
0.9|0.8*)
usedl="$undef"
;;
*)
- if [ -f /usr/libexec/ld.elf_so ]; then
+ case `uname -m` in
+ pmax)
+ # NetBSD 1.3 and 1.3.1 on pmax shipped an `old' ld.so,
+ # which will not work.
+ case "$osvers" in
+ 1.3|1.3.1)
+ d_dlopen=$undef
+ ;;
+ esac
+ ;;
+ esac
+ if test -f /usr/libexec/ld.elf_so; then
+ # ELF
d_dlopen=$define
d_dlerror=$define
- ccdlflags="-Wl,-E -Wl,-R${PREFIX}/lib $ccdlflags"
cccdlflags="-DPIC -fPIC $cccdlflags"
lddlflags="--whole-archive -shared $lddlflags"
- elif [ "`uname -m`" = "pmax" ]; then
-# NetBSD 1.3 and 1.3.1 on pmax shipped an `old' ld.so, which will not work.
- d_dlopen=$undef
- elif [ -f /usr/libexec/ld.so ]; then
+ rpathflag="-Wl,-rpath,"
+ case "$osvers" in
+ 1.[0-5]*)
+ #
+ # Include the whole libgcc.a into the perl executable
+ # so that certain symbols needed by loadable modules
+ # built as C++ objects (__eh_alloc, __pure_virtual,
+ # etc.) will always be defined.
+ #
+ ccdlflags="-Wl,-whole-archive -lgcc \
+ -Wl,-no-whole-archive -Wl,-E $ccdlflags"
+ ;;
+ *)
+ ccdlflags="-Wl,-E $ccdlflags"
+ ;;
+ esac
+ elif test -f /usr/libexec/ld.so; then
+ # a.out
d_dlopen=$define
d_dlerror=$define
- ccdlflags="-Wl,-R${PREFIX}/lib $ccdlflags"
-# we use -fPIC here because -fpic is *NOT* enough for some of the
-# extensions like Tk on some netbsd platforms (the sparc is one)
cccdlflags="-DPIC -fPIC $cccdlflags"
lddlflags="-Bshareable $lddlflags"
+ rpathflag="-R"
else
d_dlopen=$undef
+ rpathflag=
fi
;;
esac
@@ -59,14 +84,98 @@ d_setrgid="$undef"
d_setruid="$undef"
# there's no problem with vfork.
-case "$usevfork" in
-'') usevfork=true ;;
+usevfork=true
+
+# This is there but in machine/ieeefp_h.
+ieeefp_h="define"
+
+# 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]*)
+ lpthread=
+ for xxx in pthread; do
+ for yyy in $loclibpth $plibpth $glibpth dummy; do
+ zzz=$yyy/lib$xxx.a
+ if test -f "$zzz"; then
+ lpthread=$xxx
+ break;
+ fi
+ zzz=$yyy/lib$xxx.so
+ if test -f "$zzz"; then
+ lpthread=$xxx
+ break;
+ fi
+ zzz=`ls $yyy/lib$xxx.so.* 2>/dev/null`
+ if test "X$zzz" != X; then
+ lpthread=$xxx
+ break;
+ fi
+ done
+ if test "X$lpthread" != X; then
+ break;
+ fi
+ done
+ if test "X$lpthread" != X; then
+ # Add -lpthread.
+ libswanted="$libswanted $lpthread"
+ # There is no libc_r as of NetBSD 1.5.2, so no c -> c_r.
+ # This will be revisited when NetBSD gains a native pthreads
+ # implementation.
+ else
+ echo "$0: No POSIX threads library (-lpthread) found. " \
+ "You may want to install GNU pth. Aborting." >&4
+ exit 1
+ fi
+ unset lpthread
+ ;;
+esac
+EOCBU
+
+# Set sensible defaults for NetBSD: look for local software in
+# /usr/pkg (NetBSD Packages Collection) and in /usr/local.
+#
+loclibpth="/usr/pkg/lib /usr/local/lib"
+locincpth="/usr/pkg/include /usr/local/include"
+case "$rpathflag" in
+'')
+ ldflags=
+ ;;
+*)
+ ldflags=
+ for yyy in $loclibpth; do
+ ldflags="$ldflags $rpathflag$yyy"
+ done
+ ;;
esac
-# Pre-empt the /usr/bin/perl question of installperl.
-installusrbinperl='n'
+case `uname -m` in
+alpha)
+ echo 'int main() {}' > try.c
+ gcc=`${cc:-cc} -v -c try.c 2>&1|grep 'gcc version egcs-2'`
+ case "$gcc" in
+ '' | "gcc version egcs-2.95."[3-9]*) ;; # 2.95.3 or better okay
+ *) cat >&4 <<EOF
+***
+*** Your gcc ($gcc) is known to be
+*** too buggy on netbsd/alpha to compile Perl with optimization.
+*** It is suggested you install the lang/gcc package which should
+*** have at least gcc 2.95.3 which should work okay: use for example
+*** Configure -Dcc=/usr/pkg/gcc-2.95.3/bin/cc. You could also
+*** Configure -Doptimize=-O0 to compile Perl without any optimization
+*** but that is not recommended.
+***
+EOF
+ exit 1
+ ;;
+ esac
+ rm -f try.*
+ ;;
+esac
+
+# NetBSD/sparc 1.5.3/1.6.1 dumps core in the semid_ds test of Configure.
+case `uname -m` in
+sparc) d_semctl_semid_ds=undef ;;
+esac
-# Recognize the NetBSD packages collection.
-# GDBM might be here.
-test -d /usr/pkg/lib && loclibpth="$loclibpth /usr/pkg/lib"
-test -d /usr/pkg/include && locincpth="$locincpth /usr/pkg/include"
diff --git a/hints/newsos4.sh b/hints/newsos4.sh
index 3e447a5569..5cbcc531e2 100644
--- a/hints/newsos4.sh
+++ b/hints/newsos4.sh
@@ -28,6 +28,6 @@ timetype='long'
# filemode type is int (not mode_t)
modetype='int'
# using sprintf(3) instead of gcvt(3)
-d_Gconvert='sprintf((b),"%.*g",(n),(x))'
+gconvert_preference=sprintf
# No POSIX.
useposix='false'
diff --git a/hints/next_3.sh b/hints/next_3.sh
index 27c9bd9877..d142de5e76 100644
--- a/hints/next_3.sh
+++ b/hints/next_3.sh
@@ -2,7 +2,7 @@
# Andreas Koenig <k@franz.ww.TU-Berlin.DE> and Gerd Knops <gerti@BITart.com>.
# Comments, questions, and improvements welcome!
#
-# These hints work for NeXT 3.2 and 3.3. 3.0 has it's own
+# These hints work for NeXT 3.2 and 3.3. 3.0 has its own
# special hint file.
#
diff --git a/hints/nonstopux.sh b/hints/nonstopux.sh
index aec05ee680..025030fc9a 100644
--- a/hints/nonstopux.sh
+++ b/hints/nonstopux.sh
@@ -15,3 +15,6 @@ case "$cc" in
;;
esac
+libswanted=`echo " $libswanted " | sed -e 's/ ucb / /'`
+glibpth=`echo " $glibpth " | sed -e 's/ \/usr\/ucblib / /'`
+
diff --git a/hints/openbsd.sh b/hints/openbsd.sh
index 25781577ff..5d47e0af14 100644
--- a/hints/openbsd.sh
+++ b/hints/openbsd.sh
@@ -2,7 +2,7 @@
#
# hints file for OpenBSD; Todd Miller <millert@openbsd.org>
# Edited to allow Configure command-line overrides by
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
#
# To build with distribution paths, use:
# ./Configure -des -Dopenbsd_distribution=defined
@@ -11,42 +11,57 @@
# OpenBSD has a better malloc than perl...
test "$usemymalloc" || usemymalloc='n'
-# Currently, vfork(2) is not a real win over fork(2) but this will
-# change starting with OpenBSD 2.7.
-usevfork='true'
+# Currently, vfork(2) is not a real win over fork(2).
+usevfork="$undef"
-# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions
-# in 4.4BSD. Configure will find these but they are just emulated
-# and do not have the same semantics as in 4.3BSD.
-d_setregid=$undef
-d_setreuid=$undef
-d_setrgid=$undef
-d_setruid=$undef
+# In OpenBSD < 3.3, the setre?[ug]id() are emulated using the
+# _POSIX_SAVED_IDS functionality which does not have the same
+# semantics as 4.3BSD. Starting with OpenBSD 3.3, the original
+# semantics have been restored.
+case "$osvers" in
+[0-2].*|3.[0-2])
+ d_setregid=$undef
+ d_setreuid=$undef
+ d_setrgid=$undef
+ d_setruid=$undef
+esac
#
# Not all platforms support dynamic loading...
+# For the case of "$openbsd_distribution", the hints file
+# needs to know whether we are using dynamic loading so that
+# it can set the libperl name appropriately.
+# Allow command line overrides.
#
-ARCH=`arch|sed 's/^OpenBSD.//'`
+ARCH=`arch | sed 's/^OpenBSD.//'`
case "${ARCH}-${osvers}" in
-alpha-*|mips-*|vax-*|powerpc-2.[0-7]|m88k-*)
- usedl=$undef
+alpha-2.[0-8]|mips-2.[0-8]|powerpc-2.[0-7]|m88k-*|hppa-*|vax-*)
+ test -z "$usedl" && usedl=$undef
;;
*)
- usedl=$define
- d_dlopen=$define
- d_dlerror=$define
- # we use -fPIC here because -fpic is *NOT* enough for some of the
+ test -z "$usedl" && usedl=$define
+ # We use -fPIC here because -fpic is *NOT* enough for some of the
# extensions like Tk on some OpenBSD platforms (ie: sparc)
cccdlflags="-DPIC -fPIC $cccdlflags"
case "$osvers" in
[01].*|2.[0-7]|2.[0-7].*)
lddlflags="-Bshareable $lddlflags"
;;
- *) # from 2.8 onwards
+ 2.[8-9]|3.0)
ld=${cc:-cc}
lddlflags="-shared -fPIC $lddlflags"
;;
+ *) # from 3.1 onwards
+ ld=${cc:-cc}
+ lddlflags="-shared -fPIC $lddlflags"
+ libswanted=`echo $libswanted | sed 's/ dl / /'`
+ ;;
esac
+
+ # We need to force ld to export symbols on ELF platforms.
+ # Without this, dlopen() is crippled.
+ ELF=`${cc:-cc} -dM -E - </dev/null | grep __ELF__`
+ test -n "$ELF" && ldflags="-Wl,-E $ldflags"
;;
esac
@@ -69,10 +84,13 @@ d_suidsafe=$define
# cc is gcc so we can do better than -O
# Allow a command-line override, such as -Doptimize=-g
-case "$ARCH" in
+case ${ARCH} in
m88k)
optimize='-O0'
;;
+hppa)
+ optimize='-O0'
+ ;;
*)
test "$optimize" || optimize='-O2'
;;
@@ -86,9 +104,19 @@ $define|true|[yY]*)
# any openbsd version dependencies with pthreads?
ccflags="-pthread $ccflags"
ldflags="-pthread $ldflags"
- libswanted="$libswanted pthread"
- # This is strange.
- usevfork="$undef"
+ case "$osvers" in
+ [0-2].*|3.[0-2])
+ # Change from -lc to -lc_r
+ set `echo "X $libswanted " | sed 's/ c / c_r /'`
+ shift
+ libswanted="$*"
+ ;;
+ esac
+ case "$osvers" in
+ [012].*|3.[0-3])
+ # Broken at least up to OpenBSD 3.2, we'll see about 3.3.
+ d_getservbyname_r=$undef ;;
+ esac
esac
EOCBU
diff --git a/hints/os2.sh b/hints/os2.sh
index 5ffa589d31..a3fc0b6c50 100755
--- a/hints/os2.sh
+++ b/hints/os2.sh
@@ -4,7 +4,7 @@
# Ilya Zakharevich <ilya@math.ohio-state.edu>
#
# Trimmed and comments added by
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
# Exactly what is required beyond a standard OS/2 installation?
# (see in README.os2)
@@ -108,6 +108,22 @@ exe_ext='.exe'
# We provide it
i_dlfcn='define'
+# The default one uses exponential notation between 0.0001 and 0.1
+d_Gconvert='gcvt_os2((x),(n),(b))'
+
+cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+# If we will use them, let Configure choose us a Gconvert.
+case "$uselongdouble:$d_longdbl:$d_sqrtl:$d_modfl" in
+"$define:$define:$define:$define") d_Gconvert='' ;;
+esac
+EOCBU
+
+# -Zomf build has a problem with _exit() *flushing*, so the test
+# gets confused:
+fflushNULL="define"
+
aout_d_shrplib='undef'
aout_useshrplib='false'
aout_obj_ext='.o'
@@ -131,6 +147,8 @@ aout_cppflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev"
aout_use_clib='c'
aout_usedl='undef'
aout_archobjs="os2.o dl_os2.o"
+# Not listed in dynamic_ext, but needed for AOUT static_ext nevertheless
+aout_extra_static_ext="OS2::DLL"
# variable which have different values for aout compile
used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags'
@@ -163,9 +181,9 @@ else
else
d_fork='undef'
fi
- lddlflags="-Zdll -Zomf -Zmt -Zcrtdll $ld_dll_optimize"
+ lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2"
# Recursive regmatch may eat 2.5M of stack alone.
- ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000'
+ ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000 -Zlinker /e:2'
if [ $emxcrtrev -ge 50 ]; then
ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev"
else
@@ -253,6 +271,8 @@ d_strtoll='define'
d_strtoull='define'
d_getprior='define'
d_setprior='define'
+d_usleep='define'
+d_usleepproto='define'
# The next two are commented. pdksh handles #!, extproc gives no path part.
# sharpbang='extproc '
@@ -276,39 +296,122 @@ else
fi
fi
+for f in less.exe less.sh less.ksh less.cmd more.exe more.sh more.ksh more.cmd ; do
+ if test -z "$pager"; then
+ pager="`./UU/loc $f '' $pth`"
+ fi
+done
+if test -z "$pager"; then
+ pager='cmd /c more'
+fi
+
# Apply patches if needed
case "$0$running_c_cmd" in
*[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd
- if grep "^libnames" ./Configure > /dev/null; then
+ if test "Xyes" = "X$configure_cmd_loop"; then
+ cat <<EOC >&2
+!!!
+!!! PANIC: Loop of self-invocations detected, aborting!
+!!!
+EOC
+ exit 20
+ fi
+ configure_cmd_loop=yes
+ export configure_cmd_loop
+
+ configure_needs_patch=''
+ if test -s ./os2/diff.configure; then
+ if ! grep "^#OS2-PATCH-APPLIED" ./Configure > /dev/null; then
+ configure_needs_patch=yes
+ fi
+ fi
+ if test -n "$configure_needs_patch"; then
# Not patched!
+ # Restore the initial command line arguments
if test -f ./Configure.cmd ; then
- echo "!!!" >&2
- echo "!!! I see that what is running is ./Configure." >&2
- echo "!!! ./Configure is not patched, but ./Configure.cmd exists." >&2
- echo "!!!" >&2
- echo "!!! You are supposed to run Configure.cmd, not Configure" >&2
- echo "!!! after an automagic patching." >&2
- echo "!!!" >&2
- echo "!!! If you insist on running Configure, please" >&2
- echo "!!! patch it manually from ./os2/diff.configure." >&2
- echo "!!!" >&2
+ cat <<EOC >&2
+!!!
+!!! I see that what is running is ./Configure.
+!!! ./Configure is not patched, but ./Configure.cmd exists.
+!!!
+!!! You are supposed to run Configure.cmd, not Configure
+!!! after an automagic patching.
+!!!
+!!! If you insist on running Configure, you may
+!!! patch it manually from ./os2/diff.configure.
+!!!
+!!! However, I went through incredible hoolahoops, and I expect I can
+!!! auto-restart Configure.cmd myself. I will start it with arguments:
+!!!
+!!! Configure.cmd $args_exp
+!!!
+EOC
+ rp='Do you want to auto-restart Configure.cmd?'
+ dflt='y'
+ . UU/myread
+ case "$ans" in
+ [yY]) echo >&4 "Okay, continuing." ;;
+ *) echo >&4 "Okay, bye."
+ exit 2
+ ;;
+ esac
+ eval "set X $args_exp";
+ shift;
+ # Restore the output
+ exec Configure.cmd "$@" 1>&2
exit 2
fi
- echo "!!!" >&2
- echo "!!! You did not patch ./Configure!" >&2
- echo "!!! I create Configure.cmd and patch it from ./os2/diff.configure." >&2
- echo "!!!" >&2
- echo "$gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch" >&2
+ cat <<EOC >&2
+!!!
+!!! You did not patch ./Configure!
+!!! I can create Configure.cmd and patch it from ./os2/diff.configure with the command
+!!!
+!!! $gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch
+EOC
+ rp='Do you want to auto-patch Configure to Configure.cmd?'
+ dflt='y'
+ . UU/myread
+ case "$ans" in
+ [yY]) echo >&4 "Okay, continuing." ;;
+ *) echo >&4 "Okay, bye."
+ exit 2
+ ;;
+ esac
($gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch) >&2
- echo "!!!" >&2
- echo "!!! The report of patching is copied to 00_auto_patch." >&2
- echo "!!! Now you need to restart Configure.cmd with all the options" >&2
- echo "!!!" >&2
+ cat <<EOC >&2
+!!!
+!!! The report of patching is copied to 00_auto_patch.
+!!! Now we need to restart Configure.cmd with all the options.
+!!!
+EOC
echo "extproc sh" > Configure.ctm
- cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd
- exit 0
+ ( cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd ) || (echo "!!! Failure to add extproc-line to Configure.cmd." >&2 ; exit 21)
+ cat <<EOC >&2
+!!! I went through incredible hoolahoops, and I expect I can
+!!! auto-restart Configure.cmd myself. I will start it with arguments:
+!!!
+!!! Configure.cmd $args_exp
+!!!
+EOC
+ rp='Do you want to auto-restart Configure.cmd?'
+ dflt='y'
+ . UU/myread
+ case "$ans" in
+ [yY]) echo >&4 "Okay, continuing." ;;
+ *) echo >&4 "Okay, bye."
+ exit 2
+ ;;
+ esac
+ eval "set X $args_exp";
+ shift;
+ exec Configure.cmd "$@" 1>&2
+ exit 2
else
- echo "!!! Apparently we are running a patched Configure." >&2
+ if test -s ./os2/diff.configure; then
+ echo "!!! Apparently we are running a patched Configure." >&2
+ else
+ echo "!!! Apparently there is no need to patch Configure." >&2
+ fi
fi
;;
*) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2
@@ -329,6 +432,22 @@ $define|true|[yY]*)
esac
EOCBU
+if test -z "$cryptlib"; then
+ cryptlib=`UU/loc crypt$lib_ext "" $libpth`
+ if $test -n "$cryptlib"; then
+ cryptlib=-lcrypt
+ else
+ cryptlib=`UU/loc ufc$lib_ext "" $libpth`
+ if $test -n "$cryptlib"; then
+ cryptlib=-lufc
+ fi
+ fi
+fi
+if test -n "$cryptlib"; then
+ libs="$libs $cryptlib"
+ # d_crypt=define
+fi
+
# Now install the external modules. We are in the ./hints directory.
cd ./os2/OS2
@@ -341,6 +460,7 @@ cp -rfu * ../../ext/OS2/
# Install tests:
+cp -uf ../*.t ../../t/lib
for xxx in * ; do
if $test -d $xxx/t; then
cp -uf $xxx/t/*.t ../../t/lib
@@ -363,3 +483,4 @@ esac
# Now go back
cd ../..
+cp os2/*.t t/lib
diff --git a/hints/os390.sh b/hints/os390.sh
index 4eff5a8217..0873dfc83d 100644
--- a/hints/os390.sh
+++ b/hints/os390.sh
@@ -9,7 +9,7 @@
# Len Johnson <lenjay@ibm.net>
# Bud Huff <BAHUFF@us.oracle.com>
# Peter Prymmer <pvhp@forte.com>
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
# Tim Bunce <Tim.Bunce@ig.co.uk>
#
# as well as the authors of the aix.sh file
@@ -123,14 +123,23 @@ case "$ldlibpthname" in
'') ldlibpthname=LIBPATH ;;
esac
+# The folowing should always be used
+d_oldpthreads='define'
+
# Header files to include.
-# You can override these with Configure -Ui_time -Ui_systime.
+# You can override these with Configure -Ui_time -Ui_systime -Dd_pthread_atfork.
case "$i_time" in
'') i_time='define' ;;
esac
case "$i_systime" in
'') i_systime='define' ;;
esac
+case "$d_pthread_atfork" in
+'') d_pthread_atfork='undef' ;;
+esac
+case "$d_pthread_atfork" in
+'') d_pthread_atfork='undef' ;;
+esac
# (from aix.sh)
# uname -m output is too specific and not appropriate here
@@ -203,3 +212,16 @@ EOWARN
fi
fi
+# Most of the time gcvt() seems to work fine but
+# sometimes values like 0.1, 0.2, come out as "10", "20",
+# a trivial Perl demonstration snippet is 'print 0.1'.
+# The -W 0,float(ieee) seems to be the switch breaking gcvt().
+# sprintf() seems to get things right(er).
+gconvert_preference=sprintf
+
+cat >config.arch<<'__CONFIG_ARCH__'
+# The '-W 0,float(ieee)' cannot be used during Configure as ldflags.
+
+ccflags="$ccflags -W 0,float(ieee)"
+
+__CONFIG_ARCH__
diff --git a/hints/os400.sh b/hints/os400.sh
new file mode 100644
index 0000000000..16eec2fbe2
--- /dev/null
+++ b/hints/os400.sh
@@ -0,0 +1,24 @@
+#
+# We will just reuse the AIX hints since we support only building
+# for the PASE and the PASE hints are merged with the AIX hints.
+#
+
+case "$PASE" in
+'') cat >&4 <<EOF
+***
+*** This build process only works with the PASE environment (not ILE).
+*** You must supply the -DPASE parameter to the Configure script,
+*** please read the file README.os400. Exiting now.
+***
+EOF
+ exit 1
+ ;;
+*) cat >&4 <<EOF
+***
+*** Using the AIX hints file, $src/hints/aix.sh.
+***
+EOF
+ osname=aix
+ . $src/hints/aix.sh
+ ;;
+esac
diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh
index 6275233992..006323fd25 100755
--- a/hints/posix-bc.sh
+++ b/hints/posix-bc.sh
@@ -1,28 +1,119 @@
-#! /usr/bin/bash -norc
+:
# hints/posix-bc.sh
#
# BS2000 (Posix Subsystem) hints by Thomas Dorner <Thomas.Dorner@start.de>
#
-# thanks to the authors of the os390.sh
+# Thanks to the authors of the os390.sh for the very first draft.
#
+# You can modify almost any parameter set here using Configure with
+# the appropriate -D option.
-# To get ANSI C, we need to use c89, and ld does not exist
-# You can override this with Configure -Dcc=gcc -Dld=ld.
+# remove this line if dynamic libraries are working for you:
+ bs2000_ignoredl='y'
+
+# To get ANSI C, we need to use c89
+# You can override this with Configure -Dcc=gcc
+# (if you ever get a gcc ported to BS2000 ;-).
case "$cc" in
'') cc='c89' ;;
esac
-case "$ld" in
-'') ld='c89' ;;
-esac
# C-Flags:
# -DPOSIX_BC
# -DUSE_PURE_BISON
# -D_XOPEN_SOURCE_EXTENDED alters system headers.
# Prepend your favorites with Configure -Dccflags=your_favorites
-case "$ccflags" in
-'') ccflags='-K enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;;
-*) ccflags='$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' ;;
+ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED"
+
+# Now, what kind of BS2000 system are we running on?
+echo
+if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
+ echo "You are running a BS2000 machine with Sunrise CPUs."
+ echo "Let's hope you have the matching RISC compiler as well."
+ ccflags="-K risc_4000 $ccflags"
+ bs2000_ldflags='-K risc_4000'
+else
+ echo "Seems like a standard 390 BS2000 machine to me."
+ bs2000_ldflags=''
+fi
+echo
+if [ -z "$bs2000_ignoredl" -a -e /usr/lib/libdl.a ]; then
+ echo "Wow, your BS2000 is State Of The Art and seems to support dynamic libraries."
+ echo "I just can't resist giving them a try."
+ bs2000_lddlflags='-Bsymbolic -Bdynamic'
+ # dynamic linkage of system libraries gave us runtime linker
+ # errors, so we use static linkage while generating our DLLs :-(
+# bs2000_lddlflags='-Bstatic'
+ bs2000_so='none'
+ bs2000_usedl='define'
+ bs2000_dlext='so'
+ case $bs2000_ldflags in
+ *risc_4000*)
+ bs2000_ld="perl_genso"
+ echo "
+Now you must buy everything they sell you, musn't you?
+Didn't somebody tell you that RISC machines and dynamic library support gives
+you helluva lot of configuration problems at the moment?
+Sigh. Now you'll expect me to fix it for you, eh?
+OK, OK, I'll give you a wrapper.
+Just copy $bs2000_ld anywhere into your path before you try to install
+additional modules!"
+
+cat > $bs2000_ld <<EOF
+#! /bin/sh
+#
+# Perl's wrapper for genso by Thomas.Dorner@start.de
+
+ GENSO=/usr/bin/genso
+ options=""
+ params=""
+while [[ \$# -gt 0 ]]; do
+ case \$1 in
+ -K)
+ shift
+ ;;
+ -K*)
+ ;;
+ *.a)
+ lib=\${1##*/lib}
+ options="\$options -L\${1%/lib*.a} -l\${lib%.a}"
+ ;;
+ *.o)
+ params="\$params \$1"
+ ;;
+ *)
+ options="\$options \$1"
+ esac
+ shift
+done
+echo \$GENSO \$options \$params
+exec \$GENSO \$options \$params
+EOF
+
+ chmod +x $bs2000_ld
+ if [[ -w /usr/local/bin && ! -f /usr/local/bin/$bs2000_ld ]]; then
+ cp -p $bs2000_ld /usr/local/bin/$bs2000_ld
+ echo "(Actually I just did that as well, have a look into /usr/local/bin.)"
+ fi
+ ;;
+ *)
+ bs2000_ld='genso'
+ esac
+else
+ if [ -e /usr/lib/libdl.a ]; then
+ echo "Your BS2000 supports dynamic libraries, but you (or we ;-) decided to leave them alone."
+ else
+ echo "Your BS2000 does'n support dynamic libraries so we're just staying static."
+ fi
+ bs2000_ld='c89'
+ bs2000_lddlflags=''
+ bs2000_so='none'
+ bs2000_usedl='n'
+ bs2000_dlext='none'
+fi
+
+case "$ld" in
+'') ld=$bs2000_ld ;;
esac
# ccdlflags have yet to be determined.
@@ -35,24 +126,13 @@ esac
#'') cccdlflags='' ;;
#esac
-# ldflags have yet to be determined.
-#case "$ldflags" in
-#'') ldflags='' ;;
-#esac
-
-# lddlflags have yet to be determined.
-#case "$lddlflags" in
-#'') lddlflags='' ;;
-#esac
+case "$ldflags" in
+'') ldflags=$bs2000_ldflags ;;
+esac
-# Flags on a RISC-Host (SUNRISE):
-if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then
- echo
- echo "Congratulations, you are running a machine with Sunrise CPUs."
- echo "Let's hope you have the matching RISC compiler as well."
- ccflags="-K risc_4000 $ccflags"
- ldflags='-K risc_4000'
-fi
+case "$lddlflags" in
+'') lddlflags=$bs2000_lddlflags ;;
+esac
# Turning on optimization breaks perl (CORE-DUMP):
# You can override this with Configure -Doptimize='-O' or somesuch.
@@ -60,9 +140,9 @@ case "$optimize" in
'') optimize='none' ;;
esac
-# we don''t use dynamic memorys (yet):
+# BS2000 doesn't use dynamic memory on its own (yet):
case "$so" in
-'') so='none' ;;
+'') so=$bs2000_so ;;
esac
case "$usemymalloc" in
@@ -76,14 +156,12 @@ case "$usenm" in
'') usenm='false' ;;
esac
-# Dynamic loading doesn't work on OS/390 quite yet.
-# You can override this with
# Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs.
case "$usedl" in
-'') usedl='n' ;;
+'') usedl=$bs2000_usedl ;;
esac
case "$dlext" in
-'') dlext='none' ;;
+'') dlext=$bs2000_dlext ;;
esac
#case "$dlsrc" in
#'') dlsrc='none' ;;
@@ -91,4 +169,3 @@ esac
#case "$ldlibpthname" in
#'') ldlibpthname=LIBPATH ;;
#esac
-
diff --git a/hints/powerux.sh b/hints/powerux.sh
index dc1b3d07f0..c95e0e9ef5 100644
--- a/hints/powerux.sh
+++ b/hints/powerux.sh
@@ -1,32 +1,30 @@
-# Hints for the PowerUX operating system running on Concurrent (formerly
-# Harris) NightHawk machines. Written by Tom.Horsley@mail.ccur.com
+# Hints for the Power MAX OS operating system (formerly PowerUX - hence the
+# name) running on Concurrent (formerly Harris) NightHawk machines. Written
+# by Tom.Horsley@ccur.com
#
-# Note: The OS is fated to change names again to PowerMAX OS, but this
-# PowerUX file should still work (I wish marketing would make up their mind
-# about the name :-).
-#
-# This config uses dynamic linking and the Concurrent C compiler. It has
-# been tested on Power PC based 6000 series machines running PowerUX.
+# This hint uses dynamic linking and the new Concurrent C compiler (based
+# on the Edison front end). This hint file was produced for a build of the
+# 5.7.3 development release of perl running on a PowerMAX_OS 5.1SR2 system
+# (but it should work on any Power MAX release using the newer "ec" (versus
+# "cc") compiler, and hopefully will also work for the upcoming 5.8
+# development release of perl).
-# Internally at Concurrent, we use a source management tool which winds up
-# giving us read-only copies of source trees that are mostly symbolic links.
-# That upsets the perl build process when it tries to edit opcode.h and
-# embed.h or touch perly.c or perly.h, so turn those files into "real" files
-# when Configure runs. (If you already have "real" source files, this won't
-# do anything).
-#
-if [ -x /usr/local/mkreal ]
+# First find out where the root of the source tree is located.
+
+SRCROOT=""
+if [ -f ./INSTALL ]
then
- for i in '.' '..'
- do
- for j in embed.h opcode.h perly.h perly.c
- do
- if [ -h $i/$j ]
- then
- ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j )
- fi
- done
- done
+ SRCROOT="."
+else
+ if [ -f ../INSTALL ]
+ then
+ SRCROOT=".."
+ fi
+fi
+if [ -z "$SRCROOT" ]
+then
+ echo "powerux hint file cannot locate root perl source!" 1>&2
+ exit 2
fi
# We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so
@@ -44,17 +42,123 @@ glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'`
#
d_csh='undef'
-# Need to use Concurrent cc for most of these options to be meaningful (if you
+# Need to use Concurrent ec for most of these options to be meaningful (if you
# want to get this to work with gcc, you're on your own :-). Passing
# -Bexport to the linker when linking perl is important because it leaves
# the interpreter internal symbols visible to the shared libs that will be
-# loaded on demand (and will try to reference those symbols).
+# loaded on demand (and will try to reference those symbols). The -usys_nerr
+# drags in some stuff from libc that perl proper doesn't reference but
+# some dynamically linked extension will need to be in the static part
+# of perl (there are probably more of these that might be useful, but
+# for the extensions I build, this turned out to be enough). The -uldexp
+# makes sure the custom ldexp.o I add to archobjs actually gets pulled
+# into perl from libperl.a
#
-cc='/bin/cc'
+cc='/usr/ccs/bin/ec'
cccdlflags='-Zpic'
-ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-Bexport'
+ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-uldexp -Wl,-Bexport'
lddlflags='-Zlink=so'
+# Sigh... Various versions of Power MAX went out with a broken ldexp runtime
+# routine in libc (it is fixed for sure in the upcoming SR4 release, but
+# that hasn't made it out the door yet). Since libc is linked dynamically,
+# and the perl you build might try to run on one of the broken systems, we
+# need to statically link a corrected copy of ldexp.o into perl. What the
+# following code does is determine if the ldexp.o on the current system
+# works right. If it does, it simply extracts the ldexp.o from the system C
+# library and uses that .o file. If the system .o is broken, the btoa
+# encoded copy of a correct ldexp.o file included in this hint file is used
+# (what a pain...)
+#
+if [ ! -f $SRCROOT/ldexp.o ]
+then
+ echo Finding a correct copy of ldexp.o to link with... 1>&2
+ cat > $SRCROOT/UU/ldexptest.c <<'EOF'
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+int
+main(int argc, char ** argv) {
+ double result = pow(2.0, 38.0);
+ char buf[100];
+ sprintf(buf, "%g", result);
+ if (strncmp(buf, "inf", 3) == 0) {
+ exit(2);
+ }
+ return 0;
+}
+EOF
+ GOODLDEXP="no"
+ $cc -v -Zlink=static -o $SRCROOT/UU/ldexptest $SRCROOT/UU/ldexptest.c -lm > $SRCROOT/UU/ldexptest.lo 2>&1
+ if [ $? -eq 0 ]
+ then
+ $SRCROOT/UU/ldexptest
+ if [ $? -eq 0 ]
+ then
+ LDEXPLIB=`fgrep libc.a $SRCROOT/UU/ldexptest.lo | tail -1 | sed -e 's@^[^/]*@@'`
+ if [ -s "$LDEXPLIB" ]
+ then
+ if [ -f "$LDEXPLIB" ]
+ then
+ GOODLDEXP="yes"
+ fi
+ fi
+ fi
+ fi
+ if [ "$GOODLDEXP" = "yes" ]
+ then
+ echo Congratulations! The ldexp.o on this system looks good! 1>&2
+ echo Using ldexp.o from $LDEXPLIB 1>&2
+ ( cd $SRCROOT ; ar x $LDEXPLIB ldexp.o )
+ else
+ echo Sorry, the ldexp.o on this system is busted. 1>&2
+ echo Using the ldexp.o from the powerux hint file 1>&2
+ atob > $SRCROOT/ldexp.o << 'EOF'
+xbtoa Begin
+Imm%#!<N9%zz!!*'-!!!!"zz!!!8Jz!&OZU!!!!I!"/c-!%r>7Ecb`!!%rA)G]Wp<Ec5JsFC>/%FC\
+s(@fS,lAR]dp?YjFoAH3u00JG4;0JEJZF*VVE@:B4QA7^")/n4k]/hUsNAU&0$@rH4'?Zg7#FC/KgB
+5)5`!%om?A7^")?Yj7aG]7#$DI``"/o5'0G]7#+A7^")?N:'+5\stBG]7#+Bl7KhF*(i2F9"RBA7^"
+)?YjFoARB"dA,nl2A7^")?YjFoARAnXB5)5`5\stBG]7#/Ec5c4B6@cmASu#Y5\stBG]7#/Ec5c4B6
+@cm@V'1dD?'ZQA7^")!+0)TBQ@HkEcQ&9!+p7_G]3XiCh[?cG%G]8Bl@kh?XIJhB4YFn@;GorEb0&q
+/p(ZLF9!q6ASbd-FC\s(@fS-%ASbd-A7]4mB4#IhDIieJz3$J<@IAd4EOoYQ5HuL$L3Pb]og;*c.rk
+Jf$0+\*`g>N$VfHC6nOeDcBJaNL<r#i5*<UF@H/I_sb5`,PtJ;sU43WK.'.>.[$5ct)L<TXBJ5b\68
+8,rVja<:P^38ac\OQ-<@b/"'sb2E>Fr#l&\JY<(2JcPk%3$A9`IAd7F:4N<e<U"H%5b\5i3FDgf;/_
+p@OmW2L8,rVjOok[aa<:P^b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<e6(.iX4J2ZSb2iU's-C.p6
+,!Blr#i5*3+2eP8,rVjJH5a9/J%m^4[8uI/!'`P5`#LiIF(:p4CCN1/WKr63FDgf5ck%!8,rVj4[8u
+I3T'l]4obQ_OlHEAJP#nB/d_RY5dCAdrg(%ob2E>F4eMcT^b#Nd5a26gb/"'sJY<(2JcPk%3$A9`IA
+d7F:4N<eb/"'s4J2ZS^a/s\JY<(2JcPk%3$A9`IAd7F:4N<eaKPXErt`*EJY<(25aVNob/"'sr#dCa
+IAd7Fb2E>FJcPk%3$A9`:4N<eb/"'sr#dDL4TGH^IAd7Fb2E>FJcPk%3$A9`:4N<eaQ`a*5b.lp4Wj
+_)b,G@@3Y;>Nrmh6n.M)S$6';3>OC8,cI;FEfb2E>FD1mE>OF[C2aT2B<JY<(2JcPk%r5^iGIAd7Fr
+&+S]b/"'s3$A9`:4N<eI'>pO3T0qs/VX)J4[;@g3<0$[I1UWg5car>8,rVj35>M<r#iM2OM_%ub/"'
+sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<eJY<(25_oC_4hq$tb)QH%3Y29438jhrrmh6.IulWT6(IuEO[
+/tTILlM+IAd7Fb2E>FI11W[4obQ_a\Vs;D1mE>OF[CBa^G0WJcPk%r@:\mr&.(kb/"'s3$A9`:4N<e
+b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<ezzzs*t(KzIt.Luz6-oT3z6SJK?J,fQL4qI\oz!!!!s!
+!!!$zz!s/HG!!!"\!!!!)s8W,W!!!*$!!!"@!!3-#!"]85q[3`2!<E3%!!!!"!!!!&!WW3#!!WNU!W
+rH*If]fT!sSf.!Cp$,"p9>V!<FMOCe,mh8j5@-)[6Co!W`<V"u5N)49bn;!W`<+-`^N""p9>V!<F,D
+Bh&@0If]WO"t'Ld!Y>A:>Q=d*zz"98E)zzzzzzzzzz!!!!\zz"9AJl!!!!dzz!rr<&!!!!ezz!!!!#
+!!!"(zz!rr<'!!!")!!!)]z!!!!#!!!";!!!!Mz!!!!#!!!"Jzz!rr<(!!!"Kzz!rr<)!!!"Lzz!!!
+!&!!!"^!!!"Dz!!!!&!!!"n!!!!%z!!!!&!!!#+!!!!;z!!!!&!!!#?!!!!+z!!!!&!!!#Uzz!rr<*
+!!!#Vz!!!)]&c_n5!!!#\zz&-)\1!!!#hzz&-)\1!!!#nzz&-)\1!!!$&zz&-)\1!!!"$!!!Q<z!!!
+"h!!!Q<z!!!#A!!!-Gz!!!#E!!!-Hz!!!#W!!!T=z!!!#e!!!-G!!!!A!!!$.!!!Q<z!!!$4!!!WUz
+!!!$<!!!ZVz!!!$D!!!WVz!!!$X!!!-G!!!!)!!!$\!!!-H!!!!)!!!%+!!!-G!!!!1!!!%/!!!-H!
+!!!1!!!%G!!!ZWz!!!&&!!!ZVz!!!&>!!!-H!!!!A!!!&F!!!-G!!!!9!!!&J!!!-H!!!!9!!!'[!!
+!Q<z!!!(<!!!-G!!!!I!!!(@!!!-H!!!!I!!!(l!!!-G!!!!A!!!(p!!!-H!!!!A!!!!)!!!3Gz!!!
+!-!!!'C!!!)]!!!!>!!!*Ezzzzzzzzzzz!!!!"!!!!$zz!!!!U!!!$Yzz!!!!"z!!!!*!!!!"!!!!'
+z!!!%=!!!)]zz!!!!1z!!!!0!!!!"!!!!#z!!!.(!!!!Qzz!!!!)z!!!!8!!!!"!!!!#z!!!.X!!!!
+Ezz!!!!%z!!!!?!!!!"zz!!!/'!!!"Dzz!!!!%z!!!!KJ,fQLzz!!!0J!!!!Ezz!!!!%z!!!!T!!!!
+#zz!!!0n!!!$b!!!!"!!!!0!!!!%!!!!1!!!$1!!!!%zz!!!4Z!!!$B!!!!(!!!!#!!!!%!!!!-!!!
+$<!!!!%zz!!!8&!!!!9!!!!(!!!!%!!!!%!!!!-!!!$H!!!!%zz!!!8>!!!!-!!!!(!!!!&!!!!%!!
+!!-
+xbtoa End N 2436 984 E ad S 1bf43 R a7867666
+EOF
+ fi
+ ( cd $SRCROOT/UU ; rm -f ldexptest* )
+fi
+if [ -f $SRCROOT/ldexp.o ]
+then
+ archobjs='ldexp.o'
+fi
+
# Configure sometime finds what it believes to be ndbm header files on the
# system and imagines that we have the NDBM library, but we really don't.
# There is something there that once resembled ndbm, but it is purely
@@ -63,15 +167,18 @@ lddlflags='-Zlink=so'
#
i_ndbm='undef'
-# I have no clue what perl thinks it wants <sys/mode.h> for, but if
-# you include it in a program in PowerMAX without first including
-# <sys/vnode.h> the code don't compile...
+# I have no clue what perl thinks it wants <sys/mode.h> for, but if you
+# include it in a program in PowerMAX without first including <sys/vnode.h>
+# the code don't compile (apparently some other operating system has
+# something completely different in its sys/mode.h)
#
i_sysmode='undef'
-# There is a bug in memcmp (which I hope will be fixed soon) which sometimes
-# fails to provide the correct compare status (it is data dependant), so just
-# pretend there is no memcmp...
+# There was a bug in memcmp (which was fixed a while ago) which sometimes
+# fails to provide the correct compare status (it is data dependant). I
+# don't wnat to figure out if you are building with the correct version or
+# not, so just pretend there is no memcmp (since perl has its own handy
+# substitute).
#
d_memcmp='undef'
@@ -108,3 +215,4 @@ d_mymalloc='undef'
usemymalloc='n'
ssizetype='ssize_t'
usevfork='false'
+
diff --git a/hints/qnx.sh b/hints/qnx.sh
index 06d9010144..482c8ab0e5 100644
--- a/hints/qnx.sh
+++ b/hints/qnx.sh
@@ -1,16 +1,19 @@
#----------------------------------------------------------------
# QNX hints
#
-# As of perl5.004_04, all tests pass under:
-# QNX 4.23A
+# Most of the hints in this file are for QNX4, which needed
+# more help. The QNX6 hints are located toward the bottom.
+#
+# perl-5.7.3 passes all tests under QNX4.24G
# Watcom 10.6 with Beta/970211.wcc.update.tar.F
# socket3r.lib Nov21 1996.
+# perl-5.7.3 fails 2 known tests under QNX6.1.0
#
# As with many unix ports, this one depends on a few "standard"
-# unix utilities which are not necessarily standard for QNX.
+# unix utilities which are not necessarily standard for QNX4.
#
# /bin/sh This is used heavily by Configure and then by
-# perl itself. QNX's version is fine, but Configure
+# perl itself. QNX4's version is fine, but Configure
# will choke on the 16-bit version, so if you are
# running QNX 4.22, link /bin/sh to /bin32/ksh
# ar This is the standard unix library builder.
@@ -24,20 +27,61 @@
# cpp Configure and perl need a way to invoke a C
# preprocessor. I have created a simple cover
# for cc which does the right thing. Without this,
-# Configure will create it's own wrapper which works,
+# Configure will create its own wrapper which works,
# but it doesn't handle some of the command line arguments
# that perl will throw at it.
# make You really need GNU make to compile this. GNU make
# ships by default with QNX 4.23, but you can get it
# from quics for earlier versions.
#----------------------------------------------------------------
-# Outstanding Issues:
-# lib/posix.t test fails on test 17 because acos(1) != 0.
+# Outstanding Issues for QNX4:
+# There is no support for dynamically linked libraries in
+# QNX4.
+#
+# If you wish to compile with the Socket extension, you need
+# to have the TCP/IP toolkit, and you need to make sure that
+# -lsocket locates the correct copy of socket3r.lib. Beware
+# that the Watcom compiler ships with a stub version of
+# socket3r.lib which has very little functionality. Also
+# beware the order in which wlink searches directories for
+# libraries. You may have /usr/lib/socket3r.lib pointing to
+# the correct library, but wlink may pick up
+# /usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure
+# they both point to the correct library, that is,
+# /usr/tcptk/current/usr/lib/socket3r.lib.
+#
+# ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give
+# the same results. cwd calls `fullpath -t`, so if you
+# cd `fullpath -t` before running the test, it will
+# pass.
+#
+# lib/File/Find/taint.t will complain if '.' is in your
+# PATH. The PATH test is triggered because cwd calls
+# `fullpath -t`.
+#
+# ext/IO/lib/IO/t/io_sock.t: Subtest 14 is skipped due to
+# the fact that the functionality to read back the non-blocking
+# status of a socket is not implemented in QNX's TCP/IP. This
+# has been reported to QNX and it may work with later versions
+# of TCP/IP.
+#
+# Older issues:
+# lib/posix.t test failed on test 17 because acos(1) != 0.
# Resolved in 970211 Beta
# lib/io_udp.t test hangs because of a bug in getsockname().
# Fixed in latest BETA socket3r.lib
-# There is currently no support for dynamically linked
-# libraries.
+#----------------------------------------------------------------
+# Outstanding Issues for QNX6:
+# The following tests are still failing as of 5.7.3:
+#
+# op/sprintf.........................FAILED at test 91
+# lib/Benchmark......................FAILED at test 26
+#
+# This is due to a bug in the C library's printf routine.
+# printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires
+# '0.000000e+00'. QNX has acknowledged the bug and it should be
+# fixed in 6.2.0.
+#
#----------------------------------------------------------------
# These hints were submitted by:
# Norton T. Allen
@@ -52,127 +96,154 @@ echo "Some tests may fail. Please read the hints/qnx.sh file."
echo ""
#----------------------------------------------------------------
-# At present, all QNX systems are equivalent architectures,
+# At present, all QNX4 systems are equivalent architectures,
# so it is reasonable to call archname=x86-qnx rather than
# making an unnecessary distinction between AT-qnx and PCI-qnx,
-# for example.
-#----------------------------------------------------------------
-archname='x86-qnx'
+# for example. I will use uname's architecture for Neutrino.
+#----------------------------------------------------------------
+set X `uname -a`
+shift
+[ "$1" != "QNX" ] && echo "uname doesn't look like QNX!"
+case $4 in
+ 42[2-9]) archname='x86-qnx';;
+ *) osname='nto'
+ osvers=$3
+ archname="$5-nto";;
+esac
-#----------------------------------------------------------------
-# QNX doesn't come with a csh and the ports of tcsh I've used
-# don't work reliably:
-#----------------------------------------------------------------
-csh=''
-d_csh='undef'
-full_csh=''
+if [ "$osname" = "qnx" ]; then
+ #----------------------------------------------------------------
+ # QNX doesn't come with a csh and the ports of tcsh I've used
+ # don't work reliably:
+ #----------------------------------------------------------------
+ csh=''
+ d_csh='undef'
+ full_csh=''
-#----------------------------------------------------------------
-# setuid scripts are secure under QNX.
-# (Basically, the same race conditions apply, but assuming
-# the scripts are located in a secure directory, the methods
-# for exploiting the race condition are defeated because
-# the loader expands the script name fully before executing
-# the interpreter.)
-#----------------------------------------------------------------
-d_suidsafe='define'
+ #----------------------------------------------------------------
+ # setuid scripts are secure under QNX.
+ # (Basically, the same race conditions apply, but assuming
+ # the scripts are located in a secure directory, the methods
+ # for exploiting the race condition are defeated because
+ # the loader expands the script name fully before executing
+ # the interpreter.)
+ #----------------------------------------------------------------
+ d_suidsafe='define'
-#----------------------------------------------------------------
-# difftime is implemented as a preprocessor macro, so it doesn't show
-# up in the libraries:
-#----------------------------------------------------------------
-d_difftime='define'
+ #----------------------------------------------------------------
+ # difftime is implemented as a preprocessor macro, so it doesn't show
+ # up in the libraries:
+ #----------------------------------------------------------------
+ d_difftime='define'
-#----------------------------------------------------------------
-# strtod is in the math library, but we can't tell Configure
-# about the math library or it will confuse the linker
-#----------------------------------------------------------------
-d_strtod='define'
+ #----------------------------------------------------------------
+ # strtod is in the math library, but we can't tell Configure
+ # about the math library or it will confuse the linker
+ #----------------------------------------------------------------
+ d_strtod='define'
-lib_ext='3r.lib'
-libc='/usr/lib/clib3r.lib'
+ lib_ext='3r.lib'
+ libc='/usr/lib/clib3r.lib'
-#----------------------------------------------------------------
-# ccflags:
-# I like to turn the warnings up high, but a few common
-# constructs make a lot of noise, so I turn those warnings off.
-# A few still remain...
-#
-# unix.h is required as a general rule for unixy applications.
-#----------------------------------------------------------------
-ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
+ #----------------------------------------------------------------
+ # ccflags:
+ # I like to turn the warnings up high, but a few common
+ # constructs make a lot of noise, so I turn those warnings off.
+ # A few still remain...
+ #
+ # unix.h is required as a general rule for unixy applications.
+ #----------------------------------------------------------------
+ ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h'
-#----------------------------------------------------------------
-# ldflags:
-# If you want debugging information, you must specify -g on the
-# link as well as the compile. If optimize != -g, you should
-# remove this.
-#----------------------------------------------------------------
-ldflags="-g -N1M"
+ #----------------------------------------------------------------
+ # ldflags:
+ # If you want debugging information, you must specify -g on the
+ # link as well as the compile. If optimize != -g, you should
+ # remove this.
+ #----------------------------------------------------------------
+ ldflags="-g -N1M"
-so='none'
-selecttype='fd_set *'
+ so='none'
+ selecttype='fd_set *'
-#----------------------------------------------------------------
-# Add -lunix to list of libs. This is needed mainly so the nm
-# search will find funcs in the unix lib. Including unix.h should
-# automatically include the library without -l.
-#----------------------------------------------------------------
-libswanted="$libswanted unix"
+ #----------------------------------------------------------------
+ # Add -lunix to list of libs. This is needed mainly so the nm
+ # search will find funcs in the unix lib. Including unix.h should
+ # automatically include the library without -l.
+ #----------------------------------------------------------------
+ libswanted="$libswanted unix"
-if [ -z "`which ar 2>/dev/null`" ]; then
- cat <<-'EOF' >&4
- I don't see an 'ar', so I'm guessing you are running
- Watcom 9.5 or earlier. You may want to install the ar
- cover found in the qnx subdirectory of this distribution.
- It might reasonably be placed in /usr/local/bin.
+ if [ -z "`which ar 2>/dev/null`" ]; then
+ cat <<-'EOF' >&4
+ I don't see an 'ar', so I'm guessing you are running
+ Watcom 9.5 or earlier. You may want to install the ar
+ cover found in the qnx subdirectory of this distribution.
+ It might reasonably be placed in /usr/local/bin.
EOF
-fi
-#----------------------------------------------------------------
-# Here is a nm script which fixes up wlib's output to look
-# something like nm's, at least enough so that Configure can
-# use it.
-#----------------------------------------------------------------
-if [ -z "`which nm 2>/dev/null`" ]; then
- cat <<-EOF
- Creating a quick-and-dirty nm cover for Configure to use:
+ fi
+ #----------------------------------------------------------------
+ # Here is a nm script which fixes up wlib's output to look
+ # something like nm's, at least enough so that Configure can
+ # use it.
+ #----------------------------------------------------------------
+ if [ -z "`which nm 2>/dev/null`" ]; then
+ cat <<-EOF
+ Creating a quick-and-dirty nm cover for Configure to use:
EOF
- cat >./UU/nm <<-'EOF'
- #! /bin/sh
- #__USAGE
- #%C <lib> [<lib> ...]
- # Designed to mimic Unix's nm utility to list
- # defined symbols in a library
- unset WLIB
- for i in $*; do wlib $i; done |
- awk '
- /^ / {
- for (i = 1; i <= NF; i++) {
- sub("_$", "", $i)
- print "000000 T " $i
- }
- }'
+ cat >./UU/nm <<-'EOF'
+ #! /bin/sh
+ #__USAGE
+ #%C <lib> [<lib> ...]
+ # Designed to mimic Unix's nm utility to list
+ # defined symbols in a library
+ unset WLIB
+ for i in $*; do wlib $i; done |
+ awk '
+ /^ / {
+ for (i = 1; i <= NF; i++) {
+ sub("_$", "", $i)
+ print "000000 T " $i
+ }
+ }'
EOF
- chmod +x ./UU/nm
-fi
+ chmod +x ./UU/nm
+ fi
-cppstdin=`which cpp 2>/dev/null`
-if [ -n "$cppstdin" ]; then
- cat <<-EOF >&4
- I found a cpp at $cppstdin and will assume it is a good
- thing to use. If this proves to be false, there is a
- thin cover for cpp in the qnx subdirectory of this
- distribution which you could move into your path.
+ cppstdin=`which cpp 2>/dev/null`
+ if [ -n "$cppstdin" ]; then
+ cat <<-EOF >&4
+ I found a cpp at $cppstdin and will assume it is a good
+ thing to use. If this proves to be false, there is a
+ thin cover for cpp in the qnx subdirectory of this
+ distribution which you could move into your path.
EOF
- cpprun="$cppstdin"
-else
- cat <<-EOF >&4
+ cpprun="$cppstdin"
+ else
+ cat <<-EOF >&4
- There is a cpp cover in the qnx subdirectory of this
- distribution which works a little better than the
- Configure default. You may wish to copy it to
- /usr/local/bin or some other suitable location.
+ There is a cpp cover in the qnx subdirectory of this
+ distribution which works a little better than the
+ Configure default. You may wish to copy it to
+ /usr/local/bin or some other suitable location.
EOF
-fi
+ fi
+else
+ # $^O eq nto
+
+ ccflags='-DDLOPEN_WONT_DO_RELATIVE_PATHS'
+
+ # Options required to get dynamic linking to work
+ lddlflags='-shared'
+ ccdlflags='-Wl,-E'
+
+ # Somewhere in the build, something tries to throw a gcc
+ # option to $cc if it knows it invokes gcc. Our cc doesn't
+ # recognize that option, so we're better off setting cc=gcc.
+ cc='gcc'
+
+ # If we use perl's malloc, it dies with an invalid sbrk.
+ # This is probably worth tracking down someday.
+ usemymalloc='false'
+fi
diff --git a/hints/rhapsody.sh b/hints/rhapsody.sh
index 933081ba09..ed32402c62 100644
--- a/hints/rhapsody.sh
+++ b/hints/rhapsody.sh
@@ -1,26 +1,41 @@
##
# Rhapsody (Mac OS X Server) hints
-# Wilfredo Sanchez <wsanchez@apple.com>
+# Wilfredo Sanchez <wsanchez@wsanchez.net>
##
##
# Paths
##
+# Configure hasn't figured out the version number yet. Bummer.
+perl_revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $src/patchlevel.h`
+perl_version=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h`
+perl_subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h`
+version="${perl_revision}.${perl_version}.${perl_subversion}"
+
# BSD paths
-prefix='/usr';
-siteprefix='/usr/local';
-vendorprefix='/usr/local'; usevendorprefix='define';
+case "$prefix" in
+ '')
+ # Default install; use non-system directories
+ prefix='/usr/local'; # Built-in perl uses /usr
+ siteprefix='/usr/local';
+ vendorprefix='/usr'; usevendorprefix='define';
+
+ # Where to put modules.
+ sitelib="/Local/Library/Perl/${version}"; # FIXME: Want "/Network/Perl/${version}" also
+ vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
+ ;;
-# 4BSD uses /usr/share/man, not /usr/man.
-# Don't put man pages in /usr/lib; that's goofy.
-man1dir='/usr/share/man/man1';
-man3dir='/usr/share/man/man3';
+ '/usr')
+ # We are building/replacing the built-in perl
+ siteprefix='/usr/local';
+ vendorprefix='/usr/local'; usevendorprefix='define';
-# Where to put modules.
-privlib='/System/Library/Perl';
-sitelib='/Local/Library/Perl';
-vendorlib='/Network/Library/Perl';
+ # Where to put modules.
+ sitelib="/Local/Library/Perl/${version}"; # FIXME: Want "/Network/Perl/${version}" also
+ vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
+ ;;
+esac
##
# Tool chain settings
@@ -38,8 +53,38 @@ libc='/System/Library/Frameworks/System.framework/System';
# Optimize.
optimize='-O3';
-# We have a prototype for telldir.
-ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
+# -pipe: makes compilation go faster.
+# -fno-common because common symbols are not allowed in MH_DYLIB
+ccflags="${ccflags} -pipe -fno-common"
+
+# Unverified whether this is necessary on Rhapsody, but the test shouldn't hurt.
+# At least on Darwin 1.3.x:
+#
+# # define INT32_MIN -2147483648
+# int main () {
+# double a = INT32_MIN;
+# printf ("INT32_MIN=%g\n", a);
+# return 0;
+# }
+# will output:
+# INT32_MIN=2.14748e+09
+# Note that the INT32_MIN has become positive.
+# INT32_MIN is set in /usr/include/stdint.h by:
+# #define INT32_MIN -2147483648
+# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1)
+# seems to work. INT64_MIN seems to be similarly broken.
+# -- Nicholas Clark, Ken Williams, and Edward Moy
+#
+case "$(grep '^#define INT32_MIN' /usr/include/stdint.h)" in
+ *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;;
+esac
+
+# cpp-precomp is problematic.
+cppflags='${cppflags} -traditional-cpp';
+
+# This is necessary because perl's build system doesn't
+# apply cppflags to cc compile lines as it should.
+ccflags="${ccflags} ${cppflags}"
# Shared library extension is .dylib.
# Bundle extension is .bundle.
@@ -52,7 +97,6 @@ cccdlflags='';
lddlflags="${ldflags} -bundle -undefined suppress";
ldlibpthname='DYLD_LIBRARY_PATH';
useshrplib='true';
-base_address='0x4be00000';
##
# System libraries
@@ -61,7 +105,35 @@ base_address='0x4be00000';
# vfork works
usevfork='true';
-# malloc works
-usemymalloc='n';
+# our malloc works (but allow users to override)
+case "$usemymalloc" in
+'') usemymalloc='n' ;;
+esac
+
+#
+# The libraries are not threadsafe in Rhapsody
+#
+# Fix when Apple fixes libc.
+#
+case "$usethreads$useithreads" in
+ *define*)
+ cat <<EOM >&4
+
+*** Warning, there might be problems with your libraries with
+*** regards to threading. The test ext/threads/t/libc.t is likely
+*** to fail.
+
+EOM
+ ;;
+esac
+
+##
+# Build process
+##
+
+# Case-insensitive filesystems don't get along with Makefile and
+# makefile in the same place. Since Darwin uses GNU make, this dodges
+# the problem.
+firstmakefile=GNUmakefile;
diff --git a/hints/sco.sh b/hints/sco.sh
index 079ab78035..1d1d5c2788 100644
--- a/hints/sco.sh
+++ b/hints/sco.sh
@@ -112,7 +112,7 @@ then
else
###############################################################
# Need this in release 5 because of changed fpu exeption rules
- ccflags="$ccflags -D PERL_SCO5"
+ ccflags="$ccflags -D HAS_FPSETMASK"
###############################################################
# In Release 5, always compile ELF objects
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh
index 0bf5bab3af..5d643deffd 100644
--- a/hints/solaris_2.sh
+++ b/hints/solaris_2.sh
@@ -1,12 +1,7 @@
# hints/solaris_2.sh
-# Last modified: Tue Jan 2 10:16:35 2001
-# Lupe Christoph <lupe@lupe-christoph.de>
-# Based on version by:
-# Andy Dougherty <doughera@lafayette.edu>
-# Which was based on input from lots of folks, especially
-# Dean Roehrich <roehrich@ironwood-fddi.cray.com>
-# Additional input from Alan Burlison, Jarkko Hietaniemi,
-# and Richard Soderberg.
+# Contributions by (in alphabetical order) Alan Burlison, Andy Dougherty,
+# Dean Roehrich, Jarkko Hietaniemi, Lupe Christoph, Richard Soderberg and
+# many others.
#
# See README.solaris for additional information.
#
@@ -25,10 +20,17 @@
# gcc will occasionally emit warnings about "unused prefix", but
# these ought to be harmless. See below for more details.
-# See man vfork.
-usevfork=false
+# Solaris has secure SUID scripts
+d_suidsafe=${d_suidsafe:-define}
-d_suidsafe=define
+# Be paranoid about nm failing to find symbols
+mistrustnm=run
+
+# Several people reported problems with perl's malloc, especially
+# when use64bitall is defined or when using gcc.
+# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg01318.html
+# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg00465.html
+usemymalloc=${usemymalloc:-false}
# Avoid all libraries in /usr/ucblib.
# /lib is just a symlink to /usr/lib
@@ -58,34 +60,33 @@ case "$archname" in
;;
esac
-cat > UU/workshoplibpth.cbu << 'EOCBU'
-# This script UU/workshoplibpth.cbu will get 'called-back'
-# by other CBUs this script creates.
-case "$workshoplibpth_done" in
- '') if test `uname -p` = "sparc"; then
- case "$use64bitall" in
- "$define"|true|[yY]*)
- # add SPARC-specific 64 bit libraries
- loclibpth="$loclibpth /usr/lib/sparcv9"
- if test -n "$workshoplibs"; then
- loclibpth=`echo $loclibpth | sed -e "s% $workshoplibs%%" `
- for lib in $workshoplibs; do
- # Logically, it should be sparcv9.
- # But the reality fights back, it's v9.
- loclibpth="$loclibpth $lib/sparcv9 $lib/v9"
- done
- fi
- ;;
- *) loclibpth="$loclibpth $workshoplibs"
- ;;
- esac
- else
- loclibpth="$loclibpth $workshoplibs"
+#
+# This extracts the library directories that will be searched by the Sun
+# Workshop compiler, given the command-line supplied in $tryworkshopcc.
+# Use thusly: loclibpth="`$getworkshoplibs` $loclibpth"
+#
+ getworkshoplibs=`cat <<'END'
+eval $tryworkshopcc -### 2>&1 | \
+sed -n '/ -Y /s!.* -Y "P,\([^"]*\)".*!\1!p' | tr ':' ' ' | \
+sed -e 's!/usr/lib/sparcv9!!' -e 's!/usr/ccs/lib/sparcv9!!' \
+ -e 's!/usr/lib!!g' -e 's!/usr/ccs/lib!!g'
+END
+`
+
+case "$cc" in
+'') if test -f /opt/SUNWspro/bin/cc; then
+ cc=/opt/SUNWspro/bin/cc
+ cat <<EOF >&4
+
+You specified no cc but you seem to have the Workshop compiler
+($cc) installed, using that.
+If you want something else, specify that in the command line,
+e.g. Configure -Dcc=gcc
+
+EOF
fi
- workshoplibpth_done="$define"
;;
esac
-EOCBU
######################################################
# General sanity testing. See below for excerpts from the Solaris FAQ.
@@ -112,7 +113,7 @@ esac
# Check that /dev/fd is mounted. If it is not mounted, let the
# user know that suid scripts may not work.
-/usr/bin/df /dev/fd 2>&1 > /dev/null
+mount | grep '^/dev/fd ' 2>&1 > /dev/null
case $? in
0) ;;
*)
@@ -201,7 +202,7 @@ cat > UU/cc.cbu <<'EOCBU'
# Tue Apr 13 17:19:43 EDT 1999
# Get gcc to share its secrets.
-echo 'main() { return 0; }' > try.c
+echo 'int main() { return 0; }' > try.c
# Indent to avoid propagation to config.sh
verbose=`${cc:-cc} -v -o try try.c 2>&1`
@@ -209,6 +210,7 @@ if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then
#
# Using gcc.
#
+ ccversion='gcc'
# See if as(1) is GNU as(1). GNU as(1) might not work for this job.
if echo "$verbose" | grep ' /usr/ccs/bin/as ' >/dev/null 2>&1; then
@@ -245,15 +247,21 @@ END
# apparently don't reveal that unless you pass in -V.
# (This may all depend on local configurations too.)
+ # Recompute verbose with -Wl,-v to find GNU ld if present
+ verbose=`${cc:-cc} -v -Wl,-v -o try try.c 2>&1 | grep ld 2>&1`
+
myld=`echo $verbose| grep ld | awk '/\/ld/ {print $1}'`
# This assumes that gcc's output will not change, and that
# /full/path/to/ld will be the first word of the output.
- # Thus myld is something like opt/gnu/sparc-sun-solaris2.5/bin/ld
+ # Thus myld is something like /opt/gnu/sparc-sun-solaris2.5/bin/ld
- if $myld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then
+ # Allow that $myld may be '', due to changes in gcc's output
+ if ${myld:-ld} -V 2>&1 |
+ grep "ld: Software Generation Utilities" >/dev/null 2>&1; then
# Ok, /usr/ccs/bin/ld eventually does get called.
:
else
+ echo "Found GNU ld='$myld'" >&4
cat <<END >&2
NOTE: You are using GNU ld(1). GNU ld(1) might not build Perl. If you
@@ -265,7 +273,7 @@ doesn't work, you should use -B/usr/ccs/bin/ instead.
END
ccdlflags="$ccdlflags -Wl,-E"
- lddlflags="$lddlflags -W,l-E -G"
+ lddlflags="$lddlflags -Wl,-E -G"
fi
fi
@@ -273,23 +281,24 @@ else
#
# Not using gcc.
#
-
- ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^cc: //p'`"
- case "$ccversion" in
- *WorkShop*) ccname=workshop ;;
- *) ccversion='' ;;
- esac
-
- case "$ccname" in
- workshop)
- cat >try.c <<EOM
-#include <sunmath.h>
-int main() { return(0); }
+ cat > try.c << 'EOM'
+#include <stdio.h>
+int main() {
+#ifdef __SUNPRO_C
+ printf("workshop\n");
+#else
+ printf("\n");
+#endif
+return(0);
+}
EOM
- workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|sed -n '/ -Y /s%.* -Y "P,\(.*\)".*%\1%p'|tr ':' '\n'|grep '/SUNWspro/'`
- . ./workshoplibpth.cbu
- ;;
- esac
+ tryworkshopcc="${cc:-cc} try.c -o try"
+ if $tryworkshopcc >/dev/null 2>&1; then
+ ccversion=`./try`
+ if test "$ccversion" = "workshop" -a ! "$use64bitall_done"; then
+ loclibpth="/usr/lib /usr/ccs/lib `$getworkshoplibs` $loclibpth"
+ fi
+ fi
# See if as(1) is GNU as(1). GNU might not work for this job.
case `as --version < /dev/null 2>&1` in
@@ -320,14 +329,24 @@ to the beginning of your PATH.
END
fi
+fi
+# Check to see if the selected compiler and linker
+# support the -z ignore, -z lazyload and -z combreloc flags.
+echo "int main() { return(0); } " > try.c
+ zflgs=''
+for zf in ignore lazyload combreloc; do
+ if ${cc:-cc} -o try try.c -z $zf > /dev/null 2>&1; then
+ zflgs="$zflgs -z $zf"
+ fi
+done
+if test -n "$zflgs"; then
+ ccdlflags="$ccdlflags $zflgs"
+ lddlflags="$lddlflags -G $zflgs"
fi
# as --version or ld --version might dump core.
-rm -f try try.c
-rm -f core
-
-# XXX
+rm -f try try.c core
EOCBU
cat > UU/usethreads.cbu <<'EOCBU'
@@ -337,12 +356,8 @@ case "$usethreads" in
$define|true|[yY]*)
ccflags="-D_REENTRANT $ccflags"
- # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7
- case `uname -r` in
- 5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;;
- *) sched_yield_lib="rt";
- esac
- set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"`
+ sched_yield='yield'
+ set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
shift
libswanted="$*"
@@ -357,7 +372,7 @@ $define|true|[yY]*)
/* Test for sig(set|long)jmp bug. */
#include <setjmp.h>
- main()
+ int main()
{
sigjmp_buf env;
int ret;
@@ -378,6 +393,27 @@ for more information.
EOM
fi
+
+ # These prototypes should be visible since we using
+ # -D_REENTRANT, but that does not seem to work.
+ # It does seem to work for getnetbyaddr_r, weirdly enough,
+ # and other _r functions. (Solaris 8)
+
+ d_ctermid_r_proto="$define"
+ d_gethostbyaddr_r_proto="$define"
+ d_gethostbyname_r_proto="$define"
+ d_getnetbyname_r_proto="$define"
+ d_getprotobyname_r_proto="$define"
+ d_getprotobynumber_r_proto="$define"
+ d_getservbyname_r_proto="$define"
+ d_getservbyport_r_proto="$define"
+
+ # Ditto. (Solaris 7)
+ d_readdir_r_proto="$define"
+ d_readdir64_r_proto="$define"
+ d_tmpnam_r_proto="$define"
+ d_ttyname_r_proto="$define"
+
;;
esac
EOCBU
@@ -425,6 +461,26 @@ EOM
esac
;;
esac
+# gcc-2.8.1 on Solaris 8 with -Duse64bitint fails op/pat.t test 822
+# if we compile regexec.c with -O. Turn off optimization for that one
+# file. See hints/README.hints , especially
+# =head2 Propagating variables to config.sh, method 3.
+# A. Dougherty May 24, 2002
+case "$use64bitint" in
+"$define")
+ case "${gccversion}-${optimize}" in
+ 2.8*-O*)
+ # Honor a command-line override (rather unlikely)
+ case "$regexec_cflags" in
+ '') echo "Disabling optimization on regexec.c for gcc $gccversion" >&4
+ regexec_cflags='optimize='
+ echo "regexec_cflags='optimize=\"\"'" >> config.sh
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+esac
EOCBU
cat > UU/use64bitall.cbu <<'EOCBU'
@@ -451,10 +507,9 @@ Cannot continue, aborting.
EOM
exit 1
fi
- . ./workshoplibpth.cbu
- case "$cc -v 2>/dev/null" in
+ case "${cc:-cc} -v 2>/dev/null" in
*gcc*)
- echo 'main() { return 0; }' > try.c
+ echo 'int main() { return 0; }' > try.c
case "`${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
*"m64 is not supported"*)
cat >&4 <<EOM
@@ -469,6 +524,7 @@ EOM
exit 1
;;
esac
+ loclibpth="/usr/lib/sparcv9 $loclibpth"
ccflags="$ccflags -mcpu=v9 -m64"
if test X`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null` != X; then
ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
@@ -484,14 +540,14 @@ EOM
ccflags="$ccflags `getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
ldflags="$ldflags `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
lddlflags="$lddlflags -G `getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`"
+ echo "int main() { return(0); } " > try.c
+ tryworkshopcc="${cc:-cc} try.c -o try $ccflags"
+ loclibpth="/usr/lib/sparcv9 /usr/ccs/lib/sparcv9 `$getworkshoplibs` $loclibpth"
;;
esac
- libscheck='case "`/usr/bin/file $xxx`" in
-*64-bit*|*SPARCV9*) ;;
-*) xxx=/no/64-bit$xxx ;;
-esac'
use64bitall_done=yes
+ archname64=64
;;
esac
EOCBU
@@ -511,16 +567,20 @@ cat > UU/uselongdouble.cbu <<'EOCBU'
# after it has prompted the user for whether to use long doubles.
case "$uselongdouble" in
"$define"|true|[yY]*)
- if test -f /opt/SUNWspro/lib/libsunmath.so; then
- libs="$libs -lsunmath"
- ldflags="$ldflags -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib"
- d_sqrtl=define
+ if test "$ccversion" = "workshop"; then
+ cat > try.c << 'EOM'
+#include <sunmath.h>
+int main() { (void) powl(2, 256); return(0); }
+EOM
+ if ${cc:-cc} try.c -lsunmath -o try > /dev/null 2>&1 && ./try; then
+ libswanted="$libswanted sunmath"
+ fi
else
cat >&4 <<EOM
-The Sun Workshop math library is not installed; therefore I do not
-know how to do long doubles, sorry. I'm disabling the use of long
-doubles.
+The Sun Workshop math library is either not available or not working,
+so I do not know how to do long doubles, sorry.
+I'm therefore disabling the use of long doubles.
EOM
uselongdouble="$undef"
fi
diff --git a/hints/sunos_4_1.sh b/hints/sunos_4_1.sh
index af0bca1398..4f06d6e360 100644
--- a/hints/sunos_4_1.sh
+++ b/hints/sunos_4_1.sh
@@ -1,6 +1,6 @@
# hints/sunos_4_1.sh
# Last modified: Wed May 27 11:00:02 EDT 1998
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
case "$cc" in
*gcc*) usevfork=false
@@ -82,3 +82,14 @@ fi
# library.
#
# Thanks to William Setzer <William_Setzer@ncsu.edu> for this info.
+
+# Don't use the GNU ld, that doesn't work, you'll get a lot of
+# relocation truncated to fit: BASE13 ...
+# from many extensions, like B and Data::Dumper.
+ld=/usr/bin/ld
+
+# As of Perl 5.8.1 it seems that dynaloading is broken in SunOS 4.x, sniff.
+case "$usedl" in
+'') usedl=undef ;;
+esac
+
diff --git a/hints/super-ux.sh b/hints/super-ux.sh
new file mode 100644
index 0000000000..8f9592b893
--- /dev/null
+++ b/hints/super-ux.sh
@@ -0,0 +1,20 @@
+# Len Makin <len@hpc.CSIRO.AU>
+
+# No dynamically loaded libraries
+so='none'
+
+case "$optimize" in
+# No compile option -O
+'') optimize='-h2' ;;
+esac
+
+# size_t is 32 bits. Next version of compiler will have -hsize_t64
+# enabling size_t to be 64 bits.
+# Current cc version 4.80 allows -hsubscript64 for 64 bit array subscripts.
+ccflags="$ccflags -hxint -hmath vector -hsubscript64"
+
+case "$usemymalloc" in
+'') # The perl malloc.c SHOULD work
+ usemymalloc='y'
+ ;;
+esac
diff --git a/hints/svr4.sh b/hints/svr4.sh
index 69af6fda2f..b3be9ac40b 100644
--- a/hints/svr4.sh
+++ b/hints/svr4.sh
@@ -23,7 +23,7 @@ libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'`
# it is needed for ODBM_File and NDBM_File extensions.
if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library:
- d_Gconvert='gcvt((x),(n),(b))' # Try gcvt() before gconvert().
+ gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert().
# Use the "native" counterparts, not the BSD emulation stuff:
d_bcmp='undef' d_bcopy='undef' d_bzero='undef' d_safebcpy='undef'
d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
@@ -138,9 +138,12 @@ esac
# NCR MP-RAS. Thanks to Doug Hendricks for this info.
# The output of uname -a looks like this
# foo foo 4.0 3.0 3441 Pentium III(TM)-ISA/PCI
+# Similar errors reported for
+# foo foo 4.0 3.0 4400 pentium ii(tm)-isapci '
+
# Configure sets osname=svr4.0, osvers=3.0, archname='3441-svr4.0'
case "$myuname" in
-*3441*)
+*3441*|*4400*isapci)
# With the NCR High Performance C Compiler R3.0c, miniperl fails
# t/op/regexp.t test 461 unless we compile with optimizie=-g.
# The whole O/S is being phased out, so more detailed probing
diff --git a/hints/svr5.sh b/hints/svr5.sh
index 2676e139db..ff08fcc185 100644
--- a/hints/svr5.sh
+++ b/hints/svr5.sh
@@ -10,8 +10,11 @@
case "$cc" in
*gcc*)
# "$gccversion" not set yet
- vers=`gcc -v 2>&1 | sed -n -e 's@.*version \([^ ][^ ]*\) .*@\1@p'`
- case $vers in
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case $gccversion in
*2.95*)
ccflags='-fno-strict-aliasing'
# More optimisation provided in gcc-2.95 causes miniperl to segv.
@@ -83,17 +86,16 @@ libswanted=`echo " $libswanted " | sed -e 's/ malloc / /' -e 's/ c / /'`
# remove /shlib and /lib from library search path as both symlink to /usr/lib
# where runtime shared libc is
-glibpth=`echo " $glibpth " | sed -e 's/ \/shlib / /' -e 's/ \/lib / /`
+glibpth=`echo " $glibpth " | sed -e 's/ \/shlib / /' -e 's/ \/lib / /'`
# Don't use BSD emulation pieces (/usr/ucblib) regardless
# these would probably be autonondetected anyway but ...
-d_Gconvert='gcvt((x),(n),(b))' # Try gcvt() before gconvert().
+gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert().
d_bcopy='undef' d_bcmp='undef' d_bzero='undef' d_safebcpy='undef'
d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef'
d_setlinebuf='undef'
d_setregid='undef' d_setreuid='undef' # -- in /usr/lib/libc.so.1
-
# Broken C-Shell tests (Thanks to Tye McQueen):
# The OS-specific checks may be obsoleted by the this generic test.
sh_cnt=`sh -c 'echo /*' | wc -c`
@@ -156,8 +158,12 @@ fi
# cccdlflags: must tell the compiler to generate relocatable code
# lddlflags : must tell the linker to output a shared library
-# use shared perl lib
-useshrplib='true'
+# use shared perl lib if the user doesn't choose otherwise
+if test "$uw_isuw" != "OpenUNIX"; then
+ if test "x$useshrplib" = "x"; then
+ useshrplib='true'
+ fi
+fi
case "$cc" in
*gcc*)
@@ -183,7 +189,7 @@ case "$usethreads" in
$define|true|[yY]*)
ccflags="$ccflags"
shift
- libswanted="$*"
+ libswanted="$libswanted $*"
case "$cc" in
*gcc*)
ccflags="-D_REENTRANT $ccflags -fpic -pthread"
diff --git a/hints/t001.c b/hints/t001.c
new file mode 100644
index 0000000000..51fdefda84
--- /dev/null
+++ b/hints/t001.c
@@ -0,0 +1,90 @@
+/* Beginning of modification history */
+/* Written 02-04-10 by Paul Green (Paul.Green@stratus.com) */
+/* End of modification history */
+
+/* This test case is extracted from Perl version 5.7.3. It is
+ in the Perl_unpack_str function of the pp_pack.c source file.
+
+ GCC 2.95.2 improperly assumes that it can compensate for an
+ extra fsub by performing a fadd. This would work in
+ fixed-point arithmetic, but does not work in floating-point
+ arithmetic.
+
+ This problem has been seen on HP-UX and on Stratus VOS, both
+ of which have an HP PA-RISC target (hppa1.1). The Stratus
+ bug number is gnu_g++-220. */
+
+/* #define _POSIX_C_SOURCE 199506L -- added by Configure */
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+
+void test(double *result)
+{
+ float afloat;
+ double adouble;
+ int checksum = 0;
+ unsigned cuv = 0;
+ double cdouble = 0.0;
+ const int bits_in_uv = 8 * sizeof(cuv);
+
+ checksum = 53;
+ cdouble = -1.0;
+
+ if (checksum) {
+ if (checksum > bits_in_uv) {
+ double trouble;
+
+ adouble = (double) (1 << (checksum & 15));
+
+ while (checksum >= 16) {
+ checksum -= 16;
+ adouble *= 65536.0;
+ }
+
+ /* At -O1, GCC 2.95.2 compiles the following loop
+ into:
+
+ L$0014
+ fcmp,dbl,>= %fr4,%fr0
+ ftest
+ b L$0014
+ fadd,dbl %fr4,%fr12,%fr4
+ fsub,dbl %fr4,%fr12,%fr4
+
+ This code depends on the floading-add and
+ floating-subtract retaining all of the
+ precision present in the operands. There is
+ no such guarantee when using floating-point,
+ as this test case demonstrates.
+
+ The code is okay at -O0. */
+
+ while (cdouble < 0.0)
+ cdouble += adouble;
+
+ cdouble = modf (cdouble / adouble, &trouble) * adouble;
+ }
+ }
+
+ *result = cdouble;
+}
+
+int main (int argc, char ** argv)
+{
+double value;
+
+ test (&value);
+
+ if (argc == 2 && !strcmp(argv[1],"-v"))
+ printf ("value = %.18e\n", value);
+
+ if (value != 9.007199254740991e+15) {
+ printf ("t001 fails!\n");
+ return -1;
+ }
+ else {
+ printf ("t001 works.\n");
+ return 0;
+ }
+}
diff --git a/hints/titanos.sh b/hints/titanos.sh
index 88a3e7a963..bcda8a7b9e 100644
--- a/hints/titanos.sh
+++ b/hints/titanos.sh
@@ -2,7 +2,7 @@
# Created by: JT McDuffie (jt@kpc.com) 26 DEC 1991
# p5ed by: Jarkko Hietaniemi <jhi@iki.fi> Aug 27 1994
# NOTE: You should run Configure with tcsh (yes, tcsh).
-# Comments by Andy Dougherty <doughera@lafcol.lafayette.edu> 28 Mar 1995
+# Comments by Andy Dougherty <doughera@lafayette.edu> 28 Mar 1995
alignbytes="8"
byteorder="4321"
castflags='0'
diff --git a/hints/ultrix_4.sh b/hints/ultrix_4.sh
index f418ea18ee..2958394141 100644
--- a/hints/ultrix_4.sh
+++ b/hints/ultrix_4.sh
@@ -1,5 +1,5 @@
# hints/ultrix_4.sh
-# Last updated by Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Last updated by Andy Dougherty <doughera@lafayette.edu>
# Fri Feb 10 10:04:51 EST 1995
#
# Use Configure -Dcc=gcc to use gcc.
@@ -16,7 +16,7 @@ case "$optimize" in
esac
# Some users have reported Configure runs *much* faster if you
-# replace all occurences of /bin/sh by /bin/sh5
+# replace all occurrences of /bin/sh by /bin/sh5
# Something like:
# sed 's!/bin/sh!/bin/sh5!g' Configure > Configure.sh5
# Then run "sh5 Configure.sh5 [your options]"
@@ -68,3 +68,7 @@ d_dirnamlen='define'
# Ultrix can mmap only character devices, not regular files,
# which is rather useless state of things for Perl.
d_mmap='undef'
+
+# There simply isn't dynaloading in Ultrix.
+usedl='undef'
+
diff --git a/hints/umips.sh b/hints/umips.sh
index 17d5ff4623..197bc80e22 100644
--- a/hints/umips.sh
+++ b/hints/umips.sh
@@ -10,7 +10,7 @@
# xxx xxx 4_52 umips mips
# Speculative notes on getting cc to work added by
-# Andy Dougherty <doughera@lafcol.lafayette.edu>
+# Andy Dougherty <doughera@lafayette.edu>
# Tue Aug 20 21:51:49 EDT 1996
# Recommend the GNU C Compiler
diff --git a/hints/unicos.sh b/hints/unicos.sh
index 089b9600e2..4e8e427770 100644
--- a/hints/unicos.sh
+++ b/hints/unicos.sh
@@ -9,11 +9,21 @@ esac
# The default is to die in runtime on math overflows.
# Let's not do that. --jhi
ccflags="$ccflags -h matherror=errno"
-# Give int((2/3)*3) a chance to be 2, not 1. --jhi
-ccflags="$ccflags -h rounddiv"
+
+# Cray floating point (cfp) CPUs need -h rounddiv
+# (It gives int((2/3)*3) a chance to be 2, not 1. --jhi)
+# (but IEEE CPUs, IEEE/ieee/CPE1 CPUs should not have -h rounddiv,
+# since the compiler on those CPUs doesn't even support the option.)
+if /etc/cpu -i | grep -q cfp
+then
+ ccflags="$ccflags -h rounddiv"
+fi
+
# Avoid an optimizer bug where a volatile variables
# isn't correctly saved and restored --Mark P. Lutz
pp_ctl_cflags='ccflags="$ccflags -h scalar0 -h vector0"'
+# Otherwise the unpack %65c checksums will fail.
+pp_pack_cflags='optimize="$ccflags -h scalar0 -h vector0"'
case "$usemymalloc" in
'') # The perl malloc.c SHOULD work says Ilya.
# But for the time being (5.004_68), alas, it doesn't. --jhi
@@ -22,8 +32,26 @@ case "$usemymalloc" in
usemymalloc='n'
;;
esac
-# Configure gets fooled for some reason. There is no getpgid().
+# Configure gets fooled for some reason, these do not exist.
d_getpgid='undef'
+d_setitimer='undef'
# These exist but do not really work.
d_setregid='undef'
d_setreuid='undef'
+# No shared libraries.
+so='none'
+# No dynaloading.
+d_dlopen='undef'
+i_dlfcn='undef'
+# Threads call-back unit.
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
+ shift
+ libswanted="$*"
+ ;;
+esac
+EOCBU
diff --git a/hints/unicosmk.sh b/hints/unicosmk.sh
index f3416ffe34..6045fcfac9 100644
--- a/hints/unicosmk.sh
+++ b/hints/unicosmk.sh
@@ -28,5 +28,19 @@ if test "$d_shm" = ""; then
*"undef"*) d_shm="$undef" ;;
esac
fi
-
-
+# Otherwise the unpack %65c checksums will fail.
+pp_pack_cflags='optimize="-h scalar0 -h vector0"'
+# No shared libraries.
+so='none'
+# Threads call-back unit.
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ set `echo X "$libswanted "| sed -e "s/ c / pthread c /"`
+ shift
+ libswanted="$*"
+ ;;
+esac
+EOCBU
diff --git a/hints/utekv.sh b/hints/utekv.sh
index 95a31fdedf..5b4f6218fc 100644
--- a/hints/utekv.sh
+++ b/hints/utekv.sh
@@ -1,5 +1,5 @@
# XD88/10 UTekV hints by Kaveh Ghazi (ghazi@caip.rutgers.edu) 2/11/92
-# Modified by Andy Dougherty <doughera@lafcol.lafayette.edu> 4 Oct. 1994
+# Modified by Andy Dougherty <doughera@lafayette.edu> 4 Oct. 1994
# The -X18 is only if you are using the Greenhills compiler.
ccflags="$ccflags -X18"
diff --git a/hints/uts.sh b/hints/uts.sh
index 2bae4b0acf..eb0d78ce11 100644
--- a/hints/uts.sh
+++ b/hints/uts.sh
@@ -1,18 +1,32 @@
archname='s390'
+archobjs='uts/strtol_wrap.o uts/sprintf_wrap.o'
cc='cc -Xa'
+ccflags='-XTSTRINGS=1500000 -DStrtol=strtol_wrap32 -DStrtoul=strtoul_wrap32 -DSPRINTF_E_BUG'
cccdlflags='-pic'
-d_bincompat3='undef'
-d_csh='undef'
-d_lstat='define'
-d_suidsafe='define'
+d_bincompat3='undef'
+d_csh='undef'
+d_lstat='define'
+d_suidsafe='define'
dlsrc='dl_dlopen.xs'
-ld='ld'
+i_ieeefp='undef'
+ld='ld'
lddlflags='-G -z text'
libperl='libperl.so'
-libpth='/lib /usr/lib /usr/ccs/lib'
+libpth='/lib /usr/lib /usr/ccs/lib'
libs='-lsocket -lnsl -ldl -lm'
-optimize='undef'
-prefix='psf_prefix'
-static_ext='none'
-dynamic_ext='Fcntl IO Opcode Socket'
-useshrplib='define'
+libswanted='m'
+prefix='/usr/local'
+toke_cflags='optimize=""'
+useshrplib='define'
+
+#################################
+# Some less routine stuff:
+#################################
+cc -g -Xa -c -pic -O uts/strtol_wrap.c -o uts/strtol_wrap.o
+cc -g -Xa -c -pic -O uts/sprintf_wrap.c -o uts/sprintf_wrap.o
+# Make POSIX a static extension.
+cat <<'EOSH' > config.over
+static_ext='POSIX B'
+dynamic_ext=`echo " $dynamic_ext " |
+ sed -e 's/ POSIX / /' -e 's/ B / /'`
+EOSH
diff --git a/hints/uwin.sh b/hints/uwin.sh
index 0e5e11adfd..a0d3556581 100644
--- a/hints/uwin.sh
+++ b/hints/uwin.sh
@@ -1,36 +1,135 @@
#
-# hint file for U/WIN (UNIX for Windows 95/NT)
-#
-# created for U/WIN version 1.55
-# running under Windows NT 4.0 SP 3
-# using MSVC++ 5.0 for the compiler
-#
-# created by Joe Buehler (jbuehler@hekimian.com)
-#
-# for information about U/WIN see www.gtlinc.com
-#
+# The lines starting with #b that follow are the uwin.sh
+# file from Joe Buehler. Some lines are, themselves,
+# commented out. If an uncommented line disappears
+# altogether, it means it didn't seem to be needed any more,
+# to get a proper build on the following machine.
+# UWIN-NT korn-7200 3.19-5.0 2195 i686
+# But maybe they'll be useful to others on different machines.
+
+#b # hint file for U/WIN (UNIX for Windows 95/NT)
+#b #
+#b # created for U/WIN version 1.55
+#b # running under Windows NT 4.0 SP 3
+#b # using MSVC++ 5.0 for the compiler
+#b #
+#b # created by Joe Buehler (jbuehler@hekimian.com)
+#b #
+#b # for information about U/WIN see www.gtlinc.com
+#b #
+#b
+#b #ccflags=-D_BSDCOMPAT
+#b # confusion in Configure over preprocessor
+#b cppstdin=`pwd`/cppstdin
+#b cpprun=`pwd`/cppstdin
+#b # pwd.h confuses Configure
+#b d_pwcomment=undef
+#b d_pwgecos=define
+#b # work around case-insensitive file names
+#b firstmakefile=GNUmakefile
+#b # avoid compilation error
+#b i_utime=undef
+#b # compile/link flags
+#b ldflags=-g
+#b optimize=-g
+#b static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::scalar POSIX SDBM_File Socket Storable Unicode::Normalize attrs re"
+#b #static_ext=none
+#b # dynamic loading needs work
+#b usedl=undef
+#b # perl malloc will not work
+#b usemymalloc=n
+#b # cannot use nm
+#b usenm=undef
+#b # vfork() is buggy (as of 1.55 anyway)
+#b usevfork=false
+
+# __UWIN__ added so it could be used in ext/POSIX/POSIX.xs
+# to protect against either tzname definition. According to Dave Korn
+
+#dgk gcc on uwin also predefined _UWIN as does the borland and digital
+#dgk mars compiler.
+#dgk
+#dgk Only ncc does not define _UWIN and this is intentional. ncc is used
+#dgk to build binaries that do not require the uwin runtime.
+#dgk This could be used for building a native win32 perl using unix
+#dgk makefiles. However, in this case you don't wan't _UWIN defined.
+#dgk
+#dgk I have used _UWIN everywhere else in any uwin specific changes.
+#dgk and _WIN32 on windows specific changes, and _MSVC on any compiler
+#dgk Visual C specific changes. We also define _WINIX for any unix
+#dgk on windows implementation so that _UWIN or __cygwin__ imply _WINIX.
+
+# I left __UWIN__ as is, since I had already filed a patch,
+# and it might be useful to distinguish perl-specific tweaks
+# from generic uwin ones.
+
+ccflags="$ccflags -D__UWIN__"
+
+# This from Dave Korn
+#dgk Windows splits shared libraries into two parts; the part used
+#dgk for linking and the part that is used for running.
+#dgk Given a library foo, then the part you link with is named
+#dgk foo.lib
+#dgk and is in the lib directory. The part that you run with
+#dgk is named
+#dgk foo.dll or foo#.dll
+#dgk and is in the bin directory. This way when you set you PATH
+#dgk variable, it automatically does the library search.
+#dgk
+#dgk Static libraries use libfoo.a.
+#dgk By the way if you specify -lfoo, then it will first look for foo.lib
+#dgk and then libfoo.a. If you specify +lfoo, it will only look for
+#dgk static versions of the library.
+
+# So we use .lib as the extension, and put -lm in, because it is a .a
+# This probably accounts for the comment about dynamic libraries
+# needing work, and indeed, the build failed if I didn't undef it.
+
+lib_ext=".lib"
+libs="-lm"
+so=dll
+# dynamic loading still needs work
+usedl=undef
-#ccflags=-D_BSDCOMPAT
# confusion in Configure over preprocessor
cppstdin=`pwd`/cppstdin
cpprun=`pwd`/cppstdin
-# pwd.h confuses Configure
-d_pwcomment=undef
-d_pwgecos=define
+
+# lest it default to .exe, and then there's no perl in the test directory,
+# t, just a perl.exe, and make test promptly dies. _exe gets set to .exe
+# by Configure (on 5/23/2003) if exe_ext is merely null, so clean it out, too.
+exe_ext=''
+_exe=''
+
# work around case-insensitive file names
firstmakefile=GNUmakefile
-# avoid compilation error
-i_utime=undef
# compile/link flags
ldflags=-g
optimize=-g
-static_ext="B Data/Dumper Fcntl IO IPC/SysV Opcode POSIX SDBM_File Socket attrs"
-#static_ext=none
-# dynamic loading needs work
-usedl=undef
+
+# Original, with :: separators, cause make to choke.
+# No longer seems to be necessary at all.
+# static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter/Util/Call IO IPC/SysV MIME/Base64 Opcode PerlIO/scalar POSIX SDBM_File Socket Storable Unicode/Normalize attrs re"
+
# perl malloc will not work
usemymalloc=n
# cannot use nm
usenm=undef
# vfork() is buggy (as of 1.55 anyway)
usevfork=false
+
+# Some other comments:
+# If you see something like
+
+# got: '/E/users/jpl/src/cmd/perl/t'
+# expected: '/e/users/jpl/src/cmd/perl/t'
+# Failed test (../ext/Cwd/t/cwd.t at line 88)
+
+# when running tests under harness, try the simple expedient of
+# changing to directory
+# /E/users/jpl/src/cmd/perl/t # note the leading capital /E
+# before running the tests. UWIN is a bit schizophrenic about case.
+# It likes to return an uppercase "disk" letter for the leading directory,
+# but your home directory may well have that in lower case.
+# In most cases, they are entirely interchangeable, but the perl tests
+# don't ignore case. If they fail, change to the directory they expect.
diff --git a/hints/vmesa.sh b/hints/vmesa.sh
index 0213853fec..5fad22bf8b 100644
--- a/hints/vmesa.sh
+++ b/hints/vmesa.sh
@@ -218,7 +218,6 @@ dynamic_ext=''
eagain='EAGAIN'
ebcdic='define'
exe_ext=''
-extensions='Fcntl GDBM_File IO NDBM_File Opcode POSIX Socket IPC/SysV Errno Thread attrs re Data/dumper'
fpostype='fpos_t'
freetype='void'
groupstype='gid_t'
@@ -317,7 +316,7 @@ sig_num_init='0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,2
sizetype='size_t'
so='.a'
ssizetype='ssize_t'
-static_ext='Data/Dumper Fcntl GDBM_File IO IPC/SysV NDBM_File Opcode POSIX Socket Thread attrs re'
+static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Thread Time/HiRes Time/Piece attrs re'
stdchar='char'
stdio_cnt='(fp)->__countIn'
stdio_ptr='(fp)->__bufPtr'
diff --git a/hints/vos.sh b/hints/vos.sh
new file mode 100644
index 0000000000..1ba8731049
--- /dev/null
+++ b/hints/vos.sh
@@ -0,0 +1,147 @@
+# $Id: vos.sh,v 1.0 2001-12-11 09:30:00-05 Green Exp $
+
+# This is a hints file for Stratus VOS, using the POSIX environment
+# in VOS 14.4.0 and higher.
+#
+# VOS POSIX is based on POSIX.1-1996. It ships with gcc as the standard
+# compiler.
+#
+# Paul Green (Paul.Green@stratus.com)
+
+# C compiler and default options.
+cc=gcc
+ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=199509L"
+
+# Make command.
+make="/system/gnu_library/bin/gmake"
+# indented to not put it into config.sh
+ _make="/system/gnu_library/bin/gmake"
+
+# Architecture name
+archname="hppa1.1"
+
+# Executable suffix.
+# No, this is not a typo. The ".pm" really is the native
+# executable suffix in VOS. Talk about cosmic resonance.
+_exe=".pm"
+
+# Object library paths.
+loclibpth="/system/stcp/object_library"
+loclibpth="$loclibpth /system/stcp/object_library/common"
+loclibpth="$loclibpth /system/stcp/object_library/net"
+loclibpth="$loclibpth /system/stcp/object_library/socket"
+loclibpth="$loclibpth /system/posix_object_library/sysv"
+loclibpth="$loclibpth /system/posix_object_library"
+loclibpth="$loclibpth /system/c_object_library"
+loclibpth="$loclibpth /system/object_library"
+glibpth="$loclibpth"
+
+# Include library paths
+locincpth="/system/stcp/include_library"
+locincpth="$locincpth /system/include_library/sysv"
+usrinc="/system/include_library"
+
+# Where to install perl5.
+prefix=/system/ported/perl5
+
+# Linker is gcc.
+ld="gcc"
+
+# No shared libraries.
+so="none"
+
+# Don't use nm.
+usenm="n"
+
+# Make the default be no large file support.
+uselargefiles="n"
+
+# Don't use malloc that comes with perl.
+usemymalloc="n"
+
+# Make bison the default compiler-compiler.
+yacc="/system/gnu_library/bin/bison"
+
+# VOS doesn't have (or need) a pager, but perl needs one.
+pager="/system/gnu_library/bin/cat.pm"
+
+# VOS has a bug that causes _exit() to flush all files.
+# This confuses the tests. Make 'em happy here.
+fflushNULL=define
+
+# VOS has a link() function but it is a dummy.
+d_link="undef"
+
+# VOS does not have truncate() but we supply one in vos.c
+d_truncate="define"
+archobjs="vos.o"
+
+# Help gmake find vos.c
+test -h vos.c || ln -s vos/vos.c vos.c
+
+# VOS returns a constant 1 for st_nlink when stat'ing a
+# directory. Therefore, we must set this variable to stop
+# File::Find using the link count to determine whether there are
+# subdirectories to be searched.
+dont_use_nlink=define
+
+# Tell Configure where to find the hosts file.
+hostcat="cat /system/stcp/hosts"
+
+# VOS does not have socketpair() but we supply one in vos.c
+d_sockpair="define"
+
+# Once we have the compiler flags defined, Configure will
+# execute the following call-back script. See hints/README.hints
+# for details.
+cat > UU/cc.cbu <<'EOCBU'
+# This script UU/cc.cbu will get 'called-back' by Configure after it
+# has prompted the user for the C compiler to use.
+
+# Compile and run the a test case to see if bug gnu_g++-220 is
+# present. If so, lower the optimization level when compiling
+# pp_pack.c. This works around a bug in unpack.
+
+echo " "
+echo "Testing whether bug gnu_g++-220 is fixed in your compiler..."
+
+# Try compiling the test case.
+if $cc -o t001 -O $ccflags $ldflags ../hints/t001.c; then
+ gccbug=`$run ./t001`
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case "$gccbug" in
+ *fails*) cat >&4 <<EOF
+This C compiler ($gccversion) is known to have optimizer
+problems when compiling pp_pack.c. The Stratus bug number
+for this problem is gnu_g++-220.
+
+Disabling optimization for pp_pack.c.
+EOF
+ case "$pp_pack_cflags" in
+ '') pp_pack_cflags='optimize='
+ echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;;
+ *) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;;
+ esac
+ ;;
+ *) echo "Your compiler is ok." >&4
+ ;;
+ esac
+else
+ echo " "
+ echo "*** WHOA THERE!!! ***" >&4
+ echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4
+ case "$knowitall" in
+ '')
+ echo " You'd better start hunting for one and let me know about it." >&4
+ exit 1
+ ;;
+ esac
+fi
+
+$rm -f t001$_o t001$_exe t001.kp
+EOCBU
+
+