diff options
Diffstat (limited to 'hints')
87 files changed, 9636 insertions, 0 deletions
diff --git a/hints/3b1.sh b/hints/3b1.sh new file mode 100644 index 0000000000..991348af3e --- /dev/null +++ b/hints/3b1.sh @@ -0,0 +1,15 @@ +d_voidsig='undef' +d_tosignal='int' +gidtype='int' +groupstype='int' +uidtype='int' +# Note that 'Configure' is run from 'UU', hence the strange 'ln' +# command. +for i in .. ../x2p +do + rm -f $i/3b1cc + ln ../hints/3b1cc $i +done +echo "\nIf you want to use the 3b1 shared libraries, complete this script then" >&4 +echo "read the header in 3b1cc. [Type carriage return to continue]\c" >&4 +read vch diff --git a/hints/3b1cc b/hints/3b1cc new file mode 100644 index 0000000000..0001e046b8 --- /dev/null +++ b/hints/3b1cc @@ -0,0 +1,88 @@ +# To incorporate the 7300/3b1 shared library, run this script in place +# of 'CC'. +# You can skip this is you have the shcc program installed as cc in +# your path. +# First: Run 'Configure' through to the end and run 'make depend'. +# Second: Edit 'makefile' ( not Makefile ) and set CC = 3b1cc. +# Third: Edit 'x2p/makefile' and set CC = 3b1cc. +# +# Do not use '3b1cc' as the default compiler. The call to the default +# compiler is used by 'perl' and will not be available when running +# 'perl'. +# +# Note: This script omits libraries which are redundant in the shared +# library. It is an excerpt from a grander version available upon +# request from "zebra!vern" or "vern@zebra.alphacdc.com". + +CC="cc" +LIBS= +INCL= + +LD="ld" +SHAREDLIB="/lib/crt0s.o /lib/shlib.ifile" + +# Local variables +COBJS= +LOBJS= +TARG= +FLAGS= +CMD= + +# These are libraries which are incorporated in the shared library +OMIT="-lmalloc" + +# These routines are in libc.a but not in the shared library +if [ ! -f vsprintf.o -o ! -f doprnt.o ] +then + echo "Extracting vsprintf.o from libc.a" + ar -x /lib/libc.a vsprintf.o doprnt.o +fi + +CMD="$CC" +while [ $# -gt 0 ] +do + case $1 in + -c) CFLAG=$1;; + -o) CFLAG=$1 + shift + TARG="$1";; + -l*) match=false + for i in $OMIT + do + [ "$i" = "$1" ] && match=true + done + [ "$match" != false ] || LIBS="$LIBS $1";; + -*) FLAGS="$FLAGS $1";; + *.c) COBJS="$COBJS $1";; + *.o) LOBJS="$LOBJS $1";; + *) TARG="$1";; + esac + shift +done + +if [ -n "$COBJS" ] +then + CMD="$CMD $FLAGS $INCL $LPATHS $LIBS $COBJS $CFLAG $TARG" +elif [ -n "$LOBJS" ] +then + LOBJS="$LOBJS vsprintf.o doprnt.o" + CMD="$LD -r $LOBJS $LPATHS $LIBS -o temp.o" + echo "\t$CMD" + $CMD + CMD="$LD -s temp.o $SHAREDLIB -o $TARG" + echo "\t$CMD" + $CMD + ccrslt=$? + if [ $ccrslt -ne 0 ] + then + exit $ccrslt + fi + CMD="rm -f temp.o" +else + exit 1 +fi +echo "\t$CMD" +$CMD +ccrslt=$? +rm -f $$.c +exit $ccrslt diff --git a/hints/README.hints b/hints/README.hints new file mode 100644 index 0000000000..1d0f35cccd --- /dev/null +++ b/hints/README.hints @@ -0,0 +1,318 @@ +=head1 NAME + +README.hints + +=head1 DESCRIPTION + +These files are used by Configure to set things which Configure either +can't or doesn't guess properly. Most of these hint files have been +tested with at least some version of perl5, but some are still left +over from perl4. + +Please send any problems or suggested changes to perlbug@perl.org. + +=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 '.' +changed to '_', and all characters (such as '/') that don't belong in +Unix filenames omitted. + +For example, consider Sun OS 4.1.3. Configure determines $osname=sunos +(all names are converted to lower case) and $osvers=4.1.3. Configure +will search for an appropriate hint file in the following order: + + sunos_4_1_3.sh + sunos_4_1.sh + sunos_4.sh + sunos.sh + +If you need to create a hint file, please try to use as general a name +as possible and include minor version differences inside case or test +statements. For example, for IRIX 6.X, we have the following hints +files: + + irix_6_0.sh + irix_6_1.sh + irix_6.sh + +That is, 6.0 and 6.1 have their own special hints, but 6.2, 6.3, and +up are all handled by the same irix_6.sh. That way, we don't have to +make a new hint file every time the IRIX O/S is upgraded. + +If you need to test for specific minor version differences in your +hints file, be sure to include a default choice. (See aix.sh for one +example.) That way, if you write a hint file for foonix 3.2, it might +still work without any changes when foonix 3.3 is released. + +Please also comment carefully on why the different hints are needed. +That way, a future version of Configure may be able to automatically +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 Working around compiler bugs + +Occasionally, the root cause of a bug in perl turns out to be due to a bug +in the compiler. Often, changing the compilation options (particularly the +optimization level) can work around the bug. However, if you try to do +this on the command line, you will be changing the compilation options for +every component of perl, which can really hurt perl's performance. +Instead, consider placing a test case into the hints directory to detect +whether the compiler bug is present, and add logic to the hints file to +take a specific and appropriate action + +=head2 Test-case conventions + +Test cases should be named "tNNN.c", where NNN is the next unused sequence +number. The test case must be executable and should display a message +containing the word "fails" when the compiler bug is present. It should +display the word "works" with the compiler bug is not present. The test +cases should be liberally commented and may be used by any hints file that +needs them. See the first hints file (t001.c) for an example. + +=head2 Hint file processing + +The hint file must define a call-back unit (see below) that will compile, +link, and run the test case, and then check for the presence of the string +"fails" in the output. If it finds this string, it sets a special variable +to specify the compilation option(s) for the specific perl source file that +is affected by the bug. + +The special variable is named "XXX_cflags" where "XXX" is the name of +the source file (without the ".c" suffix). The value of this variable +is the string "optimize=YYY", where "YYY" is the compilation option +necessary to work around the bug. The default value of this variable +is "-O" (letter O), which specifies that the C compiler should compile +the source program at the default optimization level. If you can +avoid the compiler bug by disabling optimization, just reset the +"optimize" variable to the null string. Sometimes a bug is present at +a higher optimization level (say, O3) and not present at a lower +optimization level (say, O1). In this case, you should specify the +highest optimization level at which the bug is not present, so that +you will retain as many of the benefits of code optimization as +possible. + +For example, if the pp_pack.c source file must be compiled at +optimization level 0 to work around a problem on a particular +platform, one of the statements + + pp_pack_cflags="optimize=-O0" or + pp_pack_cflags="optimize=" + +will do the trick, since level 0 is equivalent to no optimization. +(In case your printer or display device does not distinguish the +letter O from the digit 0, that is the letter O followed by the digit +0). You can specify any compiler option or set of options here, not +just optimizer options. These options are appended to the list of all +other compiler options, so you should be able to override almost any +compiler option prepared by Configure. (Obviously this depends on how +the compiler treats conflicting options, but most seem to go with the +last value specified on the command line). + +You should also allow for the XXX_cflags variable to be overridden on the +command line. + +See the vos.sh hints file for an extended example of these techniques. + +=head1 Hint file tricks + +=head2 Printing critical messages + +[This is still experimental] + +If you have a *REALLY* important message that the user ought to see at +the end of the Configure run, you can store it in the file +'config.msg'. At the end of the Configure run, Configure will display +the contents of this file. Currently, the only place this is used is +in Configure itself to warn about the need to set LD_LIBRARY_PATH if +you are building a shared libperl.so. + +To use this feature, just do something like the following + + $cat <<EOM | $tee -a ../config.msg >&4 + + This is a really important message. Be sure to read it + before you type 'make'. + EOM + +This message will appear on the screen as the hint file is being +processed and again at the end of Configure. + +Please use this sparingly. + +=head2 Propagating variables to config.sh + +Sometimes, you want an extra variable to appear in config.sh. For +example, if your system can't compile toke.c with the optimizer on, +you can put + + toke_cflags='optimize=""' + +at the beginning of a line in your hints file. Configure will then +extract that variable and place it in your config.sh file. Later, +while compiling toke.c, the cflags shell script will eval $toke_cflags +and hence compile toke.c without optimization. + +Note that for this to work, the variable you want to propagate must +appear in the first column of the hint file. It is extracted by +Configure with a simple sed script, so beware that surrounding case +statements aren't any help. + +By contrast, if you don't want Configure to propagate your temporary +variable, simply indent it by a leading tab in your hint file. + +For example, prior to 5.002, a bug in scope.c led to perl crashing +when compiled with -O in AIX 4.1.1. The following "obvious" +workaround in hints/aix.sh wouldn't work as expected: + + case "$osvers" in + 4.1.1) + scope_cflags='optimize=""' + ;; + esac + +because Configure doesn't parse the surrounding 'case' statement, it +just blindly propagates any variable that starts in the first column. +For this particular case, that's probably harmless anyway. + +Three possible fixes are: + +=over + +=item 1 + +Create an aix_4_1_1.sh hint file that contains the scope_cflags +line and then sources the regular aix hints file for the rest of +the information. + +=item 2 + +Do the following trick: + + scope_cflags='case "$osvers" in 4.1*) optimize=" ";; esac' + +Now when $scope_cflags is eval'd by the cflags shell script, the +case statement is executed. Of course writing scripts to be eval'd is +tricky, especially if there is complex quoting. Or, + +=item 3 + +Write directly to Configure's temporary file UU/config.sh. +You can do this with + + case "$osvers" in + 4.1.1) + echo "scope_cflags='optimize=\"\"'" >> UU/config.sh + scope_cflags='optimize=""' + ;; + esac + +Note you have to both write the definition to the temporary +UU/config.sh file and set the variable to the appropriate value. + +This is sneaky, but it works. Still, if you need anything this +complex, perhaps you should create the separate hint file for +aix 4.1.1. + +=back + +=head2 Call-backs + +=over 4 + +=item Compiler-related flags + +The settings of some things, such as optimization flags, may depend on +the particular compiler used. For example, consider the following: + + case "$cc" in + *gcc*) ccflags="$ccflags -posix" + ldflags="$ldflags -posix" + ;; + *) ccflags="$ccflags -Xp -D_POSIX_SOURCE" + ldflags="$ldflags -Xp" + ;; + esac + +However, the hints file is processed before the user is asked which +compiler should be used. Thus in order for these hints to be useful, +the user must specify sh Configure -Dcc=gcc on the command line, as +advised by the INSTALL file. + +For versions of perl later than 5.004_61, this problem can +be circumvented by the use of "call-back units". That is, the hints +file can tuck this information away into a file UU/cc.cbu. Then, +after Configure prompts the user for the C compiler, it will load in +and run the UU/cc.cbu "call-back" unit. See hints/solaris_2.sh for an +example. + +=item Future status + +I hope this "call-back" scheme is simple enough to use but powerful +enough to deal with most situations. Still, there are certainly cases +where it's not enough. For example, for aix we actually change +compilers if we are using threads. + +I'd appreciate feedback on whether this is sufficiently general to be +helpful, or whether we ought to simply continue to require folks to +say things like "sh Configure -Dcc=gcc -Dusethreads" on the command line. + +=back + +Have the appropriate amount of fun :-) + + Andy Dougherty doughera@lafayette.edu (author) + Paul Green paul.green@stratus.com (compiler bugs) diff --git a/hints/aix.sh b/hints/aix.sh new file mode 100644 index 0000000000..09ca0a4b57 --- /dev/null +++ b/hints/aix.sh @@ -0,0 +1,518 @@ +# hints/aix.sh +# 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>. +# 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. +d_setrgid='undef' +d_setruid='undef' + +alignbytes=8 + +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. + +# AIX 4.3.* and above default to using nm for symbol extraction +case "$osvers" in + 3.*|4.1.*|4.2.*) + case "$usenm" in + '') usenm='undef' + esac + case "$usenativedlopen" in + '') usenativedlopen='false' + esac + ;; + *) + case "$usenm" in + '') usenm='true' + esac + case "$usenativedlopen" in + '') usenativedlopen='true' + esac + ;; +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' + +# uname -m output is too specific and not appropriate here +case "$archname" in +'') archname="$osname" ;; +esac + +cc=${cc:-cc} + +case "$osvers" in +3*) d_fchmod=undef + ccflags="$ccflags -D_ALL_SOURCE" + ;; +*) # These hints at least work for 4.x, possibly other systems too. + ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE" + case "$cc" in + *gcc*) ;; + *) ccflags="$ccflags -qmaxmem=16384 -qnoansialias" ;; + esac + nm_opt='-B' + ;; +esac + +# These functions don't work like Perl expects them to. +d_setregid='undef' +d_setreuid='undef' + +# Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com> +# +# Tell perl which symbols to export for dynamic linking. +cccdlflags='none' # All AIX code is position independent +cc_type=xlc +case "$cc" in +*gcc*) + cc_type=gcc + ccdlflags='-Xlinker' + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//` + fi + ;; +*) ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -v '\.msg\.[A-Za-z_]*\.' | awk '{print $2}'` + case "$ccversion" in + '') ccversion=`lslpp -L | grep 'IBM C and C++ Compilers LUM$' | awk '{print $2}'` + ;; + *.*.*.*.*.*.*) # Ahhrgg, more than one C compiler installed + first_cc_path=`which ${cc:-cc}` + case "$first_cc_path" in + *vac*) + cc_type=vac ;; + /usr/bin/cc) # Check the symlink + if [ -h $first_cc_path ] ; then + ls -l $first_cc_path > reflect + if grep -i vac reflect >/dev/null 2>&1 ; then + cc_type=vac + fi + rm -f reflect + fi + ;; + esac + ccversion=`lslpp -L | grep 'C for AIX Compiler$' | grep -i $cc_type | awk '{print $2}' | head -1` + ;; + esac + case "$ccversion" in + 3.6.6.0) + optimize='none' + ;; + 4.4.0.0|4.4.0.1|4.4.0.2) + cat >&4 <<EOF +*** +*** This C compiler ($ccversion) is outdated. +*** +*** Please upgrade to at least 4.4.0.3. +*** +EOF + ;; + 5.0.0.0) + cat >&4 <<EOF +*** +*** This C compiler ($ccversion) is known to have too many optimizer +*** bugs to compile a working Perl. +*** +*** Consider upgrading your C compiler, or getting the GNU cc (gcc). +*** +*** Cannot continue, aborting. +EOF + exit 1 + ;; + 5.0.1.0) + cat >&4 <<EOF +*** +*** This C compiler ($ccversion) is known to have optimizer problems +*** when compiling regcomp.c. +*** +*** Disabling optimization for that file but consider upgrading +*** your C compiler. +*** +EOF +regcomp_cflags='optimize=' + ;; + esac +esac +# the required -bE:$installarchlib/CORE/perl.exp is added by +# libperl.U (Configure) later. + +case "$ldlibpthname" in +'') ldlibpthname=LIBPATH ;; +esac + +# The first 3 options would not be needed if dynamic libs. could be linked +# with the compiler instead of ld. +# -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary +# -bE:$(BASEEXT).exp Export these symbols. This file contains only one +# symbol: boot_$(EXP) can it be auto-generated? +case "$osvers" in +3*) + lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -e _nostart -lc" + ;; +*) + lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:\$(PERL_INC)/perl.exp -bE:\$(BASEEXT).exp -bnoentry -lc" + ;; +esac +# AIX 4.2 (using latest patchlevels on 20001130) has a broken bind +# library (getprotobyname and getprotobynumber are outversioned by +# the same calls in libc, at least for xlc version 3... +case "`oslevel`" in + 4.2.1.*) + case "$ccversion" in # Don't know if needed for gcc + 3.1.4.*|5.0.2.*) # libswanted "bind ... c ..." => "... c bind ..." + set `echo X "$libswanted "| sed -e 's/ bind\( .*\) \([cC]\) / \1 \2 bind /'` + shift + libswanted="$*" + ;; + 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' +case "$usethreads" in +$define|true|[yY]*) + ccflags="$ccflags -DNEED_PTHREAD_INIT" + case "$cc" in + *gcc*) +echo "GCC $gccversion disabling some _r functions" >&4 + case "$gccversion" in + 3*) d_drand48_r='undef' + d_endgrent_r='undef' + d_endpwent_r='undef' + d_getgrent_r='undef' + d_getpwent_r='undef' + d_random_r='undef' + d_srand48_r='undef' + d_strerror_r='undef' + ;; + esac + ;; + cc_r) ;; + cc|xl[cC]_r) + echo >&4 "Switching cc to cc_r because of POSIX threads." + # xlc_r has been known to produce buggy code in AIX 4.3.2. + # (e.g. pragma/overload core dumps) Let's suspect xlC_r, too. + # --jhi@iki.fi + cc=cc_r + + case "`oslevel`" in + 4.2.1.*) i_crypt='undef' ;; + esac + ;; + '') + cc=cc_r + ;; + *) + cat >&4 <<EOM +*** For pthreads you should use the AIX C compiler cc_r. +*** (now your compiler was set to '$cc') +*** Cannot continue, aborting. +EOM + exit 1 + ;; + esac + + # 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="$*" + + # Insert pthreads to libswanted, before any libc or libC. + set `echo X "$libswanted "| sed -e 's/ \([cC]_r\) / pthreads \1 /'` + shift + libswanted="$*" + # Insert pthreads to lddlflags, before any libc or libC. + set `echo X "$lddlflags " | sed -e 's/ \(-l[cC]_r\) / -lpthreads \1 /'` + shift + lddlflags="$*" + + ;; +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]*) + # Configure should take care of use64bitint and use64bitall being + # defined before uselargefiles.cbu is consulted. + if test X"$use64bitint:$quadtype" = X"$define:long" -o X"$use64bitall" = Xdefine; then +# Keep these at the left margin. +ccflags_uselargefiles="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" +ldflags_uselargefiles="`getconf XBS5_LP64_OFF64_LDFLAGS 2>/dev/null`" + else +# Keep these at the left margin. +ccflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_CFLAGS 2>/dev/null`" +ldflags_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LDFLAGS 2>/dev/null`" + fi + # _Somehow_ in AIX 4.3.1.0 the above getconf call manages to + # insert(?) *something* to $ldflags so that later (in Configure) evaluating + # $ldflags causes a newline after the '-b64' (the result of the getconf). + # (nothing strange shows up in $ldflags even in hexdump; + # so it may be something (a bug) in the shell, instead?) + # Try it out: just uncomment the below line and rerun Configure: +# echo >&4 "AIX 4.3.1.0 $ldflags_uselargefiles mystery" ; exit 1 + # Just don't ask me how AIX does it, I spent hours wondering. + # Therefore the line re-evaluating ldflags_uselargefiles: it seems to fix + # the whatever it was that AIX managed to break. --jhi + ldflags_uselargefiles="`echo $ldflags_uselargefiles`" + if test X"$use64bitint:$quadtype" = X"$define:long" -o X"$use64bitall" = Xdefine; then +# Keep this at the left margin. +libswanted_uselargefiles="`getconf XBS5_LP64_OFF64_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + else +# Keep this at the left margin. +libswanted_uselargefiles="`getconf XBS5_ILP32_OFFBIG_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + fi + case "$ccflags_uselargefiles$ldflags_uselargefiles$libs_uselargefiles" in + '');; + *) ccflags="$ccflags $ccflags_uselargefiles" + ldflags="$ldflags $ldflags_uselargefiles" + libswanted="$libswanted $libswanted_uselargefiles" + ;; + esac + case "$gccversion" in + '') ;; + *) # Remove xlc-spefific -qflags. + ccflags="`echo $ccflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`" + ldflags="`echo $ldflags | sed -e 's@ -q[^ ]*@ @g' -e 's@^-q[^ ]* @@g'`" + # Move xld-spefific -bflags. + ccflags="`echo $ccflags | sed -e 's@ -b@ -Wl,-b@g'`" + ldflags="`echo ' '$ldflags | sed -e 's@ -b@ -Wl,-b@g'`" + lddlflags="`echo ' '$lddlflags | sed -e 's@ -b@ -Wl,-b@g'`" + ld='gcc' + echo >&4 "(using ccflags $ccflags)" + echo >&4 "(using ldflags $ldflags)" + echo >&4 "(using lddlflags $lddlflags)" + ;; + esac + ;; +esac +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 + qacpuwidth=`./size` + echo "You are running on $qacpuwidth 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 + qacpuwidth="$ans" + fi + $rm -f size.c size + case "$qacpuwidth" 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 + qacflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`" + qaldflags="`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 + qaldflags="`echo $qaldflags`" + qalibs="`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 'qacflags' variable into the 'ldflags' string + # is NOT a typo. ldflags is passed to the C compiler for final + # linking, and it wants -q64 (-b64 is for ld only!). + case "$qacflags$qaldflags$qalibs" in + '');; + *) ccflags="$ccflags $qacflags" + ldflags="$ldflags $qacflags" + lddlflags="$qaldflags $lddlflags" + libswanted="$libswanted $qalibs" + ;; + esac + case "$ccflags" in + *-DUSE_64_BIT_ALL*) ;; + *) ccflags="$ccflags -DUSE_64_BIT_ALL";; + esac + case "$archname64" in + ''|64*) archname64=64all ;; + esac + longsize="8" + qacflags='' + qaldflags='' + qalibs='' + qacpuwidth='' + ;; +esac +EOCBU + +if test $usenativedlopen = 'true' +then + ccflags="$ccflags -DUSE_NATIVE_DLOPEN" + case "$cc" in + *gcc*) ldflags="$ldflags -Wl,-brtl" ;; + *) ldflags="$ldflags -brtl" ;; + esac +else + case `oslevel` in + 4.2.*) ;; # libC_r has broke gettimeofday + *) # If the C++ libraries, libC and libC_r, are available we will + # prefer them over the vanilla libc, because the libC contain + # loadAndInit() and terminateAndUnload() which work correctly + # with C++ statics while libc load() and unload() do not. See + # ext/DynaLoader/dl_aix.xs. The C-to-C_r switch is done by + # usethreads.cbu, if needed. + if test -f /lib/libC.a -a X"`$cc -v 2>&1 | grep gcc`" = X; then + # Cify libswanted. + set `echo X "$libswanted "| sed -e 's/ c / C c /'` + shift + libswanted="$*" + # Cify lddlflags. + set `echo X "$lddlflags "| sed -e 's/ -lc / -lC -lc /'` + shift + lddlflags="$*" + fi + esac +fi + +# EOF diff --git a/hints/altos486.sh b/hints/altos486.sh new file mode 100644 index 0000000000..b85f907e34 --- /dev/null +++ b/hints/altos486.sh @@ -0,0 +1,3 @@ +: have heard of problems with -lc_s on Altos 486 +set `echo " $libswanted " | sed "s/ c_s / /"` +libswanted="$*" diff --git a/hints/amigaos.sh b/hints/amigaos.sh new file mode 100644 index 0000000000..c5ba6ff591 --- /dev/null +++ b/hints/amigaos.sh @@ -0,0 +1,55 @@ +# hints/amigaos.sh +# +# talk to pueschel@imsdd.meb.uni-bonn.de if you want to change this file. +# +# misc stuff +archname='m68k-amigaos' +cc='gcc' +firstmakefile='GNUmakefile' +usenm='true' +d_fork='undef' # available but ENOSYS + +usemymalloc='n' +useperlio='true' +d_eofnblk='define' +groupstype='int' + +# libs + +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=' ' +libs='-lm' + +# compiler & linker flags +# Respect command-line values. + +ccflags="$ccflags -DAMIGAOS" +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' + +# uncomment the following settings if you are compiling for an 68020+ system +# and want a residentable executable instead of dynamic loading + +# usedl='n' +# ccflags='-DAMIGAOS -mstackextend -m68020 -resident32' +# ldflags='-m68020 -resident32' + +# AmigaOS always reports only two links to directories, even if they +# contain subdirectories. Consequently, we use this variable to stop +# File::Find using the link count to determine whether there are +# subdirectories to be searched. This will generate a harmless message: +# Hmm...You had some extra variables I don't know about...I'll try to keep 'em. +# Propagating recommended variable dont_use_nlink +dont_use_nlink='define' diff --git a/hints/apollo.sh b/hints/apollo.sh new file mode 100644 index 0000000000..05f433dfc1 --- /dev/null +++ b/hints/apollo.sh @@ -0,0 +1,55 @@ +# Info from Johann Klasek <jk@auto.tuwien.ac.at> +# Merged by Andy Dougherty <doughera@lafcol.lafayette.edu> +# Last revised Tue Mar 16 19:12:22 EET 1999 by +# Jarkko Hietaniemi <jhi@iki.fi> + +# uname -a looks like +# DomainOS newton 10.4.1 bsd4.3 425t + +# We want to use both BSD includes and some of the features from the +# /sys5 includes. +ccflags="$ccflags -A cpu,mathchip -I`pwd`/apollo -I/usr/include -I/sys5/usr/include" + +# When Apollo runs a script with "#!", it sets argv[0] to the script name. +toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' + +# These adjustments are necessary (why?) to compile malloc.c. +freetype='void' +i_malloc='undef' +malloctype='void *' + +# This info is left over from perl4. +cat <<'EOF' >&4 +Some tests may fail unless you use 'chacl -B'. Also, op/stat +test 2 may fail occasionally because Apollo doesn't guarantee +that mtime will be equal to ctime on a newly created unmodified +file. Finally, the sleep test will sometimes fail. See the +sleep(3) man page to learn why. + +See hints/apollo.sh for hints on running h2ph. + +And a note on ccflags: + + Lastly, while -A cpu,mathchip generates optimal code for your DN3500 + running sr10.3, be aware that you should be using -A cpu,mathlib_sr10 + if your perl must also run on any machines running sr10.0, sr10.1, or + sr10.2. The -A cpu,mathchip option generates code that doesn't work on + pre-sr10.3 nodes. See the cc(1) man page for more details. + -- Steve Vinoski + +EOF + +# Running h2ph, on the other hand, presents a challenge. + +#The perl header files have to be generated with following commands + +#sed 's|/usr/include|/sys5/usr/include|g' h2ph >h2ph.new && chmod +x h2ph.new +#(set cdir=`pwd`; cd /sys5/usr/include; $cdir/h2ph.new sys/* ) +#(set cdir=`pwd`; cd /usr/include; $cdir/h2ph * sys/* machine/*) + +#The SYS5 headers (only sys) are overlayed by the BSD headers. It seems +#all ok, but once I am going into details, a lot of limitations from +#'h2ph' are coming up. Lines like "#define NODEV (dev_t)(-1)" result in +#syntax errors as converted by h2ph. + +# Generally, h2ph might need a lot of help. diff --git a/hints/atheos.sh b/hints/atheos.sh new file mode 100644 index 0000000000..c3acdbb910 --- /dev/null +++ b/hints/atheos.sh @@ -0,0 +1,35 @@ +# AtheOS hints file ( http://www.atheos.cx/ ) +# Kurt Skauen, kurt@atheos.cx + +prefix="/usr/perl5" + +libpth='/system/libs /usr/lib' +usrinc='/include' + +libs=' ' + +d_htonl='define' +d_htons='define' +d_ntohl='define' +d_ntohs='define' + +d_locconv='undef' + +# POSIX and BSD functions are scattered over several non-standard libraries +# in AtheOS, so I figured it would be safer to let the linker figure out +# which symbols are available. + +usenm='false' + +# Hopefully, the native malloc knows better than perl's. +usemymalloc='n' + +# AtheOS native FS does not support hard-links, but link() is defined +# (for other FS's). + +d_link='undef' +dont_use_nlink='define' + +ld='gcc' +cc='gcc' + diff --git a/hints/aux_3.sh b/hints/aux_3.sh new file mode 100644 index 0000000000..aa3150afbe --- /dev/null +++ b/hints/aux_3.sh @@ -0,0 +1,22 @@ +# hints/aux_3.sh +# +# Improved by Jake Hamby <jehamby@lightside.com> to support both Apple CC +# and GNU CC. Tested on A/UX 3.1.1 with GCC 2.6.3. +# Now notifies of problem with version of dbm shipped with A/UX +# Last modified +# Sun Jan 5 11:16:41 WET 1997 + +case "$cc" in +*gcc*) optimize='-O2' + ccflags="$ccflags -D_POSIX_SOURCE" + echo "Setting hints for GNU CC." + ;; +*) optimize='-O' + ccflags="$ccflags -B/usr/lib/big/ -DPARAM_NEEDS_TYPES -D_POSIX_SOURCE" + POSIX_cflags='ccflags="$ccflags -ZP -Du_long=U32"' + echo "Setting hints for Apple's CC. If you plan to use" + echo "GNU CC, please rerun this Configure script as:" + echo "./Configure -Dcc=gcc" + ;; +esac +test -r ./broken-db.msg && . ./broken-db.msg diff --git a/hints/beos.sh b/hints/beos.sh new file mode 100644 index 0000000000..49d85716ab --- /dev/null +++ b/hints/beos.sh @@ -0,0 +1,62 @@ +# BeOS hints file +# $Id: beos.sh 821 2002-10-22 11:14:00Z richardc $ + +if [ ! -f beos/nm ]; then mwcc -w all -o beos/nm beos/nm.c 2>/dev/null; fi +# If this fails, that's all right - it's only for PPC. + +prefix="/boot/home/config" + +#cpp="mwcc -e" + +libpth='/boot/beos/system/lib /boot/home/config/lib' +usrinc='/boot/develop/headers/posix' +locinc='/boot/develop/headers/ /boot/home/config/include' + +libc='/boot/beos/system/lib/libroot.so' +libs=' ' + +d_bcmp='define' +d_bcopy='define' +d_bzero='define' +d_index='define' +#d_htonl='define' # It exists, but much hackery would be required to support. +# a bunch of extra includes would have to be added, and it's only used at +# one place in the non-socket perl code. + +#these are all in libdll.a, which my version of nm doesn't know how to parse. +#if I can get it to both do that, and scan multiple library files, perhaps +#these can be gotten rid of. + +usemymalloc='n' +# Hopefully, Be's malloc knows better than perl's. + +d_link='undef' +dont_use_nlink='define' +# no posix (aka hard) links for us! + +d_syserrlst='undef' +# the array syserrlst[] is useless for the most part. +# large negative numbers really kind of suck in arrays. + +# Sockets didn't use to be real sockets but BONE changes this. +# How does one test for BONEness? +if [ ! -f /some/bone/file.h ]; then + d_socket='undef' + d_gethbyaddr='undef' + d_gethbyname='undef' + d_getsbyname='undef' +fi + +ld='gcc' + +export PATH="$PATH:$PWD/beos" + +case "$ldlibpthname" in +'') ldlibpthname=LIBRARY_PATH ;; +esac + +# the waitpid() wrapper +archobjs="beos.o" +test -f beos.c || cp beos/beos.c . + + diff --git a/hints/broken-db.msg b/hints/broken-db.msg new file mode 100644 index 0000000000..92ba0776bf --- /dev/null +++ b/hints/broken-db.msg @@ -0,0 +1,14 @@ +# Several OSs come with an old version of the DB library which fails +# on a few of the db-recno.t tests. This file is sourced by the hints +# files for those OSs. + +cat <<EOF >&4 + +Unless you've upgraded your DB library manually you will see failures in +db-recno tests 51, 53 and 55. The behavior these tests are checking is +broken in the DB library which is included with the OS. You can ignore +the errors if you're never going to use the broken functionality (recno +databases with a modified bval), otherwise you'll have to upgrade your +DB library or OS. + +EOF diff --git a/hints/bsdos.sh b/hints/bsdos.sh new file mode 100644 index 0000000000..f16a56efc7 --- /dev/null +++ b/hints/bsdos.sh @@ -0,0 +1,130 @@ +# hints/bsdos.sh +# +# hints file for BSD/OS (adapted from bsd386.sh) +# Original by Neil Bowers <neilb@khoros.unm.edu>; Tue Oct 4 12:01:34 EDT 1994 +# Updated by Tony Sanders <sanders@bsdi.com>; Sat Aug 23 12:47:45 MDT 1997 +# Added 3.1 with ELF dynamic libraries (NOT in 3.1 yet. +# Estimated for 4.0) SYSV IPC tested Ok so I re-enabled. +# +# Updated to work in post-4.0 by Todd C. Miller <millert@openbsd.org> +# +# Updated for threads by "Timur I. Bakeyev" <bsdi@listserv.bat.ru> +# +# To override the compiler on the command line: +# ./Configure -Dcc=gcc2 +# +# The BSD/OS distribution is built with: +# ./Configure -des -Dbsdos_distribution=defined + +signal_t='void' +d_voidsig='define' + +usemymalloc='n' + +# setre?[ug]id() have been replaced by the _POSIX_SAVED_IDS versions. +# See <A HREF="http://www.bsdi.com/bsdi-man?setuid">http://www.bsdi.com/bsdi-man?setuid</A>(2) +d_setregid='undef' +d_setreuid='undef' +d_setrgid='undef' +d_setruid='undef' + +# we don't want to use -lnm, since exp() is busted (in 1.1 anyway) +set `echo X "$libswanted "| sed -e 's/ nm / /'` +shift +libswanted="$*" + +# X libraries are in their own tree +glibpth="$glibpth /usr/X11/lib" +ldflags="$ldflags -L/usr/X11/lib" + +case "$optimize" in +'') optimize='-O2' ;; +esac + +case "$bsdos_distribution" in +''|undef|false) ;; +*) + d_dosuid='define' + d_portable='undef' + prefix='/usr/contrib' + perlpath='/usr/bin/perl5' + startperl='#!/usr/bin/perl5' + scriptdir='/usr/contrib/bin' + privlib='/usr/libdata/perl5' + man1dir='/usr/contrib/man/man1' + man3dir='/usr/contrib/man/man3' + # phlib added by BSDI -- we share the *.ph include dir with perl4 + phlib="/usr/libdata/perl5/site_perl/$(arch)-$osname/include" + phlibexp="/usr/libdata/perl5/site_perl/$(arch)-$osname/include" + ;; +esac + +case "$osvers" in +1.0*) + # Avoid problems with HUGE_VAL in POSIX in 1.0's cc. + POSIX_cflags='ccflags="$ccflags -UHUGE_VAL"' + ;; +1.1*) + # Use gcc2 + case "$cc" in + '') cc='gcc2' ;; + esac + ;; +2.0*|2.1*|3.0*|3.1*) + so='o' + + # default to GCC 2.X w/shared libraries + case "$cc" in + '') cc='shlicc2' + cccdlflags=' ' ;; # Avoid the dreaded -fpic + esac + + # default ld to shared library linker + case "$ld" in + '') ld='shlicc2' + lddlflags='-r' ;; # this one is necessary + esac + + # Must preload the static shared libraries. + libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted" + libswanted="rpc curses termcap $libswanted" + ;; +4.*) + # ELF dynamic link libraries starting in 4.0 + useshrplib='true' + so='so' + dlext='so' + + case "$cc" in + '') cc='cc' # cc is gcc2 in 4.0 + cccdlflags="-fPIC" + ;; + esac + + case "$ld" in + '') ld='ld' + lddlflags="-shared -x $lddlflags" ;; + esac + # Due usage of static pointer from crt.o + libswanted="util $libswanted" ;; +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' +case "$usethreads" in +$define|true|[yY]*) + case "$osvers" in + 3.*|4.*) ccflags="-D_REENTRANT $ccflags" + ;; + *) cat <<EOM >&4 +I did not know that BSD/OS $osvers supports POSIX threads. + +Feel free to tell perlbug@perl.org otherwise. +EOM + exit 1 + ;; + esac + ;; +esac +EOCBU diff --git a/hints/convexos.sh b/hints/convexos.sh new file mode 100644 index 0000000000..9f6d702b06 --- /dev/null +++ b/hints/convexos.sh @@ -0,0 +1,12 @@ +# convexos.sh +# Thanks to David Starks-Browning <dstarks@rc.tudelft.nl> +# Date: Tue, 17 Jan 1995 10:45:03 -0500 (EST) +# Subject: Re: Hints for ConvexOS 10.2 +# +# uname -a output looks like +# ConvexOS xxxx C38xx 10.2 convex +# Configure may incorrectly assign $3 to $osvers. +# +set X $myuname +shift +osvers=$4 diff --git a/hints/cxux.sh b/hints/cxux.sh new file mode 100644 index 0000000000..e3ac086e23 --- /dev/null +++ b/hints/cxux.sh @@ -0,0 +1,106 @@ +#! /local/gnu/bin/bash +# Hints for the CX/UX 7.1 operating system running on Concurrent (formerly +# Harris) NightHawk machines. written by Tom.Horsley@mail.ccur.com +# +# This config is setup for dynamic linking and the Concurrent C compiler. + +# Check some things and print warnings if this isn't going to work... +# +case ${SDE_TARGET:-ELF} in + [Cc][Oo][Ff][Ff]|[Oo][Cc][Ss]) echo '' + echo '' >&2 + echo WARNING: Do not build perl 5 with the SDE_TARGET set to >&2 + echo generate coff object - perl 5 must be built in the ELF >&2 + echo environment. >&2 + echo '' >&2 + echo '';; + [Ee][Ll][Ff]) : ;; + *) echo '' >&2 + echo 'Unknown SDE_TARGET value: '$SDE_TARGET >&2 + echo '' >&2 ;; +esac + +case `uname -r` in + [789]*) : ;; + *) echo '' + echo '' >&2 + echo WARNING: Perl 5 requires shared library support, it cannot >&2 + echo be built on releases of CX/UX prior to 7.0 with this hints >&2 + echo file. You\'ll have to do a separate port for the statically >&2 + echo linked COFF environment. >&2 + echo '' >&2 + echo '';; +esac + +# Internally at Concurrent, we use a source management tool which winds up +# giving us read-only copies of source trees that are mostly symbolic links. +# That upsets the perl build process when it tries to edit opcode.h and +# embed.h or touch perly.c or perly.h, so turn those files into "real" files +# when Configure runs. (If you already have "real" source files, this won't +# do anything). +# +if [ -x /usr/local/mkreal ] +then + for i in '.' '..' + do + for j in embed.h opcode.h perly.h perly.c + do + if [ -h $i/$j ] + then + ( cd $i ; /usr/local/mkreal $j ; chmod 666 $j ) + fi + done + done +fi + +# We DO NOT want -lmalloc +# +libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /'` + +# Stick the low-level elf library path in first. +# +glibpth="/usr/sde/elf/usr/lib $glibpth" + +# Need to use Concurrent cc for most of these options to be meaningful (if +# you want to get this to work with gcc, you're on your own :-). Passing +# -Bexport to the linker when linking perl is important because it leaves +# the interpreter internal symbols visible to the shared libs that will be +# loaded on demand (and will try to reference those symbols). The -u option +# to drag 'sigaction' into the perl main program is to make sure it gets +# defined for the posix shared library (for some reason sigaction is static, +# rather than being defined in libc.so.1). The 88110compat option makes sure +# the code will run on both 88100 and 88110 machines. The define is added to +# trigger a work around for a compiler bug which shows up in pp.c. +# +cc='/bin/cc -Xa -Qtarget=M88110compat -DCXUX_BROKEN_CONSTANT_CONVERT' +cccdlflags='-Zelf -Zpic' +ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction' +lddlflags='-Zlink=so' + +# Configure imagines that it sees a pw_quota field, but it is really in a +# different structure than the one it thinks it is looking at. +d_pwquota='undef' + +# Configure sometimes finds what it believes to be ndbm header files on the +# system and imagines that we have the NDBM library, but we really don't. +# There is something there that once resembled ndbm, but it is purely +# for internal use in some tool and has been hacked beyond recognition +# (or even function :-) +# +i_ndbm='undef' + +# Don't use the perl malloc +# +d_mymalloc='undef' +usemymalloc='n' + +cat <<'EOM' >&4 + +WARNING: If you are using ksh to run the Configure script, you may find it +failing in mysterious ways (such as failing to find library routines which +are known to exist). Configure seems to push ksh beyond its limits +sometimes. Try using env to strip unnecessary things out of the environment +and run Configure with /sbin/sh. That sometimes seems to produce more +accurate results. + +EOM diff --git a/hints/cygwin.sh b/hints/cygwin.sh new file mode 100644 index 0000000000..e88cab7930 --- /dev/null +++ b/hints/cygwin.sh @@ -0,0 +1,42 @@ +#! /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 and a symlink to libcygwin.a +libswanted=`echo " $libswanted " | sed -e 's/ c / /g'` +# - eliminate -lm, symlink to libcygwin.a +libswanted=`echo " $libswanted " | sed -e 's/ m / /g'` +test -z "$optimize" && optimize='-O2' +ccflags="$ccflags -DPERL_USE_SAFE_PUTENV" +# - otherwise i686-cygwin +archname='cygwin' + +# dynamic loading +# - otherwise -fpic +cccdlflags=' ' +ld='ld2' + +# 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/hints/darwin.sh b/hints/darwin.sh new file mode 100644 index 0000000000..518af30026 --- /dev/null +++ b/hints/darwin.sh @@ -0,0 +1,148 @@ +## +# Darwin (Mac OS) hints +# Wilfredo Sanchez <wsanchez@mit.edu> +## + +## +# Paths +## + +# BSD paths +case "$prefix" in +'') + # Default install; use non-system directories + prefix='/usr/local'; # Built-in perl uses /usr + siteprefix='/usr/local'; + vendorprefix='/usr/local'; usevendorprefix='define'; + + # Where to put modules. + privlib='/Library/Perl'; # Built-in perl uses /System/Library/Perl + sitelib='/Library/Perl'; + vendorlib='/Network/Library/Perl'; + ;; +'/usr') + # We are building/replacing the built-in perl + siteprefix='/usr/local'; + vendorprefix='/usr/local'; usevendorprefix='define'; + + # Where to put modules. + privlib='/System/Library/Perl'; + sitelib='/Library/Perl'; + vendorlib='/Network/Library/Perl'; + ;; +esac + +# 4BSD uses ${prefix}/share/man, not ${prefix}/man. +man1dir="${prefix}/share/man/man1"; +man3dir="${prefix}/share/man/man3"; + +## +# Tool chain settings +## + +# Since we can build fat, the archname doesn't need the processor type +archname='darwin'; + +# nm works. +usenm='true'; + +# Optimize. +if [ "x$optimize" = 'x' ]; then + optimize='-O3' +fi + +# -pipe: makes compilation go faster. +# -fno-common: we don't like commons. Common symbols are not allowed +# in MH_DYLIB binaries, which is what libperl.dylib is. You will fail +# to link without that option, unless you otherwise eliminate all commons +# by, for example, initializing all globals. +# --Fred Sánchez +ccflags="${ccflags} -pipe -fno-common" + +# At least on Darwin 1.3.x: +# +# # define INT32_MIN -2147483648 +# int main () { +# double a = INT32_MIN; +# printf ("INT32_MIN=%g\n", a); +# return 0; +# } +# will output: +# INT32_MIN=2.14748e+09 +# Note that the INT32_MIN has become positive. +# INT32_MIN is set in /usr/include/stdint.h by: +# #define INT32_MIN -2147483648 +# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1) +# seems to work. INT64_MIN seems to be similarly broken. +# -- Nicholas Clark, Ken Williams, and Edward Moy +# +ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" + +# cppflags='-traditional-cpp'; +# avoid Apple's cpp precompiler, better for extensions +cppflags="${cppflags} -no-cpp-precomp" +# and ccflags needs them aswell since we don't use cpp directly +ccflags="${ccflags} -no-cpp-precomp" + +# Known optimizer problems. +case "`cc -v 2>&1`" in +*"3.1 20020105"*) toke_cflags='optimize=""' ;; +esac + +# Shared library extension is .dylib. +# Bundle extension is .bundle. +ld='cc'; +so='dylib'; +dlext='bundle'; +dlsrc='dl_dyld.xs'; usedl='define'; +cccdlflags=' '; # space, not empty, because otherwise we get -fpic +# ldflag: -flat_namespace is only available since OS X 10.1 (Darwin 1.4.1) +# - but not in 10.0.x (Darwin 1.3.x) +# -- Kay Roepke +case "$osvers" in +1.[0-3].*) ;; +*) ldflags="${ldflags} -flat_namespace" ;; +esac +lddlflags="${ldflags} -bundle -undefined suppress"; +ldlibpthname='DYLD_LIBRARY_PATH'; +useshrplib='true'; + +## +# System libraries +## + +# vfork works +usevfork='true'; + +# malloc works +usemymalloc='n'; + +## +# Build process +## + +# Locales aren't feeling well. +LC_ALL=C; export LC_ALL; +LANG=C; export LANG; + +# Case-insensitive filesystems don't get along with Makefile and +# makefile in the same place. Since Darwin uses GNU make, this dodges +# the problem. +firstmakefile=GNUmakefile; + +# +# The libraries are not threadsafe as of OS X 10.1. +# +# Fix when Apple fixes libc. +# +case "$usethreads$useithreads$use5005threads" in +*define*) +cat <<EOM >&4 + +*** Warning, there might be problems with your libraries with +*** regards to threading. The test ext/threads/t/libc.t is likely +*** to fail. + +EOM + ;; +esac diff --git a/hints/dcosx.sh b/hints/dcosx.sh new file mode 100644 index 0000000000..c1b0d0ac42 --- /dev/null +++ b/hints/dcosx.sh @@ -0,0 +1,188 @@ +# hints/dcosx.sh +# Last modified: Thu Jan 16 11:38:12 EST 1996 +# Stephen Zander <stephen.zander@interlock.mckesson.com> +# hints for DC/OSx (Pyramid) & SINIX (Seimens: dc/osx rebadged) +# Based on the hints/solaris_2.sh file + +# See man vfork. +usevfork=false + +d_suidsafe=define + +# Avoid all libraries in /usr/ucblib. +set `echo $glibpth | sed -e 's@/usr/ucblib@@'` +glibpth="$*" + +# Remove bad libraries. +# -lucb contains incompatible routines. +set `echo " $libswanted " | sed -e 's@ ucb @ @'` +libswanted="$*" + +# Here's another draft of the perl5/solaris/gcc sanity-checker. + +case $PATH in +*/usr/ucb*:/usr/bin:*|*/usr/ucb*:/usr/bin) cat <<END >&2 + +NOTE: /usr/ucb/cc does not function properly. +Remove /usr/ucb from your PATH. + +END +;; +esac + + +# Check that /dev/fd is mounted. If it is not mounted, let the +# user know that suid scripts may not work. +/usr/bin/df /dev/fd 2>&1 > /dev/null +case $? in +0) ;; +*) + cat <<END >&4 + +NOTE: Your system does not have /dev/fd mounted. If you want to +be able to use set-uid scripts you must ask your system administrator +to mount /dev/fd. + +END + ;; +esac + + +# See if libucb can be found in /usr/lib. If it is, warn the user +# that this may cause problems while building Perl extensions. +/usr/bin/ls /usr/lib/libucb* >/dev/null 2>&1 +case $? in +0) + cat <<END >&4 + +NOTE: libucb has been found in /usr/lib. libucb should reside in +/usr/ucblib. You may have trouble while building Perl extensions. + +END +;; +esac + + +# See if make(1) is GNU make(1). +# If it is, make sure the setgid bit is not set. +make -v > make.vers 2>&1 +if grep GNU make.vers > /dev/null 2>&1; then + tmp=`/usr/bin/ksh -c "whence make"` + case "`/usr/bin/ls -l $tmp`" in + ??????s*) + cat <<END >&2 + +NOTE: Your PATH points to GNU make, and your GNU make has the set-group-id +bit set. You must either rearrange your PATH to put /usr/ccs/bin before the +GNU utilities or you must ask your system administrator to disable the +set-group-id bit on GNU make. + +END + ;; + esac +fi +rm -f make.vers + +# If the C compiler is gcc: +# - check the fixed-includes +# - check as(1) and ld(1), they should not be GNU +# If the C compiler is not gcc: +# - check as(1) and ld(1), they should not be GNU +# - increase the optimizing level to prevent object size warnings +# +# Watch out in case they have not set $cc. +case "`${cc:-cc} -v 2>&1`" in +*gcc*) + # + # Using gcc. + # + #echo Using gcc + + # Get gcc to share its secrets. + echo 'main() { return 0; }' > try.c + verbose=`${cc:-cc} -v -o try try.c 2>&1` + rm -f try try.c + tmp=`echo "$verbose" | grep '^Reading' | + awk '{print $NF}' | sed 's/specs$/include/'` + + # 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. + case $verbose in + */usr/ccs/bin/as*) ;; + *) + cat <<END >&2 + +NOTE: You are using GNU as(1). GNU as(1) will not build Perl. +You must arrange to use /usr/ccs/bin/as, perhaps by setting +GCC_EXEC_PREFIX or by including -B/usr/ccs/bin in your cc command. + +END + ;; + esac + + # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job. + case $verbose in + */usr/ccs/bin/ld*) ;; + *) + cat <<END >&2 + +NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl. +You must arrange to use /usr/ccs/bin/ld, perhaps by setting +GCC_EXEC_PREFIX or by including -B/usr/ccs/bin in your cc command. + +END + ;; + esac + + ;; #using gcc +*) + optimize='-O -K Olimit:3064' + # + # Not using gcc. + # + #echo Not using gcc + + # See if as(1) is GNU as(1). GNU as(1) won't 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. +You must arrange to use /usr/ccs/bin, perhaps by adding it to the +beginning of your PATH. + +END + ;; + esac + + # See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job. + case `ld --version < /dev/null 2>&1` in + *GNU*) + cat <<END >&2 + +NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl. +You must arrange to use /usr/ccs/bin, perhaps by adding it to the +beginning of your PATH + +END + ;; + esac + + ;; #not using gcc +esac + +# as --version or ld --version might dump core. +rm -f core + +# DC/OSx hides certain functions in a libc that looks dynamic but isn't +# because of this we reinclude -lc when building dynamic extenstions +libc='/usr/ccs/lib/libc.so' +lddlflags='-G -lc' + +# DC/OSx gets overenthusiastic with symbol removal when building dynamically +ccdlflags='-Blargedynsym' + +# System malloc is safer when using third part libs +usemymalloc='n' diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh new file mode 100644 index 0000000000..b3872fac12 --- /dev/null +++ b/hints/dec_osf.sh @@ -0,0 +1,523 @@ +# hints/dec_osf.sh + +# * If you want to debug perl or want to send a +# stack trace for inclusion into an bug report, call +# Configure with the additional argument -Doptimize=-g2 +# or uncomment this assignment to "optimize": +# +#optimize=-g2 +# +# If you want both to optimise and debug with the DEC cc +# you must have -g3, e.g. "-O4 -g3", and (re)run Configure. +# +# * gcc can always have both -g and optimisation on. +# +# * debugging optimised code, no matter what compiler +# one is using, can be surprising and confusing because of +# the optimisation tricks like code motion, code removal, +# loop unrolling, and inlining. The source code and the +# executable code simply do not agree any more while in +# mid-execution, the optimiser only cares about the results. +# +# * Configure will automatically add the often quoted +# -DDEBUGGING for you if the -g is specified. +# +# * There is even more optimisation available in the new +# (GEM) DEC cc: -O5 and -fast. "man cc" will tell more about them. +# The jury is still out whether either or neither help for Perl +# and how much. Based on very quick testing, -fast boosts +# raw data copy by about 5-15% (-fast brings in, among other +# things, inlined, ahem, fast memcpy()), while on the other +# hand searching things (index, m//, s///), seems to get slower. +# Your mileage will vary. +# +# * The -std is needed because the following compiled +# without the -std and linked with -lm +# +# #include <math.h> +# #include <stdio.h> +# int main(){short x=10,y=sqrt(x);printf("%d\n",y);} +# +# will in Digital UNIX 3.* and 4.0b print 0 -- and in Digital +# UNIX 4.0{,a} dump core: Floating point exception in the printf(), +# the y has become a signaling NaN. +# +# * Compilation warnings like: +# +# "Undefined the ANSI standard macro ..." +# +# can be ignored, at least while compiling the POSIX extension +# and especially if using the sfio (the latter is not a standard +# part of Perl, never mind if it says little to you). +# + +# If using the DEC compiler we must find out the DEC compiler style: +# the style changed between Digital UNIX (aka DEC OSF/1) 3 and +# Digital UNIX 4. The old compiler was originally from Ultrix and +# the MIPS company, the new compiler is originally from the VAX world +# and it is called GEM. Many of the options we are going to use depend +# on the compiler style. + +cc=${cc:-cc} + +case "`$cc -v 2>&1 | grep cc`" in +*gcc*) isgcc=gcc ;; +esac + +# do NOT, I repeat, *NOT* take away the leading tabs +# Configure Black Magic (TM) + # reset + _DEC_cc_style= +case "$isgcc" in +gcc) if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi + set $gccversion + if test "$1" -lt 2 -o \( "$1" -eq 2 -a \( "$2" -lt 95 -o \( "$2" -eq 95 -a "$3" -lt 3 \) \) \); then + cat >&4 <<EOF + +*** Your cc seems to be gcc and its version ($gccversion) seems to be +*** less than 2.95.3. This is not a good idea since old versions of gcc +*** are known to produce buggy code when compiling Perl (and no doubt for +*** other programs, too). +*** +*** 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.) + +Cannot continue, aborting. + +EOF + exit 1 + fi + if test "$1" -eq 2 -a "$2" -eq 95 -a "$3" -le 2; then + cat >&4 <<EOF + +*** Note that as of gcc 2.95.2 (19991024) and Perl 5.6.0 (March 2000) +*** if the said Perl is compiled with the said gcc the lib/sdbm test +*** may dump core (meaning that the SDBM_File extension is unusable). +*** As this core dump never happens with the vendor cc, this is most +*** probably a lingering bug in gcc. Therefore unless you have a better +*** gcc installation you are still better off using the vendor cc. + +Since you explicitly chose gcc, I assume that you know what are doing. + +EOF + fi + ;; +*) # compile something small: taint.c is fine for this. + ccversion=`cc -V | awk '/(Compaq|DEC) C/ {print $3}' | grep '^V'` + # the main point is the '-v' flag of 'cc'. + case "`cc -v -I. -c taint.c -o taint$$.o 2>&1`" in + */gemc_cc*) # we have the new DEC GEM CC + _DEC_cc_style=new + ;; + *) # we have the old MIPS CC + _DEC_cc_style=old + ;; + esac + # cleanup + rm -f taint$$.o + ;; +esac + +# be nauseatingly ANSI +case "$isgcc" in +gcc) ccflags="$ccflags -ansi" + ;; +*) ccflags="$ccflags -std" + ;; +esac + +# for gcc the Configure knows about the -fpic: +# position-independent code for dynamic loading + +# we want optimisation + +case "$optimize" in +'') case "$isgcc" in + gcc) optimize='-O3' ;; + *) case "$_DEC_cc_style" in + new) optimize='-O4' ;; + old) optimize='-O2 -Olimit 3200' ;; + esac + ccflags="$ccflags -D_INTRINSICS" + ;; + esac + ;; +esac + +# we want dynamic fp rounding mode, and we want ieee exception semantics +case "$isgcc" in +gcc) ;; +*) case "$_DEC_cc_style" in + new) ccflags="$ccflags -fprm d -ieee" ;; + esac + ;; +esac + +# Make glibpth agree with the compiler suite. Note that /shlib +# is not here. That's on purpose. Even though that's where libc +# really lives from V4.0 on, the linker (and /sbin/loader) won't +# look there by default. The sharable /sbin utilities were all +# built with "-Wl,-rpath,/shlib" to get around that. This makes +# no attempt to figure out the additional location(s) searched by +# gcc, since not all versions of gcc are easily coerced into +# revealing that information. +glibpth="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc" +glibpth="$glibpth /usr/lib /usr/local/lib /var/shlib" + +# dlopen() is in libc +libswanted="`echo $libswanted | sed -e 's/ dl / /'`" + +# libPW contains nothing useful for perl +libswanted="`echo $libswanted | sed -e 's/ PW / /'`" + +# libnet contains nothing useful for perl here, and doesn't work +libswanted="`echo $libswanted | sed -e 's/ net / /'`" + +# libbsd contains nothing used by perl that is not already in libc +libswanted="`echo $libswanted | sed -e 's/ bsd / /'`" + +# libc need not be separately listed +libswanted="`echo $libswanted | sed -e 's/ c / /'`" + +# ndbm is already in libc +libswanted="`echo $libswanted | sed -e 's/ ndbm / /'`" + +# the basic lddlflags used always +lddlflags='-shared -expect_unresolved "*"' + +# Fancy compiler suites use optimising linker as well as compiler. +# <spider@Orb.Nashua.NH.US> +case "`uname -r`" in +*[123].*) # old loader + lddlflags="$lddlflags -O3" + ;; +*) 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. +# If that happens, let me know about it. <jhi@iki.fi> + + +# If debugging or (old systems and doing shared) +# then do not strip the lib, otherwise, strip. +# As noted above the -DDEBUGGING is added automagically by Configure if -g. +case "$optimize" in + *-g*) ;; # left intentionally blank +*) case "`uname -r`" in + *[123].*) + case "$useshrplib" in + false|undef|'') lddlflags="$lddlflags -s" ;; + esac + ;; + *) lddlflags="$lddlflags -s" + ;; + esac + ;; +esac + +# +# Make embedding in things like INN and Apache more memory friendly. +# Keep it overridable on the Configure command line, though, so that +# "-Uuseshrplib" prevents this default. +# + +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. +case "$usethreads" in +$define|true|[yY]*) + # Threads interfaces changed with V4.0. + case "$isgcc" in + gcc) ccflags="-D_REENTRANT $ccflags" ;; + *) case "`uname -r`" in + *[123].*) ccflags="-threads $ccflags" ;; + *) ccflags="-pthread $ccflags" ;; + esac + ;; + esac + case "`uname -r`" in + *[123].*) libswanted="$libswanted pthreads mach exc c_r" ;; + *) libswanted="$libswanted pthread exc" ;; + esac + + case "$usemymalloc" in + '') + usemymalloc='n' + ;; + esac + # These symbols are renamed in <time.h> so + # that the Configure hasproto doesn't see them. + d_asctime_r_proto="$define" + d_ctime_r_proto="$define" + d_gmtime_r_proto="$define" + d_localtime_r_proto="$define" + ;; +esac +EOCBU + +cat > UU/uselongdouble.cbu <<'EOCBU' +# This script UU/uselongdouble.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use long doubles. +case "$uselongdouble" in +$define|true|[yY]*) + case "`/usr/sbin/sizer -v`" in + *[1-4].0*) cat >&4 <<EOF + +*** +*** Sorry, you cannot use long doubles in pre-V5.0 releases of Tru64. +*** + +Cannot continue, aborting. + +EOF + exit 1 + ;; + *) + # Test whether libc's been fixed yet. + cat >try.c <<\TRY +#include <stdio.h> +int main(int argc, char **argv) +{ + unsigned long uvmax = ~0UL; + long double ld = uvmax + 0.0L; + char buf1[30], buf2[30]; + + (void) sprintf(buf1, "%lu", uvmax); + (void) sprintf(buf2, "%.0Lf", ld); + return strcmp(buf1, buf2) != 0; +} +TRY + # Don't bother trying to work with Configure's idea of + # cc and the various flags. This might not work as-is + # with gcc -- but we're testing libc, not the compiler. + if cc -o try -std try.c && ./try + then + : ok + else + cat <<\UGLY >&4 +! +Warning! Your libc has not yet been patched so that its "%Lf" format for +printing long doubles shows all the significant digits. You will get errors +in the t/op/numconvert test because of this. (The data is still good +internally, and the "%e" format of printf() or sprintf() in perl will still +produce valid results.) See README.tru64 for additional details. + +Continuing anyway. +! +UGLY + fi + $rm -f try try.c + esac + ;; +esac +EOCBU + +case "`/usr/sbin/sizer -v`" in +*[1-4].0*) d_modfl=undef ;; # must wait till 5.0 +esac + +# Keep those leading tabs. + needusrshlib='' + old_LD_LIBRARY_PATH=$LD_LIBRARY_PATH +for p in $loclibpth +do + if test -n "`ls $p/libdb.so* 2>/dev/null`"; then + needusrshlib=yes + fi + if test -d $p; then + echo "Appending $p to LD_LIBRARY_PATH." >& 4 + case "$LD_LIBRARY_PATH" in + '') LD_LIBRARY_PATH=$p ;; + *) LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;; + esac + fi +done +case "$LD_LIBRARY_PATH" in +"$old_LD_LIBRARY_PATH") ;; +*) echo "LD_LIBRARY_PATH is now $LD_LIBRARY_PATH." >& 4 ;; +esac +# This is evil but I can't think of a nice workaround: +# the /usr/shlib/libdb.so needs to be seen first, +# or running Configure will fail. +if test -n "$needusrshlib"; then + echo "Prepending /usr/shlib to loclibpth." >& 4 + loclibpth="/usr/shlib $loclibpth" + echo "loclibpth is now $loclibpth." >& 4 +fi + +# +# Unset temporary variables no more needed. +# + +unset _DEC_cc_style + +# +# 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> +# +# * Newer Digital UNIX compilers enforce signaling for NaN without +# -ieee. Added -fprm d at the same time since it's friendlier for +# embedding. +# +# * Fixed the library search path to match cc, ld, and /sbin/loader. +# +# * Default to building -Duseshrplib on newer systems. -Uuseshrplib +# still overrides. +# +# * Fix -pthread additions for useshrplib. ld has no -pthread option. +# +# +# perl5.004_04: +# +# 19-Sep-1997 Spider Boardman <spider@Orb.Nashua.NH.US> +# +# * libnet on Digital UNIX is for JAVA, not for sockets. +# +# +# perl5.003_28: +# +# 22-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi> +# +# * Restructuring Spider's suggestions. +# +# * Older Digital UNIXes cannot handle -Olimit ... for $lddlflags. +# +# * ld -s cannot be used in older Digital UNIXes when doing shared. +# +# +# 21-Feb-1997 Spider Boardman <spider@Orb.Nashua.NH.US> +# +# * -hidden removed. +# +# * -DSTANDARD_C removed. +# +# * -D_INTRINSICS added. (that -fast does not seem to buy much confirmed) +# +# * odbm not in libc, only ndbm. Therefore dbm back to $libswanted. +# +# * -msym for the newer runtime loaders. +# +# * $optimize also in $lddflags. +# +# +# perl5.003_27: +# +# 18-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi> +# +# * unset _DEC_cc_style and more commentary on -std. +# +# +# perl5.003_26: +# +# 15-Feb-1997 Jarkko Hietaniemi <jhi@iki.fi> +# +# * -std and -ansi. +# +# +# perl5.003_24: +# +# 30-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi> +# +# * Fixing the note on -DDEBUGGING. +# +# * Note on -O5 -fast. +# +# +# perl5.003_23: +# +# 26-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi> +# +# * Notes on how to do both optimisation and debugging. +# +# +# 25-Jan-1997 Jarkko Hietaniemi <jhi@iki.fi> +# +# * Remove unneeded libraries from $libswanted: PW, bsd, c, dbm +# +# * Restructure the $lddlflags build. +# +# * $optimize based on which compiler we have. +# +# +# perl5.003_22: +# +# 23-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de> +# +# * Added comments 'how to create a debugging version of perl' +# +# * Fixed logic of this script to prevent stripping of shared +# objects by the loader (see ld man page for -s) is debugging +# is set via the -g switch. +# +# +# 21-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de> +# +# * now 'dl' is always removed from libswanted. Not only if +# optimize is an empty string. +# +# +# 17-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de> +# +# * Removed 'dl' from libswanted: When the FreePort binary +# translator for Sun binaries is installed Configure concludes +# that it should use libdl.x.yz.fpx.so :-( +# Because the dlopen, dlclose,... calls are in the +# C library it not necessary at all to check for the +# dl library. Therefore dl is removed from libswanted. +# +# +# 1-Jan-1997 Achim Bohnet <ach@rosat.mpe-garching.mpg.de> +# +# * Set -Olimit to 3200 because perl_yylex.c got too big +# for the optimizer. +# diff --git a/hints/dgux.sh b/hints/dgux.sh new file mode 100644 index 0000000000..6735edea7c --- /dev/null +++ b/hints/dgux.sh @@ -0,0 +1,239 @@ +# $Id: dgux.sh 821 2002-10-22 11:14:00Z richardc $ + +# This is a hints file for DGUX, which is EMC's Data General's Unix. It +# was originally developed with version 5.4.3.10 of the OS, and then was +# later updated running under version 4.11.2 (running on m88k hardware). +# The gross features should work with versions going back to 2.nil but +# some tweaking will probably be necessary. +# +# DGUX is an SVR4 derivative. It ships with gcc as the standard +# compiler. Since version 3.0 it has shipped with Perl 4.036 +# installed in /usr/bin, which is kind of neat. Be careful when you +# install that you don't overwrite the system version, though (by +# answering yes to the question about installing perl as /usr/bin/perl), +# as it would suck to try to get support if the vendor learned that you +# were physically replacing the system binaries. +# +# -Roderick Schertler <roderick@argon.org> + +# The standard system compiler is gcc, but invoking it as cc changes its +# behavior. I have to pick one name or the other so I can get the +# dynamic loading switches right (they vary depending on this). I'm +# picking gcc because there's no way to get at the optimization options +# and so on when you call it cc. + +########################################## +# Modified by Takis Psarogiannakopoulos +# Universirty of Cambridge +# Centre for Mathematical Sciences +# Department of Pure Mathematics +# Wilberforce road +# Cambridge CB3 0WB , UK +# e-mail <takis@XFree86.Org> +# Use GCC-2.95.2/3 rev (DG/UX) for threads +# This compiler supports the -pthread switch +# to link correctly DG/UX 's -lthread. +# March 2002 +########################################### + +cc=gcc +ccflags="-DDGUX -D_DGUX_SOURCE" +# Debug build. If using GNU as,ld use the flag -gstabs+ +# ccflags="-g -mstandard -DDGUX -D_DGUX_SOURCE -DDEBUGGING" +# Dummy ; always compile with -O2 on GCC 2.95.2/3 rev (DG/UX) +# even if you debugging the program! +optimize="-mno-legend -O2" + +archname="ix86-dgux" +libpth="/usr/lib" + +##################################### +# <takis@XFree86.Org> +# Change this if you want. +# prefix =/usr/local +##################################### + +prefix=/usr/local +perlpath="$prefix/bin/perl58" +startperl="#! $prefix/bin/perl58" +privlib="$prefix/lib/perl58" +man1dir="$prefix/man/man1" +man3dir="$prefix/man/man3" + +sitearch="$prefix/lib/perl58/$archname" +sitelib="$prefix/lib/perl58" + +#Do not overwrite by default /usr/bin/perl of DG/UX +installusrbinperl="$undef" + +# Configure may fail to find lstat() +# function in <sys/stat.h>. +d_lstat='define' + +# Internal (perl) malloc is causing serious problems and +# test failures in DG/UX. Most notable Embed.t +# So for perl-5.7.3 and on do NOT use. +# I have no time to investigate more. +# <takis@XFree86.Org> + +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac + +case "$uselongdouble" in +'') uselongdouble='y' ;; +esac + +#usevfork=true +usevfork=false + +# DG has this thing set up with symlinks which point to different places +# depending on environment variables (see elink(5)) and the compiler and +# related tools use them to access different development environments +# (COFF, ELF, m88k BCS and so on), see sde(5). The upshot, however, is +# that when a normal program tries to access one of these elinks it sees +# no such file (like stat()ting a mis-directed symlink). Setting +# $plibpth to explicitly include the place to which the elinks point +# allows Configure to find libraries which vary based on the development +# environment. +# +# Starting with version 4.10 (the first time the OS supported Intel +# hardware) all libraries are accessed with this mechanism. +# +# The default $TARGET_BINARY_INTERFACE changed with version 4.10. The +# system now comes with a link named /usr/sde/default which points to +# the proper entry, but older versions lacked this and used m88kdgux +# directly. + +: && sde_path=${SDE_PATH:-/usr}/sde # hide from Configure +while : # dummy loop +do + if [ -n "$TARGET_BINARY_INTERFACE" ] + then set X "$TARGET_BINARY_INTERFACE" + else set X default dg m88k_dg ix86_dg m88kdgux m88kdguxelf + fi + shift + default_sde=$1 + for sde + do + [ -d "$sde_path/$sde" ] && break 2 + done + cat <<END >&2 + +NOTE: I can't figure out what SDE is used by default on this machine (I +didn't find a likely directory under $sde_path). This is bad news. If +this is a R4.10 or newer system I'm not going to be able to find any of +your libraries, if this system is R3.10 or older I won't be able to find +the math library. You should re-run Configure with the environment +variable TARGET_BINARY_INTERFACE set to the proper value for this +machine, see sde(5) and the notes in hints/dgux.sh. + +END + sde=$default_sde + break +done + +plibpth="$plibpth $sde_path/$sde/usr/lib" +unset sde_path default_sde sde + +##################################### +# <takis@XFree86.Org> +##################################### + +libperl="libperl58.so" + +# Many functions (eg, gethostent(), killpg(), getpriority(), setruid() +# dbm_*(), and plenty more) are defined in -ldgc. Usually you don't +# need to know this (it seems that libdgc.so is searched automatically +# by ld), but Configure needs to check it otherwise it will report all +# those functions as missing. + +##################################### +# <takis@XFree86.Org> +##################################### + +# libswanted="dgc gdbm $libswanted" +#libswanted="dbm posix $libswanted" +# Do *NOT* add there the malloc native +# DG/UX library! +libswanted="dbm posix resolv socket nsl dl m" + +##################################### +# <takis@XFree86.Org> +##################################### + +mydomain='.localhost' +cf_by=`(whoami) 2>/dev/null` +cf_email="$cf_by@localhost" + +# Dynamic loading works using the dlopen() functions. Note that dlfcn.h +# used to be broken, it declared _dl*() rather than dl*(). This was the +# case up to 3.10, it has been fixed in 4.11. I'm not sure if it was +# fixed in 4.10. If you have the older header just ignore the warnings +# (since pointers and integers have the same format on m88k). + +# usedl=true +usedl=false + +# For cc rather than gcc the flags would be `-K PIC' for compiling and +# -G for loading. I haven't tested this. + +##################################### +# <takis@XFree86.Org> +# Use -fPIC instead -fpic +##################################### + +cccdlflags=-fPIC +#We must use gcc +ld="gcc" +lddlflags="-shared" + +############################################################################ +# DGUX Posix 4A Draft 10 Thread support +# <takis@XFree86.Org> +# use Configure -Dusethreads to enable +############################################################################ + +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + ccflags="$ccflags" + # DG/UX has this for sure! Main Configure fails to + # detect it but it is needed! + d_pthread_atfork='define' + shift + # DG/UX's sched_yield is in -lrte + # Do *NOT* add there the malloc native + # DG/UX library! + libswanted="dbm posix resolv socket nsl dl m rte" + archname="ix86-dgux-thread" + sitearch="$prefix/lib/perl58/$archname" + sitelib="$prefix/lib/perl58" + case "$cc" in + *gcc*) + #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread + #### Otherwise take out the switch -pthread + #### And add manually the -D_POSIX4A_DRAFT10_SOURCE flag. + ld="gcc" + ccflags="$ccflags -D_POSIX4A_DRAFT10_SOURCE" + # Debug build : use -DS flag on command line perl + # ccflags="$ccflags -g -mstandard -DDEBUGGING -D_POSIX4A_DRAFT10_SOURCE -pthread" + cccdlflags='-fPIC' + lddlflags="-shared" + #### Use GCC -2.95.2/3 rev (DG/UX) and -pthread + #### Otherwise take out the switch -pthread + #### And add manually the -lthread library. + ldflags="$ldflags -pthread" + ;; + + *) + echo "Not supported DG/UX cc and threads !" + ;; + esac +esac +EOCBU + +# "./Configure -d" can't figure this out easily +d_suidsafe='define' + +################################################### diff --git a/hints/dos_djgpp.sh b/hints/dos_djgpp.sh new file mode 100644 index 0000000000..3ae9d22ae1 --- /dev/null +++ b/hints/dos_djgpp.sh @@ -0,0 +1,76 @@ +# hints file for dos/djgpp v2.xx +# Original by Laszlo Molnar <molnarl@cdata.tvnet.hu> + +# 971015 - archname changed from 'djgpp' to 'dos-djgpp' +# 971210 - threads support +# 000222 - added -DPERL_EXTERNAL_GLOB to ccflags + +archname='dos-djgpp' +archobjs='djgpp.o' +path_sep=\; +startsh="#! /bin/sh" + +cc='gcc' +ld='gcc' +usrinc="$DJDIR/include" + +libpth="$DJDIR/lib" +libc="$libpth/libc.a" + +so='none' +usedl='n' + +firstmakefile='GNUmakefile' +exe_ext='.exe' + +randbits=31 +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' +d_pipe='undef' + +startperl='#!perl' + +case "X$optimize" in + X) + optimize="-O2 -malign-loops=2 -malign-jumps=2 -malign-functions=2" + ldflags='-s' + ;; + X*) + ldflags=' ' + ;; +esac +ccflags="$ccflags -DPERL_EXTERNAL_GLOB" +usemymalloc='n' +timetype='time_t' + +prefix=$DJDIR +privlib=$prefix/lib/perl5 +archlib=$privlib +sitelib=$privlib/site +sitearch=$sitelib + +eagain='EAGAIN' +rd_nodata='-1' + +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + set `echo X "$libswanted "| sed -e 's/ c / gthreads c /'` + shift + libswanted="$*" + ;; +esac +EOCBU + +useperlio='undef' +uselargefiles='undef' diff --git a/hints/dynix.sh b/hints/dynix.sh new file mode 100644 index 0000000000..4bdb804f53 --- /dev/null +++ b/hints/dynix.sh @@ -0,0 +1,7 @@ +# If this doesn't work, try specifying 'none' for hints. +d_castneg=undef +libswanted=`echo $libswanted | sed -e 's/socket /socket seq /'` + +# Reported by Craig Milo Rogers <Rogers@ISI.EDU> +# Date: Tue, 30 Jan 96 15:29:26 PST +d_casti32=undef diff --git a/hints/dynixptx.sh b/hints/dynixptx.sh new file mode 100644 index 0000000000..b08dbc29d7 --- /dev/null +++ b/hints/dynixptx.sh @@ -0,0 +1,60 @@ +# Sequent Dynix/Ptx v. 4 hints +# Created 1996/03/15 by Brad Howerter, bhower@wgc.woodward.com + +# Modified 1998/11/10 by Martin J. Bligh, mbligh@sequent.com +# to incorporate work done by Kurtis D. Rader & myself. + +# Use Configure -Dcc=gcc to use gcc. + +# cc wants -G for dynamic loading +lddlflags='-G' + +# Remove inet to avoid this error in Configure, which causes Configure +# to be unable to figure out return types: +# dynamic linker: ./ssize: can't find libinet.so, +# link with -lsocket instead of -linet + +libswanted=`echo $libswanted | sed -e 's/ inet / /'` + +# Configure defaults to usenm='y', which doesn't work very well +usenm='n' + +# removed d_vfork='define'; we can't use it any more ... + +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. +# (1) the socket interface is in libsocket.so -- this wouldn't be so hard +# for Configure to fathom...but it gets more tangled. +# (2) if the system has been patched there can be libsocket.so.1.FOO.BAR, +# the FOO.BAR being the old version of the system before the patching. +# Configure picks up the old broken version. +# (3) libsocket.so points to either libsocket.so.1 (v4.2) +# or libsocket.so.1.1 (v4.4) The socket call in libsocket.so.1.1 +# (BSD socket library) is called bsd_socket(), and has a macro wrapper +# to hide this. +# This information kindly provided by Martin J. Bligh of Sequent. +# As he puts it: +# "Sequent has unusual capabilities, taking it above and beyond +# the complexity of any other vendor" :-) +# +# Jarkko Hietaniemi November 1998 + +case "$osvers" in +4.[45]*) # configure doesn't find sockets, as they're in libsocket, not libc + d_socket='define' + d_oldsock='undef' + d_sockpair='define' + ;; +4.2*) # on ptx/TCP 4.2, we can use BSD sockets, but they're not the default. + cppflags="$cppflags -Wc,+bsd-socket" + ccflags="$ccflags -Wc,+bsd-socket" + ldflags="$ldflags -Wc,+bsd-socket" + d_socket='define' + d_oldsock='undef' + d_sockpair='define' + ;; +esac diff --git a/hints/epix.sh b/hints/epix.sh new file mode 100644 index 0000000000..dcad3c5d47 --- /dev/null +++ b/hints/epix.sh @@ -0,0 +1,66 @@ +# epix.sh +# Hint file for EP/IX on CDC RISC boxes. +# +# From: Stanley Donald Capelik <sd9sdc@hp100.den.mmc.com> +# Modified by Andy Dougherty <doughera@lafcol.lafayette.edu> +# Last modified: Mon May 8 15:29:18 EDT 1995 +# +# This hint file appears to be based on the svr4 hints for perl5.000, +# with some CDC-specific additions. I've tried to updated it to +# match the 5.001 svr4 hints, which allow for dynamic loading, +# but I have no way of testing the resulting file. +# +# There were also some contradictions that I've tried to straighten +# out, but I'm not sure I got them all right. +# +# Edit config.sh to change shmattype from 'char *' to 'void *'" + +# Use Configure -Dcc=gcc to use gcc. +case "$cc" in +'') cc='/bin/cc3.11' + test -f $cc || cc='/usr/ccs/bin/cc' + ;; +esac + +usrinc='/svr4/usr/include' + +# Various things that Configure apparently doesn't get right. +strings='/svr4/usr/include/string.h' +timeincl='/svr4/usr/include/sys/time.h ' +libc='/svr4/usr/lib/libc.a' +glibpth="/svr4/usr/lib /svr4/usr/lib/cmplrs/cc /usr/ccs/lib /svr4/lib /svr4/usr/ucblib $glibpth" +osname='epix2' +archname='epix2' +d_suidsafe='define' # "./Configure -d" can't figure this out easilly +d_flock='undef' + +# Old version had this, but I'm not sure why since the old version +# also mucked around with libswanted. This is also definitely wrong +# if the user is trying to use DB_File or GDBM_File. +# libs='-lsocket -lnsl -ldbm -ldl -lc -lcrypt -lm -lucb' + +# We include support for using libraries in /usr/ucblib, but the setting +# 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="$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: + +libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'` +# libmalloc.a - Probably using Perl's malloc() anyway. +# libucb.a - Remove it if you have problems ld'ing. We include it because +# it is needed for ODBM_File and NDBM_File extensions. +if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library: + # Use the "native" counterparts, not the BSD emulation stuff: + d_bcmp='undef'; d_bcopy='undef'; d_bzero='undef'; d_safebcpy='undef' + d_index='undef'; d_killpg='undef'; d_getprior='undef'; d_setprior='undef' + d_setlinebuf='undef'; d_setregid='undef'; d_setreuid='undef' +fi + +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//'` + diff --git a/hints/esix4.sh b/hints/esix4.sh new file mode 100644 index 0000000000..b1d697cccb --- /dev/null +++ b/hints/esix4.sh @@ -0,0 +1,36 @@ +# hints/esix4.sh +# Original esix4 hint file courtesy of +# 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="$ldflags -L/usr/ccs/lib -L/usr/ucblib" +test -d /usr/local/man || mansrc='none' +# 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 '/\*[^*]*$' >esix$$ + if test -s esix$$; then + cat <<EOM >&2 + +WARNING: You are likely to have problems compiling the Socket extension +unless you fix the unterminated comment for AF_OSI in the file +/usr/include/sys/socket.h. + +EOM + fi + rm -f esix$$ +fi + diff --git a/hints/fps.sh b/hints/fps.sh new file mode 100644 index 0000000000..7726790ac0 --- /dev/null +++ b/hints/fps.sh @@ -0,0 +1 @@ +ccflags="$ccflags -J" diff --git a/hints/freebsd.sh b/hints/freebsd.sh new file mode 100644 index 0000000000..4a01430017 --- /dev/null +++ b/hints/freebsd.sh @@ -0,0 +1,256 @@ +# Original based on info from +# Carl M. Fongheiser <cmf@ins.infonet.net> +# Date: Thu, 28 Jul 1994 19:17:05 -0500 (CDT) +# +# Additional 1.1.5 defines from +# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net> +# Date: Wed, 28 Sep 1994 00:37:46 +0100 (MET) +# +# Additional 2.* defines from +# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net> +# Date: Sat, 8 Apr 1995 20:53:41 +0200 (MET DST) +# +# Additional 2.0.5 and 2.1 defined from +# Ollivier Robert <Ollivier.Robert@keltia.frmug.fr.net> +# Date: Fri, 12 May 1995 14:30:38 +0200 (MET DST) +# +# Additional 2.2 defines from +# Mark Murray <mark@grondar.za> +# Date: Wed, 6 Nov 1996 09:44:58 +0200 (MET) +# +# Modified to ensure we replace -lc with -lc_r, and +# to put in place-holders for various specific hints. +# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Date: Tue Mar 10 16:07:00 EST 1998 +# +# Support for FreeBSD/ELF +# Ollivier Robert <roberto@keltia.freenix.fr> +# Date: Wed Sep 2 16:22:12 CEST 1998 +# +# The two flags "-fpic -DPIC" are used to indicate a +# will-be-shared object. Configure will guess the -fpic, (and the +# -DPIC is not used by perl proper) but the full define is included to +# be consistent with the FreeBSD general shared libs building process. +# +# setreuid and friends are inherently broken in all versions of FreeBSD +# before 2.1-current (before approx date 4/15/95). It is fixed in 2.0.5 +# and what-will-be-2.1 +# + +case "$osvers" in +0.*|1.0*) + usedl="$undef" + ;; +1.1*) + malloctype='void *' + groupstype='int' + d_setregid='undef' + d_setreuid='undef' + d_setrgid='undef' + d_setruid='undef' + ;; +2.0-release*) + d_setregid='undef' + d_setreuid='undef' + d_setrgid='undef' + d_setruid='undef' + ;; +# +# Trying to cover 2.0.5, 2.1-current and future 2.1/2.2 +# It does not covert all 2.1-current versions as the output of uname +# changed a few times. +# +# Even though seteuid/setegid are available, they've been turned off +# because perl isn't coded with saved set[ug]id variables in mind. +# In addition, a small patch is requried to suidperl to avoid a security +# problem with FreeBSD. +# +2.0.5*|2.0-built*|2.1*) + usevfork='true' + case "$usemymalloc" in + "") usemymalloc='n' + ;; + esac + d_setregid='define' + d_setreuid='define' + d_setegid='undef' + d_seteuid='undef' + test -r ./broken-db.msg && . ./broken-db.msg + ;; +# +# 2.2 and above have phkmalloc(3). +# don't use -lmalloc (maybe there's an old one from 1.1.5.1 floating around) +2.2*) + usevfork='true' + case "$usemymalloc" in + "") usemymalloc='n' + ;; + esac + libswanted=`echo $libswanted | sed 's/ malloc / /'` + d_setregid='define' + d_setreuid='define' + d_setegid='undef' + d_seteuid='undef' + ;; +*) usevfork='true' + case "$usemymalloc" in + "") usemymalloc='n' + ;; + esac + libswanted=`echo $libswanted | sed 's/ malloc / /'` + ;; +esac + +# Dynamic Loading flags have not changed much, so they are separated +# out here to avoid duplicating them everywhere. +case "$osvers" in +0.*|1.0*) ;; + +1*|2*) cccdlflags='-DPIC -fpic' + lddlflags="-Bshareable $lddlflags" + ;; + +*) + objformat=`/usr/bin/objformat` + if [ x$objformat = xelf ]; then + libpth="/usr/lib /usr/local/lib" + glibpth="/usr/lib /usr/local/lib" + ldflags="-Wl,-E " + lddlflags="-shared " + else + if [ -e /usr/lib/aout ]; then + libpth="/usr/lib/aout /usr/local/lib /usr/lib" + glibpth="/usr/lib/aout /usr/local/lib /usr/lib" + fi + lddlflags='-Bshareable' + fi + cccdlflags='-DPIC -fpic' + ;; +esac + +case "$osvers" in +0*|1*|2*|3*) ;; + +*) + ccflags="${ccflags} -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H" + if /usr/bin/file -L /usr/lib/libc.so | /usr/bin/grep -vq "not stripped" ; then + usenm=false + fi + ;; +esac + +cat <<'EOM' >&4 + +Some users have reported that Configure halts when testing for +the O_NONBLOCK symbol with a syntax error. This is apparently a +sh error. Rerunning Configure with ksh apparently fixes the +problem. Try + ksh Configure [your options] + +EOM + +# From: Anton Berezin <tobez@plab.ku.dk> +# To: perl5-porters@perl.org +# Subject: [PATCH 5.005_54] Configure - hints/freebsd.sh signal handler type +# Date: 30 Nov 1998 19:46:24 +0100 +# Message-ID: <864srhhvcv.fsf@lion.plab.ku.dk> + +signal_t='void' +d_voidsig='define' + +# set libperl.so.X.X for 2.2.X +case "$osvers" in +2.2*) + # unfortunately this code gets executed before + # the equivalent in the main Configure so we copy a little + # from Configure XXX Configure should be fixed. + if $test -r $src/patchlevel.h;then + patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h` + subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h` + else + patchlevel=0 + subversion=0 + fi + libperl="libperl.so.$patchlevel.$subversion" + unset patchlevel + unset subversion + ;; +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' +case "$usethreads" in +$define|true|[yY]*) + lc_r=`/sbin/ldconfig -r|grep ':-lc_r'|awk '{print $NF}'|sed -n '$p'` + case "$osvers" in + 0*|1*|2.0*|2.1*) cat <<EOM >&4 +I did not know that FreeBSD $osvers supports POSIX threads. + +Feel free to tell perlbug@perl.org otherwise. +EOM + exit 1 + ;; + + 2.2.[0-7]*) + cat <<EOM >&4 +POSIX threads are not supported well by FreeBSD $osvers. + +Please consider upgrading to at least FreeBSD 2.2.8, +or preferably to the most recent -RELEASE or -STABLE +version (see http://www.freebsd.org/releases/). + +(While 2.2.7 does have pthreads, it has some problems + with the combination of threads and pipes and therefore + many Perl tests will either hang or fail.) +EOM + exit 1 + ;; + + *) + if [ ! -r "$lc_r" ]; then + cat <<EOM >&4 +POSIX threads should be supported by FreeBSD $osvers -- +but your system is missing the shared libc_r. +(/sbin/ldconfig -r doesn't find any). + +Consider using the latest STABLE release. +EOM + exit 1 + fi + ldflags="-pthread $ldflags" + case "$osvers" in + 4.*) # 4.x has gethostbyaddr_r but it is + # "Temporary function, not threadsafe"... + d_gethostbyaddr_r="undef" + d_gethostbyaddr_r_proto="undef" + ;; + esac + ;; + + esac + + set `echo X "$libswanted "| sed -e 's/ c / c_r /'` + shift + libswanted="$*" + # Configure will probably pick the wrong libc to use for nm scan. + # The safest quick-fix is just to not use nm at all... + usenm=false + + case "$osvers" in + 2.2.8*) + # ... but this does not apply for 2.2.8 - we know it's safe + libc="$lc_r" + usenm=true + ;; + esac + + unset lc_r + + # Even with the malloc mutexes the Perl malloc does not + # seem to be threadsafe in FreeBSD? + usemymalloc=n + +esac +EOCBU + diff --git a/hints/genix.sh b/hints/genix.sh new file mode 100644 index 0000000000..16b6879b46 --- /dev/null +++ b/hints/genix.sh @@ -0,0 +1 @@ +i_varargs=undef diff --git a/hints/gnu.sh b/hints/gnu.sh new file mode 100644 index 0000000000..927bceab9d --- /dev/null +++ b/hints/gnu.sh @@ -0,0 +1,33 @@ +# hints/gnu.sh +# Last modified: Thu Dec 10 20:47:28 CET 1998 +# Mark Kettenis <kettenis@phys.uva.nl> + +# libnsl is unusable on the Hurd. +# XXX remove this once SUNRPC is implemented. +set `echo X "$libswanted "| sed -e 's/ nsl / /'` +shift +libswanted="$*" + +case "$optimize" in +'') optimize='-O2' ;; +esac + +# Flags needed to produce shared libraries. +lddlflags='-shared' + +# Flags needed by programs that use dynamic linking. +ccdlflags='-Wl,-E' + +# The following routines are only available as stubs in GNU libc. +# XXX remove this once metaconf detects the GNU libc stubs. +d_msgctl='undef' +d_msgget='undef' +d_msgrcv='undef' +d_msgsnd='undef' +d_semctl='undef' +d_semget='undef' +d_semop='undef' +d_shmat='undef' +d_shmctl='undef' +d_shmdt='undef' +d_shmget='undef' diff --git a/hints/greenhills.sh b/hints/greenhills.sh new file mode 100644 index 0000000000..da6fcc95b0 --- /dev/null +++ b/hints/greenhills.sh @@ -0,0 +1 @@ +ccflags="$ccflags -X18" diff --git a/hints/hpux.sh b/hints/hpux.sh new file mode 100644 index 0000000000..71705163d4 --- /dev/null +++ b/hints/hpux.sh @@ -0,0 +1,598 @@ +#!/usr/bin/sh + +### SYSTEM ARCHITECTURE + +# Determine the architecture type of this system. +# Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97 + xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`; +if [ "$xxOsRevMajor" -ge 10 ]; then + # This system is running >= 10.x + + # Tested on 10.01 PA1.x and 10.20 PA[12].x. + # Idea: Scan /usr/include/sys/unistd.h for matches with + # "#define CPU_* `getconf # CPU_VERSION`" to determine CPU type. + # Note the text following "CPU_" is used, *NOT* the comment. + # + # ASSUMPTIONS: Numbers will continue to be defined in hex -- and in + # /usr/include/sys/unistd.h -- and the CPU_* #defines will be kept + # up to date with new CPU/OS releases. + xxcpu=`getconf CPU_VERSION`; # Get the number. + xxcpu=`printf '0x%x' $xxcpu`; # convert to hex + archname=`sed -n -e "s/^#[[:space:]]*define[[:space:]]*CPU_//p" /usr/include/sys/unistd.h | + sed -n -e "s/[[:space:]]*$xxcpu[[:space:]].*//p" | + sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./ -e "s/[[:space:]]*//g"`; +else + # This system is running <= 9.x + # Tested on 9.0[57] PA and [78].0 MC680[23]0. Idea: After removing + # MC6888[12] from context string, use first CPU identifier. + # + # ASSUMPTION: Only CPU identifiers contain no lowercase letters. + archname=`getcontext | tr ' ' '\012' | grep -v '[a-z]' | grep -v MC688 | + sed -e 's/HP-//' -e 1q`; + selecttype='int *' + fi + +# For some strange reason, the u32align test from Configure hangs in +# HP-UX 10.20 since the December 2001 patches. So hint it to avoid +# the test. +if [ "$xxOsRevMajor" -le 10 ]; then + d_u32align=$define + fi + +echo "Archname is $archname" + +# Fix XSlib (CPAN) confusion when re-using a prefix but changing from ILP32 +# to LP64 builds. They're NOT binary compatible, so quit claiming they are. +archname64=LP64 + + +### HP-UX OS specific behaviour + +# -ldbm is obsolete and should not be used +# -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion +# -lPW is obsolete and should not be used +# The libraries crypt, malloc, ndir, and net are empty. +set `echo "X $libswanted " | sed -e 's/ ld / /' -e 's/ dbm / /' -e 's/ BSD / /' -e 's/ PW / /'` +shift +libswanted="$*" + +cc=${cc:-cc} +ar=/usr/bin/ar # Yes, truly override. We do not want the GNU ar. +full_ar=$ar # I repeat, no GNU ar. arrr. + +set `echo "X $ccflags " | sed -e 's/ -A[ea] / /' -e 's/ -D_HPUX_SOURCE / /'` +shift + cc_cppflags="$* -D_HPUX_SOURCE" +cppflags="-Aa -D__STDC_EXT__ $cc_cppflags" + +case "$prefix" in + "") prefix='/opt/perl5' ;; + esac + + gnu_as=no + gnu_ld=no +case `$cc -v 2>&1`"" in + *gcc*) ccisgcc="$define" + ccflags="$cc_cppflags" + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi + case "$gccversion" in + [012]*) # HP-UX and gcc-2.* break UINT32_MAX :-( + ccflags="$ccflags -DUINT32_MAX_BROKEN" + ;; + 3*) # GCC (both 32bit and 64bit) will define __STDC_EXT__ + # by default when using GCC 3.0 and newer versions of + # the compiler. + cppflags="$cc_cppflags" + ;; + esac + case "`getconf KERNEL_BITS 2>/dev/null`" in + *64*) + echo "main(){}">try.c + case "$gccversion" in + 3*) + case "$archname" in + PA-RISC*) + case "$ccflags" in + *-mpa-risc*) ;; + *) ccflags="$ccflags -mpa-risc-2-0" ;; + esac + ;; + esac + ;; + *) # gcc with gas will not accept +DA2.0 + case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in + *"+DA2.0"*) # gas + gnu_as=yes + ;; + *) # HPas + ccflags="$ccflags -Wa,+DA2.0" + ;; + esac + ;; + esac + # gcc with gld will not accept +vnocompatwarnings + case "`$cc -o try -Wl,+vnocompatwarnings try.c 2>&1`" in + *"+vnocompat"*) # gld + gnu_ld=yes + ;; + *) # HPld + case "$gccversion" in + [12]*) + # Why not 3 as well here? + # Since not relevant to IA64, not changed. + ldflags="$ldflags -Wl,+vnocompatwarnings" + ccflags="$ccflags -Wl,+vnocompatwarnings" + ;; + esac + ;; + esac + rm -f try.c + ;; + esac + ;; + *) ccisgcc='' + ccversion=`which cc | xargs what | awk '/Compiler/{print $2}'` + case "$ccflags" in + "-Ae "*) ;; + *) ccflags="-Ae $cc_cppflags -Wl,+vnocompatwarnings" ;; + esac + # Needed because cpp does only support -Aa (not -Ae) + cpplast='-' + cppminus='-' + cppstdin='cc -E -Aa -D__STDC_EXT__' + cpprun=$cppstdin +# case "$d_casti32" in +# "") d_casti32='undef' ;; +# esac + ;; + esac + +# When HP-UX runs a script with "#!", it sets argv[0] to the script name. +toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"' + +### 64 BITNESS + +# Some gcc versions do native 64 bit long (e.g. 2.9-hppa-000310 and gcc-3.0) +# We have to force 64bitness to go search the right libraries + gcc_64native=no +case "$ccisgcc" in + $define|true|[Yy]) + echo 'int main(){long l;printf("%d\\n",sizeof(l));}'>try.c + $cc -o try $ccflags $ldflags try.c + if [ "`try`" = "8" ]; then + cat <<EOM >&4 + +*** This version of gcc uses 64 bit longs. -Duse64bitall is +*** implicitly set to enable continuation +EOM + use64bitall=$define + gcc_64native=yes + fi + ;; + esac + +case "$use64bitall" in + $define|true|[yY]*) use64bitint="$define" ;; + esac + +case "$usemorebits" in + $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;; + esac + +case "$archname" in + IA64*) + # While here, override so=sl auto-detection + so='so' + ;; + *) + case "$uselongdouble" in + *) ;; + $define|true|[yY]*) + cat <<EOM >&4 + +*** long doubles are not (yet) supported on HP-UX (any version) +*** Until it does, we cannot continue, aborting. +EOM + exit 1 ;; + esac + ;; + esac + +case "$use64bitint" in + $define|true|[Yy]) + + 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 + + # Set libc and the library paths + case "$archname" in + PA-RISC*) + loclibpth="$loclibpth /lib/pa20_64" + libc='/lib/pa20_64/libc.sl' ;; + IA64*) + loclibpth="$loclibpth /usr/lib/hpux64" + libc='/usr/lib/hpux64/libc.so' ;; + esac + if [ ! -f "$libc" ]; then + cat <<EOM >&4 + +*** You do not seem to have the 64-bit libc. +*** I cannot find the file $libc. +*** Cannot continue, aborting. +EOM + exit 1 + fi + + case "$ccisgcc" in + $define|true|[Yy]) + # For the moment, don't care that it ain't supported (yet) + # by gcc (up to and including 2.95.3), cause it'll crash + # anyway. Expect auto-detection of 64-bit enabled gcc on + # HP-UX soon, including a user-friendly exit + case $gcc_64native in + no) case "$gccversion" in + [123]*) ccflags="$ccflags -mlp64" + case "$archname" in + PA-RISC*) + ldflags="$ldflags -Wl,+DD64" + ;; + IA64*) + ldflags="$ldflags -mlp64" + ;; + esac + ;; + esac + ;; + esac + ;; + *) + ccflags="$ccflags +DD64" + ldflags="$ldflags +DD64" + ;; + esac + + # Reset the library checker to make sure libraries + # are the right type + # (NOTE: on IA64, this doesn't work with .a files.) + libscheck='case "`/usr/bin/file $xxx`" in + *ELF-64*|*LP64*|*PA-RISC2.0*) ;; + *) xxx=/no/64-bit$xxx ;; + esac' + + ;; + + *) # Not in 64-bit mode + + case "$archname" in + PA-RISC*) + libc='/lib/libc.sl' ;; + IA64*) + loclibpth="$loclibpth /usr/lib/hpux32" + libc='/usr/lib/hpux32/libc.so' ;; + esac + ;; + esac + +# By setting the deferred flag below, this means that if you run perl +# on a system that does not have the required shared library that you +# linked it with, it will die when you try to access a symbol in the +# (missing) shared library. If you would rather know at perl startup +# time that you are missing an important shared library, switch the +# comments so that immediate, rather than deferred loading is +# performed. Even with immediate loading, you can postpone errors for +# undefined (or multiply defined) routines until actual access by +# adding the "nonfatal" option. +# ccdlflags="-Wl,-E -Wl,-B,immediate $ccdlflags" +# ccdlflags="-Wl,-E -Wl,-B,immediate,-B,nonfatal $ccdlflags" +if [ "$gnu_ld" = "yes" ]; then + ccdlflags="-Wl,-E $ccdlflags" +else + ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags" + fi + + +### COMPILER SPECIFICS + +## Local restrictions (point to README.hpux to lift these) + +## Optimization limits +cat >try.c <<EOF +#include <sys/resource.h> + +int main () +{ + struct rlimit rl; + int i = getrlimit (RLIMIT_DATA, &rl); + printf ("%d\n", rl.rlim_cur / (1024 * 1024)); + } /* main */ +EOF +$cc -o try $ccflags $ldflags try.c + maxdsiz=`try` +rm -f try try.c core +if [ $maxdsiz -le 64 ]; then + # 64 Mb is probably not enough to optimize toke.c + # and regexp.c with -O2 + cat <<EOM >&4 +Your kernel limits the data section of your programs to $maxdsiz Mb, +which is (sadly) not enough to fully optimize some parts of the +perl binary. I'll try to use a lower optimization level for +those parts. If you are a sysadmin, and you *do* want full +optimization, raise the 'maxdsiz' kernel configuration parameter +to at least 0x08000000 (128 Mb) and rebuild your kernel. +EOM +regexec_cflags='' +doop_cflags='' + fi + +case "$ccisgcc" in + $define|true|[Yy]) + + case "$optimize" in + "") optimize="-g -O" ;; + *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;; + esac + #ld="$cc" + ld=/usr/bin/ld + cccdlflags='-fPIC' + #lddlflags='-shared' + lddlflags='-b' + case "$optimize" in + *-g*-O*|*-O*-g*) + # gcc without gas will not accept -g + echo "main(){}">try.c + case "`$cc $optimize -c try.c 2>&1`" in + *"-g option disabled"*) + set `echo "X $optimize " | sed -e 's/ -g / /'` + shift + optimize="$*" + ;; + esac + ;; + esac + if [ $maxdsiz -le 64 ]; then + case "$optimize" in + *O2*) opt=`echo "$optimize" | sed -e 's/O2/O1/'` + toke_cflags="$toke_cflags;optimize=\"$opt\"" + regexec_cflags="optimize=\"$opt\"" + ;; + esac + fi + ;; + + *) # HP's compiler cannot combine -g and -O + case "$optimize" in + "") optimize="+O2 +Onolimit" ;; + *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;; + esac + case "$optimize" in + *-O*|\ + *O2*) opt=`echo "$optimize" | sed -e 's/-O/+O2/' -e 's/O2/O1/' -e 's/ *+Onolimit//'` + ;; + *) opt="$optimize" + ;; + esac + if [ $maxdsiz -le 64 ]; then + toke_cflags="$toke_cflags;optimize=\"$opt\"" + regexec_cflags="optimize=\"$opt\"" + fi + case "$archname" in + IA64*) + doop_cflags="optimize=\"$opt\"" + ;; + esac + ld=/usr/bin/ld + cccdlflags='+Z' + lddlflags='-b +vnocompatwarnings' + ;; + esac + +## LARGEFILES + +#case "$uselargefiles-$ccisgcc" in +# "$define-$define"|'-define') +# cat <<EOM >&4 +# +#*** I'm ignoring large files for this build because +#*** I don't know how to do use large files in HP-UX using gcc. +# +#EOM +# uselargefiles="$undef" +# ;; +# esac + +cat >UU/uselargefiles.cbu <<'EOCBU' +# This script UU/uselargefiles.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use large files. +case "$uselargefiles" in + ""|$define|true|[yY]*) + # there are largefile flags available via getconf(1) + # but we cheat for now. (Keep that in the left margin.) +ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + case " $ccflags " in + *" $ccflags_uselargefiles "*) ;; + *) ccflags="$ccflags $ccflags_uselargefiles" ;; + esac + + if test -z "$ccisgcc" -a -z "$gccversion"; then + # The strict ANSI mode (-Aa) doesn't like large files. + ccflags=`echo " $ccflags "|sed 's@ -Aa @ @g'` + case "$ccflags" in + *-Ae*) ;; + *) ccflags="$ccflags -Ae" ;; + esac + fi + ;; + esac +EOCBU + +# THREADING + +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat >UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in + $define|true|[yY]*) + if [ "$xxOsRevMajor" -lt 10 ]; then + cat <<EOM >&4 + +HP-UX $xxOsRevMajor cannot support POSIX threads. +Consider upgrading to at least HP-UX 11. +Cannot continue, aborting. +EOM + exit 1 + fi + + if [ "$xxOsRevMajor" -eq 10 ]; then + # Under 10.X, a threaded perl can be built + if [ -f /usr/include/pthread.h ]; then + if [ -f /usr/lib/libcma.sl ]; then + # DCE (from Core OS CD) is installed + + # Check if it is pristine, or patched + cmavsn=`what /usr/lib/libcma.sl 2>&1 | grep 1996` + if [ ! -z "$cmavsn" ]; then + cat <<EOM >&4 + +*************************************************************************** + +Perl will support threading through /usr/lib/libcma.sl from +the HP DCE package, but the version found is too old to be +reliable. + +If you are not depending on this specific version of the library, +consider to upgrade using patch PHSS_23672 (read README.hpux) + +*************************************************************************** + +(sleeping for 10 seconds...) +EOM + sleep 10 + fi + + # It needs # libcma and OLD_PTHREADS_API. Also + # <pthread.h> needs to be #included before any + # other includes (in perl.h) + + # HP-UX 10.X uses the old pthreads API + d_oldpthreads="$define" + + # 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" +# First column on purpose: +# this is not a standard Configure variable +# but we need to get this noticed. +pthread_h_first="$define" + + # HP-UX 10.X seems to have no easy + # way of detecting these *time_r protos. + d_gmtime_r_proto='define' + gmtime_r_proto='REENTRANT_PROTO_I_TS' + d_localtime_r_proto='define' + localtime_r_proto='REENTRANT_PROTO_I_TS' + + # Avoid the poisonous conflicting (and irrelevant) + # prototypes of setkey(). + i_crypt="$undef" + + # CMA redefines select to cma_select, and cma_select + # expects int * instead of fd_set * (just like 9.X) + selecttype='int *' + + elif [ -f /usr/lib/libpthread.sl ]; then + # PTH package is installed + libswanted="pthread $libswanted" + else + libswanted="no_threads_available" + fi + else + libswanted="no_threads_available" + fi + + if [ $libswanted = "no_threads_available" ]; then + cat <<EOM >&4 + +In HP-UX 10.X for POSIX threads you need both of the files +/usr/include/pthread.h and either /usr/lib/libcma.sl or /usr/lib/libpthread.sl. +Either you must upgrade to HP-UX 11 or install a posix thread library: + + DCE-CoreTools from HP-UX 10.20 Hardware Extensions 3.0 CD (B3920-13941) + +or + + PTH package from e.g. http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html + +Cannot continue, aborting. +EOM + exit 1 + fi + else + # 12 may want upping the _POSIX_C_SOURCE datestamp... + ccflags=" -D_POSIX_C_SOURCE=199506L -D_REENTRANT $ccflags" + set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` + shift + libswanted="$*" + fi + + ;; + esac +EOCBU + +# The mysterious io_xs memory corruption in 11.00 32bit seems to get +# fixed by not using Perl's malloc. Flip side is performance loss. +# So we want mymalloc for all situations possible +usemymalloc='y' +case "$usethreads" in + $define|true|[yY]*) usemymalloc='n' ;; + *) case "$ccisgcc" in + $undef|false|[nN]*) + case "$use64bitint" in + $undef|false|[nN]*) + case "$ccflags" in + *-DDEBUGGING*) ;; + *) usemymalloc='n' ;; + esac + ;; + esac + ;; + esac + ;; + esac + +usemymalloc='n' +case "$useperlio" in + $undef|false|[nN]*) usemymalloc='y' ;; + esac + +# fpclassify() is a macro, the library call is Fpclassify +# Similarly with the others below. +d_fpclassify='define' +d_isnan='define' +d_isinf='define' +d_isfinite='define' +d_unordered='define' +# Next one(s) need the leading tab. These are special 'hint' symbols that +# are not to be propagated to config.sh, all related to pthreads draft 4 +# interfaces. +case "$d_oldpthreads" in + ''|$undef) + d_crypt_r_proto='undef' + d_getgrent_r_proto='undef' + d_getpwent_r_proto='undef' + d_strerror_r_proto='undef' + ;; + esac diff --git a/hints/i386.sh b/hints/i386.sh new file mode 100644 index 0000000000..0a810ffea8 --- /dev/null +++ b/hints/i386.sh @@ -0,0 +1 @@ +ldflags='-L/usr/ucblib' diff --git a/hints/irix_4.sh b/hints/irix_4.sh new file mode 100644 index 0000000000..5c5bdb2f0d --- /dev/null +++ b/hints/irix_4.sh @@ -0,0 +1,45 @@ +#irix_4.sh +# Last modified Fri May 5 14:06:37 EDT 1995 +optimize='-O1' + +# Does Configure really get these wrong? Why? +d_voidsig=define +d_charsprf=undef + +case "$cc" in +*gcc*) ccflags="$ccflags -D_BSD_TYPES" ;; +*) ccflags="$ccflags -ansiposix -signed" ;; +esac + +# This hint due thanks Hershel Walters <walters@smd4d.wes.army.mil> +# Date: Tue, 31 Jan 1995 16:32:53 -0600 (CST) +# Subject: IRIX4.0.4(.5? 5.0?) problems +# I don't know if they affect versions of perl other than 5.000 or +# versions of IRIX other than 4.0.4. +# +cat <<'EOM' >&4 +If you have problems, you might have try including + -DSTANDARD_C -cckr +in ccflags. +EOM + +case "$usethreads" in +$define|true|[yY]*) + cat >&4 <<EOM +IRIX `uname -r` does not support POSIX threads. +You should upgrade to at least IRIX 6.2 with pthread patches. +EOM + exit 1 + ;; +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/hints/irix_5.sh b/hints/irix_5.sh new file mode 100644 index 0000000000..f895bcc5f6 --- /dev/null +++ b/hints/irix_5.sh @@ -0,0 +1,55 @@ +# irix_5.sh +# Tue Jan 9 16:04:38 EST 1996 +# Add note about socket patch. +# +# Tue Jan 2 14:52:36 EST 1996 +# Apparently, there's a stdio bug that can lead to memory +# corruption using perl's malloc, but not SGI's malloc. +usemymalloc='n' + +ld=ld +i_time='define' + +case "$cc" in +*gcc*) ccflags="$ccflags -D_BSD_TYPES" ;; +*) ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 4000" ;; +esac + +lddlflags="-shared" +# For some reason we don't want -lsocket -lnsl or -ldl. Can anyone +# contribute an explanation? +set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'` +shift +libswanted="$*" + +# Date: Fri, 22 Dec 1995 11:49:17 -0800 +# From: Matthew Black <black@csulb.edu> +# Subject: sockets broken under IRIX 5.3? YES...how to fix +# Anyone attempting to use perl4 or perl5 with SGI IRIX 5.3 may discover +# that sockets are essentially broken. The syslog interface for perl also +# fails because it uses the broken socket interface. This problem was +# reported to SGI as bug #255347 and it can be fixed by installing +# patchSG0000596. The patch can be downloaded from Advantage OnLine (SGI's +# WWW server) or from the Support Advantage 9/95 Patch CDROM. Thanks to Tom +# Christiansen and others who provided assistance. + +case "$usethreads" in +$define|true|[yY]*) + cat >&4 <<EOM +IRIX `uname -r` does not support POSIX threads. +You should upgrade to at least IRIX 6.2 with pthread patches. +EOM + exit 1 + ;; +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/hints/irix_6.sh b/hints/irix_6.sh new file mode 100644 index 0000000000..8b14e54d55 --- /dev/null +++ b/hints/irix_6.sh @@ -0,0 +1,361 @@ +# hints/irix_6.sh +# +# original from Krishna Sethuraman, krishna@sgi.com +# +# Modified Mon Jul 22 14:52:25 EDT 1996 +# Andy Dougherty <doughera@lafcol.lafayette.edu> +# with help from Dean Roehrich <roehrich@cray.com>. +# cc -n32 update info from Krishna Sethuraman, krishna@sgi.com. +# additional update from Scott Henry, scotth@sgi.com + +# Futzed with by John Stoffel <jfs@fluent.com> on 4/24/1997 +# - assumes 'cc -n32' by default +# - tries to check for various compiler versions and do the right +# thing when it can +# - warnings turned off (-n32 messages): +# 1184 - "=" is used where where "==" may have been intended +# 1552 - variable "foo" set but never used + +# Tweaked by Chip Salzenberg <chip@perl.com> on 5/13/97 +# - don't assume 'cc -n32' if the n32 libm.so is missing + +# Threaded by Jarkko Hietaniemi <jhi@iki.fi> on 11/18/97 +# - POSIX threads knowledge by IRIX version + +# 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. +# But there's no quick and light-weight way to check in 6.2. + +# NOTE: some IRIX cc versions, e.g. 7.3.1.1m (try cc -version) have +# been known to have issues (coredumps) when compiling perl.c. +# If you've used -OPT:fast_io=ON and this happens, try removing it. +# If that fails, or you didn't use that, then try adjusting other +# optimization options (-LNO, -INLINE, -O3 to -O2, etcetera). +# The compiler bug has been reported to SGI. +# -- Allen Smith <easmith@beatrice.rutgers.edu> + +# 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 +'') 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 + +cc=${cc:-cc} + +case "$cc" in +*gcc*) ;; +*) ccversion=`cc -version 2>&1` ;; +esac + +case "$use64bitint" in +$define|true|[yY]*) + case "`uname -r`" in + [1-5]*|6.[01]) + cat >&4 <<EOM +IRIX `uname -r` does not support 64-bit types. +You should upgrade to at least IRIX 6.2. +Cannot continue, aborting. +EOM + exit 1 + ;; + esac + ;; +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 + +case "$cc" in +*"cc -n32"*) + + # If a library is requested to link against, make sure the + # objects in the library are of the same ABI we are compiling + # against. Albert Chin-A-Young <china@thewrittenword.com> + libscheck='case "$xxx" in +*.a) /bin/ar p $xxx `/bin/ar t $xxx | sed q` >$$.o; + case "`/usr/bin/file $$.o`" in + *N32*) rm -f $$.o ;; + *) rm -f $$.o; xxx=/no/n32$xxx ;; + esac ;; +*) case "`/usr/bin/file $xxx`" in + *N32*) ;; + *) xxx=/no/n32$xxx ;; + esac ;; +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' + + # Warnings to turn off because the source code hasn't + # been cleaned up enough yet to satisfy the IRIX cc. + # 1184: "=" is used where where "==" may have been intended. + # 1552: The variable "foobar" is set but never used. + woff=1184,1552 + + # Perl 5.004_57 introduced new qsort code into pp_ctl.c that + # makes IRIX cc prior to 7.2.1 to emit bad code. + # so some serious hackery follows to set pp_ctl flags correctly. + + # 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 $woff -OPT:Olimit=0" + optimize='none' + ;; + *7.1*|*7.2|*7.20) # Mongoose 7.1+ + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0" + optimize='-O3' +# This is a temporary fix for 5.005. +# Leave pp_ctl_cflags line at left margin for Configure. See +# hints/README.hints, especially the section +# =head2 Propagating variables to config.sh +pp_ctl_cflags='optimize=-O' + ;; + *7.*) # Mongoose 7.2.1+ + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0:space=ON" + optimize='-O3' + ;; + *6.2*) # Ragnarok 6.2 + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff" + optimize='none' + ;; + *) # Be safe and not optimize + ccflags="$ccflags -D_BSD_TYPES -D_BSD_TIME -woff $woff -OPT:Olimit=0" + optimize='none' + ;; + esac + +# this is to accommodate the 'modules' capability of the +# 7.2 MIPSPro compilers, which allows for the compilers to be installed +# in a nondefault location. Almost everything works as expected, but +# /usr/include isn't caught properly. Hence see the /usr/include/pthread.h +# change below to include TOOLROOT (a modules environment variable), +# and the following code. Additional +# code to accommodate the 'modules' environment should probably be added +# here if possible, or be inserted as a ${TOOLROOT} reference before +# 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" + usrinc="${TOOLROOT}/usr/include" + fi + + ;; +esac + +# Don't groan about unused libraries. +ldflags="$ldflags -Wl,-woff,84" + +# workaround for an optimizer bug +case "`$cc -version 2>&1`" in +*7.2.*) op_cflags='optimize=-O1'; opmini_cflags='optimize=-O1' ;; +*7.3.1.*) op_cflags='optimize=-O2'; opmini_cflags='optimize=-O2' ;; +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) +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. +# +# One user rerports: +# Don't need sun crypt bsd PW under 6.2. You *may* need to link +# with these if you want to run perl built under 6.2 on a 5.3 machine +# (I haven't checked) +# +# Another user reported that if he included those libraries, a large number +# of the tests failed (approx. 20-25) and he would get a core dump. To +# make things worse, test results were inconsistent, i.e., some of the +# tests would pass some times and fail at other times. +# The safest thing to do seems to be to eliminate them. +# +# Actually, the only libs that you want are '-lm'. Everything else +# you need is in libc. You do also need '-lbsd' if you choose not +# to use the -D_BSD_* defines. Note that as of 6.2 the only +# difference between '-lmalloc' and '-lc' malloc is the debugging +# and control calls, which aren't used by perl. -- scotth@sgi.com + +set `echo X "$libswanted "|sed -e 's/ sun / /' -e 's/ crypt / /' -e 's/ bsd / /' -e 's/ PW / /' -e 's/ malloc / /'` +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. +case "$usethreads" in +$define|true|[yY]*) + if test ! -f ${TOOLROOT}/usr/include/pthread.h -o ! -f /usr/lib/libpthread.so; then + case "`uname -r`" in + [1-5].*|6.[01]) + cat >&4 <<EOM +IRIX `uname -r` does not support POSIX threads. +You should upgrade to at least IRIX 6.2 with pthread patches. +EOM + ;; + 6.2) + cat >&4 <<EOM +IRIX 6.2 can have the POSIX threads. +However, the following IRIX patches (or their replacements) MUST be installed: + 1404 Irix 6.2 Posix 1003.1b man pages + 1645 IRIX 6.2 & 6.3 POSIX header file updates + 2000 Irix 6.2 Posix 1003.1b support modules + 2254 Pthread library fixes + 2401 6.2 all platform kernel rollup +IMPORTANT: + Without patch 2401, a kernel bug in IRIX 6.2 will + cause your machine to panic and crash when running + threaded perl. IRIX 6.3 and up should be OK. +EOM + ;; + [67].*) + cat >&4 <<EOM +IRIX `uname -r` should have the POSIX threads. +But, somehow, you do not seem to have them installed. +EOM + ;; + esac + cat >&4 <<EOM +Cannot continue, aborting. +EOM + exit 1 + fi + set `echo X "$libswanted "| sed -e 's/ c / pthread /'` + ld="${cc:-cc}" + shift + libswanted="$*" + + usemymalloc='n' + + # These are hidden behind a _POSIX1C ifdef that would + # require including <pthread.h> for the Configure hasproto + # to see these. + d_asctime_r_proto="$define" + d_ctime_r_proto="$define" + d_gmtime_r_proto="$define" + d_localtime_r_proto="$define" + ;; +esac +EOCBU + +# The -n32 makes off_t to be 8 bytes, so we should have largefileness. + +# Until we figure out what to be probe for in Configure (ditto for hpux.sh) +case "$usemorebits" in # Need to expand this now, then. +$define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;; +esac +case "$use64bitint" in +$define|true|[yY]*) ;; +*) d_casti32='undef' ;; +esac + +# Helmut Jarausch reports that Perl's malloc is rather unusable +# with IRIX, and SGI confirms the problem. +usemymalloc=${usemymalloc:-false} diff --git a/hints/irix_6_0.sh b/hints/irix_6_0.sh new file mode 100644 index 0000000000..50498af718 --- /dev/null +++ b/hints/irix_6_0.sh @@ -0,0 +1,64 @@ +# irix_6.sh +# from Krishna Sethuraman, krishna@sgi.com +# Date: Wed Jan 18 11:40:08 EST 1995 +# added `-32' to force compilation in 32-bit mode. +# otherwise, copied from irix_5.sh. + +# Perl built with this hints file under IRIX 6.0.1 passes +# all tests (`make test'). + +# Tue Jan 2 14:52:36 EST 1996 +# Apparently, there's a stdio bug that can lead to memory +# corruption using perl's malloc, but not SGI's malloc. +usemymalloc='n' + +ld=ld +i_time='define' +cc="cc -32" +ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000" +lddlflags="-32 -shared" + +# We don't want these libraries. Anyone know why? +set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'` +shift +libswanted="$*" +# +# The following might be of interest if you wish to try 64-bit mode: +# irix_6_64bit.sh +# Krishna Sethuraman, krishna@sgi.com +# taken from irix_5.sh . Changes from irix_5.sh: +# Olimit and nested comments (warning 1009) no longer accepted +# -OPT:fold_arith_limit so POSIX module will optimize +# no 64bit versions of sun, crypt, nsl, socket, dl dso's available +# as of IRIX 6.0.1 so omit those from libswanted line via `sed'. + +# perl 5 built with this hints file passes most tests (`make test'). +# Fails on op/subst test only. (built and tested under IRIX 6.0.1). + +# i_time='define' +# ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -woff 1009 -OPT:fold_arith_limit=1046" +# lddlflags="-shared" +# set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ sun / /' -e 's/ crypt / /' -e 's/ nsl / /' -e 's/ dl / /'` +# shift +# libswanted="$*" + +case "$usethreads" in +$define|true|[yY]*) + cat >&4 <<EOM +IRIX `uname -r` does not support POSIX threads. +You should upgrade to at least IRIX 6.2 with pthread patches. +EOM + exit 1 + ;; +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/hints/irix_6_1.sh b/hints/irix_6_1.sh new file mode 100644 index 0000000000..50498af718 --- /dev/null +++ b/hints/irix_6_1.sh @@ -0,0 +1,64 @@ +# irix_6.sh +# from Krishna Sethuraman, krishna@sgi.com +# Date: Wed Jan 18 11:40:08 EST 1995 +# added `-32' to force compilation in 32-bit mode. +# otherwise, copied from irix_5.sh. + +# Perl built with this hints file under IRIX 6.0.1 passes +# all tests (`make test'). + +# Tue Jan 2 14:52:36 EST 1996 +# Apparently, there's a stdio bug that can lead to memory +# corruption using perl's malloc, but not SGI's malloc. +usemymalloc='n' + +ld=ld +i_time='define' +cc="cc -32" +ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -Olimit 3000" +lddlflags="-32 -shared" + +# We don't want these libraries. Anyone know why? +set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ nsl / /' -e 's/ dl / /'` +shift +libswanted="$*" +# +# The following might be of interest if you wish to try 64-bit mode: +# irix_6_64bit.sh +# Krishna Sethuraman, krishna@sgi.com +# taken from irix_5.sh . Changes from irix_5.sh: +# Olimit and nested comments (warning 1009) no longer accepted +# -OPT:fold_arith_limit so POSIX module will optimize +# no 64bit versions of sun, crypt, nsl, socket, dl dso's available +# as of IRIX 6.0.1 so omit those from libswanted line via `sed'. + +# perl 5 built with this hints file passes most tests (`make test'). +# Fails on op/subst test only. (built and tested under IRIX 6.0.1). + +# i_time='define' +# ccflags="$ccflags -D_POSIX_SOURCE -ansiposix -D_BSD_TYPES -woff 1009 -OPT:fold_arith_limit=1046" +# lddlflags="-shared" +# set `echo X "$libswanted "|sed -e 's/ socket / /' -e 's/ sun / /' -e 's/ crypt / /' -e 's/ nsl / /' -e 's/ dl / /'` +# shift +# libswanted="$*" + +case "$usethreads" in +$define|true|[yY]*) + cat >&4 <<EOM +IRIX `uname -r` does not support POSIX threads. +You should upgrade to at least IRIX 6.2 with pthread patches. +EOM + exit 1 + ;; +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/hints/isc.sh b/hints/isc.sh new file mode 100644 index 0000000000..cdfe91c605 --- /dev/null +++ b/hints/isc.sh @@ -0,0 +1,44 @@ +# isc.sh +# Interactive Unix Versions 3 and 4. +# Compile perl entirely in posix mode. +# Andy Dougherty doughera@lafcol.lafayette.edu +# Wed Oct 5 15:57:37 EDT 1994 +# +# Use Configure -Dcc=gcc to use gcc +# + +# We don't want to explicitly mention -lc (since we're using POSIX mode.) +# We also don't want -lx (the Xenix compatability libraries.) The only +# thing that it seems to pick up is chsize(), which has been reported to +# not work. chsize() can also be implemented via fcntl() in perl (if you +# define -D_SYSV3). We'll leave in -lPW since it's harmless. Some +# extension might eventually need it for alloca, though perl doesn't use +# it. + +set `echo X "$libswanted "| sed -e 's/ c / /' -e 's/ x / /'` +shift +libswanted="$*" + +case "$cc" in +*gcc*) ccflags="$ccflags -posix" + ldflags="$ldflags -posix" + ;; +*) ccflags="$ccflags -Xp -D_POSIX_SOURCE" + ldflags="$ldflags -Xp" + ;; +esac + +# getsockname() and getpeername() return 256 for no good reason +ccflags="$ccflags -DBOGUS_GETNAME_RETURN=256" + +# rename(2) can't rename long filenames +d_rename=undef + +# for ext/IPC/SysV/SysV.xs +ccflags="$ccflags -DPERL_ISC" + +# You can also include -D_SYSV3 to pick up "traditionally visible" +# symbols hidden by name-space pollution rules. This raises some +# compilation "redefinition" warnings, but they appear harmless. +# ccflags="$ccflags -D_SYSV3" + diff --git a/hints/isc_2.sh b/hints/isc_2.sh new file mode 100644 index 0000000000..d8ca7dc63a --- /dev/null +++ b/hints/isc_2.sh @@ -0,0 +1,25 @@ +# isc_2.sh +# Interactive Unix Version 2.2 +# Compile perl entirely in posix mode. +# Andy Dougherty doughera@lafcol.lafayette.edu +# Wed Oct 5 15:57:37 EDT 1994 +# +# Use Configure -Dcc=gcc to use gcc +# +set `echo X "$libswanted "| sed -e 's/ c / /'` +shift +libswanted="$*" +case "$cc" in +*gcc*) ccflags="$ccflags -posix" + ldflags="$ldflags -posix" + ;; +*) ccflags="$ccflags -Xp -D_POSIX_SOURCE" + ldflags="$ldflags -Xp" + ;; +esac +# Compensate for conflicts in <net/errno.h> +doio_cflags='ccflags="$ccflags -DENOTSOCK=103"' +pp_sys_cflags='ccflags="$ccflags -DENOTSOCK=103"' + +# for ext/IPC/SysV/SysV.xs +ccflags="$ccflags -DPERL_ISC" diff --git a/hints/linux.sh b/hints/linux.sh new file mode 100644 index 0000000000..7dccc1cc07 --- /dev/null +++ b/hints/linux.sh @@ -0,0 +1,284 @@ +# hints/linux.sh +# Original version by rsanders +# Additional support by Kenneth Albanowski <kjahds@kjahds.com> +# +# ELF support by H.J. Lu <hjl@nynexst.com> +# Additional info from Nigel Head <nhead@ESOC.bitnet> +# and Kenneth Albanowski <kjahds@kjahds.com> +# +# Consolidated by Andy Dougherty <doughera@lafayette.edu> +# +# Updated Thu Feb 8 11:56:10 EST 1996 + +# Updated Thu May 30 10:50:22 EDT 1996 by <doughera@lafayette.edu> + +# Updated Fri Jun 21 11:07:54 EDT 1996 +# NDBM support for ELF renabled by <kjahds@kjahds.com> + +# No version of Linux supports setuid scripts. +d_suidsafe='undef' + +# Debian and Red Hat, and perhaps other vendors, provide both runtime and +# development packages for some libraries. The runtime packages contain shared +# libraries with version information in their names (e.g., libgdbm.so.1.7.3); +# the development packages supplement this with versionless shared libraries +# (e.g., libgdbm.so). +# +# If you want to link against such a library, you must install the development +# version of the package. +# +# These packages use a -dev naming convention in both Debian and Red Hat: +# libgdbmg1 (non-development version of GNU libc 2-linked GDBM library) +# libgdbmg1-dev (development version of GNU libc 2-linked GDBM library) +# So make sure that for any libraries you wish to link Perl with under +# Debian or Red Hat you have the -dev packages installed. +# +# Some operating systems (e.g., Solaris 2.6) will link to a versioned shared +# library implicitly. For example, on Solaris, `ld foo.o -lgdbm' will find an +# appropriate version of libgdbm, if one is available; Linux, however, doesn't +# do the implicit mapping. +ignore_versioned_solibs='y' + +# BSD compatability library no longer needed +# 'kaffe' has a /usr/lib/libnet.so which is not at all relevent for perl. +set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /'` +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.) +# 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 + +# The system malloc() is about as fast and as frugal as perl's. +# Since the system malloc() has been the default since at least +# 5.001, we might as well leave it that way. --AD 10 Jan 2002 +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac + +case "$optimize" in +'') # If we have modern enough gcc and well-supported enough CPU, + # crank up the optimization level. + case "`${cc:-gcc} -v 2>&1`" in + *"gcc version 2.95"*|*"gcc version 3."*) + case "`arch 2>&1`" in + i?86|ppc) optimize='-O3' ;; + esac + ;; + esac + case "$optimize" in + '') optimize='-O2' ;; + esac + ;; +esac + +# Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com> +# for this test. +cat >try.c <<'EOM' +/* Test for whether ELF binaries are produced */ +#include <fcntl.h> +#include <stdlib.h> +main() { + char buffer[4]; + int i=open("a.out",O_RDONLY); + if(i==-1) + exit(1); /* fail */ + if(read(i,&buffer[0],4)<4) + exit(1); /* fail */ + if(buffer[0] != 127 || buffer[1] != 'E' || + buffer[2] != 'L' || buffer[3] != 'F') + exit(1); /* fail */ + exit(0); /* succeed (yes, it's ELF) */ +} +EOM +if ${cc:-gcc} try.c >/dev/null 2>&1 && $run ./a.out; then + cat <<'EOM' >&4 + +You appear to have ELF support. I'll try to use it for dynamic loading. +If dynamic loading doesn't work, read hints/linux.sh for further information. +EOM + +else + cat <<'EOM' >&4 + +You don't have an ELF gcc. I will use dld if possible. If you are +using a version of DLD earlier than 3.2.6, or don't have it at all, you +should probably upgrade. If you are forced to use 3.2.4, you should +uncomment a couple of lines in hints/linux.sh and restart Configure so +that shared libraries will be disallowed. + +EOM + lddlflags="-r $lddlflags" + # These empty values are so that Configure doesn't put in the + # Linux ELF values. + ccdlflags=' ' + cccdlflags=' ' + ccflags="-DOVR_DBL_DIG=14 $ccflags" + so='sa' + dlext='o' + nm_so_opt=' ' + ## If you are using DLD 3.2.4 which does not support shared libs, + ## uncomment the next two lines: + #ldflags="-static" + #so='none' + + # In addition, on some systems there is a problem with perl and NDBM + # which causes AnyDBM and NDBM_File to lock up. This is evidenced + # in the tests as AnyDBM just freezing. Apparently, this only + # happens on a.out systems, so we disable NDBM for all a.out linux + # systems. If someone can suggest a more robust test + # that would be appreciated. + # + # More info: + # Date: Wed, 7 Feb 1996 03:21:04 +0900 + # From: Jeffrey Friedl <jfriedl@nff.ncl.omron.co.jp> + # + # I tried compiling with DBM support and sure enough things locked up + # just as advertised. Checking into it, I found that the lockup was + # during the call to dbm_open. Not *in* dbm_open -- but between the call + # to and the jump into. + # + # To make a long story short, making sure that the *.a and *.sa pairs of + # /usr/lib/lib{m,db,gdbm}.{a,sa} + # were perfectly in sync took care of it. + # + # This will generate a harmless Whoa There! message + case "$d_dbm_open" in + '') cat <<'EOM' >&4 + +Disabling ndbm. This will generate a Whoa There message in Configure. +Read hints/linux.sh for further information. +EOM + # You can override this with Configure -Dd_dbm_open + d_dbm_open=undef + ;; + esac +fi + +rm -f try.c a.out + +if /bin/sh -c exit; then + echo '' + echo 'You appear to have a working bash. Good.' +else + cat << 'EOM' >&4 + +*********************** Warning! ********************* +It would appear you have a defective bash shell installed. This is likely to +give you a failure of op/exec test #5 during the test phase of the build, +Upgrading to a recent version (1.14.4 or later) should fix the problem. +****************************************************** +EOM + +fi + +# On SPARClinux, +# The following csh consistently coredumped in the test directory +# "/home/mikedlr/perl5.003_94/t", though not most other directories. + +#Name : csh Distribution: Red Hat Linux (Rembrandt) +#Version : 5.2.6 Vendor: Red Hat Software +#Release : 3 Build Date: Fri May 24 19:42:14 1996 +#Install date: Thu Jul 11 16:20:14 1996 Build Host: itchy.redhat.com +#Group : Shells Source RPM: csh-5.2.6-3.src.rpm +#Size : 184417 +#Description : BSD c-shell + +# For this reason I suggest using the much bug-fixed tcsh for globbing +# where available. + +# November 2001: That warning's pretty old now and probably not so +# relevant, especially since perl now uses File::Glob for globbing. +# We'll still look for tcsh, but tone down the warnings. +# Andy Dougherty, Nov. 6, 2001 +if $csh -c 'echo $version' >/dev/null 2>&1; then + echo 'Your csh is really tcsh. Good.' +else + if xxx=`./UU/loc tcsh blurfl $pth`; $test -f "$xxx"; then + echo "Found tcsh. I'll use it for globbing." + # We can't change Configure's setting of $csh, due to the way + # Configure handles $d_portable and commands found in $loclist. + # We can set the value for CSH in config.h by setting full_csh. + full_csh=$xxx + elif [ -f "$csh" ]; then + echo "Couldn't find tcsh. Csh-based globbing might be broken." + fi +fi + +# Shimpei Yamashita <shimpei@socrates.patnet.caltech.edu> +# Message-Id: <33EF1634.B36B6500@pobox.com> +# +# The DR2 of MkLinux (osname=linux,archname=ppc-linux) may need +# special flags passed in order for dynamic loading to work. +# instead of the recommended: +# +# ccdlflags='-rdynamic' +# +# it should be: +# ccdlflags='-Wl,-E' +# +# So if your DR2 (DR3 came out summer 1998, consider upgrading) +# has problems with dynamic loading, uncomment the +# following three lines, make distclean, and re-Configure: +#case "`uname -r | sed 's/^[0-9.-]*//'``arch`" in +#'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' +case "$usethreads" in +$define|true|[yY]*) + ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags" + set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` + shift + libswanted="$*" + + # Somehow at least in Debian 2.2 these manage to escape + # the #define forest of <features.h> and <time.h> so that + # the hasproto macro of Configure doesn't see these protos, + # even with the -D_GNU_SOURCE. + + d_asctime_r_proto="$define" + d_crypt_r_proto="$define" + d_ctime_r_proto="$define" + d_gmtime_r_proto="$define" + d_localtime_r_proto="$define" + d_random_r_proto="$define" + + ;; +esac +EOCBU + +cat > UU/uselargefiles.cbu <<'EOCBU' +# This script UU/uselargefiles.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use large files. +case "$uselargefiles" in +''|$define|true|[yY]*) +# Keep this in the left margin. +ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + + ccflags="$ccflags $ccflags_uselargefiles" + ;; +esac +EOCBU diff --git a/hints/lynxos.sh b/hints/lynxos.sh new file mode 100644 index 0000000000..0023e831b0 --- /dev/null +++ b/hints/lynxos.sh @@ -0,0 +1,19 @@ +# +# LynxOS hints +# +# 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/hints/machten.sh b/hints/machten.sh new file mode 100644 index 0000000000..3a311a1746 --- /dev/null +++ b/hints/machten.sh @@ -0,0 +1,279 @@ +#! /bin/bash +# machten.sh +# 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. +# +# 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> +# +# Deny system's false claims to support mmap() and munmap(); note +# also that Sys V IPC (re)disabled by jhi due to continuing inadequacy +# -- Dominic Dunlop <domo@computer.org> 001111 +# 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. +# -- Dominic Dunlop <domo@computer.org> 9800802 +# Completely disable SysV IPC pending more complete support from Tenon +# -- Dominic Dunlop <domo@computer.org> 980712 +# Use vfork and perl's malloc by default +# -- Dominic Dunlop <domo@computer.org> 980630 +# Raise perl's stack size again; cut down reg_infty; document +# -- Dominic Dunlop <domo@computer.org> 980619 +# Use of semctl() can crash system: disable -- Dominic Dunlop 980506 +# Raise stack size further; slight tweaks to accomodate MT 4.1 +# -- Dominic Dunlop <domo@computer.org> 980211 +# Raise perl's stack size -- Dominic Dunlop <domo@tcp.ip.lu> 970922 +# Reinstate sigsetjmp iff version is 4.0.3 or greater; use nm +# (assumes Configure change); prune libswanted -- Dominic Dunlop 970113 +# Warn about test failure due to old Berkeley db -- Dominic Dunlop 970105 +# Do not use perl's malloc; SysV IPC OK -- Neil Cutcliffe, Tenon 961030 +# File::Find's use of link count disabled by Dominic Dunlop 960528 +# Perl's use of sigsetjmp etc. disabled by Dominic Dunlop 960521 +# +# Comments, questions, and improvements welcome! +# +# MachTen 4.1.1's support for shadow password file access is incomplete: +# disable its use completely. +d_getspnam=${d_getspnam:-undef} + +# MachTen 4.1.1 does support dynamic loading, but perl doesn't +# know how to use it yet. +usedl=${usedl:-undef} + +# MachTen 4.1.1 may have an unhelpful hack in /usr/include/signal.h. +# Undo it if so. +if grep NOTDEF_MACHTEN /usr/include/signal.h > /dev/null +then + ccflags="$ccflags -DNOTDEF_MACHTEN" +fi + +# Power MachTen is a real memory system and its standard malloc +# has been optimized for this. Using this malloc instead of Perl's +# malloc may result in significant memory savings. In particular, +# unlike most UNIX memory allocation subsystems, MachTen's free() +# really does return unneeded process data memory to the system. +# However, MachTen's malloc() is woefully slow -- maybe 100 times +# slower than perl's own, so perl's own is usually the better +# choice. In order to use perl's malloc(), the sbrk() system call +# must be simulated using MachTen's malloc(). See malloc.c for +# precise details of how this is achieved. Recent improvements +# to perl's malloc() currently crash MachTen, and so are disabled +# 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$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 +# expensive. Using vfork() where appropriate avoids this cost. +d_vfork=${d_vfork:-define} + +# Specify a high level of optimization (-O3 wouldn't do much more) +optimize=${optimize:--O2 -fomit-frame-pointer} + +# Make symbol table listings les voluminous +nmopts=-gp + +# Set reg_infty -- the maximum allowable number of repeats in regular +# expressions such as /a{1,$max_repeats}/, and the maximum number of +# times /a*/ will match. Setting this too high without having a stack +# large enough to accommodate deep recursion in the regular expression +# engine allows perl to crash your Mac due to stack overrun if it +# encounters a pathological regular expression. The default is a +# compromise between capability and required stack size (see below). +# You may override the default value from the Configure command-line +# like this: +# +# Configure -Dreg_infty=16368 ... + +reg_infty=${reg_infty:-2047} + +# If you want to have many perl processes active simultaneously -- +# processing CGI forms -- for example, you should opt for a small stack. +# For safety, you should set reg_infty no larger than the corresponding +# value given in this table: +# +# Stack size reg_infty value supported +# ---------- ------------------------- +# 128k 2**8-1 (256) +# 256k 2**9-1 (511) +# 512k 2**10-1 (1023) +# 1M 2**11-1 (2047) +# ... +# 16M 2**15-1 (32767) (perl's default value) + +# This script selects a safe stack size based on the value of reg_infty +# specified above. However, you may choose to take a risk and set +# stack size lower: pathological regular expressions are rare in real-world +# programs. But be aware that, if perl does encounter one, it WILL +# crash your system. Do not set stack size lower than 96k unless +# you want perl's installation tests ( make test ) to crash your system. +# +# You may override the default value from the Configure command-line +# by specifying the required size in kilobytes like this: +# +# Configure -Dstack_size=96 + +if [ "X$stack_size" = 'X' ] +then + stack_size=128 + X=`expr $reg_infty / 256` + + while [ $X -gt 0 ] + do + X=`expr $X / 2` + stack_size=`expr $stack_size \* 2` + done + X=`expr $stack_size \* 1024` +fi + +ldflags="$ldflags -Xlstack=$X" +ccflags="$ccflags -DREG_INFTY=$reg_infty" + +# Install in /usr/local by default +prefix='/usr/local' + +# At least on PowerMac, doubles must be aligned on 8 byte boundaries. +# I don't know if this is true for all MachTen systems, or how to +# determine this automatically. +alignbytes=8 + +# 4.0.2 and earlier had a problem with perl's use of sigsetjmp and +# friends. Use setjmp and friends instead. +expr "$osvers" \< "4.0.3" > /dev/null && d_sigsetjmp='undef' + +# 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 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 + +# MachTen has stubs for mmap and munmap(), but they just result in the +# caller being killed on the grounds of "Bad system call" +d_mmap=${d_mmap:-undef} +d_munmap=${d_munmap:-undef} + +# Get rid of some extra libs which it takes Configure a tediously +# 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/ dl / /' -e 's/ dld / /' \ + -e 's/ ucb / /' -e 's/ bsd / /' -e 's/ BSD / /' -e 's/ PW / /'` +shift +libswanted="$*" + +# While link counts on MachTen 4.1's fast file systems work correctly, +# on Macintosh Heirarchical File Systems, (and on HFS+) +# MachTen always reports ony two links to directories, even if they +# contain subdirectories. Consequently, we use this variable to stop +# File::Find using the link count to determine whether there are +# subdirectories to be searched. This will generate a harmless message: +# Hmm...You had some extra variables I don't know about...I'll try to keep 'em. +# Propagating recommended variable dont_use_nlink +dont_use_nlink=define + +cat <<EOM >&4 + +During Configure, you may see the message + +*** WHOA THERE!!! *** + The recommended value for \$d_msg on this machine was "undef"! + Keep the recommended value? [y] + +as well as similar messages concerning \$d_sem and \$d_shm. Select the +default answers: MachTen 4.1 appears to provide System V IPC support, +but it is incomplete and buggy: perl should be built without it. +Similar considerations apply to memory mapping of files, controlled +by \$d_mmap and \$d_munmap. + +Similarly, when you see + +*** WHOA THERE!!! *** + The recommended value for \$d_vfork on this machine was "define"! + Keep the recommended value? [y] + +select the default answer: vfork() works, and avoids expensive data +copying. + +You may also see "WHOA THERE!!!" messages concerning \$d_getspnam. +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. + Propagating recommended variable dont_use_nlink + 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 +expression repeat count limit of $reg_infty. If you want alternative +values, see the file hints/machten.sh for advice on how to change them. + +Tests + io/fs test 4 and + op/stat test 3 +may fail since MachTen may not return a useful nlinks field to stat +on directories. + +EOM +expr "$osvers" \< "4.1" >/dev/null && test -r ./broken-db.msg && \ + . ./broken-db.msg + +unset stack_size X diff --git a/hints/machten_2.sh b/hints/machten_2.sh new file mode 100644 index 0000000000..bc7dde4e3f --- /dev/null +++ b/hints/machten_2.sh @@ -0,0 +1,94 @@ +# machten.sh +# This file has been put together by Mark Pease <peasem@primenet.com> +# Comments, questions, and improvements welcome! +# +# MachTen does not support dynamic loading. If you wish to, you +# can fetch, compile, and install the dld package. +# This ought to work with the ext/DynaLoader/dl_dld.xs in the +# perl5 package. Have fun! +# Some possible locations for dld: +# ftp-swiss.ai.mit.edu:pub/scm/dld-3.2.7.tar.gz +# prep.ai.mit.edu:/pub/gnu/jacal/dld-3.2.7.tar.gz +# ftp.cs.indiana.edu:/pub/scheme-repository/imp/SCM-support/dld-3.2.7.tar.gz +# tsx-11.mit.edu:/pub/linux/sources/libs/dld-3.2.7.tar.gz +# +# Original version was for MachTen 2.1.1. +# Last modified by Andy Dougherty <doughera@lafcol.lafayette.edu> +# Tue Aug 13 12:31:01 EDT 1996 +# +# Warning about tests which no longer fail +# fixed by Tom Phoenix <rootbeer@teleport.com> +# March 5, 1997 +# +# Locale, optimization, and malloc changes by Tom Phoenix Mar 15, 1997 +# +# groupstype change and note about t/lib/findbin.t by Tom, Mar 24, 1997 + +# MachTen's ability to have valid filepaths beginning with "//" may +# be causing lib/FindBin.pm to fail. I don't know how to fix it, but +# the reader is encouraged to do so! :-) -- Tom + +# There seem to be some hard-to-diagnose problems under MachTen's +# malloc, so we'll use Perl's. If you have problems which Perl's +# malloc's diagnostics can't help you with, you may wish to use +# MachTen's malloc after all. +case "$usemymalloc" in +'') usemymalloc='y' ;; +esac + +# I (Tom Phoenix) don't know how to test for locales on MachTen. (If +# you do, please fix this hints file!) But since mine didn't come +# with locales working out of the box, I'll assume that's the case +# for most folks. +case "$d_setlocale" in +'') d_setlocale=undef +esac + +# MachTen doesn't have secure setid scripts +d_suidsafe='undef' + +# groupstype should be gid_t, as near as I can tell, but it only +# seems to work right when it's int. +groupstype='int' + +case "$optimize" in +'') optimize='-O2' ;; +esac + +so='none' +# These are useful only if you have DLD, but harmless otherwise. +# Make sure gcc doesn't use -fpic. +cccdlflags=' ' # That's an empty space. +lddlflags='-r' +dlext='o' + +# MachTen does not support POSIX enough to compile the POSIX module. +useposix=false + +#MachTen might have an incomplete Berkeley DB implementation. +i_db=$undef + +#MachTen versions 2.X have no hard links. This variable is used +# by File::Find. +# This will generate a harmless message: +# Hmm...You had some extra variables I don't know about...I'll try to keep 'em. +# Propagating recommended variable dont_use_nlink +# Without this, tests io/fs #4 and op/stat #3 will fail. +dont_use_nlink=define + +cat <<'EOM' >&4 + +During Configure, you may get two "WHOA THERE" messages, for $d_setlocale +and $i_db being 'undef'. You may keep the undef value. + +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. + Propagating recommended variable dont_use_nlink + +Read the File::Find documentation for more information. + +It's possible that test t/lib/findbin.t will fail on some configurations +of MachTen. + +EOM diff --git a/hints/mint.sh b/hints/mint.sh new file mode 100644 index 0000000000..b9a7886f9a --- /dev/null +++ b/hints/mint.sh @@ -0,0 +1,94 @@ +# hints/mint.sh +# +# talk to gufl0000@stud.uni-sb.de if you want to change this file. +# Please read the README.mint file. +# +# misc stuff + +case `uname -m` in + atarist*) archname="m68000-mint" + ;; + *) archname="m68k-mint" + ;; +esac + +here=`pwd | tr -d '\015'` + +cc='gcc' + +# The weird include path is really to work around some bugs in +# broken system header files. +ccflags="$ccflags -D__MINT__ -Uatarist -DDEBUGGING -I$here/../mint" + +# libs + +libpth="$prefix/lib /usr/lib /usr/local/lib" +glibpth="$libpth" +xlibpth="$libpth" + +libswanted='gdbm socket port m' +so='none' + +# +# compiler & linker flags +# +optimize='-O2 -fomit-frame-pointer -fno-defer-pop -fstrength-reduce' + +# The setlocale function in the MiNTLib is actually a bad joke. We +# lend a workaround from Ultrix. If neither LC_ALL nor LANG is +# set in the environment, perl won't complain. If one is set to +# anything but "C" you will see a warning. Note that you can +# still use the GNU extension "$LANGUAGE" if you want to use +# the i18n features of some GNU packages. +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' +usevfork='true' +d_fsetpos='fpos_t' +gidtype='gid_t' +groupstype='gid_t' +lseektype='long' +modetype='mode_t' +sizetype='size_t' +timetype='time_t' +uidtype='uid_t' + +# Don't remove that leading tab character (Configure Black Magic (TM)). + broken_pwd= +case "`/bin/pwd|tr -d xy|tr '\015\012' 'xy'`" in +*xy) broken_pwd=yes ;; +esac + +if test X"$broken_pwd" = Xyes +then + echo " " + echo "*** Building fixed 'pwd'... (as described in README.mint) ***" + echo " " + cd mint + make pwd + cd .. + if test -x mint/pwd -a -w /usr/bin + then + echo " " + echo "*** Installing fixed 'pwd'... ***" + echo " " + cd mint + make install + cd .. + if cmp -s mint/pwd /usr/bin/pwd + then + echo "*** Installed fixed 'pwd' successfully. ***" + else + echo "*** Failed to install fixed 'pwd'. Aborting. ***" + exit 1 + fi + else + echo "*** Cannot install fixed 'pwd'. Aborting. ***" + exit 1 + fi +fi diff --git a/hints/mips.sh b/hints/mips.sh new file mode 100644 index 0000000000..bc0b7e8073 --- /dev/null +++ b/hints/mips.sh @@ -0,0 +1,14 @@ +perl_cflags='optimize="-g"' +d_volatile=undef +d_castneg=undef +cc=cc +glibpth="/usr/lib/cmplrs/cc $glibpth" +groupstype=int +nm_opt='-B' +case $PATH in +*bsd*:/bin:*) cat <<END >&4 +NOTE: Some people have reported having much better luck with Mips CC than +with the BSD cc. Put /bin first in your PATH if you have difficulties. +END +;; +esac diff --git a/hints/mpc.sh b/hints/mpc.sh new file mode 100644 index 0000000000..da6fcc95b0 --- /dev/null +++ b/hints/mpc.sh @@ -0,0 +1 @@ +ccflags="$ccflags -X18" diff --git a/hints/mpeix.sh b/hints/mpeix.sh new file mode 100644 index 0000000000..5126bcf3b8 --- /dev/null +++ b/hints/mpeix.sh @@ -0,0 +1,163 @@ +# The MPE/iX linker doesn't complain about unresolved symbols, and so the only +# way to test for unresolved symbols in a program is by attempting to run it. +# But this is slow, and fraught with problems, so the better solution is to use +# nm. +# +# MPE/iX lacks a fully functional native nm, so we need to use our fake nm +# script which will extract the symbol info from the native link editor and +# reformat into something nm-like. +# +# Created for 5.003 by Mark Klein, mklein@dis.com. +# Substantially revised for 5.004_01 by Mark Bixby, markb@cccd.edu. +# Revised again for 5.004_69 by Mark Bixby, markb@cccd.edu. +# Revised for 5.6.0 by Mark Bixby, mbixby@power.net. +# Revised for 5.7.3 by Mark Bixby, mark@bixby.org. +# Revised for 5.8.0 by Mark Bixby, mark@bixby.org. +# +osname='mpeix' +osvers=`uname -r | sed -e 's/.[A-Z]\.\([0-9]\)\([0-9]\)\.[0-9][0-9]/\1.\2/'` +# +# Force Configure to use our wrapper mpeix/nm script +# +PATH="$PWD/mpeix:$PATH" +nm="$PWD/mpeix/nm" +_nm=$nm +nm_opt='-configperl' +usenm='true' +# +# Work around the broken inline cat bug that corrupts here docs +# +alias -x cat=/bin/cat +# +# Various directory locations. +# +# Which ones of these does Configure get wrong? +test -z "$prefix" && prefix="/$HPACCOUNT/$HPGROUP" +archname='PA-RISC1.1' +bin="$prefix" +installman1dir="$prefix/man/man1" +installman3dir="$prefix/man/man3" +man1dir="$prefix/man/man1" +man3dir="$prefix/man/man3" +perlpath="$prefix/PERL" +scriptdir="$prefix" +startperl="#!$prefix/perl" +startsh='#!/bin/sh' +# +# Compiling. +# +test -z "$cc" && cc='gcc' +cccdlflags='none' +ccflags="$ccflags -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -D_POSIX_JOB_CONTROL -DIS_SOCKET_CLIB_ITSELF" +locincpth="$locincpth /usr/local/include /usr/contrib/include /BINDFW/CURRENT/include /SYSLOG/PUB" +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' +# Delete bsd and BSD from the library list. Remove other randomly ordered +# libraries and then re-add them in their proper order (the MPE linker is +# order-sensitive). Add additional MPE-specific libraries. +for mpe_remove in bind bsd BSD c curses m socket str svipc syslog; do + set `echo " $libswanted " | sed -e 's/ / /g' -e "s/ $mpe_remove //"` + libswanted="$*" +done +libswanted="$libswanted bind syslog curses svipc socket str m c" +loclibpth="$loclibpth /usr/local/lib /usr/contrib/lib /BINDFW/CURRENT/lib /SYSLOG/PUB" +# +# External functions and data items. +# +# Q: Does Configure *really* get *all* of these wrong? +# +# A: Yes. There are two MPE problems here. The 'undef' functions exist on MPE, +# but are merely dummy routines that return ENOTIMPL or ESYSERR. Since they're +# useless, let's just tell Perl to avoid them. Also, a few data items are +# 'undef' because while they may exist in structures, they are uninitialized. +# +# The 'define' cases are a bit weirder. MPE has a libc.a, libc.sl, and two +# special kernel shared libraries, /SYS/PUB/XL and /SYS/PUB/NL. Much of what +# is in libc.a is duplicated within XL and NL, so when we created libc.sl, we +# omitted the duplicated functions. Since Configure end ups scanning libc.sl, +# we need to 'define' the functions that had been removed. +# +# We don't want to scan XL or NL because we would find way too many POSIX or +# Unix named functions that are really vanilla MPE functions that do something +# completely different than on POSIX or Unix. +d_crypt='define' +d_dbmclose='undef' +d_difftime='define' +d_dlerror='undef' +d_dlopen='undef' +d_Gconvert='gcvt((x),(n),(b))' +d_getnbyaddr='define' +d_getnbyname='define' +d_getpbyname='define' +d_getpbynumber='define' +d_getsbyname='define' +d_getsbyport='define' +d_gettimeod='undef' +d_inetaton='undef' +d_link='undef' +d_mblen='define' +d_mbstowcs='define' +d_mbtowc='define' +d_memchr='define' +d_memcmp='define' +d_memcpy='define' +d_memmove='define' +d_memset='define' +d_pwage='undef' +d_pwcomment='undef' +d_pwgecos='undef' +d_pwpasswd='undef' +d_setegid='undef' +d_seteuid='undef' +d_setitimer='undef' +d_setpgid='undef' +d_setsid='undef' +d_setvbuf='define' +d_statblks='undef' +d_strchr='define' +d_strcoll='define' +d_strerrm='strerror(e)' +d_strerror='define' +d_strtod='define' +d_strtol='define' +d_strtoul='define' +d_strxfrm='define' +d_syserrlst='define' +d_time='define' +d_wcstombs='define' +d_wctomb='define' +# +# Include files. +# +i_gdbm='undef' # the port is currently incomplete +i_termios='undef' # we have termios, but not the full set (just tcget/setattr) +i_time='define' +i_systime='undef' +i_systimek='undef' +timeincl='/usr/include/time.h' +# +# Data types. +# +timetype='time_t' +# +# Functionality. +# +uselargefiles="$undef" +# +# Expected functionality provided in mpeix.c. +# +archobjs='mpeix.o' + +# Help gmake find mpeix.c +test -h mpeix.c || ln -s mpeix/mpeix.c mpeix.c + +d_gettimeod='define' +d_truncate='define' diff --git a/hints/ncr_tower.sh b/hints/ncr_tower.sh new file mode 100644 index 0000000000..7ddb9230e9 --- /dev/null +++ b/hints/ncr_tower.sh @@ -0,0 +1,16 @@ +# For SysV release 2, there are no directory functions defined. To +# prevent compile errors, acquire the functions written by Doug Gwynn. +# They are contained in dirent.tar.gz and can be accessed from gnu +# repositories, as well as other places. +# +# The following hints have been verified to work with PERL5 (001m) on +# SysVr2 with the following caveat(s): +# 1. Maximum User program space (MAXSPACE) must be at least 2MB. +# 2. The directory functions mentioned above have been installed. +# +optimize='-O0' +ccflags="$ccflags -W2,-Sl,1500 -W0,-Sp,350,-Ss,2500 -Wp,-Sd,30" +d_mkdir=$undef +usemymalloc='y' +useposix='false' +so='none' diff --git a/hints/netbsd.sh b/hints/netbsd.sh new file mode 100644 index 0000000000..741413ed4f --- /dev/null +++ b/hints/netbsd.sh @@ -0,0 +1,146 @@ +# hints/netbsd.sh +# +# Please check with packages@netbsd.org before making modifications +# to this file. + +case "$archname" in +'') + archname=`uname -m`-${osname} + ;; +esac + +# NetBSD keeps dynamic loading dl*() functions in /usr/lib/crt0.o, +# so Configure doesn't find them (unless you abandon the nm scan). +# Also, NetBSD 0.9a was the first release to introduce shared +# libraries. +# +case "$osvers" in +0.9|0.8*) + usedl="$undef" + ;; +*) + case `uname -m` in + pmax) + # NetBSD 1.3 and 1.3.1 on pmax shipped an `old' ld.so, + # which will not work. + case "$osvers" in + 1.3|1.3.1) + d_dlopen=$undef + ;; + esac + ;; + esac + if test -f /usr/libexec/ld.elf_so; then + # ELF + d_dlopen=$define + d_dlerror=$define + cccdlflags="-DPIC -fPIC $cccdlflags" + lddlflags="--whole-archive -shared $lddlflags" + rpathflag="-Wl,-rpath," + # + # Include the whole libgcc.a into the perl executable so + # that certain symbols needed by loadable modules built as + # C++ objects (__eh_alloc, __pure_virtual, etc.) will always + # be defined. + # + # XXX This should be obsoleted by gcc-3.0. + # + ccdlflags="-Wl,-whole-archive -lgcc -Wl,-no-whole-archive \ + -Wl,-E $ccdlflags" + elif test -f /usr/libexec/ld.so; then + # a.out + d_dlopen=$define + d_dlerror=$define + cccdlflags="-DPIC -fPIC $cccdlflags" + lddlflags="-Bshareable $lddlflags" + rpathflag="-R" + else + d_dlopen=$undef + rpathflag= + fi + ;; +esac + +# netbsd had these but they don't really work as advertised, in the +# versions listed below. if they are defined, then there isn't a +# way to make perl call setuid() or setgid(). if they aren't, then +# ($<, $>) = ($u, $u); will work (same for $(/$)). this is because +# you can not change the real userid of a process under 4.4BSD. +# netbsd fixed this in 1.3.2. +case "$osvers" in +0.9*|1.[012]*|1.3|1.3.1) + d_setregid="$undef" + d_setreuid="$undef" + ;; +esac + +# These are obsolete in any netbsd. +d_setrgid="$undef" +d_setruid="$undef" + +# there's no problem with vfork. +usevfork=true + +# This is there but in machine/ieeefp_h. +ieeefp_h="define" + +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +cat > UU/usethreads.cbu <<'EOCBU' +case "$usethreads" in +$define|true|[yY]*) + lpthread= + for xxx in pthread; do + for yyy in $loclibpth $plibpth $glibpth dummy; do + zzz=$yyy/lib$xxx.a + if test -f "$zzz"; then + lpthread=$xxx + break; + fi + zzz=$yyy/lib$xxx.so + if test -f "$zzz"; then + lpthread=$xxx + break; + fi + zzz=`ls $yyy/lib$xxx.so.* 2>/dev/null` + if test "X$zzz" != X; then + lpthread=$xxx + break; + fi + done + if test "X$lpthread" != X; then + break; + fi + done + if test "X$lpthread" != X; then + # Add -lpthread. + libswanted="$libswanted $lpthread" + # There is no libc_r as of NetBSD 1.5.2, so no c -> c_r. + # This will be revisited when NetBSD gains a native pthreads + # implementation. + else + echo "$0: No POSIX threads library (-lpthread) found. " \ + "You may want to install GNU pth. Aborting." >&4 + exit 1 + fi + unset lpthread + ;; +esac +EOCBU + +# Set sensible defaults for NetBSD: look for local software in +# /usr/pkg (NetBSD Packages Collection) and in /usr/local. +# +loclibpth="/usr/pkg/lib /usr/local/lib" +locincpth="/usr/pkg/include /usr/local/include" +case "$rpathflag" in +'') + ldflags= + ;; +*) + ldflags= + for yyy in $loclibpth; do + ldflags="$ldflags $rpathflag$yyy" + done + ;; +esac diff --git a/hints/newsos4.sh b/hints/newsos4.sh new file mode 100644 index 0000000000..5cbcc531e2 --- /dev/null +++ b/hints/newsos4.sh @@ -0,0 +1,33 @@ +# +# hints file for NEWS-OS 4.x +# + +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 ' 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 libdbm.a /lib (copy newer one)' +echo ' ranlib /lib/libdbm.a (ranlib for later use)' +echo + +# No shared library. +so='none' +# Umm.. I like gcc. +cc='gcc' +# Configure does not find out where is libm. +plibpth='/usr/lib/cmplrs/cc' +# times() returns 'struct tms' +clocktype='struct tms' +# getgroups(2) returns integer (not gid_t) +groupstype='int' +# time(3) returns long (not time_t) +timetype='long' +# filemode type is int (not mode_t) +modetype='int' +# using sprintf(3) instead of gcvt(3) +gconvert_preference=sprintf +# No POSIX. +useposix='false' diff --git a/hints/next_3.sh b/hints/next_3.sh new file mode 100644 index 0000000000..d142de5e76 --- /dev/null +++ b/hints/next_3.sh @@ -0,0 +1,141 @@ +# This file has been put together by Anno Siegel <siegel@zrz.TU-Berlin.DE>, +# Andreas Koenig <k@franz.ww.TU-Berlin.DE> and Gerd Knops <gerti@BITart.com>. +# Comments, questions, and improvements welcome! +# +# These hints work for NeXT 3.2 and 3.3. 3.0 has its own +# special hint file. +# + +###################################################################### +# THE MALLOC STORY +###################################################################### +# 1994: +# the simple program `for ($i=1;$i<38771;$i++){$t{$i}=123}' fails +# with Larry's malloc on NS 3.2 due to broken sbrk() +# +# setting usemymalloc='n' was the solution back then. Later came +# reports that perl would run unstable on 3.2: +# +# 1996: +# From about perl5.002beta1h perl became unstable on the +# NeXT. Intermittent coredumps were frequent on 3.2 OS. There were +# reports, that the developer version of 3.3 didn't have problems, so it +# seemed pretty obvious that we had to work around an malloc bug in 3.2. +# This hints file reflects a patch to perl5.002_01 that introduces a +# home made sbrk routine (remember, NeXT's sbrk _never_ worked). This +# sbrk makes it possible to run perl with its own malloc. Thanks to +# Ilya who showed me the way to his sbrk for OS/2!! +# +# The whole malloc desaster lead to a failing gdbm test. It is far +# beyond my understanding, why GDBM_File breaks with the "fix", but in +# general I consider it better to have a working perl with broken GDBM +# 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' +# from the ccflags and set usemymalloc to 'n'. +# +# 1997: +# From perl5.003_22 the malloc bug has no impact any more. We can run +# a perl without a special sbrk. Apparently Chip Salzenberg, the hero +# of 5.004 anyway, earned another trophy during Australien Open. +# +# 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' +#usemymalloc='y' +# use the following two lines if you have perl5.003_22 or better and +# do not encounter intermittent core dumps. + +ccflags="$ccflags -DUSE_NEXT_CTYPE" +usemymalloc='n' + +###################################################################### +# End of the MALLOC story +###################################################################### + +ldflags='-u libsys_s' +libswanted='dbm gdbm db' + +lddlflags='-nostdlib -r' +# Give cccdlflags an empty value since Configure will detect we are +# using GNU cc and try to specify -fpic for cccdlflags. +cccdlflags=' ' + +###################################################################### +# MAB support +###################################################################### +# By default we will build for all architectures your development +# environment supports. If you only want to build for the platform +# you are on, simply comment or remove the line below. +# +# If you want to build for specific architectures, change the line +# below to something like +# +# archs='m68k i386' +# +archs=`/bin/lipo -info /usr/lib/libm.a | sed -n 's/^[^:]*:[^:]*: //p'` + +# +# leave the following part alone +# +archcount=`echo $archs |wc -w` +if [ $archcount -gt 1 ] +then + for d in $archs + do + mabflags="$mabflags -arch $d" + done + ccflags="$ccflags $mabflags" + ldflags="$ldflags $mabflags" + lddlflags="$lddlflags $mabflags" + archname='next-fat' +fi +###################################################################### +# END MAB support +###################################################################### +ld='cc' + +i_utime='undef' +groupstype='int' +direntrytype='struct direct' +d_strcoll='undef' +d_uname='define' +# +# At least on m68k there are situations when memcmp doesn't behave +# as expected. So we'll use perl's memcmp. +# +d_sanemcmp='undef' +# setpgid() is in the posix library, but we don't use -posix, so +# we don't see it. ext/POSIX/POSIX.xs *does* use -posix, so +# setpgid is still available as POSIX::setpgid. +# See ext/POSIX/POSIX/hints/next.pl. +d_setpgid='undef' +d_setsid='define' +d_tcgetpgrp='define' +d_tcsetpgrp='define' + +# +# On some NeXT machines, the timestamp put by ranlib is not correct, and +# this may cause useless recompiles. Fix that by adding a sleep before +# running ranlib. The '5' is an empirical number that's "long enough." +# +ranlib='sleep 5; /bin/ranlib' + +# +# There where reports that the compiler on HPPA machines +# fails with the -O flag on pp.c. +# Compiling pp.c with -O for HPPA machines results in a broken perl. +# This is true whether we're on an HPPA machine or cross-compiling +# for one. +pp_cflags='optimize=""' + +# The SysV IPC is optional (ftp://ftp.nluug.nl/pub/comp/next/SysVIPC/) +# Gerben_Wierda@RnA.nl +if [ -f /usr/local/lib/libIPC.a ]; then + libswanted="$libswanted IPC" + # As of Sep 1998 d_msg wasn't supported in that library, + # only d_sem and d_shm, but Configure should be able to + # figure that out. --jhi + # Note also the next3 ext/IPC/SysV hints file. +fi diff --git a/hints/next_3_0.sh b/hints/next_3_0.sh new file mode 100644 index 0000000000..b444578830 --- /dev/null +++ b/hints/next_3_0.sh @@ -0,0 +1,53 @@ +# This file has been put together by Anno Siegel <siegel@zrz.TU-Berlin.DE> +# and Andreas Koenig <k@franz.ww.TU-Berlin.DE>. Comments, questions, and +# improvements welcome! + +# This file was modified to work on NS 3.0 by Kevin White +# <klwhite@magnus.acs.ohio-state.edu>, based on suggestions by Andreas +# Koenig and Andy Dougherty. + +echo With NS 3.0 you won\'t be able to use the POSIX module. >&4 +echo Be aware that some of the tests that are run during \"make test\" >&4 +echo will fail due to the lack of POSIX support on this system. >&4 +echo >&4 +echo Also, if you have the GDBM installed, make sure the header file >&4 +echo is located at a place on the system where the C compiler will >&4 +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="$ccflags -DUSE_NEXT_CTYPE -DNEXT30_NO_ATTRIBUTE" +POSIX_cflags='ccflags="-posix $ccflags"' +useposix='undef' +ldflags="$ldflags -u libsys_s" +libswanted="$libswanted dbm gdbm db" +# +lddlflags='-r' +# Give cccdlflags an empty value since Configure will detect we are +# using GNU cc and try to specify -fpic for cccdlflags. +cccdlflags=' ' +# +i_utime='undef' +groupstype='int' +direntrytype='struct direct' +d_strcoll='undef' +# the simple program `for ($i=1;$i<38771;$i++){$t{$i}=123}' fails +# with Larry's malloc on NS 3.2 due to broken sbrk() +usemymalloc='n' +d_uname='define' + +# Thanks to Etienne Grossman <etienne@isr.isr.ist.utl.pt> for sending +# the correct values for perl5.003_11 for the following 4 +# variables. For older version all four were defined. +d_setsid='undef' +d_tcgetpgrp='undef' +d_tcsetpgrp='undef' +d_setpgid='undef' + +# +# On some NeXT machines, the timestamp put by ranlib is not correct, and +# this may cause useless recompiles. Fix that by adding a sleep before +# 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' + diff --git a/hints/next_4.sh b/hints/next_4.sh new file mode 100644 index 0000000000..d5c8ba7d64 --- /dev/null +++ b/hints/next_4.sh @@ -0,0 +1,102 @@ +# Posix support has been removed from NextStep +# +useposix='undef' + +libpth='/lib /usr/lib /usr/local/lib' +libswanted=' ' +libc='/NextLibrary/Frameworks/System.framework/System' + +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' + +###################################################################### +# MAB support +###################################################################### +# By default we will build for all architectures your development +# environment supports. If you only want to build for the platform +# you are on, simply comment or remove the line below. +# +# If you want to build for specific architectures, change the line +# below to something like +# +# archs='m68k i386' +# + +# On m68k machines, toke.c cannot be compiled at all for i386 and it can +# only be compiled for m68k itself without optimization (this is under +# OPENSTEP 4.2). +# +if [ `hostinfo | grep 'NeXT Mach.*:' | sed 's/.*RELEASE_//'` = M68K ] +then + echo "Cross compilation is impossible on m68k hardware under OS 4" + echo "Forcing architecture to m68k only" + toke_cflags='optimize=""' + archs='m68k' +else + archs=`/bin/lipo -info /usr/lib/libm.a | sed -n 's/^[^:]*:[^:]*: //p'` +fi + +# +# leave the following part alone +# +archcount=`echo $archs |wc -w` +if [ $archcount -gt 1 ] +then + for d in $archs + do + mabflags="$mabflags -arch $d" + done + ccflags="$ccflags $mabflags" + ldflags="$ldflags $mabflags" + lddlflags="$lddlflags $mabflags" +fi +###################################################################### +# END MAB support +###################################################################### + +useshprlib='true' +dlext='bundle' +so='dylib' + +# +# The default prefix would be '/usr/local'. But since many people are +# likely to have still 3.3 machines on their network, we do not want +# to overwrite possibly existing 3.3 binaries. +# You can use Configure -Dprefix=/foo/bar to override this, or simply +# remove the lines below. +# +case "$prefix" in +'') prefix='/usr/local/OPENSTEP' ;; +esac + +archname='OPENSTEP-Mach' + +# +# At least on m68k there are situations when memcmp doesn't behave +# as expected. So we'll use perl's memcmp. +# +d_sanemcmp='undef' + +d_strcoll='undef' +i_dbm='define' +i_utime='undef' +groupstype='int' +direntrytype='struct direct' + +usemymalloc='y' +clocktype='int' + +# +# On some NeXT machines, the timestamp put by ranlib is not correct, and +# this may cause useless recompiles. Fix that by adding a sleep before +# 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/hints/nonstopux.sh b/hints/nonstopux.sh new file mode 100644 index 0000000000..025030fc9a --- /dev/null +++ b/hints/nonstopux.sh @@ -0,0 +1,20 @@ +# tom_bates@att.net +# mips-compaq-nonstopux + +. $src/hints/svr4.sh + +case "$cc" in + *gcc*) + ccflags='-fno-strict-aliasing' + lddlflags='-shared' + ldflags='' + ;; + *) + cc="cc -Xa -Olimit 4096" + malloctype="void *" + ;; +esac + +libswanted=`echo " $libswanted " | sed -e 's/ ucb / /'` +glibpth=`echo " $glibpth " | sed -e 's/ \/usr\/ucblib / /'` + diff --git a/hints/openbsd.sh b/hints/openbsd.sh new file mode 100644 index 0000000000..4839d049c5 --- /dev/null +++ b/hints/openbsd.sh @@ -0,0 +1,134 @@ +# hints/openbsd.sh +# +# hints file for OpenBSD; Todd Miller <millert@openbsd.org> +# 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 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 + +# +# Not all platforms support dynamic loading... +# For the case of "$openbsd_distribution", the hints file +# needs to know whether we are using dynamic loading so that +# it can set the libperl name appropriately. +# Allow command line overrides. +# +ARCH=`arch | sed 's/^OpenBSD.//'` +case "${ARCH}-${osvers}" in +alpha-2.[0-8]|mips-2.[0-8]|powerpc-2.[0-7]|m88k-*|vax-*) + test -z "$usedl" && usedl=$undef + ;; +*) + test -z "$usedl" && usedl=$define + # We use -fPIC here because -fpic is *NOT* enough for some of the + # extensions like Tk on some OpenBSD platforms (ie: sparc) + cccdlflags="-DPIC -fPIC $cccdlflags" + case "$osvers" in + [01].*|2.[0-7]|2.[0-7].*) + lddlflags="-Bshareable $lddlflags" + ;; + 2.[8-9]|3.0) + ld=${cc:-cc} + lddlflags="-shared -fPIC $lddlflags" + ;; + *) # from 3.1 onwards + ld=${cc:-cc} + lddlflags="-shared -fPIC $lddlflags" + libswanted=`echo $libswanted | sed 's/ dl / /'` + ;; + esac + + # We need to force ld to export symbols on ELF platforms. + # Without this, dlopen() is crippled. + ELF=`${cc:-cc} -dM -E - </dev/null | grep __ELF__` + test -n "$ELF" && ldflags="-Wl,-E $ldflags" + ;; +esac + +# +# Tweaks for various versions of OpenBSD +# +case "$osvers" in +2.5) + # OpenBSD 2.5 has broken odbm support + i_dbm=$undef + ;; +esac + +# OpenBSD doesn't need libcrypt but many folks keep a stub lib +# around for old NetBSD binaries. +libswanted=`echo $libswanted | sed 's/ crypt / /'` + +# Configure can't figure this out non-interactively +d_suidsafe=$define + +# cc is gcc so we can do better than -O +# Allow a command-line override, such as -Doptimize=-g +case ${ARCH} in +m88k) + optimize='-O0' + ;; +*) + test "$optimize" || optimize='-O2' + ;; +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' +case "$usethreads" in +$define|true|[yY]*) + # any openbsd version dependencies with pthreads? + ccflags="-pthread $ccflags" + ldflags="-pthread $ldflags" + # Add -lpthread. Also change from -lc to -lc_r + libswanted="$libswanted pthread" + libswanted=`echo " $libswanted "| sed -e 's/ c / c_r /' -e 's/^ //' -e 's/ $//'` + # 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' + # Local things, however, do go in /usr/local + siteprefix='/usr/local' + siteprefixexp='/usr/local' + # 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/hints/opus.sh b/hints/opus.sh new file mode 100644 index 0000000000..da6fcc95b0 --- /dev/null +++ b/hints/opus.sh @@ -0,0 +1 @@ +ccflags="$ccflags -X18" diff --git a/hints/os2.sh b/hints/os2.sh new file mode 100644 index 0000000000..77085a89b4 --- /dev/null +++ b/hints/os2.sh @@ -0,0 +1,484 @@ +#! /bin/sh +# hints/os2.sh +# This file reflects the tireless work of +# Ilya Zakharevich <ilya@math.ohio-state.edu> +# +# Trimmed and comments added by +# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Exactly what is required beyond a standard OS/2 installation? +# (see in README.os2) + +# Note that symbol extraction code gives wrong answers (sometimes?) on +# gethostent and setsid. + +# Optimization (GNU make 3.74 cannot be loaded :-(): +emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe +emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe +emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe + +path_sep=\; + +if test -f $sh.exe; then sh=$sh.exe; fi + +startsh="#!$sh" +cc='gcc' + +# Make denser object files and DLL +case "X$optimize" in + X) + optimize="-O2 -fomit-frame-pointer -malign-loops=2 -malign-jumps=2 -malign-functions=2 -s" + ld_dll_optimize="-s" + ;; +esac + +# Get some standard things (indented to avoid putting in config.sh): + oifs="$IFS" + IFS=" ;" + set $MANPATH + tryman="$@" + set $LIBRARY_PATH + libemx="$@" + set $C_INCLUDE_PATH + usrinc="$@" + IFS="$oifs" + tryman="`./UU/loc . /man $tryman`" + tryman="`echo $tryman | tr '\\\' '/'`" + + # indented to avoid having it *two* times at start + libemx="`./UU/loc os2.a /emx/lib $libemx`" + +usrinc="`./UU/loc stdlib.h /emx/include $usrinc`" +usrinc="`dirname $usrinc | tr '\\\' '/'`" +libemx="`dirname $libemx | tr '\\\' '/'`" + +if test -d $tryman/man1; then + sysman="$tryman/man1" +else + sysman="`./UU/loc . /man/man1 c:/man/man1 c:/usr/man/man1 d:/man/man1 d:/usr/man/man1 e:/man/man1 e:/usr/man/man1 f:/man/man1 f:/usr/man/man1 g:/man/man1 g:/usr/man/man1 /usr/man/man1`" +fi + +emxpath="`dirname $libemx`" +if test ! -d "$emxpath"; then + emxpath="`./UU/loc . /emx c:/emx d:/emx e:/emx f:/emx g:/emx h:/emx /emx`" +fi + +if test ! -d "$libemx"; then + libemx="$emxpath/lib" +fi +if test ! -d "$libemx"; then + if test -d "$LIBRARY_PATH"; then + libemx="$LIBRARY_PATH" + else + libemx="`./UU/loc . X c:/emx/lib d:/emx/lib e:/emx/lib f:/emx/lib g:/emx/lib h:/emx/lib /emx/lib`" + fi +fi + +if test ! -d "$usrinc"; then + if test -d "$emxpath/include"; then + usrinc="$emxpath/include" + else + if test -d "$C_INCLUDE_PATH"; then + usrinc="$C_INCLUDE_PATH" + else + usrinc="`./UU/loc . X c:/emx/include d:/emx/include e:/emx/include f:/emx/include g:/emx/include h:/emx/include /emx/include`" + fi + fi +fi + +rsx="`./UU/loc rsx.exe undef $pth`" + +if test "$libemx" = "X"; then echo "Cannot find C library!" >&2; fi + +# Acute backslashitis: +libpth="`echo \"$LIBRARY_PATH\" | tr ';\\\' ' /'`" +libpth="$libpth $libemx/mt $libemx" + +set `cmd /c emxrev -f emxlibcm` +emxcrtrev=$5 +# indented to not put it into config.sh + _defemxcrtrev=-D_EMX_CRT_REV_=$emxcrtrev + +so='dll' + +# Additional definitions: + +firstmakefile='GNUmakefile' +exe_ext='.exe' + +# We provide it +i_dlfcn='define' + +# The default one uses exponential notation between 0.0001 and 0.1 +d_Gconvert='gcvt_os2((x),(n),(b))' + +cat > UU/uselongdouble.cbu <<'EOCBU' +# This script UU/uselongdouble.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use long doubles. +# If we will use them, let Configure choose us a Gconvert. +case "$uselongdouble:$d_longdbl:$d_sqrtl:$d_modfl" in +"$define:$define:$define:$define") d_Gconvert='' ;; +esac +EOCBU + +# -Zomf build has a problem with _exit() *flushing*, so the test +# gets confused: +fflushNULL="define" + +aout_d_shrplib='undef' +aout_useshrplib='false' +aout_obj_ext='.o' +aout_lib_ext='.a' +aout_ar='ar' +aout_plibext='.a' +aout_lddlflags="-Zdll $ld_dll_optimize" +# Cannot have 32000K stack: get SYS0170 ?! +if [ $emxcrtrev -ge 50 ]; then + aout_ldflags='-Zexe -Zsmall-conv -Zstack 16000' +else + aout_ldflags='-Zexe -Zstack 16000' +fi + +# To get into config.sh: +aout_ldflags="$aout_ldflags" + +aout_d_fork='define' +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" +# Not listed in dynamic_ext, but needed for AOUT static_ext nevertheless +aout_extra_static_ext="OS2::DLL" + +# variable which have different values for aout compile +used_aout='d_shrplib useshrplib plibext lib_ext obj_ext ar plibext d_fork lddlflags ldflags ccflags use_clib usedl archobjs cppflags' + +if [ "$emxaout" != "" ]; then + d_shrplib="$aout_d_shrplib" + useshrplib="$aout_useshrplib" + obj_ext="$aout_obj_ext" + lib_ext="$aout_lib_ext" + ar="$aout_ar" + plibext="$aout_plibext" + if [ $emxcrtrev -lt 50 ]; then + d_fork="$aout_d_fork" + fi + lddlflags="$aout_lddlflags" + ldflags="$aout_ldflags" + ccflags="$aout_ccflags" + cppflags="$aout_cppflags" + use_clib="$aout_use_clib" + usedl="$aout_usedl" +else + d_shrplib='define' + useshrplib='true' + obj_ext='.obj' + lib_ext='.lib' + ar='emxomfar' + plibext='.lib' + if [ $emxcrtrev -ge 50 ]; then + d_fork='define' + else + d_fork='undef' + fi + lddlflags="-Zdll -Zomf -Zmt -Zcrtdll -Zlinker /e:2" + # Recursive regmatch may eat 2.5M of stack alone. + ldflags='-Zexe -Zomf -Zmt -Zcrtdll -Zstack 32000 -Zlinker /e:2' + if [ $emxcrtrev -ge 50 ]; then + ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. $_defemxcrtrev" + else + ccflags="-Zomf -Zmt -DDOSISH -DOS2=2 -DEMBED -I. -DEMX_BAD_SBRK $_defemxcrtrev" + fi + use_clib='c_import' + usedl='define' +fi + +# indented to miss config.sh + _ar="$ar" + +# To get into config.sh (should start at the beginning of line) +# or you can put it into config.over. +plibext="$plibext" +# plibext is not needed anymore. Just directly set $libperl. +libperl="libperl${plibext}" + +#libc="/emx/lib/st/c_import$lib_ext" +libc="$libemx/mt/$use_clib$lib_ext" + +if test -r "$libemx/c_alias$lib_ext"; then + libnames="$libemx/c_alias$lib_ext" +fi +# otherwise puts -lc ??? + +# [Maybe we should just remove c from $libswanted ?] + +# Test would pick up wrong rand, so we hardwire the value for random() +libs='-lsocket -lm -lbsd' +randbits=31 +archobjs="os2$obj_ext dl_os2$obj_ext" + +# Run files without extension with sh: +EXECSHELL=sh + +cccdlflags='-Zdll' +dlsrc='dl_dlopen.xs' +ld='gcc' + +#cppflags='-DDOSISH -DOS2=2 -DEMBED -I.' + +# for speedup: (some patches to ungetc are also needed): +# Note that without this guy tests 8 and 10 of io/tell.t fail, with it 11 fails + +stdstdunder=`echo "#include <stdio.h>" | cpp | egrep -c "char +\* +_ptr"` +d_stdstdio='define' +d_stdiobase='define' +d_stdio_ptr_lval='define' +d_stdio_cnt_lval='define' + +if test "$stdstdunder" = 0; then + stdio_ptr='((fp)->ptr)' + stdio_cnt='((fp)->rcount)' + stdio_base='((fp)->buffer)' + stdio_bufsiz='((fp)->rcount + (fp)->ptr - (fp)->buffer)' + ccflags="$ccflags -DMYTTYNAME" + myttyname='define' +else + stdio_ptr='((fp)->_ptr)' + stdio_cnt='((fp)->_rcount)' + stdio_base='((fp)->_buffer)' + stdio_bufsiz='((fp)->_rcount + (fp)->_ptr - (fp)->_buffer)' +fi + +# to put into config.sh +myttyname="$myttyname" + +# To have manpages installed +nroff='nroff.cmd' +# above will be overwritten otherwise, indented to avoid config.sh + _nroff='nroff.cmd' + +# should be handled automatically by Configure now. +ln='cp' +# Will be rewritten otherwise, indented to not put in config.sh + _ln='cp' +lns='cp' + +nm_opt='-p' + +####### We define these functions ourselves + +d_strtoll='define' +d_strtoull='define' +d_getprior='define' +d_setprior='define' + +# The next two are commented. pdksh handles #!, extproc gives no path part. +# sharpbang='extproc ' +# shsharp='false' + +# 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 + +for f in less.exe less.sh less.ksh less.cmd more.exe more.sh more.ksh more.cmd ; do + if test -z "$pager"; then + pager="`./UU/loc $f '' $pth`" + fi +done +if test -z "$pager"; then + pager='cmd /c more' +fi + +# Apply patches if needed +case "$0$running_c_cmd" in + *[/\\]Configure|*[/\\]Configure.|Configure|Configure.) # Skip Configure.cmd + if test "Xyes" = "X$configure_cmd_loop"; then + cat <<EOC >&2 +!!! +!!! PANIC: Loop of self-invocations detected, aborting! +!!! +EOC + exit 20 + fi + configure_cmd_loop=yes + export configure_cmd_loop + + configure_needs_patch='' + if test -s ./os2/diff.configure; then + if ! grep "^#OS2-PATCH-APPLIED" ./Configure > /dev/null; then + configure_needs_patch=yes + fi + fi + if test -n "$configure_needs_patch"; then + # Not patched! + # Restore the initial command line arguments + if test -f ./Configure.cmd ; then + cat <<EOC >&2 +!!! +!!! I see that what is running is ./Configure. +!!! ./Configure is not patched, but ./Configure.cmd exists. +!!! +!!! You are supposed to run Configure.cmd, not Configure +!!! after an automagic patching. +!!! +!!! If you insist on running Configure, you may +!!! patch it manually from ./os2/diff.configure. +!!! +!!! However, I went through incredible hoolahoops, and I expect I can +!!! auto-restart Configure.cmd myself. I will start it with arguments: +!!! +!!! Configure.cmd $args_exp +!!! +EOC + rp='Do you want to auto-restart Configure.cmd?' + dflt='y' + . UU/myread + case "$ans" in + [yY]) echo >&4 "Okay, continuing." ;; + *) echo >&4 "Okay, bye." + exit 2 + ;; + esac + eval "set X $args_exp"; + shift; + # Restore the output + exec Configure.cmd "$@" 1>&2 + exit 2 + fi + cat <<EOC >&2 +!!! +!!! You did not patch ./Configure! +!!! I can create Configure.cmd and patch it from ./os2/diff.configure with the command +!!! +!!! $gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch +EOC + rp='Do you want to auto-patch Configure to Configure.cmd?' + dflt='y' + . UU/myread + case "$ans" in + [yY]) echo >&4 "Okay, continuing." ;; + *) echo >&4 "Okay, bye." + exit 2 + ;; + esac + ($gnupatch -b -p1 --output=Configure.cmd <./os2/diff.configure 2>&1 | tee 00_auto_patch) >&2 + cat <<EOC >&2 +!!! +!!! The report of patching is copied to 00_auto_patch. +!!! Now we need to restart Configure.cmd with all the options. +!!! +EOC + echo "extproc sh" > Configure.ctm + ( cat Configure.cmd >> Configure.ctm && mv -f Configure.ctm Configure.cmd ) || (echo "!!! Failure to add extproc-line to Configure.cmd." >&2 ; exit 21) + cat <<EOC >&2 +!!! I went through incredible hoolahoops, and I expect I can +!!! auto-restart Configure.cmd myself. I will start it with arguments: +!!! +!!! Configure.cmd $args_exp +!!! +EOC + rp='Do you want to auto-restart Configure.cmd?' + dflt='y' + . UU/myread + case "$ans" in + [yY]) echo >&4 "Okay, continuing." ;; + *) echo >&4 "Okay, bye." + exit 2 + ;; + esac + eval "set X $args_exp"; + shift; + exec Configure.cmd "$@" 1>&2 + exit 2 + else + if test -s ./os2/diff.configure; then + echo "!!! Apparently we are running a patched Configure." >&2 + else + echo "!!! Apparently there is no need to patch Configure." >&2 + fi + fi + ;; + *) echo "!!! Apparently we are running a renamed Configure: '$0'." >&2 +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' +case "$usethreads" in +$define|true|[yY]*) + ccflags="-Zmt $ccflags" + cppflags="-Zmt $cppflags" # Do we really need to set this? + aout_ccflags="-DUSE_THREADS $aout_ccflags" + aout_cppflags="-DUSE_THREADS $aout_cppflags" + aout_lddlflags="-Zmt $aout_lddlflags" + aout_ldflags="-Zmt $aout_ldflags" + ;; +esac +EOCBU + +if test -z "$cryptlib"; then + cryptlib=`UU/loc crypt$lib_ext "" $libpth` + if $test -n "$cryptlib"; then + cryptlib=-lcrypt + else + cryptlib=`UU/loc ufc$lib_ext "" $libpth` + if $test -n "$cryptlib"; then + cryptlib=-lufc + fi + fi +fi +if test -n "$cryptlib"; then + libs="$libs $cryptlib" + # d_crypt=define +fi + +# Now install the external modules. We are in the ./hints directory. + +cd ./os2/OS2 + +if ! test -d ../../ext/OS2 ; then + mkdir ../../ext/OS2 +fi + +cp -rfu * ../../ext/OS2/ + +# Install tests: + +cp -uf ../*.t ../../t/lib +for xxx in * ; do + if $test -d $xxx/t; then + cp -uf $xxx/t/*.t ../../t/lib + else + if $test -d $xxx; then + cd $xxx + for yyy in * ; do + if $test -d $yyy/t; then + cp -uf $yyy/t/*.t ../../t/lib + fi + done + cd .. + fi + fi +done + +case "$ldlibpthname" in +'') ldlibpthname=none ;; +esac + +# Now go back +cd ../.. +cp os2/*.t t/lib diff --git a/hints/os390.sh b/hints/os390.sh new file mode 100644 index 0000000000..38d02c3fad --- /dev/null +++ b/hints/os390.sh @@ -0,0 +1,218 @@ +# hints/os390.sh +# +# OS/390 hints by David J. Fiander <davidf@mks.com> +# +# OS/390 OpenEdition Release 3 Mon Sep 22 1997 thanks to: +# +# John Goodyear <johngood@us.ibm.com> +# John Pfuntner <pfuntner@vnet.ibm.com> +# Len Johnson <lenjay@ibm.net> +# Bud Huff <BAHUFF@us.oracle.com> +# Peter Prymmer <pvhp@forte.com> +# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Tim Bunce <Tim.Bunce@ig.co.uk> +# +# as well as the authors of the aix.sh file +# + +# To get ANSI C, we need to use c89, and ld doesn't exist +# You can override this with Configure -Dcc=gcc -Dld=ld. +case "$cc" in +'') cc='c89' ;; +esac +case "$ld" in +'') ld='c89' ;; +esac + +# -DMAXSIG=38 maximum signal number +# -DOEMVS is used in place of #ifdef __MVS__ in certain places. +# -D_OE_SOCKETS alters system headers. +# -D_XOPEN_SOURCE_EXTENDEDA alters system headers. +# c89 hides most of the useful header stuff, _ALL_SOURCE turns it on again. +# YYDYNAMIC ensures that the OS/390 yacc generated parser is reentrant. +# -DEBCDIC should come from Configure and need not be mentioned here. +# Prepend your favorites with Configure -Dccflags=your_favorites +case "$ccflags" in +'') ccflags='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' ;; +*) ccflags="$ccflags -DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC" ;; +esac + +# Turning on optimization breaks perl. +# You can override this with Configure -Doptimize='-O' or somesuch. +case "$optimize" in +'') optimize='none' ;; +esac + +# To link via definition side decks we need the dll option +# You can override this with Configure -Ucccdlflags or somesuch. +case "$cccdlflags" in +'') cccdlflags='-W 0,dll' ;; +esac + +case "$so" in +'') so='a' ;; +esac + +case "$alignbytes" in +'') alignbytes=8 ;; +esac + +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac + +# On OS/390, libc.a doesn't really hold anything at all, +# so running nm on it is pretty useless. +# You can override this with Configure -Dusenm. +case "$usenm" in +'') usenm='false' ;; +esac + +# Setting ldflags='-Wl,EDIT=NO' will get rid of the symbol +# information at the end of the executable (=> smaller binaries). +# Override this option with -Dldflags='whatever else you wanted'. +case "$ldflags" in +'') ldflags='-Wl,EDIT=NO' ;; +esac + +# In order to build with dynamic be sure to specify: +# Configure -Dusedl +# Do not forget to add $archlibexp/CORE to your LIBPATH. +# You might want to override some of this with things like: +# Configure -Dusedl -Ddlext=so -Ddlsrc=dl_dllload.xs. +case "$usedl" in +'') + usedl='n' + case "$dlext" in + '') dlext='none' ;; + esac + ;; +define) + case "$useshrplib" in + '') useshrplib='true' ;; + esac + case "$dlsrc" in + '') dlsrc='dl_dllload.xs' ;; + esac + # For performance use 'so' at or beyond v2.8, 'dll' for 2.7 and prior versions + case "`uname -v`x`uname -r`" in + 02x0[89].*|02x1[0-9].*|[0-9][3-9]x*) + so='so' + case "$dlext" in + '') dlext='so' ;; + esac + ;; + *) + so='dll' + case "$dlext" in + '') dlext='dll' ;; + esac + ;; + esac + libperl="libperl.$so" + ccflags="$ccflags -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll" + cccdlflags='-c -Wc,dll,EXPORTALL' + # The following will need to be modified for the installed libperl.x. + # The modification to Config.pm is done by the installperl script after the build and test. + ccdlflags="-W l,dll `pwd`/libperl.x" + lddlflags="-W l,dll `pwd`/libperl.x" + ;; +esac +# even on static builds using LIBPATH should be OK. +case "$ldlibpthname" in +'') ldlibpthname=LIBPATH ;; +esac + +# Header files to include. +# You can override these with Configure -Ui_time -Ui_systime. +case "$i_time" in +'') i_time='define' ;; +esac +case "$i_systime" in +'') i_systime='define' ;; +esac + +# (from aix.sh) +# uname -m output is too specific and not appropriate here +# osname should come from Configure +# You can override this with Configure -Darchname='s390' but please don't. +case "$archname" in +'') archname="$osname" ;; +esac + +# We have our own cppstdin script. This is not a variable since +# Configure sees the presence of the script file. +# We put system header -D definitions in so that Configure +# can find the shmat() prototype in <sys/shm.h> and various +# other things. Unfortunately, cppflags occurs too late to be of +# value external to the script. This may need to be revisited +# under a compiler other than c89. +case "$usedl" in +define) +echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -D_SHR_ENVIRON -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin + ;; +*) +echo 'cat >.$$.c; '"$cc"' -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -E -Wc,NOLOC ${1+"$@"} .$$.c; rm .$$.c' > cppstdin + ;; +esac + +# +# Note that Makefile.SH employs a bare yacc command 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 + +# Most of the time gcvt() seems to work fine but +# sometimes values like 0.1, 0.2, come out as "10", "20", +# a trivial Perl demonstration snippet is 'print 0.1'. +# The -W 0,float(ieee) seems to be the switch breaking gcvt(). +# sprintf() seems to get things right(er). +gconvert_preference=sprintf + +cat >config.arch<<'__CONFIG_ARCH__' +# The '-W 0,float(ieee)' cannot be used during Configure as ldflags. + +ccflags="$ccflags -W 0,float(ieee)" + +__CONFIG_ARCH__ diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh new file mode 100644 index 0000000000..683bbccaff --- /dev/null +++ b/hints/posix-bc.sh @@ -0,0 +1,172 @@ +: +# hints/posix-bc.sh +# +# BS2000 (Posix Subsystem) hints by Thomas Dorner <Thomas.Dorner@start.de> +# +# Thanks to the authors of the os390.sh for the very first draft. +# +# You can modify almost any parameter set here using Configure with +# the appropriate -D option. + +# remove this line if dynamic libraries are working for you: +bs2000_ignoredl='y' + +# To get ANSI C, we need to use c89 +# You can override this with Configure -Dcc=gcc +# (if you ever get a gcc ported to BS2000 ;-). +case "$cc" in +'') cc='c89' ;; +esac + +# C-Flags: +# -DPOSIX_BC +# -DUSE_PURE_BISON +# -D_XOPEN_SOURCE_EXTENDED alters system headers. +# Prepend your favorites with Configure -Dccflags=your_favorites +ccflags="$ccflags -Kc_names_unlimited,enum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC -DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED" + +# Now, what kind of BS2000 system are we running on? +echo +if [ -n "`bs2cmd SHOW-SYSTEM-INFO | egrep 'HSI-ATT.*TYPE.*SR'`" ]; then + echo "You are running a BS2000 machine with Sunrise CPUs." + echo "Let's hope you have the matching RISC compiler as well." + ccflags="-K risc_4000 $ccflags" + bs2000_ldflags='-K risc_4000' +else + echo "Seems like a standard 390 BS2000 machine to me." + bs2000_ldflags='' +fi +echo +if [ -z "$bs2000_ignoredl" -a -e /usr/lib/libdl.a ]; then + echo "Wow, your BS2000 is State Of The Art and seems to support dynamic libraries." + echo "I just can't resist giving them a try." + bs2000_lddlflags='-Bsymbolic -Bdynamic' + # dynamic linkage of system libraries gave us runtime linker + # errors, so we use static linkage while generating our DLLs :-( +# bs2000_lddlflags='-Bstatic' + bs2000_so='none' + bs2000_usedl='define' + bs2000_dlext='so' + case $bs2000_ldflags in + *risc_4000*) + bs2000_ld="perl_genso" + echo " +Now you must buy everything they sell you, musn't you? +Didn't somebody tell you that RISC machines and dynamic library support gives +you helluva lot of configuration problems at the moment? +Sigh. Now you'll expect me to fix it for you, eh? +OK, OK, I'll give you a wrapper. +Just copy $bs2000_ld anywhere into your path before you try to install +additional modules!" + +cat > $bs2000_ld <<EOF +#! /bin/sh +# +# Perl's wrapper for genso by Thomas.Dorner@start.de + +GENSO=/usr/bin/genso +options="" +params="" +while [[ \$# -gt 0 ]]; do + case \$1 in + -K) + shift + ;; + -K*) + ;; + *.a) + lib=\${1##*/lib} + options="\$options -L\${1%/lib*.a} -l\${lib%.a}" + ;; + *.o) + params="\$params \$1" + ;; + *) + options="\$options \$1" + esac + shift +done +echo \$GENSO \$options \$params +exec \$GENSO \$options \$params +EOF + + chmod +x $bs2000_ld + if [[ -w /usr/local/bin && ! -f /usr/local/bin/$bs2000_ld ]]; then + cp -p $bs2000_ld /usr/local/bin/$bs2000_ld + echo "(Actually I just did that as well, have a look into /usr/local/bin.)" + fi + ;; + *) + bs2000_ld='genso' + esac +else + if [ -e /usr/lib/libdl.a ]; then + echo "Your BS2000 supports dynamic libraries, but you (or we ;-) decided to leave them alone." + else + echo "Your BS2000 does'n support dynamic libraries so we're just staying static." + fi + bs2000_ld='c89' + bs2000_lddlflags='' + bs2000_so='none' + bs2000_usedl='n' + bs2000_dlext='none' +fi + +case "$ld" in +'') ld=$bs2000_ld ;; +esac + +# ccdlflags have yet to be determined. +#case "$ccdlflags" in +#'') ccdlflags='-c' ;; +#esac + +# cccdlflags have yet to be determined. +#case "$cccdlflags" in +#'') cccdlflags='' ;; +#esac + +case "$ldflags" in +'') ldflags=$bs2000_ldflags ;; +esac + +case "$lddlflags" in +'') lddlflags=$bs2000_lddlflags ;; +esac + +# Turning on optimization breaks perl (CORE-DUMP): +# You can override this with Configure -Doptimize='-O' or somesuch. +case "$optimize" in +'') optimize='none' ;; +esac + +# BS2000 doesn't use dynamic memory on its own (yet): +case "$so" in +'') so=$bs2000_so ;; +esac + +case "$usemymalloc" in +'') usemymalloc='n' ;; +esac + +# On BS2000/Posix, libc.a does not really hold anything at all, +# so running nm on it is pretty useless. +# You can override this with Configure -Dusenm. +case "$usenm" in +'') usenm='false' ;; +esac + +# Configure -Dusedl -Ddlext=.so -Ddlsrc=dl_dllload.xs. +case "$usedl" in +'') usedl=$bs2000_usedl ;; +esac +case "$dlext" in +'') dlext=$bs2000_dlext ;; +esac +#case "$dlsrc" in +#'') dlsrc='none' ;; +#esac +#case "$ldlibpthname" in +#'') ldlibpthname=LIBPATH ;; +#esac + diff --git a/hints/powerux.sh b/hints/powerux.sh new file mode 100644 index 0000000000..c95e0e9ef5 --- /dev/null +++ b/hints/powerux.sh @@ -0,0 +1,218 @@ +# Hints for the Power MAX OS operating system (formerly PowerUX - hence the +# name) running on Concurrent (formerly Harris) NightHawk machines. Written +# by Tom.Horsley@ccur.com +# +# This hint uses dynamic linking and the new Concurrent C compiler (based +# on the Edison front end). This hint file was produced for a build of the +# 5.7.3 development release of perl running on a PowerMAX_OS 5.1SR2 system +# (but it should work on any Power MAX release using the newer "ec" (versus +# "cc") compiler, and hopefully will also work for the upcoming 5.8 +# development release of perl). + +# First find out where the root of the source tree is located. + +SRCROOT="" +if [ -f ./INSTALL ] +then + SRCROOT="." +else + if [ -f ../INSTALL ] + then + SRCROOT=".." + fi +fi +if [ -z "$SRCROOT" ] +then + echo "powerux hint file cannot locate root perl source!" 1>&2 + exit 2 +fi + +# We DO NOT want -lmalloc or -lPW, we DO need -lgen to follow -lnsl, so +# fixup libswanted to reflect that desire (also need -lresolv if you want +# DNS name lookup to work, which seems desirable :-). +# +libswanted=`echo ' '$libswanted' ' | sed -e 's/ malloc / /' -e 's/ PW / /' -e 's/ nsl / nsl gen resolv /'` + +# We DO NOT want /usr/ucblib in glibpth +# +glibpth=`echo ' '$glibpth' ' | sed -e 's@ /usr/ucblib @ @'` + +# Yes, csh exists, but doesn't work worth beans, if perl tries to use it, +# the glob test fails, so just pretend it isn't there... +# +d_csh='undef' + +# Need to use Concurrent ec for most of these options to be meaningful (if you +# want to get this to work with gcc, you're on your own :-). Passing +# -Bexport to the linker when linking perl is important because it leaves +# the interpreter internal symbols visible to the shared libs that will be +# loaded on demand (and will try to reference those symbols). The -usys_nerr +# drags in some stuff from libc that perl proper doesn't reference but +# some dynamically linked extension will need to be in the static part +# of perl (there are probably more of these that might be useful, but +# for the extensions I build, this turned out to be enough). The -uldexp +# makes sure the custom ldexp.o I add to archobjs actually gets pulled +# into perl from libperl.a +# +cc='/usr/ccs/bin/ec' +cccdlflags='-Zpic' +ccdlflags='-Zlink=dynamic -Wl,-usys_nerr -Wl,-uldexp -Wl,-Bexport' +lddlflags='-Zlink=so' + +# Sigh... Various versions of Power MAX went out with a broken ldexp runtime +# routine in libc (it is fixed for sure in the upcoming SR4 release, but +# that hasn't made it out the door yet). Since libc is linked dynamically, +# and the perl you build might try to run on one of the broken systems, we +# need to statically link a corrected copy of ldexp.o into perl. What the +# following code does is determine if the ldexp.o on the current system +# works right. If it does, it simply extracts the ldexp.o from the system C +# library and uses that .o file. If the system .o is broken, the btoa +# encoded copy of a correct ldexp.o file included in this hint file is used +# (what a pain...) +# +if [ ! -f $SRCROOT/ldexp.o ] +then + echo Finding a correct copy of ldexp.o to link with... 1>&2 + cat > $SRCROOT/UU/ldexptest.c <<'EOF' +#include <stdio.h> +#include <math.h> +#include <string.h> +int +main(int argc, char ** argv) { + double result = pow(2.0, 38.0); + char buf[100]; + sprintf(buf, "%g", result); + if (strncmp(buf, "inf", 3) == 0) { + exit(2); + } + return 0; +} +EOF + GOODLDEXP="no" + $cc -v -Zlink=static -o $SRCROOT/UU/ldexptest $SRCROOT/UU/ldexptest.c -lm > $SRCROOT/UU/ldexptest.lo 2>&1 + if [ $? -eq 0 ] + then + $SRCROOT/UU/ldexptest + if [ $? -eq 0 ] + then + LDEXPLIB=`fgrep libc.a $SRCROOT/UU/ldexptest.lo | tail -1 | sed -e 's@^[^/]*@@'` + if [ -s "$LDEXPLIB" ] + then + if [ -f "$LDEXPLIB" ] + then + GOODLDEXP="yes" + fi + fi + fi + fi + if [ "$GOODLDEXP" = "yes" ] + then + echo Congratulations! The ldexp.o on this system looks good! 1>&2 + echo Using ldexp.o from $LDEXPLIB 1>&2 + ( cd $SRCROOT ; ar x $LDEXPLIB ldexp.o ) + else + echo Sorry, the ldexp.o on this system is busted. 1>&2 + echo Using the ldexp.o from the powerux hint file 1>&2 + atob > $SRCROOT/ldexp.o << 'EOF' +xbtoa Begin +Imm%#!<N9%zz!!*'-!!!!"zz!!!8Jz!&OZU!!!!I!"/c-!%r>7Ecb`!!%rA)G]Wp<Ec5JsFC>/%FC\ +s(@fS,lAR]dp?YjFoAH3u00JG4;0JEJZF*VVE@:B4QA7^")/n4k]/hUsNAU&0$@rH4'?Zg7#FC/KgB +5)5`!%om?A7^")?Yj7aG]7#$DI``"/o5'0G]7#+A7^")?N:'+5\stBG]7#+Bl7KhF*(i2F9"RBA7^" +)?YjFoARB"dA,nl2A7^")?YjFoARAnXB5)5`5\stBG]7#/Ec5c4B6@cmASu#Y5\stBG]7#/Ec5c4B6 +@cm@V'1dD?'ZQA7^")!+0)TBQ@HkEcQ&9!+p7_G]3XiCh[?cG%G]8Bl@kh?XIJhB4YFn@;GorEb0&q +/p(ZLF9!q6ASbd-FC\s(@fS-%ASbd-A7]4mB4#IhDIieJz3$J<@IAd4EOoYQ5HuL$L3Pb]og;*c.rk +Jf$0+\*`g>N$VfHC6nOeDcBJaNL<r#i5*<UF@H/I_sb5`,PtJ;sU43WK.'.>.[$5ct)L<TXBJ5b\68 +8,rVja<:P^38ac\OQ-<@b/"'sb2E>Fr#l&\JY<(2JcPk%3$A9`IAd7F:4N<e<U"H%5b\5i3FDgf;/_ +p@OmW2L8,rVjOok[aa<:P^b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<e6(.iX4J2ZSb2iU's-C.p6 +,!Blr#i5*3+2eP8,rVjJH5a9/J%m^4[8uI/!'`P5`#LiIF(:p4CCN1/WKr63FDgf5ck%!8,rVj4[8u +I3T'l]4obQ_OlHEAJP#nB/d_RY5dCAdrg(%ob2E>F4eMcT^b#Nd5a26gb/"'sJY<(2JcPk%3$A9`IA +d7F:4N<eb/"'s4J2ZS^a/s\JY<(2JcPk%3$A9`IAd7F:4N<eaKPXErt`*EJY<(25aVNob/"'sr#dCa +IAd7Fb2E>FJcPk%3$A9`:4N<eb/"'sr#dDL4TGH^IAd7Fb2E>FJcPk%3$A9`:4N<eaQ`a*5b.lp4Wj +_)b,G@@3Y;>Nrmh6n.M)S$6';3>OC8,cI;FEfb2E>FD1mE>OF[C2aT2B<JY<(2JcPk%r5^iGIAd7Fr +&+S]b/"'s3$A9`:4N<eI'>pO3T0qs/VX)J4[;@g3<0$[I1UWg5car>8,rVj35>M<r#iM2OM_%ub/"' +sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<eJY<(25_oC_4hq$tb)QH%3Y29438jhrrmh6.IulWT6(IuEO[ +/tTILlM+IAd7Fb2E>FI11W[4obQ_a\Vs;D1mE>OF[CBa^G0WJcPk%r@:\mr&.(kb/"'s3$A9`:4N<e +b/"'sb2E>FJY<(2JcPk%3$A9`IAd7F:4N<ezzzs*t(KzIt.Luz6-oT3z6SJK?J,fQL4qI\oz!!!!s! +!!!$zz!s/HG!!!"\!!!!)s8W,W!!!*$!!!"@!!3-#!"]85q[3`2!<E3%!!!!"!!!!&!WW3#!!WNU!W +rH*If]fT!sSf.!Cp$,"p9>V!<FMOCe,mh8j5@-)[6Co!W`<V"u5N)49bn;!W`<+-`^N""p9>V!<F,D +Bh&@0If]WO"t'Ld!Y>A:>Q=d*zz"98E)zzzzzzzzzz!!!!\zz"9AJl!!!!dzz!rr<&!!!!ezz!!!!# +!!!"(zz!rr<'!!!")!!!)]z!!!!#!!!";!!!!Mz!!!!#!!!"Jzz!rr<(!!!"Kzz!rr<)!!!"Lzz!!! +!&!!!"^!!!"Dz!!!!&!!!"n!!!!%z!!!!&!!!#+!!!!;z!!!!&!!!#?!!!!+z!!!!&!!!#Uzz!rr<* +!!!#Vz!!!)]&c_n5!!!#\zz&-)\1!!!#hzz&-)\1!!!#nzz&-)\1!!!$&zz&-)\1!!!"$!!!Q<z!!! +"h!!!Q<z!!!#A!!!-Gz!!!#E!!!-Hz!!!#W!!!T=z!!!#e!!!-G!!!!A!!!$.!!!Q<z!!!$4!!!WUz +!!!$<!!!ZVz!!!$D!!!WVz!!!$X!!!-G!!!!)!!!$\!!!-H!!!!)!!!%+!!!-G!!!!1!!!%/!!!-H! +!!!1!!!%G!!!ZWz!!!&&!!!ZVz!!!&>!!!-H!!!!A!!!&F!!!-G!!!!9!!!&J!!!-H!!!!9!!!'[!! +!Q<z!!!(<!!!-G!!!!I!!!(@!!!-H!!!!I!!!(l!!!-G!!!!A!!!(p!!!-H!!!!A!!!!)!!!3Gz!!! +!-!!!'C!!!)]!!!!>!!!*Ezzzzzzzzzzz!!!!"!!!!$zz!!!!U!!!$Yzz!!!!"z!!!!*!!!!"!!!!' +z!!!%=!!!)]zz!!!!1z!!!!0!!!!"!!!!#z!!!.(!!!!Qzz!!!!)z!!!!8!!!!"!!!!#z!!!.X!!!! +Ezz!!!!%z!!!!?!!!!"zz!!!/'!!!"Dzz!!!!%z!!!!KJ,fQLzz!!!0J!!!!Ezz!!!!%z!!!!T!!!! +#zz!!!0n!!!$b!!!!"!!!!0!!!!%!!!!1!!!$1!!!!%zz!!!4Z!!!$B!!!!(!!!!#!!!!%!!!!-!!! +$<!!!!%zz!!!8&!!!!9!!!!(!!!!%!!!!%!!!!-!!!$H!!!!%zz!!!8>!!!!-!!!!(!!!!&!!!!%!! +!!- +xbtoa End N 2436 984 E ad S 1bf43 R a7867666 +EOF + fi + ( cd $SRCROOT/UU ; rm -f ldexptest* ) +fi +if [ -f $SRCROOT/ldexp.o ] +then + archobjs='ldexp.o' +fi + +# Configure sometime finds what it believes to be ndbm header files on the +# system and imagines that we have the NDBM library, but we really don't. +# There is something there that once resembled ndbm, but it is purely +# for internal use in some tool and has been hacked beyond recognition +# (or even function :-) +# +i_ndbm='undef' + +# I have no clue what perl thinks it wants <sys/mode.h> for, but if you +# include it in a program in PowerMAX without first including <sys/vnode.h> +# the code don't compile (apparently some other operating system has +# something completely different in its sys/mode.h) +# +i_sysmode='undef' + +# There was a bug in memcmp (which was fixed a while ago) which sometimes +# fails to provide the correct compare status (it is data dependant). I +# don't wnat to figure out if you are building with the correct version or +# not, so just pretend there is no memcmp (since perl has its own handy +# substitute). +# +d_memcmp='undef' + +# Due to problems with dynamic linking (which I also hope will be fixed soon) +# you can't build a libperl.so, the core has to be in the static part of the +# perl executable. +# +useshrplib='false' + +# PowerMAX OS has support for a few different kinds of filesystems. The +# newer "xfs" filesystem does *not* report a reasonable value in the +# 'nlinks' field of stat() info for directories (in fact, it is always 1). +# Since xfs is the only filesystem which supports partitions bigger than +# 2gig and you can't hardly buy a disk that small anymore, xfs is coming in +# to greater and greater use, so we pretty much have no choice but to +# abandon all hope that number of links will mean anything. +# +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' +d_isascii='define' +d_mymalloc='undef' +usemymalloc='n' +ssizetype='ssize_t' +usevfork='false' + diff --git a/hints/qnx.sh b/hints/qnx.sh new file mode 100644 index 0000000000..482c8ab0e5 --- /dev/null +++ b/hints/qnx.sh @@ -0,0 +1,249 @@ +#---------------------------------------------------------------- +# QNX hints +# +# Most of the hints in this file are for QNX4, which needed +# more help. The QNX6 hints are located toward the bottom. +# +# perl-5.7.3 passes all tests under QNX4.24G +# Watcom 10.6 with Beta/970211.wcc.update.tar.F +# socket3r.lib Nov21 1996. +# perl-5.7.3 fails 2 known tests under QNX6.1.0 +# +# As with many unix ports, this one depends on a few "standard" +# unix utilities which are not necessarily standard for QNX4. +# +# /bin/sh This is used heavily by Configure and then by +# perl itself. QNX4's version is fine, but Configure +# will choke on the 16-bit version, so if you are +# running QNX 4.22, link /bin/sh to /bin32/ksh +# ar This is the standard unix library builder. +# We use wlib. With Watcom 10.6, when wlib is +# linked as "ar", it behaves like ar and all is +# fine. Under 9.5, a cover is required. One is +# included in ../qnx +# nm This is used (optionally) by configure to list +# the contents of libraries. I will generate +# a cover function on the fly in the UU directory. +# cpp Configure and perl need a way to invoke a C +# preprocessor. I have created a simple cover +# for cc which does the right thing. Without this, +# Configure will create its own wrapper which works, +# but it doesn't handle some of the command line arguments +# that perl will throw at it. +# make You really need GNU make to compile this. GNU make +# ships by default with QNX 4.23, but you can get it +# from quics for earlier versions. +#---------------------------------------------------------------- +# Outstanding Issues for QNX4: +# There is no support for dynamically linked libraries in +# QNX4. +# +# If you wish to compile with the Socket extension, you need +# to have the TCP/IP toolkit, and you need to make sure that +# -lsocket locates the correct copy of socket3r.lib. Beware +# that the Watcom compiler ships with a stub version of +# socket3r.lib which has very little functionality. Also +# beware the order in which wlink searches directories for +# libraries. You may have /usr/lib/socket3r.lib pointing to +# the correct library, but wlink may pick up +# /usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure +# they both point to the correct library, that is, +# /usr/tcptk/current/usr/lib/socket3r.lib. +# +# ext/Cwd/Cwd.t will complain if `pwd` and cwd don't give +# the same results. cwd calls `fullpath -t`, so if you +# cd `fullpath -t` before running the test, it will +# pass. +# +# lib/File/Find/taint.t will complain if '.' is in your +# PATH. The PATH test is triggered because cwd calls +# `fullpath -t`. +# +# ext/IO/lib/IO/t/io_sock.t: Subtest 14 is skipped due to +# the fact that the functionality to read back the non-blocking +# status of a socket is not implemented in QNX's TCP/IP. This +# has been reported to QNX and it may work with later versions +# of TCP/IP. +# +# Older issues: +# lib/posix.t test failed on test 17 because acos(1) != 0. +# Resolved in 970211 Beta +# lib/io_udp.t test hangs because of a bug in getsockname(). +# Fixed in latest BETA socket3r.lib +#---------------------------------------------------------------- +# Outstanding Issues for QNX6: +# The following tests are still failing as of 5.7.3: +# +# op/sprintf.........................FAILED at test 91 +# lib/Benchmark......................FAILED at test 26 +# +# This is due to a bug in the C library's printf routine. +# printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires +# '0.000000e+00'. QNX has acknowledged the bug and it should be +# fixed in 6.2.0. +# +#---------------------------------------------------------------- +# These hints were submitted by: +# Norton T. Allen +# Harvard University Atmospheric Research Project +# allen@huarp.harvard.edu +# +# If you have suggestions or changes, please let me know. +#---------------------------------------------------------------- + +echo "" +echo "Some tests may fail. Please read the hints/qnx.sh file." +echo "" + +#---------------------------------------------------------------- +# At present, all QNX4 systems are equivalent architectures, +# so it is reasonable to call archname=x86-qnx rather than +# making an unnecessary distinction between AT-qnx and PCI-qnx, +# for example. I will use uname's architecture for Neutrino. +#---------------------------------------------------------------- +set X `uname -a` +shift +[ "$1" != "QNX" ] && echo "uname doesn't look like QNX!" +case $4 in + 42[2-9]) archname='x86-qnx';; + *) osname='nto' + osvers=$3 + archname="$5-nto";; +esac + +if [ "$osname" = "qnx" ]; then + #---------------------------------------------------------------- + # QNX doesn't come with a csh and the ports of tcsh I've used + # don't work reliably: + #---------------------------------------------------------------- + csh='' + d_csh='undef' + full_csh='' + + #---------------------------------------------------------------- + # setuid scripts are secure under QNX. + # (Basically, the same race conditions apply, but assuming + # the scripts are located in a secure directory, the methods + # for exploiting the race condition are defeated because + # the loader expands the script name fully before executing + # the interpreter.) + #---------------------------------------------------------------- + d_suidsafe='define' + + #---------------------------------------------------------------- + # difftime is implemented as a preprocessor macro, so it doesn't show + # up in the libraries: + #---------------------------------------------------------------- + d_difftime='define' + + #---------------------------------------------------------------- + # strtod is in the math library, but we can't tell Configure + # about the math library or it will confuse the linker + #---------------------------------------------------------------- + d_strtod='define' + + lib_ext='3r.lib' + libc='/usr/lib/clib3r.lib' + + #---------------------------------------------------------------- + # ccflags: + # I like to turn the warnings up high, but a few common + # constructs make a lot of noise, so I turn those warnings off. + # A few still remain... + # + # unix.h is required as a general rule for unixy applications. + #---------------------------------------------------------------- + ccflags='-mf -w4 -Wc,-wcd=202 -Wc,-wcd=203 -Wc,-wcd=302 -Wc,-fi=unix.h' + + #---------------------------------------------------------------- + # ldflags: + # If you want debugging information, you must specify -g on the + # link as well as the compile. If optimize != -g, you should + # remove this. + #---------------------------------------------------------------- + ldflags="-g -N1M" + + so='none' + selecttype='fd_set *' + + #---------------------------------------------------------------- + # Add -lunix to list of libs. This is needed mainly so the nm + # search will find funcs in the unix lib. Including unix.h should + # automatically include the library without -l. + #---------------------------------------------------------------- + libswanted="$libswanted unix" + + if [ -z "`which ar 2>/dev/null`" ]; then + cat <<-'EOF' >&4 + I don't see an 'ar', so I'm guessing you are running + Watcom 9.5 or earlier. You may want to install the ar + cover found in the qnx subdirectory of this distribution. + It might reasonably be placed in /usr/local/bin. + + EOF + fi + #---------------------------------------------------------------- + # Here is a nm script which fixes up wlib's output to look + # something like nm's, at least enough so that Configure can + # use it. + #---------------------------------------------------------------- + if [ -z "`which nm 2>/dev/null`" ]; then + cat <<-EOF + Creating a quick-and-dirty nm cover for Configure to use: + + EOF + cat >./UU/nm <<-'EOF' + #! /bin/sh + #__USAGE + #%C <lib> [<lib> ...] + # Designed to mimic Unix's nm utility to list + # defined symbols in a library + unset WLIB + for i in $*; do wlib $i; done | + awk ' + /^ / { + for (i = 1; i <= NF; i++) { + sub("_$", "", $i) + print "000000 T " $i + } + }' + EOF + chmod +x ./UU/nm + fi + + cppstdin=`which cpp 2>/dev/null` + if [ -n "$cppstdin" ]; then + cat <<-EOF >&4 + I found a cpp at $cppstdin and will assume it is a good + thing to use. If this proves to be false, there is a + thin cover for cpp in the qnx subdirectory of this + distribution which you could move into your path. + EOF + cpprun="$cppstdin" + else + cat <<-EOF >&4 + + There is a cpp cover in the qnx subdirectory of this + distribution which works a little better than the + Configure default. You may wish to copy it to + /usr/local/bin or some other suitable location. + EOF + fi +else + # $^O eq nto + + ccflags='-DDLOPEN_WONT_DO_RELATIVE_PATHS' + + # Options required to get dynamic linking to work + lddlflags='-shared' + ccdlflags='-Wl,-E' + + # Somewhere in the build, something tries to throw a gcc + # option to $cc if it knows it invokes gcc. Our cc doesn't + # recognize that option, so we're better off setting cc=gcc. + cc='gcc' + + # If we use perl's malloc, it dies with an invalid sbrk. + # This is probably worth tracking down someday. + usemymalloc='false' +fi diff --git a/hints/rhapsody.sh b/hints/rhapsody.sh new file mode 100644 index 0000000000..96d57f2412 --- /dev/null +++ b/hints/rhapsody.sh @@ -0,0 +1,77 @@ +## +# Rhapsody (Mac OS X Server) hints +# Wilfredo Sanchez <wsanchez@mit.edu> +## + +## +# Paths +## + +# BSD paths +case "$prefix" in +'') + prefix='/usr/local'; # Built-in perl uses /usr + siteprefix='/usr/local'; + vendorprefix='/usr/local'; usevendorprefix='define'; + + # 4BSD uses ${prefix}/share/man, not ${prefix}/man. + # Don't put man pages in ${prefix}/lib; that's goofy. + man1dir="${prefix}/share/man/man1"; + man3dir="${prefix}/share/man/man3"; + + # Where to put modules. + # Built-in perl uses /System/Library/Perl + privlib='/Local/Library/Perl'; + sitelib='/Local/Library/Perl'; + vendorlib='/Network/Library/Perl'; + ;; +esac + +## +# 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'; + +# XXX Unclear why we require -pipe and -fno-common here. +ccflags="${ccflags} -pipe -fno-common" + +# cpp-precomp is problematic. +cppflags='-traditional-cpp'; + +# 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'; + +# Case-insensitive filesystems don't get along with Makefile and +# makefile in the same place. Since Darwin uses GNU make, this dodges +# the problem. +firstmakefile=GNUmakefile; diff --git a/hints/sco.sh b/hints/sco.sh new file mode 100644 index 0000000000..1d1d5c2788 --- /dev/null +++ b/hints/sco.sh @@ -0,0 +1,243 @@ +# sco.sh +# Courtesy of Joel Rosi-Schwartz <j.schwartz@agonet.it> +############################################################### +# Additional SCO version info from +# Peter Wolfe <wolfe@teloseng.com> +# Fri Jul 19 14:54:25 EDT 1996 +# and again Tue Sep 29 16:37:25 EDT 1998 +# by Andy Dougherty <doughera@lafayette.edu> +# 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 +# To use gcc, use sh Configure -Dcc=gcc +# +# Default on 3.2v4 is to use static link (dynamic loading unsupported). +# Default on 3.2v5 is to use dynamic loading. +# To use static linkink instead, use to sh Configure -Dusedl=n +# +# Warning: - to use dynamic loading with gcc, you need gcc 2.8.0 or later +# ******** - to compile with older releases of gcc, use Configure -Dusedl=n +# or it wont compile properly +# +############################################################### +# NOTES: +# ----- +# +# I Have removed inclusion of ODBM_File for OSR5 +# because it core dumps and make tests fails. +# +# Support for icc compiler has been removed, because it 'breaks' +# a lot of code :-( +# +# It's *always* a good idea to first make a static link to be sure to +# have all symbols resolved with the current choice of libraries, since +# with dynamic linking, unresolved symbols are allowed an will be detected +# only at runtime (when you try to load the module or worse, when you call +# the symbol) +# +# The best choice of compiler on OSR 5 (3.2v5.*) seems to be gcc >= 2.8.0: +# -You cannot optimize with genuine sco cc (miniperl core dumps), +# so Perl is faster if compiled with gcc. +# -Even optimized for speed, gcc generated code is smaller (!!!) +# -gcc is free +# -I use ld to link which is distributed with the core OS distribution, so you +# don't need to buy the developement kit, just find someone kind enough to +# give you a binary release of gcc. +# +# + +############################################################### +# figure out what SCO version we are. The output of uname -X is +# something like: +# System = SCO_SV +# Node = xxxxx +# Release = 3.2v5.0.0 +# KernelID = 95/08/08 +# Machine = Pentium +# BusType = ISA +# Serial = xxxxx +# Users = 5-user +# OEM# = 0 +# Origin# = 1 +# NumCPU = 1 + +# Use /bin/uname (because GNU uname may be first in $PATH and +# it does not support -X) to figure out what SCO version we are: +# Matching '^Release' is broken by locale setting: +# matching '3.2v' should be enough -- FD +case `/bin/uname -X | egrep '3\.2v'` in +*3.2v4.*) scorls=3 ;; # OSR 3 +*3.2v5.*) scorls=5 ;; # OSR 5 +*) + # Future of SCO OSR is SCO UnixWare: there should not be new OSR releases + echo "************************************************************" >&4 + echo "" >&4 + echo " sco.sh hints file only supports:" >&4 + echo "" >&4 + echo " - SCO Unix 3.2v4.x (OSR 3)" >&4 + echo " - SCO Unix 3.2v5.x (OSR 5)" >&4 + 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 +;; +esac + +############################################################### +# Common fixes for all compilers an releases: + +############################################################### +# What is true for SCO5 is true for SCO3 too today, so let's have a single +# symbol for both +ccflags="-U M_XENIX -D PERL_SCO" + +############################################################### +# Compilers options section: +if test "$scorls" = "3" +then + dlext='' + case "$cc" in + *gcc*) optimize='-O2' ;; + *) ccflags="$ccflags -W0 -quiet" + optimize='-O' ;; + esac +else + ############################################################### + # Need this in release 5 because of changed fpu exeption rules + ccflags="$ccflags -D HAS_FPSETMASK" + + ############################################################### + # In Release 5, always compile ELF objects + case "$cc" in + *gcc*) + ccflags="$ccflags -melf" + optimize='-O2' + ;; + *) + ccflags="$ccflags -w0 -belf" + optimize='-O0' + ;; + esac + ############################################################### + # Dynamic loading section: + # + # We use ld to build shared libraries as it is always available + # and seems to work better than GNU's one on SCO + # + # 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 + # + # /usr/local/lib is added for convenience, since 'foreign' libraries + # are usually put there in sco + # + if test "$usedl" != "n"; then + ld='ld' + case "$cc" in + *gcc*) + ccdlflags='-Xlinker -Bexport -L/usr/local/lib' + cccdlflags='-fpic' + lddlflags='-G -L/usr/local/lib' + ;; + *) + ccdlflags='-Bexport -L/usr/local/lib' + cccdlflags='-Kpic' + lddlflags='-G -L/usr/local/lib' + ;; + esac + + ############################################################### + # Use dynamic loading + usedl='define' + dlext='so' + dlsrc='dl_dlopen.xs' + + ############################################################### + # Force to define those symbols, as they are #defines and not + # catched by Configure, and they are useful + d_dlopen='define' + d_dlerror='define' + fi +fi + + +############################################################### +# Various hints, common to all releases, to have it work better: + +############################################################### +# We need to remove libdl, as libdl.so exists, but ld complains +# it can't find libdl.a ! Bug or feature ? :-) +libswanted=`echo " $libswanted " | sed -e 's/ dl / /'` +set X $libswanted +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" + +############################################################### +# Try to use libdbm.nfs.a since it has dbmclose. +if test -f /usr/lib/libdbm.nfs.a ; then + libswanted=`echo "dbm.nfs $libswanted " | sed -e 's/ dbm / /'` + set X $libswanted + shift + libswanted="$*" +fi + +############################################################### +# We disable ODBM_File if OSR5 because it's mostly broken +# but keep it for ODT3 as it seems to work. +if test "$scorls" = "5"; then + i_dbm='undef' +fi + +############################################################### +# We don't want Xenix cross-development libraries +glibpth=`echo $glibpth | sed -e 's! /usr/lib/386 ! !' -e 's! /lib/386 ! !'` +xlibpth='' + +############################################################### +# I have received one report that nm extraction doesn't work if you're +# using the scocc compiler. This system had the following 'myconfig' +# uname='xxx xxx 3.2 2 i386 ' +# cc='scocc', optimize='-O' +# You can override this with Configure -Dusenm. +case "$usenm" in +'') usenm='false' ;; +esac + +############################################################### +# If you want to use nm, you'll probably have to use nm -p. The +# following does that for you: +nm_opt='-p' + +############################################################### +# I have received one report that you can't include utime.h in +# pp_sys.c. Uncomment the following line if that happens to you: +# i_utime=undef + +############################################################### +# Perl 5.003_05 and later try to include both <time.h> and <sys/select.h> +# in pp_sys.c, but that fails due to a redefinition of struct timeval. +# This will generate a WHOA THERE. Accept the default. +i_sysselct=$undef + + +############################################################### +#END of hint file diff --git a/hints/sco_2_3_0.sh b/hints/sco_2_3_0.sh new file mode 100644 index 0000000000..146363ab3d --- /dev/null +++ b/hints/sco_2_3_0.sh @@ -0,0 +1,2 @@ +yacc='/usr/bin/yacc -Sm25000' +i_dirent=undef diff --git a/hints/sco_2_3_1.sh b/hints/sco_2_3_1.sh new file mode 100644 index 0000000000..146363ab3d --- /dev/null +++ b/hints/sco_2_3_1.sh @@ -0,0 +1,2 @@ +yacc='/usr/bin/yacc -Sm25000' +i_dirent=undef diff --git a/hints/sco_2_3_2.sh b/hints/sco_2_3_2.sh new file mode 100644 index 0000000000..e113a4ec65 --- /dev/null +++ b/hints/sco_2_3_2.sh @@ -0,0 +1,2 @@ +yacc='/usr/bin/yacc -Sm25000' +libswanted=`echo " $libswanted "| sed 's/ x / /'` diff --git a/hints/sco_2_3_3.sh b/hints/sco_2_3_3.sh new file mode 100644 index 0000000000..6d398fccf2 --- /dev/null +++ b/hints/sco_2_3_3.sh @@ -0,0 +1,3 @@ +yacc='/usr/bin/yacc -Sm25000' +echo "NOTE: you may have problems due to a spurious semicolon on the strerror()" >&4 +echo "macro definition in /usr/include/string.h. If so, delete the semicolon." >&4 diff --git a/hints/sco_2_3_4.sh b/hints/sco_2_3_4.sh new file mode 100644 index 0000000000..34bcadae5f --- /dev/null +++ b/hints/sco_2_3_4.sh @@ -0,0 +1,5 @@ +yacc='/usr/bin/yacc -Sm25000' +ccflags="$ccflags -UM_I86" +usemymalloc='y' +echo "NOTE: you may have problems due to a spurious semicolon on the strerror()" >&4 +echo "macro definition in /usr/include/string.h. If so, delete the semicolon." >&4 diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh new file mode 100644 index 0000000000..2155e4959e --- /dev/null +++ b/hints/solaris_2.sh @@ -0,0 +1,603 @@ +# hints/solaris_2.sh +# Last modified: Mon Jan 29 12:52:28 2001 +# Lupe Christoph <lupe@lupe-christoph.de> +# Based on version by: +# Andy Dougherty <doughera@lafayette.edu> +# Which was based on input from lots of folks, especially +# Dean Roehrich <roehrich@ironwood-fddi.cray.com> +# Additional input from Alan Burlison, Jarkko Hietaniemi, +# and Richard Soderberg. +# +# See README.solaris for additional information. +# +# For consistency with gcc, we do not adopt Sun Marketing's +# removal of the '2.' prefix from the Solaris version number. +# (Configure tries to detect an old fixincludes and needs +# this information.) + +# If perl fails tests that involve dynamic loading of extensions, and +# you are using gcc, be sure that you are NOT using GNU as and ld. One +# 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=${usevfork:-false} + +# Solaris has secure SUID scripts +d_suidsafe=${d_suidsafe:-define} + +# Several people reported problems with perl's malloc, especially +# when use64bitall is defined or when using gcc. +# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg01318.html +# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-01/msg00465.html +usemymalloc=${usemymalloc:-false} + +# Avoid all libraries in /usr/ucblib. +# /lib is just a symlink to /usr/lib +set `echo $glibpth | sed -e 's@/usr/ucblib@@' -e 's@ /lib @ @'` +glibpth="$*" + +# Remove unwanted libraries. -lucb contains incompatible routines. +# -lld and -lsec don't do anything useful. -lcrypt does not +# really provide anything we need over -lc, so we drop it, too. +# -lmalloc can cause a problem with GNU CC & Solaris. Specifically, +# libmalloc.a may allocate memory that is only 4 byte aligned, but +# GNU CC on the Sparc assumes that doubles are 8 byte aligned. +# Thanks to Hallvard B. Furuseth <h.b.furuseth@usit.uio.no> +set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ malloc @ @' -e 's@ ucb @ @' -e 's@ sec @ @' -e 's@ crypt @ @'` +libswanted="$*" + +# Look for architecture name. We want to suggest a useful default. +case "$archname" in +'') + if test -f /usr/bin/arch; then + archname=`/usr/bin/arch` + archname="${archname}-${osname}" + elif test -f /usr/ucb/arch; then + archname=`/usr/ucb/arch` + archname="${archname}-${osname}" + fi + ;; +esac + +cat > UU/workshoplibpth.cbu << 'EOCBU' +# This script UU/workshoplibpth.cbu will get 'called-back' +# by other CBUs this script creates. +case "$workshoplibpth_done" in + '') if test `uname -p` = "sparc"; then + case "$use64bitall" in + "$define"|true|[yY]*) + # add SPARC-specific 64 bit libraries + loclibpth="$loclibpth /usr/lib/sparcv9" + if test -n "$workshoplibs"; then + loclibpth=`echo $loclibpth | sed -e "s% $workshoplibs%%" ` + for lib in $workshoplibs; do + # Logically, it should be sparcv9. + # But the reality fights back, it's v9. + loclibpth="$loclibpth $lib/sparcv9 $lib/v9" + done + fi + ;; + *) loclibpth="$loclibpth $workshoplibs" + ;; + esac + else + loclibpth="$loclibpth $workshoplibs" + fi + workshoplibpth_done="$define" + ;; +esac +EOCBU + +case "$cc" in +'') if test -f /opt/SUNWspro/bin/cc; then + cc=/opt/SUNWspro/bin/cc + cat <<EOF >&4 + +You specified no cc but you seem to have the Workshop compiler +($cc) installed, using that. +If you want something else, specify that in the command line, +e.g. Configure -Dcc=gcc + +EOF + fi + ;; +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 +*/usr/ucb/cc*) cat <<END >&4 + +NOTE: Some people have reported problems with /usr/ucb/cc. +If you have difficulties, please make sure the directory +containing your C compiler is before /usr/ucb in your PATH. + +END +;; +esac + + +# Check that /dev/fd is mounted. If it is not mounted, let the +# user know that suid scripts may not work. +df /dev/fd 2>&1 > /dev/null +case $? in +0) ;; +*) + cat <<END >&4 + +NOTE: Your system does not have /dev/fd mounted. If you want to +be able to use set-uid scripts you must ask your system administrator +to mount /dev/fd. + +END + ;; +esac + + +# See if libucb can be found in /usr/lib. If it is, warn the user +# that this may cause problems while building Perl extensions. +/usr/bin/ls /usr/lib/libucb* >/dev/null 2>&1 +case $? in +0) + cat <<END >&4 + +NOTE: libucb has been found in /usr/lib. libucb should reside in +/usr/ucblib. You may have trouble while building Perl extensions. + +END +;; +esac + +# Use shell built-in 'type' command instead of /usr/bin/which to +# avoid possible csh start-up problems and also to use the same shell +# we'll be using to Configure and make perl. +# The path name is the last field in the output, but the type command +# has an annoying array of possible outputs, e.g.: +# make is hashed (/opt/gnu/bin/make) +# cc is /usr/ucb/cc +# foo not found +# use a command like type make | awk '{print $NF}' | sed 's/[()]//g' + +# See if make(1) is GNU make(1). +# If it is, make sure the setgid bit is not set. +make -v > make.vers 2>&1 +if grep GNU make.vers > /dev/null 2>&1; then + tmp=`type make | awk '{print $NF}' | sed 's/[()]//g'` + case "`/usr/bin/ls -lL $tmp`" in + ??????s*) + cat <<END >&2 + +NOTE: Your PATH points to GNU make, and your GNU make has the set-group-id +bit set. You must either rearrange your PATH to put /usr/ccs/bin before the +GNU utilities or you must ask your system administrator to disable the +set-group-id bit on GNU make. + +END + ;; + esac +fi +rm -f make.vers + +cat > UU/cc.cbu <<'EOCBU' +# This script UU/cc.cbu will get 'called-back' by Configure after it +# has prompted the user for the C compiler to use. + +# If the C compiler is gcc: +# - check the fixed-includes +# - check as(1) and ld(1), they should not be GNU +# (GNU as and ld 2.8.1 and later are reportedly ok, however.) +# If the C compiler is not gcc: +# - Check if it is the Workshop/Forte compiler. +# If it is, prepare for 64 bit and long doubles. +# - check as(1) and ld(1), they should not be GNU +# (GNU as and ld 2.8.1 and later are reportedly ok, however.) +# +# 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 + verbose=`${cc:-cc} -v -o try try.c 2>&1` + +if echo "$verbose" | grep '^Reading specs from' >/dev/null 2>&1; then + # + # Using gcc. + # + + # See if as(1) is GNU as(1). GNU as(1) might not work for this job. + if echo "$verbose" | grep ' /usr/ccs/bin/as ' >/dev/null 2>&1; then + : + else + cat <<END >&2 + +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 + # 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) 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 + # 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.) + + # Recompute verbose with -Wl,-v to find GNU ld if present + verbose=`${cc:-cc} -v -Wl,-v -o try try.c 2>&1 | grep ld 2>&1` + + myld=`echo $verbose| grep ld | awk '/\/ld/ {print $1}'` + # This assumes that gcc's output will not change, and that + # /full/path/to/ld will be the first word of the output. + # Thus myld is something like /opt/gnu/sparc-sun-solaris2.5/bin/ld + + # Allow that $myld may be '', due to changes in gcc's output + if ${myld:-ld} -V 2>&1 | + grep "ld: Software Generation Utilities" >/dev/null 2>&1; then + # Ok, /usr/ccs/bin/ld eventually does get called. + : + else + echo "Found GNU ld='$myld'" >&4 + cat <<END >&2 + +NOTE: You are using GNU ld(1). GNU ld(1) might not build Perl. If you +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 + ccdlflags="$ccdlflags -Wl,-E" + lddlflags="$lddlflags -Wl,-E -G" + fi + fi + +else + # + # Not using gcc. + # + + ccversion="`${cc:-cc} -V 2>&1|sed -n -e '1s/^cc: //p'`" + case "$ccversion" in + *WorkShop*) ccname=workshop ;; + *) ccversion='' ;; + esac + + case "$ccname" in + workshop) + cat >try.c <<EOM +#include <sunmath.h> +int main() { return(0); } +EOM + workshoplibs=`cc -### try.c -lsunmath -o try 2>&1|sed -n '/ -Y /s%.* -Y "P,\(.*\)".*%\1%p'|tr ':' '\n'|grep '/SUNWspro/'` + . ./workshoplibpth.cbu + ;; + esac + + # 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) 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. + +END + ;; + esac + + # 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 + # Sun's ld always emits the "Software Generation Utilities" string. + if ld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then + # Ok, ld is /usr/ccs/bin/ld. + : + else + cat <<END >&2 + +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 + fi + +fi + +# as --version or ld --version might dump core. +rm -f try try.c +rm -f core + +# XXX +EOCBU + +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]*) + ccflags="-D_REENTRANT $ccflags" + + # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7 + case `uname -r` in + 5.[0-6] | 5.5.1) sched_yield_lib="posix4" ;; + *) sched_yield_lib="rt"; + esac + set `echo X "$libswanted "| sed -e "s/ c / $sched_yield_lib pthread c /"` + shift + libswanted="$*" + + # On Solaris 2.6 x86 there is a bug with sigsetjmp() and siglongjmp() + # when linked with the threads library, such that whatever positive + # value you pass to siglongjmp(), sigsetjmp() returns 1. + # Thanks to Simon Parsons <S.Parsons@ftel.co.uk> for this report. + # Sun BugID is 4117946, "sigsetjmp always returns 1 when called by + # siglongjmp in a MT program". As of 19980622, there is no patch + # available. + cat >try.c <<'EOM' + /* Test for sig(set|long)jmp bug. */ + #include <setjmp.h> + + main() + { + sigjmp_buf env; + int ret; + + ret = sigsetjmp(env, 1); + if (ret) { return ret == 2; } + siglongjmp(env, 2); + } +EOM + if test "`arch`" = i86pc -a `uname -r` = 5.6 && \ + ${cc:-cc} try.c -lpthread >/dev/null 2>&1 && ./a.out; then + d_sigsetjmp=$undef + cat << 'EOM' >&2 + +You will see a *** WHOA THERE!!! *** message from Configure for +d_sigsetjmp. Keep the recommended value. See hints/solaris_2.sh +for more information. + +EOM + fi + + # These prototypes should be visible since we using + # -D_REENTRANT, but that does not seem to work. + # It does seem to work for getnetbyaddr_r, weirdly enough, + # and other _r functions. (Solaris 8) + + d_ctermid_r_proto="$define" + d_gethostbyaddr_r_proto="$define" + d_gethostbyname_r_proto="$define" + d_getnetbyname_r_proto="$define" + d_getprotobyname_r_proto="$define" + d_getprotobynumber_r_proto="$define" + d_getservbyname_r_proto="$define" + d_getservbyport_r_proto="$define" + + # Ditto. (Solaris 7) + d_readdir_r_proto="$define" + d_readdir64_r_proto="$define" + d_tmpnam_r_proto="$define" + d_ttyname_r_proto="$define" + + ;; +esac +EOCBU + +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]*) + +# Keep these in the left margin. +ccflags_uselargefiles="`getconf LFS_CFLAGS 2>/dev/null`" +ldflags_uselargefiles="`getconf LFS_LDFLAGS 2>/dev/null`" +libswanted_uselargefiles="`getconf LFS_LIBS 2>/dev/null|sed -e 's@^-l@@' -e 's@ -l@ @g`" + + ccflags="$ccflags $ccflags_uselargefiles" + ldflags="$ldflags $ldflags_uselargefiles" + libswanted="$libswanted $libswanted_uselargefiles" + ;; +esac +EOCBU + +# This is truly a mess. +case "$usemorebits" in +"$define"|true|[yY]*) + use64bitint="$define" + uselongdouble="$define" + ;; +esac + +if test `uname -p` = "sparc"; then + 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 + 5.[0-4]) + cat >&4 <<EOM +Solaris `uname -r|sed -e 's/^5\./2./'` does not support 64-bit integers. +You should upgrade to at least Solaris 2.5. +EOM + exit 1 + ;; + esac + ;; +esac +# gcc-2.8.1 on Solaris 8 with -Duse64bitint fails op/pat.t test 822 +# if we compile regexec.c with -O. Turn off optimization for that one +# file. See hints/README.hints , especially +# =head2 Propagating variables to config.sh, method 3. +# A. Dougherty May 24, 2002 +case "$use64bitint" in +"$define") + case "${gccversion}-${optimize}" in + 2.8*-O*) + # Honor a command-line override (rather unlikely) + case "$regexec_cflags" in + '') echo "Disabling optimization on regexec.c for gcc $gccversion" >&4 + regexec_cflags='optimize=' + echo "regexec_cflags='optimize=\"\"'" >> config.sh + ;; + esac + ;; + esac + ;; +esac +EOCBU + + cat > UU/use64bitall.cbu <<'EOCBU' +# 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]*-) + case "`uname -r`" in + 5.[0-6]) + cat >&4 <<EOM +Solaris `uname -r|sed -e 's/^5\./2./'` does not support 64-bit pointers. +You should upgrade to at least Solaris 2.7. +EOM + exit 1 + ;; + esac + 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 + . ./workshoplibpth.cbu + case "$cc -v 2>/dev/null" in + *gcc*) + echo 'main() { return 0; }' > try.c + case "`${cc:-cc} -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in + *"m64 is not supported"*) + cat >&4 <<EOM + +Full 64-bit build is not supported by this gcc configuration. +Check http://gcc.gnu.org/ for the latest news of availability +of gcc for 64-bit Sparc. + +Cannot continue, aborting. + +EOM + exit 1 + ;; + esac + 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]*) + # CBUs expect to be run in UU + cd UU; . ./use64bitall.cbu; cd .. + ;; + esac +fi + +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]*) + if test -f /opt/SUNWspro/lib/libsunmath.so; then + # Unfortunately libpth has already been set and + # searched, so we need to add in everything manually. + libpth="$libpth /opt/SUNWspro/lib" + libs="$libs -lsunmath" + ldflags="$ldflags -L/opt/SUNWspro/lib -R/opt/SUNWspro/lib" + d_sqrtl=define + else + cat >&4 <<EOM + +The Sun Workshop math library is not installed; therefore I do not +know how to do long doubles, sorry. I'm disabling the use of long +doubles. +EOM + uselongdouble="$undef" + fi + ;; +esac +EOCBU + +rm -f try.c try.o try a.out diff --git a/hints/stellar.sh b/hints/stellar.sh new file mode 100644 index 0000000000..23e15e9091 --- /dev/null +++ b/hints/stellar.sh @@ -0,0 +1,2 @@ +optimize="-O0" +ccflags="$ccflags -nw" diff --git a/hints/sunos_4_0.sh b/hints/sunos_4_0.sh new file mode 100644 index 0000000000..56a87bf5be --- /dev/null +++ b/hints/sunos_4_0.sh @@ -0,0 +1,2 @@ +ccflags="$ccflags -DFPUTS_BOTCH" +i_unistd=$undef diff --git a/hints/sunos_4_1.sh b/hints/sunos_4_1.sh new file mode 100644 index 0000000000..af0bca1398 --- /dev/null +++ b/hints/sunos_4_1.sh @@ -0,0 +1,84 @@ +# hints/sunos_4_1.sh +# Last modified: Wed May 27 11:00:02 EDT 1998 +# Andy Dougherty <doughera@lafcol.lafayette.edu> + +case "$cc" in +*gcc*) usevfork=false + # GNU as and GNU ld might not work. See the INSTALL file. + ;; +*) usevfork=true ;; +esac + +# Configure will issue a WHOA warning. The problem is that +# Configure finds getzname, not tzname. If you're in the System V +# environment, you can set d_tzname='define' since tzname[] is +# available in the System V environment. +d_tzname='undef' + +# Configure will issue a WHOA warning. The problem is that unistd.h +# contains incorrect prototypes for some functions in the usual +# BSD-ish environment. In particular, it has +# extern int getgroups(/* int gidsetsize, gid_t grouplist[] */); +# but groupslist[] ought to be of type int, not gid_t. +# This is only really a problem for perl if the +# user is using gcc, and not running in the SysV environment. +# 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 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 + +You will probably see *** WHOA THERE!!! *** messages from Configure for +d_tzname and i_unistd. Keep the recommended values. See +hints/sunos_4_1.sh for more information. +EOM + +# The correct setting of groupstype depends on which version of the C +# library is used. If you are in the 'System V environment' +# (i.e. you have /usr/5bin ahead of /usr/bin in your PATH), and +# you use Sun's cc compiler, then you'll pick up /usr/5bin/cc, which +# links against the C library in /usr/5lib. This library has +# groupstype='gid_t'. +# If you are in the normal BSDish environment, then you'll pick up +# /usr/ucb/cc, which links against the C library in /usr/lib. That +# library has groupstype='int'. +# +# If you are using gcc, it links against the C library in /usr/lib +# independent of whether or not you are in the 'System V environment'. +# If you want to use the System V libraries, then you need to +# manually set groupstype='gid_t' and add explicit references to +# /usr/5lib when Configure prompts you for where to look for libraries. +# +# Check if user is in a bsd or system 5 type environment +if cat -b /dev/null 2>/dev/null +then # bsd + groupstype='int' +else # sys5 + case "$cc" in + *gcc*) groupstype='int';; # gcc doesn't do anything special + *) groupstype='gid_t';; # /usr/5bin/cc pulls in /usr/5lib/ stuff. + esac +fi + +# If you get the message "unresolved symbol '__lib_version' " while +# linking, your system probably has the optional 'acc' compiler (and +# libraries) installed, but you are using the bundled 'cc' compiler with +# the unbundled libraries. The solution is either to use 'acc' and the +# unbundled libraries (specifically /lib/libm.a), or 'cc' and the bundled +# library. +# +# Thanks to William Setzer <William_Setzer@ncsu.edu> for this info. diff --git a/hints/super-ux.sh b/hints/super-ux.sh new file mode 100644 index 0000000000..8f9592b893 --- /dev/null +++ b/hints/super-ux.sh @@ -0,0 +1,20 @@ +# Len Makin <len@hpc.CSIRO.AU> + +# No dynamically loaded libraries +so='none' + +case "$optimize" in +# No compile option -O +'') optimize='-h2' ;; +esac + +# size_t is 32 bits. Next version of compiler will have -hsize_t64 +# enabling size_t to be 64 bits. +# Current cc version 4.80 allows -hsubscript64 for 64 bit array subscripts. +ccflags="$ccflags -hxint -hmath vector -hsubscript64" + +case "$usemymalloc" in +'') # The perl malloc.c SHOULD work + usemymalloc='y' + ;; +esac diff --git a/hints/svr4.sh b/hints/svr4.sh new file mode 100644 index 0000000000..b3be9ac40b --- /dev/null +++ b/hints/svr4.sh @@ -0,0 +1,163 @@ +# svr4 hints, System V Release 4.x +# Last modified 1996/10/25 by Tye McQueen, tye@metronet.com +# Merged 1998/04/23 with perl5.004_04 distribution by +# Andy Dougherty <doughera@lafayette.edu> + +# Use Configure -Dcc=gcc to use gcc. +case "$cc" in +'') cc='/bin/cc' + test -f $cc || cc='/usr/ccs/bin/cc' + ;; +esac + +# We include support for using libraries in /usr/ucblib, but the setting +# of libswanted excludes some libraries found there. If you run into +# problems, you may have to remove "ucb" from libswanted. Just delete +# the comment '#' from the sed command below. +ldflags='-L/usr/ccs/lib -L/usr/ucblib' +ccflags='-I/usr/include -I/usr/ucbinclude' +# Don't use problematic libraries: +libswanted=`echo " $libswanted " | sed -e 's/ malloc / /'` # -e 's/ ucb / /'` +# libmalloc.a - Probably using Perl's malloc() anyway. +# libucb.a - Remove it if you have problems ld'ing. We include it because +# it is needed for ODBM_File and NDBM_File extensions. + +if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library: + gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert(). + # Use the "native" counterparts, not the BSD emulation stuff: + d_bcmp='undef' d_bcopy='undef' d_bzero='undef' d_safebcpy='undef' + d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef' + d_setlinebuf='undef' + # d_setregid='undef' d_setreuid='undef' # ??? +fi + +# UnixWare has /usr/lib/libc.so.1, /usr/lib/libc.so.1.1, and +# /usr/ccs/lib/libc.so. Configure chooses libc.so.1.1 while it +# appears that /usr/ccs/lib/libc.so contains more symbols: +# +# Try the following if you want to use nm-extraction. We'll just +# skip the nm-extraction phase, since searching for all the different +# library versions will be hard to keep up-to-date. +# +# if [ "" = "$libc" -a -f /usr/ccs/lib/libc.so -a \ +# -f /usr/lib/libc.so.1 -a -f /usr/lib/libc.so.1.1 ]; then +# if nm -h /usr/ccs/lib/libc.so | egrep '\<_?select$' >/dev/null; then +# if nm -h /usr/lib/libc.so.1 | egrep '\<_?select$'` >/dev/null || +# nm -h /usr/lib/libc.so.1.1 | egrep '\<_?select$'` >/dev/null; then +# : +# else +# libc=/usr/ccs/lib/libc.so +# fi +# fi +# fi +# +# Don't bother with nm. Just compile & link a small C program. +case "$usenm" in +'') usenm=false;; +esac + +# 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. The undocumented -X argument to uname +# is probably a reasonable way of detecting UnixWare. +# UnixWare has a broken csh. (This might already be detected above). +# In Unixware 2.1.1 the fields in FILE* got renamed! +# Unixware 1.1 can't cast large floats to 32-bit ints. +# 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 -X 2>&1 | grep Release` + +if [ "$uw_isuw" = "Release = 4.2" ]; then + case $uw_ver in + 1.1) + d_casti32='undef' + ;; + esac +fi +if [ "$uw_isuw" = "Release = 4.2MP" ]; then + case $uw_ver in + 2.1) + d_csh='undef' + d_memcpy='define' + d_memset='define' + ;; + 2.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' + ;; + esac +fi +if [ "$uw_isuw" = "Release = 5" ]; then + case $uw_ver in + 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. + +# DDE SMES Supermax Enterprise Server +case "`uname -sm`" in +"UNIX_SV SMES") + # the *grent functions are in libgen. + libswanted="$libswanted gen" + # csh is broken (also) in SMES + # This may already be detected by the generic test above. + d_csh='undef' + case "$cc" in + *gcc*) ;; + *) # for cc we need -K PIC (not -K pic) + cccdlflags="$cccdlflags -K PIC" + ;; + esac + ;; +esac + +# NCR MP-RAS. Thanks to Doug Hendricks for this info. +# The output of uname -a looks like this +# foo foo 4.0 3.0 3441 Pentium III(TM)-ISA/PCI +# Similar errors reported for +# foo foo 4.0 3.0 4400 pentium ii(tm)-isapci ' + +# Configure sets osname=svr4.0, osvers=3.0, archname='3441-svr4.0' +case "$myuname" in +*3441*|*4400*isapci) + # With the NCR High Performance C Compiler R3.0c, miniperl fails + # t/op/regexp.t test 461 unless we compile with optimizie=-g. + # The whole O/S is being phased out, so more detailed probing + # is probably not warranted. + case "$optimize" in + '') optimize='-g' ;; + esac + ;; +esac + +# Configure may fail to find lstat() since it's a static/inline function +# in <sys/stat.h> on Unisys U6000 SVR4, UnixWare 2.x, and possibly other +# SVR4 derivatives. (Though UnixWare has it in /usr/ccs/lib/libc.so.) +d_lstat=define + +d_suidsafe='define' # "./Configure -d" can't figure this out easilly + diff --git a/hints/svr5.sh b/hints/svr5.sh new file mode 100644 index 0000000000..47f7aff2c1 --- /dev/null +++ b/hints/svr5.sh @@ -0,0 +1,226 @@ +# 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 + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi + case $gccversion in + *2.95*) + ccflags='-fno-strict-aliasing' + # More optimisation provided in gcc-2.95 causes miniperl to segv. + # -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 ... +gconvert_preference='gcvt sprintf' # Try gcvt() before gconvert(). +d_bcopy='undef' d_bcmp='undef' d_bzero='undef' d_safebcpy='undef' +d_index='undef' d_killpg='undef' d_getprior='undef' d_setprior='undef' +d_setlinebuf='undef' +d_setregid='undef' d_setreuid='undef' # -- in /usr/lib/libc.so.1 + + +# Broken C-Shell tests (Thanks to Tye McQueen): +# The OS-specific checks may be obsoleted by the this generic test. + sh_cnt=`sh -c 'echo /*' | wc -c` + 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 if the user doesn't choose otherwise +if test "x$useshrplib" = "x"; then + useshrplib='true' +fi + +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/hints/t001.c b/hints/t001.c new file mode 100644 index 0000000000..51fdefda84 --- /dev/null +++ b/hints/t001.c @@ -0,0 +1,90 @@ +/* Beginning of modification history */ +/* Written 02-04-10 by Paul Green (Paul.Green@stratus.com) */ +/* End of modification history */ + +/* This test case is extracted from Perl version 5.7.3. It is + in the Perl_unpack_str function of the pp_pack.c source file. + + GCC 2.95.2 improperly assumes that it can compensate for an + extra fsub by performing a fadd. This would work in + fixed-point arithmetic, but does not work in floating-point + arithmetic. + + This problem has been seen on HP-UX and on Stratus VOS, both + of which have an HP PA-RISC target (hppa1.1). The Stratus + bug number is gnu_g++-220. */ + +/* #define _POSIX_C_SOURCE 199506L -- added by Configure */ +#include <stdio.h> +#include <string.h> +#include <math.h> + +void test(double *result) +{ + float afloat; + double adouble; + int checksum = 0; + unsigned cuv = 0; + double cdouble = 0.0; + const int bits_in_uv = 8 * sizeof(cuv); + + checksum = 53; + cdouble = -1.0; + + if (checksum) { + if (checksum > bits_in_uv) { + double trouble; + + adouble = (double) (1 << (checksum & 15)); + + while (checksum >= 16) { + checksum -= 16; + adouble *= 65536.0; + } + + /* At -O1, GCC 2.95.2 compiles the following loop + into: + + L$0014 + fcmp,dbl,>= %fr4,%fr0 + ftest + b L$0014 + fadd,dbl %fr4,%fr12,%fr4 + fsub,dbl %fr4,%fr12,%fr4 + + This code depends on the floading-add and + floating-subtract retaining all of the + precision present in the operands. There is + no such guarantee when using floating-point, + as this test case demonstrates. + + The code is okay at -O0. */ + + while (cdouble < 0.0) + cdouble += adouble; + + cdouble = modf (cdouble / adouble, &trouble) * adouble; + } + } + + *result = cdouble; +} + +int main (int argc, char ** argv) +{ +double value; + + test (&value); + + if (argc == 2 && !strcmp(argv[1],"-v")) + printf ("value = %.18e\n", value); + + if (value != 9.007199254740991e+15) { + printf ("t001 fails!\n"); + return -1; + } + else { + printf ("t001 works.\n"); + return 0; + } +} diff --git a/hints/ti1500.sh b/hints/ti1500.sh new file mode 100644 index 0000000000..69482d8680 --- /dev/null +++ b/hints/ti1500.sh @@ -0,0 +1 @@ +usemymalloc='n' diff --git a/hints/titanos.sh b/hints/titanos.sh new file mode 100644 index 0000000000..88a3e7a963 --- /dev/null +++ b/hints/titanos.sh @@ -0,0 +1,38 @@ +# Hints file (perl 4.019) for Kubota Pacific's Titan 3000 Series Machines. +# Created by: JT McDuffie (jt@kpc.com) 26 DEC 1991 +# p5ed by: Jarkko Hietaniemi <jhi@iki.fi> Aug 27 1994 +# NOTE: You should run Configure with tcsh (yes, tcsh). +# Comments by Andy Dougherty <doughera@lafcol.lafayette.edu> 28 Mar 1995 +alignbytes="8" +byteorder="4321" +castflags='0' +gidtype='ushort' +groupstype='unsigned short' +intsize='4' +usenm='true' +nm_opt='-eh' +malloctype='void *' +ccflags="$ccflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C" +cppflags="$cppflags -I/usr/include/net -DDEBUGGING -DSTANDARD_C" +stdchar='unsigned char' +# +# Apparently there are some harmful libs in Configure's $libswanted. +# Perl5.000 had: libs='-lnsl -ldbm -lPW -lmalloc -lm' +# Unfortunately, this line prevents users from including things like +# -lgdbm and -ldb, which they may or may not have or want. +# We should probably fiddle with libswanted instead of libs. +# And even there, we should only bother to delete harmful libraries. +# However, I don't know what they are or why they should be deleted, +# so this will have to do for now. --AD 28 Mar 1995 +libswanted='sfio nsl dbm gdbm db PW malloc m' +# +# Extensions: This system can not compile POSIX. We'll let Configure +# figure out the others. +useposix='n' +# +uidtype='ushort' +voidflags='7' +inclwanted='/usr/include /usr/include/net' +# Setting libpth shouldn't be needed any more. +# libpth='/usr/lib /usr/local/lib /lib' +pth='. /bin /usr/bin /usr/ucb /usr/local/bin /usr/X11/bin /usr/lbin /etc /usr/lib' diff --git a/hints/ultrix_4.sh b/hints/ultrix_4.sh new file mode 100644 index 0000000000..aac5ce38f6 --- /dev/null +++ b/hints/ultrix_4.sh @@ -0,0 +1,70 @@ +# hints/ultrix_4.sh +# Last updated by Andy Dougherty <doughera@lafcol.lafayette.edu> +# Fri Feb 10 10:04:51 EST 1995 +# +# Use Configure -Dcc=gcc to use gcc. +# +# This used to use -g, but that pulls in -DDEBUGGING by default. +case "$optimize" in +'') + # recent versions have a working compiler. + case "$osvers" in + *4.[45]*) optimize='-O2' ;; + *) optimize='none' ;; + esac + ;; +esac + +# Some users have reported Configure runs *much* faster if you +# replace all occurrences of /bin/sh by /bin/sh5 +# Something like: +# sed 's!/bin/sh!/bin/sh5!g' Configure > Configure.sh5 +# Then run "sh5 Configure.sh5 [your options]" + +case "$myuname" in +*risc*) cat <<EOF >&4 +Note that there is a bug in some versions of NFS on the DECStation that +may cause utime() to work incorrectly. If so, regression test io/fs +may fail if run under NFS. Ignore the failure. +EOF +esac + +# Compiler flags that depend on osversion: +case "$cc" in +*gcc*) ;; +*) + case "$osvers" in + *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 3800" ;; + *) ccflags="$ccflags -std -Olimit 3800" ;; + esac + ;; +esac + +# Other settings that depend on $osvers: +case "$osvers" in +*4.1*) ;; +*4.2*) libswanted=`echo $libswanted | sed 's/ malloc / /'` ;; +*4.3*) ;; +*) ranlib='ranlib' ;; +esac + +# Settings that don't depend on $osvers: + +util_cflags='ccflags="$ccflags -DLOCALE_ENVIRON_REQUIRED"' +groupstype='int' +# This will cause a WHOA THERE warning, but it's accurate. The +# 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/hints/umips.sh b/hints/umips.sh new file mode 100644 index 0000000000..17d5ff4623 --- /dev/null +++ b/hints/umips.sh @@ -0,0 +1,39 @@ +# hints/umips.sh +# +# Mips R3030 / Bruker AspectSation running RISC/os (UMIPS) 4.52 +# compiling with gcc 2.7.2 +# +# Created Sat Aug 17 00:17:15 MET DST 1996 +# by Guenter Schmidt <gsc@bruker.de> +# +# uname -a output looks like this: +# xxx xxx 4_52 umips mips + +# Speculative notes on getting cc to work added by +# Andy Dougherty <doughera@lafcol.lafayette.edu> +# Tue Aug 20 21:51:49 EDT 1996 + +# Recommend the GNU C Compiler +case "$cc" in +'') echo 'gcc 2.7.2 (or later) is recommended. Use Configure -Dcc=gcc' >&4 + # The test with the native compiler not succeed: + # `sh cflags libperl.a miniperlmain.o` miniperlmain.c + # CCCMD = cc -c -I/usr/local/include -I/usr/include/bsd -DLANGUAGE_C -O + # ccom: Error: ./mg.h, line 12: redeclaration of formal parameter, sv + # int (*svt_set) (SV *sv, MAGIC* mg); + # ------------------------------------------^ + # ccom: Error: ./mg.h, line 12: redeclaration of formal parameter, mg + # This is probably a result of incomplete prototype support. + prototype=undef + ;; +esac + +# POSIX support in RiscOS is not useable +useposix='false' + +# Will give WHOA message, but the prototype are defined in the GCC inc dirs +case "$cc" in +*gcc*) d_shmatprototype='define' ;; +esac + +glibpth="$glibpth /usr/lib/cmplrs/cc" diff --git a/hints/unicos.sh b/hints/unicos.sh new file mode 100644 index 0000000000..2af5f283ed --- /dev/null +++ b/hints/unicos.sh @@ -0,0 +1,54 @@ +case `uname -r` in +6.1*) shellflags="-m+65536" ;; +esac +case "$optimize" in +# If we used fastmd (the default) integer values would be limited to 46 bits. +# --Mark P. Lutz +'') optimize="$optimize -h nofastmd" ;; +esac +# The default is to die in runtime on math overflows. +# Let's not do that. --jhi +ccflags="$ccflags -h matherror=errno" + +# Cray floating point (cfp) CPUs need -h rounddiv +# (It gives int((2/3)*3) a chance to be 2, not 1. --jhi) +# (but IEEE CPUs, IEEE/ieee/CPE1 CPUs should not have -h rounddiv, +# since the compiler on those CPUs doesn't even support the option.) +if /etc/cpu -i | grep -q cfp +then + ccflags="$ccflags -h rounddiv" +fi + +# Avoid an optimizer bug where a volatile variables +# isn't correctly saved and restored --Mark P. Lutz +pp_ctl_cflags='ccflags="$ccflags -h scalar0 -h vector0"' +# Otherwise the unpack %65c checksums will fail. +pp_pack_cflags='optimize="$ccflags -h scalar0 -h vector0"' +case "$usemymalloc" in +'') # The perl malloc.c SHOULD work says Ilya. + # But for the time being (5.004_68), alas, it doesn't. --jhi + # usemymalloc='y' + # ccflags="$ccflags -DNO_RCHECK" + usemymalloc='n' + ;; +esac +# Configure gets fooled for some reason, these do not exist. +d_getpgid='undef' +d_setitimer='undef' +# These exist but do not really work. +d_setregid='undef' +d_setreuid='undef' +# No shared libraries. +so='none' +# Threads call-back unit. +cat > UU/usethreads.cbu <<'EOCBU' +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +case "$usethreads" in +$define|true|[yY]*) + set `echo X "$libswanted "| sed -e "s/ c / pthread c /"` + shift + libswanted="$*" + ;; +esac +EOCBU diff --git a/hints/unicosmk.sh b/hints/unicosmk.sh new file mode 100644 index 0000000000..6045fcfac9 --- /dev/null +++ b/hints/unicosmk.sh @@ -0,0 +1,46 @@ +case "$optimize" in +'') optimize="-O1" ;; +esac +d_setregid='undef' +d_setreuid='undef' +case "$usemymalloc" in +'') usemymalloc='y' + 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 +# Otherwise the unpack %65c checksums will fail. +pp_pack_cflags='optimize="-h scalar0 -h vector0"' +# No shared libraries. +so='none' +# Threads call-back unit. +cat > UU/usethreads.cbu <<'EOCBU' +# This script UU/usethreads.cbu will get 'called-back' by Configure +# after it has prompted the user for whether to use threads. +case "$usethreads" in +$define|true|[yY]*) + set `echo X "$libswanted "| sed -e "s/ c / pthread c /"` + shift + libswanted="$*" + ;; +esac +EOCBU diff --git a/hints/unisysdynix.sh b/hints/unisysdynix.sh new file mode 100644 index 0000000000..4251ba8d47 --- /dev/null +++ b/hints/unisysdynix.sh @@ -0,0 +1 @@ +d_waitpid=undef diff --git a/hints/utekv.sh b/hints/utekv.sh new file mode 100644 index 0000000000..95a31fdedf --- /dev/null +++ b/hints/utekv.sh @@ -0,0 +1,12 @@ +# XD88/10 UTekV hints by Kaveh Ghazi (ghazi@caip.rutgers.edu) 2/11/92 +# Modified by Andy Dougherty <doughera@lafcol.lafayette.edu> 4 Oct. 1994 + +# The -X18 is only if you are using the Greenhills compiler. +ccflags="$ccflags -X18" + +usemymalloc='y' + +echo " " >&4 +echo "NOTE: You may have to take out makefile dependencies on the files in" >&4 +echo "/usr/include (i.e. /usr/include/ctype.h) or the make will fail. A" >&4 +echo "simple 'grep -v /usr/include/ makefile' should suffice." >&4 diff --git a/hints/uts.sh b/hints/uts.sh new file mode 100644 index 0000000000..eb0d78ce11 --- /dev/null +++ b/hints/uts.sh @@ -0,0 +1,32 @@ +archname='s390' +archobjs='uts/strtol_wrap.o uts/sprintf_wrap.o' +cc='cc -Xa' +ccflags='-XTSTRINGS=1500000 -DStrtol=strtol_wrap32 -DStrtoul=strtoul_wrap32 -DSPRINTF_E_BUG' +cccdlflags='-pic' +d_bincompat3='undef' +d_csh='undef' +d_lstat='define' +d_suidsafe='define' +dlsrc='dl_dlopen.xs' +i_ieeefp='undef' +ld='ld' +lddlflags='-G -z text' +libperl='libperl.so' +libpth='/lib /usr/lib /usr/ccs/lib' +libs='-lsocket -lnsl -ldl -lm' +libswanted='m' +prefix='/usr/local' +toke_cflags='optimize=""' +useshrplib='define' + +################################# +# Some less routine stuff: +################################# +cc -g -Xa -c -pic -O uts/strtol_wrap.c -o uts/strtol_wrap.o +cc -g -Xa -c -pic -O uts/sprintf_wrap.c -o uts/sprintf_wrap.o +# Make POSIX a static extension. +cat <<'EOSH' > config.over +static_ext='POSIX B' +dynamic_ext=`echo " $dynamic_ext " | + sed -e 's/ POSIX / /' -e 's/ B / /'` +EOSH diff --git a/hints/uwin.sh b/hints/uwin.sh new file mode 100644 index 0000000000..c05d9eb8dc --- /dev/null +++ b/hints/uwin.sh @@ -0,0 +1,36 @@ +# +# hint file for U/WIN (UNIX for Windows 95/NT) +# +# created for U/WIN version 1.55 +# running under Windows NT 4.0 SP 3 +# using MSVC++ 5.0 for the compiler +# +# created by Joe Buehler (jbuehler@hekimian.com) +# +# for information about U/WIN see www.gtlinc.com +# + +#ccflags=-D_BSDCOMPAT +# confusion in Configure over preprocessor +cppstdin=`pwd`/cppstdin +cpprun=`pwd`/cppstdin +# pwd.h confuses Configure +d_pwcomment=undef +d_pwgecos=define +# work around case-insensitive file names +firstmakefile=GNUmakefile +# avoid compilation error +i_utime=undef +# compile/link flags +ldflags=-g +optimize=-g +static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::scalar POSIX SDBM_File Socket Storable Unicode::Normalize attrs re" +#static_ext=none +# dynamic loading needs work +usedl=undef +# perl malloc will not work +usemymalloc=n +# cannot use nm +usenm=undef +# vfork() is buggy (as of 1.55 anyway) +usevfork=false diff --git a/hints/vmesa.sh b/hints/vmesa.sh new file mode 100644 index 0000000000..5fad22bf8b --- /dev/null +++ b/hints/vmesa.sh @@ -0,0 +1,336 @@ +# 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="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='' +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 *' +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 Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Thread Time/HiRes Time/Piece attrs re' +stdchar='char' +stdio_cnt='(fp)->__countIn' +stdio_ptr='(fp)->__bufPtr' +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' diff --git a/hints/vos.sh b/hints/vos.sh new file mode 100644 index 0000000000..fcadaa66fd --- /dev/null +++ b/hints/vos.sh @@ -0,0 +1,145 @@ +# $Id: vos.sh 821 2002-10-22 11:14:00Z richardc $ + +# This is a hints file for Stratus VOS, using the POSIX environment +# in VOS 14.4.0 and higher. +# +# VOS POSIX is based on POSIX.1-1996. It ships with gcc as the standard +# compiler. +# +# Paul Green (Paul.Green@stratus.com) + +# C compiler and default options. +cc=gcc +ccflags="-D_SVID_SOURCE -D_POSIX_C_SOURCE=199509L" + +# Make command. +make="/system/gnu_library/bin/gmake" +# indented to not put it into config.sh + _make="/system/gnu_library/bin/gmake" + +# Architecture name +archname="hppa1.1" + +# Executable suffix. +# No, this is not a typo. The ".pm" really is the native +# executable suffix in VOS. Talk about cosmic resonance. +_exe=".pm" + +# Object library paths. +loclibpth="/system/stcp/object_library" +loclibpth="$loclibpth /system/stcp/object_library/common" +loclibpth="$loclibpth /system/stcp/object_library/net" +loclibpth="$loclibpth /system/stcp/object_library/socket" +loclibpth="$loclibpth /system/posix_object_library/sysv" +loclibpth="$loclibpth /system/posix_object_library" +loclibpth="$loclibpth /system/c_object_library" +loclibpth="$loclibpth /system/object_library" +glibpth="$loclibpth" + +# Include library paths +locincpth="/system/stcp/include_library" +locincpth="$locincpth /system/include_library/sysv" +usrinc="/system/include_library" + +# Where to install perl5. +prefix=/system/ported/perl5 + +# Linker is gcc. +ld="gcc" + +# No shared libraries. +so="none" + +# Don't use nm. +usenm="n" + +# Make the default be no large file support. +uselargefiles="n" + +# Don't use malloc that comes with perl. +usemymalloc="n" + +# Make bison the default compiler-compiler. +yacc="/system/gnu_library/bin/bison" + +# VOS doesn't have (or need) a pager, but perl needs one. +pager="/system/gnu_library/bin/cat.pm" + +# VOS has a bug that causes _exit() to flush all files. +# This confuses the tests. Make 'em happy here. +fflushNULL=define + +# VOS has a link() function but it is a dummy. +d_link="undef" + +# VOS does not have truncate() but we supply one in vos.c +d_truncate="define" +archobjs="vos.o" + +# Help gmake find vos.c +test -h vos.c || ln -s vos/vos.c vos.c + +# VOS returns a constant 1 for st_nlink when stat'ing a +# directory. Therefore, we must set this variable to stop +# File::Find using the link count to determine whether there are +# subdirectories to be searched. +dont_use_nlink=define + +# Tell Configure where to find the hosts file. +hostcat="cat /system/stcp/hosts" + +# VOS does not have socketpair() but we supply one in vos.c +d_sockpair="define" + +# Once we have the compiler flags defined, Configure will +# execute the following call-back script. See hints/README.hints +# for details. +cat > UU/cc.cbu <<'EOCBU' +# This script UU/cc.cbu will get 'called-back' by Configure after it +# has prompted the user for the C compiler to use. + +# Compile and run the a test case to see if bug gnu_g++-220 is +# present. If so, lower the optimization level when compiling +# pp_pack.c. This works around a bug in unpack. + +echo " " +echo "Testing whether bug gnu_g++-220 is fixed in your compiler..." + +# Try compiling the test case. +if $cc -o t001 -O $ccflags $ldflags ../hints/t001.c; then + gccbug=`$run ./t001` + if [ "X$gccversion" = "X" ]; then + # Done too late in Configure if hinted + gccversion=`$cc --version | sed 's/.*(GCC) *//'` + fi + case "$gccbug" in + *fails*) cat >&4 <<EOF +This C compiler ($gccversion) is known to have optimizer +problems when compiling pp_pack.c. The Stratus bug number +for this problem is gnu_g++-220. + +Disabling optimization for pp_pack.c. +EOF + case "$pp_pack_cflags" in + '') pp_pack_cflags='optimize=' + echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;; + *) echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;; + esac + ;; + *) echo "Your compiler is ok." >&4 + ;; + esac +else + echo " " + echo "*** WHOA THERE!!! ***" >&4 + echo " Your C compiler \"$cc\" doesn't seem to be working!" >&4 + case "$knowitall" in + '') + echo " You'd better start hunting for one and let me know about it." >&4 + exit 1 + ;; + esac +fi + +$rm -f t001$_o t001$_exe t001.kp +EOCBU |