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>.
4 # AIX 4.1 pthreading by Christopher Chan-Nui <channui@austin.ibm.com> and
5 # Jarkko Hietaniemi <jhi@iki.fi>.
6 # Merged on Mon Feb 6 10:22:35 EST 1995 by
7 # Andy Dougherty <doughera@lafcol.lafayette.edu>
10 # Configure finds setrgid and setruid, but they're useless. The man
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.
18 # Neither do these functions work like Perl expects them to.
24 # Intuiting the existence of system calls under AIX is difficult, at best;
25 # the safest (and slowest...) technique is to find them empirically.
31 # Make setsockopt work correctly. See man page.
34 # uname -m output is too specific and not appropriate here
36 '') archname="$osname" ;;
41 ccflags="$ccflags -D_ALL_SOURCE"
43 *) # These hints at least work for 4.x, possibly other systems too.
44 ccflags="$ccflags -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE"
47 *) ccflags="$ccflags -qmaxmem=8192" ;;
53 # Changes for dynamic linking by Wayne Scott <wscott@ichips.intel.com>
55 # Tell perl which symbols to export for dynamic linking.
57 *gcc*) ccdlflags="$ccdlflags -Xlinker" ;;
59 ccdlflags="$ccdlflags -bE:perl.exp"
61 # The first 3 options would not be needed if dynamic libs. could be linked
62 # with the compiler instead of ld.
63 # -bI:$(PERL_INC)/perl.exp Read the exported symbols from the perl binary
64 # -bE:$(BASEEXT).exp Export these symbols. This file contains only one
65 # symbol: boot_$(EXP) can it be auto-generated?
68 lddlflags="$lddlflags -H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -e _nostart -lc"
71 lddlflags="$lddlflags -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc"
75 # This script UU/usethreads.cbu will get 'called-back' by Configure
76 # after it has prompted the user for whether to use threads.
77 cat > UU/usethreads.cbu <<'EOCBU'
80 ccflags="$ccflags -DNEED_PTHREAD_INIT"
84 echo >&4 "Switching cc to xlc_r because of POSIX threads."
92 For pthreads you should use the AIX C compiler xlc_r.
93 (now your compiler was '$cc')
94 Cannot continue, aborting.
100 # Add the POSIX threads library and the re-entrant libc.
102 lddlflags=`echo $lddlflags | sed 's/ -lc$/ -lpthreads -lc_r -lc/'`
104 # Add the c_r library to the list of wanted libraries.
105 # Make sure the c_r library is before the c library or
107 set `echo X "$libswanted "| sed -e 's/ c / c_r c /'`
111 # Perl's malloc doesn't survive threaded AIX.
112 case "$usemymalloc" in
113 '') usemymalloc='n' ;;