diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 21975e44f4d968e37d47dc6ee4fc7780630d0347 (patch) | |
tree | 96544d447664a4c3cea2f9958db7c7a7c921a1fa /contrib/perl5/hints | |
parent | 06c84cc17466ac9779fd7b1e51593df98446d350 (diff) | |
parent | 2618fad5bbb2d0182eb31ed805c41b543c513940 (diff) | |
download | FreeBSD-src-21975e44f4d968e37d47dc6ee4fc7780630d0347.zip FreeBSD-src-21975e44f4d968e37d47dc6ee4fc7780630d0347.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r62076,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/perl5/hints')
44 files changed, 2341 insertions, 354 deletions
diff --git a/contrib/perl5/hints/README.hints b/contrib/perl5/hints/README.hints index e36bd6d..5f23b29 100644 --- a/contrib/perl5/hints/README.hints +++ b/contrib/perl5/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/contrib/perl5/hints/aix.sh b/contrib/perl5/hints/aix.sh index d2c45c0..d6f3dd7 100644 --- a/contrib/perl5/hints/aix.sh +++ b/contrib/perl5/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/contrib/perl5/hints/amigaos.sh b/contrib/perl5/hints/amigaos.sh index 9d86e52..fff55b0 100644 --- a/contrib/perl5/hints/amigaos.sh +++ b/contrib/perl5/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/contrib/perl5/hints/beos.sh b/contrib/perl5/hints/beos.sh index 8d76bc5..8017dce 100644 --- a/contrib/perl5/hints/beos.sh +++ b/contrib/perl5/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/contrib/perl5/hints/cygwin.sh b/contrib/perl5/hints/cygwin.sh new file mode 100644 index 0000000..42114c2 --- /dev/null +++ b/contrib/perl5/hints/cygwin.sh @@ -0,0 +1,48 @@ +#! /bin/sh +# cygwin.sh - hints for building perl using the Cygwin environment for Win32 +# + +# not otherwise settable +exe_ext='.exe' +firstmakefile='GNUmakefile' +case "$ldlibpthname" in +'') ldlibpthname=PATH ;; +esac +archobjs='cygwin.o' + +# mandatory (overrides incorrect defaults) +test -z "$cc" && cc='gcc' +if test -z "$plibpth" +then + plibpth=`gcc -print-file-name=libc.a` + plibpth=`dirname $plibpth` + plibpth=`cd $plibpth && pwd` +fi +so='dll' +# - eliminate -lc, implied by gcc +libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` +libswanted="$libswanted cygipc cygwin kernel32" +# - otherwise i686-cygwin +archname='cygwin' + +# dynamic loading +# - otherwise -fpic +cccdlflags=' ' +ld='ld2' + +# optional(ish) +# - perl malloc needs to be unpolluted +bincompat5005='undef' + +# stubs (ENOSYS, not implemented) +d_chroot='undef' +d_seteuid='undef' +d_setegid='undef' + +# Win9x problem with non-blocking read from a closed pipe +d_eofnblk='define' + +# strip exe's and dll's +#ldflags="$ldflags -s" +#ccdlflags="$ccdlflags -s" +#lddlflags="$lddlflags -s" diff --git a/contrib/perl5/hints/darwin.sh b/contrib/perl5/hints/darwin.sh new file mode 100644 index 0000000..fd61e42 --- /dev/null +++ b/contrib/perl5/hints/darwin.sh @@ -0,0 +1,63 @@ +## +# Darwin (Mac OS) hints +# Wilfredo Sanchez <wsanchez@apple.com> +## + +## +# Paths +## + +# BSD paths +prefix='/usr'; +siteprefix='/usr/local'; +vendorprefix='/usr/local'; usevendorprefix='define'; + +# 4BSD uses /usr/share/man, not /usr/man. +# Don't put man pages in /usr/lib; that's goofy. +man1dir='/usr/share/man/man1'; +man3dir='/usr/share/man/man3'; + +# Where to put modules. +privlib='/System/Library/Perl'; +sitelib='/Local/Library/Perl'; +vendorlib='/Network/Library/Perl'; + +## +# Tool chain settings +## + +# Since we can build fat, the archname doesn't need the processor type +archname='darwin'; + +# nm works. +usenm='true'; + +# Libc is in libsystem. +libc='/System/Library/Frameworks/System.framework/System'; + +# Optimize. +optimize='-O3'; + +# We have a prototype for telldir. +ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE"; + +# Shared library extension is .dylib. +# Bundle extension is .bundle. +ld='cc'; +so='dylib'; +dlext='bundle'; +dlsrc='dl_dyld.xs'; usedl='define'; +cccdlflags=''; +lddlflags="${ldflags} -bundle -undefined suppress"; +ldlibpthname='DYLD_LIBRARY_PATH'; +useshrplib='true'; + +## +# System libraries +## + +# vfork works +usevfork='true'; + +# malloc works +usemymalloc='n'; diff --git a/contrib/perl5/hints/dec_osf.sh b/contrib/perl5/hints/dec_osf.sh index 8758cbb..db7b869 100644 --- a/contrib/perl5/hints/dec_osf.sh +++ b/contrib/perl5/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/contrib/perl5/hints/dgux.sh b/contrib/perl5/hints/dgux.sh index 03b285d..9a6f7a4 100644 --- a/contrib/perl5/hints/dgux.sh +++ b/contrib/perl5/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/contrib/perl5/hints/dos_djgpp.sh b/contrib/perl5/hints/dos_djgpp.sh index 7c59428..d50bca4 100644 --- a/contrib/perl5/hints/dos_djgpp.sh +++ b/contrib/perl5/hints/dos_djgpp.sh @@ -3,6 +3,7 @@ # 971015 - archname changed from 'djgpp' to 'dos-djgpp' # 971210 - threads support +# 000222 - added -DPERL_EXTERNAL_GLOB to ccflags archname='dos-djgpp' archobjs='djgpp.o' @@ -27,6 +28,9 @@ lns='cp' usenm='true' +# this reportedly causes compile errors in system includes +i_ieeefp='undef' + d_link='undef' # these are empty functions in libc.a d_symlink='undef' d_fork='undef' @@ -39,6 +43,7 @@ case "X$optimize" in optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;; esac +ccflags="$ccflags -DPERL_EXTERNAL_GLOB" ldflags='-s' usemymalloc='n' timetype='time_t' diff --git a/contrib/perl5/hints/dynixptx.sh b/contrib/perl5/hints/dynixptx.sh index 2edf026..11c6b5b 100644 --- a/contrib/perl5/hints/dynixptx.sh +++ b/contrib/perl5/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/contrib/perl5/hints/epix.sh b/contrib/perl5/hints/epix.sh index b91537a..dcad3c5 100644 --- a/contrib/perl5/hints/epix.sh +++ b/contrib/perl5/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/contrib/perl5/hints/esix4.sh b/contrib/perl5/hints/esix4.sh index 3d3145d..b1d697c 100644 --- a/contrib/perl5/hints/esix4.sh +++ b/contrib/perl5/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/contrib/perl5/hints/hpux.sh b/contrib/perl5/hints/hpux.sh index 8a9e3cb..ce15f55 100644 --- a/contrib/perl5/hints/hpux.sh +++ b/contrib/perl5/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/contrib/perl5/hints/irix_4.sh b/contrib/perl5/hints/irix_4.sh index 8013c8a..5c5bdb2 100644 --- a/contrib/perl5/hints/irix_4.sh +++ b/contrib/perl5/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/contrib/perl5/hints/irix_5.sh b/contrib/perl5/hints/irix_5.sh index 757ffff..f895bcc 100644 --- a/contrib/perl5/hints/irix_5.sh +++ b/contrib/perl5/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/contrib/perl5/hints/irix_6.sh b/contrib/perl5/hints/irix_6.sh index 3250fc7..9d9852d 100644 --- a/contrib/perl5/hints/irix_6.sh +++ b/contrib/perl5/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/contrib/perl5/hints/irix_6_0.sh b/contrib/perl5/hints/irix_6_0.sh index e61db04..50498af 100644 --- a/contrib/perl5/hints/irix_6_0.sh +++ b/contrib/perl5/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/contrib/perl5/hints/irix_6_1.sh b/contrib/perl5/hints/irix_6_1.sh index e61db04..50498af 100644 --- a/contrib/perl5/hints/irix_6_1.sh +++ b/contrib/perl5/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/contrib/perl5/hints/linux.sh b/contrib/perl5/hints/linux.sh index 4764e9e..4fb2f89 100644 --- a/contrib/perl5/hints/linux.sh +++ b/contrib/perl5/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/contrib/perl5/hints/lynxos.sh b/contrib/perl5/hints/lynxos.sh index ddffcbe..0023e83 100644 --- a/contrib/perl5/hints/lynxos.sh +++ b/contrib/perl5/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/contrib/perl5/hints/machten.sh b/contrib/perl5/hints/machten.sh index f283873..b4409c1 100644 --- a/contrib/perl5/hints/machten.sh +++ b/contrib/perl5/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/contrib/perl5/hints/mint.sh b/contrib/perl5/hints/mint.sh index 22d854c..ab55e61 100644 --- a/contrib/perl5/hints/mint.sh +++ b/contrib/perl5/hints/mint.sh @@ -18,7 +18,7 @@ cc='gcc' # The weird include path is really to work around some bugs in # broken system header files. -ccflags="-D__MINT__ -Uatarist -DDEBUGGING -I$here/../mint" +ccflags="$ccflags -D__MINT__ -Uatarist -DDEBUGGING -I$here/../mint" # libs @@ -44,6 +44,7 @@ util_cflags='ccflags="$ccflags -DLOCALE_ENVIRON_REQUIRED"' # # Some good answers to the questions in Configure: +# Does Configure really get all these wrong? usenm='true' d_suidsafe='true' clocktype='long' diff --git a/contrib/perl5/hints/mpeix.sh b/contrib/perl5/hints/mpeix.sh index 9ebb0ba..556d221 100644 --- a/contrib/perl5/hints/mpeix.sh +++ b/contrib/perl5/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/contrib/perl5/hints/netbsd.sh b/contrib/perl5/hints/netbsd.sh index 6d99a13..7bd0a25 100644 --- a/contrib/perl5/hints/netbsd.sh +++ b/contrib/perl5/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/contrib/perl5/hints/newsos4.sh b/contrib/perl5/hints/newsos4.sh index a33cb31..3e447a5 100644 --- a/contrib/perl5/hints/newsos4.sh +++ b/contrib/perl5/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/contrib/perl5/hints/next_3.sh b/contrib/perl5/hints/next_3.sh index 99adf50..27c9bd9 100644 --- a/contrib/perl5/hints/next_3.sh +++ b/contrib/perl5/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/contrib/perl5/hints/next_3_0.sh b/contrib/perl5/hints/next_3_0.sh index b8cc2c2..b444578 100644 --- a/contrib/perl5/hints/next_3_0.sh +++ b/contrib/perl5/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/contrib/perl5/hints/next_4.sh b/contrib/perl5/hints/next_4.sh index d1d0398..d5c8ba7 100644 --- a/contrib/perl5/hints/next_4.sh +++ b/contrib/perl5/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/contrib/perl5/hints/openbsd.sh b/contrib/perl5/hints/openbsd.sh index e9d8ea4..a7d8bf2 100644 --- a/contrib/perl5/hints/openbsd.sh +++ b/contrib/perl5/hints/openbsd.sh @@ -4,36 +4,50 @@ # Edited to allow Configure command-line overrides by # Andy Dougherty <doughera@lafcol.lafayette.edu> # +# To build with distribution paths, use: +# ./Configure -des -Dopenbsd_distribution=defined +# # OpenBSD has a better malloc than perl... test "$usemymalloc" || usemymalloc='n' # Currently, vfork(2) is not a real win over fork(2) but this will -# change in a future release. +# change starting with OpenBSD 2.7. usevfork='true' # setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions # in 4.4BSD. Configure will find these but they are just emulated # and do not have the same semantics as in 4.3BSD. -d_setregid='undef' -d_setreuid='undef' -d_setrgid='undef' -d_setruid='undef' +d_setregid=$undef +d_setreuid=$undef +d_setrgid=$undef +d_setruid=$undef # -# Not all platforms support shared libs... +# Not all platforms support dynamic loading... # -case `uname -m` in -alpha|mips|powerpc|vax) - d_dlopen=$undef +case `arch` in +OpenBSD.alpha|OpenBSD.mips|OpenBSD.powerpc|OpenBSD.vax) + usedl=$undef ;; *) + usedl=$define d_dlopen=$define d_dlerror=$define # we use -fPIC here because -fpic is *NOT* enough for some of the # extensions like Tk on some OpenBSD platforms (ie: sparc) cccdlflags="-DPIC -fPIC $cccdlflags" - lddlflags="-Bforcearchive -Bshareable $lddlflags" + lddlflags="-Bshareable $lddlflags" + ;; +esac + +# +# Tweaks for various versions of OpenBSD +# +case "$osvers" in +2.5) + # OpenBSD 2.5 has broken odbm support + i_dbm=$undef ;; esac @@ -42,7 +56,7 @@ esac libswanted=`echo $libswanted | sed 's/ crypt / /'` # Configure can't figure this out non-interactively -d_suidsafe='define' +d_suidsafe=$define # cc is gcc so we can do better than -O # Allow a command-line override, such as -Doptimize=-g @@ -54,8 +68,34 @@ 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 +# When building in the OpenBSD tree we use different paths +# This is only part of the story, the rest comes from config.over +case "$openbsd_distribution" in +''|$undef|false) ;; +*) + # We put things in /usr, not /usr/local + prefix='/usr' + prefixexp='/usr' + sysman='/usr/share/man/man1' + libpth='/usr/lib' + glibpth='/usr/lib' + # Ports installs non-std libs in /usr/local/lib so look there too + locincpth='/usr/local/include' + loclibpth='/usr/local/lib' + # Link perl with shared libperl + if [ "$usedl" = "$define" -a -r shlib_version ]; then + useshrplib=true + libperl=`. ./shlib_version; echo libperl.so.${major}.${minor}` + fi + ;; +esac + # end diff --git a/contrib/perl5/hints/os2.sh b/contrib/perl5/hints/os2.sh index 310ae91..1d9df36 100644 --- a/contrib/perl5/hints/os2.sh +++ b/contrib/perl5/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/contrib/perl5/hints/os390.sh b/contrib/perl5/hints/os390.sh index 08b60c8..d6f6821 100644 --- a/contrib/perl5/hints/os390.sh +++ b/contrib/perl5/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/contrib/perl5/hints/posix-bc.sh b/contrib/perl5/hints/posix-bc.sh new file mode 100644 index 0000000..ec21bc3 --- /dev/null +++ b/contrib/perl5/hints/posix-bc.sh @@ -0,0 +1,42 @@ +#! /usr/bin/bash -norc +# hints/posix-bc.sh +# +# BS2000 (Posix Subsystem) hints by Thomas Dorner <Thomas.Dorner@start.de> +# +# thanks to the authors of the os390.sh +# + +# To get ANSI C, we need to use c89, and ld doesn't exist +cc='c89' +ld='c89' + +# C-Flags: +ccflags='-DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' + +# Flags on a RISC-Host (SUNRISE): +if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then + echo + echo "Congratulations, you are running a machine with Sunrise CPUs." + echo "Let's hope you have the matching RISC compiler as well." + ccflags='-K risc_4000 -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED' + ldflags='-K risc_4000' +fi + +# Turning on optimization breaks perl (CORE-DUMP): +optimize='none' + +# we don''t use dynamic memorys (yet): +so='none' +usedl='no' +dlext='none' + +# On BS2000/Posix, libc.a doesn't really hold anything at all, +# so running nm on it is pretty useless. +usenm='no' + +# other Options: + +usemymalloc='no' + +archobjs=ebcdic.o + diff --git a/contrib/perl5/hints/powerux.sh b/contrib/perl5/hints/powerux.sh index 6d6bac0..4070c01 100644 --- a/contrib/perl5/hints/powerux.sh +++ b/contrib/perl5/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/contrib/perl5/hints/qnx.sh b/contrib/perl5/hints/qnx.sh index b53a33d..06d9010 100644 --- a/contrib/perl5/hints/qnx.sh +++ b/contrib/perl5/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/contrib/perl5/hints/rhapsody.sh b/contrib/perl5/hints/rhapsody.sh new file mode 100644 index 0000000..933081b --- /dev/null +++ b/contrib/perl5/hints/rhapsody.sh @@ -0,0 +1,67 @@ +## +# Rhapsody (Mac OS X Server) hints +# Wilfredo Sanchez <wsanchez@apple.com> +## + +## +# Paths +## + +# BSD paths +prefix='/usr'; +siteprefix='/usr/local'; +vendorprefix='/usr/local'; usevendorprefix='define'; + +# 4BSD uses /usr/share/man, not /usr/man. +# Don't put man pages in /usr/lib; that's goofy. +man1dir='/usr/share/man/man1'; +man3dir='/usr/share/man/man3'; + +# Where to put modules. +privlib='/System/Library/Perl'; +sitelib='/Local/Library/Perl'; +vendorlib='/Network/Library/Perl'; + +## +# Tool chain settings +## + +# Since we can build fat, the archname doesn't need the processor type +archname='rhapsody'; + +# nm works. +usenm='true'; + +# Libc is in libsystem. +libc='/System/Library/Frameworks/System.framework/System'; + +# Optimize. +optimize='-O3'; + +# We have a prototype for telldir. +ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE"; + +# Shared library extension is .dylib. +# Bundle extension is .bundle. +ld='cc'; +so='dylib'; +dlext='bundle'; +dlsrc='dl_dyld.xs'; +usedl='define'; +cccdlflags=''; +lddlflags="${ldflags} -bundle -undefined suppress"; +ldlibpthname='DYLD_LIBRARY_PATH'; +useshrplib='true'; +base_address='0x4be00000'; + +## +# System libraries +## + +# vfork works +usevfork='true'; + +# malloc works +usemymalloc='n'; + + diff --git a/contrib/perl5/hints/sco.sh b/contrib/perl5/hints/sco.sh index eb59845..079ab78 100644 --- a/contrib/perl5/hints/sco.sh +++ b/contrib/perl5/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/contrib/perl5/hints/solaris_2.sh b/contrib/perl5/hints/solaris_2.sh index 935f00d..8aee6d4 100644 --- a/contrib/perl5/hints/solaris_2.sh +++ b/contrib/perl5/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/contrib/perl5/hints/sunos_4_1.sh b/contrib/perl5/hints/sunos_4_1.sh index 4585d79..af0bca1 100644 --- a/contrib/perl5/hints/sunos_4_1.sh +++ b/contrib/perl5/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/contrib/perl5/hints/svr4.sh b/contrib/perl5/hints/svr4.sh index cf6906d..8109b39 100644 --- a/contrib/perl5/hints/svr4.sh +++ b/contrib/perl5/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/contrib/perl5/hints/svr5.sh b/contrib/perl5/hints/svr5.sh new file mode 100644 index 0000000..f736895 --- /dev/null +++ b/contrib/perl5/hints/svr5.sh @@ -0,0 +1,221 @@ +# svr5 hints, System V Release 5.x (UnixWare 7) +# mods after mail fm Andy Dougherty +# Reworked by hops@sco.com Sept/Oct 1999 for UW7.1 platform support +# Boyd Gerber, gerberb@zenez.com 1999/09/21 for threads support. +# Originally taken from svr4 hints.sh 21-Sep-98 hops@sco.com +# which was version of 1996/10/25 by Tye McQueen, tye@metronet.com + +# Use Configure -Dusethreads to enable threads. +# Use Configure -Dcc=gcc to use gcc. +case "$cc" in +*gcc*) + # "$gccversion" not set yet + vers=`gcc -v 2>&1 | sed -n -e 's@.*version \([^ ][^ ]*\) .*@\1@p'` + case $vers in + *2.95*) + ccflags='-fno-strict-aliasing' + # More optimisation provided in gcc-2.95 causes miniperl to segv. + # -fno-strict-aliasing is supposed to correct this but + # if it doesn't and you get segv when the build runs miniperl then + # disable optimisation as below + # optimize=' ' + ;; + esac + ;; +esac + +# Hardwire the processor to 586 for consistancy with autoconf +# archname='i586-svr5' +# -- seems this is generally disliked by perl porters so leave it to float + +# Our default setup excludes anything from /usr/ucblib (and consequently dbm) +# as later modules assume symbols found are available in shared libs +# On svr5 these are static archives which causes problems for +# dynamic modules loaded later (and ucblib is a bad dream anyway) +# +# However there is a dbm library built from the ucb sources outside ucblib +# at http://www.sco.com/skunkware (installing into /usr/local) so if we +# detect this we'll use it. You can change the default +# (to allow ucblib and its dbm or disallowing non ucb dbm) by +# changing 'want_*' config values below to '' to disable or otherwise to enable + +# Leave leading tabs so Configure doesn't propagate variables to config.sh + + want_ucb='' # don't use anything from /usr/ucblib - icky + want_dbm='yes' # use dbm if can find library in /usr/local/lib + want_gdbm='yes' # use gdbm if can find library in /usr/local/lib + want_udk70='' # link with old static libc pieces + # link with udk70 if building on 7.1 abd want resulting binary + # to run on uw7.0* - it will link in referenced static symbols + # of libc that are (now) in the shared libc.so on 7.1 but were + # not there in 7.0. + # There are still scenarios where this is still insufficient so + # overall it is preferable to get ptf7051e + # ftp://ftp.sco.com/SLS/ptf7051e.Z + # installed on any/all 7.0 systems and leave the above unset. + +if [ "$want_ucb" ] ; then + ldflags= '-L/usr/ucblib' + ccflags='-I/usr/ucbinclude' + # /usr/ccs/include and /usr/ccs/lib are used implicitly by cc as reqd +else + libswanted=`echo " $libswanted " | sed -e 's/ ucb / /'` + glibpth=`echo " $glibpth " | sed -e 's/ \/usr\/ucblib / /'` + + # If see libdbm in /usr/local and not overidden assume its the + # non ucblib rebuild from skunkware and use it + if [ ! -f /usr/local/lib/libdbm.so -o ! "$want_dbm" ] ; then + i_dbm='undef' + libswanted=`echo " $libswanted " | sed -e 's/ dbm / /'` + fi +fi + +if [ ! "$want_gdbm" ] ; then + i_gdbm='undef' + libswanted=`echo " $libswanted " | sed -e 's/ gdbm / /'` +fi + + +# Don't use problematic libraries: +# libmalloc.a - Probably using Perl's malloc() anyway. +# libc: on UW7 don't want -lc explicitly as native cc gives warnings/errors +libswanted=`echo " $libswanted " | sed -e 's/ malloc / /' -e 's/ c / /'` + +# remove /shlib and /lib from library search path as both symlink to /usr/lib +# where runtime shared libc is +glibpth=`echo " $glibpth " | sed -e 's/ \/shlib / /' -e 's/ \/lib / /` + +# Don't use BSD emulation pieces (/usr/ucblib) regardless +# these would probably be autonondetected anyway but ... +d_Gconvert='gcvt((x),(n),(b))' # Try gcvt() before gconvert(). +d_bcopy='undef' d_bcmp='undef' d_bzero='undef' d_safebcpy='undef' +d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef' +d_setlinebuf='undef' +d_setregid='undef' d_setreuid='undef' # -- in /usr/lib/libc.so.1 + + +# Broken C-Shell tests (Thanks to Tye McQueen): +# The OS-specific checks may be obsoleted by the this generic test. + sh_cnt=`sh -c 'echo /*' | wc -c` + csh_cnt=`csh -f -c 'glob /*' 2>/dev/null | wc -c` + csh_cnt=`expr 1 + $csh_cnt` +if [ "$sh_cnt" -ne "$csh_cnt" ]; then + echo "You're csh has a broken 'glob', disabling..." >&2 + d_csh='undef' +fi + +# Unixware-specific problems. UW7 give correctname with uname -s +# UnixWare has a broken csh. (This might already be detected above). +# Configure can't detect memcpy or memset on Unixware 2 or 7 +# +# Leave leading tabs on the next two lines so Configure doesn't +# propagate these variables to config.sh + uw_ver=`uname -v` + uw_isuw=`uname -s 2>&1` + +if [ "$uw_isuw" = "UnixWare" ]; then + case $uw_ver in + 7.1*) + d_csh='undef' + d_memcpy='define' + d_memset='define' + stdio_cnt='((fp)->__cnt)' + d_stdio_cnt_lval='define' + stdio_ptr='((fp)->__ptr)' + d_stdio_ptr_lval='define' + + d_bcopy='define' # In /usr/lib/libc.so.1 + d_setregid='define' # " + d_setreuid='define' # " + + if [ -f /usr/ccs/lib/libcudk70.a -a "$want_udk70" ] ; then + libswanted=" $libswanted cudk70" + fi + ;; + 7*) + d_csh='undef' + d_memcpy='define' + d_memset='define' + stdio_cnt='((fp)->__cnt)' + d_stdio_cnt_lval='define' + stdio_ptr='((fp)->__ptr)' + d_stdio_ptr_lval='define' + ;; + esac +fi +# End of Unixware-specific tests. + +############################################################### +# Dynamic loading section: Is default so it should just happen. +# set below to explicitly force. +# usedl='define' +# dlext='so' +# dlsrc='dl_dlopen.xs' +# +# ccdlflags : must tell the linker to export all global symbols +# cccdlflags: must tell the compiler to generate relocatable code +# lddlflags : must tell the linker to output a shared library + +# use shared perl lib +useshrplib='true' + +case "$cc" in + *gcc*) + ccdlflags='-Xlinker -Bexport ' + cccdlflags='-fpic' + lddlflags='-G ' + ;; + + *) + ccdlflags='-Wl,-Bexport' + cccdlflags='-Kpic' + lddlflags='-G -Wl,-Bexport' + ;; +esac + +############################################################################ +# Thread support +# use Configure -Dusethreads to enable +# 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="$ccflags" + shift + libswanted="$*" + case "$cc" in + *gcc*) + ccflags="-D_REENTRANT $ccflags -fpic -pthread" + cccdlflags='-fpic' + lddlflags='-pthread -G ' + ;; + *) + ccflags="-D_REENTRANT $ccflags -KPIC -Kthread" + ccdlflags='-Kthread -Wl,-Bexport' + cccdlflags='-KPIC -Kthread' + lddlflags='-G -Kthread -Wl,-Bexport ' + ldflags='-Kthread' + ;; + esac +esac +EOCBU + + +d_suidsafe='define' # "./Configure -d" can't figure this out easily + +################## final caveat msgs to builder ############### +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. + +If you are using shared libraries from /usr/local/lib +for libdbm or libgdbm you may need to set + LD_RUN_PATH=/usr/local/lib; export LD_RUN_PATH +in order for Configure to compile the simple test program + +EOM diff --git a/contrib/perl5/hints/ultrix_4.sh b/contrib/perl5/hints/ultrix_4.sh index 7b841e5..f418ea1 100644 --- a/contrib/perl5/hints/ultrix_4.sh +++ b/contrib/perl5/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/contrib/perl5/hints/unicos.sh b/contrib/perl5/hints/unicos.sh index ab0203b..7ffd73f 100644 --- a/contrib/perl5/hints/unicos.sh +++ b/contrib/perl5/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/contrib/perl5/hints/unicosmk.sh b/contrib/perl5/hints/unicosmk.sh index f0b63cb..f3416ff 100644 --- a/contrib/perl5/hints/unicosmk.sh +++ b/contrib/perl5/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 + + diff --git a/contrib/perl5/hints/vmesa.sh b/contrib/perl5/hints/vmesa.sh new file mode 100644 index 0000000..bc03387 --- /dev/null +++ b/contrib/perl5/hints/vmesa.sh @@ -0,0 +1,338 @@ +# hints/vmesa.sh +# +# VM/ESA hints by Neale Ferguson (neale@mailbox.tabnsw.com.au) +# +# Currently (1999-Jan-09) Configure cannot be used in VM/ESA because +# too many things are done differently in the C compiler environment. +# Therefore the hints file is hand-crafted. --jhi@iki.fi +# + +case "$archname" in +'') archname="$osname" ;; +esac +bin='/usr/local/bin' +binexp='/usr/local/bin' +byacc='byacc' +c='\c' +cc='c89' +ccflags="-D_OE_SOCKETS -DOLD_PTHREADS_API -DYYDYNAMIC -DDEBUGGING -I.." \ + "-I/usr/local/include -W c,hwopts\\\(string\\\),langlvl\\\(ansi\\\)" +clocktype='clock_t' +cryptlib="n" +d_Gconvert='gcvt((x),(n),(b))' +d_access='define' +d_alarm='define' +d_archlib='define' +# randbits='15' +archobjs="ebcdic.o vmesa.o" +d_attribut='undef' +d_bcmp='define' +d_bcopy='define' +d_bsd='undef' +d_bsdgetpgrp='undef' +d_bsdsetpgrp='undef' +d_bzero='define' +d_casti32='define' +d_castneg='define' +d_charvspr='undef' +d_chown='define' +d_chroot='undef' +d_chsize='undef' +d_closedir='define' +d_const='define' +d_crypt='undef' +d_csh='undef' +d_cuserid='define' +d_dbl_dig='define' +d_difftime='define' +d_dirnamlen='undef' +d_dlerror='define' +d_dlopen='define' +d_dlsymun='define' +d_dosuid='undef' +d_dup2='define' +d_endgrent='undef' +d_endpwent='undef' +d_eofnblk='define' +d_eunice='undef' +d_fchmod='define' +d_fchown='define' +d_fcntl='define' +d_fd_macros='define' +d_fd_set='define' +d_fds_bits='define' +d_fgetpos='define' +d_flexfnam='define' +d_flock='undef' +d_fork='undef' +d_fpathconf='define' +d_fsetpos='define' +d_ftime='undef' +d_getgrent='undef' +d_gethent='define' +d_gethname='undef' +d_getlogin='define' +d_getpgid='undef' +d_getpgrp='define' +d_getpgrp2='undef' +d_getppid='define' +d_getprior='undef' +d_getpwent='undef' +d_gettimeod='define' +d_gnulibc='undef' +d_htonl='define' +d_index='define' +d_inetaton='undef' +d_isascii='define' +d_killpg='define' +d_link='define' +d_locconv='define' +d_lockf='define' +d_longdbl='undef' +d_longllong='undef' +d_lstat='define' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_mkdir='define' +d_mkfifo='define' +d_mktime='define' +d_msg='define' +d_msgctl='define' +d_msgget='define' +d_msgrcv='define' +d_msgsnd='define' +d_mymalloc='undef' +d_nice='undef' +d_oldsock='undef' +d_open3='define' +d_pathconf='define' +d_pause='define' +d_phostname='undef' +d_pipe='define' +d_poll='undef' +d_portable='define' +d_pwage='undef' +d_pwchange='undef' +d_pwclass='undef' +d_pwcomment='undef' +d_pwexpire='undef' +d_pwquota='undef' +d_readdir='define' +d_readlink='define' +d_rename='define' +d_rewinddir='define' +d_rmdir='define' +d_safebcpy='define' +d_safemcpy='undef' +d_sanemcmp='define' +d_sched_yield='undef' +d_seekdir='undef' +d_select='define' +d_sem='define' +d_semctl='define' +d_semctl_semid_ds='define' +d_semget='define' +d_semop='define' +d_setegid='define' +d_seteuid='define' +d_setgrent='undef' +d_setgrps='undef' +d_setlinebuf='undef' +d_setlocale='define' +d_setpgid='define' +d_setpgrp='define' +d_setpgrp2='undef' +d_setprior='undef' +d_setpwent='undef' +d_setregid='undef' +d_setresgid='undef' +d_setresuid='undef' +d_setreuid='undef' +d_setrgid='undef' +d_setruid='undef' +d_setsid='define' +d_sfio='undef' +d_shm='define' +d_shmat='define' +d_shmatprototype='define' +d_shmctl='define' +d_shmdt='define' +d_shmget='define' +d_sigaction='define' +d_sigsetjmp='define' +d_socket='define' +d_sockpair='undef' +d_statblks='undef' +d_stdio_cnt_lval='undef' +d_stdio_ptr_lval='undef' +d_stdiobase='undef' +d_stdstdio='undef' +d_strchr='define' +d_strcoll='define' +d_strctcpy='undef' +d_strerrm='strerror(e)' +d_strerror='define' +d_strtod='define' +d_strtol='define' +d_strtoul='define' +d_strxfrm='define' +d_suidsafe='undef' +d_symlink='define' +d_syscall='undef' +d_sysconf='define' +d_sysernlst="n" +d_syserrlst='undef' +d_system='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' +d_telldir='undef' +d_time='define' +d_times='define' +d_truncate='define' +d_tzname='define' +d_umask='define' +d_uname='define' +d_union_semun='undef' +d_vfork='define' +d_void_closedir='undef' +d_voidsig='define' +d_voidtty="n" +d_volatile='define' +d_vprintf='define' +d_waitpid='define' +d_wait4='undef' +d_wcstombs='define' +d_wctomb='define' +d_xenix='undef' +db_hashtype='u_int32_t' +db_prefixtype='size_t' +direntrytype='struct dirent' +dlext='none' +dlsrc='dl_vmesa.xs' +dynamic_ext='' +eagain='EAGAIN' +ebcdic='define' +exe_ext='' +extensions='Fcntl GDBM_File IO NDBM_File Opcode POSIX Socket IPC/SysV Errno Thread attrs re Data/dumper' +fpostype='fpos_t' +freetype='void' +groupstype='gid_t' +h_fcntl='false' +h_sysfile='true' +hint='recommended' +i_arpainet="define" +i_bsdioctl="n" +i_db='undef' +i_dbm='define' +i_dirent='define' +i_dld='define' +i_dlfcn='define' +i_fcntl='undef' +i_float='define' +i_gdbm='define' +i_grp='define' +i_limits='define' +i_locale='define' +i_malloc='undef' +i_math='define' +i_memory='define' +i_ndbm='define' +i_neterrno='undef' +i_niin='define' +i_pwd='define' +i_rpcsvcdbm='undef' +i_sfio='undef' +i_sgtty='undef' +i_stdarg='define' +i_stddef='define' +i_stdlib='define' +i_string='define' +i_sysdir='define' +i_sysfile='define' +i_sysfilio='undef' +i_sysin='undef' +i_sysioctl='define' +i_sysndir='undef' +i_sysparam='undef' +i_sysresrc='define' +i_sysselct='undef' +i_syssockio="n" +i_sysstat='define' +i_systime='define' +i_systimek='undef' +i_systimes='define' +i_systypes='define' +i_sysun='define' +i_syswait='define' +i_termio='undef' +i_termios='define' +i_time='undef' +i_unistd='define' +i_utime='define' +i_values='undef' +i_varargs='undef' +i_varhdr='stdarg.h' +i_vfork='undef' +ld='c89' +ldflags='-L/usr/local/lib -L.' +lib_ext='.a' +libc='' +libperl='libperl.a' +libpth='/usr/local/lib /lib /usr/lib' +libs='-l//posxsock -l//vmmtlib -lgdbm -lxpg4' +libswanted='gdbm' +lint="n" +locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include' +loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib' +make_set_make='#' +make='gnumake' +mallocobj='' +mallocsrc='' +malloctype='void *' +models='none' +netdb_hlen_type='size_t' +netdb_host_type='char *' +netdb_name_type='const char *' +netdb_net_type='in_addr_t' +o_nonblock='O_NONBLOCK' +obj_ext='.o' +optimize='undef' +prefix='/usr/local' +prefixexp='/usr/local' +prototype='define' +ranlib=':' +rd_nodata='-1' +scriptdir='/usr/local/bin' +scriptdirexp='/usr/local/bin' +selecttype='fd_set *' +shmattype='void *' +shrpenv='' +signal_t='void' +sig_name_init='"ZERO","HUP","INT","ABRT","ILL","POLL","URG","STOP","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","NUM18","CONT","CHLD","TTIN","TTOU","IO","QUIT","TSTP","TRAP","NUM27","WINCH","XCPU","XFSZ","VTALRM","PROF","NUM33","NUM34","NUM35","NUM36","NUM3","NUM38","NUM39","NUM40","NUM41","NUM42","NUM43","NUM44","NUM45","NUM46","NUM47","NUM48","NUM49","CLD"' +sig_num_init='0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,20 ' +sizetype='size_t' +so='.a' +ssizetype='ssize_t' +static_ext='Data/Dumper Fcntl GDBM_File IO IPC/SysV NDBM_File Opcode POSIX Socket Thread attrs re' +stdchar='char' +stdio_cnt='(fp)->__countIn' +stdio_ptr='(fp)->__bufPtr' +timeincl='sys/time.h ' +timetype='time_t' +uidtype='uid_t' +usedl='define' +usemymalloc='n' +usenm='false' +useopcode='true' +useperlio='undef' +useposix='true' +usesfio='false' +useshrplib='false' +usethreads='y' +usevfork='true' +vi='x' |