configure revision 91041
160484Sobrien#! /bin/sh 260484Sobrien 360484Sobrien# Guess values for system-dependent variables and create Makefiles. 460484Sobrien# Generated automatically using autoconf version 2.13 560484Sobrien# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 660484Sobrien# 760484Sobrien# This configure script is free software; the Free Software Foundation 860484Sobrien# gives unlimited permission to copy, distribute and modify it. 960484Sobrien 1060484Sobrien# Defaults: 1160484Sobrienac_help= 1260484Sobrienac_default_prefix=/usr/local 1360484Sobrien# Any additions from configure.in: 1460484Sobrienac_help="$ac_help 1560484Sobrien --with-target-subdir=SUBDIR Configuring in a subdirectory" 1660484Sobrienac_help="$ac_help 1760484Sobrien --with-cross-host=HOST Configuring with a cross compiler" 1860484Sobrienac_help="$ac_help 1960484Sobrien --with-newlib Configuring with newlib" 2089857Sobrienac_help="$ac_help 2189857Sobrien --enable-maintainer-mode 2289857Sobrien enable make rules and dependencies not useful 2389857Sobrien (and sometimes confusing) to the casual installer" 2460484Sobrien 2560484Sobrien# Initialize some variables set by options. 2660484Sobrien# The variables have the same names as the options, with 2760484Sobrien# dashes changed to underlines. 2860484Sobrienbuild=NONE 2960484Sobriencache_file=./config.cache 3060484Sobrienexec_prefix=NONE 3160484Sobrienhost=NONE 3260484Sobrienno_create= 3360484Sobriennonopt=NONE 3460484Sobrienno_recursion= 3560484Sobrienprefix=NONE 3660484Sobrienprogram_prefix=NONE 3760484Sobrienprogram_suffix=NONE 3860484Sobrienprogram_transform_name=s,x,x, 3960484Sobriensilent= 4060484Sobriensite= 4160484Sobriensrcdir= 4260484Sobrientarget=NONE 4360484Sobrienverbose= 4460484Sobrienx_includes=NONE 4560484Sobrienx_libraries=NONE 4660484Sobrienbindir='${exec_prefix}/bin' 4760484Sobriensbindir='${exec_prefix}/sbin' 4860484Sobrienlibexecdir='${exec_prefix}/libexec' 4960484Sobriendatadir='${prefix}/share' 5060484Sobriensysconfdir='${prefix}/etc' 5160484Sobriensharedstatedir='${prefix}/com' 5260484Sobrienlocalstatedir='${prefix}/var' 5360484Sobrienlibdir='${exec_prefix}/lib' 5460484Sobrienincludedir='${prefix}/include' 5560484Sobrienoldincludedir='/usr/include' 5660484Sobrieninfodir='${prefix}/info' 5760484Sobrienmandir='${prefix}/man' 5860484Sobrien 5960484Sobrien# Initialize some other variables. 6060484Sobriensubdirs= 6160484SobrienMFLAGS= MAKEFLAGS= 6260484SobrienSHELL=${CONFIG_SHELL-/bin/sh} 6360484Sobrien# Maximum number of lines to put in a shell here document. 6460484Sobrienac_max_here_lines=12 6560484Sobrien 6660484Sobrienac_prev= 6760484Sobrienfor ac_option 6860484Sobriendo 6960484Sobrien 7060484Sobrien # If the previous option needs an argument, assign it. 7160484Sobrien if test -n "$ac_prev"; then 7260484Sobrien eval "$ac_prev=\$ac_option" 7360484Sobrien ac_prev= 7460484Sobrien continue 7560484Sobrien fi 7660484Sobrien 7760484Sobrien case "$ac_option" in 7860484Sobrien -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 7960484Sobrien *) ac_optarg= ;; 8060484Sobrien esac 8160484Sobrien 8260484Sobrien # Accept the important Cygnus configure options, so we can diagnose typos. 8360484Sobrien 8460484Sobrien case "$ac_option" in 8560484Sobrien 8660484Sobrien -bindir | --bindir | --bindi | --bind | --bin | --bi) 8760484Sobrien ac_prev=bindir ;; 8860484Sobrien -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 8960484Sobrien bindir="$ac_optarg" ;; 9060484Sobrien 9160484Sobrien -build | --build | --buil | --bui | --bu) 9260484Sobrien ac_prev=build ;; 9360484Sobrien -build=* | --build=* | --buil=* | --bui=* | --bu=*) 9460484Sobrien build="$ac_optarg" ;; 9560484Sobrien 9660484Sobrien -cache-file | --cache-file | --cache-fil | --cache-fi \ 9760484Sobrien | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 9860484Sobrien ac_prev=cache_file ;; 9960484Sobrien -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 10060484Sobrien | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 10160484Sobrien cache_file="$ac_optarg" ;; 10260484Sobrien 10360484Sobrien -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 10460484Sobrien ac_prev=datadir ;; 10560484Sobrien -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 10660484Sobrien | --da=*) 10760484Sobrien datadir="$ac_optarg" ;; 10860484Sobrien 10960484Sobrien -disable-* | --disable-*) 11060484Sobrien ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 11160484Sobrien # Reject names that are not valid shell variable names. 11260484Sobrien if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 11360484Sobrien { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 11460484Sobrien fi 11560484Sobrien ac_feature=`echo $ac_feature| sed 's/-/_/g'` 11660484Sobrien eval "enable_${ac_feature}=no" ;; 11760484Sobrien 11860484Sobrien -enable-* | --enable-*) 11960484Sobrien ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 12060484Sobrien # Reject names that are not valid shell variable names. 12160484Sobrien if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 12260484Sobrien { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 12360484Sobrien fi 12460484Sobrien ac_feature=`echo $ac_feature| sed 's/-/_/g'` 12560484Sobrien case "$ac_option" in 12660484Sobrien *=*) ;; 12760484Sobrien *) ac_optarg=yes ;; 12860484Sobrien esac 12960484Sobrien eval "enable_${ac_feature}='$ac_optarg'" ;; 13060484Sobrien 13160484Sobrien -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 13260484Sobrien | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 13360484Sobrien | --exec | --exe | --ex) 13460484Sobrien ac_prev=exec_prefix ;; 13560484Sobrien -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 13660484Sobrien | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 13760484Sobrien | --exec=* | --exe=* | --ex=*) 13860484Sobrien exec_prefix="$ac_optarg" ;; 13960484Sobrien 14060484Sobrien -gas | --gas | --ga | --g) 14160484Sobrien # Obsolete; use --with-gas. 14260484Sobrien with_gas=yes ;; 14360484Sobrien 14460484Sobrien -help | --help | --hel | --he) 14560484Sobrien # Omit some internal or obsolete options to make the list less imposing. 14660484Sobrien # This message is too long to be a string in the A/UX 3.1 sh. 14760484Sobrien cat << EOF 14860484SobrienUsage: configure [options] [host] 14960484SobrienOptions: [defaults in brackets after descriptions] 15060484SobrienConfiguration: 15160484Sobrien --cache-file=FILE cache test results in FILE 15260484Sobrien --help print this message 15360484Sobrien --no-create do not create output files 15460484Sobrien --quiet, --silent do not print \`checking...' messages 15560484Sobrien --version print the version of autoconf that created configure 15660484SobrienDirectory and file names: 15760484Sobrien --prefix=PREFIX install architecture-independent files in PREFIX 15860484Sobrien [$ac_default_prefix] 15960484Sobrien --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 16060484Sobrien [same as prefix] 16160484Sobrien --bindir=DIR user executables in DIR [EPREFIX/bin] 16260484Sobrien --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 16360484Sobrien --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 16460484Sobrien --datadir=DIR read-only architecture-independent data in DIR 16560484Sobrien [PREFIX/share] 16660484Sobrien --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 16760484Sobrien --sharedstatedir=DIR modifiable architecture-independent data in DIR 16860484Sobrien [PREFIX/com] 16960484Sobrien --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 17060484Sobrien --libdir=DIR object code libraries in DIR [EPREFIX/lib] 17160484Sobrien --includedir=DIR C header files in DIR [PREFIX/include] 17260484Sobrien --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 17360484Sobrien --infodir=DIR info documentation in DIR [PREFIX/info] 17460484Sobrien --mandir=DIR man documentation in DIR [PREFIX/man] 17560484Sobrien --srcdir=DIR find the sources in DIR [configure dir or ..] 17660484Sobrien --program-prefix=PREFIX prepend PREFIX to installed program names 17760484Sobrien --program-suffix=SUFFIX append SUFFIX to installed program names 17860484Sobrien --program-transform-name=PROGRAM 17960484Sobrien run sed PROGRAM on installed program names 18060484SobrienEOF 18160484Sobrien cat << EOF 18260484SobrienHost type: 18360484Sobrien --build=BUILD configure for building on BUILD [BUILD=HOST] 18460484Sobrien --host=HOST configure for HOST [guessed] 18560484Sobrien --target=TARGET configure for TARGET [TARGET=HOST] 18660484SobrienFeatures and packages: 18760484Sobrien --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 18860484Sobrien --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 18960484Sobrien --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 19060484Sobrien --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 19160484Sobrien --x-includes=DIR X include files are in DIR 19260484Sobrien --x-libraries=DIR X library files are in DIR 19360484SobrienEOF 19460484Sobrien if test -n "$ac_help"; then 19560484Sobrien echo "--enable and --with options recognized:$ac_help" 19660484Sobrien fi 19760484Sobrien exit 0 ;; 19860484Sobrien 19960484Sobrien -host | --host | --hos | --ho) 20060484Sobrien ac_prev=host ;; 20160484Sobrien -host=* | --host=* | --hos=* | --ho=*) 20260484Sobrien host="$ac_optarg" ;; 20360484Sobrien 20460484Sobrien -includedir | --includedir | --includedi | --included | --include \ 20560484Sobrien | --includ | --inclu | --incl | --inc) 20660484Sobrien ac_prev=includedir ;; 20760484Sobrien -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 20860484Sobrien | --includ=* | --inclu=* | --incl=* | --inc=*) 20960484Sobrien includedir="$ac_optarg" ;; 21060484Sobrien 21160484Sobrien -infodir | --infodir | --infodi | --infod | --info | --inf) 21260484Sobrien ac_prev=infodir ;; 21360484Sobrien -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 21460484Sobrien infodir="$ac_optarg" ;; 21560484Sobrien 21660484Sobrien -libdir | --libdir | --libdi | --libd) 21760484Sobrien ac_prev=libdir ;; 21860484Sobrien -libdir=* | --libdir=* | --libdi=* | --libd=*) 21960484Sobrien libdir="$ac_optarg" ;; 22060484Sobrien 22160484Sobrien -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 22260484Sobrien | --libexe | --libex | --libe) 22360484Sobrien ac_prev=libexecdir ;; 22460484Sobrien -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 22560484Sobrien | --libexe=* | --libex=* | --libe=*) 22660484Sobrien libexecdir="$ac_optarg" ;; 22760484Sobrien 22860484Sobrien -localstatedir | --localstatedir | --localstatedi | --localstated \ 22960484Sobrien | --localstate | --localstat | --localsta | --localst \ 23060484Sobrien | --locals | --local | --loca | --loc | --lo) 23160484Sobrien ac_prev=localstatedir ;; 23260484Sobrien -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 23360484Sobrien | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 23460484Sobrien | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 23560484Sobrien localstatedir="$ac_optarg" ;; 23660484Sobrien 23760484Sobrien -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 23860484Sobrien ac_prev=mandir ;; 23960484Sobrien -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 24060484Sobrien mandir="$ac_optarg" ;; 24160484Sobrien 24260484Sobrien -nfp | --nfp | --nf) 24360484Sobrien # Obsolete; use --without-fp. 24460484Sobrien with_fp=no ;; 24560484Sobrien 24660484Sobrien -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 24760484Sobrien | --no-cr | --no-c) 24860484Sobrien no_create=yes ;; 24960484Sobrien 25060484Sobrien -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 25160484Sobrien | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 25260484Sobrien no_recursion=yes ;; 25360484Sobrien 25460484Sobrien -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 25560484Sobrien | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 25660484Sobrien | --oldin | --oldi | --old | --ol | --o) 25760484Sobrien ac_prev=oldincludedir ;; 25860484Sobrien -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 25960484Sobrien | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 26060484Sobrien | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 26160484Sobrien oldincludedir="$ac_optarg" ;; 26260484Sobrien 26360484Sobrien -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 26460484Sobrien ac_prev=prefix ;; 26560484Sobrien -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 26660484Sobrien prefix="$ac_optarg" ;; 26760484Sobrien 26860484Sobrien -program-prefix | --program-prefix | --program-prefi | --program-pref \ 26960484Sobrien | --program-pre | --program-pr | --program-p) 27060484Sobrien ac_prev=program_prefix ;; 27160484Sobrien -program-prefix=* | --program-prefix=* | --program-prefi=* \ 27260484Sobrien | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 27360484Sobrien program_prefix="$ac_optarg" ;; 27460484Sobrien 27560484Sobrien -program-suffix | --program-suffix | --program-suffi | --program-suff \ 27660484Sobrien | --program-suf | --program-su | --program-s) 27760484Sobrien ac_prev=program_suffix ;; 27860484Sobrien -program-suffix=* | --program-suffix=* | --program-suffi=* \ 27960484Sobrien | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 28060484Sobrien program_suffix="$ac_optarg" ;; 28160484Sobrien 28260484Sobrien -program-transform-name | --program-transform-name \ 28360484Sobrien | --program-transform-nam | --program-transform-na \ 28460484Sobrien | --program-transform-n | --program-transform- \ 28560484Sobrien | --program-transform | --program-transfor \ 28660484Sobrien | --program-transfo | --program-transf \ 28760484Sobrien | --program-trans | --program-tran \ 28860484Sobrien | --progr-tra | --program-tr | --program-t) 28960484Sobrien ac_prev=program_transform_name ;; 29060484Sobrien -program-transform-name=* | --program-transform-name=* \ 29160484Sobrien | --program-transform-nam=* | --program-transform-na=* \ 29260484Sobrien | --program-transform-n=* | --program-transform-=* \ 29360484Sobrien | --program-transform=* | --program-transfor=* \ 29460484Sobrien | --program-transfo=* | --program-transf=* \ 29560484Sobrien | --program-trans=* | --program-tran=* \ 29660484Sobrien | --progr-tra=* | --program-tr=* | --program-t=*) 29760484Sobrien program_transform_name="$ac_optarg" ;; 29860484Sobrien 29960484Sobrien -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 30060484Sobrien | -silent | --silent | --silen | --sile | --sil) 30160484Sobrien silent=yes ;; 30260484Sobrien 30360484Sobrien -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 30460484Sobrien ac_prev=sbindir ;; 30560484Sobrien -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 30660484Sobrien | --sbi=* | --sb=*) 30760484Sobrien sbindir="$ac_optarg" ;; 30860484Sobrien 30960484Sobrien -sharedstatedir | --sharedstatedir | --sharedstatedi \ 31060484Sobrien | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 31160484Sobrien | --sharedst | --shareds | --shared | --share | --shar \ 31260484Sobrien | --sha | --sh) 31360484Sobrien ac_prev=sharedstatedir ;; 31460484Sobrien -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 31560484Sobrien | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 31660484Sobrien | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 31760484Sobrien | --sha=* | --sh=*) 31860484Sobrien sharedstatedir="$ac_optarg" ;; 31960484Sobrien 32060484Sobrien -site | --site | --sit) 32160484Sobrien ac_prev=site ;; 32260484Sobrien -site=* | --site=* | --sit=*) 32360484Sobrien site="$ac_optarg" ;; 32460484Sobrien 32560484Sobrien -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 32660484Sobrien ac_prev=srcdir ;; 32760484Sobrien -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 32860484Sobrien srcdir="$ac_optarg" ;; 32960484Sobrien 33060484Sobrien -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 33160484Sobrien | --syscon | --sysco | --sysc | --sys | --sy) 33260484Sobrien ac_prev=sysconfdir ;; 33360484Sobrien -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 33460484Sobrien | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 33560484Sobrien sysconfdir="$ac_optarg" ;; 33660484Sobrien 33760484Sobrien -target | --target | --targe | --targ | --tar | --ta | --t) 33860484Sobrien ac_prev=target ;; 33960484Sobrien -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 34060484Sobrien target="$ac_optarg" ;; 34160484Sobrien 34260484Sobrien -v | -verbose | --verbose | --verbos | --verbo | --verb) 34360484Sobrien verbose=yes ;; 34460484Sobrien 34560484Sobrien -version | --version | --versio | --versi | --vers) 34660484Sobrien echo "configure generated by autoconf version 2.13" 34760484Sobrien exit 0 ;; 34860484Sobrien 34960484Sobrien -with-* | --with-*) 35060484Sobrien ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 35160484Sobrien # Reject names that are not valid shell variable names. 35260484Sobrien if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 35360484Sobrien { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 35460484Sobrien fi 35560484Sobrien ac_package=`echo $ac_package| sed 's/-/_/g'` 35660484Sobrien case "$ac_option" in 35760484Sobrien *=*) ;; 35860484Sobrien *) ac_optarg=yes ;; 35960484Sobrien esac 36060484Sobrien eval "with_${ac_package}='$ac_optarg'" ;; 36160484Sobrien 36260484Sobrien -without-* | --without-*) 36360484Sobrien ac_package=`echo $ac_option|sed -e 's/-*without-//'` 36460484Sobrien # Reject names that are not valid shell variable names. 36560484Sobrien if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 36660484Sobrien { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 36760484Sobrien fi 36860484Sobrien ac_package=`echo $ac_package| sed 's/-/_/g'` 36960484Sobrien eval "with_${ac_package}=no" ;; 37060484Sobrien 37160484Sobrien --x) 37260484Sobrien # Obsolete; use --with-x. 37360484Sobrien with_x=yes ;; 37460484Sobrien 37560484Sobrien -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 37660484Sobrien | --x-incl | --x-inc | --x-in | --x-i) 37760484Sobrien ac_prev=x_includes ;; 37860484Sobrien -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 37960484Sobrien | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 38060484Sobrien x_includes="$ac_optarg" ;; 38160484Sobrien 38260484Sobrien -x-libraries | --x-libraries | --x-librarie | --x-librari \ 38360484Sobrien | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 38460484Sobrien ac_prev=x_libraries ;; 38560484Sobrien -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 38660484Sobrien | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 38760484Sobrien x_libraries="$ac_optarg" ;; 38860484Sobrien 38960484Sobrien -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 39060484Sobrien ;; 39160484Sobrien 39260484Sobrien *) 39360484Sobrien if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 39460484Sobrien echo "configure: warning: $ac_option: invalid host type" 1>&2 39560484Sobrien fi 39660484Sobrien if test "x$nonopt" != xNONE; then 39760484Sobrien { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 39860484Sobrien fi 39960484Sobrien nonopt="$ac_option" 40060484Sobrien ;; 40160484Sobrien 40260484Sobrien esac 40360484Sobriendone 40460484Sobrien 40560484Sobrienif test -n "$ac_prev"; then 40660484Sobrien { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 40760484Sobrienfi 40860484Sobrien 40960484Sobrientrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 41060484Sobrien 41160484Sobrien# File descriptor usage: 41260484Sobrien# 0 standard input 41360484Sobrien# 1 file creation 41460484Sobrien# 2 errors and warnings 41560484Sobrien# 3 some systems may open it to /dev/tty 41660484Sobrien# 4 used on the Kubota Titan 41760484Sobrien# 6 checking for... messages and results 41860484Sobrien# 5 compiler messages saved in config.log 41960484Sobrienif test "$silent" = yes; then 42060484Sobrien exec 6>/dev/null 42160484Sobrienelse 42260484Sobrien exec 6>&1 42360484Sobrienfi 42460484Sobrienexec 5>./config.log 42560484Sobrien 42660484Sobrienecho "\ 42760484SobrienThis file contains any messages produced by compilers while 42860484Sobrienrunning configure, to aid debugging if configure makes a mistake. 42960484Sobrien" 1>&5 43060484Sobrien 43160484Sobrien# Strip out --no-create and --no-recursion so they do not pile up. 43260484Sobrien# Also quote any args containing shell metacharacters. 43360484Sobrienac_configure_args= 43460484Sobrienfor ac_arg 43560484Sobriendo 43660484Sobrien case "$ac_arg" in 43760484Sobrien -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 43860484Sobrien | --no-cr | --no-c) ;; 43960484Sobrien -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 44060484Sobrien | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 44160484Sobrien *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 44260484Sobrien ac_configure_args="$ac_configure_args '$ac_arg'" ;; 44360484Sobrien *) ac_configure_args="$ac_configure_args $ac_arg" ;; 44460484Sobrien esac 44560484Sobriendone 44660484Sobrien 44760484Sobrien# NLS nuisances. 44860484Sobrien# Only set these to C if already set. These must not be set unconditionally 44960484Sobrien# because not all systems understand e.g. LANG=C (notably SCO). 45060484Sobrien# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! 45160484Sobrien# Non-C LC_CTYPE values break the ctype check. 45260484Sobrienif test "${LANG+set}" = set; then LANG=C; export LANG; fi 45360484Sobrienif test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 45460484Sobrienif test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi 45560484Sobrienif test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi 45660484Sobrien 45760484Sobrien# confdefs.h avoids OS command line length limits that DEFS can exceed. 45860484Sobrienrm -rf conftest* confdefs.h 45960484Sobrien# AIX cpp loses on an empty file, so make sure it contains at least a newline. 46060484Sobrienecho > confdefs.h 46160484Sobrien 46260484Sobrien# A filename unique to this package, relative to the directory that 46360484Sobrien# configure is in, which we can look for to find out if srcdir is correct. 46460484Sobrienac_unique_file=pexecute.c 46560484Sobrien 46660484Sobrien# Find the source files, if location was not specified. 46760484Sobrienif test -z "$srcdir"; then 46860484Sobrien ac_srcdir_defaulted=yes 46960484Sobrien # Try the directory containing this script, then its parent. 47060484Sobrien ac_prog=$0 47160484Sobrien ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 47260484Sobrien test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 47360484Sobrien srcdir=$ac_confdir 47460484Sobrien if test ! -r $srcdir/$ac_unique_file; then 47560484Sobrien srcdir=.. 47660484Sobrien fi 47760484Sobrienelse 47860484Sobrien ac_srcdir_defaulted=no 47960484Sobrienfi 48060484Sobrienif test ! -r $srcdir/$ac_unique_file; then 48160484Sobrien if test "$ac_srcdir_defaulted" = yes; then 48260484Sobrien { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 48360484Sobrien else 48460484Sobrien { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 48560484Sobrien fi 48660484Sobrienfi 48760484Sobriensrcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 48860484Sobrien 48960484Sobrien# Prefer explicitly selected file to automatically selected ones. 49060484Sobrienif test -z "$CONFIG_SITE"; then 49160484Sobrien if test "x$prefix" != xNONE; then 49260484Sobrien CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 49360484Sobrien else 49460484Sobrien CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 49560484Sobrien fi 49660484Sobrienfi 49760484Sobrienfor ac_site_file in $CONFIG_SITE; do 49860484Sobrien if test -r "$ac_site_file"; then 49960484Sobrien echo "loading site script $ac_site_file" 50060484Sobrien . "$ac_site_file" 50160484Sobrien fi 50260484Sobriendone 50360484Sobrien 50460484Sobrienif test -r "$cache_file"; then 50560484Sobrien echo "loading cache $cache_file" 50660484Sobrien . $cache_file 50760484Sobrienelse 50860484Sobrien echo "creating cache $cache_file" 50960484Sobrien > $cache_file 51060484Sobrienfi 51160484Sobrien 51260484Sobrienac_ext=c 51360484Sobrien# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 51460484Sobrienac_cpp='$CPP $CPPFLAGS' 51560484Sobrienac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 51660484Sobrienac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 51760484Sobriencross_compiling=$ac_cv_prog_cc_cross 51860484Sobrien 51960484Sobrienac_exeext= 52060484Sobrienac_objext=o 52160484Sobrienif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 52260484Sobrien # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 52360484Sobrien if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 52460484Sobrien ac_n= ac_c=' 52560484Sobrien' ac_t=' ' 52660484Sobrien else 52760484Sobrien ac_n=-n ac_c= ac_t= 52860484Sobrien fi 52960484Sobrienelse 53060484Sobrien ac_n= ac_c='\c' ac_t= 53160484Sobrienfi 53260484Sobrien 53360484Sobrien 53460484Sobrien 53560484Sobrien# Check whether --with-target-subdir or --without-target-subdir was given. 53660484Sobrienif test "${with_target_subdir+set}" = set; then 53760484Sobrien withval="$with_target_subdir" 53860484Sobrien : 53960484Sobrienfi 54060484Sobrien 54160484Sobrien# Check whether --with-cross-host or --without-cross-host was given. 54260484Sobrienif test "${with_cross_host+set}" = set; then 54360484Sobrien withval="$with_cross_host" 54460484Sobrien : 54560484Sobrienfi 54660484Sobrien 54760484Sobrien# Check whether --with-newlib or --without-newlib was given. 54860484Sobrienif test "${with_newlib+set}" = set; then 54960484Sobrien withval="$with_newlib" 55060484Sobrien : 55160484Sobrienfi 55260484Sobrien 55360484Sobrien 55460484Sobrienif test "${srcdir}" = "."; then 55560484Sobrien if test -z "${with_target_subdir}"; then 55660484Sobrien libiberty_topdir="${srcdir}/.." 55760484Sobrien else 55860484Sobrien if test "${with_target_subdir}" != "."; then 55960484Sobrien libiberty_topdir="${srcdir}/${with_multisrctop}../.." 56060484Sobrien else 56160484Sobrien libiberty_topdir="${srcdir}/${with_multisrctop}.." 56260484Sobrien fi 56360484Sobrien fi 56460484Sobrienelse 56560484Sobrien libiberty_topdir="${srcdir}/.." 56660484Sobrienfi 56760484Sobrienac_aux_dir= 56860484Sobrienfor ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do 56960484Sobrien if test -f $ac_dir/install-sh; then 57060484Sobrien ac_aux_dir=$ac_dir 57160484Sobrien ac_install_sh="$ac_aux_dir/install-sh -c" 57260484Sobrien break 57360484Sobrien elif test -f $ac_dir/install.sh; then 57460484Sobrien ac_aux_dir=$ac_dir 57560484Sobrien ac_install_sh="$ac_aux_dir/install.sh -c" 57660484Sobrien break 57760484Sobrien fi 57860484Sobriendone 57960484Sobrienif test -z "$ac_aux_dir"; then 58060484Sobrien { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; } 58160484Sobrienfi 58260484Sobrienac_config_guess=$ac_aux_dir/config.guess 58360484Sobrienac_config_sub=$ac_aux_dir/config.sub 58460484Sobrienac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 58560484Sobrien 58660484Sobrien 58760484Sobrien 58889857Sobrienecho $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 58989857Sobrienecho "configure:590: checking whether to enable maintainer-specific portions of Makefiles" >&5 59089857Sobrien # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. 59189857Sobrienif test "${enable_maintainer_mode+set}" = set; then 59289857Sobrien enableval="$enable_maintainer_mode" 59389857Sobrien maintainer_mode=$enableval 59489857Sobrienelse 59589857Sobrien maintainer_mode=no 59689857Sobrienfi 59789857Sobrien 59889857Sobrien 59989857Sobrienecho "$ac_t""$maintainer_mode" 1>&6 60089857Sobrien 60189857Sobrienif test "$maintainer_mode" = "yes"; then 60289857Sobrien MAINT='' 60389857Sobrien NOTMAINT='#' 60489857Sobrienelse 60589857Sobrien MAINT='#' 60689857Sobrien NOTMAINT='' 60789857Sobrienfi 60889857Sobrien 60989857Sobrien# Do we have a single-tree copy of texinfo? Even if we do, we can't 61089857Sobrien# rely on it - libiberty is built before texinfo. 61189857Sobrien# Extract the first word of "makeinfo", so it can be a program name with args. 61289857Sobrienset dummy makeinfo; ac_word=$2 61389857Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 61489857Sobrienecho "configure:615: checking for $ac_word" >&5 61589857Sobrienif eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then 61689857Sobrien echo $ac_n "(cached) $ac_c" 1>&6 61789857Sobrienelse 61889857Sobrien if test -n "$MAKEINFO"; then 61989857Sobrien ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. 62089857Sobrienelse 62189857Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 62289857Sobrien ac_dummy="$PATH" 62389857Sobrien for ac_dir in $ac_dummy; do 62489857Sobrien test -z "$ac_dir" && ac_dir=. 62589857Sobrien if test -f $ac_dir/$ac_word; then 62689857Sobrien ac_cv_prog_MAKEINFO="makeinfo" 62789857Sobrien break 62889857Sobrien fi 62989857Sobrien done 63089857Sobrien IFS="$ac_save_ifs" 63189857Sobrienfi 63289857Sobrienfi 63389857SobrienMAKEINFO="$ac_cv_prog_MAKEINFO" 63489857Sobrienif test -n "$MAKEINFO"; then 63589857Sobrien echo "$ac_t""$MAKEINFO" 1>&6 63689857Sobrienelse 63789857Sobrien echo "$ac_t""no" 1>&6 63889857Sobrienfi 63989857Sobrien 64089857Sobrienif test "x$MAKEINFO" = "x"; then 64189857Sobrien MAKEINFO="@echo makeinfo missing; true" 64289857Sobrien BUILD_INFO= 64389857Sobrienelse 64489857Sobrien BUILD_INFO=info 64589857Sobrien case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in 64689857Sobrien x*\ [1-3].* ) 64789857Sobrien MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" 64889857Sobrien BUILD_INFO= 64989857Sobrien echo "configure: warning: 65089857Sobrien*** Makeinfo is too old. Info documentation will not be built." 1>&2 65189857Sobrien ;; 65289857Sobrien esac 65389857Sobrienfi 65489857Sobrien 65589857Sobrien 65689857Sobrien 65789857Sobrien# Extract the first word of "perl", so it can be a program name with args. 65889857Sobrienset dummy perl; ac_word=$2 65989857Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 66089857Sobrienecho "configure:661: checking for $ac_word" >&5 66189857Sobrienif eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then 66289857Sobrien echo $ac_n "(cached) $ac_c" 1>&6 66389857Sobrienelse 66489857Sobrien if test -n "$PERL"; then 66589857Sobrien ac_cv_prog_PERL="$PERL" # Let the user override the test. 66689857Sobrienelse 66789857Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 66889857Sobrien ac_dummy="$PATH" 66989857Sobrien for ac_dir in $ac_dummy; do 67089857Sobrien test -z "$ac_dir" && ac_dir=. 67189857Sobrien if test -f $ac_dir/$ac_word; then 67289857Sobrien ac_cv_prog_PERL="perl" 67389857Sobrien break 67489857Sobrien fi 67589857Sobrien done 67689857Sobrien IFS="$ac_save_ifs" 67789857Sobrienfi 67889857Sobrienfi 67989857SobrienPERL="$ac_cv_prog_PERL" 68089857Sobrienif test -n "$PERL"; then 68189857Sobrien echo "$ac_t""$PERL" 1>&6 68289857Sobrienelse 68389857Sobrien echo "$ac_t""no" 1>&6 68489857Sobrienfi 68589857Sobrien 68689857Sobrienif test x"$PERL" = x""; then 68789857Sobrien HAVE_PERL='#' 68889857Sobrienelse 68989857Sobrien HAVE_PERL='' 69089857Sobrienfi 69189857Sobrien 69289857Sobrien 69389857Sobrien 69460484Sobrien# Make sure we can run config.sub. 69560484Sobrienif ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : 69660484Sobrienelse { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } 69760484Sobrienfi 69860484Sobrien 69960484Sobrienecho $ac_n "checking host system type""... $ac_c" 1>&6 70089857Sobrienecho "configure:701: checking host system type" >&5 70160484Sobrien 70260484Sobrienhost_alias=$host 70360484Sobriencase "$host_alias" in 70460484SobrienNONE) 70560484Sobrien case $nonopt in 70660484Sobrien NONE) 70760484Sobrien if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : 70860484Sobrien else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } 70960484Sobrien fi ;; 71060484Sobrien *) host_alias=$nonopt ;; 71160484Sobrien esac ;; 71260484Sobrienesac 71360484Sobrien 71460484Sobrienhost=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` 71560484Sobrienhost_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 71660484Sobrienhost_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 71760484Sobrienhost_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 71860484Sobrienecho "$ac_t""$host" 1>&6 71960484Sobrien 72060484Sobrien 72160484Sobrien 72260484Sobrienecho $ac_n "checking build system type""... $ac_c" 1>&6 72389857Sobrienecho "configure:724: checking build system type" >&5 72460484Sobrien 72560484Sobrienbuild_alias=$build 72660484Sobriencase "$build_alias" in 72760484SobrienNONE) 72860484Sobrien case $nonopt in 72960484Sobrien NONE) build_alias=$host_alias ;; 73060484Sobrien *) build_alias=$nonopt ;; 73160484Sobrien esac ;; 73260484Sobrienesac 73360484Sobrien 73460484Sobrienbuild=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` 73560484Sobrienbuild_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 73660484Sobrienbuild_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 73760484Sobrienbuild_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 73860484Sobrienecho "$ac_t""$build" 1>&6 73960484Sobrien 74060484Sobrienif test $host != $build; then 74160484Sobrien ac_tool_prefix=${host_alias}- 74260484Sobrienelse 74360484Sobrien ac_tool_prefix= 74460484Sobrienfi 74560484Sobrien 74660484Sobrien# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 74760484Sobrienset dummy ${ac_tool_prefix}ar; ac_word=$2 74860484Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 74989857Sobrienecho "configure:750: checking for $ac_word" >&5 75060484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then 75160484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 75260484Sobrienelse 75360484Sobrien if test -n "$AR"; then 75460484Sobrien ac_cv_prog_AR="$AR" # Let the user override the test. 75560484Sobrienelse 75660484Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 75760484Sobrien ac_dummy="$PATH" 75860484Sobrien for ac_dir in $ac_dummy; do 75960484Sobrien test -z "$ac_dir" && ac_dir=. 76060484Sobrien if test -f $ac_dir/$ac_word; then 76160484Sobrien ac_cv_prog_AR="${ac_tool_prefix}ar" 76260484Sobrien break 76360484Sobrien fi 76460484Sobrien done 76560484Sobrien IFS="$ac_save_ifs" 76660484Sobrien test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" 76760484Sobrienfi 76860484Sobrienfi 76960484SobrienAR="$ac_cv_prog_AR" 77060484Sobrienif test -n "$AR"; then 77160484Sobrien echo "$ac_t""$AR" 1>&6 77260484Sobrienelse 77360484Sobrien echo "$ac_t""no" 1>&6 77460484Sobrienfi 77560484Sobrien 77660484Sobrien 77760484Sobrien 77860484Sobrien# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 77960484Sobrienset dummy ${ac_tool_prefix}ranlib; ac_word=$2 78060484Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 78189857Sobrienecho "configure:782: checking for $ac_word" >&5 78260484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 78360484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 78460484Sobrienelse 78560484Sobrien if test -n "$RANLIB"; then 78660484Sobrien ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 78760484Sobrienelse 78860484Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 78960484Sobrien ac_dummy="$PATH" 79060484Sobrien for ac_dir in $ac_dummy; do 79160484Sobrien test -z "$ac_dir" && ac_dir=. 79260484Sobrien if test -f $ac_dir/$ac_word; then 79360484Sobrien ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 79460484Sobrien break 79560484Sobrien fi 79660484Sobrien done 79760484Sobrien IFS="$ac_save_ifs" 79860484Sobrienfi 79960484Sobrienfi 80060484SobrienRANLIB="$ac_cv_prog_RANLIB" 80160484Sobrienif test -n "$RANLIB"; then 80260484Sobrien echo "$ac_t""$RANLIB" 1>&6 80360484Sobrienelse 80460484Sobrien echo "$ac_t""no" 1>&6 80560484Sobrienfi 80660484Sobrien 80760484Sobrien 80860484Sobrienif test -z "$ac_cv_prog_RANLIB"; then 80960484Sobrienif test -n "$ac_tool_prefix"; then 81060484Sobrien # Extract the first word of "ranlib", so it can be a program name with args. 81160484Sobrienset dummy ranlib; ac_word=$2 81260484Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 81389857Sobrienecho "configure:814: checking for $ac_word" >&5 81460484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 81560484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 81660484Sobrienelse 81760484Sobrien if test -n "$RANLIB"; then 81860484Sobrien ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 81960484Sobrienelse 82060484Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 82160484Sobrien ac_dummy="$PATH" 82260484Sobrien for ac_dir in $ac_dummy; do 82360484Sobrien test -z "$ac_dir" && ac_dir=. 82460484Sobrien if test -f $ac_dir/$ac_word; then 82560484Sobrien ac_cv_prog_RANLIB="ranlib" 82660484Sobrien break 82760484Sobrien fi 82860484Sobrien done 82960484Sobrien IFS="$ac_save_ifs" 83060484Sobrien test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" 83160484Sobrienfi 83260484Sobrienfi 83360484SobrienRANLIB="$ac_cv_prog_RANLIB" 83460484Sobrienif test -n "$RANLIB"; then 83560484Sobrien echo "$ac_t""$RANLIB" 1>&6 83660484Sobrienelse 83760484Sobrien echo "$ac_t""no" 1>&6 83860484Sobrienfi 83960484Sobrien 84060484Sobrienelse 84160484Sobrien RANLIB=":" 84260484Sobrienfi 84360484Sobrienfi 84460484Sobrien 84560484Sobrien 84660484Sobrien 84760484Sobrien# Extract the first word of "gcc", so it can be a program name with args. 84860484Sobrienset dummy gcc; ac_word=$2 84960484Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 85089857Sobrienecho "configure:851: checking for $ac_word" >&5 85160484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 85260484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 85360484Sobrienelse 85460484Sobrien if test -n "$CC"; then 85560484Sobrien ac_cv_prog_CC="$CC" # Let the user override the test. 85660484Sobrienelse 85760484Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 85860484Sobrien ac_dummy="$PATH" 85960484Sobrien for ac_dir in $ac_dummy; do 86060484Sobrien test -z "$ac_dir" && ac_dir=. 86160484Sobrien if test -f $ac_dir/$ac_word; then 86260484Sobrien ac_cv_prog_CC="gcc" 86360484Sobrien break 86460484Sobrien fi 86560484Sobrien done 86660484Sobrien IFS="$ac_save_ifs" 86760484Sobrienfi 86860484Sobrienfi 86960484SobrienCC="$ac_cv_prog_CC" 87060484Sobrienif test -n "$CC"; then 87160484Sobrien echo "$ac_t""$CC" 1>&6 87260484Sobrienelse 87360484Sobrien echo "$ac_t""no" 1>&6 87460484Sobrienfi 87560484Sobrien 87660484Sobrienif test -z "$CC"; then 87760484Sobrien # Extract the first word of "cc", so it can be a program name with args. 87860484Sobrienset dummy cc; ac_word=$2 87960484Sobrienecho $ac_n "checking for $ac_word""... $ac_c" 1>&6 88089857Sobrienecho "configure:881: checking for $ac_word" >&5 88160484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 88260484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 88360484Sobrienelse 88460484Sobrien if test -n "$CC"; then 88560484Sobrien ac_cv_prog_CC="$CC" # Let the user override the test. 88660484Sobrienelse 88760484Sobrien IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 88860484Sobrien ac_prog_rejected=no 88960484Sobrien ac_dummy="$PATH" 89060484Sobrien for ac_dir in $ac_dummy; do 89160484Sobrien test -z "$ac_dir" && ac_dir=. 89260484Sobrien if test -f $ac_dir/$ac_word; then 89360484Sobrien if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 89460484Sobrien ac_prog_rejected=yes 89560484Sobrien continue 89660484Sobrien fi 89760484Sobrien ac_cv_prog_CC="cc" 89860484Sobrien break 89960484Sobrien fi 90060484Sobrien done 90160484Sobrien IFS="$ac_save_ifs" 90260484Sobrienif test $ac_prog_rejected = yes; then 90360484Sobrien # We found a bogon in the path, so make sure we never use it. 90460484Sobrien set dummy $ac_cv_prog_CC 90560484Sobrien shift 90660484Sobrien if test $# -gt 0; then 90760484Sobrien # We chose a different compiler from the bogus one. 90860484Sobrien # However, it has the same basename, so the bogon will be chosen 90960484Sobrien # first if we set CC to just the basename; use the full file name. 91060484Sobrien shift 91160484Sobrien set dummy "$ac_dir/$ac_word" "$@" 91260484Sobrien shift 91360484Sobrien ac_cv_prog_CC="$@" 91460484Sobrien fi 91560484Sobrienfi 91660484Sobrienfi 91760484Sobrienfi 91860484SobrienCC="$ac_cv_prog_CC" 91960484Sobrienif test -n "$CC"; then 92060484Sobrien echo "$ac_t""$CC" 1>&6 92160484Sobrienelse 92260484Sobrien echo "$ac_t""no" 1>&6 92360484Sobrienfi 92460484Sobrien 92560484Sobrien test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 92660484Sobrienfi 92760484Sobrien 92860484Sobrienecho $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 92989857Sobrienecho "configure:930: checking whether we are using GNU C" >&5 93060484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 93160484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 93260484Sobrienelse 93360484Sobrien cat > conftest.c <<EOF 93460484Sobrien#ifdef __GNUC__ 93560484Sobrien yes; 93660484Sobrien#endif 93760484SobrienEOF 93889857Sobrienif { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 93960484Sobrien ac_cv_prog_gcc=yes 94060484Sobrienelse 94160484Sobrien ac_cv_prog_gcc=no 94260484Sobrienfi 94360484Sobrienfi 94460484Sobrien 94560484Sobrienecho "$ac_t""$ac_cv_prog_gcc" 1>&6 94660484Sobrien 94760484Sobrienif test $ac_cv_prog_gcc = yes; then 94860484Sobrien GCC=yes 94977298Sobrien ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic' 95060484Sobrien ac_test_CFLAGS="${CFLAGS+set}" 95160484Sobrien ac_save_CFLAGS="$CFLAGS" 95260484Sobrien CFLAGS= 95360484Sobrien echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 95489857Sobrienecho "configure:955: checking whether ${CC-cc} accepts -g" >&5 95560484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 95660484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 95760484Sobrienelse 95860484Sobrien echo 'void f(){}' > conftest.c 95960484Sobrienif test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 96060484Sobrien ac_cv_prog_cc_g=yes 96160484Sobrienelse 96260484Sobrien ac_cv_prog_cc_g=no 96360484Sobrienfi 96460484Sobrienrm -f conftest* 96560484Sobrien 96660484Sobrienfi 96760484Sobrien 96860484Sobrienecho "$ac_t""$ac_cv_prog_cc_g" 1>&6 96960484Sobrien if test "$ac_test_CFLAGS" = set; then 97060484Sobrien CFLAGS="$ac_save_CFLAGS" 97160484Sobrien elif test $ac_cv_prog_cc_g = yes; then 97260484Sobrien CFLAGS="-g -O2" 97360484Sobrien else 97460484Sobrien CFLAGS="-O2" 97560484Sobrien fi 97660484Sobrienelse 97760484Sobrien GCC= 97860484Sobrien ac_libiberty_warn_cflags= 97960484Sobrien test "${CFLAGS+set}" = set || CFLAGS="-g" 98060484Sobrienfi 98160484Sobrien 98260484Sobrien 98377298Sobrien 98460484Sobrienecho $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 98589857Sobrienecho "configure:986: checking for POSIXized ISC" >&5 98660484Sobrienif test -d /etc/conf/kconfig.d && 98760484Sobrien grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 98860484Sobrienthen 98960484Sobrien echo "$ac_t""yes" 1>&6 99060484Sobrien ISC=yes # If later tests want to check for ISC. 99160484Sobrien cat >> confdefs.h <<\EOF 99260484Sobrien#define _POSIX_SOURCE 1 99360484SobrienEOF 99460484Sobrien 99560484Sobrien if test "$GCC" = yes; then 99660484Sobrien CC="$CC -posix" 99760484Sobrien else 99860484Sobrien CC="$CC -Xp" 99960484Sobrien fi 100060484Sobrienelse 100160484Sobrien echo "$ac_t""no" 1>&6 100260484Sobrien ISC= 100360484Sobrienfi 100460484Sobrien 100577298Sobrienecho $ac_n "checking for working const""... $ac_c" 1>&6 100689857Sobrienecho "configure:1007: checking for working const" >&5 100777298Sobrienif eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then 100877298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 100977298Sobrienelse 101077298Sobrien cat > conftest.$ac_ext <<EOF 101189857Sobrien#line 1012 "configure" 101277298Sobrien#include "confdefs.h" 101360484Sobrien 101477298Sobrienint main() { 101560484Sobrien 101677298Sobrien/* Ultrix mips cc rejects this. */ 101777298Sobrientypedef int charset[2]; const charset x; 101877298Sobrien/* SunOS 4.1.1 cc rejects this. */ 101977298Sobrienchar const *const *ccp; 102077298Sobrienchar **p; 102177298Sobrien/* NEC SVR4.0.2 mips cc rejects this. */ 102277298Sobrienstruct point {int x, y;}; 102377298Sobrienstatic struct point const zero = {0,0}; 102477298Sobrien/* AIX XL C 1.02.0.0 rejects this. 102577298Sobrien It does not let you subtract one const X* pointer from another in an arm 102677298Sobrien of an if-expression whose if-part is not a constant expression */ 102777298Sobrienconst char *g = "string"; 102877298Sobrienccp = &g + (g ? g-g : 0); 102977298Sobrien/* HPUX 7.0 cc rejects these. */ 103077298Sobrien++ccp; 103177298Sobrienp = (char**) ccp; 103277298Sobrienccp = (char const *const *) p; 103377298Sobrien{ /* SCO 3.2v4 cc rejects this. */ 103477298Sobrien char *t; 103577298Sobrien char const *s = 0 ? (char *) 0 : (char const *) 0; 103660484Sobrien 103777298Sobrien *t++ = 0; 103877298Sobrien} 103977298Sobrien{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ 104077298Sobrien int x[] = {25, 17}; 104177298Sobrien const int *foo = &x[0]; 104277298Sobrien ++foo; 104377298Sobrien} 104477298Sobrien{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ 104577298Sobrien typedef const int *iptr; 104677298Sobrien iptr p = 0; 104777298Sobrien ++p; 104877298Sobrien} 104977298Sobrien{ /* AIX XL C 1.02.0.0 rejects this saying 105077298Sobrien "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ 105177298Sobrien struct s { int j; const int *ap[3]; }; 105277298Sobrien struct s *b; b->j = 5; 105377298Sobrien} 105477298Sobrien{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ 105577298Sobrien const int foo = 10; 105677298Sobrien} 105760484Sobrien 105877298Sobrien; return 0; } 105977298SobrienEOF 106089857Sobrienif { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 106177298Sobrien rm -rf conftest* 106277298Sobrien ac_cv_c_const=yes 106377298Sobrienelse 106477298Sobrien echo "configure: failed program was:" >&5 106577298Sobrien cat conftest.$ac_ext >&5 106677298Sobrien rm -rf conftest* 106777298Sobrien ac_cv_c_const=no 106877298Sobrienfi 106977298Sobrienrm -f conftest* 107077298Sobrienfi 107160484Sobrien 107277298Sobrienecho "$ac_t""$ac_cv_c_const" 1>&6 107377298Sobrienif test $ac_cv_c_const = no; then 107477298Sobrien cat >> confdefs.h <<\EOF 107577298Sobrien#define const 107677298SobrienEOF 107760484Sobrien 107877298Sobrienfi 107977298Sobrien 108077298Sobrienecho $ac_n "checking for inline""... $ac_c" 1>&6 108189857Sobrienecho "configure:1082: checking for inline" >&5 108277298Sobrienif eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then 108377298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 108477298Sobrienelse 108577298Sobrien ac_cv_c_inline=no 108677298Sobrienfor ac_kw in inline __inline__ __inline; do 108777298Sobrien cat > conftest.$ac_ext <<EOF 108889857Sobrien#line 1089 "configure" 108977298Sobrien#include "confdefs.h" 109077298Sobrien 109177298Sobrienint main() { 109277298Sobrien} $ac_kw foo() { 109377298Sobrien; return 0; } 109477298SobrienEOF 109589857Sobrienif { (eval echo configure:1096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 109677298Sobrien rm -rf conftest* 109777298Sobrien ac_cv_c_inline=$ac_kw; break 109877298Sobrienelse 109977298Sobrien echo "configure: failed program was:" >&5 110077298Sobrien cat conftest.$ac_ext >&5 110177298Sobrienfi 110277298Sobrienrm -f conftest* 110377298Sobriendone 110477298Sobrien 110577298Sobrienfi 110677298Sobrien 110777298Sobrienecho "$ac_t""$ac_cv_c_inline" 1>&6 110877298Sobriencase "$ac_cv_c_inline" in 110977298Sobrien inline | yes) ;; 111077298Sobrien no) cat >> confdefs.h <<\EOF 111177298Sobrien#define inline 111277298SobrienEOF 111377298Sobrien ;; 111477298Sobrien *) cat >> confdefs.h <<EOF 111577298Sobrien#define inline $ac_cv_c_inline 111677298SobrienEOF 111777298Sobrien ;; 111877298Sobrienesac 111977298Sobrien 112077298Sobrien 112177298Sobrien 112277298Sobrien 112377298Sobrien 112477298Sobrien 112577298Sobrien 112660484Sobrien# Find a good install program. We prefer a C program (faster), 112760484Sobrien# so one script is as good as another. But avoid the broken or 112860484Sobrien# incompatible versions: 112960484Sobrien# SysV /etc/install, /usr/sbin/install 113060484Sobrien# SunOS /usr/etc/install 113160484Sobrien# IRIX /sbin/install 113260484Sobrien# AIX /bin/install 113360484Sobrien# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 113460484Sobrien# AFS /usr/afsws/bin/install, which mishandles nonexistent args 113560484Sobrien# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 113660484Sobrien# ./install, which can be erroneously created by make from ./install.sh. 113760484Sobrienecho $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 113889857Sobrienecho "configure:1139: checking for a BSD compatible install" >&5 113960484Sobrienif test -z "$INSTALL"; then 114060484Sobrienif eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then 114160484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 114260484Sobrienelse 114360484Sobrien IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" 114460484Sobrien for ac_dir in $PATH; do 114560484Sobrien # Account for people who put trailing slashes in PATH elements. 114660484Sobrien case "$ac_dir/" in 114760484Sobrien /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; 114860484Sobrien *) 114960484Sobrien # OSF1 and SCO ODT 3.0 have their own names for install. 115060484Sobrien # Don't use installbsd from OSF since it installs stuff as root 115160484Sobrien # by default. 115260484Sobrien for ac_prog in ginstall scoinst install; do 115360484Sobrien if test -f $ac_dir/$ac_prog; then 115460484Sobrien if test $ac_prog = install && 115560484Sobrien grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then 115660484Sobrien # AIX install. It has an incompatible calling convention. 115760484Sobrien : 115860484Sobrien else 115960484Sobrien ac_cv_path_install="$ac_dir/$ac_prog -c" 116060484Sobrien break 2 116160484Sobrien fi 116260484Sobrien fi 116360484Sobrien done 116460484Sobrien ;; 116560484Sobrien esac 116660484Sobrien done 116760484Sobrien IFS="$ac_save_IFS" 116860484Sobrien 116960484Sobrienfi 117060484Sobrien if test "${ac_cv_path_install+set}" = set; then 117160484Sobrien INSTALL="$ac_cv_path_install" 117260484Sobrien else 117360484Sobrien # As a last resort, use the slow shell script. We don't cache a 117460484Sobrien # path for INSTALL within a source directory, because that will 117560484Sobrien # break other packages using the cache if that directory is 117660484Sobrien # removed, or if the path is relative. 117760484Sobrien INSTALL="$ac_install_sh" 117860484Sobrien fi 117960484Sobrienfi 118060484Sobrienecho "$ac_t""$INSTALL" 1>&6 118160484Sobrien 118260484Sobrien# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 118360484Sobrien# It thinks the first close brace ends the variable substitution. 118460484Sobrientest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 118560484Sobrien 118660484Sobrientest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' 118760484Sobrien 118860484Sobrientest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 118960484Sobrien 119060484Sobrien 119160484Sobrien. ${srcdir}/config.table 119260484Sobrienhost_makefile_frag=${frag} 119360484Sobrien 119460484Sobrien 119560484Sobrien# It's OK to check for header files. Although the compiler may not be 119660484Sobrien# able to link anything, it had better be able to at least compile 119760484Sobrien# something. 119860484Sobrienecho $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 119989857Sobrienecho "configure:1200: checking how to run the C preprocessor" >&5 120060484Sobrien# On Suns, sometimes $CPP names a directory. 120160484Sobrienif test -n "$CPP" && test -d "$CPP"; then 120260484Sobrien CPP= 120360484Sobrienfi 120460484Sobrienif test -z "$CPP"; then 120560484Sobrienif eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then 120660484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 120760484Sobrienelse 120860484Sobrien # This must be in double quotes, not single quotes, because CPP may get 120960484Sobrien # substituted into the Makefile and "${CC-cc}" will confuse make. 121060484Sobrien CPP="${CC-cc} -E" 121160484Sobrien # On the NeXT, cc -E runs the code through the compiler's parser, 121260484Sobrien # not just through cpp. 121360484Sobrien cat > conftest.$ac_ext <<EOF 121489857Sobrien#line 1215 "configure" 121560484Sobrien#include "confdefs.h" 121660484Sobrien#include <assert.h> 121760484SobrienSyntax Error 121860484SobrienEOF 121960484Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 122089857Sobrien{ (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 122160484Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 122260484Sobrienif test -z "$ac_err"; then 122360484Sobrien : 122460484Sobrienelse 122560484Sobrien echo "$ac_err" >&5 122660484Sobrien echo "configure: failed program was:" >&5 122760484Sobrien cat conftest.$ac_ext >&5 122860484Sobrien rm -rf conftest* 122960484Sobrien CPP="${CC-cc} -E -traditional-cpp" 123060484Sobrien cat > conftest.$ac_ext <<EOF 123189857Sobrien#line 1232 "configure" 123260484Sobrien#include "confdefs.h" 123360484Sobrien#include <assert.h> 123460484SobrienSyntax Error 123560484SobrienEOF 123660484Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 123789857Sobrien{ (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 123860484Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 123960484Sobrienif test -z "$ac_err"; then 124060484Sobrien : 124160484Sobrienelse 124260484Sobrien echo "$ac_err" >&5 124360484Sobrien echo "configure: failed program was:" >&5 124460484Sobrien cat conftest.$ac_ext >&5 124560484Sobrien rm -rf conftest* 124660484Sobrien CPP="${CC-cc} -nologo -E" 124760484Sobrien cat > conftest.$ac_ext <<EOF 124889857Sobrien#line 1249 "configure" 124960484Sobrien#include "confdefs.h" 125060484Sobrien#include <assert.h> 125160484SobrienSyntax Error 125260484SobrienEOF 125360484Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 125489857Sobrien{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 125560484Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 125660484Sobrienif test -z "$ac_err"; then 125760484Sobrien : 125860484Sobrienelse 125960484Sobrien echo "$ac_err" >&5 126060484Sobrien echo "configure: failed program was:" >&5 126160484Sobrien cat conftest.$ac_ext >&5 126260484Sobrien rm -rf conftest* 126360484Sobrien CPP=/lib/cpp 126460484Sobrienfi 126560484Sobrienrm -f conftest* 126660484Sobrienfi 126760484Sobrienrm -f conftest* 126860484Sobrienfi 126960484Sobrienrm -f conftest* 127060484Sobrien ac_cv_prog_CPP="$CPP" 127160484Sobrienfi 127260484Sobrien CPP="$ac_cv_prog_CPP" 127360484Sobrienelse 127460484Sobrien ac_cv_prog_CPP="$CPP" 127560484Sobrienfi 127660484Sobrienecho "$ac_t""$CPP" 1>&6 127760484Sobrien 127889857Sobrienfor ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h 127960484Sobriendo 128060484Sobrienac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 128160484Sobrienecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 128289857Sobrienecho "configure:1283: checking for $ac_hdr" >&5 128360484Sobrienif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 128460484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 128560484Sobrienelse 128660484Sobrien cat > conftest.$ac_ext <<EOF 128789857Sobrien#line 1288 "configure" 128860484Sobrien#include "confdefs.h" 128960484Sobrien#include <$ac_hdr> 129060484SobrienEOF 129160484Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 129289857Sobrien{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 129360484Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 129460484Sobrienif test -z "$ac_err"; then 129560484Sobrien rm -rf conftest* 129660484Sobrien eval "ac_cv_header_$ac_safe=yes" 129760484Sobrienelse 129860484Sobrien echo "$ac_err" >&5 129960484Sobrien echo "configure: failed program was:" >&5 130060484Sobrien cat conftest.$ac_ext >&5 130160484Sobrien rm -rf conftest* 130260484Sobrien eval "ac_cv_header_$ac_safe=no" 130360484Sobrienfi 130460484Sobrienrm -f conftest* 130560484Sobrienfi 130660484Sobrienif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 130760484Sobrien echo "$ac_t""yes" 1>&6 130860484Sobrien ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 130960484Sobrien cat >> confdefs.h <<EOF 131060484Sobrien#define $ac_tr_hdr 1 131160484SobrienEOF 131260484Sobrien 131360484Sobrienelse 131460484Sobrien echo "$ac_t""no" 1>&6 131560484Sobrienfi 131660484Sobriendone 131760484Sobrien 131860484Sobrienecho $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 131989857Sobrienecho "configure:1320: checking for sys/wait.h that is POSIX.1 compatible" >&5 132060484Sobrienif eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then 132160484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 132260484Sobrienelse 132360484Sobrien cat > conftest.$ac_ext <<EOF 132489857Sobrien#line 1325 "configure" 132560484Sobrien#include "confdefs.h" 132660484Sobrien#include <sys/types.h> 132760484Sobrien#include <sys/wait.h> 132860484Sobrien#ifndef WEXITSTATUS 132960484Sobrien#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) 133060484Sobrien#endif 133160484Sobrien#ifndef WIFEXITED 133260484Sobrien#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) 133360484Sobrien#endif 133460484Sobrienint main() { 133560484Sobrienint s; 133660484Sobrienwait (&s); 133760484Sobriens = WIFEXITED (s) ? WEXITSTATUS (s) : 1; 133860484Sobrien; return 0; } 133960484SobrienEOF 134089857Sobrienif { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 134160484Sobrien rm -rf conftest* 134260484Sobrien ac_cv_header_sys_wait_h=yes 134360484Sobrienelse 134460484Sobrien echo "configure: failed program was:" >&5 134560484Sobrien cat conftest.$ac_ext >&5 134660484Sobrien rm -rf conftest* 134760484Sobrien ac_cv_header_sys_wait_h=no 134860484Sobrienfi 134960484Sobrienrm -f conftest* 135060484Sobrienfi 135160484Sobrien 135260484Sobrienecho "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 135360484Sobrienif test $ac_cv_header_sys_wait_h = yes; then 135460484Sobrien cat >> confdefs.h <<\EOF 135560484Sobrien#define HAVE_SYS_WAIT_H 1 135660484SobrienEOF 135760484Sobrien 135860484Sobrienfi 135960484Sobrien 136077298Sobrienecho $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 136189857Sobrienecho "configure:1362: checking whether time.h and sys/time.h may both be included" >&5 136277298Sobrienif eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then 136377298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 136477298Sobrienelse 136577298Sobrien cat > conftest.$ac_ext <<EOF 136689857Sobrien#line 1367 "configure" 136777298Sobrien#include "confdefs.h" 136877298Sobrien#include <sys/types.h> 136977298Sobrien#include <sys/time.h> 137077298Sobrien#include <time.h> 137177298Sobrienint main() { 137277298Sobrienstruct tm *tp; 137377298Sobrien; return 0; } 137477298SobrienEOF 137589857Sobrienif { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 137677298Sobrien rm -rf conftest* 137777298Sobrien ac_cv_header_time=yes 137877298Sobrienelse 137977298Sobrien echo "configure: failed program was:" >&5 138077298Sobrien cat conftest.$ac_ext >&5 138177298Sobrien rm -rf conftest* 138277298Sobrien ac_cv_header_time=no 138377298Sobrienfi 138477298Sobrienrm -f conftest* 138577298Sobrienfi 138660484Sobrien 138777298Sobrienecho "$ac_t""$ac_cv_header_time" 1>&6 138877298Sobrienif test $ac_cv_header_time = yes; then 138977298Sobrien cat >> confdefs.h <<\EOF 139077298Sobrien#define TIME_WITH_SYS_TIME 1 139177298SobrienEOF 139277298Sobrien 139377298Sobrienfi 139477298Sobrien 139577298Sobrien 139677298Sobrienecho $ac_n "checking whether errno must be declared""... $ac_c" 1>&6 139789857Sobrienecho "configure:1398: checking whether errno must be declared" >&5 139877298Sobrienif eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then 139977298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 140077298Sobrienelse 140177298Sobrien cat > conftest.$ac_ext <<EOF 140289857Sobrien#line 1403 "configure" 140377298Sobrien#include "confdefs.h" 140477298Sobrien#include <errno.h> 140577298Sobrienint main() { 140677298Sobrienint x = errno; 140777298Sobrien; return 0; } 140877298SobrienEOF 140989857Sobrienif { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 141077298Sobrien rm -rf conftest* 141177298Sobrien libiberty_cv_declare_errno=no 141277298Sobrienelse 141377298Sobrien echo "configure: failed program was:" >&5 141477298Sobrien cat conftest.$ac_ext >&5 141577298Sobrien rm -rf conftest* 141677298Sobrien libiberty_cv_declare_errno=yes 141777298Sobrienfi 141877298Sobrienrm -f conftest* 141977298Sobrienfi 142077298Sobrien 142177298Sobrienecho "$ac_t""$libiberty_cv_declare_errno" 1>&6 142277298Sobrienif test $libiberty_cv_declare_errno = yes 142377298Sobrienthen cat >> confdefs.h <<\EOF 142477298Sobrien#define NEED_DECLARATION_ERRNO 1 142577298SobrienEOF 142677298Sobrien 142777298Sobrienfi 142877298Sobrien 142977298Sobrien 143089857Sobrienecho $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 143189857Sobrienecho "configure:1432: checking for ANSI C header files" >&5 143289857Sobrienif eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 143389857Sobrien echo $ac_n "(cached) $ac_c" 1>&6 143489857Sobrienelse 143589857Sobrien cat > conftest.$ac_ext <<EOF 143689857Sobrien#line 1437 "configure" 143789857Sobrien#include "confdefs.h" 143889857Sobrien#include <stdlib.h> 143989857Sobrien#include <stdarg.h> 144089857Sobrien#include <string.h> 144189857Sobrien#include <float.h> 144289857SobrienEOF 144389857Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 144489857Sobrien{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 144589857Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 144689857Sobrienif test -z "$ac_err"; then 144789857Sobrien rm -rf conftest* 144889857Sobrien ac_cv_header_stdc=yes 144989857Sobrienelse 145089857Sobrien echo "$ac_err" >&5 145189857Sobrien echo "configure: failed program was:" >&5 145289857Sobrien cat conftest.$ac_ext >&5 145389857Sobrien rm -rf conftest* 145489857Sobrien ac_cv_header_stdc=no 145589857Sobrienfi 145689857Sobrienrm -f conftest* 145789857Sobrien 145889857Sobrienif test $ac_cv_header_stdc = yes; then 145989857Sobrien # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 146089857Sobriencat > conftest.$ac_ext <<EOF 146189857Sobrien#line 1462 "configure" 146289857Sobrien#include "confdefs.h" 146389857Sobrien#include <string.h> 146489857SobrienEOF 146589857Sobrienif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 146689857Sobrien egrep "memchr" >/dev/null 2>&1; then 146789857Sobrien : 146889857Sobrienelse 146989857Sobrien rm -rf conftest* 147089857Sobrien ac_cv_header_stdc=no 147189857Sobrienfi 147289857Sobrienrm -f conftest* 147389857Sobrien 147489857Sobrienfi 147589857Sobrien 147689857Sobrienif test $ac_cv_header_stdc = yes; then 147789857Sobrien # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 147889857Sobriencat > conftest.$ac_ext <<EOF 147989857Sobrien#line 1480 "configure" 148089857Sobrien#include "confdefs.h" 148189857Sobrien#include <stdlib.h> 148289857SobrienEOF 148389857Sobrienif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 148489857Sobrien egrep "free" >/dev/null 2>&1; then 148589857Sobrien : 148689857Sobrienelse 148789857Sobrien rm -rf conftest* 148889857Sobrien ac_cv_header_stdc=no 148989857Sobrienfi 149089857Sobrienrm -f conftest* 149189857Sobrien 149289857Sobrienfi 149389857Sobrien 149489857Sobrienif test $ac_cv_header_stdc = yes; then 149589857Sobrien # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 149689857Sobrienif test "$cross_compiling" = yes; then 149789857Sobrien : 149889857Sobrienelse 149989857Sobrien cat > conftest.$ac_ext <<EOF 150089857Sobrien#line 1501 "configure" 150189857Sobrien#include "confdefs.h" 150289857Sobrien#include <ctype.h> 150389857Sobrien#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 150489857Sobrien#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 150589857Sobrien#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 150689857Sobrienint main () { int i; for (i = 0; i < 256; i++) 150789857Sobrienif (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); 150889857Sobrienexit (0); } 150989857Sobrien 151089857SobrienEOF 151189857Sobrienif { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 151289857Sobrienthen 151389857Sobrien : 151489857Sobrienelse 151589857Sobrien echo "configure: failed program was:" >&5 151689857Sobrien cat conftest.$ac_ext >&5 151789857Sobrien rm -fr conftest* 151889857Sobrien ac_cv_header_stdc=no 151989857Sobrienfi 152089857Sobrienrm -fr conftest* 152189857Sobrienfi 152289857Sobrien 152389857Sobrienfi 152489857Sobrienfi 152589857Sobrien 152689857Sobrienecho "$ac_t""$ac_cv_header_stdc" 1>&6 152789857Sobrienif test $ac_cv_header_stdc = yes; then 152889857Sobrien cat >> confdefs.h <<\EOF 152989857Sobrien#define STDC_HEADERS 1 153089857SobrienEOF 153189857Sobrien 153289857Sobrienfi 153389857Sobrien 153489857Sobrienecho $ac_n "checking for uintptr_t""... $ac_c" 1>&6 153589857Sobrienecho "configure:1536: checking for uintptr_t" >&5 153689857Sobrienif eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then 153789857Sobrien echo $ac_n "(cached) $ac_c" 1>&6 153889857Sobrienelse 153989857Sobrien cat > conftest.$ac_ext <<EOF 154089857Sobrien#line 1541 "configure" 154189857Sobrien#include "confdefs.h" 154289857Sobrien#include <sys/types.h> 154389857Sobrien#if STDC_HEADERS 154489857Sobrien#include <stdlib.h> 154589857Sobrien#include <stddef.h> 154689857Sobrien#endif 154789857SobrienEOF 154889857Sobrienif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 154989857Sobrien egrep "(^|[^a-zA-Z_0-9])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then 155089857Sobrien rm -rf conftest* 155189857Sobrien ac_cv_type_uintptr_t=yes 155289857Sobrienelse 155389857Sobrien rm -rf conftest* 155489857Sobrien ac_cv_type_uintptr_t=no 155589857Sobrienfi 155689857Sobrienrm -f conftest* 155789857Sobrien 155889857Sobrienfi 155989857Sobrienecho "$ac_t""$ac_cv_type_uintptr_t" 1>&6 156089857Sobrienif test $ac_cv_type_uintptr_t = no; then 156189857Sobrien cat >> confdefs.h <<\EOF 156289857Sobrien#define uintptr_t unsigned long 156389857SobrienEOF 156489857Sobrien 156589857Sobrienfi 156689857Sobrien 156789857Sobrien 156889857Sobrienif test $ac_cv_type_uintptr_t = yes 156989857Sobrienthen 157089857Sobrien cat >> confdefs.h <<\EOF 157189857Sobrien#define HAVE_UINTPTR_T 1 157289857SobrienEOF 157389857Sobrien 157489857Sobrienfi 157589857Sobrien 157660484Sobrien# This is the list of functions which libiberty will provide if they 157760484Sobrien# are not available on the host. 157860484Sobrien 157960484Sobrienfuncs="asprintf" 158060484Sobrienfuncs="$funcs atexit" 158160484Sobrienfuncs="$funcs basename" 158260484Sobrienfuncs="$funcs bcmp" 158360484Sobrienfuncs="$funcs bcopy" 158477298Sobrienfuncs="$funcs bsearch" 158560484Sobrienfuncs="$funcs bzero" 158660484Sobrienfuncs="$funcs calloc" 158760484Sobrienfuncs="$funcs clock" 158889857Sobrienfuncs="$funcs ffs" 158960484Sobrienfuncs="$funcs getcwd" 159060484Sobrienfuncs="$funcs getpagesize" 159160484Sobrienfuncs="$funcs index" 159260484Sobrienfuncs="$funcs insque" 159360484Sobrienfuncs="$funcs memchr" 159460484Sobrienfuncs="$funcs memcmp" 159560484Sobrienfuncs="$funcs memcpy" 159660484Sobrienfuncs="$funcs memmove" 159760484Sobrienfuncs="$funcs memset" 159860484Sobrienfuncs="$funcs mkstemps" 159960484Sobrienfuncs="$funcs putenv" 160060484Sobrienfuncs="$funcs random" 160160484Sobrienfuncs="$funcs rename" 160260484Sobrienfuncs="$funcs rindex" 160360484Sobrienfuncs="$funcs setenv" 160460484Sobrienfuncs="$funcs sigsetmask" 160560484Sobrienfuncs="$funcs strcasecmp" 160660484Sobrienfuncs="$funcs strchr" 160760484Sobrienfuncs="$funcs strdup" 160860484Sobrienfuncs="$funcs strncasecmp" 160960484Sobrienfuncs="$funcs strrchr" 161060484Sobrienfuncs="$funcs strstr" 161160484Sobrienfuncs="$funcs strtod" 161260484Sobrienfuncs="$funcs strtol" 161360484Sobrienfuncs="$funcs strtoul" 161460484Sobrienfuncs="$funcs tmpnam" 161560484Sobrienfuncs="$funcs vasprintf" 161660484Sobrienfuncs="$funcs vfprintf" 161760484Sobrienfuncs="$funcs vprintf" 161860484Sobrienfuncs="$funcs vsprintf" 161960484Sobrienfuncs="$funcs waitpid" 162060484Sobrien 162160484Sobrien# Also in the old function.def file: alloca, vfork, getopt. 162260484Sobrien 162360484Sobrienvars="sys_errlist sys_nerr sys_siglist" 162460484Sobrien 162560484Sobriencheckfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday" 162660484Sobrien 162760484Sobrien# These are neither executed nor required, but they help keep 162860484Sobrien# autoheader happy without adding a bunch of text to acconfig.h. 162960484Sobrienif test "x" = "y"; then 163077298Sobrien for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock 163160484Sobriendo 163260484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 163389857Sobrienecho "configure:1634: checking for $ac_func" >&5 163460484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 163560484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 163660484Sobrienelse 163760484Sobrien cat > conftest.$ac_ext <<EOF 163889857Sobrien#line 1639 "configure" 163960484Sobrien#include "confdefs.h" 164060484Sobrien/* System header to define __stub macros and hopefully few prototypes, 164160484Sobrien which can conflict with char $ac_func(); below. */ 164260484Sobrien#include <assert.h> 164360484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 164460484Sobrien/* We use char because int might match the return type of a gcc2 164560484Sobrien builtin and then its argument prototype would still apply. */ 164660484Sobrienchar $ac_func(); 164760484Sobrien 164860484Sobrienint main() { 164960484Sobrien 165060484Sobrien/* The GNU C library defines this for functions which it implements 165160484Sobrien to always fail with ENOSYS. Some functions are actually named 165260484Sobrien something starting with __ and the normal name is an alias. */ 165360484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 165460484Sobrienchoke me 165560484Sobrien#else 165660484Sobrien$ac_func(); 165760484Sobrien#endif 165860484Sobrien 165960484Sobrien; return 0; } 166060484SobrienEOF 166189857Sobrienif { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 166260484Sobrien rm -rf conftest* 166360484Sobrien eval "ac_cv_func_$ac_func=yes" 166460484Sobrienelse 166560484Sobrien echo "configure: failed program was:" >&5 166660484Sobrien cat conftest.$ac_ext >&5 166760484Sobrien rm -rf conftest* 166860484Sobrien eval "ac_cv_func_$ac_func=no" 166960484Sobrienfi 167060484Sobrienrm -f conftest* 167160484Sobrienfi 167260484Sobrien 167360484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 167460484Sobrien echo "$ac_t""yes" 1>&6 167560484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 167660484Sobrien cat >> confdefs.h <<EOF 167760484Sobrien#define $ac_tr_func 1 167860484SobrienEOF 167960484Sobrien 168060484Sobrienelse 168160484Sobrien echo "$ac_t""no" 1>&6 168260484Sobrienfi 168360484Sobriendone 168460484Sobrien 168577298Sobrien for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy 168660484Sobriendo 168760484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 168889857Sobrienecho "configure:1689: checking for $ac_func" >&5 168960484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 169060484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 169160484Sobrienelse 169260484Sobrien cat > conftest.$ac_ext <<EOF 169389857Sobrien#line 1694 "configure" 169460484Sobrien#include "confdefs.h" 169560484Sobrien/* System header to define __stub macros and hopefully few prototypes, 169660484Sobrien which can conflict with char $ac_func(); below. */ 169760484Sobrien#include <assert.h> 169860484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 169960484Sobrien/* We use char because int might match the return type of a gcc2 170060484Sobrien builtin and then its argument prototype would still apply. */ 170160484Sobrienchar $ac_func(); 170260484Sobrien 170360484Sobrienint main() { 170460484Sobrien 170560484Sobrien/* The GNU C library defines this for functions which it implements 170660484Sobrien to always fail with ENOSYS. Some functions are actually named 170760484Sobrien something starting with __ and the normal name is an alias. */ 170860484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 170960484Sobrienchoke me 171060484Sobrien#else 171160484Sobrien$ac_func(); 171260484Sobrien#endif 171360484Sobrien 171460484Sobrien; return 0; } 171560484SobrienEOF 171689857Sobrienif { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 171760484Sobrien rm -rf conftest* 171860484Sobrien eval "ac_cv_func_$ac_func=yes" 171960484Sobrienelse 172060484Sobrien echo "configure: failed program was:" >&5 172160484Sobrien cat conftest.$ac_ext >&5 172260484Sobrien rm -rf conftest* 172360484Sobrien eval "ac_cv_func_$ac_func=no" 172460484Sobrienfi 172560484Sobrienrm -f conftest* 172660484Sobrienfi 172760484Sobrien 172860484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 172960484Sobrien echo "$ac_t""yes" 1>&6 173060484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 173160484Sobrien cat >> confdefs.h <<EOF 173260484Sobrien#define $ac_tr_func 1 173360484SobrienEOF 173460484Sobrien 173560484Sobrienelse 173660484Sobrien echo "$ac_t""no" 1>&6 173760484Sobrienfi 173860484Sobriendone 173960484Sobrien 174077298Sobrien for ac_func in memmove memset putenv random rename rindex sigsetmask 174160484Sobriendo 174260484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 174389857Sobrienecho "configure:1744: checking for $ac_func" >&5 174460484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 174560484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 174660484Sobrienelse 174760484Sobrien cat > conftest.$ac_ext <<EOF 174889857Sobrien#line 1749 "configure" 174960484Sobrien#include "confdefs.h" 175060484Sobrien/* System header to define __stub macros and hopefully few prototypes, 175160484Sobrien which can conflict with char $ac_func(); below. */ 175260484Sobrien#include <assert.h> 175360484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 175460484Sobrien/* We use char because int might match the return type of a gcc2 175560484Sobrien builtin and then its argument prototype would still apply. */ 175660484Sobrienchar $ac_func(); 175760484Sobrien 175860484Sobrienint main() { 175960484Sobrien 176060484Sobrien/* The GNU C library defines this for functions which it implements 176160484Sobrien to always fail with ENOSYS. Some functions are actually named 176260484Sobrien something starting with __ and the normal name is an alias. */ 176360484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 176460484Sobrienchoke me 176560484Sobrien#else 176660484Sobrien$ac_func(); 176760484Sobrien#endif 176860484Sobrien 176960484Sobrien; return 0; } 177060484SobrienEOF 177189857Sobrienif { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 177260484Sobrien rm -rf conftest* 177360484Sobrien eval "ac_cv_func_$ac_func=yes" 177460484Sobrienelse 177560484Sobrien echo "configure: failed program was:" >&5 177660484Sobrien cat conftest.$ac_ext >&5 177760484Sobrien rm -rf conftest* 177860484Sobrien eval "ac_cv_func_$ac_func=no" 177960484Sobrienfi 178060484Sobrienrm -f conftest* 178160484Sobrienfi 178260484Sobrien 178360484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 178460484Sobrien echo "$ac_t""yes" 1>&6 178560484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 178660484Sobrien cat >> confdefs.h <<EOF 178760484Sobrien#define $ac_tr_func 1 178860484SobrienEOF 178960484Sobrien 179060484Sobrienelse 179160484Sobrien echo "$ac_t""no" 1>&6 179260484Sobrienfi 179360484Sobriendone 179460484Sobrien 179577298Sobrien for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr 179660484Sobriendo 179760484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 179889857Sobrienecho "configure:1799: checking for $ac_func" >&5 179960484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 180060484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 180160484Sobrienelse 180260484Sobrien cat > conftest.$ac_ext <<EOF 180389857Sobrien#line 1804 "configure" 180460484Sobrien#include "confdefs.h" 180560484Sobrien/* System header to define __stub macros and hopefully few prototypes, 180660484Sobrien which can conflict with char $ac_func(); below. */ 180760484Sobrien#include <assert.h> 180860484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 180960484Sobrien/* We use char because int might match the return type of a gcc2 181060484Sobrien builtin and then its argument prototype would still apply. */ 181160484Sobrienchar $ac_func(); 181260484Sobrien 181360484Sobrienint main() { 181460484Sobrien 181560484Sobrien/* The GNU C library defines this for functions which it implements 181660484Sobrien to always fail with ENOSYS. Some functions are actually named 181760484Sobrien something starting with __ and the normal name is an alias. */ 181860484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 181960484Sobrienchoke me 182060484Sobrien#else 182160484Sobrien$ac_func(); 182260484Sobrien#endif 182360484Sobrien 182460484Sobrien; return 0; } 182560484SobrienEOF 182689857Sobrienif { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 182760484Sobrien rm -rf conftest* 182860484Sobrien eval "ac_cv_func_$ac_func=yes" 182960484Sobrienelse 183060484Sobrien echo "configure: failed program was:" >&5 183160484Sobrien cat conftest.$ac_ext >&5 183260484Sobrien rm -rf conftest* 183360484Sobrien eval "ac_cv_func_$ac_func=no" 183460484Sobrienfi 183560484Sobrienrm -f conftest* 183660484Sobrienfi 183760484Sobrien 183860484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 183960484Sobrien echo "$ac_t""yes" 1>&6 184060484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 184160484Sobrien cat >> confdefs.h <<EOF 184260484Sobrien#define $ac_tr_func 1 184360484SobrienEOF 184460484Sobrien 184560484Sobrienelse 184660484Sobrien echo "$ac_t""no" 1>&6 184760484Sobrienfi 184860484Sobriendone 184960484Sobrien 185077298Sobrien for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf 185160484Sobriendo 185260484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 185389857Sobrienecho "configure:1854: checking for $ac_func" >&5 185460484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 185560484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 185660484Sobrienelse 185760484Sobrien cat > conftest.$ac_ext <<EOF 185889857Sobrien#line 1859 "configure" 185960484Sobrien#include "confdefs.h" 186060484Sobrien/* System header to define __stub macros and hopefully few prototypes, 186160484Sobrien which can conflict with char $ac_func(); below. */ 186260484Sobrien#include <assert.h> 186360484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 186460484Sobrien/* We use char because int might match the return type of a gcc2 186560484Sobrien builtin and then its argument prototype would still apply. */ 186660484Sobrienchar $ac_func(); 186760484Sobrien 186860484Sobrienint main() { 186960484Sobrien 187060484Sobrien/* The GNU C library defines this for functions which it implements 187160484Sobrien to always fail with ENOSYS. Some functions are actually named 187260484Sobrien something starting with __ and the normal name is an alias. */ 187360484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 187460484Sobrienchoke me 187560484Sobrien#else 187660484Sobrien$ac_func(); 187760484Sobrien#endif 187860484Sobrien 187960484Sobrien; return 0; } 188060484SobrienEOF 188189857Sobrienif { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 188260484Sobrien rm -rf conftest* 188360484Sobrien eval "ac_cv_func_$ac_func=yes" 188460484Sobrienelse 188560484Sobrien echo "configure: failed program was:" >&5 188660484Sobrien cat conftest.$ac_ext >&5 188760484Sobrien rm -rf conftest* 188860484Sobrien eval "ac_cv_func_$ac_func=no" 188960484Sobrienfi 189060484Sobrienrm -f conftest* 189160484Sobrienfi 189260484Sobrien 189360484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 189460484Sobrien echo "$ac_t""yes" 1>&6 189560484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 189660484Sobrien cat >> confdefs.h <<EOF 189760484Sobrien#define $ac_tr_func 1 189860484SobrienEOF 189960484Sobrien 190060484Sobrienelse 190160484Sobrien echo "$ac_t""no" 1>&6 190260484Sobrienfi 190360484Sobriendone 190460484Sobrien 190577298Sobrien for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal 190660484Sobriendo 190760484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 190889857Sobrienecho "configure:1909: checking for $ac_func" >&5 190960484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 191060484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 191160484Sobrienelse 191260484Sobrien cat > conftest.$ac_ext <<EOF 191389857Sobrien#line 1914 "configure" 191460484Sobrien#include "confdefs.h" 191560484Sobrien/* System header to define __stub macros and hopefully few prototypes, 191660484Sobrien which can conflict with char $ac_func(); below. */ 191760484Sobrien#include <assert.h> 191860484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 191960484Sobrien/* We use char because int might match the return type of a gcc2 192060484Sobrien builtin and then its argument prototype would still apply. */ 192160484Sobrienchar $ac_func(); 192260484Sobrien 192360484Sobrienint main() { 192460484Sobrien 192560484Sobrien/* The GNU C library defines this for functions which it implements 192660484Sobrien to always fail with ENOSYS. Some functions are actually named 192760484Sobrien something starting with __ and the normal name is an alias. */ 192860484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 192960484Sobrienchoke me 193060484Sobrien#else 193160484Sobrien$ac_func(); 193260484Sobrien#endif 193360484Sobrien 193460484Sobrien; return 0; } 193560484SobrienEOF 193689857Sobrienif { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 193760484Sobrien rm -rf conftest* 193860484Sobrien eval "ac_cv_func_$ac_func=yes" 193960484Sobrienelse 194060484Sobrien echo "configure: failed program was:" >&5 194160484Sobrien cat conftest.$ac_ext >&5 194260484Sobrien rm -rf conftest* 194360484Sobrien eval "ac_cv_func_$ac_func=no" 194460484Sobrienfi 194560484Sobrienrm -f conftest* 194660484Sobrienfi 194760484Sobrien 194860484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 194960484Sobrien echo "$ac_t""yes" 1>&6 195060484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 195160484Sobrien cat >> confdefs.h <<EOF 195260484Sobrien#define $ac_tr_func 1 195360484SobrienEOF 195460484Sobrien 195560484Sobrienelse 195660484Sobrien echo "$ac_t""no" 1>&6 195760484Sobrienfi 195860484Sobriendone 195960484Sobrien 196089857Sobrien for ac_func in sysconf times sbrk gettimeofday ffs 196160484Sobriendo 196260484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 196389857Sobrienecho "configure:1964: checking for $ac_func" >&5 196460484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 196560484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 196660484Sobrienelse 196760484Sobrien cat > conftest.$ac_ext <<EOF 196889857Sobrien#line 1969 "configure" 196960484Sobrien#include "confdefs.h" 197060484Sobrien/* System header to define __stub macros and hopefully few prototypes, 197160484Sobrien which can conflict with char $ac_func(); below. */ 197260484Sobrien#include <assert.h> 197360484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 197460484Sobrien/* We use char because int might match the return type of a gcc2 197560484Sobrien builtin and then its argument prototype would still apply. */ 197660484Sobrienchar $ac_func(); 197760484Sobrien 197860484Sobrienint main() { 197960484Sobrien 198060484Sobrien/* The GNU C library defines this for functions which it implements 198160484Sobrien to always fail with ENOSYS. Some functions are actually named 198260484Sobrien something starting with __ and the normal name is an alias. */ 198360484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 198460484Sobrienchoke me 198560484Sobrien#else 198660484Sobrien$ac_func(); 198760484Sobrien#endif 198860484Sobrien 198960484Sobrien; return 0; } 199060484SobrienEOF 199189857Sobrienif { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 199260484Sobrien rm -rf conftest* 199360484Sobrien eval "ac_cv_func_$ac_func=yes" 199460484Sobrienelse 199560484Sobrien echo "configure: failed program was:" >&5 199660484Sobrien cat conftest.$ac_ext >&5 199760484Sobrien rm -rf conftest* 199860484Sobrien eval "ac_cv_func_$ac_func=no" 199960484Sobrienfi 200060484Sobrienrm -f conftest* 200160484Sobrienfi 200260484Sobrien 200360484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 200460484Sobrien echo "$ac_t""yes" 1>&6 200560484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 200660484Sobrien cat >> confdefs.h <<EOF 200760484Sobrien#define $ac_tr_func 1 200860484SobrienEOF 200960484Sobrien 201060484Sobrienelse 201160484Sobrien echo "$ac_t""no" 1>&6 201260484Sobrienfi 201360484Sobriendone 201460484Sobrien 201577298Sobrien cat >> confdefs.h <<\EOF 201677298Sobrien#define HAVE_SYS_ERRLIST 1 201777298SobrienEOF 201877298Sobrien 201977298Sobrien cat >> confdefs.h <<\EOF 202077298Sobrien#define HAVE_SYS_NERR 1 202177298SobrienEOF 202277298Sobrien 202377298Sobrien cat >> confdefs.h <<\EOF 202477298Sobrien#define HAVE_SYS_SIGLIST 1 202577298SobrienEOF 202677298Sobrien 202760484Sobrienfi 202860484Sobrien 202960484Sobrien# For each of these functions, if the host does not provide the 203060484Sobrien# function we want to put FN.o in LIBOBJS, and if the host does 203189857Sobrien# provide the function, we want to define HAVE_FN in config.h. 203260484Sobrien 203360484Sobriensetobjs= 203460484SobrienCHECK= 203560484Sobrienif test -n "${with_target_subdir}"; then 203660484Sobrien 203760484Sobrien # We are being configured as a target library. AC_REPLACE_FUNCS 203860484Sobrien # may not work correctly, because the compiler may not be able to 203960484Sobrien # link executables. Note that we may still be being configured 204060484Sobrien # native. 204160484Sobrien 204260484Sobrien # If we are being configured for newlib, we know which functions 204360484Sobrien # newlib provide and which ones we will be expected to provide. 204460484Sobrien 204560484Sobrien if test "x${with_newlib}" = "xyes"; then 204660484Sobrien LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" 204760484Sobrien 204860484Sobrien for f in $funcs; do 204960484Sobrien case "$f" in 205060484Sobrien asprintf | basename | insque | random | strdup | vasprintf) 205160484Sobrien ;; 205260484Sobrien *) 205360484Sobrien n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 205460484Sobrien cat >> confdefs.h <<EOF 205560484Sobrien#define $n 1 205660484SobrienEOF 205760484Sobrien 205860484Sobrien ;; 205960484Sobrien esac 206060484Sobrien done 206160484Sobrien 206260484Sobrien # newlib doesnt provide any of the variables in $vars, so we 206360484Sobrien # dont have to check them here. 206460484Sobrien 206560484Sobrien # Of the functions in $checkfuncs, newlib only has strerror. 206660484Sobrien cat >> confdefs.h <<\EOF 206760484Sobrien#define HAVE_STRERROR 1 206860484SobrienEOF 206960484Sobrien 207060484Sobrien 207160484Sobrien setobjs=yes 207260484Sobrien 207360484Sobrien fi 207460484Sobrien 207560484Sobrienelse 207660484Sobrien 207760484Sobrien # Not a target library, so we set things up to run the test suite. 207860484Sobrien CHECK=check-cplus-dem 207960484Sobrien 208060484Sobrienfi 208160484Sobrien 208260484Sobrien 208360484Sobrien 208489857Sobriencase "${host}" in 208591041Sobrien *-*-cygwin* | *-*-mingw*) 208689857Sobrien cat >> confdefs.h <<\EOF 208789857Sobrien#define HAVE_SYS_ERRLIST 1 208889857SobrienEOF 208989857Sobrien 209089857Sobrien cat >> confdefs.h <<\EOF 209189857Sobrien#define HAVE_SYS_NERR 1 209289857SobrienEOF 209389857Sobrien 209489857Sobrien ;; 209589857Sobrienesac 209689857Sobrien 209760484Sobrienif test -z "${setobjs}"; then 209860484Sobrien case "${host}" in 209960484Sobrien 210060484Sobrien *-*-vxworks*) 210160484Sobrien # Handle VxWorks configuration specially, since on VxWorks the 210260484Sobrien # libraries are actually on the target board, not in the file 210360484Sobrien # system. 210460484Sobrien LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o" 210560484Sobrien LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o" 210660484Sobrien for f in $funcs; do 210760484Sobrien case "$f" in 210860484Sobrien basename | getpagesize | insque | random | strcasecmp) 210960484Sobrien ;; 211060484Sobrien strncasecmp | strdup | vfork | waitpid | vasprintf) 211160484Sobrien ;; 211260484Sobrien *) 211360484Sobrien n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 211460484Sobrien cat >> confdefs.h <<EOF 211560484Sobrien#define $n 1 211660484SobrienEOF 211760484Sobrien 211860484Sobrien ;; 211960484Sobrien esac 212060484Sobrien done 212160484Sobrien 212260484Sobrien # VxWorks doesn't provide any of the variables in $vars, so we 212360484Sobrien # don't have to check them here. 212460484Sobrien 212560484Sobrien # Of the functions in $checkfuncs, VxWorks only has strerror. 212660484Sobrien cat >> confdefs.h <<\EOF 212760484Sobrien#define HAVE_STRERROR 1 212860484SobrienEOF 212960484Sobrien 213060484Sobrien 213160484Sobrien setobjs=yes 213260484Sobrien ;; 213360484Sobrien 213460484Sobrien esac 213560484Sobrienfi 213660484Sobrien 213760484Sobrienif test -z "${setobjs}"; then 213860484Sobrien 213960484Sobrien case "${host}" in 214060484Sobrien 214160484Sobrien *-*-cygwin*) 214260484Sobrien # The Cygwin library actually uses a couple of files from 214360484Sobrien # libiberty when it is built. If we are building a native 214460484Sobrien # Cygwin, and we run the tests, we will appear to have these 214560484Sobrien # files. However, when we go on to build winsup, we will wind up 214660484Sobrien # with a library which does not have the files, since they should 214760484Sobrien # have come from libiberty. 214860484Sobrien 214960484Sobrien # We handle this by removing the functions the winsup library 215060484Sobrien # provides from our shell variables, so that they appear to be 215160484Sobrien # missing. 215260484Sobrien 215377298Sobrien # DJ - only if we're *building* cygwin, not just building *with* cygwin 215477298Sobrien 215577298Sobrien if test -n "${with_target_subdir}" 215677298Sobrien then 215777298Sobrien funcs="`echo $funcs | sed -e 's/random//'`" 215877298Sobrien LIBOBJS="$LIBOBJS random.o" 215977298Sobrien vars="`echo $vars | sed -e 's/sys_siglist//'`" 216077298Sobrien checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" 216177298Sobrien fi 216260484Sobrien ;; 216360484Sobrien 216460484Sobrien *-*-mingw32*) 216560484Sobrien # Under mingw32, sys_nerr and sys_errlist exist, but they are 216660484Sobrien # macros, so the test below won't find them. 216777298Sobrien libiberty_cv_var_sys_nerr=yes 216877298Sobrien libiberty_cv_var_sys_errlist=yes 216960484Sobrien ;; 217060484Sobrien 217160484Sobrien *-*-uwin*) 217260484Sobrien # Under some versions of uwin, vfork is notoriously buggy and the test 217360484Sobrien # can hang configure; on other versions, vfork exists just as a stub. 217460484Sobrien # FIXME: This should be removed once vfork in uwin's runtime is fixed. 217560484Sobrien ac_cv_func_vfork_works=no 217660484Sobrien # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are 217760484Sobrien # macros (actually, these are imported from a DLL, but the end effect 217860484Sobrien # is the same), so the test below won't find them. 217977298Sobrien libiberty_cv_var_sys_nerr=yes 218077298Sobrien libiberty_cv_var_sys_errlist=yes 218160484Sobrien ;; 218260484Sobrien 218389857Sobrien *-*-*vms*) 218489857Sobrien # Under VMS, vfork works very different than on Unix. The standard test 218589857Sobrien # won't work, and it isn't easily adaptable. It makes more sense to 218689857Sobrien # just force it. 218789857Sobrien ac_cv_func_vfork_works=yes 218889857Sobrien ;; 218989857Sobrien 219060484Sobrien esac 219160484Sobrien 219260484Sobrien # We haven't set the list of objects yet. Use the standard autoconf 219360484Sobrien # tests. This will only work if the compiler works. 219460484Sobrien echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 219589857Sobrienecho "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 219660484Sobrien 219760484Sobrienac_ext=c 219860484Sobrien# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 219960484Sobrienac_cpp='$CPP $CPPFLAGS' 220060484Sobrienac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 220160484Sobrienac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 220260484Sobriencross_compiling=$ac_cv_prog_cc_cross 220360484Sobrien 220460484Sobriencat > conftest.$ac_ext << EOF 220560484Sobrien 220689857Sobrien#line 2207 "configure" 220760484Sobrien#include "confdefs.h" 220860484Sobrien 220960484Sobrienmain(){return(0);} 221060484SobrienEOF 221189857Sobrienif { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 221260484Sobrien ac_cv_prog_cc_works=yes 221360484Sobrien # If we can't run a trivial program, we are probably using a cross compiler. 221460484Sobrien if (./conftest; exit) 2>/dev/null; then 221560484Sobrien ac_cv_prog_cc_cross=no 221660484Sobrien else 221760484Sobrien ac_cv_prog_cc_cross=yes 221860484Sobrien fi 221960484Sobrienelse 222060484Sobrien echo "configure: failed program was:" >&5 222160484Sobrien cat conftest.$ac_ext >&5 222260484Sobrien ac_cv_prog_cc_works=no 222360484Sobrienfi 222460484Sobrienrm -fr conftest* 222560484Sobrienac_ext=c 222660484Sobrien# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 222760484Sobrienac_cpp='$CPP $CPPFLAGS' 222860484Sobrienac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 222960484Sobrienac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 223060484Sobriencross_compiling=$ac_cv_prog_cc_cross 223160484Sobrien 223260484Sobrienecho "$ac_t""$ac_cv_prog_cc_works" 1>&6 223360484Sobrienif test $ac_cv_prog_cc_works = no; then 223460484Sobrien { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } 223560484Sobrienfi 223660484Sobrienecho $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 223789857Sobrienecho "configure:2238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 223860484Sobrienecho "$ac_t""$ac_cv_prog_cc_cross" 1>&6 223960484Sobriencross_compiling=$ac_cv_prog_cc_cross 224060484Sobrien 224160484Sobrien for ac_func in $funcs 224260484Sobriendo 224360484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 224489857Sobrienecho "configure:2245: checking for $ac_func" >&5 224560484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 224660484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 224760484Sobrienelse 224860484Sobrien cat > conftest.$ac_ext <<EOF 224989857Sobrien#line 2250 "configure" 225060484Sobrien#include "confdefs.h" 225160484Sobrien/* System header to define __stub macros and hopefully few prototypes, 225260484Sobrien which can conflict with char $ac_func(); below. */ 225360484Sobrien#include <assert.h> 225460484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 225560484Sobrien/* We use char because int might match the return type of a gcc2 225660484Sobrien builtin and then its argument prototype would still apply. */ 225760484Sobrienchar $ac_func(); 225860484Sobrien 225960484Sobrienint main() { 226060484Sobrien 226160484Sobrien/* The GNU C library defines this for functions which it implements 226260484Sobrien to always fail with ENOSYS. Some functions are actually named 226360484Sobrien something starting with __ and the normal name is an alias. */ 226460484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 226560484Sobrienchoke me 226660484Sobrien#else 226760484Sobrien$ac_func(); 226860484Sobrien#endif 226960484Sobrien 227060484Sobrien; return 0; } 227160484SobrienEOF 227289857Sobrienif { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 227360484Sobrien rm -rf conftest* 227460484Sobrien eval "ac_cv_func_$ac_func=yes" 227560484Sobrienelse 227660484Sobrien echo "configure: failed program was:" >&5 227760484Sobrien cat conftest.$ac_ext >&5 227860484Sobrien rm -rf conftest* 227960484Sobrien eval "ac_cv_func_$ac_func=no" 228060484Sobrienfi 228160484Sobrienrm -f conftest* 228260484Sobrienfi 228360484Sobrien 228460484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 228560484Sobrien echo "$ac_t""yes" 1>&6 228660484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 228760484Sobrien cat >> confdefs.h <<EOF 228860484Sobrien#define $ac_tr_func 1 228960484SobrienEOF 229060484Sobrien 229160484Sobrienelse 229260484Sobrien echo "$ac_t""no" 1>&6 229360484SobrienLIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" 229460484Sobrienfi 229560484Sobriendone 229660484Sobrien 229760484Sobrien 229889857Sobrien echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 229989857Sobrienecho "configure:2300: checking whether alloca needs Cray hooks" >&5 230060484Sobrienif eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then 230160484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 230260484Sobrienelse 230360484Sobrien cat > conftest.$ac_ext <<EOF 230489857Sobrien#line 2305 "configure" 230560484Sobrien#include "confdefs.h" 230660484Sobrien#if defined(CRAY) && ! defined(CRAY2) 230760484Sobrienwebecray 230860484Sobrien#else 230960484Sobrienwenotbecray 231060484Sobrien#endif 231160484Sobrien 231260484SobrienEOF 231360484Sobrienif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 231460484Sobrien egrep "webecray" >/dev/null 2>&1; then 231560484Sobrien rm -rf conftest* 231660484Sobrien ac_cv_os_cray=yes 231760484Sobrienelse 231860484Sobrien rm -rf conftest* 231960484Sobrien ac_cv_os_cray=no 232060484Sobrienfi 232160484Sobrienrm -f conftest* 232260484Sobrien 232360484Sobrienfi 232460484Sobrien 232560484Sobrienecho "$ac_t""$ac_cv_os_cray" 1>&6 232660484Sobrienif test $ac_cv_os_cray = yes; then 232789857Sobrien for ac_func in _getb67 GETB67 getb67; do 232889857Sobrien echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 232989857Sobrienecho "configure:2330: checking for $ac_func" >&5 233060484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 233160484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 233260484Sobrienelse 233360484Sobrien cat > conftest.$ac_ext <<EOF 233489857Sobrien#line 2335 "configure" 233560484Sobrien#include "confdefs.h" 233660484Sobrien/* System header to define __stub macros and hopefully few prototypes, 233760484Sobrien which can conflict with char $ac_func(); below. */ 233860484Sobrien#include <assert.h> 233960484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 234060484Sobrien/* We use char because int might match the return type of a gcc2 234160484Sobrien builtin and then its argument prototype would still apply. */ 234260484Sobrienchar $ac_func(); 234360484Sobrien 234460484Sobrienint main() { 234560484Sobrien 234660484Sobrien/* The GNU C library defines this for functions which it implements 234760484Sobrien to always fail with ENOSYS. Some functions are actually named 234860484Sobrien something starting with __ and the normal name is an alias. */ 234960484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 235060484Sobrienchoke me 235160484Sobrien#else 235260484Sobrien$ac_func(); 235360484Sobrien#endif 235460484Sobrien 235560484Sobrien; return 0; } 235660484SobrienEOF 235789857Sobrienif { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 235860484Sobrien rm -rf conftest* 235960484Sobrien eval "ac_cv_func_$ac_func=yes" 236060484Sobrienelse 236160484Sobrien echo "configure: failed program was:" >&5 236260484Sobrien cat conftest.$ac_ext >&5 236360484Sobrien rm -rf conftest* 236460484Sobrien eval "ac_cv_func_$ac_func=no" 236560484Sobrienfi 236660484Sobrienrm -f conftest* 236760484Sobrienfi 236860484Sobrien 236960484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 237060484Sobrien echo "$ac_t""yes" 1>&6 237160484Sobrien cat >> confdefs.h <<EOF 237260484Sobrien#define CRAY_STACKSEG_END $ac_func 237360484SobrienEOF 237460484Sobrien break 237560484Sobrienelse 237660484Sobrien echo "$ac_t""no" 1>&6 237760484Sobrienfi 237860484Sobrien 237989857Sobrien done 238060484Sobrienfi 238160484Sobrien 238260484Sobrienecho $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 238389857Sobrienecho "configure:2384: checking stack direction for C alloca" >&5 238460484Sobrienif eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then 238560484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 238660484Sobrienelse 238760484Sobrien if test "$cross_compiling" = yes; then 238860484Sobrien ac_cv_c_stack_direction=0 238960484Sobrienelse 239060484Sobrien cat > conftest.$ac_ext <<EOF 239189857Sobrien#line 2392 "configure" 239260484Sobrien#include "confdefs.h" 239360484Sobrienfind_stack_direction () 239460484Sobrien{ 239560484Sobrien static char *addr = 0; 239660484Sobrien auto char dummy; 239760484Sobrien if (addr == 0) 239860484Sobrien { 239960484Sobrien addr = &dummy; 240060484Sobrien return find_stack_direction (); 240160484Sobrien } 240260484Sobrien else 240360484Sobrien return (&dummy > addr) ? 1 : -1; 240460484Sobrien} 240560484Sobrienmain () 240660484Sobrien{ 240760484Sobrien exit (find_stack_direction() < 0); 240860484Sobrien} 240960484SobrienEOF 241089857Sobrienif { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 241160484Sobrienthen 241260484Sobrien ac_cv_c_stack_direction=1 241360484Sobrienelse 241460484Sobrien echo "configure: failed program was:" >&5 241560484Sobrien cat conftest.$ac_ext >&5 241660484Sobrien rm -fr conftest* 241760484Sobrien ac_cv_c_stack_direction=-1 241860484Sobrienfi 241960484Sobrienrm -fr conftest* 242060484Sobrienfi 242160484Sobrien 242260484Sobrienfi 242360484Sobrien 242460484Sobrienecho "$ac_t""$ac_cv_c_stack_direction" 1>&6 242560484Sobriencat >> confdefs.h <<EOF 242660484Sobrien#define STACK_DIRECTION $ac_cv_c_stack_direction 242760484SobrienEOF 242860484Sobrien 242960484Sobrien 243089857Sobrien echo $ac_n "checking for pid_t""... $ac_c" 1>&6 243189857Sobrienecho "configure:2432: checking for pid_t" >&5 243260484Sobrienif eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then 243360484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 243460484Sobrienelse 243560484Sobrien cat > conftest.$ac_ext <<EOF 243689857Sobrien#line 2437 "configure" 243760484Sobrien#include "confdefs.h" 243860484Sobrien#include <sys/types.h> 243960484Sobrien#if STDC_HEADERS 244060484Sobrien#include <stdlib.h> 244160484Sobrien#include <stddef.h> 244260484Sobrien#endif 244360484SobrienEOF 244460484Sobrienif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 244560484Sobrien egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then 244660484Sobrien rm -rf conftest* 244760484Sobrien ac_cv_type_pid_t=yes 244860484Sobrienelse 244960484Sobrien rm -rf conftest* 245060484Sobrien ac_cv_type_pid_t=no 245160484Sobrienfi 245260484Sobrienrm -f conftest* 245360484Sobrien 245460484Sobrienfi 245560484Sobrienecho "$ac_t""$ac_cv_type_pid_t" 1>&6 245660484Sobrienif test $ac_cv_type_pid_t = no; then 245760484Sobrien cat >> confdefs.h <<\EOF 245860484Sobrien#define pid_t int 245960484SobrienEOF 246060484Sobrien 246160484Sobrienfi 246260484Sobrien 246360484Sobrienac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` 246460484Sobrienecho $ac_n "checking for vfork.h""... $ac_c" 1>&6 246589857Sobrienecho "configure:2466: checking for vfork.h" >&5 246660484Sobrienif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 246760484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 246860484Sobrienelse 246960484Sobrien cat > conftest.$ac_ext <<EOF 247089857Sobrien#line 2471 "configure" 247160484Sobrien#include "confdefs.h" 247260484Sobrien#include <vfork.h> 247360484SobrienEOF 247460484Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 247589857Sobrien{ (eval echo configure:2476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 247660484Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 247760484Sobrienif test -z "$ac_err"; then 247860484Sobrien rm -rf conftest* 247960484Sobrien eval "ac_cv_header_$ac_safe=yes" 248060484Sobrienelse 248160484Sobrien echo "$ac_err" >&5 248260484Sobrien echo "configure: failed program was:" >&5 248360484Sobrien cat conftest.$ac_ext >&5 248460484Sobrien rm -rf conftest* 248560484Sobrien eval "ac_cv_header_$ac_safe=no" 248660484Sobrienfi 248760484Sobrienrm -f conftest* 248860484Sobrienfi 248960484Sobrienif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 249060484Sobrien echo "$ac_t""yes" 1>&6 249160484Sobrien cat >> confdefs.h <<\EOF 249260484Sobrien#define HAVE_VFORK_H 1 249360484SobrienEOF 249460484Sobrien 249560484Sobrienelse 249660484Sobrien echo "$ac_t""no" 1>&6 249760484Sobrienfi 249860484Sobrien 249960484Sobrienecho $ac_n "checking for working vfork""... $ac_c" 1>&6 250089857Sobrienecho "configure:2501: checking for working vfork" >&5 250160484Sobrienif eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then 250260484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 250360484Sobrienelse 250460484Sobrien if test "$cross_compiling" = yes; then 250560484Sobrien echo $ac_n "checking for vfork""... $ac_c" 1>&6 250689857Sobrienecho "configure:2507: checking for vfork" >&5 250760484Sobrienif eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then 250860484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 250960484Sobrienelse 251060484Sobrien cat > conftest.$ac_ext <<EOF 251189857Sobrien#line 2512 "configure" 251260484Sobrien#include "confdefs.h" 251360484Sobrien/* System header to define __stub macros and hopefully few prototypes, 251460484Sobrien which can conflict with char vfork(); below. */ 251560484Sobrien#include <assert.h> 251660484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 251760484Sobrien/* We use char because int might match the return type of a gcc2 251860484Sobrien builtin and then its argument prototype would still apply. */ 251960484Sobrienchar vfork(); 252060484Sobrien 252160484Sobrienint main() { 252260484Sobrien 252360484Sobrien/* The GNU C library defines this for functions which it implements 252460484Sobrien to always fail with ENOSYS. Some functions are actually named 252560484Sobrien something starting with __ and the normal name is an alias. */ 252660484Sobrien#if defined (__stub_vfork) || defined (__stub___vfork) 252760484Sobrienchoke me 252860484Sobrien#else 252960484Sobrienvfork(); 253060484Sobrien#endif 253160484Sobrien 253260484Sobrien; return 0; } 253360484SobrienEOF 253489857Sobrienif { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 253560484Sobrien rm -rf conftest* 253660484Sobrien eval "ac_cv_func_vfork=yes" 253760484Sobrienelse 253860484Sobrien echo "configure: failed program was:" >&5 253960484Sobrien cat conftest.$ac_ext >&5 254060484Sobrien rm -rf conftest* 254160484Sobrien eval "ac_cv_func_vfork=no" 254260484Sobrienfi 254360484Sobrienrm -f conftest* 254460484Sobrienfi 254560484Sobrien 254660484Sobrienif eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then 254760484Sobrien echo "$ac_t""yes" 1>&6 254860484Sobrien : 254960484Sobrienelse 255060484Sobrien echo "$ac_t""no" 1>&6 255160484Sobrienfi 255260484Sobrien 255360484Sobrienac_cv_func_vfork_works=$ac_cv_func_vfork 255460484Sobrienelse 255560484Sobrien cat > conftest.$ac_ext <<EOF 255689857Sobrien#line 2557 "configure" 255760484Sobrien#include "confdefs.h" 255860484Sobrien/* Thanks to Paul Eggert for this test. */ 255960484Sobrien#include <stdio.h> 256060484Sobrien#include <sys/types.h> 256160484Sobrien#include <sys/stat.h> 256260484Sobrien#ifdef HAVE_UNISTD_H 256360484Sobrien#include <unistd.h> 256460484Sobrien#endif 256560484Sobrien#ifdef HAVE_VFORK_H 256660484Sobrien#include <vfork.h> 256760484Sobrien#endif 256860484Sobrien/* On some sparc systems, changes by the child to local and incoming 256960484Sobrien argument registers are propagated back to the parent. 257060484Sobrien The compiler is told about this with #include <vfork.h>, 257160484Sobrien but some compilers (e.g. gcc -O) don't grok <vfork.h>. 257260484Sobrien Test for this by using a static variable whose address 257360484Sobrien is put into a register that is clobbered by the vfork. */ 257460484Sobrienstatic 257560484Sobrien#ifdef __cplusplus 257660484Sobriensparc_address_test (int arg) 257760484Sobrien#else 257860484Sobriensparc_address_test (arg) int arg; 257960484Sobrien#endif 258060484Sobrien{ 258160484Sobrien static pid_t child; 258260484Sobrien if (!child) { 258360484Sobrien child = vfork (); 258460484Sobrien if (child < 0) { 258560484Sobrien perror ("vfork"); 258660484Sobrien _exit(2); 258760484Sobrien } 258860484Sobrien if (!child) { 258960484Sobrien arg = getpid(); 259060484Sobrien write(-1, "", 0); 259160484Sobrien _exit (arg); 259260484Sobrien } 259360484Sobrien } 259460484Sobrien} 259560484Sobrienmain() { 259660484Sobrien pid_t parent = getpid (); 259760484Sobrien pid_t child; 259860484Sobrien 259960484Sobrien sparc_address_test (); 260060484Sobrien 260160484Sobrien child = vfork (); 260260484Sobrien 260360484Sobrien if (child == 0) { 260460484Sobrien /* Here is another test for sparc vfork register problems. 260560484Sobrien This test uses lots of local variables, at least 260660484Sobrien as many local variables as main has allocated so far 260760484Sobrien including compiler temporaries. 4 locals are enough for 260860484Sobrien gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. 260960484Sobrien A buggy compiler should reuse the register of parent 261060484Sobrien for one of the local variables, since it will think that 261160484Sobrien parent can't possibly be used any more in this routine. 261260484Sobrien Assigning to the local variable will thus munge parent 261360484Sobrien in the parent process. */ 261460484Sobrien pid_t 261560484Sobrien p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), 261660484Sobrien p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); 261760484Sobrien /* Convince the compiler that p..p7 are live; otherwise, it might 261860484Sobrien use the same hardware register for all 8 local variables. */ 261960484Sobrien if (p != p1 || p != p2 || p != p3 || p != p4 262060484Sobrien || p != p5 || p != p6 || p != p7) 262160484Sobrien _exit(1); 262260484Sobrien 262360484Sobrien /* On some systems (e.g. IRIX 3.3), 262460484Sobrien vfork doesn't separate parent from child file descriptors. 262560484Sobrien If the child closes a descriptor before it execs or exits, 262660484Sobrien this munges the parent's descriptor as well. 262760484Sobrien Test for this by closing stdout in the child. */ 262860484Sobrien _exit(close(fileno(stdout)) != 0); 262960484Sobrien } else { 263060484Sobrien int status; 263160484Sobrien struct stat st; 263260484Sobrien 263360484Sobrien while (wait(&status) != child) 263460484Sobrien ; 263560484Sobrien exit( 263660484Sobrien /* Was there some problem with vforking? */ 263760484Sobrien child < 0 263860484Sobrien 263960484Sobrien /* Did the child fail? (This shouldn't happen.) */ 264060484Sobrien || status 264160484Sobrien 264260484Sobrien /* Did the vfork/compiler bug occur? */ 264360484Sobrien || parent != getpid() 264460484Sobrien 264560484Sobrien /* Did the file descriptor bug occur? */ 264660484Sobrien || fstat(fileno(stdout), &st) != 0 264760484Sobrien ); 264860484Sobrien } 264960484Sobrien} 265060484SobrienEOF 265189857Sobrienif { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 265260484Sobrienthen 265360484Sobrien ac_cv_func_vfork_works=yes 265460484Sobrienelse 265560484Sobrien echo "configure: failed program was:" >&5 265660484Sobrien cat conftest.$ac_ext >&5 265760484Sobrien rm -fr conftest* 265860484Sobrien ac_cv_func_vfork_works=no 265960484Sobrienfi 266060484Sobrienrm -fr conftest* 266160484Sobrienfi 266260484Sobrien 266360484Sobrienfi 266460484Sobrien 266560484Sobrienecho "$ac_t""$ac_cv_func_vfork_works" 1>&6 266660484Sobrienif test $ac_cv_func_vfork_works = no; then 266760484Sobrien cat >> confdefs.h <<\EOF 266860484Sobrien#define vfork fork 266960484SobrienEOF 267060484Sobrien 267160484Sobrienfi 267260484Sobrien 267360484Sobrien if test $ac_cv_func_vfork_works = no; then 267460484Sobrien LIBOBJS="$LIBOBJS vfork.o" 267560484Sobrien fi 267689857Sobrien # We only need _doprnt if we might use it to implement v*printf. 267789857Sobrien if test $ac_cv_func_vprintf != yes \ 267889857Sobrien || test $ac_cv_func_vfprintf != yes \ 267989857Sobrien || test $ac_cv_func_vsprintf != yes; then 268089857Sobrien for ac_func in _doprnt 268189857Sobriendo 268289857Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 268389857Sobrienecho "configure:2684: checking for $ac_func" >&5 268489857Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 268589857Sobrien echo $ac_n "(cached) $ac_c" 1>&6 268689857Sobrienelse 268789857Sobrien cat > conftest.$ac_ext <<EOF 268889857Sobrien#line 2689 "configure" 268989857Sobrien#include "confdefs.h" 269089857Sobrien/* System header to define __stub macros and hopefully few prototypes, 269189857Sobrien which can conflict with char $ac_func(); below. */ 269289857Sobrien#include <assert.h> 269389857Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 269489857Sobrien/* We use char because int might match the return type of a gcc2 269589857Sobrien builtin and then its argument prototype would still apply. */ 269689857Sobrienchar $ac_func(); 269789857Sobrien 269889857Sobrienint main() { 269989857Sobrien 270089857Sobrien/* The GNU C library defines this for functions which it implements 270189857Sobrien to always fail with ENOSYS. Some functions are actually named 270289857Sobrien something starting with __ and the normal name is an alias. */ 270389857Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 270489857Sobrienchoke me 270589857Sobrien#else 270689857Sobrien$ac_func(); 270789857Sobrien#endif 270889857Sobrien 270989857Sobrien; return 0; } 271089857SobrienEOF 271189857Sobrienif { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 271289857Sobrien rm -rf conftest* 271389857Sobrien eval "ac_cv_func_$ac_func=yes" 271489857Sobrienelse 271589857Sobrien echo "configure: failed program was:" >&5 271689857Sobrien cat conftest.$ac_ext >&5 271789857Sobrien rm -rf conftest* 271889857Sobrien eval "ac_cv_func_$ac_func=no" 271989857Sobrienfi 272089857Sobrienrm -f conftest* 272189857Sobrienfi 272289857Sobrien 272389857Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 272489857Sobrien echo "$ac_t""yes" 1>&6 272589857Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 272689857Sobrien cat >> confdefs.h <<EOF 272789857Sobrien#define $ac_tr_func 1 272889857SobrienEOF 272989857Sobrien 273089857Sobrienelse 273189857Sobrien echo "$ac_t""no" 1>&6 273289857SobrienLIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" 273389857Sobrienfi 273489857Sobriendone 273589857Sobrien 273689857Sobrien 273789857Sobrien else 273889857Sobrien for ac_func in _doprnt 273989857Sobriendo 274089857Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 274189857Sobrienecho "configure:2742: checking for $ac_func" >&5 274289857Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 274389857Sobrien echo $ac_n "(cached) $ac_c" 1>&6 274489857Sobrienelse 274589857Sobrien cat > conftest.$ac_ext <<EOF 274689857Sobrien#line 2747 "configure" 274789857Sobrien#include "confdefs.h" 274889857Sobrien/* System header to define __stub macros and hopefully few prototypes, 274989857Sobrien which can conflict with char $ac_func(); below. */ 275089857Sobrien#include <assert.h> 275189857Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 275289857Sobrien/* We use char because int might match the return type of a gcc2 275389857Sobrien builtin and then its argument prototype would still apply. */ 275489857Sobrienchar $ac_func(); 275589857Sobrien 275689857Sobrienint main() { 275789857Sobrien 275889857Sobrien/* The GNU C library defines this for functions which it implements 275989857Sobrien to always fail with ENOSYS. Some functions are actually named 276089857Sobrien something starting with __ and the normal name is an alias. */ 276189857Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 276289857Sobrienchoke me 276389857Sobrien#else 276489857Sobrien$ac_func(); 276589857Sobrien#endif 276689857Sobrien 276789857Sobrien; return 0; } 276889857SobrienEOF 276989857Sobrienif { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 277089857Sobrien rm -rf conftest* 277189857Sobrien eval "ac_cv_func_$ac_func=yes" 277289857Sobrienelse 277389857Sobrien echo "configure: failed program was:" >&5 277489857Sobrien cat conftest.$ac_ext >&5 277589857Sobrien rm -rf conftest* 277689857Sobrien eval "ac_cv_func_$ac_func=no" 277789857Sobrienfi 277889857Sobrienrm -f conftest* 277989857Sobrienfi 278089857Sobrien 278189857Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 278289857Sobrien echo "$ac_t""yes" 1>&6 278389857Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 278489857Sobrien cat >> confdefs.h <<EOF 278589857Sobrien#define $ac_tr_func 1 278689857SobrienEOF 278789857Sobrien 278889857Sobrienelse 278989857Sobrien echo "$ac_t""no" 1>&6 279089857Sobrienfi 279189857Sobriendone 279289857Sobrien 279389857Sobrien fi 279489857Sobrien 279560484Sobrien for v in $vars; do 279660484Sobrien echo $ac_n "checking for $v""... $ac_c" 1>&6 279789857Sobrienecho "configure:2798: checking for $v" >&5 279860484Sobrien if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then 279960484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 280060484Sobrienelse 280160484Sobrien cat > conftest.$ac_ext <<EOF 280289857Sobrien#line 2803 "configure" 280360484Sobrien#include "confdefs.h" 280460484Sobrienint *p; 280560484Sobrienint main() { 280689857Sobrienextern int $v []; p = &$v; 280760484Sobrien; return 0; } 280860484SobrienEOF 280989857Sobrienif { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 281060484Sobrien rm -rf conftest* 281160484Sobrien eval "libiberty_cv_var_$v=yes" 281260484Sobrienelse 281360484Sobrien echo "configure: failed program was:" >&5 281460484Sobrien cat conftest.$ac_ext >&5 281560484Sobrien rm -rf conftest* 281660484Sobrien eval "libiberty_cv_var_$v=no" 281760484Sobrienfi 281860484Sobrienrm -f conftest* 281960484Sobrienfi 282060484Sobrien 282160484Sobrien if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then 282260484Sobrien echo "$ac_t""yes" 1>&6 282360484Sobrien n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 282460484Sobrien cat >> confdefs.h <<EOF 282560484Sobrien#define $n 1 282660484SobrienEOF 282760484Sobrien 282860484Sobrien else 282960484Sobrien echo "$ac_t""no" 1>&6 283060484Sobrien fi 283160484Sobrien done 283260484Sobrien for ac_func in $checkfuncs 283360484Sobriendo 283460484Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 283589857Sobrienecho "configure:2836: checking for $ac_func" >&5 283660484Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 283760484Sobrien echo $ac_n "(cached) $ac_c" 1>&6 283860484Sobrienelse 283960484Sobrien cat > conftest.$ac_ext <<EOF 284089857Sobrien#line 2841 "configure" 284160484Sobrien#include "confdefs.h" 284260484Sobrien/* System header to define __stub macros and hopefully few prototypes, 284360484Sobrien which can conflict with char $ac_func(); below. */ 284460484Sobrien#include <assert.h> 284560484Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 284660484Sobrien/* We use char because int might match the return type of a gcc2 284760484Sobrien builtin and then its argument prototype would still apply. */ 284860484Sobrienchar $ac_func(); 284960484Sobrien 285060484Sobrienint main() { 285160484Sobrien 285260484Sobrien/* The GNU C library defines this for functions which it implements 285360484Sobrien to always fail with ENOSYS. Some functions are actually named 285460484Sobrien something starting with __ and the normal name is an alias. */ 285560484Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 285660484Sobrienchoke me 285760484Sobrien#else 285860484Sobrien$ac_func(); 285960484Sobrien#endif 286060484Sobrien 286160484Sobrien; return 0; } 286260484SobrienEOF 286389857Sobrienif { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 286460484Sobrien rm -rf conftest* 286560484Sobrien eval "ac_cv_func_$ac_func=yes" 286660484Sobrienelse 286760484Sobrien echo "configure: failed program was:" >&5 286860484Sobrien cat conftest.$ac_ext >&5 286960484Sobrien rm -rf conftest* 287060484Sobrien eval "ac_cv_func_$ac_func=no" 287160484Sobrienfi 287260484Sobrienrm -f conftest* 287360484Sobrienfi 287460484Sobrien 287560484Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 287660484Sobrien echo "$ac_t""yes" 1>&6 287760484Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 287860484Sobrien cat >> confdefs.h <<EOF 287960484Sobrien#define $ac_tr_func 1 288060484SobrienEOF 288160484Sobrien 288260484Sobrienelse 288360484Sobrien echo "$ac_t""no" 1>&6 288460484Sobrienfi 288560484Sobriendone 288660484Sobrien 288760484Sobrienfi 288860484Sobrien 288989857Sobrienfor ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h 289077298Sobriendo 289177298Sobrienac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 289277298Sobrienecho $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 289389857Sobrienecho "configure:2894: checking for $ac_hdr" >&5 289477298Sobrienif eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 289577298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 289677298Sobrienelse 289777298Sobrien cat > conftest.$ac_ext <<EOF 289889857Sobrien#line 2899 "configure" 289977298Sobrien#include "confdefs.h" 290077298Sobrien#include <$ac_hdr> 290177298SobrienEOF 290277298Sobrienac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 290389857Sobrien{ (eval echo configure:2904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 290477298Sobrienac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 290577298Sobrienif test -z "$ac_err"; then 290677298Sobrien rm -rf conftest* 290777298Sobrien eval "ac_cv_header_$ac_safe=yes" 290877298Sobrienelse 290977298Sobrien echo "$ac_err" >&5 291077298Sobrien echo "configure: failed program was:" >&5 291177298Sobrien cat conftest.$ac_ext >&5 291277298Sobrien rm -rf conftest* 291377298Sobrien eval "ac_cv_header_$ac_safe=no" 291477298Sobrienfi 291577298Sobrienrm -f conftest* 291677298Sobrienfi 291777298Sobrienif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 291877298Sobrien echo "$ac_t""yes" 1>&6 291977298Sobrien ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 292077298Sobrien cat >> confdefs.h <<EOF 292177298Sobrien#define $ac_tr_hdr 1 292277298SobrienEOF 292377298Sobrien 292477298Sobrienelse 292577298Sobrien echo "$ac_t""no" 1>&6 292677298Sobrienfi 292777298Sobriendone 292877298Sobrien 292977298Sobrienfor ac_func in getpagesize 293077298Sobriendo 293177298Sobrienecho $ac_n "checking for $ac_func""... $ac_c" 1>&6 293289857Sobrienecho "configure:2933: checking for $ac_func" >&5 293377298Sobrienif eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 293477298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 293577298Sobrienelse 293677298Sobrien cat > conftest.$ac_ext <<EOF 293789857Sobrien#line 2938 "configure" 293877298Sobrien#include "confdefs.h" 293977298Sobrien/* System header to define __stub macros and hopefully few prototypes, 294077298Sobrien which can conflict with char $ac_func(); below. */ 294177298Sobrien#include <assert.h> 294277298Sobrien/* Override any gcc2 internal prototype to avoid an error. */ 294377298Sobrien/* We use char because int might match the return type of a gcc2 294477298Sobrien builtin and then its argument prototype would still apply. */ 294577298Sobrienchar $ac_func(); 294677298Sobrien 294777298Sobrienint main() { 294877298Sobrien 294977298Sobrien/* The GNU C library defines this for functions which it implements 295077298Sobrien to always fail with ENOSYS. Some functions are actually named 295177298Sobrien something starting with __ and the normal name is an alias. */ 295277298Sobrien#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 295377298Sobrienchoke me 295477298Sobrien#else 295577298Sobrien$ac_func(); 295677298Sobrien#endif 295777298Sobrien 295877298Sobrien; return 0; } 295977298SobrienEOF 296089857Sobrienif { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 296177298Sobrien rm -rf conftest* 296277298Sobrien eval "ac_cv_func_$ac_func=yes" 296377298Sobrienelse 296477298Sobrien echo "configure: failed program was:" >&5 296577298Sobrien cat conftest.$ac_ext >&5 296677298Sobrien rm -rf conftest* 296777298Sobrien eval "ac_cv_func_$ac_func=no" 296877298Sobrienfi 296977298Sobrienrm -f conftest* 297077298Sobrienfi 297177298Sobrien 297277298Sobrienif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 297377298Sobrien echo "$ac_t""yes" 1>&6 297477298Sobrien ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 297577298Sobrien cat >> confdefs.h <<EOF 297677298Sobrien#define $ac_tr_func 1 297777298SobrienEOF 297877298Sobrien 297977298Sobrienelse 298077298Sobrien echo "$ac_t""no" 1>&6 298177298Sobrienfi 298277298Sobriendone 298377298Sobrien 298477298Sobrienecho $ac_n "checking for working mmap""... $ac_c" 1>&6 298589857Sobrienecho "configure:2986: checking for working mmap" >&5 298677298Sobrienif eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then 298777298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 298877298Sobrienelse 298977298Sobrien if test "$cross_compiling" = yes; then 299077298Sobrien ac_cv_func_mmap_fixed_mapped=no 299177298Sobrienelse 299277298Sobrien cat > conftest.$ac_ext <<EOF 299389857Sobrien#line 2994 "configure" 299477298Sobrien#include "confdefs.h" 299577298Sobrien 299677298Sobrien/* Thanks to Mike Haertel and Jim Avera for this test. 299777298Sobrien Here is a matrix of mmap possibilities: 299877298Sobrien mmap private not fixed 299977298Sobrien mmap private fixed at somewhere currently unmapped 300077298Sobrien mmap private fixed at somewhere already mapped 300177298Sobrien mmap shared not fixed 300277298Sobrien mmap shared fixed at somewhere currently unmapped 300377298Sobrien mmap shared fixed at somewhere already mapped 300477298Sobrien For private mappings, we should verify that changes cannot be read() 300577298Sobrien back from the file, nor mmap's back from the file at a different 300677298Sobrien address. (There have been systems where private was not correctly 300777298Sobrien implemented like the infamous i386 svr4.0, and systems where the 300877298Sobrien VM page cache was not coherent with the filesystem buffer cache 300977298Sobrien like early versions of FreeBSD and possibly contemporary NetBSD.) 301077298Sobrien For shared mappings, we should conversely verify that changes get 301177298Sobrien propogated back to all the places they're supposed to be. 301277298Sobrien 301377298Sobrien Grep wants private fixed already mapped. 301477298Sobrien The main things grep needs to know about mmap are: 301577298Sobrien * does it exist and is it safe to write into the mmap'd area 301677298Sobrien * how to use it (BSD variants) */ 301777298Sobrien#include <sys/types.h> 301877298Sobrien#include <fcntl.h> 301977298Sobrien#include <sys/mman.h> 302077298Sobrien 302189857Sobrien#if HAVE_SYS_TYPES_H 302289857Sobrien# include <sys/types.h> 302389857Sobrien#endif 302489857Sobrien 302589857Sobrien#if HAVE_STDLIB_H 302689857Sobrien# include <stdlib.h> 302789857Sobrien#endif 302889857Sobrien 302989857Sobrien#if HAVE_SYS_STAT_H 303089857Sobrien# include <sys/stat.h> 303189857Sobrien#endif 303289857Sobrien 303389857Sobrien#if HAVE_UNISTD_H 303489857Sobrien# include <unistd.h> 303589857Sobrien#endif 303689857Sobrien 303777298Sobrien/* This mess was copied from the GNU getpagesize.h. */ 303877298Sobrien#ifndef HAVE_GETPAGESIZE 303977298Sobrien 304077298Sobrien/* Assume that all systems that can run configure have sys/param.h. */ 304177298Sobrien# ifndef HAVE_SYS_PARAM_H 304277298Sobrien# define HAVE_SYS_PARAM_H 1 304377298Sobrien# endif 304477298Sobrien 304577298Sobrien# ifdef _SC_PAGESIZE 304677298Sobrien# define getpagesize() sysconf(_SC_PAGESIZE) 304777298Sobrien# else /* no _SC_PAGESIZE */ 304877298Sobrien# ifdef HAVE_SYS_PARAM_H 304977298Sobrien# include <sys/param.h> 305077298Sobrien# ifdef EXEC_PAGESIZE 305177298Sobrien# define getpagesize() EXEC_PAGESIZE 305277298Sobrien# else /* no EXEC_PAGESIZE */ 305377298Sobrien# ifdef NBPG 305477298Sobrien# define getpagesize() NBPG * CLSIZE 305577298Sobrien# ifndef CLSIZE 305677298Sobrien# define CLSIZE 1 305777298Sobrien# endif /* no CLSIZE */ 305877298Sobrien# else /* no NBPG */ 305977298Sobrien# ifdef NBPC 306077298Sobrien# define getpagesize() NBPC 306177298Sobrien# else /* no NBPC */ 306277298Sobrien# ifdef PAGESIZE 306377298Sobrien# define getpagesize() PAGESIZE 306477298Sobrien# endif /* PAGESIZE */ 306577298Sobrien# endif /* no NBPC */ 306677298Sobrien# endif /* no NBPG */ 306777298Sobrien# endif /* no EXEC_PAGESIZE */ 306877298Sobrien# else /* no HAVE_SYS_PARAM_H */ 306977298Sobrien# define getpagesize() 8192 /* punt totally */ 307077298Sobrien# endif /* no HAVE_SYS_PARAM_H */ 307177298Sobrien# endif /* no _SC_PAGESIZE */ 307277298Sobrien 307377298Sobrien#endif /* no HAVE_GETPAGESIZE */ 307477298Sobrien 307577298Sobrien#ifdef __cplusplus 307677298Sobrienextern "C" { void *malloc(unsigned); } 307777298Sobrien#else 307877298Sobrienchar *malloc(); 307977298Sobrien#endif 308077298Sobrien 308177298Sobrienint 308277298Sobrienmain() 308377298Sobrien{ 308477298Sobrien char *data, *data2, *data3; 308577298Sobrien int i, pagesize; 308677298Sobrien int fd; 308777298Sobrien 308877298Sobrien pagesize = getpagesize(); 308977298Sobrien 309077298Sobrien /* 309177298Sobrien * First, make a file with some known garbage in it. 309277298Sobrien */ 309377298Sobrien data = malloc(pagesize); 309477298Sobrien if (!data) 309577298Sobrien exit(1); 309677298Sobrien for (i = 0; i < pagesize; ++i) 309777298Sobrien *(data + i) = rand(); 309877298Sobrien umask(0); 309977298Sobrien fd = creat("conftestmmap", 0600); 310077298Sobrien if (fd < 0) 310177298Sobrien exit(1); 310277298Sobrien if (write(fd, data, pagesize) != pagesize) 310377298Sobrien exit(1); 310477298Sobrien close(fd); 310577298Sobrien 310677298Sobrien /* 310777298Sobrien * Next, try to mmap the file at a fixed address which 310877298Sobrien * already has something else allocated at it. If we can, 310977298Sobrien * also make sure that we see the same garbage. 311077298Sobrien */ 311177298Sobrien fd = open("conftestmmap", O_RDWR); 311277298Sobrien if (fd < 0) 311377298Sobrien exit(1); 311477298Sobrien data2 = malloc(2 * pagesize); 311577298Sobrien if (!data2) 311677298Sobrien exit(1); 311777298Sobrien data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); 311877298Sobrien if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, 311977298Sobrien MAP_PRIVATE | MAP_FIXED, fd, 0L)) 312077298Sobrien exit(1); 312177298Sobrien for (i = 0; i < pagesize; ++i) 312277298Sobrien if (*(data + i) != *(data2 + i)) 312377298Sobrien exit(1); 312477298Sobrien 312577298Sobrien /* 312677298Sobrien * Finally, make sure that changes to the mapped area 312777298Sobrien * do not percolate back to the file as seen by read(). 312877298Sobrien * (This is a bug on some variants of i386 svr4.0.) 312977298Sobrien */ 313077298Sobrien for (i = 0; i < pagesize; ++i) 313177298Sobrien *(data2 + i) = *(data2 + i) + 1; 313277298Sobrien data3 = malloc(pagesize); 313377298Sobrien if (!data3) 313477298Sobrien exit(1); 313577298Sobrien if (read(fd, data3, pagesize) != pagesize) 313677298Sobrien exit(1); 313777298Sobrien for (i = 0; i < pagesize; ++i) 313877298Sobrien if (*(data + i) != *(data3 + i)) 313977298Sobrien exit(1); 314077298Sobrien close(fd); 314177298Sobrien unlink("conftestmmap"); 314277298Sobrien exit(0); 314377298Sobrien} 314477298Sobrien 314577298SobrienEOF 314689857Sobrienif { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 314777298Sobrienthen 314877298Sobrien ac_cv_func_mmap_fixed_mapped=yes 314977298Sobrienelse 315077298Sobrien echo "configure: failed program was:" >&5 315177298Sobrien cat conftest.$ac_ext >&5 315277298Sobrien rm -fr conftest* 315377298Sobrien ac_cv_func_mmap_fixed_mapped=no 315477298Sobrienfi 315577298Sobrienrm -fr conftest* 315677298Sobrienfi 315777298Sobrien 315877298Sobrienfi 315977298Sobrien 316077298Sobrienecho "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 316177298Sobrienif test $ac_cv_func_mmap_fixed_mapped = yes; then 316277298Sobrien cat >> confdefs.h <<\EOF 316377298Sobrien#define HAVE_MMAP 1 316477298SobrienEOF 316577298Sobrien 316677298Sobrienfi 316777298Sobrien 316877298Sobrien 316977298Sobrienecho $ac_n "checking for working strncmp""... $ac_c" 1>&6 317089857Sobrienecho "configure:3171: checking for working strncmp" >&5 317177298Sobrienif eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then 317277298Sobrien echo $ac_n "(cached) $ac_c" 1>&6 317377298Sobrienelse 317477298Sobrien if test "$cross_compiling" = yes; then 317577298Sobrien ac_cv_func_strncmp_works=no 317677298Sobrienelse 317777298Sobrien cat > conftest.$ac_ext <<EOF 317889857Sobrien#line 3179 "configure" 317977298Sobrien#include "confdefs.h" 318077298Sobrien 318177298Sobrien/* Test by Jim Wilson and Kaveh Ghazi. 318277298Sobrien Check whether strncmp reads past the end of its string parameters. */ 318377298Sobrien#include <sys/types.h> 318477298Sobrien 318577298Sobrien#ifdef HAVE_FCNTL_H 318677298Sobrien#include <fcntl.h> 318777298Sobrien#endif 318877298Sobrien 318977298Sobrien#ifdef HAVE_SYS_MMAN_H 319077298Sobrien#include <sys/mman.h> 319177298Sobrien#endif 319277298Sobrien 319377298Sobrien#ifndef MAP_ANON 319477298Sobrien#ifdef MAP_ANONYMOUS 319577298Sobrien#define MAP_ANON MAP_ANONYMOUS 319677298Sobrien#else 319777298Sobrien#define MAP_ANON MAP_FILE 319877298Sobrien#endif 319977298Sobrien#endif 320077298Sobrien 320177298Sobrien#ifndef MAP_FILE 320277298Sobrien#define MAP_FILE 0 320377298Sobrien#endif 320477298Sobrien#ifndef O_RDONLY 320577298Sobrien#define O_RDONLY 0 320677298Sobrien#endif 320777298Sobrien 320877298Sobrien#define MAP_LEN 0x10000 320977298Sobrien 321077298Sobrienmain () 321177298Sobrien{ 321277298Sobrien#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) 321377298Sobrien char *p; 321477298Sobrien int dev_zero; 321577298Sobrien 321677298Sobrien dev_zero = open ("/dev/zero", O_RDONLY); 321777298Sobrien if (dev_zero < 0) 321877298Sobrien exit (1); 321977298Sobrien 322077298Sobrien p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, 322177298Sobrien MAP_ANON|MAP_PRIVATE, dev_zero, 0); 322277298Sobrien if (p == (char *)-1) 322389857Sobrien p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, 322489857Sobrien MAP_ANON|MAP_PRIVATE, -1, 0); 322589857Sobrien if (p == (char *)-1) 322677298Sobrien exit (2); 322777298Sobrien else 322877298Sobrien { 322977298Sobrien char *string = "__si_type_info"; 323077298Sobrien char *q = (char *) p + MAP_LEN - strlen (string) - 2; 323177298Sobrien char *r = (char *) p + 0xe; 323277298Sobrien 323377298Sobrien strcpy (q, string); 323477298Sobrien strcpy (r, string); 323577298Sobrien strncmp (r, q, 14); 323677298Sobrien } 323777298Sobrien#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ 323877298Sobrien exit (0); 323977298Sobrien} 324077298Sobrien 324177298SobrienEOF 324289857Sobrienif { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 324377298Sobrienthen 324477298Sobrien ac_cv_func_strncmp_works=yes 324577298Sobrienelse 324677298Sobrien echo "configure: failed program was:" >&5 324777298Sobrien cat conftest.$ac_ext >&5 324877298Sobrien rm -fr conftest* 324977298Sobrien ac_cv_func_strncmp_works=no 325077298Sobrienfi 325177298Sobrienrm -fr conftest* 325277298Sobrienfi 325377298Sobrien 325477298Sobrienrm -f core core.* *.core 325577298Sobrienfi 325677298Sobrien 325777298Sobrienecho "$ac_t""$ac_cv_func_strncmp_works" 1>&6 325877298Sobrienif test $ac_cv_func_strncmp_works = no ; then 325977298Sobrien LIBOBJS="$LIBOBJS strncmp.o" 326077298Sobrienfi 326177298Sobrien 326277298Sobrien 326360484Sobrien# Install a library built with a cross compiler in $(tooldir) rather 326460484Sobrien# than $(libdir). 326560484Sobrienif test -z "${with_cross_host}"; then 326660484Sobrien INSTALL_DEST=libdir 326760484Sobrienelse 326860484Sobrien INSTALL_DEST=tooldir 326960484Sobrienfi 327060484Sobrien 327160484Sobrien 327260484Sobrien# We need multilib support, but only if configuring for the target. 327360484Sobrientrap '' 1 2 15 327460484Sobriencat > confcache <<\EOF 327560484Sobrien# This file is a shell script that caches the results of configure 327660484Sobrien# tests run on this system so they can be shared between configure 327760484Sobrien# scripts and configure runs. It is not useful on other systems. 327860484Sobrien# If it contains results you don't want to keep, you may remove or edit it. 327960484Sobrien# 328060484Sobrien# By default, configure uses ./config.cache as the cache file, 328160484Sobrien# creating it if it does not exist already. You can give configure 328260484Sobrien# the --cache-file=FILE option to use a different cache file; that is 328360484Sobrien# what configure does when it calls configure scripts in 328460484Sobrien# subdirectories, so they share the cache. 328560484Sobrien# Giving --cache-file=/dev/null disables caching, for debugging configure. 328660484Sobrien# config.status only pays attention to the cache file if you give it the 328760484Sobrien# --recheck option to rerun configure. 328860484Sobrien# 328960484SobrienEOF 329060484Sobrien# The following way of writing the cache mishandles newlines in values, 329160484Sobrien# but we know of no workaround that is simple, portable, and efficient. 329260484Sobrien# So, don't put newlines in cache variables' values. 329360484Sobrien# Ultrix sh set writes to stderr and can't be redirected directly, 329460484Sobrien# and sets the high bit in the cache file unless we assign to the vars. 329560484Sobrien(set) 2>&1 | 329660484Sobrien case `(ac_space=' '; set | grep ac_space) 2>&1` in 329760484Sobrien *ac_space=\ *) 329860484Sobrien # `set' does not quote correctly, so add quotes (double-quote substitution 329960484Sobrien # turns \\\\ into \\, and sed turns \\ into \). 330060484Sobrien sed -n \ 330160484Sobrien -e "s/'/'\\\\''/g" \ 330260484Sobrien -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 330360484Sobrien ;; 330460484Sobrien *) 330560484Sobrien # `set' quotes correctly as required by POSIX, so do not add quotes. 330660484Sobrien sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 330760484Sobrien ;; 330860484Sobrien esac >> confcache 330960484Sobrienif cmp -s $cache_file confcache; then 331060484Sobrien : 331160484Sobrienelse 331260484Sobrien if test -w $cache_file; then 331360484Sobrien echo "updating cache $cache_file" 331460484Sobrien cat confcache > $cache_file 331560484Sobrien else 331660484Sobrien echo "not updating unwritable cache $cache_file" 331760484Sobrien fi 331860484Sobrienfi 331960484Sobrienrm -f confcache 332060484Sobrien 332160484Sobrientrap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 332260484Sobrien 332360484Sobrientest "x$prefix" = xNONE && prefix=$ac_default_prefix 332460484Sobrien# Let make expand exec_prefix. 332560484Sobrientest "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 332660484Sobrien 332760484Sobrien# Any assignment to VPATH causes Sun make to only execute 332860484Sobrien# the first set of double-colon rules, so remove it if not needed. 332960484Sobrien# If there is a colon in the path, we need to keep it. 333060484Sobrienif test "x$srcdir" = x.; then 333160484Sobrien ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 333260484Sobrienfi 333360484Sobrien 333460484Sobrientrap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 333560484Sobrien 333660484SobrienDEFS=-DHAVE_CONFIG_H 333760484Sobrien 333860484Sobrien# Without the "./", some shells look in PATH for config.status. 333960484Sobrien: ${CONFIG_STATUS=./config.status} 334060484Sobrien 334160484Sobrienecho creating $CONFIG_STATUS 334260484Sobrienrm -f $CONFIG_STATUS 334360484Sobriencat > $CONFIG_STATUS <<EOF 334460484Sobrien#! /bin/sh 334560484Sobrien# Generated automatically by configure. 334660484Sobrien# Run this file to recreate the current configuration. 334760484Sobrien# This directory was configured as follows, 334860484Sobrien# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 334960484Sobrien# 335060484Sobrien# $0 $ac_configure_args 335160484Sobrien# 335260484Sobrien# Compiler output produced by configure, useful for debugging 335360484Sobrien# configure, is in ./config.log if it exists. 335460484Sobrien 335560484Sobrienac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 335660484Sobrienfor ac_option 335760484Sobriendo 335860484Sobrien case "\$ac_option" in 335960484Sobrien -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 336060484Sobrien echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 336160484Sobrien exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 336260484Sobrien -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 336360484Sobrien echo "$CONFIG_STATUS generated by autoconf version 2.13" 336460484Sobrien exit 0 ;; 336560484Sobrien -help | --help | --hel | --he | --h) 336660484Sobrien echo "\$ac_cs_usage"; exit 0 ;; 336760484Sobrien *) echo "\$ac_cs_usage"; exit 1 ;; 336860484Sobrien esac 336960484Sobriendone 337060484Sobrien 337160484Sobrienac_given_srcdir=$srcdir 337260484Sobrienac_given_INSTALL="$INSTALL" 337360484Sobrien 337460484Sobrientrap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 337560484SobrienEOF 337660484Sobriencat >> $CONFIG_STATUS <<EOF 337760484Sobrien 337860484Sobrien# Protect against being on the right side of a sed subst in config.status. 337960484Sobriensed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; 338060484Sobrien s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF 338160484Sobrien$ac_vpsub 338260484Sobrien$extrasub 338360484Sobriens%@SHELL@%$SHELL%g 338460484Sobriens%@CFLAGS@%$CFLAGS%g 338560484Sobriens%@CPPFLAGS@%$CPPFLAGS%g 338660484Sobriens%@CXXFLAGS@%$CXXFLAGS%g 338760484Sobriens%@FFLAGS@%$FFLAGS%g 338860484Sobriens%@DEFS@%$DEFS%g 338960484Sobriens%@LDFLAGS@%$LDFLAGS%g 339060484Sobriens%@LIBS@%$LIBS%g 339160484Sobriens%@exec_prefix@%$exec_prefix%g 339260484Sobriens%@prefix@%$prefix%g 339360484Sobriens%@program_transform_name@%$program_transform_name%g 339460484Sobriens%@bindir@%$bindir%g 339560484Sobriens%@sbindir@%$sbindir%g 339660484Sobriens%@libexecdir@%$libexecdir%g 339760484Sobriens%@datadir@%$datadir%g 339860484Sobriens%@sysconfdir@%$sysconfdir%g 339960484Sobriens%@sharedstatedir@%$sharedstatedir%g 340060484Sobriens%@localstatedir@%$localstatedir%g 340160484Sobriens%@libdir@%$libdir%g 340260484Sobriens%@includedir@%$includedir%g 340360484Sobriens%@oldincludedir@%$oldincludedir%g 340460484Sobriens%@infodir@%$infodir%g 340560484Sobriens%@mandir@%$mandir%g 340689857Sobriens%@MAINT@%$MAINT%g 340789857Sobriens%@NOTMAINT@%$NOTMAINT%g 340889857Sobriens%@MAKEINFO@%$MAKEINFO%g 340989857Sobriens%@BUILD_INFO@%$BUILD_INFO%g 341089857Sobriens%@PERL@%$PERL%g 341189857Sobriens%@HAVE_PERL@%$HAVE_PERL%g 341260484Sobriens%@host@%$host%g 341360484Sobriens%@host_alias@%$host_alias%g 341460484Sobriens%@host_cpu@%$host_cpu%g 341560484Sobriens%@host_vendor@%$host_vendor%g 341660484Sobriens%@host_os@%$host_os%g 341760484Sobriens%@build@%$build%g 341860484Sobriens%@build_alias@%$build_alias%g 341960484Sobriens%@build_cpu@%$build_cpu%g 342060484Sobriens%@build_vendor@%$build_vendor%g 342160484Sobriens%@build_os@%$build_os%g 342260484Sobriens%@AR@%$AR%g 342360484Sobriens%@RANLIB@%$RANLIB%g 342477298Sobriens%@CC@%$CC%g 342560484Sobriens%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g 342660484Sobriens%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g 342760484Sobriens%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g 342860484Sobriens%@INSTALL_DATA@%$INSTALL_DATA%g 342960484Sobrien/@host_makefile_frag@/r $host_makefile_frag 343060484Sobriens%@host_makefile_frag@%%g 343160484Sobriens%@CPP@%$CPP%g 343260484Sobriens%@CHECK@%$CHECK%g 343360484Sobriens%@LIBOBJS@%$LIBOBJS%g 343460484Sobriens%@INSTALL_DEST@%$INSTALL_DEST%g 343560484Sobrien 343660484SobrienCEOF 343760484SobrienEOF 343860484Sobrien 343960484Sobriencat >> $CONFIG_STATUS <<\EOF 344060484Sobrien 344160484Sobrien# Split the substitutions into bite-sized pieces for seds with 344260484Sobrien# small command number limits, like on Digital OSF/1 and HP-UX. 344360484Sobrienac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. 344460484Sobrienac_file=1 # Number of current file. 344560484Sobrienac_beg=1 # First line for current file. 344660484Sobrienac_end=$ac_max_sed_cmds # Line after last line for current file. 344760484Sobrienac_more_lines=: 344860484Sobrienac_sed_cmds="" 344960484Sobrienwhile $ac_more_lines; do 345060484Sobrien if test $ac_beg -gt 1; then 345160484Sobrien sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file 345260484Sobrien else 345360484Sobrien sed "${ac_end}q" conftest.subs > conftest.s$ac_file 345460484Sobrien fi 345560484Sobrien if test ! -s conftest.s$ac_file; then 345660484Sobrien ac_more_lines=false 345760484Sobrien rm -f conftest.s$ac_file 345860484Sobrien else 345960484Sobrien if test -z "$ac_sed_cmds"; then 346060484Sobrien ac_sed_cmds="sed -f conftest.s$ac_file" 346160484Sobrien else 346260484Sobrien ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" 346360484Sobrien fi 346460484Sobrien ac_file=`expr $ac_file + 1` 346560484Sobrien ac_beg=$ac_end 346660484Sobrien ac_end=`expr $ac_end + $ac_max_sed_cmds` 346760484Sobrien fi 346860484Sobriendone 346960484Sobrienif test -z "$ac_sed_cmds"; then 347060484Sobrien ac_sed_cmds=cat 347160484Sobrienfi 347260484SobrienEOF 347360484Sobrien 347460484Sobriencat >> $CONFIG_STATUS <<EOF 347560484Sobrien 347660484SobrienCONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"} 347760484SobrienEOF 347860484Sobriencat >> $CONFIG_STATUS <<\EOF 347960484Sobrienfor ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 348060484Sobrien # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 348160484Sobrien case "$ac_file" in 348260484Sobrien *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 348360484Sobrien ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 348460484Sobrien *) ac_file_in="${ac_file}.in" ;; 348560484Sobrien esac 348660484Sobrien 348760484Sobrien # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. 348860484Sobrien 348960484Sobrien # Remove last slash and all that follows it. Not all systems have dirname. 349060484Sobrien ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 349160484Sobrien if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 349260484Sobrien # The file is in a subdirectory. 349360484Sobrien test ! -d "$ac_dir" && mkdir "$ac_dir" 349460484Sobrien ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 349560484Sobrien # A "../" for each directory in $ac_dir_suffix. 349660484Sobrien ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 349760484Sobrien else 349860484Sobrien ac_dir_suffix= ac_dots= 349960484Sobrien fi 350060484Sobrien 350160484Sobrien case "$ac_given_srcdir" in 350260484Sobrien .) srcdir=. 350360484Sobrien if test -z "$ac_dots"; then top_srcdir=. 350460484Sobrien else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 350560484Sobrien /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 350660484Sobrien *) # Relative path. 350760484Sobrien srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 350860484Sobrien top_srcdir="$ac_dots$ac_given_srcdir" ;; 350960484Sobrien esac 351060484Sobrien 351160484Sobrien case "$ac_given_INSTALL" in 351260484Sobrien [/$]*) INSTALL="$ac_given_INSTALL" ;; 351360484Sobrien *) INSTALL="$ac_dots$ac_given_INSTALL" ;; 351460484Sobrien esac 351560484Sobrien 351660484Sobrien echo creating "$ac_file" 351760484Sobrien rm -f "$ac_file" 351860484Sobrien configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 351960484Sobrien case "$ac_file" in 352060484Sobrien *Makefile*) ac_comsub="1i\\ 352160484Sobrien# $configure_input" ;; 352260484Sobrien *) ac_comsub= ;; 352360484Sobrien esac 352460484Sobrien 352560484Sobrien ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 352660484Sobrien sed -e "$ac_comsub 352760484Sobriens%@configure_input@%$configure_input%g 352860484Sobriens%@srcdir@%$srcdir%g 352960484Sobriens%@top_srcdir@%$top_srcdir%g 353060484Sobriens%@INSTALL@%$INSTALL%g 353160484Sobrien" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file 353260484Sobrienfi; done 353360484Sobrienrm -f conftest.s* 353460484Sobrien 353560484Sobrien# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where 353660484Sobrien# NAME is the cpp macro being defined and VALUE is the value it is being given. 353760484Sobrien# 353860484Sobrien# ac_d sets the value in "#define NAME VALUE" lines. 353960484Sobrienac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' 354060484Sobrienac_dB='\([ ][ ]*\)[^ ]*%\1#\2' 354160484Sobrienac_dC='\3' 354260484Sobrienac_dD='%g' 354360484Sobrien# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". 354460484Sobrienac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' 354560484Sobrienac_uB='\([ ]\)%\1#\2define\3' 354660484Sobrienac_uC=' ' 354760484Sobrienac_uD='\4%g' 354860484Sobrien# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". 354960484Sobrienac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' 355060484Sobrienac_eB='$%\1#\2define\3' 355160484Sobrienac_eC=' ' 355260484Sobrienac_eD='%g' 355360484Sobrien 355460484Sobrienif test "${CONFIG_HEADERS+set}" != set; then 355560484SobrienEOF 355660484Sobriencat >> $CONFIG_STATUS <<EOF 355760484Sobrien CONFIG_HEADERS="config.h:config.in" 355860484SobrienEOF 355960484Sobriencat >> $CONFIG_STATUS <<\EOF 356060484Sobrienfi 356160484Sobrienfor ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then 356260484Sobrien # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 356360484Sobrien case "$ac_file" in 356460484Sobrien *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 356560484Sobrien ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 356660484Sobrien *) ac_file_in="${ac_file}.in" ;; 356760484Sobrien esac 356860484Sobrien 356960484Sobrien echo creating $ac_file 357060484Sobrien 357160484Sobrien rm -f conftest.frag conftest.in conftest.out 357260484Sobrien ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 357360484Sobrien cat $ac_file_inputs > conftest.in 357460484Sobrien 357560484SobrienEOF 357660484Sobrien 357760484Sobrien# Transform confdefs.h into a sed script conftest.vals that substitutes 357860484Sobrien# the proper values into config.h.in to produce config.h. And first: 357960484Sobrien# Protect against being on the right side of a sed subst in config.status. 358060484Sobrien# Protect against being in an unquoted here document in config.status. 358160484Sobrienrm -f conftest.vals 358260484Sobriencat > conftest.hdr <<\EOF 358360484Sobriens/[\\&%]/\\&/g 358460484Sobriens%[\\$`]%\\&%g 358560484Sobriens%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp 358660484Sobriens%ac_d%ac_u%gp 358760484Sobriens%ac_u%ac_e%gp 358860484SobrienEOF 358960484Sobriensed -n -f conftest.hdr confdefs.h > conftest.vals 359060484Sobrienrm -f conftest.hdr 359160484Sobrien 359260484Sobrien# This sed command replaces #undef with comments. This is necessary, for 359360484Sobrien# example, in the case of _POSIX_SOURCE, which is predefined and required 359460484Sobrien# on some systems where configure will not decide to define it. 359560484Sobriencat >> conftest.vals <<\EOF 359660484Sobriens%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% 359760484SobrienEOF 359860484Sobrien 359960484Sobrien# Break up conftest.vals because some shells have a limit on 360060484Sobrien# the size of here documents, and old seds have small limits too. 360160484Sobrien 360260484Sobrienrm -f conftest.tail 360360484Sobrienwhile : 360460484Sobriendo 360560484Sobrien ac_lines=`grep -c . conftest.vals` 360660484Sobrien # grep -c gives empty output for an empty file on some AIX systems. 360760484Sobrien if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi 360860484Sobrien # Write a limited-size here document to conftest.frag. 360960484Sobrien echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS 361060484Sobrien sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS 361160484Sobrien echo 'CEOF 361260484Sobrien sed -f conftest.frag conftest.in > conftest.out 361360484Sobrien rm -f conftest.in 361460484Sobrien mv conftest.out conftest.in 361560484Sobrien' >> $CONFIG_STATUS 361660484Sobrien sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail 361760484Sobrien rm -f conftest.vals 361860484Sobrien mv conftest.tail conftest.vals 361960484Sobriendone 362060484Sobrienrm -f conftest.vals 362160484Sobrien 362260484Sobriencat >> $CONFIG_STATUS <<\EOF 362360484Sobrien rm -f conftest.frag conftest.h 362460484Sobrien echo "/* $ac_file. Generated automatically by configure. */" > conftest.h 362560484Sobrien cat conftest.in >> conftest.h 362660484Sobrien rm -f conftest.in 362760484Sobrien if cmp -s $ac_file conftest.h 2>/dev/null; then 362860484Sobrien echo "$ac_file is unchanged" 362960484Sobrien rm -f conftest.h 363060484Sobrien else 363160484Sobrien # Remove last slash and all that follows it. Not all systems have dirname. 363260484Sobrien ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 363360484Sobrien if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 363460484Sobrien # The file is in a subdirectory. 363560484Sobrien test ! -d "$ac_dir" && mkdir "$ac_dir" 363660484Sobrien fi 363760484Sobrien rm -f $ac_file 363860484Sobrien mv conftest.h $ac_file 363960484Sobrien fi 364060484Sobrienfi; done 364160484Sobrien 364260484SobrienEOF 364360484Sobriencat >> $CONFIG_STATUS <<EOF 364460484Sobriensrcdir=${srcdir} 364560484Sobrienhost=${host} 364660484Sobrientarget=${target} 364760484Sobrienwith_target_subdir=${with_target_subdir} 364860484Sobrienwith_multisubdir=${with_multisubdir} 364960484Sobrienac_configure_args="--enable-multilib ${ac_configure_args}" 365060484SobrienCONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 365160484Sobrienlibiberty_topdir=${libiberty_topdir} 365260484Sobrien 365360484SobrienEOF 365460484Sobriencat >> $CONFIG_STATUS <<\EOF 365560484Sobrientest -z "$CONFIG_HEADERS" || echo timestamp > stamp-h 365660484Sobrienif test -n "$CONFIG_FILES"; then 365760484Sobrien if test -n "${with_target_subdir}"; then 365860484Sobrien # FIXME: We shouldn't need to set ac_file 365960484Sobrien ac_file=Makefile 366060484Sobrien . ${libiberty_topdir}/config-ml.in 366160484Sobrien fi 366260484Sobrienfi 366360484Sobrienexit 0 366460484SobrienEOF 366560484Sobrienchmod +x $CONFIG_STATUS 366660484Sobrienrm -fr confdefs* $ac_clean_files 366760484Sobrientest "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 366860484Sobrien 3669