Commit | Line | Data |
1aef975c |
1 | # hints/linux.sh |
a0d0e21e |
2 | # Original version by rsanders |
1fc4cb55 |
3 | # Additional support by Kenneth Albanowski <kjahds@kjahds.com> |
1aef975c |
4 | # |
232e078e |
5 | # ELF support by H.J. Lu <hjl@nynexst.com> |
6 | # Additional info from Nigel Head <nhead@ESOC.bitnet> |
7 | # and Kenneth Albanowski <kjahds@kjahds.com> |
1aef975c |
8 | # |
232e078e |
9 | # Consolidated by Andy Dougherty <doughera@lafcol.lafayette.edu> |
1fc4cb55 |
10 | # |
16d20bd9 |
11 | # Last updated Tue May 30 14:25:02 EDT 1995 |
232e078e |
12 | # |
f0b7e567 |
13 | # If you wish to use something other than 'gcc' for your compiler, |
14 | # you should specify it on the Configure command line. To use |
16d20bd9 |
15 | # gcc-elf, for exmample, type |
f0b7e567 |
16 | # ./Configure -Dcc=gcc-elf |
232e078e |
17 | |
18 | # perl goes into the /usr tree. See the Filesystem Standard |
19 | # available via anonymous FTP at tsx-11.mit.edu in |
20 | # /pub/linux/docs/linux-standards/fsstnd. |
16d20bd9 |
21 | # Allow a command line override, e.g. Configure -Dprefix=/foo/bar |
232e078e |
22 | case "$prefix" in |
23 | '') prefix='/usr' ;; |
24 | esac |
1fc4cb55 |
25 | |
232e078e |
26 | # Perl expects BSD style signal handling. |
16d20bd9 |
27 | # gcc-2.6.3 defines _G_HAVE_BOOL to 1, but doesn't actually supply bool. |
5d94fbed |
28 | ccflags="-D__USE_BSD_SIGNAL -Dbool=char -DHAS_BOOL $ccflags" |
1fc4cb55 |
29 | |
5d94fbed |
30 | # The following functions are gcc built-ins, but the Configure tests |
16d20bd9 |
31 | # may fail because they don't supply proper prototypes. |
32 | # This should be fixed as of 5.001f. I'd appreciate reports. |
232e078e |
33 | d_memcmp=define |
34 | d_memcpy=define |
35 | |
36 | # Configure may fail to find lstat() since it's a static/inline |
37 | # function in <sys/stat.h>. |
38 | d_lstat=define |
1aef975c |
39 | |
16d20bd9 |
40 | # Explanation? |
a0d0e21e |
41 | d_dosuid='define' |
1aef975c |
42 | |
16d20bd9 |
43 | # I think Configure gets this right now, but I'd appreciate reports. |
a0d0e21e |
44 | malloctype='void *' |
16d20bd9 |
45 | |
46 | # Explanation? |
1aef975c |
47 | usemymalloc='n' |
48 | |
49 | case "$optimize" in |
50 | '') optimize='-O2' ;; |
51 | esac |
52 | |
232e078e |
53 | # Are we using ELF? Thanks to Kenneth Albanowski <kjahds@kjahds.com> |
54 | # for this test. |
55 | cat >try.c <<'EOM' |
56 | /* Test for whether ELF binaries are produced */ |
57 | #include <fcntl.h> |
58 | #include <stdlib.h> |
59 | main() { |
60 | char buffer[4]; |
61 | int i=open("a.out",O_RDONLY); |
62 | if(i==-1) |
63 | exit(1); /* fail */ |
64 | if(read(i,&buffer[0],4)<4) |
65 | exit(1); /* fail */ |
66 | if(buffer[0] != 127 || buffer[1] != 'E' || |
67 | buffer[2] != 'L' || buffer[3] != 'F') |
68 | exit(1); /* fail */ |
69 | exit(0); /* succeed (yes, it's ELF) */ |
70 | } |
71 | EOM |
f0b7e567 |
72 | if ${cc:-gcc} try.c >/dev/null 2>&1 && ./a.out; then |
232e078e |
73 | cat <<'EOM' |
74 | |
75 | You appear to have ELF support. I'll try to use it for dynamic loading. |
76 | EOM |
232e078e |
77 | else |
16d20bd9 |
78 | cat <<'EOM' |
79 | |
80 | You don't have an ELF gcc. I will use dld if possible. If you are |
81 | using a version of DLD earlier than 3.2.6, or don't have it at all, you |
82 | should probably upgrade. If you are forced to use 3.2.4, you should |
c2960299 |
83 | uncomment a couple of lines in hints/linux.sh and restart Configure so |
84 | that shared libraries will be disallowed. |
16d20bd9 |
85 | |
86 | EOM |
232e078e |
87 | lddlflags="-r $lddlflags" |
5d94fbed |
88 | # These empty values are so that Configure doesn't put in the |
89 | # Linux ELF values. |
90 | ccdlflags=' ' |
91 | cccdlflags=' ' |
1aef975c |
92 | so='sa' |
93 | dlext='o' |
94 | ## If you are using DLD 3.2.4 which does not support shared libs, |
95 | ## uncomment the next two lines: |
96 | #ldflags="-static" |
97 | #so='none' |
232e078e |
98 | fi |
a0d0e21e |
99 | |
c2960299 |
100 | rm -f try.c a.out |
16d20bd9 |
101 | |
c2960299 |
102 | if /bin/bash -c exit; then |
103 | echo You appear to have a working bash. Good. |
104 | else |
105 | cat << 'EOM' |
106 | Warning: it would appear you have a defective bash shell installed. This is |
107 | likely to give you a failure of op/exec test #5 during the test phase of the |
108 | build, Upgrading to a recent version (1.14.4 or later) should fix the |
109 | problem. |
a0d0e21e |
110 | |
a0d0e21e |
111 | EOM |
c2960299 |
112 | |
113 | fi |
16d20bd9 |
114 | |
115 | # In addition, on some systems there is a problem with perl and NDBM, which |
116 | # causes AnyDBM and NDBM_File to lock up. This is evidenced in the tests as |
117 | # AnyDBM just freezing. Currently we disable NDBM for all linux systems. |
118 | # If someone can suggest a more robust test, that would be appreciated. |
c2960299 |
119 | # This will generate a harmless message: |
120 | # Hmm...You had some extra variables I don't know about...I'll try to keep 'em. |
121 | # Propagating recommended variable d_dbm_open |
16d20bd9 |
122 | d_dbm_open=undef |
232e078e |
123 | |