| [76b06f6] | 1 | Submitted By: Jonathan Norman <Jonathan at bluesquarelinux.co.uk> | 
|---|
|  | 2 | Date: 2011-05-17 | 
|---|
|  | 3 | Initial Package Version: 5.8.8 | 
|---|
|  | 4 | Origin: Ryan Oliver | 
|---|
|  | 5 | Upstream Status: Unknown | 
|---|
|  | 6 | Description: This patch adapts some hard-wired paths to the C library. | 
|---|
|  | 7 | It uses the $prefix variable to locate the correct libc. | 
|---|
|  | 8 |  | 
|---|
|  | 9 | Rediffed: Against 5.10.0 by Joe Ciccone on 2008-08-30 | 
|---|
|  | 10 | Against 5.10.1 By Jim Gifford on 2009-08-25 | 
|---|
|  | 11 | Against 5.12.1 By Joe Ciccone on 2010-08-01 | 
|---|
|  | 12 | Against 5.14.0 By Jonathan Norman on 2011-05-17 | 
|---|
|  | 13 | Against 5.16.1 by William Harrington on 2012-08-26 | 
|---|
|  | 14 | Rename for 5.16.2 by William Harrington on 2012-11-01 | 
|---|
|  | 15 |  | 
|---|
|  | 16 | diff -Naur perl-5.16.1.orig/hints/linux.sh perl-5.16.1/hints/linux.sh | 
|---|
|  | 17 | --- perl-5.16.1.orig/hints/linux.sh     2012-06-05 12:45:26.000000000 +0000 | 
|---|
|  | 18 | +++ perl-5.16.1/hints/linux.sh  2012-08-26 02:24:16.024909438 +0000 | 
|---|
|  | 19 | @@ -66,9 +66,9 @@ | 
|---|
|  | 20 | # We don't use __GLIBC__ and  __GLIBC_MINOR__ because they | 
|---|
|  | 21 | # are insufficiently precise to distinguish things like | 
|---|
|  | 22 | # libc-2.0.6 and libc-2.0.7. | 
|---|
|  | 23 | -if test -L /lib/libc.so.6; then | 
|---|
|  | 24 | -    libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'` | 
|---|
|  | 25 | -    libc=/lib/$libc | 
|---|
|  | 26 | +if test -L ${prefix}/lib/libc.so.6; then | 
|---|
|  | 27 | +    libc=`ls -l ${prefix}/lib/libc.so.6 | awk '{print $NF}'` | 
|---|
|  | 28 | +    libc=${prefix}/lib/$libc | 
|---|
|  | 29 | fi | 
|---|
|  | 30 |  | 
|---|
|  | 31 | # Configure may fail to find lstat() since it's a static/inline | 
|---|
|  | 32 | @@ -466,3 +466,9 @@ | 
|---|
|  | 33 | libswanted="$libswanted pthread" | 
|---|
|  | 34 | ;; | 
|---|
|  | 35 | esac | 
|---|
|  | 36 | + | 
|---|
|  | 37 | +locincpth="" | 
|---|
|  | 38 | +loclibpth="" | 
|---|
|  | 39 | +glibpth="${prefix}/lib" | 
|---|
|  | 40 | +usrinc="${prefix}/include" | 
|---|
|  | 41 | + | 
|---|
|  | 42 | diff -Naur perl-5.16.1.orig/hints/linux.sh.orig perl-5.16.1/hints/linux.sh.orig | 
|---|
|  | 43 | --- perl-5.16.1.orig/hints/linux.sh.orig        1970-01-01 00:00:00.000000000 +0000 | 
|---|
|  | 44 | +++ perl-5.16.1/hints/linux.sh.orig     2012-06-05 12:45:26.000000000 +0000 | 
|---|
|  | 45 | @@ -0,0 +1,468 @@ | 
|---|
|  | 46 | +# hints/linux.sh | 
|---|
|  | 47 | +# Original version by rsanders | 
|---|
|  | 48 | +# Additional support by Kenneth Albanowski <kjahds@kjahds.com> | 
|---|
|  | 49 | +# | 
|---|
|  | 50 | +# ELF support by H.J. Lu <hjl@nynexst.com> | 
|---|
|  | 51 | +# Additional info from Nigel Head <nhead@ESOC.bitnet> | 
|---|
|  | 52 | +# and Kenneth Albanowski <kjahds@kjahds.com> | 
|---|
|  | 53 | +# | 
|---|
|  | 54 | +# Consolidated by Andy Dougherty <doughera@lafayette.edu> | 
|---|
|  | 55 | +# | 
|---|
|  | 56 | +# Updated Thu Feb  8 11:56:10 EST 1996 | 
|---|
|  | 57 | + | 
|---|
|  | 58 | +# Updated Thu May 30 10:50:22 EDT 1996 by <doughera@lafayette.edu> | 
|---|
|  | 59 | + | 
|---|
|  | 60 | +# Updated Fri Jun 21 11:07:54 EDT 1996 | 
|---|
|  | 61 | +# NDBM support for ELF re-enabled by <kjahds@kjahds.com> | 
|---|
|  | 62 | + | 
|---|
|  | 63 | +# No version of Linux supports setuid scripts. | 
|---|
|  | 64 | +d_suidsafe='undef' | 
|---|
|  | 65 | + | 
|---|
|  | 66 | +# No version of Linux needs libutil for perl. | 
|---|
|  | 67 | +i_libutil='undef' | 
|---|
|  | 68 | + | 
|---|
|  | 69 | +# Debian and Red Hat, and perhaps other vendors, provide both runtime and | 
|---|
|  | 70 | +# development packages for some libraries.  The runtime packages contain shared | 
|---|
|  | 71 | +# libraries with version information in their names (e.g., libgdbm.so.1.7.3); | 
|---|
|  | 72 | +# the development packages supplement this with versionless shared libraries | 
|---|
|  | 73 | +# (e.g., libgdbm.so). | 
|---|
|  | 74 | +# | 
|---|
|  | 75 | +# If you want to link against such a library, you must install the development | 
|---|
|  | 76 | +# version of the package. | 
|---|
|  | 77 | +# | 
|---|
|  | 78 | +# These packages use a -dev naming convention in both Debian and Red Hat: | 
|---|
|  | 79 | +#   libgdbmg1  (non-development version of GNU libc 2-linked GDBM library) | 
|---|
|  | 80 | +#   libgdbmg1-dev (development version of GNU libc 2-linked GDBM library) | 
|---|
|  | 81 | +# So make sure that for any libraries you wish to link Perl with under | 
|---|
|  | 82 | +# Debian or Red Hat you have the -dev packages installed. | 
|---|
|  | 83 | + | 
|---|
|  | 84 | +# SuSE Linux can be used as cross-compilation host for Cray XT4 Catamount/Qk. | 
|---|
|  | 85 | +if test -d /opt/xt-pe | 
|---|
|  | 86 | +then | 
|---|
|  | 87 | +  case "`cc -V 2>&1`" in | 
|---|
|  | 88 | +  *catamount*) . hints/catamount.sh; return ;; | 
|---|
|  | 89 | +  esac | 
|---|
|  | 90 | +fi | 
|---|
|  | 91 | + | 
|---|
|  | 92 | +# Some operating systems (e.g., Solaris 2.6) will link to a versioned shared | 
|---|
|  | 93 | +# library implicitly.  For example, on Solaris, `ld foo.o -lgdbm' will find an | 
|---|
|  | 94 | +# appropriate version of libgdbm, if one is available; Linux, however, doesn't | 
|---|
|  | 95 | +# do the implicit mapping. | 
|---|
|  | 96 | +ignore_versioned_solibs='y' | 
|---|
|  | 97 | + | 
|---|
|  | 98 | +# BSD compatibility library no longer needed | 
|---|
|  | 99 | +# 'kaffe' has a /usr/lib/libnet.so which is not at all relevant for perl. | 
|---|
|  | 100 | +# bind causes issues with several reentrant functions | 
|---|
|  | 101 | +set `echo X "$libswanted "| sed -e 's/ bsd / /' -e 's/ net / /' -e 's/ bind / /'` | 
|---|
|  | 102 | +shift | 
|---|
|  | 103 | +libswanted="$*" | 
|---|
|  | 104 | + | 
|---|
|  | 105 | +# Debian 4.0 puts ndbm in the -lgdbm_compat library. | 
|---|
|  | 106 | +libswanted="$libswanted gdbm_compat" | 
|---|
|  | 107 | + | 
|---|
|  | 108 | +# If you have glibc, then report the version for ./myconfig bug reporting. | 
|---|
|  | 109 | +# (Configure doesn't need to know the specific version since it just uses | 
|---|
|  | 110 | +# gcc to load the library for all tests.) | 
|---|
|  | 111 | +# We don't use __GLIBC__ and  __GLIBC_MINOR__ because they | 
|---|
|  | 112 | +# are insufficiently precise to distinguish things like | 
|---|
|  | 113 | +# libc-2.0.6 and libc-2.0.7. | 
|---|
|  | 114 | +if test -L /lib/libc.so.6; then | 
|---|
|  | 115 | +    libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'` | 
|---|
|  | 116 | +    libc=/lib/$libc | 
|---|
|  | 117 | +fi | 
|---|
|  | 118 | + | 
|---|
|  | 119 | +# Configure may fail to find lstat() since it's a static/inline | 
|---|
|  | 120 | +# function in <sys/stat.h>. | 
|---|
|  | 121 | +d_lstat=define | 
|---|
|  | 122 | + | 
|---|
|  | 123 | +# malloc wrap works | 
|---|
|  | 124 | +case "$usemallocwrap" in | 
|---|
|  | 125 | +'') usemallocwrap='define' ;; | 
|---|
|  | 126 | +esac | 
|---|
|  | 127 | + | 
|---|
|  | 128 | +# The system malloc() is about as fast and as frugal as perl's. | 
|---|
|  | 129 | +# Since the system malloc() has been the default since at least | 
|---|
|  | 130 | +# 5.001, we might as well leave it that way.  --AD  10 Jan 2002 | 
|---|
|  | 131 | +case "$usemymalloc" in | 
|---|
|  | 132 | +'') usemymalloc='n' ;; | 
|---|
|  | 133 | +esac | 
|---|
|  | 134 | + | 
|---|
|  | 135 | +# Check if we're about to use Intel's ICC compiler | 
|---|
|  | 136 | +case "`${cc:-cc} -V 2>&1`" in | 
|---|
|  | 137 | +*"Intel(R) C++ Compiler"*|*"Intel(R) C Compiler"*) | 
|---|
|  | 138 | +    # record the version, formats: | 
|---|
|  | 139 | +    # icc (ICC) 10.1 20080801 | 
|---|
|  | 140 | +    # icpc (ICC) 10.1 20080801 | 
|---|
|  | 141 | +    # followed by a copyright on the second line | 
|---|
|  | 142 | +    ccversion=`${cc:-cc} --version | sed -n -e 's/^icp\?c \((ICC) \)\?//p'` | 
|---|
|  | 143 | +    # This is needed for Configure's prototype checks to work correctly | 
|---|
|  | 144 | +    # The -mp flag is needed to pass various floating point related tests | 
|---|
|  | 145 | +    # The -no-gcc flag is needed otherwise, icc pretends (poorly) to be gcc | 
|---|
|  | 146 | +    ccflags="-we147 -mp -no-gcc $ccflags" | 
|---|
|  | 147 | +    # Prevent relocation errors on 64bits arch | 
|---|
|  | 148 | +    case "`uname -m`" in | 
|---|
|  | 149 | +       *ia64*|*x86_64*) | 
|---|
|  | 150 | +           cccdlflags='-fPIC' | 
|---|
|  | 151 | +       ;; | 
|---|
|  | 152 | +    esac | 
|---|
|  | 153 | +    # If we're using ICC, we usually want the best performance | 
|---|
|  | 154 | +    case "$optimize" in | 
|---|
|  | 155 | +    '') optimize='-O3' ;; | 
|---|
|  | 156 | +    esac | 
|---|
|  | 157 | +    ;; | 
|---|
|  | 158 | +*" Sun "*"C"*) | 
|---|
|  | 159 | +    # Sun's C compiler, which might have a 'tag' name between | 
|---|
|  | 160 | +    # 'Sun' and the 'C':  Examples: | 
|---|
|  | 161 | +    # cc: Sun C 5.9 Linux_i386 Patch 124871-01 2007/07/31 | 
|---|
|  | 162 | +    # cc: Sun Ceres C 5.10 Linux_i386 2008/07/10 | 
|---|
|  | 163 | +    test "$optimize" || optimize='-xO2' | 
|---|
|  | 164 | +    cccdlflags='-KPIC' | 
|---|
|  | 165 | +    lddlflags='-G -Bdynamic' | 
|---|
|  | 166 | +    # Sun C doesn't support gcc attributes, but, in many cases, doesn't | 
|---|
|  | 167 | +    # complain either.  Not all cases, though. | 
|---|
|  | 168 | +    d_attribute_format='undef' | 
|---|
|  | 169 | +    d_attribute_malloc='undef' | 
|---|
|  | 170 | +    d_attribute_nonnull='undef' | 
|---|
|  | 171 | +    d_attribute_noreturn='undef' | 
|---|
|  | 172 | +    d_attribute_pure='undef' | 
|---|
|  | 173 | +    d_attribute_unused='undef' | 
|---|
|  | 174 | +    d_attribute_warn_unused_result='undef' | 
|---|
|  | 175 | +    ;; | 
|---|
|  | 176 | +esac | 
|---|
|  | 177 | + | 
|---|
|  | 178 | +case "$optimize" in | 
|---|
|  | 179 | +# use -O2 by default ; -O3 doesn't seem to bring significant benefits with gcc | 
|---|
|  | 180 | +'') | 
|---|
|  | 181 | +    optimize='-O2' | 
|---|
|  | 182 | +    case "`uname -m`" in | 
|---|
|  | 183 | +        ppc*) | 
|---|
|  | 184 | +            # on ppc, it seems that gcc (at least gcc 3.3.2) isn't happy | 
|---|
|  | 185 | +            # with -O2 ; so downgrade to -O1. | 
|---|
|  | 186 | +            optimize='-O1' | 
|---|
|  | 187 | +        ;; | 
|---|
|  | 188 | +        ia64*) | 
|---|
|  | 189 | +            # This architecture has had various problems with gcc's | 
|---|
|  | 190 | +            # in the 3.2, 3.3, and 3.4 releases when optimized to -O2.  See | 
|---|
|  | 191 | +            # RT #37156 for a discussion of the problem. | 
|---|
|  | 192 | +            case "`${cc:-gcc} -v 2>&1`" in | 
|---|
|  | 193 | +            *"version 3.2"*|*"version 3.3"*|*"version 3.4"*) | 
|---|
|  | 194 | +                ccflags="-fno-delete-null-pointer-checks $ccflags" | 
|---|
|  | 195 | +            ;; | 
|---|
|  | 196 | +            esac | 
|---|
|  | 197 | +        ;; | 
|---|
|  | 198 | +    esac | 
|---|
|  | 199 | +    ;; | 
|---|
|  | 200 | +esac | 
|---|
|  | 201 | + | 
|---|
|  | 202 | +# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries | 
|---|
|  | 203 | +# (such as -lm) in /lib or /usr/lib.  So we have to ask gcc to tell us | 
|---|
|  | 204 | +# where to look.  We don't want gcc's own libraries, however, so we | 
|---|
|  | 205 | +# filter those out. | 
|---|
|  | 206 | +# This could be conditional on Unbuntu, but other distributions may | 
|---|
|  | 207 | +# follow suit, and this scheme seems to work even on rather old gcc's. | 
|---|
|  | 208 | +# This unconditionally uses gcc because even if the user is using another | 
|---|
|  | 209 | +# compiler, we still need to find the math library and friends, and I don't | 
|---|
|  | 210 | +# know how other compilers will cope with that situation. | 
|---|
|  | 211 | +# Morever, if the user has their own gcc earlier in $PATH than the system gcc, | 
|---|
|  | 212 | +# we don't want its libraries. So we try to prefer the system gcc | 
|---|
|  | 213 | +# Still, as an escape hatch, allow Configure command line overrides to | 
|---|
|  | 214 | +# plibpth to bypass this check. | 
|---|
|  | 215 | +if [ -x /usr/bin/gcc ] ; then | 
|---|
|  | 216 | +    gcc=/usr/bin/gcc | 
|---|
|  | 217 | +else | 
|---|
|  | 218 | +    gcc=gcc | 
|---|
|  | 219 | +fi | 
|---|
|  | 220 | + | 
|---|
|  | 221 | +case "$plibpth" in | 
|---|
|  | 222 | +'') plibpth=`LANG=C LC_ALL=C $gcc -print-search-dirs | grep libraries | | 
|---|
|  | 223 | +       cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'` | 
|---|
|  | 224 | +    set X $plibpth # Collapse all entries on one line | 
|---|
|  | 225 | +    shift | 
|---|
|  | 226 | +    plibpth="$*" | 
|---|
|  | 227 | +    ;; | 
|---|
|  | 228 | +esac | 
|---|
|  | 229 | + | 
|---|
|  | 230 | +# Are we using ELF?  Thanks to Kenneth Albanowski <kjahds@kjahds.com> | 
|---|
|  | 231 | +# for this test. | 
|---|
|  | 232 | +cat >try.c <<'EOM' | 
|---|
|  | 233 | +/* Test for whether ELF binaries are produced */ | 
|---|
|  | 234 | +#include <fcntl.h> | 
|---|
|  | 235 | +#include <stdlib.h> | 
|---|
|  | 236 | +#include <unistd.h> | 
|---|
|  | 237 | +main() { | 
|---|
|  | 238 | +       char buffer[4]; | 
|---|
|  | 239 | +       int i=open("a.out",O_RDONLY); | 
|---|
|  | 240 | +       if(i==-1) | 
|---|
|  | 241 | +               exit(1); /* fail */ | 
|---|
|  | 242 | +       if(read(i,&buffer[0],4)<4) | 
|---|
|  | 243 | +               exit(1); /* fail */ | 
|---|
|  | 244 | +       if(buffer[0] != 127 || buffer[1] != 'E' || | 
|---|
|  | 245 | +           buffer[2] != 'L' || buffer[3] != 'F') | 
|---|
|  | 246 | +               exit(1); /* fail */ | 
|---|
|  | 247 | +       exit(0); /* succeed (yes, it's ELF) */ | 
|---|
|  | 248 | +} | 
|---|
|  | 249 | +EOM | 
|---|
|  | 250 | +if ${cc:-gcc} try.c >/dev/null 2>&1 && $run ./a.out; then | 
|---|
|  | 251 | +    cat <<'EOM' >&4 | 
|---|
|  | 252 | + | 
|---|
|  | 253 | +You appear to have ELF support.  I'll try to use it for dynamic loading. | 
|---|
|  | 254 | +If dynamic loading doesn't work, read hints/linux.sh for further information. | 
|---|
|  | 255 | +EOM | 
|---|
|  | 256 | + | 
|---|
|  | 257 | +else | 
|---|
|  | 258 | +    cat <<'EOM' >&4 | 
|---|
|  | 259 | + | 
|---|
|  | 260 | +You don't have an ELF gcc.  I will use dld if possible.  If you are | 
|---|
|  | 261 | +using a version of DLD earlier than 3.2.6, or don't have it at all, you | 
|---|
|  | 262 | +should probably upgrade. If you are forced to use 3.2.4, you should | 
|---|
|  | 263 | +uncomment a couple of lines in hints/linux.sh and restart Configure so | 
|---|
|  | 264 | +that shared libraries will be disallowed. | 
|---|
|  | 265 | + | 
|---|
|  | 266 | +EOM | 
|---|
|  | 267 | +    lddlflags="-r $lddlflags" | 
|---|
|  | 268 | +    # These empty values are so that Configure doesn't put in the | 
|---|
|  | 269 | +    # Linux ELF values. | 
|---|
|  | 270 | +    ccdlflags=' ' | 
|---|
|  | 271 | +    cccdlflags=' ' | 
|---|
|  | 272 | +    ccflags="-DOVR_DBL_DIG=14 $ccflags" | 
|---|
|  | 273 | +    so='sa' | 
|---|
|  | 274 | +    dlext='o' | 
|---|
|  | 275 | +    nm_so_opt=' ' | 
|---|
|  | 276 | +    ## If you are using DLD 3.2.4 which does not support shared libs, | 
|---|
|  | 277 | +    ## uncomment the next two lines: | 
|---|
|  | 278 | +    #ldflags="-static" | 
|---|
|  | 279 | +    #so='none' | 
|---|
|  | 280 | + | 
|---|
|  | 281 | +       # In addition, on some systems there is a problem with perl and NDBM | 
|---|
|  | 282 | +       # which causes AnyDBM and NDBM_File to lock up. This is evidenced | 
|---|
|  | 283 | +       # in the tests as AnyDBM just freezing.  Apparently, this only | 
|---|
|  | 284 | +       # happens on a.out systems, so we disable NDBM for all a.out linux | 
|---|
|  | 285 | +       # systems.  If someone can suggest a more robust test | 
|---|
|  | 286 | +       #  that would be appreciated. | 
|---|
|  | 287 | +       # | 
|---|
|  | 288 | +       # More info: | 
|---|
|  | 289 | +       # Date: Wed, 7 Feb 1996 03:21:04 +0900 | 
|---|
|  | 290 | +       # From: Jeffrey Friedl <jfriedl@nff.ncl.omron.co.jp> | 
|---|
|  | 291 | +       # | 
|---|
|  | 292 | +       # I tried compiling with DBM support and sure enough things locked up | 
|---|
|  | 293 | +       # just as advertised. Checking into it, I found that the lockup was | 
|---|
|  | 294 | +       # during the call to dbm_open. Not *in* dbm_open -- but between the call | 
|---|
|  | 295 | +       # to and the jump into. | 
|---|
|  | 296 | +       # | 
|---|
|  | 297 | +       # To make a long story short, making sure that the *.a and *.sa pairs of | 
|---|
|  | 298 | +       #   /usr/lib/lib{m,db,gdbm}.{a,sa} | 
|---|
|  | 299 | +       # were perfectly in sync took care of it. | 
|---|
|  | 300 | +       # | 
|---|
|  | 301 | +       # This will generate a harmless Whoa There! message | 
|---|
|  | 302 | +       case "$d_dbm_open" in | 
|---|
|  | 303 | +       '')     cat <<'EOM' >&4 | 
|---|
|  | 304 | + | 
|---|
|  | 305 | +Disabling ndbm.  This will generate a Whoa There message in Configure. | 
|---|
|  | 306 | +Read hints/linux.sh for further information. | 
|---|
|  | 307 | +EOM | 
|---|
|  | 308 | +               # You can override this with Configure -Dd_dbm_open | 
|---|
|  | 309 | +               d_dbm_open=undef | 
|---|
|  | 310 | +               ;; | 
|---|
|  | 311 | +       esac | 
|---|
|  | 312 | +fi | 
|---|
|  | 313 | + | 
|---|
|  | 314 | +rm -f try.c a.out | 
|---|
|  | 315 | + | 
|---|
|  | 316 | +if /bin/sh -c exit; then | 
|---|
|  | 317 | +  echo '' | 
|---|
|  | 318 | +  echo 'You appear to have a working bash.  Good.' | 
|---|
|  | 319 | +else | 
|---|
|  | 320 | +  cat << 'EOM' >&4 | 
|---|
|  | 321 | + | 
|---|
|  | 322 | +*********************** Warning! ********************* | 
|---|
|  | 323 | +It would appear you have a defective bash shell installed. This is likely to | 
|---|
|  | 324 | +give you a failure of op/exec test #5 during the test phase of the build, | 
|---|
|  | 325 | +Upgrading to a recent version (1.14.4 or later) should fix the problem. | 
|---|
|  | 326 | +****************************************************** | 
|---|
|  | 327 | +EOM | 
|---|
|  | 328 | + | 
|---|
|  | 329 | +fi | 
|---|
|  | 330 | + | 
|---|
|  | 331 | +# On SPARClinux, | 
|---|
|  | 332 | +# The following csh consistently coredumped in the test directory | 
|---|
|  | 333 | +# "/home/mikedlr/perl5.003_94/t", though not most other directories. | 
|---|
|  | 334 | + | 
|---|
|  | 335 | +#Name        : csh                    Distribution: Red Hat Linux (Rembrandt) | 
|---|
|  | 336 | +#Version     : 5.2.6                        Vendor: Red Hat Software | 
|---|
|  | 337 | +#Release     : 3                        Build Date: Fri May 24 19:42:14 1996 | 
|---|
|  | 338 | +#Install date: Thu Jul 11 16:20:14 1996 Build Host: itchy.redhat.com | 
|---|
|  | 339 | +#Group       : Shells                   Source RPM: csh-5.2.6-3.src.rpm | 
|---|
|  | 340 | +#Size        : 184417 | 
|---|
|  | 341 | +#Description : BSD c-shell | 
|---|
|  | 342 | + | 
|---|
|  | 343 | +# For this reason I suggest using the much bug-fixed tcsh for globbing | 
|---|
|  | 344 | +# where available. | 
|---|
|  | 345 | + | 
|---|
|  | 346 | +# November 2001:  That warning's pretty old now and probably not so | 
|---|
|  | 347 | +# relevant, especially since perl now uses File::Glob for globbing. | 
|---|
|  | 348 | +# We'll still look for tcsh, but tone down the warnings. | 
|---|
|  | 349 | +# Andy Dougherty, Nov. 6, 2001 | 
|---|
|  | 350 | +if $csh -c 'echo $version' >/dev/null 2>&1; then | 
|---|
|  | 351 | +    echo 'Your csh is really tcsh.  Good.' | 
|---|
|  | 352 | +else | 
|---|
|  | 353 | +    if xxx=`./UU/loc tcsh blurfl $pth`; $test -f "$xxx"; then | 
|---|
|  | 354 | +       echo "Found tcsh.  I'll use it for globbing." | 
|---|
|  | 355 | +       # We can't change Configure's setting of $csh, due to the way | 
|---|
|  | 356 | +       # Configure handles $d_portable and commands found in $loclist. | 
|---|
|  | 357 | +       # We can set the value for CSH in config.h by setting full_csh. | 
|---|
|  | 358 | +       full_csh=$xxx | 
|---|
|  | 359 | +    elif [ -f "$csh" ]; then | 
|---|
|  | 360 | +       echo "Couldn't find tcsh.  Csh-based globbing might be broken." | 
|---|
|  | 361 | +    fi | 
|---|
|  | 362 | +fi | 
|---|
|  | 363 | + | 
|---|
|  | 364 | +# Shimpei Yamashita <shimpei@socrates.patnet.caltech.edu> | 
|---|
|  | 365 | +# Message-Id: <33EF1634.B36B6500@pobox.com> | 
|---|
|  | 366 | +# | 
|---|
|  | 367 | +# The DR2 of MkLinux (osname=linux,archname=ppc-linux) may need | 
|---|
|  | 368 | +# special flags passed in order for dynamic loading to work. | 
|---|
|  | 369 | +# instead of the recommended: | 
|---|
|  | 370 | +# | 
|---|
|  | 371 | +# ccdlflags='-rdynamic' | 
|---|
|  | 372 | +# | 
|---|
|  | 373 | +# it should be: | 
|---|
|  | 374 | +# ccdlflags='-Wl,-E' | 
|---|
|  | 375 | +# | 
|---|
|  | 376 | +# So if your DR2 (DR3 came out summer 1998, consider upgrading) | 
|---|
|  | 377 | +# has problems with dynamic loading, uncomment the | 
|---|
|  | 378 | +# following three lines, make distclean, and re-Configure: | 
|---|
|  | 379 | +#case "`uname -r | sed 's/^[0-9.-]*//'``arch`" in | 
|---|
|  | 380 | +#'osfmach3ppc') ccdlflags='-Wl,-E' ;; | 
|---|
|  | 381 | +#esac | 
|---|
|  | 382 | + | 
|---|
|  | 383 | +case "`uname -m`" in | 
|---|
|  | 384 | +sparc*) | 
|---|
|  | 385 | +       case "$cccdlflags" in | 
|---|
|  | 386 | +       *-fpic*) cccdlflags="`echo $cccdlflags|sed 's/-fpic/-fPIC/'`" ;; | 
|---|
|  | 387 | +       *-fPIC*) ;; | 
|---|
|  | 388 | +       *)       cccdlflags="$cccdlflags -fPIC" ;; | 
|---|
|  | 389 | +       esac | 
|---|
|  | 390 | +       ;; | 
|---|
|  | 391 | +esac | 
|---|
|  | 392 | + | 
|---|
|  | 393 | +# SuSE8.2 has /usr/lib/libndbm* which are ld scripts rather than | 
|---|
|  | 394 | +# true libraries. The scripts cause binding against static | 
|---|
|  | 395 | +# version of -lgdbm which is a bad idea. So if we have 'nm' | 
|---|
|  | 396 | +# make sure it can read the file | 
|---|
|  | 397 | +# NI-S 2003/08/07 | 
|---|
|  | 398 | +if [ -r /usr/lib/libndbm.so  -a  -x /usr/bin/nm ] ; then | 
|---|
|  | 399 | +   if /usr/bin/nm /usr/lib/libndbm.so >/dev/null 2>&1 ; then | 
|---|
|  | 400 | +    echo 'Your shared -lndbm seems to be a real library.' | 
|---|
|  | 401 | +   else | 
|---|
|  | 402 | +    echo 'Your shared -lndbm is not a real library.' | 
|---|
|  | 403 | +    set `echo X "$libswanted "| sed -e 's/ ndbm / /'` | 
|---|
|  | 404 | +    shift | 
|---|
|  | 405 | +    libswanted="$*" | 
|---|
|  | 406 | +   fi | 
|---|
|  | 407 | +fi | 
|---|
|  | 408 | + | 
|---|
|  | 409 | + | 
|---|
|  | 410 | +# This script UU/usethreads.cbu will get 'called-back' by Configure | 
|---|
|  | 411 | +# after it has prompted the user for whether to use threads. | 
|---|
|  | 412 | +cat > UU/usethreads.cbu <<'EOCBU' | 
|---|
|  | 413 | +case "$usethreads" in | 
|---|
|  | 414 | +$define|true|[yY]*) | 
|---|
|  | 415 | +        ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags" | 
|---|
|  | 416 | +        if echo $libswanted | grep -v pthread >/dev/null | 
|---|
|  | 417 | +        then | 
|---|
|  | 418 | +            set `echo X "$libswanted "| sed -e 's/ c / pthread c /'` | 
|---|
|  | 419 | +            shift | 
|---|
|  | 420 | +            libswanted="$*" | 
|---|
|  | 421 | +        fi | 
|---|
|  | 422 | + | 
|---|
|  | 423 | +       # Somehow at least in Debian 2.2 these manage to escape | 
|---|
|  | 424 | +       # the #define forest of <features.h> and <time.h> so that | 
|---|
|  | 425 | +       # the hasproto macro of Configure doesn't see these protos, | 
|---|
|  | 426 | +       # even with the -D_GNU_SOURCE. | 
|---|
|  | 427 | + | 
|---|
|  | 428 | +       d_asctime_r_proto="$define" | 
|---|
|  | 429 | +       d_crypt_r_proto="$define" | 
|---|
|  | 430 | +       d_ctime_r_proto="$define" | 
|---|
|  | 431 | +       d_gmtime_r_proto="$define" | 
|---|
|  | 432 | +       d_localtime_r_proto="$define" | 
|---|
|  | 433 | +       d_random_r_proto="$define" | 
|---|
|  | 434 | + | 
|---|
|  | 435 | +       ;; | 
|---|
|  | 436 | +esac | 
|---|
|  | 437 | +EOCBU | 
|---|
|  | 438 | + | 
|---|
|  | 439 | +cat > UU/uselargefiles.cbu <<'EOCBU' | 
|---|
|  | 440 | +# This script UU/uselargefiles.cbu will get 'called-back' by Configure | 
|---|
|  | 441 | +# after it has prompted the user for whether to use large files. | 
|---|
|  | 442 | +case "$uselargefiles" in | 
|---|
|  | 443 | +''|$define|true|[yY]*) | 
|---|
|  | 444 | +# Keep this in the left margin. | 
|---|
|  | 445 | +ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" | 
|---|
|  | 446 | + | 
|---|
|  | 447 | +       ccflags="$ccflags $ccflags_uselargefiles" | 
|---|
|  | 448 | +       ;; | 
|---|
|  | 449 | +esac | 
|---|
|  | 450 | +EOCBU | 
|---|
|  | 451 | + | 
|---|
|  | 452 | +# Purify fails to link Perl if a "-lc" is passed into its linker | 
|---|
|  | 453 | +# due to duplicate symbols. | 
|---|
|  | 454 | +case "$PURIFY" in | 
|---|
|  | 455 | +$define|true|[yY]*) | 
|---|
|  | 456 | +    set `echo X "$libswanted "| sed -e 's/ c / /'` | 
|---|
|  | 457 | +    shift | 
|---|
|  | 458 | +    libswanted="$*" | 
|---|
|  | 459 | +    ;; | 
|---|
|  | 460 | +esac | 
|---|
|  | 461 | + | 
|---|
|  | 462 | +# If we are using g++ we must use nm and force ourselves to use | 
|---|
|  | 463 | +# the /usr/lib/libc.a (resetting the libc below to an empty string | 
|---|
|  | 464 | +# makes Configure to look for the right one) because the symbol | 
|---|
|  | 465 | +# scanning tricks of Configure will crash and burn horribly. | 
|---|
|  | 466 | +case "$cc" in | 
|---|
|  | 467 | +*g++*) usenm=true | 
|---|
|  | 468 | +       libc='' | 
|---|
|  | 469 | +       ;; | 
|---|
|  | 470 | +esac | 
|---|
|  | 471 | + | 
|---|
|  | 472 | +# If using g++, the Configure scan for dlopen() and (especially) | 
|---|
|  | 473 | +# dlerror() might fail, easier just to forcibly hint them in. | 
|---|
|  | 474 | +case "$cc" in | 
|---|
|  | 475 | +*g++*) | 
|---|
|  | 476 | +  d_dlopen='define' | 
|---|
|  | 477 | +  d_dlerror='define' | 
|---|
|  | 478 | +  ;; | 
|---|
|  | 479 | +esac | 
|---|
|  | 480 | + | 
|---|
|  | 481 | +# Under some circumstances libdb can get built in such a way as to | 
|---|
|  | 482 | +# need pthread explicitly linked. | 
|---|
|  | 483 | + | 
|---|
|  | 484 | +libdb_needs_pthread="N" | 
|---|
|  | 485 | + | 
|---|
|  | 486 | +if echo " $libswanted " | grep -v " pthread " >/dev/null | 
|---|
|  | 487 | +then | 
|---|
|  | 488 | +   if echo " $libswanted " | grep " db " >/dev/null | 
|---|
|  | 489 | +   then | 
|---|
|  | 490 | +     for DBDIR in $glibpth | 
|---|
|  | 491 | +     do | 
|---|
|  | 492 | +       DBLIB="$DBDIR/libdb.so" | 
|---|
|  | 493 | +       if [ -f $DBLIB ] | 
|---|
|  | 494 | +       then | 
|---|
|  | 495 | +         if nm -u $DBLIB | grep pthread >/dev/null | 
|---|
|  | 496 | +         then | 
|---|
|  | 497 | +           if ldd $DBLIB | grep pthread >/dev/null | 
|---|
|  | 498 | +           then | 
|---|
|  | 499 | +             libdb_needs_pthread="N" | 
|---|
|  | 500 | +           else | 
|---|
|  | 501 | +             libdb_needs_pthread="Y" | 
|---|
|  | 502 | +           fi | 
|---|
|  | 503 | +         fi | 
|---|
|  | 504 | +       fi | 
|---|
|  | 505 | +     done | 
|---|
|  | 506 | +   fi | 
|---|
|  | 507 | +fi | 
|---|
|  | 508 | + | 
|---|
|  | 509 | +case "$libdb_needs_pthread" in | 
|---|
|  | 510 | +  "Y") | 
|---|
|  | 511 | +    libswanted="$libswanted pthread" | 
|---|
|  | 512 | +    ;; | 
|---|
|  | 513 | +esac | 
|---|