Commit | Line | Data |
1aef975c |
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 |
4 | # AIX 4.1 pthreading by Christopher Chan-Nui <channui@austin.ibm.com> and |
5 | # Jarkko Hietaniemi <jhi@iki.fi>. |
1aef975c |
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 |
15 | d_setrgid='undef' |
16 | d_setruid='undef' |
1aef975c |
17 | |
a0d0e21e |
18 | alignbytes=8 |
19 | |
a5f75d66 |
20 | usemymalloc='n' |
21 | |
3c321fdc |
22 | so="a" |
23 | dlext="so" |
24 | |
1aef975c |
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 |
fc2c2f48 |
35 | ccflags="$ccflags -D_ALL_SOURCE" |
1aef975c |
36 | ;; |
37 | *) # These hints at least work for 4.x, possibly other systems too. |
fc2c2f48 |
38 | ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE" |
80589958 |
39 | case "$cc" in |
40 | *gcc*) ;; |
fc2c2f48 |
41 | *) ccflags="$ccflags -qmaxmem=8192" ;; |
80589958 |
42 | esac |
1aef975c |
43 | nm_opt='-B' |
1aef975c |
44 | ;; |
45 | esac |
46 | |
9018c6a0 |
47 | # These functions don't work like Perl expects them to. |
48 | d_setregid='undef' |
49 | d_setreuid='undef' |
50 | |
1aef975c |
51 | # Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com> |
a0d0e21e |
52 | # |
53 | # Tell perl which symbols to export for dynamic linking. |
4633a7c4 |
54 | case "$cc" in |
55 | *gcc*) ccdlflags='-Xlinker -bE:perl.exp' ;; |
56 | *) ccdlflags='-bE:perl.exp' ;; |
57 | esac |
a0d0e21e |
58 | |
59 | # The first 3 options would not be needed if dynamic libs. could be linked |
60 | # with the compiler instead of ld. |
42793c05 |
61 | # -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary |
62 | # -bE:$(BASEEXT).exp Export these symbols. This file contains only one |
63 | # symbol: boot_$(EXP) can it be auto-generated? |
c07a80fd |
64 | case "$osvers" in |
65 | 3*) |
42793c05 |
66 | lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc' |
c07a80fd |
67 | ;; |
68 | *) |
491527d0 |
69 | lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc' |
a0d0e21e |
70 | |
c07a80fd |
71 | ;; |
72 | esac |
52e1cb5e |
73 | |
e5c9fcd0 |
74 | if [ "X$usethreads" = "X$define" ]; then |
fc2c2f48 |
75 | ccflags="$ccflags -DNEED_PTHREAD_INIT" |
52e1cb5e |
76 | case "$cc" in |
0a5d5e8b |
77 | xlc_r | cc_r) |
52e1cb5e |
78 | ;; |
79 | cc | '') |
ce637636 |
80 | cc=xlc_r # Let us be stricter. |
52e1cb5e |
81 | ;; |
82 | *) |
ce637636 |
83 | cat >&4 <<EOM |
84 | Unknown C compiler '$cc'. |
85 | For pthreads you should use the AIX C compilers xlc_r or cc_r. |
86 | Cannot continue, aborting. |
87 | EOM |
52e1cb5e |
88 | exit 1 |
89 | ;; |
90 | esac |
91 | |
ce637636 |
92 | # Add the POSIX threads library and the re-entrant libc. |
52e1cb5e |
93 | |
ce637636 |
94 | lddlflags=`echo $lddlflags | sed 's/ -lc$/ -lpthreads -lc_r -lc/'` |
bf923b29 |
95 | |
96 | # Add the c_r library to the list of libraries wanted |
97 | # Make sure the c_r library is before the c library or |
98 | # make will fail. |
99 | set `echo X "$libswanted "| sed -e 's/ c / c_r c /'` |
100 | shift |
101 | libswanted="$*" |
52e1cb5e |
102 | fi |