configure revision 91041
1159720Syar#! /bin/sh 2159720Syar 3159720Syar# Guess values for system-dependent variables and create Makefiles. 4159720Syar# Generated automatically using autoconf version 2.13 5159720Syar# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 6159720Syar# 7159720Syar# This configure script is free software; the Free Software Foundation 8159720Syar# gives unlimited permission to copy, distribute and modify it. 9159720Syar 10159720Syar# Defaults: 11159720Syarac_help= 12159720Syarac_default_prefix=/usr/local 13159720Syar# Any additions from configure.in: 14159720Syarac_help="$ac_help 15159720Syar --with-target-subdir=SUBDIR Configuring in a subdirectory" 16159720Syarac_help="$ac_help 17159720Syar --with-cross-host=HOST Configuring with a cross compiler" 18159720Syarac_help="$ac_help 19159720Syar --with-newlib Configuring with newlib" 20159720Syarac_help="$ac_help 21159720Syar --enable-maintainer-mode 22159720Syar enable make rules and dependencies not useful 23159720Syar (and sometimes confusing) to the casual installer" 24159720Syar 25159720Syar# Initialize some variables set by options. 26159720Syar# The variables have the same names as the options, with 27159720Syar# dashes changed to underlines. 28159720Syarbuild=NONE 29159720Syarcache_file=./config.cache 30159720Syarexec_prefix=NONE 31159720Syarhost=NONE 32159720Syarno_create= 33159720Syarnonopt=NONE 34159720Syarno_recursion= 35159720Syarprefix=NONE 36159720Syarprogram_prefix=NONE 37159720Syarprogram_suffix=NONE 38159720Syarprogram_transform_name=s,x,x, 39159720Syarsilent= 40159720Syarsite= 41159720Syarsrcdir= 42159720Syartarget=NONE 43159720Syarverbose= 44159720Syarx_includes=NONE 45159720Syarx_libraries=NONE 46159720Syarbindir='${exec_prefix}/bin' 47159720Syarsbindir='${exec_prefix}/sbin' 48159720Syarlibexecdir='${exec_prefix}/libexec' 49159720Syardatadir='${prefix}/share' 50159720Syarsysconfdir='${prefix}/etc' 51159720Syarsharedstatedir='${prefix}/com' 52159720Syarlocalstatedir='${prefix}/var' 53159720Syarlibdir='${exec_prefix}/lib' 54159720Syarincludedir='${prefix}/include' 55159720Syaroldincludedir='/usr/include' 56159720Syarinfodir='${prefix}/info' 57159720Syarmandir='${prefix}/man' 58159720Syar 59159720Syar# Initialize some other variables. 60159720Syarsubdirs= 61159720SyarMFLAGS= MAKEFLAGS= 62159720SyarSHELL=${CONFIG_SHELL-/bin/sh} 63159720Syar# Maximum number of lines to put in a shell here document. 64159720Syarac_max_here_lines=12 65159720Syar 66159720Syarac_prev= 67159720Syarfor ac_option 68159720Syardo 69159720Syar 70159720Syar # If the previous option needs an argument, assign it. 71159720Syar if test -n "$ac_prev"; then 72159720Syar eval "$ac_prev=\$ac_option" 73159720Syar ac_prev= 74159720Syar continue 75159720Syar fi 76159720Syar 77159720Syar case "$ac_option" in 78159720Syar -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 79159720Syar *) ac_optarg= ;; 80159720Syar esac 81159720Syar 82159720Syar # Accept the important Cygnus configure options, so we can diagnose typos. 83159720Syar 84159720Syar case "$ac_option" in 85159720Syar 86159720Syar -bindir | --bindir | --bindi | --bind | --bin | --bi) 87159720Syar ac_prev=bindir ;; 88159720Syar -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 89159720Syar bindir="$ac_optarg" ;; 90159720Syar 91159720Syar -build | --build | --buil | --bui | --bu) 92159720Syar ac_prev=build ;; 93159720Syar -build=* | --build=* | --buil=* | --bui=* | --bu=*) 94159720Syar build="$ac_optarg" ;; 95159720Syar 96159720Syar -cache-file | --cache-file | --cache-fil | --cache-fi \ 97159720Syar | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 98159720Syar ac_prev=cache_file ;; 99159720Syar -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 100159720Syar | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 101159720Syar cache_file="$ac_optarg" ;; 102159720Syar 103159720Syar -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 104159720Syar ac_prev=datadir ;; 105159720Syar -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 106159720Syar | --da=*) 107159720Syar datadir="$ac_optarg" ;; 108159720Syar 109159720Syar -disable-* | --disable-*) 110159720Syar ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 111159720Syar # Reject names that are not valid shell variable names. 112159720Syar if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 113159720Syar { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 114159720Syar fi 115159720Syar ac_feature=`echo $ac_feature| sed 's/-/_/g'` 116159720Syar eval "enable_${ac_feature}=no" ;; 117159720Syar 118159720Syar -enable-* | --enable-*) 119159720Syar ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 120159720Syar # Reject names that are not valid shell variable names. 121159720Syar if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 122159720Syar { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 123159720Syar fi 124159720Syar ac_feature=`echo $ac_feature| sed 's/-/_/g'` 125159720Syar case "$ac_option" in 126159720Syar *=*) ;; 127159720Syar *) ac_optarg=yes ;; 128159720Syar esac 129 eval "enable_${ac_feature}='$ac_optarg'" ;; 130 131 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 132 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 133 | --exec | --exe | --ex) 134 ac_prev=exec_prefix ;; 135 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 136 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 137 | --exec=* | --exe=* | --ex=*) 138 exec_prefix="$ac_optarg" ;; 139 140 -gas | --gas | --ga | --g) 141 # Obsolete; use --with-gas. 142 with_gas=yes ;; 143 144 -help | --help | --hel | --he) 145 # Omit some internal or obsolete options to make the list less imposing. 146 # This message is too long to be a string in the A/UX 3.1 sh. 147 cat << EOF 148Usage: configure [options] [host] 149Options: [defaults in brackets after descriptions] 150Configuration: 151 --cache-file=FILE cache test results in FILE 152 --help print this message 153 --no-create do not create output files 154 --quiet, --silent do not print \`checking...' messages 155 --version print the version of autoconf that created configure 156Directory and file names: 157 --prefix=PREFIX install architecture-independent files in PREFIX 158 [$ac_default_prefix] 159 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 160 [same as prefix] 161 --bindir=DIR user executables in DIR [EPREFIX/bin] 162 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 163 --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 164 --datadir=DIR read-only architecture-independent data in DIR 165 [PREFIX/share] 166 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 167 --sharedstatedir=DIR modifiable architecture-independent data in DIR 168 [PREFIX/com] 169 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 170 --libdir=DIR object code libraries in DIR [EPREFIX/lib] 171 --includedir=DIR C header files in DIR [PREFIX/include] 172 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 173 --infodir=DIR info documentation in DIR [PREFIX/info] 174 --mandir=DIR man documentation in DIR [PREFIX/man] 175 --srcdir=DIR find the sources in DIR [configure dir or ..] 176 --program-prefix=PREFIX prepend PREFIX to installed program names 177 --program-suffix=SUFFIX append SUFFIX to installed program names 178 --program-transform-name=PROGRAM 179 run sed PROGRAM on installed program names 180EOF 181 cat << EOF 182Host type: 183 --build=BUILD configure for building on BUILD [BUILD=HOST] 184 --host=HOST configure for HOST [guessed] 185 --target=TARGET configure for TARGET [TARGET=HOST] 186Features and packages: 187 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 188 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 189 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 190 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 191 --x-includes=DIR X include files are in DIR 192 --x-libraries=DIR X library files are in DIR 193EOF 194 if test -n "$ac_help"; then 195 echo "--enable and --with options recognized:$ac_help" 196 fi 197 exit 0 ;; 198 199 -host | --host | --hos | --ho) 200 ac_prev=host ;; 201 -host=* | --host=* | --hos=* | --ho=*) 202 host="$ac_optarg" ;; 203 204 -includedir | --includedir | --includedi | --included | --include \ 205 | --includ | --inclu | --incl | --inc) 206 ac_prev=includedir ;; 207 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 208 | --includ=* | --inclu=* | --incl=* | --inc=*) 209 includedir="$ac_optarg" ;; 210 211 -infodir | --infodir | --infodi | --infod | --info | --inf) 212 ac_prev=infodir ;; 213 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 214 infodir="$ac_optarg" ;; 215 216 -libdir | --libdir | --libdi | --libd) 217 ac_prev=libdir ;; 218 -libdir=* | --libdir=* | --libdi=* | --libd=*) 219 libdir="$ac_optarg" ;; 220 221 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 222 | --libexe | --libex | --libe) 223 ac_prev=libexecdir ;; 224 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 225 | --libexe=* | --libex=* | --libe=*) 226 libexecdir="$ac_optarg" ;; 227 228 -localstatedir | --localstatedir | --localstatedi | --localstated \ 229 | --localstate | --localstat | --localsta | --localst \ 230 | --locals | --local | --loca | --loc | --lo) 231 ac_prev=localstatedir ;; 232 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 233 | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 234 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 235 localstatedir="$ac_optarg" ;; 236 237 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 238 ac_prev=mandir ;; 239 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 240 mandir="$ac_optarg" ;; 241 242 -nfp | --nfp | --nf) 243 # Obsolete; use --without-fp. 244 with_fp=no ;; 245 246 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 247 | --no-cr | --no-c) 248 no_create=yes ;; 249 250 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 251 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 252 no_recursion=yes ;; 253 254 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 255 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 256 | --oldin | --oldi | --old | --ol | --o) 257 ac_prev=oldincludedir ;; 258 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 259 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 260 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 261 oldincludedir="$ac_optarg" ;; 262 263 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 264 ac_prev=prefix ;; 265 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 266 prefix="$ac_optarg" ;; 267 268 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 269 | --program-pre | --program-pr | --program-p) 270 ac_prev=program_prefix ;; 271 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 272 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 273 program_prefix="$ac_optarg" ;; 274 275 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 276 | --program-suf | --program-su | --program-s) 277 ac_prev=program_suffix ;; 278 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 279 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 280 program_suffix="$ac_optarg" ;; 281 282 -program-transform-name | --program-transform-name \ 283 | --program-transform-nam | --program-transform-na \ 284 | --program-transform-n | --program-transform- \ 285 | --program-transform | --program-transfor \ 286 | --program-transfo | --program-transf \ 287 | --program-trans | --program-tran \ 288 | --progr-tra | --program-tr | --program-t) 289 ac_prev=program_transform_name ;; 290 -program-transform-name=* | --program-transform-name=* \ 291 | --program-transform-nam=* | --program-transform-na=* \ 292 | --program-transform-n=* | --program-transform-=* \ 293 | --program-transform=* | --program-transfor=* \ 294 | --program-transfo=* | --program-transf=* \ 295 | --program-trans=* | --program-tran=* \ 296 | --progr-tra=* | --program-tr=* | --program-t=*) 297 program_transform_name="$ac_optarg" ;; 298 299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 300 | -silent | --silent | --silen | --sile | --sil) 301 silent=yes ;; 302 303 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 304 ac_prev=sbindir ;; 305 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 306 | --sbi=* | --sb=*) 307 sbindir="$ac_optarg" ;; 308 309 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 310 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 311 | --sharedst | --shareds | --shared | --share | --shar \ 312 | --sha | --sh) 313 ac_prev=sharedstatedir ;; 314 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 315 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 316 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 317 | --sha=* | --sh=*) 318 sharedstatedir="$ac_optarg" ;; 319 320 -site | --site | --sit) 321 ac_prev=site ;; 322 -site=* | --site=* | --sit=*) 323 site="$ac_optarg" ;; 324 325 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 326 ac_prev=srcdir ;; 327 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 328 srcdir="$ac_optarg" ;; 329 330 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 331 | --syscon | --sysco | --sysc | --sys | --sy) 332 ac_prev=sysconfdir ;; 333 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 334 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 335 sysconfdir="$ac_optarg" ;; 336 337 -target | --target | --targe | --targ | --tar | --ta | --t) 338 ac_prev=target ;; 339 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 340 target="$ac_optarg" ;; 341 342 -v | -verbose | --verbose | --verbos | --verbo | --verb) 343 verbose=yes ;; 344 345 -version | --version | --versio | --versi | --vers) 346 echo "configure generated by autoconf version 2.13" 347 exit 0 ;; 348 349 -with-* | --with-*) 350 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 351 # Reject names that are not valid shell variable names. 352 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 354 fi 355 ac_package=`echo $ac_package| sed 's/-/_/g'` 356 case "$ac_option" in 357 *=*) ;; 358 *) ac_optarg=yes ;; 359 esac 360 eval "with_${ac_package}='$ac_optarg'" ;; 361 362 -without-* | --without-*) 363 ac_package=`echo $ac_option|sed -e 's/-*without-//'` 364 # Reject names that are not valid shell variable names. 365 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 366 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 367 fi 368 ac_package=`echo $ac_package| sed 's/-/_/g'` 369 eval "with_${ac_package}=no" ;; 370 371 --x) 372 # Obsolete; use --with-x. 373 with_x=yes ;; 374 375 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 376 | --x-incl | --x-inc | --x-in | --x-i) 377 ac_prev=x_includes ;; 378 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 379 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 380 x_includes="$ac_optarg" ;; 381 382 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 383 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 384 ac_prev=x_libraries ;; 385 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 386 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 387 x_libraries="$ac_optarg" ;; 388 389 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 390 ;; 391 392 *) 393 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 394 echo "configure: warning: $ac_option: invalid host type" 1>&2 395 fi 396 if test "x$nonopt" != xNONE; then 397 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 398 fi 399 nonopt="$ac_option" 400 ;; 401 402 esac 403done 404 405if test -n "$ac_prev"; then 406 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 407fi 408 409trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 410 411# File descriptor usage: 412# 0 standard input 413# 1 file creation 414# 2 errors and warnings 415# 3 some systems may open it to /dev/tty 416# 4 used on the Kubota Titan 417# 6 checking for... messages and results 418# 5 compiler messages saved in config.log 419if test "$silent" = yes; then 420 exec 6>/dev/null 421else 422 exec 6>&1 423fi 424exec 5>./config.log 425 426echo "\ 427This file contains any messages produced by compilers while 428running configure, to aid debugging if configure makes a mistake. 429" 1>&5 430 431# Strip out --no-create and --no-recursion so they do not pile up. 432# Also quote any args containing shell metacharacters. 433ac_configure_args= 434for ac_arg 435do 436 case "$ac_arg" in 437 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 438 | --no-cr | --no-c) ;; 439 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 440 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 441 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 442 ac_configure_args="$ac_configure_args '$ac_arg'" ;; 443 *) ac_configure_args="$ac_configure_args $ac_arg" ;; 444 esac 445done 446 447# NLS nuisances. 448# Only set these to C if already set. These must not be set unconditionally 449# because not all systems understand e.g. LANG=C (notably SCO). 450# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! 451# Non-C LC_CTYPE values break the ctype check. 452if test "${LANG+set}" = set; then LANG=C; export LANG; fi 453if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 454if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi 455if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi 456 457# confdefs.h avoids OS command line length limits that DEFS can exceed. 458rm -rf conftest* confdefs.h 459# AIX cpp loses on an empty file, so make sure it contains at least a newline. 460echo > confdefs.h 461 462# A filename unique to this package, relative to the directory that 463# configure is in, which we can look for to find out if srcdir is correct. 464ac_unique_file=pexecute.c 465 466# Find the source files, if location was not specified. 467if test -z "$srcdir"; then 468 ac_srcdir_defaulted=yes 469 # Try the directory containing this script, then its parent. 470 ac_prog=$0 471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 473 srcdir=$ac_confdir 474 if test ! -r $srcdir/$ac_unique_file; then 475 srcdir=.. 476 fi 477else 478 ac_srcdir_defaulted=no 479fi 480if test ! -r $srcdir/$ac_unique_file; then 481 if test "$ac_srcdir_defaulted" = yes; then 482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 483 else 484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 485 fi 486fi 487srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 488 489# Prefer explicitly selected file to automatically selected ones. 490if test -z "$CONFIG_SITE"; then 491 if test "x$prefix" != xNONE; then 492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 493 else 494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 495 fi 496fi 497for ac_site_file in $CONFIG_SITE; do 498 if test -r "$ac_site_file"; then 499 echo "loading site script $ac_site_file" 500 . "$ac_site_file" 501 fi 502done 503 504if test -r "$cache_file"; then 505 echo "loading cache $cache_file" 506 . $cache_file 507else 508 echo "creating cache $cache_file" 509 > $cache_file 510fi 511 512ac_ext=c 513# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 514ac_cpp='$CPP $CPPFLAGS' 515ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 516ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 517cross_compiling=$ac_cv_prog_cc_cross 518 519ac_exeext= 520ac_objext=o 521if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 524 ac_n= ac_c=' 525' ac_t=' ' 526 else 527 ac_n=-n ac_c= ac_t= 528 fi 529else 530 ac_n= ac_c='\c' ac_t= 531fi 532 533 534 535# Check whether --with-target-subdir or --without-target-subdir was given. 536if test "${with_target_subdir+set}" = set; then 537 withval="$with_target_subdir" 538 : 539fi 540 541# Check whether --with-cross-host or --without-cross-host was given. 542if test "${with_cross_host+set}" = set; then 543 withval="$with_cross_host" 544 : 545fi 546 547# Check whether --with-newlib or --without-newlib was given. 548if test "${with_newlib+set}" = set; then 549 withval="$with_newlib" 550 : 551fi 552 553 554if test "${srcdir}" = "."; then 555 if test -z "${with_target_subdir}"; then 556 libiberty_topdir="${srcdir}/.." 557 else 558 if test "${with_target_subdir}" != "."; then 559 libiberty_topdir="${srcdir}/${with_multisrctop}../.." 560 else 561 libiberty_topdir="${srcdir}/${with_multisrctop}.." 562 fi 563 fi 564else 565 libiberty_topdir="${srcdir}/.." 566fi 567ac_aux_dir= 568for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do 569 if test -f $ac_dir/install-sh; then 570 ac_aux_dir=$ac_dir 571 ac_install_sh="$ac_aux_dir/install-sh -c" 572 break 573 elif test -f $ac_dir/install.sh; then 574 ac_aux_dir=$ac_dir 575 ac_install_sh="$ac_aux_dir/install.sh -c" 576 break 577 fi 578done 579if test -z "$ac_aux_dir"; then 580 { echo "configure: error: can not find install-sh or install.sh in $libiberty_topdir $srcdir/$libiberty_topdir" 1>&2; exit 1; } 581fi 582ac_config_guess=$ac_aux_dir/config.guess 583ac_config_sub=$ac_aux_dir/config.sub 584ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 585 586 587 588echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 589echo "configure:590: checking whether to enable maintainer-specific portions of Makefiles" >&5 590 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. 591if test "${enable_maintainer_mode+set}" = set; then 592 enableval="$enable_maintainer_mode" 593 maintainer_mode=$enableval 594else 595 maintainer_mode=no 596fi 597 598 599echo "$ac_t""$maintainer_mode" 1>&6 600 601if test "$maintainer_mode" = "yes"; then 602 MAINT='' 603 NOTMAINT='#' 604else 605 MAINT='#' 606 NOTMAINT='' 607fi 608 609# Do we have a single-tree copy of texinfo? Even if we do, we can't 610# rely on it - libiberty is built before texinfo. 611# Extract the first word of "makeinfo", so it can be a program name with args. 612set dummy makeinfo; ac_word=$2 613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 614echo "configure:615: checking for $ac_word" >&5 615if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then 616 echo $ac_n "(cached) $ac_c" 1>&6 617else 618 if test -n "$MAKEINFO"; then 619 ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test. 620else 621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 622 ac_dummy="$PATH" 623 for ac_dir in $ac_dummy; do 624 test -z "$ac_dir" && ac_dir=. 625 if test -f $ac_dir/$ac_word; then 626 ac_cv_prog_MAKEINFO="makeinfo" 627 break 628 fi 629 done 630 IFS="$ac_save_ifs" 631fi 632fi 633MAKEINFO="$ac_cv_prog_MAKEINFO" 634if test -n "$MAKEINFO"; then 635 echo "$ac_t""$MAKEINFO" 1>&6 636else 637 echo "$ac_t""no" 1>&6 638fi 639 640if test "x$MAKEINFO" = "x"; then 641 MAKEINFO="@echo makeinfo missing; true" 642 BUILD_INFO= 643else 644 BUILD_INFO=info 645 case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in 646 x*\ [1-3].* ) 647 MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true" 648 BUILD_INFO= 649 echo "configure: warning: 650*** Makeinfo is too old. Info documentation will not be built." 1>&2 651 ;; 652 esac 653fi 654 655 656 657# Extract the first word of "perl", so it can be a program name with args. 658set dummy perl; ac_word=$2 659echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 660echo "configure:661: checking for $ac_word" >&5 661if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then 662 echo $ac_n "(cached) $ac_c" 1>&6 663else 664 if test -n "$PERL"; then 665 ac_cv_prog_PERL="$PERL" # Let the user override the test. 666else 667 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 668 ac_dummy="$PATH" 669 for ac_dir in $ac_dummy; do 670 test -z "$ac_dir" && ac_dir=. 671 if test -f $ac_dir/$ac_word; then 672 ac_cv_prog_PERL="perl" 673 break 674 fi 675 done 676 IFS="$ac_save_ifs" 677fi 678fi 679PERL="$ac_cv_prog_PERL" 680if test -n "$PERL"; then 681 echo "$ac_t""$PERL" 1>&6 682else 683 echo "$ac_t""no" 1>&6 684fi 685 686if test x"$PERL" = x""; then 687 HAVE_PERL='#' 688else 689 HAVE_PERL='' 690fi 691 692 693 694# Make sure we can run config.sub. 695if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : 696else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } 697fi 698 699echo $ac_n "checking host system type""... $ac_c" 1>&6 700echo "configure:701: checking host system type" >&5 701 702host_alias=$host 703case "$host_alias" in 704NONE) 705 case $nonopt in 706 NONE) 707 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : 708 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } 709 fi ;; 710 *) host_alias=$nonopt ;; 711 esac ;; 712esac 713 714host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` 715host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 716host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 717host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 718echo "$ac_t""$host" 1>&6 719 720 721 722echo $ac_n "checking build system type""... $ac_c" 1>&6 723echo "configure:724: checking build system type" >&5 724 725build_alias=$build 726case "$build_alias" in 727NONE) 728 case $nonopt in 729 NONE) build_alias=$host_alias ;; 730 *) build_alias=$nonopt ;; 731 esac ;; 732esac 733 734build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` 735build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 736build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 737build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 738echo "$ac_t""$build" 1>&6 739 740if test $host != $build; then 741 ac_tool_prefix=${host_alias}- 742else 743 ac_tool_prefix= 744fi 745 746# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 747set dummy ${ac_tool_prefix}ar; ac_word=$2 748echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 749echo "configure:750: checking for $ac_word" >&5 750if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then 751 echo $ac_n "(cached) $ac_c" 1>&6 752else 753 if test -n "$AR"; then 754 ac_cv_prog_AR="$AR" # Let the user override the test. 755else 756 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 757 ac_dummy="$PATH" 758 for ac_dir in $ac_dummy; do 759 test -z "$ac_dir" && ac_dir=. 760 if test -f $ac_dir/$ac_word; then 761 ac_cv_prog_AR="${ac_tool_prefix}ar" 762 break 763 fi 764 done 765 IFS="$ac_save_ifs" 766 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" 767fi 768fi 769AR="$ac_cv_prog_AR" 770if test -n "$AR"; then 771 echo "$ac_t""$AR" 1>&6 772else 773 echo "$ac_t""no" 1>&6 774fi 775 776 777 778# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 779set dummy ${ac_tool_prefix}ranlib; ac_word=$2 780echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 781echo "configure:782: checking for $ac_word" >&5 782if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 783 echo $ac_n "(cached) $ac_c" 1>&6 784else 785 if test -n "$RANLIB"; then 786 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 787else 788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 789 ac_dummy="$PATH" 790 for ac_dir in $ac_dummy; do 791 test -z "$ac_dir" && ac_dir=. 792 if test -f $ac_dir/$ac_word; then 793 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 794 break 795 fi 796 done 797 IFS="$ac_save_ifs" 798fi 799fi 800RANLIB="$ac_cv_prog_RANLIB" 801if test -n "$RANLIB"; then 802 echo "$ac_t""$RANLIB" 1>&6 803else 804 echo "$ac_t""no" 1>&6 805fi 806 807 808if test -z "$ac_cv_prog_RANLIB"; then 809if test -n "$ac_tool_prefix"; then 810 # Extract the first word of "ranlib", so it can be a program name with args. 811set dummy ranlib; ac_word=$2 812echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 813echo "configure:814: checking for $ac_word" >&5 814if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 815 echo $ac_n "(cached) $ac_c" 1>&6 816else 817 if test -n "$RANLIB"; then 818 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 819else 820 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 821 ac_dummy="$PATH" 822 for ac_dir in $ac_dummy; do 823 test -z "$ac_dir" && ac_dir=. 824 if test -f $ac_dir/$ac_word; then 825 ac_cv_prog_RANLIB="ranlib" 826 break 827 fi 828 done 829 IFS="$ac_save_ifs" 830 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" 831fi 832fi 833RANLIB="$ac_cv_prog_RANLIB" 834if test -n "$RANLIB"; then 835 echo "$ac_t""$RANLIB" 1>&6 836else 837 echo "$ac_t""no" 1>&6 838fi 839 840else 841 RANLIB=":" 842fi 843fi 844 845 846 847# Extract the first word of "gcc", so it can be a program name with args. 848set dummy gcc; ac_word=$2 849echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 850echo "configure:851: checking for $ac_word" >&5 851if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 852 echo $ac_n "(cached) $ac_c" 1>&6 853else 854 if test -n "$CC"; then 855 ac_cv_prog_CC="$CC" # Let the user override the test. 856else 857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 858 ac_dummy="$PATH" 859 for ac_dir in $ac_dummy; do 860 test -z "$ac_dir" && ac_dir=. 861 if test -f $ac_dir/$ac_word; then 862 ac_cv_prog_CC="gcc" 863 break 864 fi 865 done 866 IFS="$ac_save_ifs" 867fi 868fi 869CC="$ac_cv_prog_CC" 870if test -n "$CC"; then 871 echo "$ac_t""$CC" 1>&6 872else 873 echo "$ac_t""no" 1>&6 874fi 875 876if test -z "$CC"; then 877 # Extract the first word of "cc", so it can be a program name with args. 878set dummy cc; ac_word=$2 879echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 880echo "configure:881: checking for $ac_word" >&5 881if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 882 echo $ac_n "(cached) $ac_c" 1>&6 883else 884 if test -n "$CC"; then 885 ac_cv_prog_CC="$CC" # Let the user override the test. 886else 887 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 888 ac_prog_rejected=no 889 ac_dummy="$PATH" 890 for ac_dir in $ac_dummy; do 891 test -z "$ac_dir" && ac_dir=. 892 if test -f $ac_dir/$ac_word; then 893 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 894 ac_prog_rejected=yes 895 continue 896 fi 897 ac_cv_prog_CC="cc" 898 break 899 fi 900 done 901 IFS="$ac_save_ifs" 902if test $ac_prog_rejected = yes; then 903 # We found a bogon in the path, so make sure we never use it. 904 set dummy $ac_cv_prog_CC 905 shift 906 if test $# -gt 0; then 907 # We chose a different compiler from the bogus one. 908 # However, it has the same basename, so the bogon will be chosen 909 # first if we set CC to just the basename; use the full file name. 910 shift 911 set dummy "$ac_dir/$ac_word" "$@" 912 shift 913 ac_cv_prog_CC="$@" 914 fi 915fi 916fi 917fi 918CC="$ac_cv_prog_CC" 919if test -n "$CC"; then 920 echo "$ac_t""$CC" 1>&6 921else 922 echo "$ac_t""no" 1>&6 923fi 924 925 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 926fi 927 928echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 929echo "configure:930: checking whether we are using GNU C" >&5 930if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 931 echo $ac_n "(cached) $ac_c" 1>&6 932else 933 cat > conftest.c <<EOF 934#ifdef __GNUC__ 935 yes; 936#endif 937EOF 938if { 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 939 ac_cv_prog_gcc=yes 940else 941 ac_cv_prog_gcc=no 942fi 943fi 944 945echo "$ac_t""$ac_cv_prog_gcc" 1>&6 946 947if test $ac_cv_prog_gcc = yes; then 948 GCC=yes 949 ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic' 950 ac_test_CFLAGS="${CFLAGS+set}" 951 ac_save_CFLAGS="$CFLAGS" 952 CFLAGS= 953 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 954echo "configure:955: checking whether ${CC-cc} accepts -g" >&5 955if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 956 echo $ac_n "(cached) $ac_c" 1>&6 957else 958 echo 'void f(){}' > conftest.c 959if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 960 ac_cv_prog_cc_g=yes 961else 962 ac_cv_prog_cc_g=no 963fi 964rm -f conftest* 965 966fi 967 968echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 969 if test "$ac_test_CFLAGS" = set; then 970 CFLAGS="$ac_save_CFLAGS" 971 elif test $ac_cv_prog_cc_g = yes; then 972 CFLAGS="-g -O2" 973 else 974 CFLAGS="-O2" 975 fi 976else 977 GCC= 978 ac_libiberty_warn_cflags= 979 test "${CFLAGS+set}" = set || CFLAGS="-g" 980fi 981 982 983 984echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 985echo "configure:986: checking for POSIXized ISC" >&5 986if test -d /etc/conf/kconfig.d && 987 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 988then 989 echo "$ac_t""yes" 1>&6 990 ISC=yes # If later tests want to check for ISC. 991 cat >> confdefs.h <<\EOF 992#define _POSIX_SOURCE 1 993EOF 994 995 if test "$GCC" = yes; then 996 CC="$CC -posix" 997 else 998 CC="$CC -Xp" 999 fi 1000else 1001 echo "$ac_t""no" 1>&6 1002 ISC= 1003fi 1004 1005echo $ac_n "checking for working const""... $ac_c" 1>&6 1006echo "configure:1007: checking for working const" >&5 1007if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then 1008 echo $ac_n "(cached) $ac_c" 1>&6 1009else 1010 cat > conftest.$ac_ext <<EOF 1011#line 1012 "configure" 1012#include "confdefs.h" 1013 1014int main() { 1015 1016/* Ultrix mips cc rejects this. */ 1017typedef int charset[2]; const charset x; 1018/* SunOS 4.1.1 cc rejects this. */ 1019char const *const *ccp; 1020char **p; 1021/* NEC SVR4.0.2 mips cc rejects this. */ 1022struct point {int x, y;}; 1023static struct point const zero = {0,0}; 1024/* AIX XL C 1.02.0.0 rejects this. 1025 It does not let you subtract one const X* pointer from another in an arm 1026 of an if-expression whose if-part is not a constant expression */ 1027const char *g = "string"; 1028ccp = &g + (g ? g-g : 0); 1029/* HPUX 7.0 cc rejects these. */ 1030++ccp; 1031p = (char**) ccp; 1032ccp = (char const *const *) p; 1033{ /* SCO 3.2v4 cc rejects this. */ 1034 char *t; 1035 char const *s = 0 ? (char *) 0 : (char const *) 0; 1036 1037 *t++ = 0; 1038} 1039{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ 1040 int x[] = {25, 17}; 1041 const int *foo = &x[0]; 1042 ++foo; 1043} 1044{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ 1045 typedef const int *iptr; 1046 iptr p = 0; 1047 ++p; 1048} 1049{ /* AIX XL C 1.02.0.0 rejects this saying 1050 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ 1051 struct s { int j; const int *ap[3]; }; 1052 struct s *b; b->j = 5; 1053} 1054{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ 1055 const int foo = 10; 1056} 1057 1058; return 0; } 1059EOF 1060if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1061 rm -rf conftest* 1062 ac_cv_c_const=yes 1063else 1064 echo "configure: failed program was:" >&5 1065 cat conftest.$ac_ext >&5 1066 rm -rf conftest* 1067 ac_cv_c_const=no 1068fi 1069rm -f conftest* 1070fi 1071 1072echo "$ac_t""$ac_cv_c_const" 1>&6 1073if test $ac_cv_c_const = no; then 1074 cat >> confdefs.h <<\EOF 1075#define const 1076EOF 1077 1078fi 1079 1080echo $ac_n "checking for inline""... $ac_c" 1>&6 1081echo "configure:1082: checking for inline" >&5 1082if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then 1083 echo $ac_n "(cached) $ac_c" 1>&6 1084else 1085 ac_cv_c_inline=no 1086for ac_kw in inline __inline__ __inline; do 1087 cat > conftest.$ac_ext <<EOF 1088#line 1089 "configure" 1089#include "confdefs.h" 1090 1091int main() { 1092} $ac_kw foo() { 1093; return 0; } 1094EOF 1095if { (eval echo configure:1096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1096 rm -rf conftest* 1097 ac_cv_c_inline=$ac_kw; break 1098else 1099 echo "configure: failed program was:" >&5 1100 cat conftest.$ac_ext >&5 1101fi 1102rm -f conftest* 1103done 1104 1105fi 1106 1107echo "$ac_t""$ac_cv_c_inline" 1>&6 1108case "$ac_cv_c_inline" in 1109 inline | yes) ;; 1110 no) cat >> confdefs.h <<\EOF 1111#define inline 1112EOF 1113 ;; 1114 *) cat >> confdefs.h <<EOF 1115#define inline $ac_cv_c_inline 1116EOF 1117 ;; 1118esac 1119 1120 1121 1122 1123 1124 1125 1126# Find a good install program. We prefer a C program (faster), 1127# so one script is as good as another. But avoid the broken or 1128# incompatible versions: 1129# SysV /etc/install, /usr/sbin/install 1130# SunOS /usr/etc/install 1131# IRIX /sbin/install 1132# AIX /bin/install 1133# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 1134# AFS /usr/afsws/bin/install, which mishandles nonexistent args 1135# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 1136# ./install, which can be erroneously created by make from ./install.sh. 1137echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 1138echo "configure:1139: checking for a BSD compatible install" >&5 1139if test -z "$INSTALL"; then 1140if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then 1141 echo $ac_n "(cached) $ac_c" 1>&6 1142else 1143 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" 1144 for ac_dir in $PATH; do 1145 # Account for people who put trailing slashes in PATH elements. 1146 case "$ac_dir/" in 1147 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; 1148 *) 1149 # OSF1 and SCO ODT 3.0 have their own names for install. 1150 # Don't use installbsd from OSF since it installs stuff as root 1151 # by default. 1152 for ac_prog in ginstall scoinst install; do 1153 if test -f $ac_dir/$ac_prog; then 1154 if test $ac_prog = install && 1155 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then 1156 # AIX install. It has an incompatible calling convention. 1157 : 1158 else 1159 ac_cv_path_install="$ac_dir/$ac_prog -c" 1160 break 2 1161 fi 1162 fi 1163 done 1164 ;; 1165 esac 1166 done 1167 IFS="$ac_save_IFS" 1168 1169fi 1170 if test "${ac_cv_path_install+set}" = set; then 1171 INSTALL="$ac_cv_path_install" 1172 else 1173 # As a last resort, use the slow shell script. We don't cache a 1174 # path for INSTALL within a source directory, because that will 1175 # break other packages using the cache if that directory is 1176 # removed, or if the path is relative. 1177 INSTALL="$ac_install_sh" 1178 fi 1179fi 1180echo "$ac_t""$INSTALL" 1>&6 1181 1182# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 1183# It thinks the first close brace ends the variable substitution. 1184test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 1185 1186test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' 1187 1188test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 1189 1190 1191. ${srcdir}/config.table 1192host_makefile_frag=${frag} 1193 1194 1195# It's OK to check for header files. Although the compiler may not be 1196# able to link anything, it had better be able to at least compile 1197# something. 1198echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1199echo "configure:1200: checking how to run the C preprocessor" >&5 1200# On Suns, sometimes $CPP names a directory. 1201if test -n "$CPP" && test -d "$CPP"; then 1202 CPP= 1203fi 1204if test -z "$CPP"; then 1205if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then 1206 echo $ac_n "(cached) $ac_c" 1>&6 1207else 1208 # This must be in double quotes, not single quotes, because CPP may get 1209 # substituted into the Makefile and "${CC-cc}" will confuse make. 1210 CPP="${CC-cc} -E" 1211 # On the NeXT, cc -E runs the code through the compiler's parser, 1212 # not just through cpp. 1213 cat > conftest.$ac_ext <<EOF 1214#line 1215 "configure" 1215#include "confdefs.h" 1216#include <assert.h> 1217Syntax Error 1218EOF 1219ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1220{ (eval echo configure:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1221ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1222if test -z "$ac_err"; then 1223 : 1224else 1225 echo "$ac_err" >&5 1226 echo "configure: failed program was:" >&5 1227 cat conftest.$ac_ext >&5 1228 rm -rf conftest* 1229 CPP="${CC-cc} -E -traditional-cpp" 1230 cat > conftest.$ac_ext <<EOF 1231#line 1232 "configure" 1232#include "confdefs.h" 1233#include <assert.h> 1234Syntax Error 1235EOF 1236ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1237{ (eval echo configure:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1238ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1239if test -z "$ac_err"; then 1240 : 1241else 1242 echo "$ac_err" >&5 1243 echo "configure: failed program was:" >&5 1244 cat conftest.$ac_ext >&5 1245 rm -rf conftest* 1246 CPP="${CC-cc} -nologo -E" 1247 cat > conftest.$ac_ext <<EOF 1248#line 1249 "configure" 1249#include "confdefs.h" 1250#include <assert.h> 1251Syntax Error 1252EOF 1253ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1254{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1255ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1256if test -z "$ac_err"; then 1257 : 1258else 1259 echo "$ac_err" >&5 1260 echo "configure: failed program was:" >&5 1261 cat conftest.$ac_ext >&5 1262 rm -rf conftest* 1263 CPP=/lib/cpp 1264fi 1265rm -f conftest* 1266fi 1267rm -f conftest* 1268fi 1269rm -f conftest* 1270 ac_cv_prog_CPP="$CPP" 1271fi 1272 CPP="$ac_cv_prog_CPP" 1273else 1274 ac_cv_prog_CPP="$CPP" 1275fi 1276echo "$ac_t""$CPP" 1>&6 1277 1278for 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 1279do 1280ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 1281echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 1282echo "configure:1283: checking for $ac_hdr" >&5 1283if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 1284 echo $ac_n "(cached) $ac_c" 1>&6 1285else 1286 cat > conftest.$ac_ext <<EOF 1287#line 1288 "configure" 1288#include "confdefs.h" 1289#include <$ac_hdr> 1290EOF 1291ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1292{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1293ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1294if test -z "$ac_err"; then 1295 rm -rf conftest* 1296 eval "ac_cv_header_$ac_safe=yes" 1297else 1298 echo "$ac_err" >&5 1299 echo "configure: failed program was:" >&5 1300 cat conftest.$ac_ext >&5 1301 rm -rf conftest* 1302 eval "ac_cv_header_$ac_safe=no" 1303fi 1304rm -f conftest* 1305fi 1306if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 1307 echo "$ac_t""yes" 1>&6 1308 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 1309 cat >> confdefs.h <<EOF 1310#define $ac_tr_hdr 1 1311EOF 1312 1313else 1314 echo "$ac_t""no" 1>&6 1315fi 1316done 1317 1318echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 1319echo "configure:1320: checking for sys/wait.h that is POSIX.1 compatible" >&5 1320if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then 1321 echo $ac_n "(cached) $ac_c" 1>&6 1322else 1323 cat > conftest.$ac_ext <<EOF 1324#line 1325 "configure" 1325#include "confdefs.h" 1326#include <sys/types.h> 1327#include <sys/wait.h> 1328#ifndef WEXITSTATUS 1329#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) 1330#endif 1331#ifndef WIFEXITED 1332#define WIFEXITED(stat_val) (((stat_val) & 255) == 0) 1333#endif 1334int main() { 1335int s; 1336wait (&s); 1337s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; 1338; return 0; } 1339EOF 1340if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1341 rm -rf conftest* 1342 ac_cv_header_sys_wait_h=yes 1343else 1344 echo "configure: failed program was:" >&5 1345 cat conftest.$ac_ext >&5 1346 rm -rf conftest* 1347 ac_cv_header_sys_wait_h=no 1348fi 1349rm -f conftest* 1350fi 1351 1352echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6 1353if test $ac_cv_header_sys_wait_h = yes; then 1354 cat >> confdefs.h <<\EOF 1355#define HAVE_SYS_WAIT_H 1 1356EOF 1357 1358fi 1359 1360echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 1361echo "configure:1362: checking whether time.h and sys/time.h may both be included" >&5 1362if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then 1363 echo $ac_n "(cached) $ac_c" 1>&6 1364else 1365 cat > conftest.$ac_ext <<EOF 1366#line 1367 "configure" 1367#include "confdefs.h" 1368#include <sys/types.h> 1369#include <sys/time.h> 1370#include <time.h> 1371int main() { 1372struct tm *tp; 1373; return 0; } 1374EOF 1375if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1376 rm -rf conftest* 1377 ac_cv_header_time=yes 1378else 1379 echo "configure: failed program was:" >&5 1380 cat conftest.$ac_ext >&5 1381 rm -rf conftest* 1382 ac_cv_header_time=no 1383fi 1384rm -f conftest* 1385fi 1386 1387echo "$ac_t""$ac_cv_header_time" 1>&6 1388if test $ac_cv_header_time = yes; then 1389 cat >> confdefs.h <<\EOF 1390#define TIME_WITH_SYS_TIME 1 1391EOF 1392 1393fi 1394 1395 1396echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6 1397echo "configure:1398: checking whether errno must be declared" >&5 1398if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then 1399 echo $ac_n "(cached) $ac_c" 1>&6 1400else 1401 cat > conftest.$ac_ext <<EOF 1402#line 1403 "configure" 1403#include "confdefs.h" 1404#include <errno.h> 1405int main() { 1406int x = errno; 1407; return 0; } 1408EOF 1409if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1410 rm -rf conftest* 1411 libiberty_cv_declare_errno=no 1412else 1413 echo "configure: failed program was:" >&5 1414 cat conftest.$ac_ext >&5 1415 rm -rf conftest* 1416 libiberty_cv_declare_errno=yes 1417fi 1418rm -f conftest* 1419fi 1420 1421echo "$ac_t""$libiberty_cv_declare_errno" 1>&6 1422if test $libiberty_cv_declare_errno = yes 1423then cat >> confdefs.h <<\EOF 1424#define NEED_DECLARATION_ERRNO 1 1425EOF 1426 1427fi 1428 1429 1430echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 1431echo "configure:1432: checking for ANSI C header files" >&5 1432if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 1433 echo $ac_n "(cached) $ac_c" 1>&6 1434else 1435 cat > conftest.$ac_ext <<EOF 1436#line 1437 "configure" 1437#include "confdefs.h" 1438#include <stdlib.h> 1439#include <stdarg.h> 1440#include <string.h> 1441#include <float.h> 1442EOF 1443ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1444{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1445ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1446if test -z "$ac_err"; then 1447 rm -rf conftest* 1448 ac_cv_header_stdc=yes 1449else 1450 echo "$ac_err" >&5 1451 echo "configure: failed program was:" >&5 1452 cat conftest.$ac_ext >&5 1453 rm -rf conftest* 1454 ac_cv_header_stdc=no 1455fi 1456rm -f conftest* 1457 1458if test $ac_cv_header_stdc = yes; then 1459 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 1460cat > conftest.$ac_ext <<EOF 1461#line 1462 "configure" 1462#include "confdefs.h" 1463#include <string.h> 1464EOF 1465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1466 egrep "memchr" >/dev/null 2>&1; then 1467 : 1468else 1469 rm -rf conftest* 1470 ac_cv_header_stdc=no 1471fi 1472rm -f conftest* 1473 1474fi 1475 1476if test $ac_cv_header_stdc = yes; then 1477 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 1478cat > conftest.$ac_ext <<EOF 1479#line 1480 "configure" 1480#include "confdefs.h" 1481#include <stdlib.h> 1482EOF 1483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1484 egrep "free" >/dev/null 2>&1; then 1485 : 1486else 1487 rm -rf conftest* 1488 ac_cv_header_stdc=no 1489fi 1490rm -f conftest* 1491 1492fi 1493 1494if test $ac_cv_header_stdc = yes; then 1495 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 1496if test "$cross_compiling" = yes; then 1497 : 1498else 1499 cat > conftest.$ac_ext <<EOF 1500#line 1501 "configure" 1501#include "confdefs.h" 1502#include <ctype.h> 1503#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 1504#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 1505#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 1506int main () { int i; for (i = 0; i < 256; i++) 1507if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); 1508exit (0); } 1509 1510EOF 1511if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 1512then 1513 : 1514else 1515 echo "configure: failed program was:" >&5 1516 cat conftest.$ac_ext >&5 1517 rm -fr conftest* 1518 ac_cv_header_stdc=no 1519fi 1520rm -fr conftest* 1521fi 1522 1523fi 1524fi 1525 1526echo "$ac_t""$ac_cv_header_stdc" 1>&6 1527if test $ac_cv_header_stdc = yes; then 1528 cat >> confdefs.h <<\EOF 1529#define STDC_HEADERS 1 1530EOF 1531 1532fi 1533 1534echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6 1535echo "configure:1536: checking for uintptr_t" >&5 1536if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then 1537 echo $ac_n "(cached) $ac_c" 1>&6 1538else 1539 cat > conftest.$ac_ext <<EOF 1540#line 1541 "configure" 1541#include "confdefs.h" 1542#include <sys/types.h> 1543#if STDC_HEADERS 1544#include <stdlib.h> 1545#include <stddef.h> 1546#endif 1547EOF 1548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1549 egrep "(^|[^a-zA-Z_0-9])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then 1550 rm -rf conftest* 1551 ac_cv_type_uintptr_t=yes 1552else 1553 rm -rf conftest* 1554 ac_cv_type_uintptr_t=no 1555fi 1556rm -f conftest* 1557 1558fi 1559echo "$ac_t""$ac_cv_type_uintptr_t" 1>&6 1560if test $ac_cv_type_uintptr_t = no; then 1561 cat >> confdefs.h <<\EOF 1562#define uintptr_t unsigned long 1563EOF 1564 1565fi 1566 1567 1568if test $ac_cv_type_uintptr_t = yes 1569then 1570 cat >> confdefs.h <<\EOF 1571#define HAVE_UINTPTR_T 1 1572EOF 1573 1574fi 1575 1576# This is the list of functions which libiberty will provide if they 1577# are not available on the host. 1578 1579funcs="asprintf" 1580funcs="$funcs atexit" 1581funcs="$funcs basename" 1582funcs="$funcs bcmp" 1583funcs="$funcs bcopy" 1584funcs="$funcs bsearch" 1585funcs="$funcs bzero" 1586funcs="$funcs calloc" 1587funcs="$funcs clock" 1588funcs="$funcs ffs" 1589funcs="$funcs getcwd" 1590funcs="$funcs getpagesize" 1591funcs="$funcs index" 1592funcs="$funcs insque" 1593funcs="$funcs memchr" 1594funcs="$funcs memcmp" 1595funcs="$funcs memcpy" 1596funcs="$funcs memmove" 1597funcs="$funcs memset" 1598funcs="$funcs mkstemps" 1599funcs="$funcs putenv" 1600funcs="$funcs random" 1601funcs="$funcs rename" 1602funcs="$funcs rindex" 1603funcs="$funcs setenv" 1604funcs="$funcs sigsetmask" 1605funcs="$funcs strcasecmp" 1606funcs="$funcs strchr" 1607funcs="$funcs strdup" 1608funcs="$funcs strncasecmp" 1609funcs="$funcs strrchr" 1610funcs="$funcs strstr" 1611funcs="$funcs strtod" 1612funcs="$funcs strtol" 1613funcs="$funcs strtoul" 1614funcs="$funcs tmpnam" 1615funcs="$funcs vasprintf" 1616funcs="$funcs vfprintf" 1617funcs="$funcs vprintf" 1618funcs="$funcs vsprintf" 1619funcs="$funcs waitpid" 1620 1621# Also in the old function.def file: alloca, vfork, getopt. 1622 1623vars="sys_errlist sys_nerr sys_siglist" 1624 1625checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday" 1626 1627# These are neither executed nor required, but they help keep 1628# autoheader happy without adding a bunch of text to acconfig.h. 1629if test "x" = "y"; then 1630 for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock 1631do 1632echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1633echo "configure:1634: checking for $ac_func" >&5 1634if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1635 echo $ac_n "(cached) $ac_c" 1>&6 1636else 1637 cat > conftest.$ac_ext <<EOF 1638#line 1639 "configure" 1639#include "confdefs.h" 1640/* System header to define __stub macros and hopefully few prototypes, 1641 which can conflict with char $ac_func(); below. */ 1642#include <assert.h> 1643/* Override any gcc2 internal prototype to avoid an error. */ 1644/* We use char because int might match the return type of a gcc2 1645 builtin and then its argument prototype would still apply. */ 1646char $ac_func(); 1647 1648int main() { 1649 1650/* The GNU C library defines this for functions which it implements 1651 to always fail with ENOSYS. Some functions are actually named 1652 something starting with __ and the normal name is an alias. */ 1653#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1654choke me 1655#else 1656$ac_func(); 1657#endif 1658 1659; return 0; } 1660EOF 1661if { (eval echo configure:1662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1662 rm -rf conftest* 1663 eval "ac_cv_func_$ac_func=yes" 1664else 1665 echo "configure: failed program was:" >&5 1666 cat conftest.$ac_ext >&5 1667 rm -rf conftest* 1668 eval "ac_cv_func_$ac_func=no" 1669fi 1670rm -f conftest* 1671fi 1672 1673if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1674 echo "$ac_t""yes" 1>&6 1675 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1676 cat >> confdefs.h <<EOF 1677#define $ac_tr_func 1 1678EOF 1679 1680else 1681 echo "$ac_t""no" 1>&6 1682fi 1683done 1684 1685 for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy 1686do 1687echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1688echo "configure:1689: checking for $ac_func" >&5 1689if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1690 echo $ac_n "(cached) $ac_c" 1>&6 1691else 1692 cat > conftest.$ac_ext <<EOF 1693#line 1694 "configure" 1694#include "confdefs.h" 1695/* System header to define __stub macros and hopefully few prototypes, 1696 which can conflict with char $ac_func(); below. */ 1697#include <assert.h> 1698/* Override any gcc2 internal prototype to avoid an error. */ 1699/* We use char because int might match the return type of a gcc2 1700 builtin and then its argument prototype would still apply. */ 1701char $ac_func(); 1702 1703int main() { 1704 1705/* The GNU C library defines this for functions which it implements 1706 to always fail with ENOSYS. Some functions are actually named 1707 something starting with __ and the normal name is an alias. */ 1708#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1709choke me 1710#else 1711$ac_func(); 1712#endif 1713 1714; return 0; } 1715EOF 1716if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1717 rm -rf conftest* 1718 eval "ac_cv_func_$ac_func=yes" 1719else 1720 echo "configure: failed program was:" >&5 1721 cat conftest.$ac_ext >&5 1722 rm -rf conftest* 1723 eval "ac_cv_func_$ac_func=no" 1724fi 1725rm -f conftest* 1726fi 1727 1728if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1729 echo "$ac_t""yes" 1>&6 1730 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1731 cat >> confdefs.h <<EOF 1732#define $ac_tr_func 1 1733EOF 1734 1735else 1736 echo "$ac_t""no" 1>&6 1737fi 1738done 1739 1740 for ac_func in memmove memset putenv random rename rindex sigsetmask 1741do 1742echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1743echo "configure:1744: checking for $ac_func" >&5 1744if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1745 echo $ac_n "(cached) $ac_c" 1>&6 1746else 1747 cat > conftest.$ac_ext <<EOF 1748#line 1749 "configure" 1749#include "confdefs.h" 1750/* System header to define __stub macros and hopefully few prototypes, 1751 which can conflict with char $ac_func(); below. */ 1752#include <assert.h> 1753/* Override any gcc2 internal prototype to avoid an error. */ 1754/* We use char because int might match the return type of a gcc2 1755 builtin and then its argument prototype would still apply. */ 1756char $ac_func(); 1757 1758int main() { 1759 1760/* The GNU C library defines this for functions which it implements 1761 to always fail with ENOSYS. Some functions are actually named 1762 something starting with __ and the normal name is an alias. */ 1763#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1764choke me 1765#else 1766$ac_func(); 1767#endif 1768 1769; return 0; } 1770EOF 1771if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1772 rm -rf conftest* 1773 eval "ac_cv_func_$ac_func=yes" 1774else 1775 echo "configure: failed program was:" >&5 1776 cat conftest.$ac_ext >&5 1777 rm -rf conftest* 1778 eval "ac_cv_func_$ac_func=no" 1779fi 1780rm -f conftest* 1781fi 1782 1783if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1784 echo "$ac_t""yes" 1>&6 1785 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1786 cat >> confdefs.h <<EOF 1787#define $ac_tr_func 1 1788EOF 1789 1790else 1791 echo "$ac_t""no" 1>&6 1792fi 1793done 1794 1795 for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr 1796do 1797echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1798echo "configure:1799: checking for $ac_func" >&5 1799if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1800 echo $ac_n "(cached) $ac_c" 1>&6 1801else 1802 cat > conftest.$ac_ext <<EOF 1803#line 1804 "configure" 1804#include "confdefs.h" 1805/* System header to define __stub macros and hopefully few prototypes, 1806 which can conflict with char $ac_func(); below. */ 1807#include <assert.h> 1808/* Override any gcc2 internal prototype to avoid an error. */ 1809/* We use char because int might match the return type of a gcc2 1810 builtin and then its argument prototype would still apply. */ 1811char $ac_func(); 1812 1813int main() { 1814 1815/* The GNU C library defines this for functions which it implements 1816 to always fail with ENOSYS. Some functions are actually named 1817 something starting with __ and the normal name is an alias. */ 1818#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1819choke me 1820#else 1821$ac_func(); 1822#endif 1823 1824; return 0; } 1825EOF 1826if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1827 rm -rf conftest* 1828 eval "ac_cv_func_$ac_func=yes" 1829else 1830 echo "configure: failed program was:" >&5 1831 cat conftest.$ac_ext >&5 1832 rm -rf conftest* 1833 eval "ac_cv_func_$ac_func=no" 1834fi 1835rm -f conftest* 1836fi 1837 1838if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1839 echo "$ac_t""yes" 1>&6 1840 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1841 cat >> confdefs.h <<EOF 1842#define $ac_tr_func 1 1843EOF 1844 1845else 1846 echo "$ac_t""no" 1>&6 1847fi 1848done 1849 1850 for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf 1851do 1852echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1853echo "configure:1854: checking for $ac_func" >&5 1854if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1855 echo $ac_n "(cached) $ac_c" 1>&6 1856else 1857 cat > conftest.$ac_ext <<EOF 1858#line 1859 "configure" 1859#include "confdefs.h" 1860/* System header to define __stub macros and hopefully few prototypes, 1861 which can conflict with char $ac_func(); below. */ 1862#include <assert.h> 1863/* Override any gcc2 internal prototype to avoid an error. */ 1864/* We use char because int might match the return type of a gcc2 1865 builtin and then its argument prototype would still apply. */ 1866char $ac_func(); 1867 1868int main() { 1869 1870/* The GNU C library defines this for functions which it implements 1871 to always fail with ENOSYS. Some functions are actually named 1872 something starting with __ and the normal name is an alias. */ 1873#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1874choke me 1875#else 1876$ac_func(); 1877#endif 1878 1879; return 0; } 1880EOF 1881if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1882 rm -rf conftest* 1883 eval "ac_cv_func_$ac_func=yes" 1884else 1885 echo "configure: failed program was:" >&5 1886 cat conftest.$ac_ext >&5 1887 rm -rf conftest* 1888 eval "ac_cv_func_$ac_func=no" 1889fi 1890rm -f conftest* 1891fi 1892 1893if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1894 echo "$ac_t""yes" 1>&6 1895 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1896 cat >> confdefs.h <<EOF 1897#define $ac_tr_func 1 1898EOF 1899 1900else 1901 echo "$ac_t""no" 1>&6 1902fi 1903done 1904 1905 for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal 1906do 1907echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1908echo "configure:1909: checking for $ac_func" >&5 1909if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1910 echo $ac_n "(cached) $ac_c" 1>&6 1911else 1912 cat > conftest.$ac_ext <<EOF 1913#line 1914 "configure" 1914#include "confdefs.h" 1915/* System header to define __stub macros and hopefully few prototypes, 1916 which can conflict with char $ac_func(); below. */ 1917#include <assert.h> 1918/* Override any gcc2 internal prototype to avoid an error. */ 1919/* We use char because int might match the return type of a gcc2 1920 builtin and then its argument prototype would still apply. */ 1921char $ac_func(); 1922 1923int main() { 1924 1925/* The GNU C library defines this for functions which it implements 1926 to always fail with ENOSYS. Some functions are actually named 1927 something starting with __ and the normal name is an alias. */ 1928#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1929choke me 1930#else 1931$ac_func(); 1932#endif 1933 1934; return 0; } 1935EOF 1936if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1937 rm -rf conftest* 1938 eval "ac_cv_func_$ac_func=yes" 1939else 1940 echo "configure: failed program was:" >&5 1941 cat conftest.$ac_ext >&5 1942 rm -rf conftest* 1943 eval "ac_cv_func_$ac_func=no" 1944fi 1945rm -f conftest* 1946fi 1947 1948if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 1949 echo "$ac_t""yes" 1>&6 1950 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 1951 cat >> confdefs.h <<EOF 1952#define $ac_tr_func 1 1953EOF 1954 1955else 1956 echo "$ac_t""no" 1>&6 1957fi 1958done 1959 1960 for ac_func in sysconf times sbrk gettimeofday ffs 1961do 1962echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 1963echo "configure:1964: checking for $ac_func" >&5 1964if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 1965 echo $ac_n "(cached) $ac_c" 1>&6 1966else 1967 cat > conftest.$ac_ext <<EOF 1968#line 1969 "configure" 1969#include "confdefs.h" 1970/* System header to define __stub macros and hopefully few prototypes, 1971 which can conflict with char $ac_func(); below. */ 1972#include <assert.h> 1973/* Override any gcc2 internal prototype to avoid an error. */ 1974/* We use char because int might match the return type of a gcc2 1975 builtin and then its argument prototype would still apply. */ 1976char $ac_func(); 1977 1978int main() { 1979 1980/* The GNU C library defines this for functions which it implements 1981 to always fail with ENOSYS. Some functions are actually named 1982 something starting with __ and the normal name is an alias. */ 1983#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 1984choke me 1985#else 1986$ac_func(); 1987#endif 1988 1989; return 0; } 1990EOF 1991if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1992 rm -rf conftest* 1993 eval "ac_cv_func_$ac_func=yes" 1994else 1995 echo "configure: failed program was:" >&5 1996 cat conftest.$ac_ext >&5 1997 rm -rf conftest* 1998 eval "ac_cv_func_$ac_func=no" 1999fi 2000rm -f conftest* 2001fi 2002 2003if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2004 echo "$ac_t""yes" 1>&6 2005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2006 cat >> confdefs.h <<EOF 2007#define $ac_tr_func 1 2008EOF 2009 2010else 2011 echo "$ac_t""no" 1>&6 2012fi 2013done 2014 2015 cat >> confdefs.h <<\EOF 2016#define HAVE_SYS_ERRLIST 1 2017EOF 2018 2019 cat >> confdefs.h <<\EOF 2020#define HAVE_SYS_NERR 1 2021EOF 2022 2023 cat >> confdefs.h <<\EOF 2024#define HAVE_SYS_SIGLIST 1 2025EOF 2026 2027fi 2028 2029# For each of these functions, if the host does not provide the 2030# function we want to put FN.o in LIBOBJS, and if the host does 2031# provide the function, we want to define HAVE_FN in config.h. 2032 2033setobjs= 2034CHECK= 2035if test -n "${with_target_subdir}"; then 2036 2037 # We are being configured as a target library. AC_REPLACE_FUNCS 2038 # may not work correctly, because the compiler may not be able to 2039 # link executables. Note that we may still be being configured 2040 # native. 2041 2042 # If we are being configured for newlib, we know which functions 2043 # newlib provide and which ones we will be expected to provide. 2044 2045 if test "x${with_newlib}" = "xyes"; then 2046 LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o" 2047 2048 for f in $funcs; do 2049 case "$f" in 2050 asprintf | basename | insque | random | strdup | vasprintf) 2051 ;; 2052 *) 2053 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2054 cat >> confdefs.h <<EOF 2055#define $n 1 2056EOF 2057 2058 ;; 2059 esac 2060 done 2061 2062 # newlib doesnt provide any of the variables in $vars, so we 2063 # dont have to check them here. 2064 2065 # Of the functions in $checkfuncs, newlib only has strerror. 2066 cat >> confdefs.h <<\EOF 2067#define HAVE_STRERROR 1 2068EOF 2069 2070 2071 setobjs=yes 2072 2073 fi 2074 2075else 2076 2077 # Not a target library, so we set things up to run the test suite. 2078 CHECK=check-cplus-dem 2079 2080fi 2081 2082 2083 2084case "${host}" in 2085 *-*-cygwin* | *-*-mingw*) 2086 cat >> confdefs.h <<\EOF 2087#define HAVE_SYS_ERRLIST 1 2088EOF 2089 2090 cat >> confdefs.h <<\EOF 2091#define HAVE_SYS_NERR 1 2092EOF 2093 2094 ;; 2095esac 2096 2097if test -z "${setobjs}"; then 2098 case "${host}" in 2099 2100 *-*-vxworks*) 2101 # Handle VxWorks configuration specially, since on VxWorks the 2102 # libraries are actually on the target board, not in the file 2103 # system. 2104 LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o" 2105 LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o" 2106 for f in $funcs; do 2107 case "$f" in 2108 basename | getpagesize | insque | random | strcasecmp) 2109 ;; 2110 strncasecmp | strdup | vfork | waitpid | vasprintf) 2111 ;; 2112 *) 2113 n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2114 cat >> confdefs.h <<EOF 2115#define $n 1 2116EOF 2117 2118 ;; 2119 esac 2120 done 2121 2122 # VxWorks doesn't provide any of the variables in $vars, so we 2123 # don't have to check them here. 2124 2125 # Of the functions in $checkfuncs, VxWorks only has strerror. 2126 cat >> confdefs.h <<\EOF 2127#define HAVE_STRERROR 1 2128EOF 2129 2130 2131 setobjs=yes 2132 ;; 2133 2134 esac 2135fi 2136 2137if test -z "${setobjs}"; then 2138 2139 case "${host}" in 2140 2141 *-*-cygwin*) 2142 # The Cygwin library actually uses a couple of files from 2143 # libiberty when it is built. If we are building a native 2144 # Cygwin, and we run the tests, we will appear to have these 2145 # files. However, when we go on to build winsup, we will wind up 2146 # with a library which does not have the files, since they should 2147 # have come from libiberty. 2148 2149 # We handle this by removing the functions the winsup library 2150 # provides from our shell variables, so that they appear to be 2151 # missing. 2152 2153 # DJ - only if we're *building* cygwin, not just building *with* cygwin 2154 2155 if test -n "${with_target_subdir}" 2156 then 2157 funcs="`echo $funcs | sed -e 's/random//'`" 2158 LIBOBJS="$LIBOBJS random.o" 2159 vars="`echo $vars | sed -e 's/sys_siglist//'`" 2160 checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" 2161 fi 2162 ;; 2163 2164 *-*-mingw32*) 2165 # Under mingw32, sys_nerr and sys_errlist exist, but they are 2166 # macros, so the test below won't find them. 2167 libiberty_cv_var_sys_nerr=yes 2168 libiberty_cv_var_sys_errlist=yes 2169 ;; 2170 2171 *-*-uwin*) 2172 # Under some versions of uwin, vfork is notoriously buggy and the test 2173 # can hang configure; on other versions, vfork exists just as a stub. 2174 # FIXME: This should be removed once vfork in uwin's runtime is fixed. 2175 ac_cv_func_vfork_works=no 2176 # Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are 2177 # macros (actually, these are imported from a DLL, but the end effect 2178 # is the same), so the test below won't find them. 2179 libiberty_cv_var_sys_nerr=yes 2180 libiberty_cv_var_sys_errlist=yes 2181 ;; 2182 2183 *-*-*vms*) 2184 # Under VMS, vfork works very different than on Unix. The standard test 2185 # won't work, and it isn't easily adaptable. It makes more sense to 2186 # just force it. 2187 ac_cv_func_vfork_works=yes 2188 ;; 2189 2190 esac 2191 2192 # We haven't set the list of objects yet. Use the standard autoconf 2193 # tests. This will only work if the compiler works. 2194 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 2195echo "configure:2196: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 2196 2197ac_ext=c 2198# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 2199ac_cpp='$CPP $CPPFLAGS' 2200ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 2201ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 2202cross_compiling=$ac_cv_prog_cc_cross 2203 2204cat > conftest.$ac_ext << EOF 2205 2206#line 2207 "configure" 2207#include "confdefs.h" 2208 2209main(){return(0);} 2210EOF 2211if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2212 ac_cv_prog_cc_works=yes 2213 # If we can't run a trivial program, we are probably using a cross compiler. 2214 if (./conftest; exit) 2>/dev/null; then 2215 ac_cv_prog_cc_cross=no 2216 else 2217 ac_cv_prog_cc_cross=yes 2218 fi 2219else 2220 echo "configure: failed program was:" >&5 2221 cat conftest.$ac_ext >&5 2222 ac_cv_prog_cc_works=no 2223fi 2224rm -fr conftest* 2225ac_ext=c 2226# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 2227ac_cpp='$CPP $CPPFLAGS' 2228ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 2229ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 2230cross_compiling=$ac_cv_prog_cc_cross 2231 2232echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 2233if test $ac_cv_prog_cc_works = no; then 2234 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } 2235fi 2236echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 2237echo "configure:2238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 2238echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 2239cross_compiling=$ac_cv_prog_cc_cross 2240 2241 for ac_func in $funcs 2242do 2243echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2244echo "configure:2245: checking for $ac_func" >&5 2245if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2246 echo $ac_n "(cached) $ac_c" 1>&6 2247else 2248 cat > conftest.$ac_ext <<EOF 2249#line 2250 "configure" 2250#include "confdefs.h" 2251/* System header to define __stub macros and hopefully few prototypes, 2252 which can conflict with char $ac_func(); below. */ 2253#include <assert.h> 2254/* Override any gcc2 internal prototype to avoid an error. */ 2255/* We use char because int might match the return type of a gcc2 2256 builtin and then its argument prototype would still apply. */ 2257char $ac_func(); 2258 2259int main() { 2260 2261/* The GNU C library defines this for functions which it implements 2262 to always fail with ENOSYS. Some functions are actually named 2263 something starting with __ and the normal name is an alias. */ 2264#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2265choke me 2266#else 2267$ac_func(); 2268#endif 2269 2270; return 0; } 2271EOF 2272if { (eval echo configure:2273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2273 rm -rf conftest* 2274 eval "ac_cv_func_$ac_func=yes" 2275else 2276 echo "configure: failed program was:" >&5 2277 cat conftest.$ac_ext >&5 2278 rm -rf conftest* 2279 eval "ac_cv_func_$ac_func=no" 2280fi 2281rm -f conftest* 2282fi 2283 2284if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2285 echo "$ac_t""yes" 1>&6 2286 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2287 cat >> confdefs.h <<EOF 2288#define $ac_tr_func 1 2289EOF 2290 2291else 2292 echo "$ac_t""no" 1>&6 2293LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" 2294fi 2295done 2296 2297 2298 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 2299echo "configure:2300: checking whether alloca needs Cray hooks" >&5 2300if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then 2301 echo $ac_n "(cached) $ac_c" 1>&6 2302else 2303 cat > conftest.$ac_ext <<EOF 2304#line 2305 "configure" 2305#include "confdefs.h" 2306#if defined(CRAY) && ! defined(CRAY2) 2307webecray 2308#else 2309wenotbecray 2310#endif 2311 2312EOF 2313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2314 egrep "webecray" >/dev/null 2>&1; then 2315 rm -rf conftest* 2316 ac_cv_os_cray=yes 2317else 2318 rm -rf conftest* 2319 ac_cv_os_cray=no 2320fi 2321rm -f conftest* 2322 2323fi 2324 2325echo "$ac_t""$ac_cv_os_cray" 1>&6 2326if test $ac_cv_os_cray = yes; then 2327 for ac_func in _getb67 GETB67 getb67; do 2328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2329echo "configure:2330: checking for $ac_func" >&5 2330if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2331 echo $ac_n "(cached) $ac_c" 1>&6 2332else 2333 cat > conftest.$ac_ext <<EOF 2334#line 2335 "configure" 2335#include "confdefs.h" 2336/* System header to define __stub macros and hopefully few prototypes, 2337 which can conflict with char $ac_func(); below. */ 2338#include <assert.h> 2339/* Override any gcc2 internal prototype to avoid an error. */ 2340/* We use char because int might match the return type of a gcc2 2341 builtin and then its argument prototype would still apply. */ 2342char $ac_func(); 2343 2344int main() { 2345 2346/* The GNU C library defines this for functions which it implements 2347 to always fail with ENOSYS. Some functions are actually named 2348 something starting with __ and the normal name is an alias. */ 2349#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2350choke me 2351#else 2352$ac_func(); 2353#endif 2354 2355; return 0; } 2356EOF 2357if { (eval echo configure:2358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2358 rm -rf conftest* 2359 eval "ac_cv_func_$ac_func=yes" 2360else 2361 echo "configure: failed program was:" >&5 2362 cat conftest.$ac_ext >&5 2363 rm -rf conftest* 2364 eval "ac_cv_func_$ac_func=no" 2365fi 2366rm -f conftest* 2367fi 2368 2369if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2370 echo "$ac_t""yes" 1>&6 2371 cat >> confdefs.h <<EOF 2372#define CRAY_STACKSEG_END $ac_func 2373EOF 2374 break 2375else 2376 echo "$ac_t""no" 1>&6 2377fi 2378 2379 done 2380fi 2381 2382echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 2383echo "configure:2384: checking stack direction for C alloca" >&5 2384if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then 2385 echo $ac_n "(cached) $ac_c" 1>&6 2386else 2387 if test "$cross_compiling" = yes; then 2388 ac_cv_c_stack_direction=0 2389else 2390 cat > conftest.$ac_ext <<EOF 2391#line 2392 "configure" 2392#include "confdefs.h" 2393find_stack_direction () 2394{ 2395 static char *addr = 0; 2396 auto char dummy; 2397 if (addr == 0) 2398 { 2399 addr = &dummy; 2400 return find_stack_direction (); 2401 } 2402 else 2403 return (&dummy > addr) ? 1 : -1; 2404} 2405main () 2406{ 2407 exit (find_stack_direction() < 0); 2408} 2409EOF 2410if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2411then 2412 ac_cv_c_stack_direction=1 2413else 2414 echo "configure: failed program was:" >&5 2415 cat conftest.$ac_ext >&5 2416 rm -fr conftest* 2417 ac_cv_c_stack_direction=-1 2418fi 2419rm -fr conftest* 2420fi 2421 2422fi 2423 2424echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 2425cat >> confdefs.h <<EOF 2426#define STACK_DIRECTION $ac_cv_c_stack_direction 2427EOF 2428 2429 2430 echo $ac_n "checking for pid_t""... $ac_c" 1>&6 2431echo "configure:2432: checking for pid_t" >&5 2432if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then 2433 echo $ac_n "(cached) $ac_c" 1>&6 2434else 2435 cat > conftest.$ac_ext <<EOF 2436#line 2437 "configure" 2437#include "confdefs.h" 2438#include <sys/types.h> 2439#if STDC_HEADERS 2440#include <stdlib.h> 2441#include <stddef.h> 2442#endif 2443EOF 2444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 2445 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then 2446 rm -rf conftest* 2447 ac_cv_type_pid_t=yes 2448else 2449 rm -rf conftest* 2450 ac_cv_type_pid_t=no 2451fi 2452rm -f conftest* 2453 2454fi 2455echo "$ac_t""$ac_cv_type_pid_t" 1>&6 2456if test $ac_cv_type_pid_t = no; then 2457 cat >> confdefs.h <<\EOF 2458#define pid_t int 2459EOF 2460 2461fi 2462 2463ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` 2464echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 2465echo "configure:2466: checking for vfork.h" >&5 2466if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 2467 echo $ac_n "(cached) $ac_c" 1>&6 2468else 2469 cat > conftest.$ac_ext <<EOF 2470#line 2471 "configure" 2471#include "confdefs.h" 2472#include <vfork.h> 2473EOF 2474ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2475{ (eval echo configure:2476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2476ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2477if test -z "$ac_err"; then 2478 rm -rf conftest* 2479 eval "ac_cv_header_$ac_safe=yes" 2480else 2481 echo "$ac_err" >&5 2482 echo "configure: failed program was:" >&5 2483 cat conftest.$ac_ext >&5 2484 rm -rf conftest* 2485 eval "ac_cv_header_$ac_safe=no" 2486fi 2487rm -f conftest* 2488fi 2489if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 2490 echo "$ac_t""yes" 1>&6 2491 cat >> confdefs.h <<\EOF 2492#define HAVE_VFORK_H 1 2493EOF 2494 2495else 2496 echo "$ac_t""no" 1>&6 2497fi 2498 2499echo $ac_n "checking for working vfork""... $ac_c" 1>&6 2500echo "configure:2501: checking for working vfork" >&5 2501if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then 2502 echo $ac_n "(cached) $ac_c" 1>&6 2503else 2504 if test "$cross_compiling" = yes; then 2505 echo $ac_n "checking for vfork""... $ac_c" 1>&6 2506echo "configure:2507: checking for vfork" >&5 2507if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then 2508 echo $ac_n "(cached) $ac_c" 1>&6 2509else 2510 cat > conftest.$ac_ext <<EOF 2511#line 2512 "configure" 2512#include "confdefs.h" 2513/* System header to define __stub macros and hopefully few prototypes, 2514 which can conflict with char vfork(); below. */ 2515#include <assert.h> 2516/* Override any gcc2 internal prototype to avoid an error. */ 2517/* We use char because int might match the return type of a gcc2 2518 builtin and then its argument prototype would still apply. */ 2519char vfork(); 2520 2521int main() { 2522 2523/* The GNU C library defines this for functions which it implements 2524 to always fail with ENOSYS. Some functions are actually named 2525 something starting with __ and the normal name is an alias. */ 2526#if defined (__stub_vfork) || defined (__stub___vfork) 2527choke me 2528#else 2529vfork(); 2530#endif 2531 2532; return 0; } 2533EOF 2534if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2535 rm -rf conftest* 2536 eval "ac_cv_func_vfork=yes" 2537else 2538 echo "configure: failed program was:" >&5 2539 cat conftest.$ac_ext >&5 2540 rm -rf conftest* 2541 eval "ac_cv_func_vfork=no" 2542fi 2543rm -f conftest* 2544fi 2545 2546if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then 2547 echo "$ac_t""yes" 1>&6 2548 : 2549else 2550 echo "$ac_t""no" 1>&6 2551fi 2552 2553ac_cv_func_vfork_works=$ac_cv_func_vfork 2554else 2555 cat > conftest.$ac_ext <<EOF 2556#line 2557 "configure" 2557#include "confdefs.h" 2558/* Thanks to Paul Eggert for this test. */ 2559#include <stdio.h> 2560#include <sys/types.h> 2561#include <sys/stat.h> 2562#ifdef HAVE_UNISTD_H 2563#include <unistd.h> 2564#endif 2565#ifdef HAVE_VFORK_H 2566#include <vfork.h> 2567#endif 2568/* On some sparc systems, changes by the child to local and incoming 2569 argument registers are propagated back to the parent. 2570 The compiler is told about this with #include <vfork.h>, 2571 but some compilers (e.g. gcc -O) don't grok <vfork.h>. 2572 Test for this by using a static variable whose address 2573 is put into a register that is clobbered by the vfork. */ 2574static 2575#ifdef __cplusplus 2576sparc_address_test (int arg) 2577#else 2578sparc_address_test (arg) int arg; 2579#endif 2580{ 2581 static pid_t child; 2582 if (!child) { 2583 child = vfork (); 2584 if (child < 0) { 2585 perror ("vfork"); 2586 _exit(2); 2587 } 2588 if (!child) { 2589 arg = getpid(); 2590 write(-1, "", 0); 2591 _exit (arg); 2592 } 2593 } 2594} 2595main() { 2596 pid_t parent = getpid (); 2597 pid_t child; 2598 2599 sparc_address_test (); 2600 2601 child = vfork (); 2602 2603 if (child == 0) { 2604 /* Here is another test for sparc vfork register problems. 2605 This test uses lots of local variables, at least 2606 as many local variables as main has allocated so far 2607 including compiler temporaries. 4 locals are enough for 2608 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. 2609 A buggy compiler should reuse the register of parent 2610 for one of the local variables, since it will think that 2611 parent can't possibly be used any more in this routine. 2612 Assigning to the local variable will thus munge parent 2613 in the parent process. */ 2614 pid_t 2615 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), 2616 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); 2617 /* Convince the compiler that p..p7 are live; otherwise, it might 2618 use the same hardware register for all 8 local variables. */ 2619 if (p != p1 || p != p2 || p != p3 || p != p4 2620 || p != p5 || p != p6 || p != p7) 2621 _exit(1); 2622 2623 /* On some systems (e.g. IRIX 3.3), 2624 vfork doesn't separate parent from child file descriptors. 2625 If the child closes a descriptor before it execs or exits, 2626 this munges the parent's descriptor as well. 2627 Test for this by closing stdout in the child. */ 2628 _exit(close(fileno(stdout)) != 0); 2629 } else { 2630 int status; 2631 struct stat st; 2632 2633 while (wait(&status) != child) 2634 ; 2635 exit( 2636 /* Was there some problem with vforking? */ 2637 child < 0 2638 2639 /* Did the child fail? (This shouldn't happen.) */ 2640 || status 2641 2642 /* Did the vfork/compiler bug occur? */ 2643 || parent != getpid() 2644 2645 /* Did the file descriptor bug occur? */ 2646 || fstat(fileno(stdout), &st) != 0 2647 ); 2648 } 2649} 2650EOF 2651if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2652then 2653 ac_cv_func_vfork_works=yes 2654else 2655 echo "configure: failed program was:" >&5 2656 cat conftest.$ac_ext >&5 2657 rm -fr conftest* 2658 ac_cv_func_vfork_works=no 2659fi 2660rm -fr conftest* 2661fi 2662 2663fi 2664 2665echo "$ac_t""$ac_cv_func_vfork_works" 1>&6 2666if test $ac_cv_func_vfork_works = no; then 2667 cat >> confdefs.h <<\EOF 2668#define vfork fork 2669EOF 2670 2671fi 2672 2673 if test $ac_cv_func_vfork_works = no; then 2674 LIBOBJS="$LIBOBJS vfork.o" 2675 fi 2676 # We only need _doprnt if we might use it to implement v*printf. 2677 if test $ac_cv_func_vprintf != yes \ 2678 || test $ac_cv_func_vfprintf != yes \ 2679 || test $ac_cv_func_vsprintf != yes; then 2680 for ac_func in _doprnt 2681do 2682echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2683echo "configure:2684: checking for $ac_func" >&5 2684if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2685 echo $ac_n "(cached) $ac_c" 1>&6 2686else 2687 cat > conftest.$ac_ext <<EOF 2688#line 2689 "configure" 2689#include "confdefs.h" 2690/* System header to define __stub macros and hopefully few prototypes, 2691 which can conflict with char $ac_func(); below. */ 2692#include <assert.h> 2693/* Override any gcc2 internal prototype to avoid an error. */ 2694/* We use char because int might match the return type of a gcc2 2695 builtin and then its argument prototype would still apply. */ 2696char $ac_func(); 2697 2698int main() { 2699 2700/* The GNU C library defines this for functions which it implements 2701 to always fail with ENOSYS. Some functions are actually named 2702 something starting with __ and the normal name is an alias. */ 2703#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2704choke me 2705#else 2706$ac_func(); 2707#endif 2708 2709; return 0; } 2710EOF 2711if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2712 rm -rf conftest* 2713 eval "ac_cv_func_$ac_func=yes" 2714else 2715 echo "configure: failed program was:" >&5 2716 cat conftest.$ac_ext >&5 2717 rm -rf conftest* 2718 eval "ac_cv_func_$ac_func=no" 2719fi 2720rm -f conftest* 2721fi 2722 2723if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2724 echo "$ac_t""yes" 1>&6 2725 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2726 cat >> confdefs.h <<EOF 2727#define $ac_tr_func 1 2728EOF 2729 2730else 2731 echo "$ac_t""no" 1>&6 2732LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" 2733fi 2734done 2735 2736 2737 else 2738 for ac_func in _doprnt 2739do 2740echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2741echo "configure:2742: checking for $ac_func" >&5 2742if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2743 echo $ac_n "(cached) $ac_c" 1>&6 2744else 2745 cat > conftest.$ac_ext <<EOF 2746#line 2747 "configure" 2747#include "confdefs.h" 2748/* System header to define __stub macros and hopefully few prototypes, 2749 which can conflict with char $ac_func(); below. */ 2750#include <assert.h> 2751/* Override any gcc2 internal prototype to avoid an error. */ 2752/* We use char because int might match the return type of a gcc2 2753 builtin and then its argument prototype would still apply. */ 2754char $ac_func(); 2755 2756int main() { 2757 2758/* The GNU C library defines this for functions which it implements 2759 to always fail with ENOSYS. Some functions are actually named 2760 something starting with __ and the normal name is an alias. */ 2761#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2762choke me 2763#else 2764$ac_func(); 2765#endif 2766 2767; return 0; } 2768EOF 2769if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2770 rm -rf conftest* 2771 eval "ac_cv_func_$ac_func=yes" 2772else 2773 echo "configure: failed program was:" >&5 2774 cat conftest.$ac_ext >&5 2775 rm -rf conftest* 2776 eval "ac_cv_func_$ac_func=no" 2777fi 2778rm -f conftest* 2779fi 2780 2781if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2782 echo "$ac_t""yes" 1>&6 2783 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2784 cat >> confdefs.h <<EOF 2785#define $ac_tr_func 1 2786EOF 2787 2788else 2789 echo "$ac_t""no" 1>&6 2790fi 2791done 2792 2793 fi 2794 2795 for v in $vars; do 2796 echo $ac_n "checking for $v""... $ac_c" 1>&6 2797echo "configure:2798: checking for $v" >&5 2798 if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then 2799 echo $ac_n "(cached) $ac_c" 1>&6 2800else 2801 cat > conftest.$ac_ext <<EOF 2802#line 2803 "configure" 2803#include "confdefs.h" 2804int *p; 2805int main() { 2806extern int $v []; p = &$v; 2807; return 0; } 2808EOF 2809if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2810 rm -rf conftest* 2811 eval "libiberty_cv_var_$v=yes" 2812else 2813 echo "configure: failed program was:" >&5 2814 cat conftest.$ac_ext >&5 2815 rm -rf conftest* 2816 eval "libiberty_cv_var_$v=no" 2817fi 2818rm -f conftest* 2819fi 2820 2821 if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then 2822 echo "$ac_t""yes" 1>&6 2823 n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2824 cat >> confdefs.h <<EOF 2825#define $n 1 2826EOF 2827 2828 else 2829 echo "$ac_t""no" 1>&6 2830 fi 2831 done 2832 for ac_func in $checkfuncs 2833do 2834echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2835echo "configure:2836: checking for $ac_func" >&5 2836if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2837 echo $ac_n "(cached) $ac_c" 1>&6 2838else 2839 cat > conftest.$ac_ext <<EOF 2840#line 2841 "configure" 2841#include "confdefs.h" 2842/* System header to define __stub macros and hopefully few prototypes, 2843 which can conflict with char $ac_func(); below. */ 2844#include <assert.h> 2845/* Override any gcc2 internal prototype to avoid an error. */ 2846/* We use char because int might match the return type of a gcc2 2847 builtin and then its argument prototype would still apply. */ 2848char $ac_func(); 2849 2850int main() { 2851 2852/* The GNU C library defines this for functions which it implements 2853 to always fail with ENOSYS. Some functions are actually named 2854 something starting with __ and the normal name is an alias. */ 2855#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2856choke me 2857#else 2858$ac_func(); 2859#endif 2860 2861; return 0; } 2862EOF 2863if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2864 rm -rf conftest* 2865 eval "ac_cv_func_$ac_func=yes" 2866else 2867 echo "configure: failed program was:" >&5 2868 cat conftest.$ac_ext >&5 2869 rm -rf conftest* 2870 eval "ac_cv_func_$ac_func=no" 2871fi 2872rm -f conftest* 2873fi 2874 2875if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2876 echo "$ac_t""yes" 1>&6 2877 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2878 cat >> confdefs.h <<EOF 2879#define $ac_tr_func 1 2880EOF 2881 2882else 2883 echo "$ac_t""no" 1>&6 2884fi 2885done 2886 2887fi 2888 2889for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h 2890do 2891ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 2892echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 2893echo "configure:2894: checking for $ac_hdr" >&5 2894if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 2895 echo $ac_n "(cached) $ac_c" 1>&6 2896else 2897 cat > conftest.$ac_ext <<EOF 2898#line 2899 "configure" 2899#include "confdefs.h" 2900#include <$ac_hdr> 2901EOF 2902ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2903{ (eval echo configure:2904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2904ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2905if test -z "$ac_err"; then 2906 rm -rf conftest* 2907 eval "ac_cv_header_$ac_safe=yes" 2908else 2909 echo "$ac_err" >&5 2910 echo "configure: failed program was:" >&5 2911 cat conftest.$ac_ext >&5 2912 rm -rf conftest* 2913 eval "ac_cv_header_$ac_safe=no" 2914fi 2915rm -f conftest* 2916fi 2917if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 2918 echo "$ac_t""yes" 1>&6 2919 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 2920 cat >> confdefs.h <<EOF 2921#define $ac_tr_hdr 1 2922EOF 2923 2924else 2925 echo "$ac_t""no" 1>&6 2926fi 2927done 2928 2929for ac_func in getpagesize 2930do 2931echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2932echo "configure:2933: checking for $ac_func" >&5 2933if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2934 echo $ac_n "(cached) $ac_c" 1>&6 2935else 2936 cat > conftest.$ac_ext <<EOF 2937#line 2938 "configure" 2938#include "confdefs.h" 2939/* System header to define __stub macros and hopefully few prototypes, 2940 which can conflict with char $ac_func(); below. */ 2941#include <assert.h> 2942/* Override any gcc2 internal prototype to avoid an error. */ 2943/* We use char because int might match the return type of a gcc2 2944 builtin and then its argument prototype would still apply. */ 2945char $ac_func(); 2946 2947int main() { 2948 2949/* The GNU C library defines this for functions which it implements 2950 to always fail with ENOSYS. Some functions are actually named 2951 something starting with __ and the normal name is an alias. */ 2952#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 2953choke me 2954#else 2955$ac_func(); 2956#endif 2957 2958; return 0; } 2959EOF 2960if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2961 rm -rf conftest* 2962 eval "ac_cv_func_$ac_func=yes" 2963else 2964 echo "configure: failed program was:" >&5 2965 cat conftest.$ac_ext >&5 2966 rm -rf conftest* 2967 eval "ac_cv_func_$ac_func=no" 2968fi 2969rm -f conftest* 2970fi 2971 2972if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 2973 echo "$ac_t""yes" 1>&6 2974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 2975 cat >> confdefs.h <<EOF 2976#define $ac_tr_func 1 2977EOF 2978 2979else 2980 echo "$ac_t""no" 1>&6 2981fi 2982done 2983 2984echo $ac_n "checking for working mmap""... $ac_c" 1>&6 2985echo "configure:2986: checking for working mmap" >&5 2986if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then 2987 echo $ac_n "(cached) $ac_c" 1>&6 2988else 2989 if test "$cross_compiling" = yes; then 2990 ac_cv_func_mmap_fixed_mapped=no 2991else 2992 cat > conftest.$ac_ext <<EOF 2993#line 2994 "configure" 2994#include "confdefs.h" 2995 2996/* Thanks to Mike Haertel and Jim Avera for this test. 2997 Here is a matrix of mmap possibilities: 2998 mmap private not fixed 2999 mmap private fixed at somewhere currently unmapped 3000 mmap private fixed at somewhere already mapped 3001 mmap shared not fixed 3002 mmap shared fixed at somewhere currently unmapped 3003 mmap shared fixed at somewhere already mapped 3004 For private mappings, we should verify that changes cannot be read() 3005 back from the file, nor mmap's back from the file at a different 3006 address. (There have been systems where private was not correctly 3007 implemented like the infamous i386 svr4.0, and systems where the 3008 VM page cache was not coherent with the filesystem buffer cache 3009 like early versions of FreeBSD and possibly contemporary NetBSD.) 3010 For shared mappings, we should conversely verify that changes get 3011 propogated back to all the places they're supposed to be. 3012 3013 Grep wants private fixed already mapped. 3014 The main things grep needs to know about mmap are: 3015 * does it exist and is it safe to write into the mmap'd area 3016 * how to use it (BSD variants) */ 3017#include <sys/types.h> 3018#include <fcntl.h> 3019#include <sys/mman.h> 3020 3021#if HAVE_SYS_TYPES_H 3022# include <sys/types.h> 3023#endif 3024 3025#if HAVE_STDLIB_H 3026# include <stdlib.h> 3027#endif 3028 3029#if HAVE_SYS_STAT_H 3030# include <sys/stat.h> 3031#endif 3032 3033#if HAVE_UNISTD_H 3034# include <unistd.h> 3035#endif 3036 3037/* This mess was copied from the GNU getpagesize.h. */ 3038#ifndef HAVE_GETPAGESIZE 3039 3040/* Assume that all systems that can run configure have sys/param.h. */ 3041# ifndef HAVE_SYS_PARAM_H 3042# define HAVE_SYS_PARAM_H 1 3043# endif 3044 3045# ifdef _SC_PAGESIZE 3046# define getpagesize() sysconf(_SC_PAGESIZE) 3047# else /* no _SC_PAGESIZE */ 3048# ifdef HAVE_SYS_PARAM_H 3049# include <sys/param.h> 3050# ifdef EXEC_PAGESIZE 3051# define getpagesize() EXEC_PAGESIZE 3052# else /* no EXEC_PAGESIZE */ 3053# ifdef NBPG 3054# define getpagesize() NBPG * CLSIZE 3055# ifndef CLSIZE 3056# define CLSIZE 1 3057# endif /* no CLSIZE */ 3058# else /* no NBPG */ 3059# ifdef NBPC 3060# define getpagesize() NBPC 3061# else /* no NBPC */ 3062# ifdef PAGESIZE 3063# define getpagesize() PAGESIZE 3064# endif /* PAGESIZE */ 3065# endif /* no NBPC */ 3066# endif /* no NBPG */ 3067# endif /* no EXEC_PAGESIZE */ 3068# else /* no HAVE_SYS_PARAM_H */ 3069# define getpagesize() 8192 /* punt totally */ 3070# endif /* no HAVE_SYS_PARAM_H */ 3071# endif /* no _SC_PAGESIZE */ 3072 3073#endif /* no HAVE_GETPAGESIZE */ 3074 3075#ifdef __cplusplus 3076extern "C" { void *malloc(unsigned); } 3077#else 3078char *malloc(); 3079#endif 3080 3081int 3082main() 3083{ 3084 char *data, *data2, *data3; 3085 int i, pagesize; 3086 int fd; 3087 3088 pagesize = getpagesize(); 3089 3090 /* 3091 * First, make a file with some known garbage in it. 3092 */ 3093 data = malloc(pagesize); 3094 if (!data) 3095 exit(1); 3096 for (i = 0; i < pagesize; ++i) 3097 *(data + i) = rand(); 3098 umask(0); 3099 fd = creat("conftestmmap", 0600); 3100 if (fd < 0) 3101 exit(1); 3102 if (write(fd, data, pagesize) != pagesize) 3103 exit(1); 3104 close(fd); 3105 3106 /* 3107 * Next, try to mmap the file at a fixed address which 3108 * already has something else allocated at it. If we can, 3109 * also make sure that we see the same garbage. 3110 */ 3111 fd = open("conftestmmap", O_RDWR); 3112 if (fd < 0) 3113 exit(1); 3114 data2 = malloc(2 * pagesize); 3115 if (!data2) 3116 exit(1); 3117 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); 3118 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, 3119 MAP_PRIVATE | MAP_FIXED, fd, 0L)) 3120 exit(1); 3121 for (i = 0; i < pagesize; ++i) 3122 if (*(data + i) != *(data2 + i)) 3123 exit(1); 3124 3125 /* 3126 * Finally, make sure that changes to the mapped area 3127 * do not percolate back to the file as seen by read(). 3128 * (This is a bug on some variants of i386 svr4.0.) 3129 */ 3130 for (i = 0; i < pagesize; ++i) 3131 *(data2 + i) = *(data2 + i) + 1; 3132 data3 = malloc(pagesize); 3133 if (!data3) 3134 exit(1); 3135 if (read(fd, data3, pagesize) != pagesize) 3136 exit(1); 3137 for (i = 0; i < pagesize; ++i) 3138 if (*(data + i) != *(data3 + i)) 3139 exit(1); 3140 close(fd); 3141 unlink("conftestmmap"); 3142 exit(0); 3143} 3144 3145EOF 3146if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3147then 3148 ac_cv_func_mmap_fixed_mapped=yes 3149else 3150 echo "configure: failed program was:" >&5 3151 cat conftest.$ac_ext >&5 3152 rm -fr conftest* 3153 ac_cv_func_mmap_fixed_mapped=no 3154fi 3155rm -fr conftest* 3156fi 3157 3158fi 3159 3160echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 3161if test $ac_cv_func_mmap_fixed_mapped = yes; then 3162 cat >> confdefs.h <<\EOF 3163#define HAVE_MMAP 1 3164EOF 3165 3166fi 3167 3168 3169echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 3170echo "configure:3171: checking for working strncmp" >&5 3171if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then 3172 echo $ac_n "(cached) $ac_c" 1>&6 3173else 3174 if test "$cross_compiling" = yes; then 3175 ac_cv_func_strncmp_works=no 3176else 3177 cat > conftest.$ac_ext <<EOF 3178#line 3179 "configure" 3179#include "confdefs.h" 3180 3181/* Test by Jim Wilson and Kaveh Ghazi. 3182 Check whether strncmp reads past the end of its string parameters. */ 3183#include <sys/types.h> 3184 3185#ifdef HAVE_FCNTL_H 3186#include <fcntl.h> 3187#endif 3188 3189#ifdef HAVE_SYS_MMAN_H 3190#include <sys/mman.h> 3191#endif 3192 3193#ifndef MAP_ANON 3194#ifdef MAP_ANONYMOUS 3195#define MAP_ANON MAP_ANONYMOUS 3196#else 3197#define MAP_ANON MAP_FILE 3198#endif 3199#endif 3200 3201#ifndef MAP_FILE 3202#define MAP_FILE 0 3203#endif 3204#ifndef O_RDONLY 3205#define O_RDONLY 0 3206#endif 3207 3208#define MAP_LEN 0x10000 3209 3210main () 3211{ 3212#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) 3213 char *p; 3214 int dev_zero; 3215 3216 dev_zero = open ("/dev/zero", O_RDONLY); 3217 if (dev_zero < 0) 3218 exit (1); 3219 3220 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, 3221 MAP_ANON|MAP_PRIVATE, dev_zero, 0); 3222 if (p == (char *)-1) 3223 p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, 3224 MAP_ANON|MAP_PRIVATE, -1, 0); 3225 if (p == (char *)-1) 3226 exit (2); 3227 else 3228 { 3229 char *string = "__si_type_info"; 3230 char *q = (char *) p + MAP_LEN - strlen (string) - 2; 3231 char *r = (char *) p + 0xe; 3232 3233 strcpy (q, string); 3234 strcpy (r, string); 3235 strncmp (r, q, 14); 3236 } 3237#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ 3238 exit (0); 3239} 3240 3241EOF 3242if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3243then 3244 ac_cv_func_strncmp_works=yes 3245else 3246 echo "configure: failed program was:" >&5 3247 cat conftest.$ac_ext >&5 3248 rm -fr conftest* 3249 ac_cv_func_strncmp_works=no 3250fi 3251rm -fr conftest* 3252fi 3253 3254rm -f core core.* *.core 3255fi 3256 3257echo "$ac_t""$ac_cv_func_strncmp_works" 1>&6 3258if test $ac_cv_func_strncmp_works = no ; then 3259 LIBOBJS="$LIBOBJS strncmp.o" 3260fi 3261 3262 3263# Install a library built with a cross compiler in $(tooldir) rather 3264# than $(libdir). 3265if test -z "${with_cross_host}"; then 3266 INSTALL_DEST=libdir 3267else 3268 INSTALL_DEST=tooldir 3269fi 3270 3271 3272# We need multilib support, but only if configuring for the target. 3273trap '' 1 2 15 3274cat > confcache <<\EOF 3275# This file is a shell script that caches the results of configure 3276# tests run on this system so they can be shared between configure 3277# scripts and configure runs. It is not useful on other systems. 3278# If it contains results you don't want to keep, you may remove or edit it. 3279# 3280# By default, configure uses ./config.cache as the cache file, 3281# creating it if it does not exist already. You can give configure 3282# the --cache-file=FILE option to use a different cache file; that is 3283# what configure does when it calls configure scripts in 3284# subdirectories, so they share the cache. 3285# Giving --cache-file=/dev/null disables caching, for debugging configure. 3286# config.status only pays attention to the cache file if you give it the 3287# --recheck option to rerun configure. 3288# 3289EOF 3290# The following way of writing the cache mishandles newlines in values, 3291# but we know of no workaround that is simple, portable, and efficient. 3292# So, don't put newlines in cache variables' values. 3293# Ultrix sh set writes to stderr and can't be redirected directly, 3294# and sets the high bit in the cache file unless we assign to the vars. 3295(set) 2>&1 | 3296 case `(ac_space=' '; set | grep ac_space) 2>&1` in 3297 *ac_space=\ *) 3298 # `set' does not quote correctly, so add quotes (double-quote substitution 3299 # turns \\\\ into \\, and sed turns \\ into \). 3300 sed -n \ 3301 -e "s/'/'\\\\''/g" \ 3302 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 3303 ;; 3304 *) 3305 # `set' quotes correctly as required by POSIX, so do not add quotes. 3306 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 3307 ;; 3308 esac >> confcache 3309if cmp -s $cache_file confcache; then 3310 : 3311else 3312 if test -w $cache_file; then 3313 echo "updating cache $cache_file" 3314 cat confcache > $cache_file 3315 else 3316 echo "not updating unwritable cache $cache_file" 3317 fi 3318fi 3319rm -f confcache 3320 3321trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 3322 3323test "x$prefix" = xNONE && prefix=$ac_default_prefix 3324# Let make expand exec_prefix. 3325test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 3326 3327# Any assignment to VPATH causes Sun make to only execute 3328# the first set of double-colon rules, so remove it if not needed. 3329# If there is a colon in the path, we need to keep it. 3330if test "x$srcdir" = x.; then 3331 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 3332fi 3333 3334trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 3335 3336DEFS=-DHAVE_CONFIG_H 3337 3338# Without the "./", some shells look in PATH for config.status. 3339: ${CONFIG_STATUS=./config.status} 3340 3341echo creating $CONFIG_STATUS 3342rm -f $CONFIG_STATUS 3343cat > $CONFIG_STATUS <<EOF 3344#! /bin/sh 3345# Generated automatically by configure. 3346# Run this file to recreate the current configuration. 3347# This directory was configured as follows, 3348# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 3349# 3350# $0 $ac_configure_args 3351# 3352# Compiler output produced by configure, useful for debugging 3353# configure, is in ./config.log if it exists. 3354 3355ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 3356for ac_option 3357do 3358 case "\$ac_option" in 3359 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 3360 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 3361 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 3362 -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 3363 echo "$CONFIG_STATUS generated by autoconf version 2.13" 3364 exit 0 ;; 3365 -help | --help | --hel | --he | --h) 3366 echo "\$ac_cs_usage"; exit 0 ;; 3367 *) echo "\$ac_cs_usage"; exit 1 ;; 3368 esac 3369done 3370 3371ac_given_srcdir=$srcdir 3372ac_given_INSTALL="$INSTALL" 3373 3374trap 'rm -fr `echo "Makefile testsuite/Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 3375EOF 3376cat >> $CONFIG_STATUS <<EOF 3377 3378# Protect against being on the right side of a sed subst in config.status. 3379sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; 3380 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF 3381$ac_vpsub 3382$extrasub 3383s%@SHELL@%$SHELL%g 3384s%@CFLAGS@%$CFLAGS%g 3385s%@CPPFLAGS@%$CPPFLAGS%g 3386s%@CXXFLAGS@%$CXXFLAGS%g 3387s%@FFLAGS@%$FFLAGS%g 3388s%@DEFS@%$DEFS%g 3389s%@LDFLAGS@%$LDFLAGS%g 3390s%@LIBS@%$LIBS%g 3391s%@exec_prefix@%$exec_prefix%g 3392s%@prefix@%$prefix%g 3393s%@program_transform_name@%$program_transform_name%g 3394s%@bindir@%$bindir%g 3395s%@sbindir@%$sbindir%g 3396s%@libexecdir@%$libexecdir%g 3397s%@datadir@%$datadir%g 3398s%@sysconfdir@%$sysconfdir%g 3399s%@sharedstatedir@%$sharedstatedir%g 3400s%@localstatedir@%$localstatedir%g 3401s%@libdir@%$libdir%g 3402s%@includedir@%$includedir%g 3403s%@oldincludedir@%$oldincludedir%g 3404s%@infodir@%$infodir%g 3405s%@mandir@%$mandir%g 3406s%@MAINT@%$MAINT%g 3407s%@NOTMAINT@%$NOTMAINT%g 3408s%@MAKEINFO@%$MAKEINFO%g 3409s%@BUILD_INFO@%$BUILD_INFO%g 3410s%@PERL@%$PERL%g 3411s%@HAVE_PERL@%$HAVE_PERL%g 3412s%@host@%$host%g 3413s%@host_alias@%$host_alias%g 3414s%@host_cpu@%$host_cpu%g 3415s%@host_vendor@%$host_vendor%g 3416s%@host_os@%$host_os%g 3417s%@build@%$build%g 3418s%@build_alias@%$build_alias%g 3419s%@build_cpu@%$build_cpu%g 3420s%@build_vendor@%$build_vendor%g 3421s%@build_os@%$build_os%g 3422s%@AR@%$AR%g 3423s%@RANLIB@%$RANLIB%g 3424s%@CC@%$CC%g 3425s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g 3426s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g 3427s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g 3428s%@INSTALL_DATA@%$INSTALL_DATA%g 3429/@host_makefile_frag@/r $host_makefile_frag 3430s%@host_makefile_frag@%%g 3431s%@CPP@%$CPP%g 3432s%@CHECK@%$CHECK%g 3433s%@LIBOBJS@%$LIBOBJS%g 3434s%@INSTALL_DEST@%$INSTALL_DEST%g 3435 3436CEOF 3437EOF 3438 3439cat >> $CONFIG_STATUS <<\EOF 3440 3441# Split the substitutions into bite-sized pieces for seds with 3442# small command number limits, like on Digital OSF/1 and HP-UX. 3443ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. 3444ac_file=1 # Number of current file. 3445ac_beg=1 # First line for current file. 3446ac_end=$ac_max_sed_cmds # Line after last line for current file. 3447ac_more_lines=: 3448ac_sed_cmds="" 3449while $ac_more_lines; do 3450 if test $ac_beg -gt 1; then 3451 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file 3452 else 3453 sed "${ac_end}q" conftest.subs > conftest.s$ac_file 3454 fi 3455 if test ! -s conftest.s$ac_file; then 3456 ac_more_lines=false 3457 rm -f conftest.s$ac_file 3458 else 3459 if test -z "$ac_sed_cmds"; then 3460 ac_sed_cmds="sed -f conftest.s$ac_file" 3461 else 3462 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" 3463 fi 3464 ac_file=`expr $ac_file + 1` 3465 ac_beg=$ac_end 3466 ac_end=`expr $ac_end + $ac_max_sed_cmds` 3467 fi 3468done 3469if test -z "$ac_sed_cmds"; then 3470 ac_sed_cmds=cat 3471fi 3472EOF 3473 3474cat >> $CONFIG_STATUS <<EOF 3475 3476CONFIG_FILES=\${CONFIG_FILES-"Makefile testsuite/Makefile"} 3477EOF 3478cat >> $CONFIG_STATUS <<\EOF 3479for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 3480 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 3481 case "$ac_file" in 3482 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 3483 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 3484 *) ac_file_in="${ac_file}.in" ;; 3485 esac 3486 3487 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. 3488 3489 # Remove last slash and all that follows it. Not all systems have dirname. 3490 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 3491 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 3492 # The file is in a subdirectory. 3493 test ! -d "$ac_dir" && mkdir "$ac_dir" 3494 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 3495 # A "../" for each directory in $ac_dir_suffix. 3496 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 3497 else 3498 ac_dir_suffix= ac_dots= 3499 fi 3500 3501 case "$ac_given_srcdir" in 3502 .) srcdir=. 3503 if test -z "$ac_dots"; then top_srcdir=. 3504 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 3505 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 3506 *) # Relative path. 3507 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 3508 top_srcdir="$ac_dots$ac_given_srcdir" ;; 3509 esac 3510 3511 case "$ac_given_INSTALL" in 3512 [/$]*) INSTALL="$ac_given_INSTALL" ;; 3513 *) INSTALL="$ac_dots$ac_given_INSTALL" ;; 3514 esac 3515 3516 echo creating "$ac_file" 3517 rm -f "$ac_file" 3518 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 3519 case "$ac_file" in 3520 *Makefile*) ac_comsub="1i\\ 3521# $configure_input" ;; 3522 *) ac_comsub= ;; 3523 esac 3524 3525 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 3526 sed -e "$ac_comsub 3527s%@configure_input@%$configure_input%g 3528s%@srcdir@%$srcdir%g 3529s%@top_srcdir@%$top_srcdir%g 3530s%@INSTALL@%$INSTALL%g 3531" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file 3532fi; done 3533rm -f conftest.s* 3534 3535# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where 3536# NAME is the cpp macro being defined and VALUE is the value it is being given. 3537# 3538# ac_d sets the value in "#define NAME VALUE" lines. 3539ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' 3540ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' 3541ac_dC='\3' 3542ac_dD='%g' 3543# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". 3544ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' 3545ac_uB='\([ ]\)%\1#\2define\3' 3546ac_uC=' ' 3547ac_uD='\4%g' 3548# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". 3549ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' 3550ac_eB='$%\1#\2define\3' 3551ac_eC=' ' 3552ac_eD='%g' 3553 3554if test "${CONFIG_HEADERS+set}" != set; then 3555EOF 3556cat >> $CONFIG_STATUS <<EOF 3557 CONFIG_HEADERS="config.h:config.in" 3558EOF 3559cat >> $CONFIG_STATUS <<\EOF 3560fi 3561for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then 3562 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 3563 case "$ac_file" in 3564 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 3565 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 3566 *) ac_file_in="${ac_file}.in" ;; 3567 esac 3568 3569 echo creating $ac_file 3570 3571 rm -f conftest.frag conftest.in conftest.out 3572 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 3573 cat $ac_file_inputs > conftest.in 3574 3575EOF 3576 3577# Transform confdefs.h into a sed script conftest.vals that substitutes 3578# the proper values into config.h.in to produce config.h. And first: 3579# Protect against being on the right side of a sed subst in config.status. 3580# Protect against being in an unquoted here document in config.status. 3581rm -f conftest.vals 3582cat > conftest.hdr <<\EOF 3583s/[\\&%]/\\&/g 3584s%[\\$`]%\\&%g 3585s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp 3586s%ac_d%ac_u%gp 3587s%ac_u%ac_e%gp 3588EOF 3589sed -n -f conftest.hdr confdefs.h > conftest.vals 3590rm -f conftest.hdr 3591 3592# This sed command replaces #undef with comments. This is necessary, for 3593# example, in the case of _POSIX_SOURCE, which is predefined and required 3594# on some systems where configure will not decide to define it. 3595cat >> conftest.vals <<\EOF 3596s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% 3597EOF 3598 3599# Break up conftest.vals because some shells have a limit on 3600# the size of here documents, and old seds have small limits too. 3601 3602rm -f conftest.tail 3603while : 3604do 3605 ac_lines=`grep -c . conftest.vals` 3606 # grep -c gives empty output for an empty file on some AIX systems. 3607 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi 3608 # Write a limited-size here document to conftest.frag. 3609 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS 3610 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS 3611 echo 'CEOF 3612 sed -f conftest.frag conftest.in > conftest.out 3613 rm -f conftest.in 3614 mv conftest.out conftest.in 3615' >> $CONFIG_STATUS 3616 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail 3617 rm -f conftest.vals 3618 mv conftest.tail conftest.vals 3619done 3620rm -f conftest.vals 3621 3622cat >> $CONFIG_STATUS <<\EOF 3623 rm -f conftest.frag conftest.h 3624 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h 3625 cat conftest.in >> conftest.h 3626 rm -f conftest.in 3627 if cmp -s $ac_file conftest.h 2>/dev/null; then 3628 echo "$ac_file is unchanged" 3629 rm -f conftest.h 3630 else 3631 # Remove last slash and all that follows it. Not all systems have dirname. 3632 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 3633 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 3634 # The file is in a subdirectory. 3635 test ! -d "$ac_dir" && mkdir "$ac_dir" 3636 fi 3637 rm -f $ac_file 3638 mv conftest.h $ac_file 3639 fi 3640fi; done 3641 3642EOF 3643cat >> $CONFIG_STATUS <<EOF 3644srcdir=${srcdir} 3645host=${host} 3646target=${target} 3647with_target_subdir=${with_target_subdir} 3648with_multisubdir=${with_multisubdir} 3649ac_configure_args="--enable-multilib ${ac_configure_args}" 3650CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 3651libiberty_topdir=${libiberty_topdir} 3652 3653EOF 3654cat >> $CONFIG_STATUS <<\EOF 3655test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h 3656if test -n "$CONFIG_FILES"; then 3657 if test -n "${with_target_subdir}"; then 3658 # FIXME: We shouldn't need to set ac_file 3659 ac_file=Makefile 3660 . ${libiberty_topdir}/config-ml.in 3661 fi 3662fi 3663exit 0 3664EOF 3665chmod +x $CONFIG_STATUS 3666rm -fr confdefs* $ac_clean_files 3667test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 3668 3669