Commit | Line | Data |
---|---|---|
1aef975c AD |
1 | # hints/aix.sh |
2 | # AIX 3.x.x hints thanks to Wayne Scott <wscott@ichips.intel.com> | |
3 | # AIX 4.1 hints thanks to Christopher Chan-Nui <channui@austin.ibm.com>. | |
52e1cb5e JH |
4 | # AIX 4.1 pthreading by Christopher Chan-Nui <channui@austin.ibm.com> and |
5 | # Jarkko Hietaniemi <jhi@iki.fi>. | |
1aef975c AD |
6 | # Merged on Mon Feb 6 10:22:35 EST 1995 by |
7 | # Andy Dougherty <doughera@lafcol.lafayette.edu> | |
8 | ||
9 | ||
10 | # Configure finds setrgid and setruid, but they're useless. The man | |
11 | # pages state: | |
12 | # setrgid: The EPERM error code is always returned. | |
13 | # setruid: The EPERM error code is always returned. Processes cannot | |
14 | # reset only their real user IDs. | |
a0d0e21e LW |
15 | d_setrgid='undef' |
16 | d_setruid='undef' | |
1aef975c | 17 | |
a0d0e21e LW |
18 | alignbytes=8 |
19 | ||
a5f75d66 AD |
20 | usemymalloc='n' |
21 | ||
3c321fdc | 22 | so="a" |
23 | dlext="so" | |
24 | ||
1aef975c AD |
25 | # Make setsockopt work correctly. See man page. |
26 | # ccflags='-D_BSD=44' | |
27 | ||
28 | # uname -m output is too specific and not appropriate here | |
29 | case "$archname" in | |
30 | '') archname="$osname" ;; | |
31 | esac | |
32 | ||
33 | case "$osvers" in | |
34 | 3*) d_fchmod=undef | |
35 | ccflags='-D_ALL_SOURCE' | |
36 | ;; | |
37 | *) # These hints at least work for 4.x, possibly other systems too. | |
80589958 | 38 | ccflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE' |
39 | case "$cc" in | |
40 | *gcc*) ;; | |
41 | *) ccflags="-qmaxmem=8192 $ccflags" ;; | |
42 | esac | |
1aef975c | 43 | nm_opt='-B' |
1aef975c AD |
44 | ;; |
45 | esac | |
46 | ||
9018c6a0 KN |
47 | # These functions don't work like Perl expects them to. |
48 | d_setregid='undef' | |
49 | d_setreuid='undef' | |
50 | ||
8e07c86e AD |
51 | # The optimizer in 4.1.1 apparently generates bad code for scope.c. |
52 | # Configure doesn't offer an easy way to propagate extra variables | |
53 | # only for certain cases, so the following contortion is required: | |
c07a80fd | 54 | # This is probably not needed in 5.002 and later. |
55 | # scope_cflags='case "$osvers" in 4.1*) optimize=" ";; esac' | |
8e07c86e | 56 | |
1aef975c | 57 | # Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com> |
a0d0e21e LW |
58 | # |
59 | # Tell perl which symbols to export for dynamic linking. | |
4633a7c4 LW |
60 | case "$cc" in |
61 | *gcc*) ccdlflags='-Xlinker -bE:perl.exp' ;; | |
62 | *) ccdlflags='-bE:perl.exp' ;; | |
63 | esac | |
a0d0e21e LW |
64 | |
65 | # The first 3 options would not be needed if dynamic libs. could be linked | |
66 | # with the compiler instead of ld. | |
42793c05 TB |
67 | # -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary |
68 | # -bE:$(BASEEXT).exp Export these symbols. This file contains only one | |
69 | # symbol: boot_$(EXP) can it be auto-generated? | |
c07a80fd | 70 | case "$osvers" in |
71 | 3*) | |
42793c05 | 72 | lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc' |
c07a80fd | 73 | ;; |
74 | *) | |
75 | lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc' | |
a0d0e21e | 76 | |
c07a80fd | 77 | ;; |
78 | esac | |
52e1cb5e JH |
79 | |
80 | if [ "X$usethreads" != "X" ]; then | |
0a5d5e8b JH |
81 | ccflags="-DUSE_THREADS -DNEED_PTHREAD_INIT $ccflags" |
82 | cppflags="-DUSE_THREADS -DNEED_PTHREAD_INIT $cppflags" | |
52e1cb5e | 83 | case "$cc" in |
0a5d5e8b | 84 | xlc_r | cc_r) |
52e1cb5e JH |
85 | ;; |
86 | cc | '') | |
87 | cc=xlc_r | |
88 | ;; | |
89 | *) | |
90 | case "$cc" in | |
91 | gcc) | |
92 | echo >&4 "You cannot use POSIX threads from GNU cc in AIX." | |
93 | ;; | |
94 | *) | |
95 | echo >&4 "Unknown C compiler." | |
96 | ;; | |
97 | esac | |
0a5d5e8b | 98 | echo >&4 "You should use the AIX C compilers called xlc_r or cc_r." |
52e1cb5e JH |
99 | echo >&4 "Cannot continue, aborting." |
100 | exit 1 | |
101 | ;; | |
102 | esac | |
103 | ||
104 | # Add the POSIX threads library and use the re-entrant libc. | |
105 | ||
106 | lddlflags=`echo $lddlflags | sed 's/ -lc$/ -lpthreads -lc_r/'` | |
107 | fi |