| 1 | # hints/aix.sh
|
|---|
| 2 |
|
|---|
| 3 | # AIX 3 and AIX 4 are split off to aix_3.sh and aix_4.sh
|
|---|
| 4 | # early Feb 2004 by H.Merijn Brand
|
|---|
| 5 | # please read comments in there for historic questions.
|
|---|
| 6 | # many now stripped here
|
|---|
| 7 |
|
|---|
| 8 | # Contact [email protected] for any of the following:
|
|---|
| 9 | #
|
|---|
| 10 | # - AIX 43x and above support
|
|---|
| 11 | # - gcc + threads support
|
|---|
| 12 | # - socks support
|
|---|
| 13 | #
|
|---|
| 14 | # Notes:
|
|---|
| 15 | #
|
|---|
| 16 | # - shared libperl support is tricky. if ever libperl.a ends up
|
|---|
| 17 | # in /usr/local/lib/* it can override any subsequent builds of
|
|---|
| 18 | # that same perl release. to make sure you know where the shared
|
|---|
| 19 | # libperl.a is coming from do a 'dump -Hv perl' and check all the
|
|---|
| 20 | # library search paths in the loader header.
|
|---|
| 21 | #
|
|---|
| 22 | # it would be nice to warn the user if a libperl.a exists that is
|
|---|
| 23 | # going to override the current build, but that would be complex.
|
|---|
| 24 | #
|
|---|
| 25 | # better yet, a solid fix for this situation should be developed.
|
|---|
| 26 | #
|
|---|
| 27 |
|
|---|
| 28 | # Configure finds setrgid and setruid, but they're useless. The man
|
|---|
| 29 | # pages state:
|
|---|
| 30 | # setrgid: The EPERM error code is always returned.
|
|---|
| 31 | # setruid: The EPERM error code is always returned. Processes cannot
|
|---|
| 32 | # reset only their real user IDs.
|
|---|
| 33 | d_setrgid='undef'
|
|---|
| 34 | d_setruid='undef'
|
|---|
| 35 |
|
|---|
| 36 | alignbytes=8
|
|---|
| 37 |
|
|---|
| 38 | case "$usemymalloc" in
|
|---|
| 39 | '') usemymalloc='n' ;;
|
|---|
| 40 | esac
|
|---|
| 41 |
|
|---|
| 42 | # malloc wrap works, but not in vac-5, see later
|
|---|
| 43 | case "$usemallocwrap" in
|
|---|
| 44 | '') usemallocwrap='define' ;;
|
|---|
| 45 | esac
|
|---|
| 46 |
|
|---|
| 47 | # Intuiting the existence of system calls under AIX is difficult,
|
|---|
| 48 | # at best; the safest technique is to find them empirically.
|
|---|
| 49 |
|
|---|
| 50 | case "$usenativedlopen" in
|
|---|
| 51 | '') usenativedlopen='true' ;;
|
|---|
| 52 | esac
|
|---|
| 53 |
|
|---|
| 54 | so="a"
|
|---|
| 55 | # AIX itself uses .o (libc.o) but we prefer compatibility
|
|---|
| 56 | # with the rest of the world and with rest of the scripting
|
|---|
| 57 | # languages (Tcl, Python) and related systems (SWIG).
|
|---|
| 58 | # Stephanie Beals <[email protected]>
|
|---|
| 59 | dlext="so"
|
|---|
| 60 |
|
|---|
| 61 | # Take possible hint from the environment. If 32-bit is set in the
|
|---|
| 62 | # environment, we can override it later. If set for 64, the
|
|---|
| 63 | # 'sizeof' test sees a native 64-bit architecture and never looks back.
|
|---|
| 64 | case "$OBJECT_MODE" in
|
|---|
| 65 | 32) cat >&4 <<EOF
|
|---|
| 66 |
|
|---|
| 67 | You have OBJECT_MODE=32 set in the environment.
|
|---|
| 68 | I take this as a hint you do not want to
|
|---|
| 69 | build for a 64-bit address space. You will be
|
|---|
| 70 | given the opportunity to change this later.
|
|---|
| 71 | EOF
|
|---|
| 72 | ;;
|
|---|
| 73 | 64) cat >&4 <<EOF
|
|---|
| 74 |
|
|---|
| 75 | You have OBJECT_MODE=64 set in the environment.
|
|---|
| 76 | This forces a full 64-bit build. If that is
|
|---|
| 77 | not what you intended, please terminate this
|
|---|
| 78 | program, unset it and restart.
|
|---|
| 79 | EOF
|
|---|
| 80 | ;;
|
|---|
| 81 | esac
|
|---|
| 82 |
|
|---|
| 83 | # uname -m output is too specific and not appropriate here
|
|---|
| 84 | case "$archname" in
|
|---|
| 85 | '') archname="$osname" ;;
|
|---|
| 86 | esac
|
|---|
| 87 |
|
|---|
| 88 | cc=${cc:-cc}
|
|---|
| 89 |
|
|---|
| 90 | ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
|
|---|
| 91 | case "$cc" in
|
|---|
| 92 | *gcc*) ;;
|
|---|
| 93 | *) ccflags="$ccflags -qmaxmem=-1 -qnoansialias" ;;
|
|---|
| 94 | esac
|
|---|
| 95 | nm_opt='-B'
|
|---|
| 96 |
|
|---|
| 97 | # These functions don't work like Perl expects them to.
|
|---|
| 98 | d_setregid='undef'
|
|---|
| 99 | d_setreuid='undef'
|
|---|
| 100 |
|
|---|
| 101 | # Changes for dynamic linking by Wayne Scott <[email protected]>
|
|---|
| 102 | #
|
|---|
| 103 | # Tell perl which symbols to export for dynamic linking.
|
|---|
|
|---|