diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-06 17:09:19 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-06 17:09:19 +0000 |
commit | 4512cea31c94e21bbf22ca99a5bb525ea7a8c84c (patch) | |
tree | 628d1180baf59ff2cf578562cdd942fc008cf06b /gnu/usr.bin/perl/hints | |
parent | e852ed17d905386f3bbad057fda2f07926227f89 (diff) |
perl-5.6.0 + local changes
Diffstat (limited to 'gnu/usr.bin/perl/hints')
38 files changed, 1547 insertions, 418 deletions
diff --git a/gnu/usr.bin/perl/hints/README.hints b/gnu/usr.bin/perl/hints/README.hints index e36bd6d1dd9..5f23b29c2cb 100644 --- a/gnu/usr.bin/perl/hints/README.hints +++ b/gnu/usr.bin/perl/hints/README.hints @@ -11,7 +11,9 @@ over from perl4. Please send any problems or suggested changes to perlbug@perl.com. -Hint file naming convention: Each hint file name should have only +=head1 Hint file naming convention. + +Each hint file name should have only one '.'. (This is for portability to non-unix file systems.) Names should also fit in <= 14 characters, for portability to older SVR3 systems. File names are of the form $osname_$osvers.sh, with all '.' @@ -51,6 +53,56 @@ detect what is needed. A glossary of config.sh variables is in the file Porting/Glossary. +=head1 Setting variables + +=head2 Optimizer + +If you want to set a variable, try to allow for Configure command-line +overrides. For example, suppose you think the default optimizer +setting to be -O2 for a particular platform. You should allow for +command line overrides with something like + + case "$optimize" in + '') optimize='-O2' ;; + esac + +or, if your system has a decent test(1) command, + + test -z "$optimize" && optimize='-O2' + +This allows the user to select a different optimization level, e.g. +-O6 or -g. + +=head2 Compiler and Linker flags + +If you want to set $ccflags or $ldflags, you should append to the existing +value to allow Configure command-line settings, e.g. use + + ccflags="$ccflags -DANOTHER_OPTION_I_NEED" + +so that the user can do something like + + sh Configure -Dccflags='FIX_NEGATIVE_ZERO' + +and have the FIX_NEGATIVE_ZERO value preserved by the hints file. + +=head2 Libraries + +Configure will attempt to use the libraries listed in the variable +$libswanted. If necessary, you should remove broken libraries from +that list, or add additional libraries to that list. You should +*not* simply set $libs -- that ignores the possibilities of local +variations. For example, a setting of libs='-lgdbm -lm -lc' would +fail if another user were to try to compile Perl on a system without +GDBM but with Berkeley DB. See hints/dec_osf.sh and hints/solaris_2.sh +for examples. + +=head2 Other + +In general, try to avoid hard-wiring something that Configure will +figure out anyway. Also try to allow for Configure command-line +overrides. + =head1 Hint file tricks =head2 Printing critical messages @@ -189,12 +241,6 @@ 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. -=item Threading-related flags - -Similarly, after Configure prompts the user about whether or not to -compile Perl with threads, it will look for a "call-back" unit -usethreads.cbu. See hints/linux.sh for an example. - =item Future status I hope this "call-back" scheme is simple enough to use but powerful @@ -210,4 +256,4 @@ say things like "sh Configure -Dcc=gcc -Dusethreads" on the command line. Have the appropriate amount of fun :-) - Andy Dougherty doughera@lafcol.lafayette.edu + Andy Dougherty doughera@lafayette.edu diff --git a/gnu/usr.bin/perl/hints/aix.sh b/gnu/usr.bin/perl/hints/aix.sh index d2c45c0a590..d6f3dd78e0f 100644 --- a/gnu/usr.bin/perl/hints/aix.sh +++ b/gnu/usr.bin/perl/hints/aix.sh @@ -2,30 +2,99 @@ # AIX 3.x.x hints thanks to Wayne Scott <wscott@ichips.intel.com> # AIX 4.1 hints thanks to Christopher Chan-Nui <channui@austin.ibm.com>. # AIX 4.1 pthreading by Christopher Chan-Nui <channui@austin.ibm.com> and -# Jarkko Hietaniemi <jhi@iki.fi>. +# 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> +# +# Contact dfavor@corridor.com for any of the following: +# +# - AIX 43x and above support +# - gcc + threads support +# - socks support +# +# Apr 99 changes: +# +# - use nm in AIX 43x and above +# - gcc + threads now builds +# [(added support for socks) Jul 99 SOCKS support rewritten] +# +# Notes: +# +# - shared libperl support is tricky. if ever libperl.a ends up +# in /usr/local/lib/* it can override any subsequent builds of +# that same perl release. to make sure you know where the shared +# libperl.a is coming from do a 'dump -Hv perl' and check all the +# library search paths in the loader header. +# +# it would be nice to warn the user if a libperl.a exists that is +# going to override the current build, but that would be complex. +# +# better yet, a solid fix for this situation should be developed. +# # Configure finds setrgid and setruid, but they're useless. The man # pages state: # setrgid: The EPERM error code is always returned. # setruid: The EPERM error code is always returned. Processes cannot -# reset only their real user IDs. +# reset only their real user IDs. d_setrgid='undef' d_setruid='undef' alignbytes=8 -usemymalloc='n' +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac # Intuiting the existence of system calls under AIX is difficult, # at best; the safest technique is to find them empirically. -usenm='undef' + +# AIX 4.3.* and above default to using nm for symbol extraction +case "$osvers" in + 3.*|4.1.*|4.2.*) + usenm='undef' + ;; + *) + usenm='true' + ;; +esac so="a" +# AIX itself uses .o (libc.o) but we prefer compatibility +# with the rest of the world and with rest of the scripting +# languages (Tcl, Python) and related systems (SWIG). +# Stephanie Beals <bealzy@us.ibm.com> dlext="so" +# Take possible hint from the environment. If 32-bit is set in the +# environment, we can override it later. If set for 64, the +# 'sizeof' test sees a native 64-bit architecture and never looks back. +case "$OBJECT_MODE" in +32) + cat >&4 <<EOF + +You have OBJECT_MODE=32 set in the environment. +I take this as a hint you do not want to +build for a 64-bit address space. You will be +given the opportunity to change this later. +EOF + ;; +64) + cat >&4 <<EOF + +You have OBJECT_MODE=64 set in the environment. +This forces a full 64-bit build. If that is +not what you intended, please terminate this +program, unset it and restart. +EOF + ;; +*) ;; +esac + +# Trying to set this breaks the POSIX.c compilation + # Make setsockopt work correctly. See man page. # ccflags='-D_BSD=44' @@ -34,6 +103,8 @@ case "$archname" in '') archname="$osname" ;; esac +cc=${cc:-cc} + case "$osvers" in 3*) d_fchmod=undef ccflags="$ccflags -D_ALL_SOURCE" @@ -42,7 +113,7 @@ case "$osvers" in ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE" case "$cc" in *gcc*) ;; - *) ccflags="$ccflags -qmaxmem=8192" ;; + *) ccflags="$ccflags -qmaxmem=16384" ;; esac nm_opt='-B' ;; @@ -56,21 +127,26 @@ d_setreuid='undef' # # Tell perl which symbols to export for dynamic linking. case "$cc" in -*gcc*) ccdlflags='-Xlinker -bE:perl.exp' ;; -*) ccdlflags='-bE:perl.exp' ;; +*gcc*) ccdlflags='-Xlinker' ;; +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? +# -bE:$(BASEEXT).exp Export these symbols. This file contains only one +# symbol: boot_$(EXP) can it be auto-generated? case "$osvers" in 3*) - lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc' + lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc" ;; *) - lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc' + lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -b noentry -lc" ;; esac @@ -79,39 +155,230 @@ esac cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) - ccflags="$ccflags -DNEED_PTHREAD_INIT" - case "$cc" in - cc_r) ;; - cc|xlc_r) + ccflags="$ccflags -DNEED_PTHREAD_INIT" + case "$cc" in + gcc) ;; + cc_r) ;; + cc|xl[cC]_r) echo >&4 "Switching cc to cc_r because of POSIX threads." # xlc_r has been known to produce buggy code in AIX 4.3.2. - # (e.g. pragma/overload core dumps) + # (e.g. pragma/overload core dumps) Let's suspect xlC_r, too. # --jhi@iki.fi cc=cc_r - ;; - '') + ;; + '') cc=cc_r - ;; - *) - cat >&4 <<EOM + ;; + *) + cat >&4 <<EOM For pthreads you should use the AIX C compiler cc_r. -(now your compiler was '$cc') +(now your compiler was set to '$cc') Cannot continue, aborting. EOM - exit 1 + exit 1 ;; - esac + esac - # Add the POSIX threads library and the re-entrant libc. + # c_rify libswanted. + set `echo X "$libswanted "| sed -e 's/ \([cC]\) / \1_r /g'` + shift + libswanted="$*" + # c_rify lddlflags. + set `echo X "$lddlflags "| sed -e 's/ \(-l[cC]\) / \1_r /g'` + shift + lddlflags="$*" - lddlflags=`echo $lddlflags | sed 's/ -lc$/ -lpthreads -lc_r -lc/'` + # Insert pthreads to libswanted, before any libc or libC. + set `echo X "$libswanted "| sed -e 's/ \([cC]\) / pthreads \1 /'` + shift + libswanted="$*" + # Insert pthreads to lddlflags, before any libc or libC. + set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]\) / -lpthreads \1 /'` + shift + lddlflags="$*" - # Add the c_r library to the list of wanted libraries. - # Make sure the c_r library is before the c library or - # make will fail. - set `echo X "$libswanted "| sed -e 's/ c / c_r c /'` - shift - libswanted="$*" ;; esac EOCBU + +# This script UU/uselargefiles.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use large files. +cat > UU/uselargefiles.cbu <<'EOCBU' +case "$uselargefiles" in +''|$define|true|[yY]*) + lfcflags="`getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`" + lfldflags="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`" + # _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). + # (nothing strange shows up in $ldflags even in hexdump; + # so it may be something in the shell, instead?) + # Try it out: just uncomment the below line and rerun Configure: +# echo >&4 "AIX 4.3.1.0 $lfldflags mystery" ; exit 1 + # Just don't ask me how AIX does it, I spent hours wondering. + # Therefore the line re-evaluating lfldflags: it seems to fix + # the whatever it was that AIX managed to break. --jhi + lfldflags="`echo $lfldflags`" + lflibs="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + case "$lfcflags$lfldflags$lflibs" in + '');; + *) ccflags="$ccflags $lfcflags" + ldflags="$ldflags $lfldflags" + libswanted="$libswanted $lflibs" + ;; + esac + lfcflags='' + lfldflags='' + lflibs='' + ;; +esac +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. +cat > UU/use64bitint.cbu <<'EOCBU' +case "$use64bitint" in +$define|true|[yY]*) + case "`oslevel`" in + 3.*|4.[012].*) + cat >&4 <<EOM +AIX `oslevel` does not support 64-bit interfaces. +You should upgrade to at least AIX 4.3. +EOM + exit 1 + ;; + esac + ;; +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 "`oslevel`" in + 3.*|4.[012].*) + cat >&4 <<EOM +AIX `oslevel` does not support 64-bit interfaces. +You should upgrade to at least AIX 4.3. +EOM + exit 1 + ;; + esac + echo " " + echo "Checking the CPU width of your hardware..." >&4 + $cat >size.c <<EOCP +#include <stdio.h> +#include <sys/systemcfg.h> +int main (void) +{ + printf("%d\n",_system_configuration.width); + return(0); +} +EOCP + set size + if eval $compile_ok; then + lfcpuwidth=`./size` + echo "You are running on $lfcpuwidth bit hardware." + else + dflt="32" + echo " " + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the width of your CPU (in bits)?" + . ./myread + lfcpuwidth="$ans" + fi + $rm -f size.c size + case "$lfcpuwidth" in + 32*) + cat >&4 <<EOM +Bzzzt! At present, you can only perform a +full 64-bit build on a 64-bit machine. +EOM + exit 1 + ;; + esac + lfcflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" + lfldflags="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" + # See jhi's comments above regarding this re-eval. I've + # seen similar weirdness in the form of: + # +# 1506-173 (W) Option lm is not valid. Enter xlc for list of valid options. + # + # error messages from 'cc -E' invocation. Again, the offending + # string is simply not detectable by any means. Since it doesn't + # do any harm, I didn't pursue it. -- sh + lfldflags="`echo $lfldflags`" + lflibs="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + # -q32 and -b32 may have been set by uselargefiles or user. + # Remove them. + ccflags="`echo $ccflags | sed -e 's@-q32@@'`" + ldflags="`echo $ldflags | sed -e 's@-b32@@'`" + # Tell archiver to use large format. Unless we remove 'ar' + # from 'trylist', the Configure script will just reset it to 'ar' + # immediately prior to writing config.sh. This took me hours + # to figure out. + trylist="`echo $trylist | sed -e 's@^ar @@' -e 's@ ar @ @g' -e 's@ ar$@@'`" + ar="ar -X64" + nm_opt="-X64 $nm_opt" + # Note: Placing the 'lfcflags' variable into the 'ldflags' string + # is NOT a typo. ldlflags is passed to the C compiler for final + # linking, and it wants -q64 (-b64 is for ld only!). + case "$lfcflags$lfldflags$lflibs" in + '');; + *) ccflags="$ccflags $lfcflags" + ldflags="$ldflags $lfcflags" + lddlflags="$lfldflags $lddlflags" + libswanted="$libswanted $lflibs" + ;; + esac + case "$ccflags" in + *-DUSE_64_BIT_ALL*) ;; + *) ccflags="$ccflags -DUSE_64_BIT_ALL";; + esac + case "$archname64" in + ''|64*) archname64=64all ;; + esac + longsize="8" + # Don't try backwards compatibility + bincompat="$undef" + d_bincompat5005="$undef" + lfcflags='' + lfldflags='' + lflibs='' + lfcpuwidth='' + ;; +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]*) + ccflags="$ccflags -qlongdouble" + # The explicit cc128, xlc128, xlC128 are not needed, + # the -qlongdouble should do the trick. --jhi + d_Gconvert='sprintf((b),"%.*llg",(n),(x))' + ;; +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/gnu/usr.bin/perl/hints/amigaos.sh b/gnu/usr.bin/perl/hints/amigaos.sh index 9d86e52bc03..fff55b082cc 100644 --- a/gnu/usr.bin/perl/hints/amigaos.sh +++ b/gnu/usr.bin/perl/hints/amigaos.sh @@ -22,15 +22,20 @@ libpth="$prefix/lib /local/lib" glibpth="$libpth" xlibpth="$libpth" +# This should remove unwanted libraries instead of limiting the set +# to just these few. E.g. what about Berkeley DB? libswanted='gdbm m dld' so=' ' # compiler & linker flags +# Respect command-line values. -ccflags='-DAMIGAOS -mstackextend' -ldflags='' -optimize='-O2 -fomit-frame-pointer' +ccflags="$ccflags -DAMIGAOS -mstackextend" +case "$optimize" in +'') optimize='-O2 -fomit-frame-pointer';; +esac dlext='o' +# Are these two different from the defaults? cccdlflags='none' ccdlflags='none' lddlflags='-oformat a.out-amiga -r' diff --git a/gnu/usr.bin/perl/hints/beos.sh b/gnu/usr.bin/perl/hints/beos.sh index 8d76bc5146f..8017dce9cca 100644 --- a/gnu/usr.bin/perl/hints/beos.sh +++ b/gnu/usr.bin/perl/hints/beos.sh @@ -51,3 +51,7 @@ ld='gcc' # Of course, this may also change with R5. export PATH="$PATH:$PWD/beos" + +case "$ldlibpthname" in +'') ldlibpthname=LIBRARY_PATH ;; +esac diff --git a/gnu/usr.bin/perl/hints/cygwin32.sh b/gnu/usr.bin/perl/hints/cygwin32.sh deleted file mode 100644 index 5853499954a..00000000000 --- a/gnu/usr.bin/perl/hints/cygwin32.sh +++ /dev/null @@ -1,50 +0,0 @@ -#! /bin/sh -# cygwin32.sh - hintsfile for building perl on Windows NT using the -# Cygnus Win32 Development Kit. -# See "http://www.cygnus.com/misc/gnu-win32/" to learn about the kit. -# -path_sep=\; -exe_ext='.exe' -firstmakefile='GNUmakefile' -if test -f $sh.exe; then sh=$sh.exe; fi -startsh="#!$sh" -cc='gcc2' -ld='ld2' -usrinc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/include' -libpth='/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib /gnuwin32/H-i386-cygwin32/lib' -libs='-lcygwin -lm -lc -lkernel32' -# dynamic lib stuff -so='dll' -#i_dlfcn='define' -dlsrc='dl_cygwin32.xs' -usedl='y' -# flag to include the perl.exe export variable translation file cw32imp.h -# when building extension libs -cccdlflags='-DCYGWIN32 -DDLLIMPORT ' -# flag that signals gcc2 to build exportable perl -ccdlflags='-buildperl ' -lddlflags='-L../.. -L/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib -lperlexp -lcygwin' -d_voidsig='undef' -extensions='Fcntl IO Opcode SDBM_File' -lns='cp' -signal_t='int' -useposix='false' -rd_nodata='0' -eagain='EAGAIN' -archname='cygwin32' -# - -installbin='/usr/local/bin' -installman1dir='' -installman3dir='' -installprivlib='/usr/local/lib/perl5' -installscript='/usr/local/bin' - -installsitelib='/usr/local/lib/perl5/site_perl' -libc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/lib/libc.a' - -perlpath='/usr/local/bin/perl' - -sitelib='/usr/local/lib/perl5/site_perl' -sitelibexp='/usr/local/lib/perl5/site_perl' -usrinc='/gnuwin32/H-i386-cygwin32/i386-cygwin32/include' diff --git a/gnu/usr.bin/perl/hints/dec_osf.sh b/gnu/usr.bin/perl/hints/dec_osf.sh index 8758cbb8207..db7b869cf2b 100644 --- a/gnu/usr.bin/perl/hints/dec_osf.sh +++ b/gnu/usr.bin/perl/hints/dec_osf.sh @@ -58,20 +58,41 @@ # and it is called GEM. Many of the options we are going to use depend # on the compiler style. -# do NOT, I repeat, *NOT* take away those leading tabs +cc=${cc:-cc} + +# do NOT, I repeat, *NOT* take away the leading tabs +# Configure Black Magic (TM) # reset - _DEC_uname_r= _DEC_cc_style= - # set - _DEC_uname_r=`uname -r` - # _DEC_cc_style set soon below -# Configure Black Magic (TM) +case "`$cc -v 2>&1 | grep cc`" in +*gcc*) _gcc_version=`$cc -v 2>&1 | grep "gcc version" | sed 's%^gcc version \([0-9]*\)\.\([0-9]*\) .*%\1 \2%'` + set $_gcc_version + if test "$1" -lt 2 -o \( "$1" -eq 2 -a "$2" -lt 95 \); then + cat >&4 <<EOF + +Your cc seems to be gcc and its version seems to be less than 2.95. +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). + +Therefore, I strongly suggest upgrading your gcc. (Why don't you +use the vendor cc is also a good question. It comes with the operating +system and produces good code.) + +Note that as of gcc 2.95 (19990728) and Perl 5.6.0 (end of March 2000) +if the said Perl is compiled with the said gcc the lib/sdbm test will +dump core. As this doesn't happen with the vendor cc, this is +most probably a lingering bug in gcc. Therefore unless you have +a better gcc you are still better off using the vendor cc. + +Cannot continue, aborting. -case "$cc" in -*gcc*) ;; # pass +EOF + exit 1 + fi + ;; *) # compile something small: taint.c is fine for this. # the main point is the '-v' flag of 'cc'. - case "`cc -v -I. -c taint.c -o /tmp/taint$$.o 2>&1`" in + case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in */gemc_cc*) # we have the new DEC GEM CC _DEC_cc_style=new ;; @@ -80,12 +101,12 @@ case "$cc" in ;; esac # cleanup - rm -f /tmp/taint$$.o + rm -f taint$$.o ;; esac # be nauseatingly ANSI -case "$cc" in +case "`$cc -v 2>&1 | grep gcc`" in *gcc*) ccflags="$ccflags -ansi" ;; *) ccflags="$ccflags -std" @@ -98,7 +119,7 @@ esac # we want optimisation case "$optimize" in -'') case "$cc" in +'') case "`$cc -v 2>&1 | grep gcc`" in *gcc*) optimize='-O3' ;; *) case "$_DEC_cc_style" in @@ -147,13 +168,26 @@ lddlflags='-shared -expect_unresolved "*"' # Fancy compiler suites use optimising linker as well as compiler. # <spider@Orb.Nashua.NH.US> -case "$_DEC_uname_r" in +case "`uname -r`" in *[123].*) # old loader lddlflags="$lddlflags -O3" ;; -*) lddlflags="$lddlflags $optimize -msym" - # -msym: If using a sufficiently recent /sbin/loader, - # keep the module symbols with the modules. +*) if $test "X$optimize" = "X$undef"; then + lddlflags="$lddlflags -msym" + else + case "`/usr/sbin/sizer -v`" in + *4.0D*) + # QAR 56761: -O4 + .so may produce broken code, + # fixed in 4.0E or better. + ;; + *) + lddlflags="$lddlflags $optimize" + ;; + esac + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + lddlflags="$lddlflags -msym -std" + fi ;; esac # Yes, the above loses if gcc does not use the system linker. @@ -165,7 +199,7 @@ esac # As noted above the -DDEBUGGING is added automagically by Configure if -g. case "$optimize" in *-g*) ;; # left intentionally blank -*) case "$_DEC_uname_r" in +*) case "`uname -r`" in *[123].*) case "$useshrplib" in false|undef|'') lddlflags="$lddlflags -s" ;; @@ -187,38 +221,75 @@ case "$_DEC_cc_style.$useshrplib" in new.) useshrplib="$define" ;; esac +# The EFF_ONLY_OK from <sys/access.h> is present but dysfunctional for +# [RWX]_OK as of Digital UNIX 4.0[A-D]?. If and when this gets fixed, +# please adjust this appropriately. See also pp_sys.c just before the +# emulate_eaccess(). + +# Fixed in V5.0A. +case "`/usr/sbin/sizer -v`" in +*5.0[A-Z]*|*5.[1-9]*|*[6-9].[0-9]*) + : ok + ;; +*) +# V5.0 or previous +pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' + ;; +esac + +# The off_t is already 8 bytes, so we do have largefileness. + +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]*) - # Threads interfaces changed with V4.0. - case "`uname -r`" in - *[123].*) - libswanted="$libswanted pthreads mach exc c_r" - ccflags="-threads $ccflags" - ;; - *) - libswanted="$libswanted pthread exc" - ccflags="-pthread $ccflags" + # Threads interfaces changed with V4.0. + case "`$cc -v 2>&1 | grep gcc`" in + *gcc*)ccflags="-D_REENTRANT $ccflags" ;; + *) case "`uname -r`" in + *[123].*) ccflags="-threads $ccflags" ;; + *) ccflags="-pthread $ccflags" ;; + esac ;; - esac + esac + case "`uname -r`" in + *[123].*) libswanted="$libswanted pthreads mach exc c_r" ;; + *) libswanted="$libswanted pthread exc" ;; + esac - usemymalloc='n' + case "$usemymalloc" in + '') + usemymalloc='n' + ;; + 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. +case "$uselongdouble" in +$define|true|[yY]*) d_Gconvert='sprintf((b),"%.*Lg",(n),(x))' ;; +esac +EOCBU + # # Unset temporary variables no more needed. # unset _DEC_cc_style -unset _DEC_uname_r # # History: # +# perl5.005_51: +# +# September-1998 Jarkko Hietaniemi <jhi@iki.fi> +# +# * Added the -DNO_EFF_ONLY_OK flag ('use filetest;' support). +# # perl5.004_57: # # 19-Dec-1997 Spider Boardman <spider@Orb.Nashua.NH.US> diff --git a/gnu/usr.bin/perl/hints/dgux.sh b/gnu/usr.bin/perl/hints/dgux.sh index 03b285dbd4a..9a6f7a4879f 100644 --- a/gnu/usr.bin/perl/hints/dgux.sh +++ b/gnu/usr.bin/perl/hints/dgux.sh @@ -14,13 +14,8 @@ # as it would suck to try to get support if the vendor learned that you # were physically replacing the system binaries. # -# Be aware that if you opt to use dynamic loading you'll need to set -# your $LD_LIBRARY_PATH to include the source directory when you build, -# test and install the software. -# # -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 diff --git a/gnu/usr.bin/perl/hints/dynixptx.sh b/gnu/usr.bin/perl/hints/dynixptx.sh index 2edf0263053..11c6b5b3b06 100644 --- a/gnu/usr.bin/perl/hints/dynixptx.sh +++ b/gnu/usr.bin/perl/hints/dynixptx.sh @@ -19,10 +19,11 @@ libswanted=`echo $libswanted | sed -e 's/ inet / /'` # Configure defaults to usenm='y', which doesn't work very well usenm='n' -# for performance, apparently this makes a huge difference (~krader) +# removed d_vfork='define'; we can't use it any more ... -d_vfork='define' -optimize='-Wc,-O3 -W0,-xstring' +case "$optimize" in +'') optimize='-Wc,-O3 -W0,-xstring' ;; +esac # We override d_socket because it's very hard for Configure to get it right # in Dynix/Ptx, for several reasons. @@ -49,9 +50,9 @@ case "$osvers" in d_sockpair='define' ;; 4.2*) # on ptx/TCP 4.2, we can use BSD sockets, but they're not the default. - cppflags='-Wc,+bsd-socket' - ccflags='-Wc,+bsd-socket' - ldflags='-Wc,+bsd-socket' + cppflags="$cppflags -Wc,+bsd-socket" + ccflags="$ccflags -Wc,+bsd-socket" + ldflags="$ldflags -Wc,+bsd-socket" d_socket='define' d_oldsock='undef' d_sockpair='define' diff --git a/gnu/usr.bin/perl/hints/epix.sh b/gnu/usr.bin/perl/hints/epix.sh index b91537a202a..dcad3c5d476 100644 --- a/gnu/usr.bin/perl/hints/epix.sh +++ b/gnu/usr.bin/perl/hints/epix.sh @@ -43,9 +43,9 @@ d_flock='undef' # of libswanted excludes some libraries found there. You may want to # prevent "ucb" from being removed from libswanted and see if perl will # build on your system. -ldflags='-non_shared -systype svr4 -L/svr4/usr/lib -L/svr4/usr/lib/cmplrs/cc -L/usr/ccs/lib -L/svr4/usr/ucblib' -ccflags='-systype svr4 -D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude' -cppflags='-D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude' +ldflags="$ldflags -non_shared -systype svr4 -L/svr4/usr/lib -L/svr4/usr/lib/cmplrs/cc -L/usr/ccs/lib -L/svr4/usr/ucblib" +ccflags="$ccflags -systype svr4 -D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude" +cppflags="$ccflags -D__STDC__=0 -I/svr4/usr/include -I/svr4/usr/ucbinclude" # Don't use problematic libraries: @@ -64,12 +64,3 @@ lddlflags="-G $ldflags" # Probably needed for dynamic loading # We _do_ want the -L paths in ldflags, but we don't want the -non_shared. lddlflags=`echo $lddlflags | sed 's/-non_shared//'` -cat <<'EOM' >&4 - -If you wish to use dynamic linking, you must use - LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH -or - setenv LD_LIBRARY_PATH `pwd` -before running make. - -EOM diff --git a/gnu/usr.bin/perl/hints/esix4.sh b/gnu/usr.bin/perl/hints/esix4.sh index 3d3145d2550..b1d697cccbd 100644 --- a/gnu/usr.bin/perl/hints/esix4.sh +++ b/gnu/usr.bin/perl/hints/esix4.sh @@ -3,22 +3,26 @@ # Kevin O'Gorman ( kevin@kosman.UUCP, kevin%kosman.uucp@nrc.com ) # # Use Configure -Dcc=gcc to use gcc. + +# Why can't we just use PATH? It contains /usr/ccs/bin. case "$cc" in '') cc='/bin/cc' test -f $cc || cc='/usr/ccs/bin/cc' ;; esac -ldflags='-L/usr/ccs/lib -L/usr/ucblib' + +ldflags="$ldflags -L/usr/ccs/lib -L/usr/ucblib" test -d /usr/local/man || mansrc='none' -ccflags='-I/usr/include -I/usr/ucbinclude' +# Do we really need to tell cc to look in /usr/include? +ccflags="$ccflags -I/usr/include -I/usr/ucbinclude" libswanted=`echo " $libswanted " | sed -e 's/ malloc / /' ` d_index='undef' d_suidsafe=define usevfork='false' if test "$osvers" = "3.0"; then d_gconvert='undef' - grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >/tmp/esix$$ - if test -s /tmp/esix$$; then + grep 'define[ ]*AF_OSI[ ]' /usr/include/sys/socket.h | grep '/\*[^*]*$' >esix$$ + if test -s esix$$; then cat <<EOM >&2 WARNING: You are likely to have problems compiling the Socket extension @@ -27,15 +31,6 @@ unless you fix the unterminated comment for AF_OSI in the file EOM fi - rm -f /tmp/esix$$ + rm -f esix$$ fi -cat <<'EOM' >&4 - -If you wish to use dynamic linking, you must use - LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH -or - setenv LD_LIBRARY_PATH `pwd` -before running make. - -EOM diff --git a/gnu/usr.bin/perl/hints/freebsd.sh b/gnu/usr.bin/perl/hints/freebsd.sh index 66f6ca02bfc..fd60ba3cb91 100644 --- a/gnu/usr.bin/perl/hints/freebsd.sh +++ b/gnu/usr.bin/perl/hints/freebsd.sh @@ -99,7 +99,11 @@ esac case "$osvers" in 0.*|1.0*) ;; -3.*|4.0*) +1*|2*) cccdlflags='-DPIC -fpic' + lddlflags="-Bshareable $lddlflags" + ;; + +*) objformat=`/usr/bin/objformat` if [ x$objformat = xelf ]; then libpth="/usr/lib /usr/local/lib" @@ -108,17 +112,23 @@ case "$osvers" in lddlflags="-shared " else if [ -e /usr/lib/aout ]; then - libpth="/usr/lib/aout /usr/local/lib /usr/lib" - glibpth="/usr/lib/aout /usr/local/lib /usr/lib" - fi - lddlflags='-Bshareable' + libpth="/usr/lib/aout /usr/local/lib /usr/lib" + glibpth="/usr/lib/aout /usr/local/lib /usr/lib" + fi + lddlflags='-Bshareable' fi cccdlflags='-DPIC -fpic' ;; +esac -*) cccdlflags='-DPIC -fpic' - lddlflags="-Bshareable $lddlflags" - ;; +case "$osvers" in +0*|1*|2*|3*) ;; + +*) + if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then + usenm=false + fi + ;; esac cat <<'EOM' >&4 @@ -147,8 +157,8 @@ case "$osvers" in # the equivalent in the main Configure so we copy a little # from Configure XXX Configure should be fixed. if $test -r $src/patchlevel.h;then - patchlevel=`awk '/define[ ]+PATCHLEVEL/ {print $3}' $src/patchlevel.h` - subversion=`awk '/define[ ]+SUBVERSION/ {print $3}' $src/patchlevel.h` + patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h` + subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h` else patchlevel=0 subversion=0 @@ -164,22 +174,17 @@ esac cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) - lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'` + lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|tail -1` case "$osvers" in - 2.2.8*|3.*|4.*) - if [ ! -r "$lc_r" ]; then - cat <<EOM >&4 -POSIX threads should be supported by FreeBSD $osvers -- -but your system is missing the shared libc_r. -(/sbin/ldconfig -r doesn't find any). + 0*|1*|2.0*|2.1*) cat <<EOM >&4 +I did not know that FreeBSD $osvers supports POSIX threads. -Consider using the latest STABLE release. +Feel free to tell perlbug@perl.com otherwise. EOM - exit 1 - fi - ldflags="-pthread $ldflags" + exit 1 ;; - 2.2*) + + 2.2.[0-7]*) cat <<EOM >&4 POSIX threads are not supported well by FreeBSD $osvers. @@ -192,13 +197,21 @@ or preferably to 3.something. EOM exit 1 ;; - *) cat <<EOM >&4 -I did not know that FreeBSD $osvers supports POSIX threads. -Feel free to tell perlbug@perl.com otherwise. + *) + if [ ! -r "$lc_r" ]; then + cat <<EOM >&4 +POSIX threads should be supported by FreeBSD $osvers -- +but your system is missing the shared libc_r. +(/sbin/ldconfig -r doesn't find any). + +Consider using the latest STABLE release. EOM - exit 1 + exit 1 + fi + ldflags="-pthread $ldflags" ;; + esac set `echo X "$libswanted "| sed -e 's/ c / c_r /'` diff --git a/gnu/usr.bin/perl/hints/hpux.sh b/gnu/usr.bin/perl/hints/hpux.sh index 8a9e3cb25d2..ce15f552b44 100644 --- a/gnu/usr.bin/perl/hints/hpux.sh +++ b/gnu/usr.bin/perl/hints/hpux.sh @@ -21,8 +21,10 @@ # 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 -# This version: August 15, 1997 +# This version: March 8, 2000 # Current maintainer: Jeff Okamoto <okamoto@corp.hp.com> #-------------------------------------------------------------------- @@ -64,21 +66,19 @@ ccflags="$ccflags -D_HPUX_SOURCE" # Check if you're using the bundled C compiler. This compiler doesn't support -# ANSI C (the -Aa flag) nor can it produce shared libraries. Thus we have -# to turn off dynamic loading. +# 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 - case "$usedl" in - '') usedl="$undef" cat <<'EOM' >&4 -The bundled C compiler can not produce shared libraries, so you will -not be able to use dynamic loading. +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. +Cannot continue, aborting. EOM - ;; - esac + 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 @@ -92,19 +92,22 @@ EOM cppminus='-' cpplast='-' fi - # 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='+O3' - #cccdlflags='+z +O2' - optimize='-O' + 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 -# Even if you use gcc, prefer the HP math library over the GNU one. - -case "`$cc -v 2>&1`" in -"*gcc*" ) test -d /lib/pa1.1 && ccflags="$ccflags -L/lib/pa1.1" ;; +case `$cc -v 2>&1`"" in +*gcc*) ccisgcc="$define" ;; +*) ccisgcc='' ;; esac # Determine the architecture type of this system. @@ -139,60 +142,78 @@ else selecttype='int *' 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 +# 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 10 ]; then - cat <<EOM >&4 -HP-UX $xxOsRevMajor cannot support POSIX threads. -Consider upgrading to at least HP-UX 11. + 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 - case "$xxOsRevMajor" in - 10) - # Under 10.X, a threaded perl can be built, but it needs - # libcma and OLD_PTHREADS_API. Also <pthread.h> needs to - # be #included before any other includes (in perl.h) - if [ ! -f /usr/include/pthread.h -o ! -f /usr/lib/libcma.sl ]; then - cat <<EOM >&4 -In HP-UX 10.X for POSIX threads you need both of the files -/usr/include/pthread.h and /usr/lib/libcma.sl. -Either you must install the CMA package or you must upgrade to HP-UX 11. -Cannot continue, aborting. + exit 1 + fi + + # Without the 64-bit libc we cannot do much. + libc='/lib/pa20_64/libc.sl' + if [ ! -f "$libc" ]; then + cat <<EOM >&4 + +*** You do not seem to have the 64-bit libraries in /lib/pa20_64. +*** Most importantly, I cannot find the $libc. +*** Cannot continue, aborting. + EOM - exit 1 - fi + exit 1 + fi - # HP-UX 10.X uses the old pthreads API - case "$d_oldpthreads" in - '') d_oldpthreads="$define" ;; - esac + ccflags="$ccflags +DD64" + ldflags="$ldflags +DD64" + test -d /lib/pa20_64 && loclibpth="$loclibpth /lib/pa20_64" + 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 - # include libcma before all the others - libswanted="cma $libswanted" + 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 - # tell perl.h to include <pthread.h> before other include files - ccflags="$ccflags -DPTHREAD_H_FIRST" + set `echo " $libswanted " | sed -e 's@ dl @ @'` + libswanted="$*" - # CMA redefines select to cma_select, and cma_select expects int * - # instead of fd_set * (just like 9.X) - selecttype='int *' - ;; - 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 + +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 -EOCBU # Remove bad libraries that will cause problems # (This doesn't remove libraries that don't actually exist) @@ -219,7 +240,10 @@ libswanted="$*" # ccdlflags="-Wl,-E -Wl,-B,immediate,-B,nonfatal $ccdlflags" ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags" -usemymalloc='y' +case "$usemymalloc" in +'') usemymalloc='y' ;; +esac + alignbytes=8 # For native nm, you need "-p" to produce BSD format output. nm_opt='-p' @@ -241,6 +265,47 @@ case "$d_dosuid" in '') d_dosuid="$undef" ;; esac +# HP-UX 11 groks also LD_LIBRARY_PATH but SHLIB_PATH +# is recommended for compatibility. +case "$ldlibpthname" in +'') ldlibpthname=SHLIB_PATH ;; +esac + +# 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. +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 + fi + ;; + esac +fi + +EOSH + # 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: @@ -248,3 +313,96 @@ esac # assembler of the form: # (warning) Use of GR3 when frame >= 8192 may cause conflict. # These warnings are harmless and can be safely ignored. + +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]*) + 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, but it needs + # libcma and OLD_PTHREADS_API. Also <pthread.h> needs to + # be #included before any other includes (in perl.h) + if [ ! -f /usr/include/pthread.h -o ! -f /usr/lib/libcma.sl ]; then + cat <<EOM >&4 +In HP-UX 10.X for POSIX threads you need both of the files +/usr/include/pthread.h and /usr/lib/libcma.sl. +Either you must install the CMA package or you must upgrade to HP-UX 11. +Cannot continue, aborting. +EOM + exit 1 + fi + + # HP-UX 10.X uses the old pthreads API + case "$d_oldpthreads" in + '') d_oldpthreads="$define" ;; + esac + + # include libcma before all the others + libswanted="cma $libswanted" + + # 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) + selecttype='int *' + ;; + 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 +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. + ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + 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 +EOCBU + +# keep that leading tab. + ccisgcc='' + diff --git a/gnu/usr.bin/perl/hints/irix_4.sh b/gnu/usr.bin/perl/hints/irix_4.sh index 8013c8a1f49..5c5bdb2f0d0 100644 --- a/gnu/usr.bin/perl/hints/irix_4.sh +++ b/gnu/usr.bin/perl/hints/irix_4.sh @@ -33,3 +33,13 @@ EOM ;; esac +case " $use64bits $use64bitint $use64bitall " in +*" $define "*|*" true "*|*" [yY] "*) + 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 + diff --git a/gnu/usr.bin/perl/hints/irix_5.sh b/gnu/usr.bin/perl/hints/irix_5.sh index 757ffff3847..f895bcc5f69 100644 --- a/gnu/usr.bin/perl/hints/irix_5.sh +++ b/gnu/usr.bin/perl/hints/irix_5.sh @@ -43,3 +43,13 @@ EOM ;; esac +case " $use64bits $use64bitint $use64bitall " in +*" $define "*|*" true "*|*" [yY] "*) + 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 + diff --git a/gnu/usr.bin/perl/hints/irix_6.sh b/gnu/usr.bin/perl/hints/irix_6.sh index 3250fc7d4a8..9d9852d0491 100644 --- a/gnu/usr.bin/perl/hints/irix_6.sh +++ b/gnu/usr.bin/perl/hints/irix_6.sh @@ -25,6 +25,8 @@ # gcc-enabled by Kurt Starsinic <kstar@isinet.com> on 3/24/1998 +# 64-bitty by Jarkko Hietaniemi on 9/1998 + # Use sh Configure -Dcc='cc -n32' to try compiling with -n32. # or -Dcc='cc -n32 -mips3' (or -mips4) to force (non)portability # Don't bother with -n32 unless you have the 7.1 or later compilers. @@ -33,11 +35,41 @@ # Let's assume we want to use 'cc -n32' by default, unless the # necessary libm is missing (which has happened at least twice) case "$cc" in -'') - if test -f /usr/lib32/libm.so - then - cc='cc -n32' - fi ;; +'') case "$use64bitall" in + "$define"|true|[yY]*) test -f /usr/lib64/libm.so && cc='cc -64' ;; + *) test -f /usr/lib32/libm.so && cc='cc -n32' ;; + esac +esac +test -z "$cc" && cc=cc + +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 + ;; +esac + +case "$use64bitall" in +"$define"|true|[yY]*) + case "`uname -s`" in + IRIX) + cat >&4 <<EOM +You cannot use -Duse64bitall in 32-bit IRIX, sorry. + +Cannot continue, aborting. +EOM + exit 1 + ;; + esac + ;; esac # Check for which compiler we're using @@ -45,6 +77,86 @@ esac case "$cc" in *"cc -n32"*) + libscheck='case "`/usr/bin/file $xxx`" in +*N32*) ;; +*) xxx=/no/n32$xxx ;; +esac' + + # NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker + 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' + ;; +*"cc -64") + + 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' + 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="-64 -shared -check_registry /usr/lib64/so_locations" + lddlflags="-64 -shared" + libc='/usr/lib64/libc.so' + plibpth='/usr/lib64 /lib64 /usr/ccs/lib' + ;; +*gcc*) + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -D_POSIX_C_SOURCE" + optimize="-O3" + usenm='undef' + case "`uname -s`" in + # Without the -mabi=64 gcc in 64-bit IRIX has problems passing + # and returning small structures. This affects inet_*() and semctl(). + # See http://reality.sgi.com/ariel/freeware/gcc-2.8.1-notes.html + # for more information. Reported by Lionel Cons <lionel.cons@cern.ch>. + IRIX64) ccflags="$ccflags -mabi=64" + ldflags="$ldflags -mabi=64 -L/usr/lib64" + lddlflags="$lddlflags -mabi=64" + ;; + *) ccflags="$ccflags -DIRIX32_SEMUN_BROKEN_BY_GCC" + ;; + esac + ;; +*) + # this is needed to force the old-32 paths + # since the system default can be changed. + ccflags="$ccflags -32 -D_BSD_TYPES -D_BSD_TIME -Olimit 3100" + optimize='-O' + ;; +esac + +# Settings common to both native compiler modes. +case "$cc" in +*"cc -n32"|*"cc -64") + ld=$cc + + # perl's malloc can return improperly aligned buffer + # which (under 5.6.0RC1) leads into really bizarre bus errors + # and freak test failures (lib/safe1 #18, for example), + # even more so with -Duse64bitall: for example lib/io_linenumtb. + # fails under the harness but succeeds when run separately, + # under make test pragma/warnings #98 fails, and lib/io_dir + # apparently coredumps (the last two don't happen under + # the harness. Helmut Jarausch is seeing bus errors from + # 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' + # 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. # so some serious hackery follows to set pp_ctl flags correctly. @@ -52,11 +164,11 @@ 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,1184 -OPT:Olimit=0" + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1042,1048,1110,1116,1174,1184,1552 -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,1184 -OPT:Olimit=0" + 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 @@ -65,15 +177,15 @@ case "$cc" in pp_ctl_cflags='optimize=-O' ;; *7.*) # Mongoose 7.2.1+ - ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0:space=ON" + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0:space=ON" optimize='-O3' ;; *6.2*) # Ragnarok 6.2 - ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184" + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552" optimize='none' ;; *) # Be safe and not optimize - ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1184 -OPT:Olimit=0" + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0" optimize='none' ;; esac @@ -89,45 +201,25 @@ pp_ctl_cflags='optimize=-O' # absolute paths (again, see the pthread.h change below). # -- krishna@sgi.com, 8/23/98 -if [ "X${TOOLROOT}" != "X" ]; then -# we cant set cppflags because it gets overwritten -# we dont actually need $TOOLROOT/usr/include on the cc line cuz the -# modules functionality already includes it but -# XXX - how do I change cppflags in the hints file? - ccflags="$ccflags -I${TOOLROOT}/usr/include" + if [ "X${TOOLROOT}" != "X" ]; then + # we cant set cppflags because it gets overwritten + # we dont actually need $TOOLROOT/usr/include on the cc line cuz the + # modules functionality already includes it but + # XXX - how do I change cppflags in the hints file? + ccflags="$ccflags -I${TOOLROOT}/usr/include" usrinc="${TOOLROOT}/usr/include" -fi + fi - ld=$cc - # perl's malloc can return improperly aligned buffer - # usemymalloc='undef' -malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"' - # NOTE: -L/usr/lib32 -L/lib32 are automatically selected by the linker - 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' - nm_opt='-p' - nm_so_opt='-p' - ;; -*gcc*) - ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -D_POSIX_C_SOURCE" - optimize="-O3" - usenm='undef' - ;; -*) - # this is needed to force the old-32 paths - # since the system default can be changed. - ccflags="$ccflags -32 -D_BSD_TYPES -D_BSD_TIME -Olimit 3100" - optimize='-O' ;; esac +# Don't groan about unused libraries. +ldflags="$ldflags -Wl,-woff,84" + +case "`$cc -version 2>&1`" in +*7.2.*) op_cflags='optimize=-O1' ;; # workaround for an optimizer bug +esac + # 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) @@ -135,6 +227,11 @@ set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /' 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. # @@ -159,9 +256,9 @@ set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /' shift libswanted="$*" +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 test ! -f ${TOOLROOT}/usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then @@ -209,3 +306,5 @@ EOM esac EOCBU +# The -n32 makes off_t to be 8 bytes, so we should have largefileness. + diff --git a/gnu/usr.bin/perl/hints/irix_6_0.sh b/gnu/usr.bin/perl/hints/irix_6_0.sh index e61db0460fc..50498af7180 100644 --- a/gnu/usr.bin/perl/hints/irix_6_0.sh +++ b/gnu/usr.bin/perl/hints/irix_6_0.sh @@ -52,3 +52,13 @@ EOM ;; esac +case " $use64bits $use64bitint $use64bitall " in +*" $define "*|*" true "*|*" [yY] "*) + 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 + diff --git a/gnu/usr.bin/perl/hints/irix_6_1.sh b/gnu/usr.bin/perl/hints/irix_6_1.sh index e61db0460fc..50498af7180 100644 --- a/gnu/usr.bin/perl/hints/irix_6_1.sh +++ b/gnu/usr.bin/perl/hints/irix_6_1.sh @@ -52,3 +52,13 @@ EOM ;; esac +case " $use64bits $use64bitint $use64bitall " in +*" $define "*|*" true "*|*" [yY] "*) + 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 + diff --git a/gnu/usr.bin/perl/hints/linux.sh b/gnu/usr.bin/perl/hints/linux.sh index 4764e9ea4bd..4fb2f89e7c2 100644 --- a/gnu/usr.bin/perl/hints/linux.sh +++ b/gnu/usr.bin/perl/hints/linux.sh @@ -43,12 +43,30 @@ ignore_versioned_solibs='y' # 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 -case "$prefix" in -'') prefix='/usr' ;; -esac - -# gcc-2.6.3 defines _G_HAVE_BOOL to 1, but doesn't actually supply bool. -ccflags="-Dbool=char -DHAS_BOOL $ccflags" +# +# 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. @@ -56,6 +74,19 @@ set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /'` shift 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 +# are insufficiently precise to distinguish things like +# libc-2.0.6 and libc-2.0.7. +if test -L /lib/libc.so.6; then + libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'` + libc=/lib/$libc +fi + # Configure may fail to find lstat() since it's a static/inline # function in <sys/stat.h>. d_lstat=define @@ -224,6 +255,15 @@ fi #'osfmach3ppc') ccdlflags='-Wl,-E' ;; #esac +case "`uname -r`" in +sparc-linux) + case "$cccdlflags" in + *-fpic*) cccdlflags="`echo $cccdlflags|sed 's/-fpic/-fPIC/'`" ;; + *) cccdlflags="$cccdlflags -fPIC" ;; + esac + ;; +esac + # 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' @@ -236,3 +276,13 @@ $define|true|[yY]*) ;; esac 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]*) + ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + ;; +esac +EOCBU diff --git a/gnu/usr.bin/perl/hints/lynxos.sh b/gnu/usr.bin/perl/hints/lynxos.sh index ddffcbe3cc7..0023e831b0b 100644 --- a/gnu/usr.bin/perl/hints/lynxos.sh +++ b/gnu/usr.bin/perl/hints/lynxos.sh @@ -4,8 +4,16 @@ # These hints were submitted by: # Greg Seibert # seibert@Lynx.COM +# and +# Ed Mooring +# mooring@lynx.com # cc='gcc' so='none' usemymalloc='n' +d_union_semun='define' +ccflags="$ccflags -DEXTRA_F_IN_SEMUN_BUF -D__NO_INCLUDE_WARN__" + +# When LynxOS runs a script with "#!" it sets argv[0] to the script name +toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' diff --git a/gnu/usr.bin/perl/hints/machten.sh b/gnu/usr.bin/perl/hints/machten.sh index f283873699d..b4409c1bf0b 100644 --- a/gnu/usr.bin/perl/hints/machten.sh +++ b/gnu/usr.bin/perl/hints/machten.sh @@ -1,18 +1,26 @@ +#! /bin/bash # machten.sh -# This is for MachTen 4.0.3. It might work on other versions and variants too. +# This is for MachTen 4.1.4. It might work on other versions and variants +# too. If it doesn't, tell me, and I'll try to fix it -- domo@computer.org # # Users of earlier MachTen versions might need a fixed tr from ftp.tenon.com. # This should be described in the MachTen release notes. # # MachTen 2.x has its own hint file. # -# This file has been put together by Andy Dougherty +# The original version of this file was put together by Andy Dougherty # <doughera@lafcol.lafayette.edu> based on comments from lots of # folks, especially # Mark Pease <peasem@primenet.com> # Martijn Koster <m.koster@webcrawler.com> # Richard Yeh <rcyeh@cco.caltech.edu> # +# Remove dynamic loading libraries from search; enable SysV IPC with +# MachTen 4.1.4 and above; define SYSTEM_ALIGN_BYTES for old MT versions +# -- Dominic Dunlop <domo@computer.org> 000224 +# Disable shadow password file access: MT 4.1.1 has necessary library +# functions, but not header file (or documentation) +# -- Dominic Dunlop <domo@computer.org> 990804 # For now, explicitly disable dynamic loading -- MT 4.1.1 has it, # but these hints do not yet support it. # Define NOTEDEF_MACHTEN to undo gratuitous Tenon hack to signal.h. @@ -36,6 +44,13 @@ # # Comments, questions, and improvements welcome! # +# MachTen 4.1.1's support for shadow password file access is incomplete: +# disable its use completely. +d_endspent=${d_endspent:-undef} +d_getspent=${d_getspent:-undef} +d_getspnam=${d_getspnam:-undef} +d_setspent=${d_setspent:-undef} + # MachTen 4.1.1 does support dynamic loading, but perl doesn't # know how to use it yet. usedl=${usedl:-undef} @@ -61,15 +76,16 @@ fi # by -DPLAIN_MALLOC and -DNO_FANCY_MALLOC. usemymalloc=${usemymalloc:-y} +# Older versions of MachTen malloc() data on a two-byte boundary, which +# works, but slows down operations on long, float and double data. +# Perl's malloc() can compensate if SYSTEM_ALLOC_ALIGNMENT is suitably +# defined. +if expr "$osvers" \< "4.1" >/dev/null +then +system_alloc_alignment=" -DSYSTEM_ALLOC_ALIGNMENT=2" +fi # Do not wrap the following long line -malloc_cflags='ccflags="$ccflags -DPLAIN_MALLOC -DNO_FANCY_MALLOC -DUSE_PERL_SBRK"' - -# Note that an empty malloc_cflags appears in config.sh if perl's -# malloc() is not used. his is harmless. -case "$usemymalloc" in -n) unset malloc_cflags;; -*) ccflags="$ccflags -DHIDEMYMALLOC" -esac +malloc_cflags='ccflags="$ccflags -DPLAIN_MALLOC -DNO_FANCY_MALLOC -DUSE_PERL_SBRK$system_alloc_alignment"' # When MachTen does a fork(), it immediately copies the whole of # the parent process' data space for the child. This can be @@ -150,19 +166,46 @@ alignbytes=8 # friends. Use setjmp and friends instead. expr "$osvers" \< "4.0.3" > /dev/null && d_sigsetjmp='undef' -# System V IPC support in MachTen 4.1 is incomplete (missing msg function +# System V IPC before MachTen 4.1.4 is incomplete (missing msg function # prototypes, no ftok()), buggy (semctl(.., .., IPC_STATUS, ..) hangs -# system), and undocumented. Claim it's not there until things improve. +# system), and undocumented. Claim it's not there at all before 4.1.4. +if expr "$osvers" \< "4.1.4" >/dev/null +then d_msg=${d_msg:-undef} d_sem=${d_sem:-undef} d_shm=${d_shm:-undef} +fi + + +# As of MachTen 4.1.4 the msg* and shm* are in libc but unimplemented +# (an attempt to use them causes a runtime error) +# XXX Configure probe for really functional msg*() is needed XXX +# XXX Configure probe for really functional shm*() is needed XXX +if test "$d_msg" = ""; then + d_msgget=${d_msgget:-undef} + d_msgctl=${d_msgctl:-undef} + d_msgsnd=${d_msgsnd:-undef} + d_msgrcv=${d_msgrcv:-undef} + case "$d_msgget$d_msgsnd$d_msgctl$d_msgrcv" in + *"undef"*) d_msg="$undef" ;; + esac +fi +if test "$d_shm" = ""; then + d_shmat=${d_shmat:-undef} + d_shmdt=${d_shmdt:-undef} + d_shmget=${d_shmget:-undef} + d_shmctl=${d_shmctl:-undef} + case "$d_shmat$d_shmctl$d_shmdt$d_shmget" in + *"undef"*) d_shm="$undef" ;; + esac +fi # Get rid of some extra libs which it takes Configure a tediously -# long time never to find on MachTen +# long time never to find on MachTen, or which break perl set `echo X "$libswanted "|sed -e 's/ net / /' -e 's/ socket / /' \ -e 's/ inet / /' -e 's/ nsl / /' -e 's/ nm / /' -e 's/ malloc / /' \ -e 's/ ld / /' -e 's/ sun / /' -e 's/ posix / /' \ - -e 's/ cposix / /' -e 's/ crypt / /' \ + -e 's/ cposix / /' -e 's/ crypt / /' -e 's/ dl / /' -e 's/ dld / /' \ -e 's/ ucb / /' -e 's/ bsd / /' -e 's/ BSD / /' -e 's/ PW / /'` shift libswanted="$*" @@ -198,6 +241,11 @@ Similarly, when you see select the default answer: vfork() works, and avoids expensive data copying. +You may also see "WHOA THERE!!!" messages concerning \$d_endspent, +\$d_getspent, \$d_getspnam and \$d_setspent. In all cases, select the +default answer: MachTen's support for shadow password file access is +incomplete, and should not be used. + At the end of Configure, you will see a harmless message Hmm...You had some extra variables I don't know about...I'll try to keep 'em. @@ -205,6 +253,7 @@ Hmm...You had some extra variables I don't know about...I'll try to keep 'em. Propagating recommended variable nmopts Propagating recommended variable malloc_cflags... Propagating recommended variable reg_infty + Propagating recommended variable system_alloc_alignment Read the File::Find documentation for more information about dont_use_nlink Your perl will be built with a stack size of ${stack_size}k and a regular diff --git a/gnu/usr.bin/perl/hints/mpeix.sh b/gnu/usr.bin/perl/hints/mpeix.sh index 9ebb0bad1e1..556d22148c6 100644 --- a/gnu/usr.bin/perl/hints/mpeix.sh +++ b/gnu/usr.bin/perl/hints/mpeix.sh @@ -12,7 +12,7 @@ # Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu. # osname='mpeix' -osvers='5.5' +osvers='5.5' # Isn't there a way to determine this dynamically? # # Force Configure to use our wrapper mpeix/nm script # @@ -24,7 +24,8 @@ usenm='true' # # Various directory locations. # -prefix='/PERL/PUB' +# Which ones of these does Configure get wrong? +test -z "$prefix" && prefix='/PERL/PUB' archname='PA-RISC1.1' bin="$prefix" installman1dir="$prefix/man/man1" @@ -38,24 +39,30 @@ startsh='#!/bin/sh' # # Compiling. # -cc='gcc' +test -z "$cc" && cc='gcc' cccdlflags='none' -ccflags='-DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL -DIS_SOCKET_CLIB_ITSELF' -locincpth='/usr/local/include /usr/contrib/include /BIND/PUB/include' -optimize='-O2' +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" +test -z "$optimize" && optimize="-O2" ranlib='/bin/true' # Special compiling options for certain source files. +# But what if you want -g? regcomp_cflags='optimize=-O' toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' # # Linking. # lddlflags='-b' -libs='-lbind -lsyslog -lcurses -lsvipc -lsocket -lm -lc' -loclibpth='/usr/local/lib /usr/contrib/lib /BIND/PUB/lib /SYSLOG/PUB' +# What if you want additional libs (e.g. gdbm)? +# This should remove the unwanted libraries from $libswanted and +# add on whatever ones are needed instead. +libs="$libs -lbind -lsyslog -lcurses -lsvipc -lsocket -lm -lc" +loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BIND/PUB/lib /SYSLOG/PUB" # # External functions and data items. # +# Does Configure *really* get *all* of these wrong? +# d_crypt='define' d_difftime='define' d_dlerror='undef' diff --git a/gnu/usr.bin/perl/hints/netbsd.sh b/gnu/usr.bin/perl/hints/netbsd.sh index 6d99a13edfe..7bd0a25c1de 100644 --- a/gnu/usr.bin/perl/hints/netbsd.sh +++ b/gnu/usr.bin/perl/hints/netbsd.sh @@ -34,7 +34,7 @@ case "$osvers" in # 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="-Bforcearchive -Bshareable $lddlflags" + lddlflags="-Bshareable $lddlflags" else d_dlopen=$undef fi @@ -63,10 +63,6 @@ case "$usevfork" in '') usevfork=true ;; esac -# Avoid telldir prototype conflict in pp_sys.c (NetBSD uses const DIR *) -# Configure should test for this. Volunteers? -pp_sys_cflags='ccflags="$ccflags -DHAS_TELLDIR_PROTOTYPE"' - # Pre-empt the /usr/bin/perl question of installperl. installusrbinperl='n' diff --git a/gnu/usr.bin/perl/hints/newsos4.sh b/gnu/usr.bin/perl/hints/newsos4.sh index a33cb3154a3..3e447a55692 100644 --- a/gnu/usr.bin/perl/hints/newsos4.sh +++ b/gnu/usr.bin/perl/hints/newsos4.sh @@ -6,11 +6,10 @@ echo echo 'Compiling Tips:' echo 'When you have found that ld complains "multiple defined" error' echo 'on linking /lib/libdbm.a, do following instructions.' -echo ' cd /tmp (working on /tmp)' echo ' cp /lib/libdbm.a dbm.o (copy current libdbm.a)' echo ' ar cr libdbm.a dbm.o (make archive)' echo ' mv /lib/libdbm.a /lib/libdbm.a.backup (backup original library)' -echo ' cp /tmp/libdbm.a /lib (copy newer one)' +echo ' cp libdbm.a /lib (copy newer one)' echo ' ranlib /lib/libdbm.a (ranlib for later use)' echo diff --git a/gnu/usr.bin/perl/hints/next_3.sh b/gnu/usr.bin/perl/hints/next_3.sh index 99adf50ffe9..27c9bd9877a 100644 --- a/gnu/usr.bin/perl/hints/next_3.sh +++ b/gnu/usr.bin/perl/hints/next_3.sh @@ -32,8 +32,8 @@ # than no perl at all. # # So, this hintsfile is using perl's malloc. If you want to turn -# perl's malloc off, you need to remove '-DUSE_PERL_SBRK' and -# '-DHIDEMYMALLOC' from the ccflags and set usemymalloc to 'n'. +# perl's malloc off, you need to remove '-DUSE_PERL_SBRK' +# from the ccflags and set usemymalloc to 'n'. # # 1997: # From perl5.003_22 the malloc bug has no impact any more. We can run @@ -42,12 +42,12 @@ # # use the following two lines to enable USE_PERL_SBRK. Try this if you # encounter intermittent core dumps: -#ccflags='-DUSE_NEXT_CTYPE -DUSE_PERL_SBRK -DHIDEMYMALLOC' +#ccflags='-DUSE_NEXT_CTYPE -DUSE_PERL_SBRK' #usemymalloc='y' # use the following two lines if you have perl5.003_22 or better and # do not encounter intermittent core dumps. -ccflags='-DUSE_NEXT_CTYPE' +ccflags="$ccflags -DUSE_NEXT_CTYPE" usemymalloc='n' ###################################################################### diff --git a/gnu/usr.bin/perl/hints/next_3_0.sh b/gnu/usr.bin/perl/hints/next_3_0.sh index b8cc2c2d905..b4445788302 100644 --- a/gnu/usr.bin/perl/hints/next_3_0.sh +++ b/gnu/usr.bin/perl/hints/next_3_0.sh @@ -16,11 +16,11 @@ echo find it. By default, it is placed in /usr/local/include/gdbm.h. >&4 echo It will not be found there. Try moving it to >&4 echo /NextDeveloper/Headers/bsd/gdbm.h. >&4 -ccflags='-DUSE_NEXT_CTYPE -DNEXT30_NO_ATTRIBUTE' +ccflags="$ccflags -DUSE_NEXT_CTYPE -DNEXT30_NO_ATTRIBUTE" POSIX_cflags='ccflags="-posix $ccflags"' useposix='undef' -ldflags='-u libsys_s' -libswanted='dbm gdbm db' +ldflags="$ldflags -u libsys_s" +libswanted="$libswanted dbm gdbm db" # lddlflags='-r' # Give cccdlflags an empty value since Configure will detect we are diff --git a/gnu/usr.bin/perl/hints/next_4.sh b/gnu/usr.bin/perl/hints/next_4.sh index d1d0398dd9a..d5c8ba7d64e 100644 --- a/gnu/usr.bin/perl/hints/next_4.sh +++ b/gnu/usr.bin/perl/hints/next_4.sh @@ -1,13 +1,3 @@ -###################################################################### -# -# IMPORTANT: before you run 'make', you need to enter one of these two -# lines (depending on your shell): -# DYLD_LIBRARY_PATH=`pwd`; export DYLD_LIBRARY_PATH -# or -# setenv DYLD_LIBRARY_PATH `pwd` -# -###################################################################### - # Posix support has been removed from NextStep # useposix='undef' @@ -16,9 +6,9 @@ libpth='/lib /usr/lib /usr/local/lib' libswanted=' ' libc='/NextLibrary/Frameworks/System.framework/System' -ldflags='-dynamic -prebind' -lddlflags='-dynamic -bundle -undefined suppress' -ccflags='-dynamic -fno-common -DUSE_NEXT_CTYPE -DUSE_PERL_SBRK -DHIDEMYMALLOC' +ldflags="$ldflags -dynamic -prebind" +lddlflags="$lddlflags -dynamic -bundle -undefined suppress" +ccflags="$ccflags -dynamic -fno-common -DUSE_NEXT_CTYPE -DUSE_PERL_SBRK" cccdlflags='none' ld='cc' #optimize='-g -O' @@ -106,3 +96,7 @@ clocktype='int' # running ranlib. The '5' is an empirical number that's "long enough." # (Thanks to Andreas Koenig <k@franz.ww.tu-berlin.de>) ranlib='sleep 5; /bin/ranlib' + +case "$ldlibpthname" in +'') ldlibpthname=DYLD_LIBRARY_PATH ;; +esac diff --git a/gnu/usr.bin/perl/hints/openbsd.sh b/gnu/usr.bin/perl/hints/openbsd.sh index 08721a0926e..5a17b2e4243 100644 --- a/gnu/usr.bin/perl/hints/openbsd.sh +++ b/gnu/usr.bin/perl/hints/openbsd.sh @@ -68,7 +68,11 @@ cat > UU/usethreads.cbu <<'EOCBU' case "$usethreads" in $define|true|[yY]*) # any openbsd version dependencies with pthreads? + ccflags="-pthread $ccflags" + ldflags="-pthread $ldflags" libswanted="$libswanted pthread" + # This is strange. + usevfork="$undef" esac EOCBU diff --git a/gnu/usr.bin/perl/hints/os2.sh b/gnu/usr.bin/perl/hints/os2.sh index 310ae913c49..1d9df3683f8 100644 --- a/gnu/usr.bin/perl/hints/os2.sh +++ b/gnu/usr.bin/perl/hints/os2.sh @@ -95,6 +95,8 @@ libpth="$libpth $libemx/mt $libemx" set `emxrev -f emxlibcm` emxcrtrev=$5 +# indented to not put it into config.sh + _defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev so='dll' @@ -124,8 +126,8 @@ fi aout_ldflags="$aout_ldflags" aout_d_fork='define' -aout_ccflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I.' -aout_cppflags='-DPERL_CORE -DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I.' +aout_ccflags="-DDOSISH -DPERL_IS_AOUT -DOS2=2 -DEMBED -I. $_defemxcrtrev" +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" @@ -165,9 +167,9 @@ else # Recursive regmatch may eat 2.5M of stack alone. ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000' if [ $emxcrtrev -ge 50 ]; then - ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I.' + ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev" else - ccflags='-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK' + ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK $_defemxcrtrev" fi use_clib='c_import' usedl='define' @@ -257,9 +259,56 @@ d_setprior='define' # Commented: #startsh='extproc ksh\\n#! sh' +# Find patch: +gnupatch='patch' +if (gnupatch -v || gnupatch --version) 2>&1 >/dev/null; then + gnupatch=gnupatch +else + if (gpatch -v || gpatch --version) 2>&1 >/dev/null; then + gnupatch=gpatch + else + # They may have a special PATH during configuring + if (patch -v || patch --version) 2>&1 >/dev/null; then + gnupatch="`./UU/loc patch.exe undef $pth`" + fi + fi +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 + # Not patched! + if test -f ./Configure.cmd ; then + echo "!!!" >&2 + echo "!!! ./Configure not patched, but ./Configure.cmd exits" >&2 + echo "!!! Do not know what to do!" >&2 + echo "!!!" >&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 + ($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 + echo "extproc sh" > Configure.ctm + cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd + exit 0 + else + echo "!!! Apparently we are running a patched Configure." >&2 + fi + ;; + *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2 +esac + # Copy pod: -cp ./README.os2 ./pod/perlos2.pod +cp -uf ./README.os2 ./pod/perlos2.pod # This script UU/usethreads.cbu will get 'called-back' by Configure # after it has prompted the user for whether to use threads. @@ -304,6 +353,9 @@ for xxx in * ; do fi done +case "$ldlibpthname" in +'') ldlibpthname=none ;; +esac # Now go back cd ../.. diff --git a/gnu/usr.bin/perl/hints/os390.sh b/gnu/usr.bin/perl/hints/os390.sh index 08b60c878e4..d6f68212422 100644 --- a/gnu/usr.bin/perl/hints/os390.sh +++ b/gnu/usr.bin/perl/hints/os390.sh @@ -59,3 +59,51 @@ archobjs=ebcdic.o # We have our own cppstdin. echo 'cat >.$$.c; '"$cc"' -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin + +# +# Note that Makefile.SH employs a bare yacc to generate +# perly.[hc] and a2p.[hc], hence you may wish to: +# +# alias yacc='myyacc' +# +# Then if you would like to use myyacc and skip past the +# following warnings try invoking Configure like so: +# +# sh Configure -Dbyacc=yacc +# +# This trick ought to work even if your yacc is byacc. +# +if test "X$byacc" = "Xbyacc" ; then + if test -e /etc/yyparse.c ; then + : we should be OK - perhaps do a test -r? + else + cat <<EOWARN >&4 + +Warning. You do not have a copy of yyparse.c, the default +yacc parser template file, in place in /etc. +EOWARN + if test -e /samples/yyparse.c ; then + cat <<EOWARN >&4 + +There does appear to be a template file in /samples though. +Please run: + + cp /samples/yyparse.c /etc + +before attempting to Configure the build of $package. + +EOWARN + else + cat <<EOWARN >&4 + +There does not appear to be one in /samples either. +If you feel you can make use of an alternate yacc-like +parser generator then please read the comments in the +hints/os390.sh file carefully. + +EOWARN + fi + exit 1 + fi +fi + diff --git a/gnu/usr.bin/perl/hints/powerux.sh b/gnu/usr.bin/perl/hints/powerux.sh index 6d6bac02ed7..4070c01767e 100644 --- a/gnu/usr.bin/perl/hints/powerux.sh +++ b/gnu/usr.bin/perl/hints/powerux.sh @@ -52,7 +52,7 @@ d_csh='undef' # cc='/bin/cc' cccdlflags='-Zpic' -ccdlflags='-Zlink=dynamic -Wl,-Bexport' +ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-Bexport' lddlflags='-Zlink=so' # Configure sometime finds what it believes to be ndbm header files on the @@ -63,6 +63,12 @@ lddlflags='-Zlink=so' # i_ndbm='undef' +# I have no clude 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_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... @@ -85,6 +91,15 @@ useshrplib='false' # dont_use_nlink=define +# Configure comes up with the wrong type for these for some reason. The +# pointers shouldn't have const in them. (And it looks like I have to +# provide netdb_hlen_type as well becuase when I predefine the others it +# comes up empty :-). +# +netdb_host_type='char *' +netdb_name_type='char *' +netdb_hlen_type='int' + # Misc other flags that might be able to change, but I know these work right. # d_suidsafe='define' diff --git a/gnu/usr.bin/perl/hints/qnx.sh b/gnu/usr.bin/perl/hints/qnx.sh index b53a33d7370..06d9010144e 100644 --- a/gnu/usr.bin/perl/hints/qnx.sh +++ b/gnu/usr.bin/perl/hints/qnx.sh @@ -98,13 +98,9 @@ libc='/usr/lib/clib3r.lib' # constructs make a lot of noise, so I turn those warnings off. # A few still remain... # -# HIDEMYMALLOC is necessary if using mymalloc since it is very -# tricky (though not impossible) to totally replace the watcom -# malloc/free set. -# # unix.h is required as a general rule for unixy applications. #---------------------------------------------------------------- -ccflags='-DHIDEMYMALLOC -mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h' +ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h' #---------------------------------------------------------------- # ldflags: diff --git a/gnu/usr.bin/perl/hints/sco.sh b/gnu/usr.bin/perl/hints/sco.sh index eb598452a1d..079ab78035a 100644 --- a/gnu/usr.bin/perl/hints/sco.sh +++ b/gnu/usr.bin/perl/hints/sco.sh @@ -9,6 +9,8 @@ # Mostly rewritten on # Tue Jan 19 23:00:00 CET 1999 # by Francois Desarmenien <desar@club-internet.fr> +# Modified by Boyd Gerber <gerberb@zenez.com> +# Tue Sep 21 1999 ############################################################### # # To use cc, use sh Configure @@ -82,6 +84,7 @@ case `/bin/uname -X | egrep '3\.2v'` in echo "" >&4 echo "" >&4 echo " For UnixWare, use svr4.sh hints instead" >&4 + echo " For UnixWare 7.*, use svr5.sh hints instead" >&4 echo "" >&4 echo "***********************************************************" >&4 exit @@ -102,7 +105,7 @@ if test "$scorls" = "3" then dlext='' case "$cc" in - gcc) optimize='-O2' ;; + *gcc*) optimize='-O2' ;; *) ccflags="$ccflags -W0 -quiet" optimize='-O' ;; esac @@ -114,7 +117,7 @@ else ############################################################### # In Release 5, always compile ELF objects case "$cc" in - gcc) + *gcc*) ccflags="$ccflags -melf" optimize='-O2' ;; @@ -139,7 +142,7 @@ else if test "$usedl" != "n"; then ld='ld' case "$cc" in - gcc) + *gcc*) ccdlflags='-Xlinker -Bexport -L/usr/local/lib' cccdlflags='-fpic' lddlflags='-G -L/usr/local/lib' @@ -178,6 +181,13 @@ shift libswanted="$*" ############################################################### +# Remove libbind because it conflicts with libsocket. +libswanted=`echo " $libswanted " | sed -e 's/ bind / /'` +set X $libswanted +shift +libswanted="$*" + +############################################################### # Try to use libintl.a since it has strcoll and strxfrm libswanted="intl $libswanted" diff --git a/gnu/usr.bin/perl/hints/solaris_2.sh b/gnu/usr.bin/perl/hints/solaris_2.sh index 935f00d877e..8aee6d40dc0 100644 --- a/gnu/usr.bin/perl/hints/solaris_2.sh +++ b/gnu/usr.bin/perl/hints/solaris_2.sh @@ -1,6 +1,6 @@ # hints/solaris_2.sh -# Last modified: Wed May 27 13:04:45 EDT 1998 -# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Last modified: Tue Apr 13 13:12:49 EDT 1999 +# Andy Dougherty <doughera@lafayette.edu> # Based on input from lots of folks, especially # Dean Roehrich <roehrich@ironwood-fddi.cray.com> @@ -9,7 +9,10 @@ # way to do that is to invoke Configure with # # sh Configure -Dcc='gcc -B/usr/ccs/bin/' -# +# +# (Note that the trailing slash is *required*.) +# gcc will occasionally emit warnings about "unused prefix", but +# these ought to be harmless. See below for more details. # See man vfork. usevfork=false @@ -42,15 +45,51 @@ case "$archname" in ;; esac +test -z "`${cc:-cc} -V 2>&1|grep -i workshop`" || ccisworkshop="$define" +test -z "`${cc:-cc} -v 2>&1|grep -i gcc`" || ccisgcc="$define" + +cat >UU/workshoplibpth.cbu<<'EOCBU' +case "$workshoplibpth_done" in +'') case "$use64bitall" in + "$define"|true|[yY]*) + 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 + workshoplibpth_done="$define" + ;; +esac +EOCBU + +case "$ccisworkshop" in +"$define") + cat >try.c <<EOF +#include <sunmath.h> +int main() { return(0); } +EOF + workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|grep " -Y "|sed 's%.* -Y "P,\(.*\)".*%\1%'|tr ':' '\n'|grep '/SUNWspro/'` + . ./UU/workshoplibpth.cbu + ;; +esac + ###################################################### # General sanity testing. See below for excerpts from the Solaris FAQ. - +# # From roehrich@ironwood-fddi.cray.com Wed Sep 27 12:51:46 1995 # Date: Thu, 7 Sep 1995 16:31:40 -0500 # From: Dean Roehrich <roehrich@ironwood-fddi.cray.com> # To: perl5-porters@africa.nicoh.com # Subject: Re: On perl5/solaris/gcc - +# # Here's another draft of the perl5/solaris/gcc sanity-checker. case `type ${cc:-cc}` in @@ -140,6 +179,19 @@ cat > UU/cc.cbu <<'EOSH' # # Watch out in case they have not set $cc. +# Perl compiled with some combinations of GNU as and ld may not +# be able to perform dynamic loading of extensions. If you have a +# problem with dynamic loading, be sure that you are using the Solaris +# /usr/ccs/bin/as and /usr/ccs/bin/ld. You can do that with +# sh Configure -Dcc='gcc -B/usr/ccs/bin/' +# (note the trailing slash is required). +# Combinations that are known to work with the following hints: +# +# gcc-2.7.2, GNU as 2.7, GNU ld 2.7 +# egcs-1.0.3, GNU as 2.9.1 and GNU ld 2.9.1 +# --Andy Dougherty <doughera@lafayette.edu> +# Tue Apr 13 17:19:43 EDT 1999 + # Get gcc to share its secrets. echo 'main() { return 0; }' > try.c # Indent to avoid propagation to config.sh @@ -149,7 +201,6 @@ if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then # # Using gcc. # - #echo Using gcc tmp=`echo "$verbose" | grep '^Reading' | awk '{print $NF}' | sed 's/specs$/include/'` @@ -157,67 +208,76 @@ if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then # Determine if the fixed-includes look like they'll work. # Doesn't work anymore for gcc-2.7.2. - # See if as(1) is GNU as(1). GNU as(1) won't work for this job. + # 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 : else cat <<END >&2 -NOTE: You are using GNU as(1). GNU as(1) will not build Perl. -I'm arranging to use /usr/ccs/bin/as by including -B/usr/ccs/bin/ +NOTE: You are using GNU as(1). GNU as(1) might not build Perl. If you +have trouble, you can use /usr/ccs/bin/as by including -B/usr/ccs/bin/ in your ${cc:-cc} command. (Note that the trailing "/" is required.) END - cc="${cc:-cc} -B/usr/ccs/bin/" + # Apparently not needed, at least for as 2.7 and later. + # cc="${cc:-cc} -B/usr/ccs/bin/" fi - # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job. + # See if ld(1) is GNU ld(1). GNU ld(1) might not work for this job. # Recompute $verbose since we may have just changed $cc. verbose=`${cc:-cc} -v -o try try.c 2>&1 | grep ld 2>&1` + if echo "$verbose" | grep ' /usr/ccs/bin/ld ' >/dev/null 2>&1; then + # Ok, gcc directly calls the Solaris /usr/ccs/bin/ld. + : + elif echo "$verbose" | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then + # Hmm. gcc doesn't call /usr/ccs/bin/ld directly, but it + # does appear to be using it eventually. egcs-1.0.3's ld + # wrapper does this. + # All Solaris versions of ld I've seen contain the magic + # string used in the grep. : else - # It's not /usr/ccs/bin/ld - but it might be egcs's ld wrapper, - # which calls /usr/ccs/bin/ld in turn. Passing -V to it will - # make it show its true colors. + # No evidence yet of /usr/ccs/bin/ld. Some versions + # of egcs's ld wrapper call /usr/ccs/bin/ld in turn but + # apparently don't reveal that unless you pass in -V. + # (This may all depend on local configurations too.) 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. - - # all Solaris versions of ld I've seen contain the magic - # string used in the grep below. - if $myld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then - cat <<END >&2 - -Aha. You're using egcs and /usr/ccs/bin/ld. - -END - - else - cat <<END >&2 + # 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 + + if $myld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then + # Ok, /usr/ccs/bin/ld eventually does get called. + : + else + cat <<END >&2 -NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl. -I'm arranging to use /usr/ccs/bin/ld by including -B/usr/ccs/bin/ +NOTE: You are using GNU ld(1). GNU ld(1) might not build Perl. If you +have trouble, you can use /usr/ccs/bin/ld by including -B/usr/ccs/bin/ in your ${cc:-cc} command. (Note that the trailing "/" is required.) +I will try to use GNU ld by passing in the -Wl,-E flag, but if that +doesn't work, you should use -B/usr/ccs/bin/ instead. + END - cc="${cc:-cc} -B/usr/ccs/bin/" - fi + ccdlflags="$ccdlflags -Wl,-E" + lddlflags="$lddlflags -W,l-E -G" + fi fi else # # Not using gcc. # - #echo Not using gcc - # See if as(1) is GNU as(1). GNU as(1) won't work for this job. + # See if as(1) is GNU as(1). GNU might not work for this job. case `as --version < /dev/null 2>&1` in *GNU*) cat <<END >&2 -NOTE: You are using GNU as(1). GNU as(1) will not build Perl. +NOTE: You are using GNU as(1). GNU as(1) might not build Perl. You must arrange to use /usr/ccs/bin/as, perhaps by adding /usr/ccs/bin to the beginning of your PATH. @@ -225,7 +285,7 @@ END ;; esac - # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job. + # See if ld(1) is GNU ld(1). GNU ld(1) might not work for this job. # ld --version doesn't properly report itself as a GNU tool, # as of ld version 2.6, so we need to be more strict. TWP 9/5/96 gnu_ld=false @@ -245,8 +305,8 @@ END if $gnu_ld ; then cat <<END >&2 -NOTE: You are apparently using GNU ld(1). GNU ld(1) will not build Perl. -You must arrange to use /usr/ccs/bin/ld, perhaps by adding /usr/ccs/bin +NOTE: You are apparently using GNU ld(1). GNU ld(1) might not build Perl. +You should arrange to use /usr/ccs/bin/ld, perhaps by adding /usr/ccs/bin to the beginning of your PATH. END @@ -261,9 +321,9 @@ rm -f core # XXX EOSH +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]*) ccflags="-D_REENTRANT $ccflags" @@ -309,6 +369,135 @@ EOM esac 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]*) + ccflags="$ccflags `getconf LFS_CFLAGS 2>/dev/null`" + ldflags="$ldflags `getconf LFS_LDFLAGS 2>/dev/null`" + libswanted="$libswanted `getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + ;; +esac +EOCBU + +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 + 2.[1-6]) + cat >&4 <<EOM +Solaris `uname -r` does not support 64-bit integers. +You should upgrade to at least Solaris 2.7. +EOM + exit 1 + ;; + esac + ;; +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-$use64bitall_done" in +"$define-"|true-|[yY]*-) + libc='/usr/lib/sparcv9/libc.so' + if test ! -f $libc; then + cat >&4 <<EOM + +I do not see the 64-bit libc, $libc. +Cannot continue, aborting. + +EOM + exit 1 + fi + . ./UU/workshoplibpth.cbu + case "$cc -v 2>/dev/null" in + *gcc*) + echo 'main() { return 0; }' > try.c + if ${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep -e \ + '-m64 is not supported by this configuration'; then + cat >&4 <<EOM + +Full 64-bit build not supported by this configuration. +Cannot continue, aborting. + +EOM + exit 1 + fi + 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`" + fi + # no changes to ld flags, as (according to man ld): + # + # There is no specific option that tells ld to link 64-bit + # objects; the class of the first object that gets processed + # by ld determines whether it is to perform a 32-bit or a + # 64-bit link edit. + ;; + *) + 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`" + ;; + esac + libscheck='case "`/usr/bin/file $xxx`" in +*64-bit*|*SPARCV9*) ;; +*) xxx=/no/64-bit$xxx ;; +esac' + use64bitall_done=yes + ;; +esac +EOCBU + +# Actually, we want to run this already now, if so requested, +# because we need to fix up things right now. +case "$use64bitall" in +"$define"|true|[yY]*) + . ./UU/use64bitall.cbu + ;; +esac + +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-$uselongdouble_done" in +"$define-"|true-|[yY]*-) + case "$ccisworkshop" in + '') cat >&4 <<EOM + +I do not see the Sun Workshop compiler; therefore I do not see +the libsunmath; therefore I do not know how to do long doubles, sorry. +I'm disabling the use of long doubles. +EOM + uselongdouble="$undef" + ;; + *) libswanted="$libswanted sunmath" + loclibpth="$loclibpth /opt/SUNWspro/lib" + ;; + esac + uselongdouble_done=yes + ;; +esac +EOCBU + +# Actually, we want to run this already now, if so requested, +# because we need to fix up things right now. +case "$uselongdouble" in +"$define"|true|[yY]*) + . ./UU/uselongdouble.cbu + ;; +esac + +rm -f try.c try.o try +# keep that leading tab + ccisworkshop='' + ccisgcc='' + # This is just a trick to include some useful notes. cat > /dev/null <<'End_of_Solaris_Notes' @@ -440,5 +629,51 @@ Date: 25 Jul 1995 12:20:18 GMT Perl 5 compiled out of the box. +7.0) 64-bitness, from Alan Burlison (added by jhi 2000-02-21) + + You need a machine running Solaris 2.7 or above. + + Here's some rules: + + 1. Solaris 2.7 and above will run in either 32 bit or 64 bit mode, + via a reboot. + 2. You can build 64 bit apps whilst running 32 bit mode and vice-versa. + 3. 32 bit apps will run under Solaris running in either 32 or 64 bit mode. + 4. 64 bit apps require Solaris to be running 64 bit mode + 5. It is possible to select the appropriate 32 or 64 bit version of an + app at run-time using isaexec(3). + 6. You can detect the OS mode using "isainfo -v", e.g. + fubar$ isainfo -v # Ultra 30 in 64 bit mode + 64-bit sparcv9 applications + 32-bit sparc applications + 7. To compile 64 bit you need to use the flag "-xarch=v9". + getconf(1) will tell you this, e.g. + fubar$ getconf -a | grep v9 + XBS5_LP64_OFF64_CFLAGS: -xarch=v9 + XBS5_LP64_OFF64_LDFLAGS: -xarch=v9 + XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9 + XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9 + XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9 + XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9 + _XBS5_LP64_OFF64_CFLAGS: -xarch=v9 + _XBS5_LP64_OFF64_LDFLAGS: -xarch=v9 + _XBS5_LP64_OFF64_LINTFLAGS: -xarch=v9 + _XBS5_LPBIG_OFFBIG_CFLAGS: -xarch=v9 + _XBS5_LPBIG_OFFBIG_LDFLAGS: -xarch=v9 + _XBS5_LPBIG_OFFBIG_LINTFLAGS: -xarch=v9 + + > > Now, what should we do, then? Should -Duse64bits in a v9 box cause + > > Perl to compiled in v9 mode? Or should we for compatibility stick + > > with 32 bit builds and let the people in the know to add the -xarch=v9 + > > to ccflags (and ldflags?)? + + > I think the second (explicit) mechanism should be the default. Unless + > you want to allocate more than ~ 4Gb of memory inside Perl, you don't + > need Perl to be a 64-bit app. Put it this way, on a machine running + > Solaris 8, there are 463 executables under /usr/bin, but only 15 of + > those require 64 bit versions - mainly because they invade the kernel + > address space, e.g. adb, kgmon etc. Certainly we don't recommend users + > to build 64 bit apps unless they need the address space. + End_of_Solaris_Notes diff --git a/gnu/usr.bin/perl/hints/sunos_4_1.sh b/gnu/usr.bin/perl/hints/sunos_4_1.sh index 4585d793d76..af0bca1398f 100644 --- a/gnu/usr.bin/perl/hints/sunos_4_1.sh +++ b/gnu/usr.bin/perl/hints/sunos_4_1.sh @@ -25,8 +25,20 @@ d_tzname='undef' # The gcc fix-includes script exposes those incorrect prototypes. # There may be other examples as well. Volunteers are welcome to # track them all down :-). In the meantime, we'll just skip unistd.h -# for SunOS in most of the code. (However, see ext/POSIX/hints/sunos_4.pl.) +# for SunOS in most of the code. +# However, see ext/POSIX/hints/sunos_4.pl for one exception. i_unistd='undef' +# See util.c for another: We need _SC_OPEN_MAX, which is in +# <unistd.h>. + +# fflush(NULL) will core dump on SunOS 4.1.3. In util.c we'll +# try explicitly fflushing all open files. Unfortunately, +# on my SunOS 4.1.3 system, sysconf(_SC_OPEN_MAX) returns +# 64, but only 32 of those file pointers can be accessed +# directly by _iob[i]. The remainder are off in dynamically +# allocated memory somewhere and I don't know to automatically +# fflush() them. -- Andy Dougherty Wed May 26 15:25:22 EDT 1999 +util_cflags='ccflags="$ccflags -DPERL_FFLUSH_ALL_FOPEN_MAX=32"' cat << 'EOM' >&4 diff --git a/gnu/usr.bin/perl/hints/svr4.sh b/gnu/usr.bin/perl/hints/svr4.sh index cf6906dac78..8109b397528 100644 --- a/gnu/usr.bin/perl/hints/svr4.sh +++ b/gnu/usr.bin/perl/hints/svr4.sh @@ -142,12 +142,3 @@ d_lstat=define d_suidsafe='define' # "./Configure -d" can't figure this out easilly -cat <<'EOM' >&4 - -If you wish to use dynamic linking, you must use - LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH -or - setenv LD_LIBRARY_PATH `pwd` -before running make. - -EOM diff --git a/gnu/usr.bin/perl/hints/ultrix_4.sh b/gnu/usr.bin/perl/hints/ultrix_4.sh index 7b841e53fbb..f418ea18ee3 100644 --- a/gnu/usr.bin/perl/hints/ultrix_4.sh +++ b/gnu/usr.bin/perl/hints/ultrix_4.sh @@ -34,16 +34,16 @@ case "$cc" in *gcc*) ;; *) case "$osvers" in - *4.1*) ccflags="$ccflags -DLANGUAGE_C -Olimit 3400" ;; - *4.2*) ccflags="$ccflags -DLANGUAGE_C -Olimit 3400" + *4.1*) ccflags="$ccflags -DLANGUAGE_C -Olimit 3800" ;; + *4.2*) ccflags="$ccflags -DLANGUAGE_C -Olimit 3800" # Prototypes sometimes cause compilation errors in 4.2. prototype=undef case "$myuname" in *risc*) d_volatile=undef ;; esac ;; - *4.3*) ccflags="$ccflags -std1 -DLANGUAGE_C -Olimit 3400" ;; - *) ccflags="$ccflags -std -Olimit 3400" ;; + *4.3*) ccflags="$ccflags -std1 -DLANGUAGE_C -Olimit 3800" ;; + *) ccflags="$ccflags -std -Olimit 3800" ;; esac ;; esac @@ -64,3 +64,7 @@ groupstype='int' # configure test should be beefed up to try using the field when # it can't find any of the standardly-named fields. d_dirnamlen='define' + +# Ultrix can mmap only character devices, not regular files, +# which is rather useless state of things for Perl. +d_mmap='undef' diff --git a/gnu/usr.bin/perl/hints/unicos.sh b/gnu/usr.bin/perl/hints/unicos.sh index ab0203bec61..7ffd73fbcc0 100644 --- a/gnu/usr.bin/perl/hints/unicos.sh +++ b/gnu/usr.bin/perl/hints/unicos.sh @@ -14,3 +14,5 @@ case "$usemymalloc" in usemymalloc='n' ;; esac +# Configure gets fooled for some reason. There is no getpgid(). +d_getpgid='undef' diff --git a/gnu/usr.bin/perl/hints/unicosmk.sh b/gnu/usr.bin/perl/hints/unicosmk.sh index f0b63cb0ebe..f3416ffe34b 100644 --- a/gnu/usr.bin/perl/hints/unicosmk.sh +++ b/gnu/usr.bin/perl/hints/unicosmk.sh @@ -8,3 +8,25 @@ case "$usemymalloc" in ccflags="$ccflags -DNO_RCHECK" ;; esac +# If somebody ignores the Cray PATH. +case ":$PATH:" in +*:/opt/ctl/bin:*) ;; +'') case "$cc" in + '') test -x /opt/ctl/bin/cc && cc=/opt/ctl/bin/cc ;; + esac + ;; +esac +# As of UNICOS/mk 2.0.5.24 the shm* are in libc but unimplemented +# (an attempt to use them causes a runtime error) +# XXX Configure probe for really functional shm*() is needed XXX +if test "$d_shm" = ""; then + d_shmat=${d_shmat:-undef} + d_shmdt=${d_shmdt:-undef} + d_shmget=${d_shmget:-undef} + d_shmctl=${d_shmctl:-undef} + case "$d_shmat$d_shmctl$d_shmdt$d_shmget" in + *"undef"*) d_shm="$undef" ;; + esac +fi + + |