Upgrade to ExtUtils::MakeMaker 6.28
[p5sagit/p5-mst-13.2.git] / hints / hpux.sh
1 #!/usr/bin/sh
2
3 ### SYSTEM ARCHITECTURE
4
5 # Determine the architecture type of this system.
6 # Keep leading tab below -- Configure Black Magic -- RAM, 03/02/97
7         xxOsRevMajor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f1`;
8         xxOsRevMinor=`uname -r | sed -e 's/^[^0-9]*//' | cut -d. -f2`;
9         xxOsRev=`expr 100 \* $xxOsRevMajor + $xxOsRevMinor`
10 if [ "$xxOsRevMajor" -ge 10 ]; then
11     # This system is running >= 10.x
12
13     # Tested on 10.01 PA1.x and 10.20 PA[12].x.
14     # Idea: Scan /usr/include/sys/unistd.h for matches with
15     # "#define CPU_* `getconf # CPU_VERSION`" to determine CPU type.
16     # Note the text following "CPU_" is used, *NOT* the comment.
17     #
18     # ASSUMPTIONS: Numbers will continue to be defined in hex -- and in
19     # /usr/include/sys/unistd.h -- and the CPU_* #defines will be kept
20     # up to date with new CPU/OS releases.
21     xxcpu=`getconf CPU_VERSION`; # Get the number.
22     xxcpu=`printf '0x%x' $xxcpu`; # convert to hex
23     archname=`sed -n -e "s/^#[[:space:]]*define[[:space:]]*CPU_//p" /usr/include/sys/unistd.h |
24         sed -n -e "s/[[:space:]]*$xxcpu[[:space:]].*//p" |
25         sed -e s/_RISC/-RISC/ -e s/HP_// -e s/_/./ -e "s/[[:space:]]*//g"`;
26 else
27     # This system is running <= 9.x
28     # Tested on 9.0[57] PA and [78].0 MC680[23]0.  Idea: After removing
29     # MC6888[12] from context string, use first CPU identifier.
30     #
31     # ASSUMPTION: Only CPU identifiers contain no lowercase letters.
32     archname=`getcontext | tr ' ' '\012' | grep -v '[a-z]' | grep -v MC688 |
33         sed -e 's/HP-//' -e 1q`;
34     selecttype='int *'
35     fi
36
37 # For some strange reason, the u32align test from Configure hangs in
38 # HP-UX 10.20 since the December 2001 patches.  So hint it to avoid
39 # the test.
40 if [ "$xxOsRevMajor" -le 10 ]; then
41     d_u32align=$define
42     fi
43
44 echo "Archname is $archname"
45
46 # Fix XSlib (CPAN) confusion when re-using a prefix but changing from ILP32
47 # to LP64 builds.  They're NOT binary compatible, so quit claiming they are.
48 archname64=LP64
49
50
51 ### HP-UX OS specific behaviour
52
53 # -ldbm is obsolete and should not be used
54 # -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
55 # -lPW is obsolete and should not be used
56 # The libraries crypt, malloc, ndir, and net are empty.
57 set `echo "X $libswanted " | sed -e 's/ ld / /' -e 's/ dbm / /' -e 's/ BSD / /' -e 's/ PW / /'`
58 shift
59 libswanted="$*"
60
61 cc=${cc:-cc}
62 ar=/usr/bin/ar  # Yes, truly override.  We do not want the GNU ar.
63 full_ar=$ar     # I repeat, no GNU ar.  arrr.
64
65 set `echo "X $ccflags " | sed -e 's/ -A[ea] / /' -e 's/ -D_HPUX_SOURCE / /'`
66 shift
67         cc_cppflags="$* -D_HPUX_SOURCE"
68 cppflags="-Aa -D__STDC_EXT__ $cc_cppflags"
69
70 case "$prefix" in
71     "") prefix='/opt/perl5' ;;
72     esac
73
74     gnu_as=no
75     gnu_ld=no
76 case `$cc -v 2>&1`"" in
77     *gcc*)  ccisgcc="$define"
78             ccflags="$cc_cppflags"
79             if [ "X$gccversion" = "X" ]; then
80                 # Done too late in Configure if hinted
81                 gccversion=`$cc --version | sed 's/.*(GCC) *//'`
82                 fi
83             case "$gccversion" in
84                 [012]*) # HP-UX and gcc-2.* break UINT32_MAX :-(
85                         ccflags="$ccflags -DUINT32_MAX_BROKEN"
86                         ;;
87                3*)     # GCC (both 32bit and 64bit) will define __STDC_EXT__
88                        # by default when using GCC 3.0 and newer versions of
89                        # the compiler.
90                        cppflags="$cc_cppflags"
91                        ;;
92                 esac
93             case "`getconf KERNEL_BITS 2>/dev/null`" in
94                 *64*)
95                     echo "main(){}">try.c
96                     case "$gccversion" in
97                         3*)
98                             case "$archname" in
99                                PA-RISC*)
100                                    case "$ccflags" in
101                                        *-mpa-risc*) ;;
102                                        *) ccflags="$ccflags -mpa-risc-2-0" ;;
103                                        esac
104                                    ;;
105                                 esac
106                             ;;
107                         *)  # gcc with gas will not accept +DA2.0
108                             case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in
109                                 *"+DA2.0"*)             # gas
110                                     gnu_as=yes
111                                     ;;
112                                 *)                      # HPas
113                                     ccflags="$ccflags -Wa,+DA2.0"
114                                     ;;
115                                 esac
116                             ;;
117                         esac
118                     # gcc with gld will not accept +vnocompatwarnings
119                     case "`$cc -o try -Wl,+vnocompatwarnings try.c 2>&1`" in
120                         *"+vnocompat"*)         # gld
121                             gnu_ld=yes
122                             ;;
123                         *)                      # HPld
124                            case "$gccversion" in
125                                [12]*)
126                                    # Why not 3 as well here?
127                                    # Since not relevant to IA64, not changed.
128                                    ldflags="$ldflags -Wl,+vnocompatwarnings"
129                                    ccflags="$ccflags -Wl,+vnocompatwarnings"
130                                    ;;
131                                esac
132                             ;;
133                         esac
134                     rm -f try.c
135                     ;;
136                 esac
137             ;;
138     *)      ccisgcc=''
139             # What cannot be use in combination with ccache links :(
140             cc_found=""
141             for p in `echo $PATH | tr : ' ''` ; do
142                 x="$p/cc"
143                 if [ -f $x ] && [ -x $x ]; then
144                     if [ -h $x ]; then
145                         l=`ls -l $x | sed 's,.*-> ,,'`
146                         case $l in
147                             /*) x=$l            ;;
148                             *)  x="$p/$l"       ;;
149                             esac
150                         fi
151                     x=`echo $x | sed 's,/\./,/,g'`
152                     case $x in
153                         *ccache*) ;;
154                         *) [ -z "$cc_found" ] && cc_found=$x ;;
155                         esac
156                     fi
157                 done
158             [ -z "$cc_found" ] && cc_found=`which cc`
159             what $cc_found >&4
160             ccversion=`what $cc_found | awk '/Compiler/{print $2}/Itanium/{print $6,$7}'`
161             case "$ccflags" in
162                "-Ae "*) ;;
163                 *)  ccflags="-Ae $cc_cppflags"
164                     # +vnocompatwarnings not known in 10.10 and older
165                     if [ $xxOsRev -ge 1020 ]; then
166                         ccflags="$ccflags -Wl,+vnocompatwarnings"
167                         fi
168                     ;;
169                esac
170             # Needed because cpp does only support -Aa (not -Ae)
171             cpplast='-'
172             cppminus='-'
173             cppstdin='cc -E -Aa -D__STDC_EXT__'
174             cpprun=$cppstdin
175 #           case "$d_casti32" in
176 #               "") d_casti32='undef' ;;
177 #               esac
178             ;;
179     esac
180
181 # When HP-UX runs a script with "#!", it sets argv[0] to the script name.
182 toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
183
184 ### 64 BITNESS
185
186 # Some gcc versions do native 64 bit long (e.g. 2.9-hppa-000310 and gcc-3.0)
187 # We have to force 64bitness to go search the right libraries
188     gcc_64native=no
189 case "$ccisgcc" in
190     $define|true|[Yy])
191         echo 'int main(){long l;printf("%d\\n",sizeof(l));}'>try.c
192         $cc -o try $ccflags $ldflags try.c
193         if [ "`try`" = "8" ]; then
194             cat <<EOM >&4
195
196 *** This version of gcc uses 64 bit longs. -Duse64bitall is
197 *** implicitly set to enable continuation
198 EOM
199             use64bitall=$define
200             gcc_64native=yes
201             fi
202         ;;
203     esac
204
205 case "$use64bitall" in
206     $define|true|[yY]*) use64bitint="$define" ;;
207     esac
208
209 case "$usemorebits" in
210     $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
211     esac
212
213 case "$archname" in
214     IA64*)
215         # While here, override so=sl auto-detection
216         so='so'
217         ;;
218     *)
219         case "$uselongdouble" in
220             *) ;;
221             $define|true|[yY]*)
222                 cat <<EOM >&4
223
224 *** long doubles are not (yet) supported on HP-UX (any version)
225 *** Until it does, we cannot continue, aborting.
226 EOM
227                 exit 1 ;;
228             esac
229         ;;
230     esac
231
232 case "$use64bitint" in
233     $define|true|[Yy])
234
235         if [ "$xxOsRevMajor" -lt 11 ]; then
236             cat <<EOM >&4
237
238 *** 64-bit compilation is not supported on HP-UX $xxOsRevMajor.
239 *** You need at least HP-UX 11.0.
240 *** Cannot continue, aborting.
241 EOM
242             exit 1
243             fi
244
245         # Set libc and the library paths
246         case "$archname" in
247             PA-RISC*)
248                 loclibpth="$loclibpth /lib/pa20_64"
249                 libc='/lib/pa20_64/libc.sl' ;;
250             IA64*) 
251                 loclibpth="$loclibpth /usr/lib/hpux64"
252                 libc='/usr/lib/hpux64/libc.so' ;;
253             esac
254         if [ ! -f "$libc" ]; then
255             cat <<EOM >&4
256
257 *** You do not seem to have the 64-bit libc.
258 *** I cannot find the file $libc.
259 *** Cannot continue, aborting.
260 EOM
261             exit 1
262             fi
263
264         case "$ccisgcc" in
265             $define|true|[Yy])
266                 # For the moment, don't care that it ain't supported (yet)
267                 # by gcc (up to and including 2.95.3), cause it'll crash
268                 # anyway. Expect auto-detection of 64-bit enabled gcc on
269                 # HP-UX soon, including a user-friendly exit
270                 case $gcc_64native in
271                     no) case "$gccversion" in
272                             [123]*) ccflags="$ccflags -mlp64"
273                                     case "$archname" in
274                                         PA-RISC*)
275                                             ldflags="$ldflags -Wl,+DD64"
276                                             ;;
277                                         IA64*)
278                                             ldflags="$ldflags -mlp64"
279                                             ;;
280                                         esac
281                                     ;;
282                             esac
283                         ;;
284                     esac
285                 ;;
286             *)
287                 ccflags="$ccflags +DD64"
288                 ldflags="$ldflags +DD64"
289                 ;;
290             esac
291
292         # Reset the library checker to make sure libraries
293         # are the right type
294         # (NOTE: on IA64, this doesn't work with .a files.)
295         libscheck='case "`/usr/bin/file $xxx`" in
296                        *ELF-64*|*LP64*|*PA-RISC2.0*) ;;
297                        *) xxx=/no/64-bit$xxx ;;
298                        esac'
299
300         ;;
301
302     *)  # Not in 64-bit mode
303
304         case "$archname" in
305             PA-RISC*)
306                 libc='/lib/libc.sl' ;;
307             IA64*) 
308                 loclibpth="$loclibpth /usr/lib/hpux32"
309                 libc='/usr/lib/hpux32/libc.so' ;;
310             esac
311         ;;
312     esac
313
314 # By setting the deferred flag below, this means that if you run perl
315 # on a system that does not have the required shared library that you
316 # linked it with, it will die when you try to access a symbol in the
317 # (missing) shared library.  If you would rather know at perl startup
318 # time that you are missing an important shared library, switch the
319 # comments so that immediate, rather than deferred loading is
320 # performed.  Even with immediate loading, you can postpone errors for
321 # undefined (or multiply defined) routines until actual access by
322 # adding the "nonfatal" option.
323 # ccdlflags="-Wl,-E -Wl,-B,immediate $ccdlflags"
324 # ccdlflags="-Wl,-E -Wl,-B,immediate,-B,nonfatal $ccdlflags"
325 if [ "$gnu_ld" = "yes" ]; then
326     ccdlflags="-Wl,-E $ccdlflags"
327 else
328     ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags"
329     fi
330
331
332 ### COMPILER SPECIFICS
333
334 ## Local restrictions (point to README.hpux to lift these)
335
336 ## Optimization limits
337 cat >try.c <<EOF
338 #include <sys/resource.h>
339
340 int main ()
341 {
342     struct rlimit rl;
343     int i = getrlimit (RLIMIT_DATA, &rl);
344     printf ("%d\n", rl.rlim_cur / (1024 * 1024));
345     } /* main */
346 EOF
347 $cc -o try $ccflags $ldflags try.c
348         maxdsiz=`try`
349 rm -f try try.c core
350 if [ $maxdsiz -le 64 ]; then
351     # 64 Mb is probably not enough to optimize toke.c
352     # and regexp.c with -O2
353     cat <<EOM >&4
354 Your kernel limits the data section of your programs to $maxdsiz Mb,
355 which is (sadly) not enough to fully optimize some parts of the
356 perl binary. I'll try to use a lower optimization level for
357 those parts. If you are a sysadmin, and you *do* want full
358 optimization, raise the 'maxdsiz' kernel configuration parameter
359 to at least 0x08000000 (128 Mb) and rebuild your kernel.
360 EOM
361 regexec_cflags=''
362 doop_cflags=''
363     fi
364
365 case "$ccisgcc" in
366     $define|true|[Yy])
367         
368         case "$optimize" in
369             "")           optimize="-g -O" ;;
370             *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
371             esac
372         #ld="$cc"
373         ld=/usr/bin/ld
374         cccdlflags='-fPIC'
375         #lddlflags='-shared'
376         lddlflags='-b'
377         case "$optimize" in
378             *-g*-O*|*-O*-g*)
379                 # gcc without gas will not accept -g
380                 echo "main(){}">try.c
381                 case "`$cc $optimize -c try.c 2>&1`" in
382                     *"-g option disabled"*)
383                         set `echo "X $optimize " | sed -e 's/ -g / /'`
384                         shift
385                         optimize="$*"
386                         ;;
387                     esac
388                 ;;
389             esac
390         if [ $maxdsiz -le 64 ]; then
391             case "$optimize" in
392                 *O2*)   opt=`echo "$optimize" | sed -e 's/O2/O1/'`
393                         toke_cflags="$toke_cflags;optimize=\"$opt\""
394                         regexec_cflags="optimize=\"$opt\""
395                         ;;
396                 esac
397             fi
398         ;;
399
400     *)  # HP's compiler cannot combine -g and -O
401         case "$optimize" in
402             "")           optimize="+O2 +Onolimit" ;;
403             *O[3456789]*) optimize=`echo "$optimize" | sed -e 's/O[3-9]/O2/'` ;;
404             esac
405         case "$optimize" in
406             *-O*|\
407             *O2*)   opt=`echo "$optimize" | sed -e 's/-O/+O2/' -e 's/O2/O1/' -e 's/ *+Onolimit//'`
408                     ;;
409             *)      opt="$optimize"
410                     ;;
411             esac
412         if [ $maxdsiz -le 64 ]; then
413             toke_cflags="$toke_cflags;optimize=\"$opt\""
414             regexec_cflags="optimize=\"$opt\""
415             fi
416         case "$archname" in
417             IA64*)
418                 doop_cflags="optimize=\"$opt\""
419                 ;;
420             esac
421         ld=/usr/bin/ld
422         cccdlflags='+Z'
423         lddlflags='-b +vnocompatwarnings'
424         ;;
425     esac
426
427 ## LARGEFILES
428 if [ $xxOsRev -lt 1020 ]; then
429     uselargefiles="$undef"
430     fi
431
432 #case "$uselargefiles-$ccisgcc" in
433 #    "$define-$define"|'-define') 
434 #       cat <<EOM >&4
435 #
436 #*** I'm ignoring large files for this build because
437 #*** I don't know how to do use large files in HP-UX using gcc.
438 #
439 #EOM
440 #       uselargefiles="$undef"
441 #       ;;
442 #    esac
443
444 # Once we have the compiler flags defined, Configure will
445 # execute the following call-back script. See hints/README.hints
446 # for details.
447 cat > UU/cc.cbu <<'EOCBU'
448 # This script UU/cc.cbu will get 'called-back' by Configure after it
449 # has prompted the user for the C compiler to use.
450
451 # Compile and run the a test case to see if a certain gcc bug is
452 # present. If so, lower the optimization level when compiling
453 # pp_pack.c.  This works around a bug in unpack.
454
455 if test -z "$ccisgcc" -a -z "$gccversion"; then
456     : no tests needed for HPc
457 else
458     echo " "
459     echo "Testing for a certain gcc bug is fixed in your compiler..."
460
461     # Try compiling the test case.
462     if $cc -o t001 -O $ccflags $ldflags -lm ../hints/t001.c; then
463        gccbug=`$run ./t001`
464        case "$gccbug" in
465            *fails*)
466                cat >&4 <<EOF
467 This C compiler ($gccversion) is known to have optimizer
468 problems when compiling pp_pack.c.
469
470 Disabling optimization for pp_pack.c.
471 EOF
472                case "$pp_pack_cflags" in
473                    '') pp_pack_cflags='optimize='
474                        echo "pp_pack_cflags='optimize=\"\"'" >> config.sh ;;
475                    *)  echo "You specified pp_pack_cflags yourself, so we'll go with your value." >&4 ;;
476                    esac
477                ;;
478            *)  echo "Your compiler is ok." >&4
479                ;;
480            esac
481     else
482        echo " "
483        echo "*** WHOA THERE!!! ***" >&4
484        echo "    Your C compiler \"$cc\" doesn't seem to be working!" >&4
485        case "$knowitall" in
486            '') echo "    You'd better start hunting for one and let me know about it." >&4
487                exit 1
488                ;;
489            esac
490        fi
491
492     rm -f t001$_o t001$_exe
493     fi
494 EOCBU
495
496 cat >UU/uselargefiles.cbu <<'EOCBU'
497 # This script UU/uselargefiles.cbu will get 'called-back' by Configure 
498 # after it has prompted the user for whether to use large files.
499 case "$uselargefiles" in
500     ""|$define|true|[yY]*)
501         # there are largefile flags available via getconf(1)
502         # but we cheat for now.  (Keep that in the left margin.)
503 ccflags_uselargefiles="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
504
505         case " $ccflags " in
506         *" $ccflags_uselargefiles "*) ;;
507         *) ccflags="$ccflags $ccflags_uselargefiles" ;;
508         esac
509
510         if test -z "$ccisgcc" -a -z "$gccversion"; then
511             # The strict ANSI mode (-Aa) doesn't like large files.
512             ccflags=`echo " $ccflags "|sed 's@ -Aa @ @g'`
513             case "$ccflags" in
514                 *-Ae*) ;;
515                 *)     ccflags="$ccflags -Ae" ;;
516                 esac
517             fi
518         ;;
519     esac
520 EOCBU
521
522 # THREADING
523
524 # This script UU/usethreads.cbu will get 'called-back' by Configure 
525 # after it has prompted the user for whether to use threads.
526 cat >UU/usethreads.cbu <<'EOCBU'
527 case "$usethreads" in
528     $define|true|[yY]*)
529         if [ "$xxOsRevMajor" -lt 10 ]; then
530             cat <<EOM >&4
531
532 HP-UX $xxOsRevMajor cannot support POSIX threads.
533 Consider upgrading to at least HP-UX 11.
534 Cannot continue, aborting.
535 EOM
536             exit 1
537             fi
538
539         if [ "$xxOsRevMajor" -eq 10 ]; then
540             # Under 10.X, a threaded perl can be built
541             if [ -f /usr/include/pthread.h ]; then
542                 if [ -f /usr/lib/libcma.sl ]; then
543                     # DCE (from Core OS CD) is installed
544
545                    # Check if it is pristine, or patched
546                    cmavsn=`what /usr/lib/libcma.sl 2>&1 | grep 1996`
547                    if [ ! -z "$cmavsn" ]; then
548                        cat <<EOM >&4
549 \a
550 ***************************************************************************
551
552 Perl will support threading through /usr/lib/libcma.sl from
553 the HP DCE package, but the version found is too old to be
554 reliable.
555
556 If you are not depending on this specific version of the library,
557 consider to upgrade using patch PHSS_23672 (read README.hpux)
558
559 ***************************************************************************
560
561 (sleeping for 10 seconds...)
562 EOM
563                        sleep 10
564                        fi
565
566                     # It needs # libcma and OLD_PTHREADS_API. Also
567                     # <pthread.h> needs to be #included before any
568                     # other includes (in perl.h)
569
570                     # HP-UX 10.X uses the old pthreads API
571                     d_oldpthreads="$define"
572
573                     # include libcma before all the others
574                     libswanted="cma $libswanted"
575
576                     # tell perl.h to include <pthread.h> before other
577                     # include files
578                     ccflags="$ccflags -DPTHREAD_H_FIRST"
579 # First column on purpose:
580 # this is not a standard Configure variable
581 # but we need to get this noticed.
582 pthread_h_first="$define"
583
584                     # HP-UX 10.X seems to have no easy
585                     # way of detecting these *time_r protos.
586                     d_gmtime_r_proto='define'
587                     gmtime_r_proto='REENTRANT_PROTO_I_TS'
588                     d_localtime_r_proto='define'
589                     localtime_r_proto='REENTRANT_PROTO_I_TS'
590
591                     # Avoid the poisonous conflicting (and irrelevant)
592                     # prototypes of setkey(). 
593                     i_crypt="$undef"
594
595                     # CMA redefines select to cma_select, and cma_select
596                     # expects int * instead of fd_set * (just like 9.X)
597                     selecttype='int *'
598
599                 elif [ -f /usr/lib/libpthread.sl ]; then
600                     # PTH package is installed
601                     libswanted="pthread $libswanted"
602                 else
603                     libswanted="no_threads_available"
604                     fi
605             else
606                 libswanted="no_threads_available"
607                 fi
608
609             if [ $libswanted = "no_threads_available" ]; then
610                 cat <<EOM >&4
611
612 In HP-UX 10.X for POSIX threads you need both of the files
613 /usr/include/pthread.h and either /usr/lib/libcma.sl or /usr/lib/libpthread.sl.
614 Either you must upgrade to HP-UX 11 or install a posix thread library:
615
616     DCE-CoreTools from HP-UX 10.20 Hardware Extensions 3.0 CD (B3920-13941)
617
618 or
619
620     PTH package from e.g. http://hpux.tn.tudelft.nl/hppd/hpux/alpha.html
621
622 Cannot continue, aborting.
623 EOM
624                 exit 1
625                 fi
626         else
627             # 12 may want upping the _POSIX_C_SOURCE datestamp...
628             ccflags=" -D_POSIX_C_SOURCE=199506L -D_REENTRANT $ccflags"
629             set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
630             shift
631             libswanted="$*"
632             fi
633
634         ;;
635     esac
636 EOCBU
637
638 # The mysterious io_xs memory corruption in 11.00 32bit seems to get
639 # fixed by not using Perl's malloc.  Flip side is performance loss.
640 # So we want mymalloc for all situations possible
641 usemymalloc='y'
642 case "$usethreads" in
643     $define|true|[yY]*) usemymalloc='n' ;;
644     *)  case "$ccisgcc" in
645            $undef|false|[nN]*)
646                case "$use64bitint" in
647                    $undef|false|[nN]*)
648                        case "$ccflags" in
649                            *-DDEBUGGING*) ;;
650                            *) usemymalloc='n' ;;
651                            esac
652                        ;;
653                    esac
654                ;;
655            esac
656        ;;
657     esac
658
659 usemymalloc='n'
660 case "$useperlio" in
661     $undef|false|[nN]*) usemymalloc='y' ;;
662     esac
663
664 # malloc wrap works
665 case "$usemallocwrap" in
666 '') usemallocwrap='define' ;;
667 esac
668
669 # fpclassify() is a macro, the library call is Fpclassify
670 # Similarly with the others below.
671 d_fpclassify='define'
672 d_isnan='define'
673 d_isinf='define'
674 d_isfinite='define'
675 d_unordered='define'
676 # Next one(s) need the leading tab.  These are special 'hint' symbols that
677 # are not to be propagated to config.sh, all related to pthreads draft 4
678 # interfaces.
679 case "$d_oldpthreads" in
680     ''|$undef)
681         d_crypt_r_proto='undef'
682         d_getgrent_r_proto='undef'
683         d_getpwent_r_proto='undef'
684         d_strerror_r_proto='undef'
685         ;;
686     esac