|
| 1 | +diff --git a/hints/linux.sh b/hints/linux.sh |
| 2 | +index fb5a46e..3f38ea0 100644 |
| 3 | +--- a/hints/linux.sh |
| 4 | ++++ b/hints/linux.sh |
| 5 | +@@ -221,92 +221,6 @@ case "$libc" in |
| 6 | + ;; |
| 7 | + esac |
| 8 | + |
| 9 | +-# Are we using ELF? Thanks to Kenneth Albanowski <[email protected]> |
| 10 | +-# for this test. |
| 11 | +-cat >try.c <<'EOM' |
| 12 | +-/* Test for whether ELF binaries are produced */ |
| 13 | +-#include <fcntl.h> |
| 14 | +-#include <stdlib.h> |
| 15 | +-#include <unistd.h> |
| 16 | +-main() { |
| 17 | +- char buffer[4]; |
| 18 | +- int i=open("a.out",O_RDONLY); |
| 19 | +- if(i==-1) |
| 20 | +- exit(1); /* fail */ |
| 21 | +- if(read(i,&buffer[0],4)<4) |
| 22 | +- exit(1); /* fail */ |
| 23 | +- if(buffer[0] != 127 || buffer[1] != 'E' || |
| 24 | +- buffer[2] != 'L' || buffer[3] != 'F') |
| 25 | +- exit(1); /* fail */ |
| 26 | +- exit(0); /* succeed (yes, it's ELF) */ |
| 27 | +-} |
| 28 | +-EOM |
| 29 | +-if ${cc:-gcc} $ccflags $ldflags try.c >/dev/null 2>&1 && $run ./a.out; then |
| 30 | +- cat <<'EOM' >&4 |
| 31 | +- |
| 32 | +-You appear to have ELF support. I'll try to use it for dynamic loading. |
| 33 | +-If dynamic loading doesn't work, read hints/linux.sh for further information. |
| 34 | +-EOM |
| 35 | +- |
| 36 | +-else |
| 37 | +- cat <<'EOM' >&4 |
| 38 | +- |
| 39 | +-You don't have an ELF gcc. I will use dld if possible. If you are |
| 40 | +-using a version of DLD earlier than 3.2.6, or don't have it at all, you |
| 41 | +-should probably upgrade. If you are forced to use 3.2.4, you should |
| 42 | +-uncomment a couple of lines in hints/linux.sh and restart Configure so |
| 43 | +-that shared libraries will be disallowed. |
| 44 | +- |
| 45 | +-EOM |
| 46 | +- lddlflags="-r $lddlflags" |
| 47 | +- # These empty values are so that Configure doesn't put in the |
| 48 | +- # Linux ELF values. |
| 49 | +- ccdlflags=' ' |
| 50 | +- cccdlflags=' ' |
| 51 | +- ccflags="-DOVR_DBL_DIG=14 $ccflags" |
| 52 | +- so='sa' |
| 53 | +- dlext='o' |
| 54 | +- nm_so_opt=' ' |
| 55 | +- ## If you are using DLD 3.2.4 which does not support shared libs, |
| 56 | +- ## uncomment the next two lines: |
| 57 | +- #ldflags="-static" |
| 58 | +- #so='none' |
| 59 | +- |
| 60 | +- # In addition, on some systems there is a problem with perl and NDBM |
| 61 | +- # which causes AnyDBM and NDBM_File to lock up. This is evidenced |
| 62 | +- # in the tests as AnyDBM just freezing. Apparently, this only |
| 63 | +- # happens on a.out systems, so we disable NDBM for all a.out linux |
| 64 | +- # systems. If someone can suggest a more robust test |
| 65 | +- # that would be appreciated. |
| 66 | +- # |
| 67 | +- # More info: |
| 68 | +- # Date: Wed, 7 Feb 1996 03:21:04 +0900 |
| 69 | +- # From: Jeffrey Friedl <[email protected]> |
| 70 | +- # |
| 71 | +- # I tried compiling with DBM support and sure enough things locked up |
| 72 | +- # just as advertised. Checking into it, I found that the lockup was |
| 73 | +- # during the call to dbm_open. Not *in* dbm_open -- but between the call |
| 74 | +- # to and the jump into. |
| 75 | +- # |
| 76 | +- # To make a long story short, making sure that the *.a and *.sa pairs of |
| 77 | +- # /usr/lib/lib{m,db,gdbm}.{a,sa} |
| 78 | +- # were perfectly in sync took care of it. |
| 79 | +- # |
| 80 | +- # This will generate a harmless Whoa There! message |
| 81 | +- case "$d_dbm_open" in |
| 82 | +- '') cat <<'EOM' >&4 |
| 83 | +- |
| 84 | +-Disabling ndbm. This will generate a Whoa There message in Configure. |
| 85 | +-Read hints/linux.sh for further information. |
| 86 | +-EOM |
| 87 | +- # You can override this with Configure -Dd_dbm_open |
| 88 | +- d_dbm_open=undef |
| 89 | +- ;; |
| 90 | +- esac |
| 91 | +-fi |
| 92 | +- |
| 93 | +-rm -f try.c a.out |
| 94 | +- |
| 95 | + if ${sh:-/bin/sh} -c exit; then |
| 96 | + echo '' |
| 97 | + echo 'You appear to have a working bash. Good.' |
0 commit comments