| 1 | Don't look for headers and libraries in "traditional" locations.
|
| 2 |
|
| 3 | Patch adapted from Nixpkgs, originally by Eelco Dolstra
|
| 4 | <[email protected]>.
|
| 5 |
|
| 6 | diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/Configure perl-5.20.0/Configure
|
| 7 | |
| 8 | |
| 9 | @@ -108,15 +108,7 @@
|
| 10 | fi
|
| 11 |
|
| 12 | : Proper PATH setting
|
| 13 | -paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
|
| 14 | -paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
|
| 15 | -paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
|
| 16 | -paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
|
| 17 | -paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
|
| 18 | -paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
|
| 19 | -paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
|
| 20 | -paths="$paths /sbin /usr/sbin /usr/libexec"
|
| 21 | -paths="$paths /system/gnu_library/bin"
|
| 22 | +paths=''
|
| 23 |
|
| 24 | for p in $paths
|
| 25 | do
|
| 26 | @@ -1435,8 +1427,7 @@
|
| 27 | i_whoami=''
|
| 28 | : Possible local include directories to search.
|
| 29 | : Set locincpth to "" in a hint file to defeat local include searches.
|
| 30 | -locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
|
| 31 | -locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
|
| 32 | +locincpth=""
|
| 33 | :
|
| 34 | : no include file wanted by default
|
| 35 | inclwanted=''
|
| 36 | @@ -1450,17 +1441,12 @@
|
| 37 | archobjs=''
|
| 38 | libnames=''
|
| 39 | : change the next line if compiling for Xenix/286 on Xenix/386
|
| 40 | -xlibpth='/usr/lib/386 /lib/386'
|
| 41 | +xlibpth=''
|
| 42 | : Possible local library directories to search.
|
| 43 | -loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
|
| 44 | -loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
|
| 45 | +loclibpth=""
|
| 46 |
|
| 47 | : general looking path for locating libraries
|
| 48 | -glibpth="/lib /usr/lib $xlibpth"
|
| 49 | -glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
|
| 50 | -test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
|
| 51 | -test -f /shlib/libc.so && glibpth="/shlib $glibpth"
|
| 52 | -test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
|
| 53 | +glibpth=""
|
| 54 |
|
| 55 | : Private path used by Configure to find libraries. Its value
|
| 56 | : is prepended to libpth. This variable takes care of special
|
| 57 | @@ -1495,8 +1481,6 @@
|
| 58 | libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
|
| 59 | : We probably want to search /usr/shlib before most other libraries.
|
| 60 | : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
|
| 61 | -glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
|
| 62 | -glibpth="/usr/shlib $glibpth"
|
| 63 | : Do not use vfork unless overridden by a hint file.
|
| 64 | usevfork=false
|
| 65 |
|
| 66 | @@ -2553,7 +2537,6 @@
|
| 67 | zip
|
| 68 | "
|
| 69 | pth=`echo $PATH | sed -e "s/$p_/ /g"`
|
| 70 | -pth="$pth $sysroot/lib $sysroot/usr/lib"
|
| 71 | for file in $loclist; do
|
| 72 | eval xxx=\$$file
|
| 73 | case "$xxx" in
|
| 74 | @@ -5049,7 +5033,7 @@
|
| 75 | : Set private lib path
|
| 76 | case "$plibpth" in
|
| 77 | '') if ./mips; then
|
| 78 | - plibpth="$incpath/usr/lib $sysroot/usr/local/lib $sysroot/usr/ccs/lib"
|
| 79 | + plibpth="$incpath/usr/lib"
|
| 80 | fi;;
|
| 81 | esac
|
| 82 | case "$libpth" in
|
| 83 | @@ -8877,13 +8861,8 @@
|
| 84 | echo " "
|
| 85 | case "$sysman" in
|
| 86 | '')
|
| 87 | - syspath='/usr/share/man/man1 /usr/man/man1'
|
| 88 | - syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
|
| 89 | - syspath="$syspath /usr/man/u_man/man1"
|
| 90 | - syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
|
| 91 | - syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
|
| 92 | - syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
|
| 93 | - sysman=`./loc . /usr/man/man1 $syspath`
|
| 94 | + syspath=''
|
| 95 | + sysman=''
|
| 96 | ;;
|
| 97 | esac
|
| 98 | if $test -d "$sysman"; then
|
| 99 | @@ -21027,9 +21006,10 @@
|
| 100 | case "$full_ar" in
|
| 101 | '') full_ar=$ar ;;
|
| 102 | esac
|
| 103 | +full_ar=ar
|
| 104 |
|
| 105 | : Store the full pathname to the sed program for use in the C program
|
| 106 | -full_sed=$sed
|
| 107 | +full_sed=sed
|
| 108 |
|
| 109 | : see what type gids are declared as in the kernel
|
| 110 | echo " "
|
| 111 | Only in perl-5.20.0/: Configure.orig
|
| 112 | diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/ext/Errno/Errno_pm.PL perl-5.20.0/ext/Errno/Errno_pm.PL
|
| 113 | |
| 114 | |
| 115 | @@ -114,7 +114,7 @@ sub get_files {
|
| 116 | # When cross-compiling we may store a path for gcc's "sysroot" option:
|
| 117 | my $sysroot = $Config{sysroot} || '';
|
| 118 | my $linux_errno_h;
|
| 119 | - if ($^O eq 'linux') {
|
| 120 | + if (0) {
|
| 121 | # Some Linuxes have weird errno.hs which generate
|
| 122 | # no #file or #line directives
|
| 123 | ($linux_errno_h) = grep { -e $_ } map { "$_/errno.h" }
|
| 124 | @@ -134,13 +134,6 @@ sub get_files {
|
| 125 | if ($dep =~ /(\S+errno\.h)/) {
|
| 126 | $file{$1} = 1;
|
| 127 | }
|
| 128 | - } elsif ($^O eq 'linux' &&
|
| 129 | - $Config{gccversion} ne '' &&
|
| 130 | - $Config{gccversion} !~ /intel/i &&
|
| 131 | - # might be using, say, Intel's icc
|
| 132 | - $linux_errno_h
|
| 133 | - ) {
|
| 134 | - $file{$linux_errno_h} = 1;
|
| 135 | } elsif ($^O eq 'haiku') {
|
| 136 | # hidden in a special place
|
| 137 | $file{'/boot/develop/headers/posix/errno.h'} = 1;
|
| 138 | diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/freebsd.sh perl-5.20.0/hints/freebsd.sh
|
| 139 | |
| 140 | |
| 141 | @@ -119,21 +119,21 @@
|
| 142 | objformat=`/usr/bin/objformat`
|
| 143 | if [ x$objformat = xaout ]; then
|
| 144 | if [ -e /usr/lib/aout ]; then
|
| 145 | - libpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
| 146 | - glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
|
| 147 | + libpth=""
|
| 148 | + glibpth=""
|
| 149 | fi
|
| 150 | lddlflags='-Bshareable'
|
| 151 | else
|
| 152 | - libpth="/usr/lib /usr/local/lib"
|
| 153 | - glibpth="/usr/lib /usr/local/lib"
|
| 154 | + libpth=""
|
| 155 | + glibpth=""
|
| 156 | ldflags="-Wl,-E "
|
| 157 | lddlflags="-shared "
|
| 158 | fi
|
| 159 | cccdlflags='-DPIC -fPIC'
|
| 160 | ;;
|
| 161 | *)
|
| 162 | - libpth="/usr/lib /usr/local/lib"
|
| 163 | - glibpth="/usr/lib /usr/local/lib"
|
| 164 | + libpth=""
|
| 165 | + glibpth=""
|
| 166 | ldflags="-Wl,-E "
|
| 167 | lddlflags="-shared "
|
| 168 | cccdlflags='-DPIC -fPIC'
|
| 169 | diff -ru -x '*~' -x '*.rej' perl-5.20.0-orig/hints/linux.sh perl-5.20.0/hints/linux.sh
|
| 170 | |
| 171 | |
| 172 | @@ -150,28 +150,6 @@
|
| 173 | ;;
|
| 174 | esac
|
| 175 |
|
| 176 | -# Ubuntu 11.04 (and later, presumably) doesn't keep most libraries
|
| 177 | -# (such as -lm) in /lib or /usr/lib. So we have to ask gcc to tell us
|
| 178 | -# where to look. We don't want gcc's own libraries, however, so we
|
| 179 | -# filter those out.
|
| 180 | -# This could be conditional on Unbuntu, but other distributions may
|
| 181 | -# follow suit, and this scheme seems to work even on rather old gcc's.
|
| 182 | -# This unconditionally uses gcc because even if the user is using another
|
| 183 | -# compiler, we still need to find the math library and friends, and I don't
|
| 184 | -# know how other compilers will cope with that situation.
|
| 185 | -# Morever, if the user has their own gcc earlier in $PATH than the system gcc,
|
| 186 | -# we don't want its libraries. So we try to prefer the system gcc
|
| 187 | -# Still, as an escape hatch, allow Configure command line overrides to
|
| 188 | -# plibpth to bypass this check.
|
| 189 | -if [ -x /usr/bin/gcc ] ; then
|
| 190 | - gcc=/usr/bin/gcc
|
| 191 | -# clang also provides -print-search-dirs
|
| 192 | -elif ${cc:-cc} --version 2>/dev/null | grep -q '^clang ' ; then
|
| 193 | - gcc=${cc:-cc}
|
| 194 | -else
|
| 195 | - gcc=gcc
|
| 196 | -fi
|
| 197 | -
|
| 198 | case "$plibpth" in
|
| 199 | '') plibpth=`LANG=C LC_ALL=C $gcc $ccflags $ldflags -print-search-dirs | grep libraries |
|
| 200 | cut -f2- -d= | tr ':' $trnl | grep -v 'gcc' | sed -e 's:/$::'`
|
| 201 | @@ -208,32 +186,6 @@
|
| 202 | ;;
|
| 203 | esac
|
| 204 |
|
| 205 | -case "$libc" in
|
| 206 | -'')
|
| 207 | -# If you have glibc, then report the version for ./myconfig bug reporting.
|
| 208 | -# (Configure doesn't need to know the specific version since it just uses
|
| 209 | -# gcc to load the library for all tests.)
|
| 210 | -# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
|
| 211 | -# are insufficiently precise to distinguish things like
|
| 212 | -# libc-2.0.6 and libc-2.0.7.
|
| 213 | - for p in $plibpth
|
| 214 | - do
|
| 215 | - for trylib in libc.so.6 libc.so
|
| 216 | - do
|
| 217 | - if $test -e $p/$trylib; then
|
| 218 | - libc=`ls -l $p/$trylib | awk '{print $NF}'`
|
| 219 | - if $test "X$libc" != X; then
|
| 220 | - break
|
| 221 | - fi
|
| 222 | - fi
|
| 223 | - done
|
| 224 | - if $test "X$libc" != X; then
|
| 225 | - break
|
| 226 | - fi
|
| 227 | - done
|
| 228 | - ;;
|
| 229 | -esac
|
| 230 | -
|
| 231 | if ${sh:-/bin/sh} -c exit; then
|
| 232 | echo ''
|
| 233 | echo 'You appear to have a working bash. Good.'
|
| 234 | @@ -311,33 +263,6 @@
|
| 235 | ;;
|
| 236 | esac
|
| 237 |
|
| 238 | -# SuSE8.2 has /usr/lib/libndbm* which are ld scripts rather than
|
| 239 | -# true libraries. The scripts cause binding against static
|
| 240 | -# version of -lgdbm which is a bad idea. So if we have 'nm'
|
| 241 | -# make sure it can read the file
|
| 242 | -# NI-S 2003/08/07
|
| 243 | -case "$nm" in
|
| 244 | - '') ;;
|
| 245 | - *)
|
| 246 | - for p in $plibpth
|
| 247 | - do
|
| 248 | - if $test -r $p/libndbm.so; then
|
| 249 | - if $nm $p/libndbm.so >/dev/null 2>&1 ; then
|
| 250 | - echo 'Your shared -lndbm seems to be a real library.'
|
| 251 | - _libndbm_real=1
|
| 252 | - break
|
| 253 | - fi
|
| 254 | - fi
|
| 255 | - done
|
| 256 | - if $test "X$_libndbm_real" = X; then
|
| 257 | - echo 'Your shared -lndbm is not a real library.'
|
| 258 | - set `echo X "$libswanted "| sed -e 's/ ndbm / /'`
|
| 259 | - shift
|
| 260 | - libswanted="$*"
|
| 261 | - fi
|
| 262 | - ;;
|
| 263 | -esac
|
| 264 | -
|
| 265 | # Linux on Synology.
|
| 266 | if [ -f /etc/synoinfo.conf -a -d /usr/syno ]; then
|
| 267 | # Tested on Synology DS213 and DS413
|