* gx sim prototype tweaks
[binutils-gdb.git] / sim / m32r-gx / configure
blobb9a71be7065fc4daf2157fc2e280dbe3dfa62fe0
1 #! /bin/sh
45 sim_inline="-DDEFAULT_INLINE=0"
81 # This file is derived from `gettext.m4'. The difference is that the
82 # included macros assume Cygnus-style source and build trees.
84 # Macro to add for using GNU gettext.
85 # Ulrich Drepper <drepper@cygnus.com>, 1995.
87 # This file file be copied and used freely without restrictions. It can
88 # be used in projects which are not available under the GNU Public License
89 # but which still want to provide support for the GNU gettext functionality.
90 # Please note that the actual code is *not* freely available.
92 # serial 3
98 # Search path for a program which passes the given test.
99 # Ulrich Drepper <drepper@cygnus.com>, 1996.
101 # This file file be copied and used freely without restrictions. It can
102 # be used in projects which are not available under the GNU Public License
103 # but which still want to provide support for the GNU gettext functionality.
104 # Please note that the actual code is *not* freely available.
106 # serial 1
110 # Check whether LC_MESSAGES is available in <locale.h>.
111 # Ulrich Drepper <drepper@cygnus.com>, 1995.
113 # This file file be copied and used freely without restrictions. It can
114 # be used in projects which are not available under the GNU Public License
115 # but which still want to provide support for the GNU gettext functionality.
116 # Please note that the actual code is *not* freely available.
118 # serial 1
122 # Check to see if we're running under Cygwin32, without using
123 # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
124 # Otherwise set it to "no".
128 # Check to see if we're running under Win32, without using
129 # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
130 # Otherwise set it to "".
135 # Guess values for system-dependent variables and create Makefiles.
136 # Generated automatically using autoconf version 2.12.2
137 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
139 # This configure script is free software; the Free Software Foundation
140 # gives unlimited permission to copy, distribute and modify it.
142 # Defaults:
143 ac_help=
144 ac_default_prefix=/usr/local
145 # Any additions from configure.in:
146 ac_help="$ac_help
147 --disable-nls do not use Native Language Support"
148 ac_help="$ac_help
149 --with-included-gettext use the GNU gettext library included here"
150 ac_help="$ac_help
151 --enable-maintainer-mode Enable developer functionality."
152 ac_help="$ac_help
153 --enable-sim-bswap Use Host specific BSWAP instruction."
154 ac_help="$ac_help
155 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
156 ac_help="$ac_help
157 --enable-sim-debug=opts Enable debugging flags"
158 ac_help="$ac_help
159 --enable-sim-stdio Specify whether to use stdio for console input/output."
160 ac_help="$ac_help
161 --enable-sim-trace=opts Enable tracing flags"
162 ac_help="$ac_help
163 --enable-sim-profile=opts Enable profiling flags"
164 ac_help="$ac_help
165 --enable-sim-endian=endian Specify target byte endian orientation."
166 ac_help="$ac_help
167 --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses."
168 ac_help="$ac_help
169 --enable-sim-hostendian=end Specify host byte endian orientation."
170 ac_help="$ac_help
171 --enable-sim-default-model=model Specify default model to simulate."
172 ac_help="$ac_help
173 --enable-sim-environment=environment Specify mixed, user, virtual or operating environment."
174 ac_help="$ac_help
175 --enable-sim-inline=inlines Specify which functions should be inlined."
177 # Initialize some variables set by options.
178 # The variables have the same names as the options, with
179 # dashes changed to underlines.
180 build=NONE
181 cache_file=./config.cache
182 exec_prefix=NONE
183 host=NONE
184 no_create=
185 nonopt=NONE
186 no_recursion=
187 prefix=NONE
188 program_prefix=NONE
189 program_suffix=NONE
190 program_transform_name=s,x,x,
191 silent=
192 site=
193 srcdir=
194 target=NONE
195 verbose=
196 x_includes=NONE
197 x_libraries=NONE
198 bindir='${exec_prefix}/bin'
199 sbindir='${exec_prefix}/sbin'
200 libexecdir='${exec_prefix}/libexec'
201 datadir='${prefix}/share'
202 sysconfdir='${prefix}/etc'
203 sharedstatedir='${prefix}/com'
204 localstatedir='${prefix}/var'
205 libdir='${exec_prefix}/lib'
206 includedir='${prefix}/include'
207 oldincludedir='/usr/include'
208 infodir='${prefix}/info'
209 mandir='${prefix}/man'
211 # Initialize some other variables.
212 subdirs=
213 MFLAGS= MAKEFLAGS=
214 SHELL=${CONFIG_SHELL-/bin/sh}
215 # Maximum number of lines to put in a shell here document.
216 ac_max_here_lines=12
218 ac_prev=
219 for ac_option
222 # If the previous option needs an argument, assign it.
223 if test -n "$ac_prev"; then
224 eval "$ac_prev=\$ac_option"
225 ac_prev=
226 continue
229 case "$ac_option" in
230 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
231 *) ac_optarg= ;;
232 esac
234 # Accept the important Cygnus configure options, so we can diagnose typos.
236 case "$ac_option" in
238 -bindir | --bindir | --bindi | --bind | --bin | --bi)
239 ac_prev=bindir ;;
240 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
241 bindir="$ac_optarg" ;;
243 -build | --build | --buil | --bui | --bu)
244 ac_prev=build ;;
245 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
246 build="$ac_optarg" ;;
248 -cache-file | --cache-file | --cache-fil | --cache-fi \
249 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
250 ac_prev=cache_file ;;
251 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
252 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
253 cache_file="$ac_optarg" ;;
255 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
256 ac_prev=datadir ;;
257 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
258 | --da=*)
259 datadir="$ac_optarg" ;;
261 -disable-* | --disable-*)
262 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
263 # Reject names that are not valid shell variable names.
264 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
265 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
267 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
268 eval "enable_${ac_feature}=no" ;;
270 -enable-* | --enable-*)
271 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
272 # Reject names that are not valid shell variable names.
273 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
274 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
276 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
277 case "$ac_option" in
278 *=*) ;;
279 *) ac_optarg=yes ;;
280 esac
281 eval "enable_${ac_feature}='$ac_optarg'" ;;
283 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
284 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
285 | --exec | --exe | --ex)
286 ac_prev=exec_prefix ;;
287 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
288 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
289 | --exec=* | --exe=* | --ex=*)
290 exec_prefix="$ac_optarg" ;;
292 -gas | --gas | --ga | --g)
293 # Obsolete; use --with-gas.
294 with_gas=yes ;;
296 -help | --help | --hel | --he)
297 # Omit some internal or obsolete options to make the list less imposing.
298 # This message is too long to be a string in the A/UX 3.1 sh.
299 cat << EOF
300 Usage: configure [options] [host]
301 Options: [defaults in brackets after descriptions]
302 Configuration:
303 --cache-file=FILE cache test results in FILE
304 --help print this message
305 --no-create do not create output files
306 --quiet, --silent do not print \`checking...' messages
307 --version print the version of autoconf that created configure
308 Directory and file names:
309 --prefix=PREFIX install architecture-independent files in PREFIX
310 [$ac_default_prefix]
311 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
312 [same as prefix]
313 --bindir=DIR user executables in DIR [EPREFIX/bin]
314 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
315 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
316 --datadir=DIR read-only architecture-independent data in DIR
317 [PREFIX/share]
318 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
319 --sharedstatedir=DIR modifiable architecture-independent data in DIR
320 [PREFIX/com]
321 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
322 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
323 --includedir=DIR C header files in DIR [PREFIX/include]
324 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
325 --infodir=DIR info documentation in DIR [PREFIX/info]
326 --mandir=DIR man documentation in DIR [PREFIX/man]
327 --srcdir=DIR find the sources in DIR [configure dir or ..]
328 --program-prefix=PREFIX prepend PREFIX to installed program names
329 --program-suffix=SUFFIX append SUFFIX to installed program names
330 --program-transform-name=PROGRAM
331 run sed PROGRAM on installed program names
333 cat << EOF
334 Host type:
335 --build=BUILD configure for building on BUILD [BUILD=HOST]
336 --host=HOST configure for HOST [guessed]
337 --target=TARGET configure for TARGET [TARGET=HOST]
338 Features and packages:
339 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
340 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
341 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
342 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
343 --x-includes=DIR X include files are in DIR
344 --x-libraries=DIR X library files are in DIR
346 if test -n "$ac_help"; then
347 echo "--enable and --with options recognized:$ac_help"
349 exit 0 ;;
351 -host | --host | --hos | --ho)
352 ac_prev=host ;;
353 -host=* | --host=* | --hos=* | --ho=*)
354 host="$ac_optarg" ;;
356 -includedir | --includedir | --includedi | --included | --include \
357 | --includ | --inclu | --incl | --inc)
358 ac_prev=includedir ;;
359 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
360 | --includ=* | --inclu=* | --incl=* | --inc=*)
361 includedir="$ac_optarg" ;;
363 -infodir | --infodir | --infodi | --infod | --info | --inf)
364 ac_prev=infodir ;;
365 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
366 infodir="$ac_optarg" ;;
368 -libdir | --libdir | --libdi | --libd)
369 ac_prev=libdir ;;
370 -libdir=* | --libdir=* | --libdi=* | --libd=*)
371 libdir="$ac_optarg" ;;
373 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
374 | --libexe | --libex | --libe)
375 ac_prev=libexecdir ;;
376 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
377 | --libexe=* | --libex=* | --libe=*)
378 libexecdir="$ac_optarg" ;;
380 -localstatedir | --localstatedir | --localstatedi | --localstated \
381 | --localstate | --localstat | --localsta | --localst \
382 | --locals | --local | --loca | --loc | --lo)
383 ac_prev=localstatedir ;;
384 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
385 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
386 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
387 localstatedir="$ac_optarg" ;;
389 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
390 ac_prev=mandir ;;
391 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
392 mandir="$ac_optarg" ;;
394 -nfp | --nfp | --nf)
395 # Obsolete; use --without-fp.
396 with_fp=no ;;
398 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
399 | --no-cr | --no-c)
400 no_create=yes ;;
402 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
403 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
404 no_recursion=yes ;;
406 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
407 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
408 | --oldin | --oldi | --old | --ol | --o)
409 ac_prev=oldincludedir ;;
410 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
411 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
412 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
413 oldincludedir="$ac_optarg" ;;
415 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
416 ac_prev=prefix ;;
417 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
418 prefix="$ac_optarg" ;;
420 -program-prefix | --program-prefix | --program-prefi | --program-pref \
421 | --program-pre | --program-pr | --program-p)
422 ac_prev=program_prefix ;;
423 -program-prefix=* | --program-prefix=* | --program-prefi=* \
424 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
425 program_prefix="$ac_optarg" ;;
427 -program-suffix | --program-suffix | --program-suffi | --program-suff \
428 | --program-suf | --program-su | --program-s)
429 ac_prev=program_suffix ;;
430 -program-suffix=* | --program-suffix=* | --program-suffi=* \
431 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
432 program_suffix="$ac_optarg" ;;
434 -program-transform-name | --program-transform-name \
435 | --program-transform-nam | --program-transform-na \
436 | --program-transform-n | --program-transform- \
437 | --program-transform | --program-transfor \
438 | --program-transfo | --program-transf \
439 | --program-trans | --program-tran \
440 | --progr-tra | --program-tr | --program-t)
441 ac_prev=program_transform_name ;;
442 -program-transform-name=* | --program-transform-name=* \
443 | --program-transform-nam=* | --program-transform-na=* \
444 | --program-transform-n=* | --program-transform-=* \
445 | --program-transform=* | --program-transfor=* \
446 | --program-transfo=* | --program-transf=* \
447 | --program-trans=* | --program-tran=* \
448 | --progr-tra=* | --program-tr=* | --program-t=*)
449 program_transform_name="$ac_optarg" ;;
451 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
452 | -silent | --silent | --silen | --sile | --sil)
453 silent=yes ;;
455 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
456 ac_prev=sbindir ;;
457 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
458 | --sbi=* | --sb=*)
459 sbindir="$ac_optarg" ;;
461 -sharedstatedir | --sharedstatedir | --sharedstatedi \
462 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
463 | --sharedst | --shareds | --shared | --share | --shar \
464 | --sha | --sh)
465 ac_prev=sharedstatedir ;;
466 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
467 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
468 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
469 | --sha=* | --sh=*)
470 sharedstatedir="$ac_optarg" ;;
472 -site | --site | --sit)
473 ac_prev=site ;;
474 -site=* | --site=* | --sit=*)
475 site="$ac_optarg" ;;
477 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
478 ac_prev=srcdir ;;
479 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
480 srcdir="$ac_optarg" ;;
482 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
483 | --syscon | --sysco | --sysc | --sys | --sy)
484 ac_prev=sysconfdir ;;
485 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
486 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
487 sysconfdir="$ac_optarg" ;;
489 -target | --target | --targe | --targ | --tar | --ta | --t)
490 ac_prev=target ;;
491 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
492 target="$ac_optarg" ;;
494 -v | -verbose | --verbose | --verbos | --verbo | --verb)
495 verbose=yes ;;
497 -version | --version | --versio | --versi | --vers)
498 echo "configure generated by autoconf version 2.12.2"
499 exit 0 ;;
501 -with-* | --with-*)
502 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
503 # Reject names that are not valid shell variable names.
504 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
505 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
507 ac_package=`echo $ac_package| sed 's/-/_/g'`
508 case "$ac_option" in
509 *=*) ;;
510 *) ac_optarg=yes ;;
511 esac
512 eval "with_${ac_package}='$ac_optarg'" ;;
514 -without-* | --without-*)
515 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
516 # Reject names that are not valid shell variable names.
517 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
518 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
520 ac_package=`echo $ac_package| sed 's/-/_/g'`
521 eval "with_${ac_package}=no" ;;
523 --x)
524 # Obsolete; use --with-x.
525 with_x=yes ;;
527 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
528 | --x-incl | --x-inc | --x-in | --x-i)
529 ac_prev=x_includes ;;
530 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
531 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
532 x_includes="$ac_optarg" ;;
534 -x-libraries | --x-libraries | --x-librarie | --x-librari \
535 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
536 ac_prev=x_libraries ;;
537 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
538 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
539 x_libraries="$ac_optarg" ;;
541 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
545 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
546 echo "configure: warning: $ac_option: invalid host type" 1>&2
548 if test "x$nonopt" != xNONE; then
549 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
551 nonopt="$ac_option"
554 esac
555 done
557 if test -n "$ac_prev"; then
558 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
561 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
563 # File descriptor usage:
564 # 0 standard input
565 # 1 file creation
566 # 2 errors and warnings
567 # 3 some systems may open it to /dev/tty
568 # 4 used on the Kubota Titan
569 # 6 checking for... messages and results
570 # 5 compiler messages saved in config.log
571 if test "$silent" = yes; then
572 exec 6>/dev/null
573 else
574 exec 6>&1
576 exec 5>./config.log
578 echo "\
579 This file contains any messages produced by compilers while
580 running configure, to aid debugging if configure makes a mistake.
581 " 1>&5
583 # Strip out --no-create and --no-recursion so they do not pile up.
584 # Also quote any args containing shell metacharacters.
585 ac_configure_args=
586 for ac_arg
588 case "$ac_arg" in
589 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
590 | --no-cr | --no-c) ;;
591 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
592 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
593 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
594 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
595 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
596 esac
597 done
599 # NLS nuisances.
600 # Only set these to C if already set. These must not be set unconditionally
601 # because not all systems understand e.g. LANG=C (notably SCO).
602 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
603 # Non-C LC_CTYPE values break the ctype check.
604 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
605 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
606 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
607 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
609 # confdefs.h avoids OS command line length limits that DEFS can exceed.
610 rm -rf conftest* confdefs.h
611 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
612 echo > confdefs.h
614 # A filename unique to this package, relative to the directory that
615 # configure is in, which we can look for to find out if srcdir is correct.
616 ac_unique_file=Makefile.in
618 # Find the source files, if location was not specified.
619 if test -z "$srcdir"; then
620 ac_srcdir_defaulted=yes
621 # Try the directory containing this script, then its parent.
622 ac_prog=$0
623 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
624 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
625 srcdir=$ac_confdir
626 if test ! -r $srcdir/$ac_unique_file; then
627 srcdir=..
629 else
630 ac_srcdir_defaulted=no
632 if test ! -r $srcdir/$ac_unique_file; then
633 if test "$ac_srcdir_defaulted" = yes; then
634 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
635 else
636 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
639 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
641 # Prefer explicitly selected file to automatically selected ones.
642 if test -z "$CONFIG_SITE"; then
643 if test "x$prefix" != xNONE; then
644 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
645 else
646 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
649 for ac_site_file in $CONFIG_SITE; do
650 if test -r "$ac_site_file"; then
651 echo "loading site script $ac_site_file"
652 . "$ac_site_file"
654 done
656 if test -r "$cache_file"; then
657 echo "loading cache $cache_file"
658 . $cache_file
659 else
660 echo "creating cache $cache_file"
661 > $cache_file
664 ac_ext=c
665 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
666 ac_cpp='$CPP $CPPFLAGS'
667 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
668 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
669 cross_compiling=$ac_cv_prog_cc_cross
671 ac_exeext=
672 ac_objext=o
673 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
674 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
675 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
676 ac_n= ac_c='
677 ' ac_t=' '
678 else
679 ac_n=-n ac_c= ac_t=
681 else
682 ac_n= ac_c='\c' ac_t=
688 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
689 echo "configure:690: checking how to run the C preprocessor" >&5
690 # On Suns, sometimes $CPP names a directory.
691 if test -n "$CPP" && test -d "$CPP"; then
692 CPP=
694 if test -z "$CPP"; then
695 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
696 echo $ac_n "(cached) $ac_c" 1>&6
697 else
698 # This must be in double quotes, not single quotes, because CPP may get
699 # substituted into the Makefile and "${CC-cc}" will confuse make.
700 CPP="${CC-cc} -E"
701 # On the NeXT, cc -E runs the code through the compiler's parser,
702 # not just through cpp.
703 cat > conftest.$ac_ext <<EOF
704 #line 705 "configure"
705 #include "confdefs.h"
706 #include <assert.h>
707 Syntax Error
709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
710 { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
712 if test -z "$ac_err"; then
714 else
715 echo "$ac_err" >&5
716 echo "configure: failed program was:" >&5
717 cat conftest.$ac_ext >&5
718 rm -rf conftest*
719 CPP="${CC-cc} -E -traditional-cpp"
720 cat > conftest.$ac_ext <<EOF
721 #line 722 "configure"
722 #include "confdefs.h"
723 #include <assert.h>
724 Syntax Error
726 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
727 { (eval echo configure:728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
728 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
729 if test -z "$ac_err"; then
731 else
732 echo "$ac_err" >&5
733 echo "configure: failed program was:" >&5
734 cat conftest.$ac_ext >&5
735 rm -rf conftest*
736 CPP="${CC-cc} -nologo -E"
737 cat > conftest.$ac_ext <<EOF
738 #line 739 "configure"
739 #include "confdefs.h"
740 #include <assert.h>
741 Syntax Error
743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
744 { (eval echo configure:745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
746 if test -z "$ac_err"; then
748 else
749 echo "$ac_err" >&5
750 echo "configure: failed program was:" >&5
751 cat conftest.$ac_ext >&5
752 rm -rf conftest*
753 CPP=/lib/cpp
755 rm -f conftest*
757 rm -f conftest*
759 rm -f conftest*
760 ac_cv_prog_CPP="$CPP"
762 CPP="$ac_cv_prog_CPP"
763 else
764 ac_cv_prog_CPP="$CPP"
766 echo "$ac_t""$CPP" 1>&6
768 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
769 echo "configure:770: checking whether ${MAKE-make} sets \${MAKE}" >&5
770 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
771 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773 else
774 cat > conftestmake <<\EOF
775 all:
776 @echo 'ac_maketemp="${MAKE}"'
778 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
779 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
780 if test -n "$ac_maketemp"; then
781 eval ac_cv_prog_make_${ac_make}_set=yes
782 else
783 eval ac_cv_prog_make_${ac_make}_set=no
785 rm -f conftestmake
787 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
788 echo "$ac_t""yes" 1>&6
789 SET_MAKE=
790 else
791 echo "$ac_t""no" 1>&6
792 SET_MAKE="MAKE=${MAKE-make}"
795 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
796 echo "configure:797: checking for POSIXized ISC" >&5
797 if test -d /etc/conf/kconfig.d &&
798 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
799 then
800 echo "$ac_t""yes" 1>&6
801 ISC=yes # If later tests want to check for ISC.
802 cat >> confdefs.h <<\EOF
803 #define _POSIX_SOURCE 1
806 if test "$GCC" = yes; then
807 CC="$CC -posix"
808 else
809 CC="$CC -Xp"
811 else
812 echo "$ac_t""no" 1>&6
813 ISC=
816 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
817 echo "configure:818: checking for ANSI C header files" >&5
818 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
819 echo $ac_n "(cached) $ac_c" 1>&6
820 else
821 cat > conftest.$ac_ext <<EOF
822 #line 823 "configure"
823 #include "confdefs.h"
824 #include <stdlib.h>
825 #include <stdarg.h>
826 #include <string.h>
827 #include <float.h>
829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
830 { (eval echo configure:831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
832 if test -z "$ac_err"; then
833 rm -rf conftest*
834 ac_cv_header_stdc=yes
835 else
836 echo "$ac_err" >&5
837 echo "configure: failed program was:" >&5
838 cat conftest.$ac_ext >&5
839 rm -rf conftest*
840 ac_cv_header_stdc=no
842 rm -f conftest*
844 if test $ac_cv_header_stdc = yes; then
845 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
846 cat > conftest.$ac_ext <<EOF
847 #line 848 "configure"
848 #include "confdefs.h"
849 #include <string.h>
851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
852 egrep "memchr" >/dev/null 2>&1; then
854 else
855 rm -rf conftest*
856 ac_cv_header_stdc=no
858 rm -f conftest*
862 if test $ac_cv_header_stdc = yes; then
863 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
864 cat > conftest.$ac_ext <<EOF
865 #line 866 "configure"
866 #include "confdefs.h"
867 #include <stdlib.h>
869 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
870 egrep "free" >/dev/null 2>&1; then
872 else
873 rm -rf conftest*
874 ac_cv_header_stdc=no
876 rm -f conftest*
880 if test $ac_cv_header_stdc = yes; then
881 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
882 if test "$cross_compiling" = yes; then
884 else
885 cat > conftest.$ac_ext <<EOF
886 #line 887 "configure"
887 #include "confdefs.h"
888 #include <ctype.h>
889 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
890 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
891 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
892 int main () { int i; for (i = 0; i < 256; i++)
893 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
894 exit (0); }
897 if { (eval echo configure:898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
898 then
900 else
901 echo "configure: failed program was:" >&5
902 cat conftest.$ac_ext >&5
903 rm -fr conftest*
904 ac_cv_header_stdc=no
906 rm -fr conftest*
912 echo "$ac_t""$ac_cv_header_stdc" 1>&6
913 if test $ac_cv_header_stdc = yes; then
914 cat >> confdefs.h <<\EOF
915 #define STDC_HEADERS 1
920 echo $ac_n "checking for working const""... $ac_c" 1>&6
921 echo "configure:922: checking for working const" >&5
922 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
923 echo $ac_n "(cached) $ac_c" 1>&6
924 else
925 cat > conftest.$ac_ext <<EOF
926 #line 927 "configure"
927 #include "confdefs.h"
929 int main() {
931 /* Ultrix mips cc rejects this. */
932 typedef int charset[2]; const charset x;
933 /* SunOS 4.1.1 cc rejects this. */
934 char const *const *ccp;
935 char **p;
936 /* NEC SVR4.0.2 mips cc rejects this. */
937 struct point {int x, y;};
938 static struct point const zero = {0,0};
939 /* AIX XL C 1.02.0.0 rejects this.
940 It does not let you subtract one const X* pointer from another in an arm
941 of an if-expression whose if-part is not a constant expression */
942 const char *g = "string";
943 ccp = &g + (g ? g-g : 0);
944 /* HPUX 7.0 cc rejects these. */
945 ++ccp;
946 p = (char**) ccp;
947 ccp = (char const *const *) p;
948 { /* SCO 3.2v4 cc rejects this. */
949 char *t;
950 char const *s = 0 ? (char *) 0 : (char const *) 0;
952 *t++ = 0;
954 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
955 int x[] = {25, 17};
956 const int *foo = &x[0];
957 ++foo;
959 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
960 typedef const int *iptr;
961 iptr p = 0;
962 ++p;
964 { /* AIX XL C 1.02.0.0 rejects this saying
965 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
966 struct s { int j; const int *ap[3]; };
967 struct s *b; b->j = 5;
969 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
970 const int foo = 10;
973 ; return 0; }
975 if { (eval echo configure:976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
976 rm -rf conftest*
977 ac_cv_c_const=yes
978 else
979 echo "configure: failed program was:" >&5
980 cat conftest.$ac_ext >&5
981 rm -rf conftest*
982 ac_cv_c_const=no
984 rm -f conftest*
987 echo "$ac_t""$ac_cv_c_const" 1>&6
988 if test $ac_cv_c_const = no; then
989 cat >> confdefs.h <<\EOF
990 #define const
995 echo $ac_n "checking for inline""... $ac_c" 1>&6
996 echo "configure:997: checking for inline" >&5
997 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
998 echo $ac_n "(cached) $ac_c" 1>&6
999 else
1000 ac_cv_c_inline=no
1001 for ac_kw in inline __inline__ __inline; do
1002 cat > conftest.$ac_ext <<EOF
1003 #line 1004 "configure"
1004 #include "confdefs.h"
1006 int main() {
1007 } $ac_kw foo() {
1008 ; return 0; }
1010 if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1011 rm -rf conftest*
1012 ac_cv_c_inline=$ac_kw; break
1013 else
1014 echo "configure: failed program was:" >&5
1015 cat conftest.$ac_ext >&5
1017 rm -f conftest*
1018 done
1022 echo "$ac_t""$ac_cv_c_inline" 1>&6
1023 case "$ac_cv_c_inline" in
1024 inline | yes) ;;
1025 no) cat >> confdefs.h <<\EOF
1026 #define inline
1029 *) cat >> confdefs.h <<EOF
1030 #define inline $ac_cv_c_inline
1033 esac
1035 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1036 echo "configure:1037: checking for off_t" >&5
1037 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1038 echo $ac_n "(cached) $ac_c" 1>&6
1039 else
1040 cat > conftest.$ac_ext <<EOF
1041 #line 1042 "configure"
1042 #include "confdefs.h"
1043 #include <sys/types.h>
1044 #if STDC_HEADERS
1045 #include <stdlib.h>
1046 #include <stddef.h>
1047 #endif
1049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1050 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1051 rm -rf conftest*
1052 ac_cv_type_off_t=yes
1053 else
1054 rm -rf conftest*
1055 ac_cv_type_off_t=no
1057 rm -f conftest*
1060 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1061 if test $ac_cv_type_off_t = no; then
1062 cat >> confdefs.h <<\EOF
1063 #define off_t long
1068 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1069 echo "configure:1070: checking for size_t" >&5
1070 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1071 echo $ac_n "(cached) $ac_c" 1>&6
1072 else
1073 cat > conftest.$ac_ext <<EOF
1074 #line 1075 "configure"
1075 #include "confdefs.h"
1076 #include <sys/types.h>
1077 #if STDC_HEADERS
1078 #include <stdlib.h>
1079 #include <stddef.h>
1080 #endif
1082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1083 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1084 rm -rf conftest*
1085 ac_cv_type_size_t=yes
1086 else
1087 rm -rf conftest*
1088 ac_cv_type_size_t=no
1090 rm -f conftest*
1093 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1094 if test $ac_cv_type_size_t = no; then
1095 cat >> confdefs.h <<\EOF
1096 #define size_t unsigned
1101 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1102 # for constant arguments. Useless!
1103 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1104 echo "configure:1105: checking for working alloca.h" >&5
1105 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1106 echo $ac_n "(cached) $ac_c" 1>&6
1107 else
1108 cat > conftest.$ac_ext <<EOF
1109 #line 1110 "configure"
1110 #include "confdefs.h"
1111 #include <alloca.h>
1112 int main() {
1113 char *p = alloca(2 * sizeof(int));
1114 ; return 0; }
1116 if { (eval echo configure:1117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1117 rm -rf conftest*
1118 ac_cv_header_alloca_h=yes
1119 else
1120 echo "configure: failed program was:" >&5
1121 cat conftest.$ac_ext >&5
1122 rm -rf conftest*
1123 ac_cv_header_alloca_h=no
1125 rm -f conftest*
1128 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1129 if test $ac_cv_header_alloca_h = yes; then
1130 cat >> confdefs.h <<\EOF
1131 #define HAVE_ALLOCA_H 1
1136 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1137 echo "configure:1138: checking for alloca" >&5
1138 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1139 echo $ac_n "(cached) $ac_c" 1>&6
1140 else
1141 cat > conftest.$ac_ext <<EOF
1142 #line 1143 "configure"
1143 #include "confdefs.h"
1145 #ifdef __GNUC__
1146 # define alloca __builtin_alloca
1147 #else
1148 # ifdef _MSC_VER
1149 # include <malloc.h>
1150 # define alloca _alloca
1151 # else
1152 # if HAVE_ALLOCA_H
1153 # include <alloca.h>
1154 # else
1155 # ifdef _AIX
1156 #pragma alloca
1157 # else
1158 # ifndef alloca /* predefined by HP cc +Olibcalls */
1159 char *alloca ();
1160 # endif
1161 # endif
1162 # endif
1163 # endif
1164 #endif
1166 int main() {
1167 char *p = (char *) alloca(1);
1168 ; return 0; }
1170 if { (eval echo configure:1171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1171 rm -rf conftest*
1172 ac_cv_func_alloca_works=yes
1173 else
1174 echo "configure: failed program was:" >&5
1175 cat conftest.$ac_ext >&5
1176 rm -rf conftest*
1177 ac_cv_func_alloca_works=no
1179 rm -f conftest*
1182 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1183 if test $ac_cv_func_alloca_works = yes; then
1184 cat >> confdefs.h <<\EOF
1185 #define HAVE_ALLOCA 1
1190 if test $ac_cv_func_alloca_works = no; then
1191 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1192 # that cause trouble. Some versions do not even contain alloca or
1193 # contain a buggy version. If you still want to use their alloca,
1194 # use ar to extract alloca.o from them instead of compiling alloca.c.
1195 ALLOCA=alloca.${ac_objext}
1196 cat >> confdefs.h <<\EOF
1197 #define C_ALLOCA 1
1201 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1202 echo "configure:1203: checking whether alloca needs Cray hooks" >&5
1203 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1204 echo $ac_n "(cached) $ac_c" 1>&6
1205 else
1206 cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1209 #if defined(CRAY) && ! defined(CRAY2)
1210 webecray
1211 #else
1212 wenotbecray
1213 #endif
1216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1217 egrep "webecray" >/dev/null 2>&1; then
1218 rm -rf conftest*
1219 ac_cv_os_cray=yes
1220 else
1221 rm -rf conftest*
1222 ac_cv_os_cray=no
1224 rm -f conftest*
1228 echo "$ac_t""$ac_cv_os_cray" 1>&6
1229 if test $ac_cv_os_cray = yes; then
1230 for ac_func in _getb67 GETB67 getb67; do
1231 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1232 echo "configure:1233: checking for $ac_func" >&5
1233 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1234 echo $ac_n "(cached) $ac_c" 1>&6
1235 else
1236 cat > conftest.$ac_ext <<EOF
1237 #line 1238 "configure"
1238 #include "confdefs.h"
1239 /* System header to define __stub macros and hopefully few prototypes,
1240 which can conflict with char $ac_func(); below. */
1241 #include <assert.h>
1242 /* Override any gcc2 internal prototype to avoid an error. */
1243 /* We use char because int might match the return type of a gcc2
1244 builtin and then its argument prototype would still apply. */
1245 char $ac_func();
1247 int main() {
1249 /* The GNU C library defines this for functions which it implements
1250 to always fail with ENOSYS. Some functions are actually named
1251 something starting with __ and the normal name is an alias. */
1252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1253 choke me
1254 #else
1255 $ac_func();
1256 #endif
1258 ; return 0; }
1260 if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1261 rm -rf conftest*
1262 eval "ac_cv_func_$ac_func=yes"
1263 else
1264 echo "configure: failed program was:" >&5
1265 cat conftest.$ac_ext >&5
1266 rm -rf conftest*
1267 eval "ac_cv_func_$ac_func=no"
1269 rm -f conftest*
1272 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1273 echo "$ac_t""yes" 1>&6
1274 cat >> confdefs.h <<EOF
1275 #define CRAY_STACKSEG_END $ac_func
1278 break
1279 else
1280 echo "$ac_t""no" 1>&6
1283 done
1286 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1287 echo "configure:1288: checking stack direction for C alloca" >&5
1288 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1290 else
1291 if test "$cross_compiling" = yes; then
1292 ac_cv_c_stack_direction=0
1293 else
1294 cat > conftest.$ac_ext <<EOF
1295 #line 1296 "configure"
1296 #include "confdefs.h"
1297 find_stack_direction ()
1299 static char *addr = 0;
1300 auto char dummy;
1301 if (addr == 0)
1303 addr = &dummy;
1304 return find_stack_direction ();
1306 else
1307 return (&dummy > addr) ? 1 : -1;
1309 main ()
1311 exit (find_stack_direction() < 0);
1314 if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1315 then
1316 ac_cv_c_stack_direction=1
1317 else
1318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
1320 rm -fr conftest*
1321 ac_cv_c_stack_direction=-1
1323 rm -fr conftest*
1328 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1329 cat >> confdefs.h <<EOF
1330 #define STACK_DIRECTION $ac_cv_c_stack_direction
1335 for ac_hdr in unistd.h
1337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1339 echo "configure:1340: checking for $ac_hdr" >&5
1340 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1341 echo $ac_n "(cached) $ac_c" 1>&6
1342 else
1343 cat > conftest.$ac_ext <<EOF
1344 #line 1345 "configure"
1345 #include "confdefs.h"
1346 #include <$ac_hdr>
1348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1349 { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1351 if test -z "$ac_err"; then
1352 rm -rf conftest*
1353 eval "ac_cv_header_$ac_safe=yes"
1354 else
1355 echo "$ac_err" >&5
1356 echo "configure: failed program was:" >&5
1357 cat conftest.$ac_ext >&5
1358 rm -rf conftest*
1359 eval "ac_cv_header_$ac_safe=no"
1361 rm -f conftest*
1363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1364 echo "$ac_t""yes" 1>&6
1365 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1366 cat >> confdefs.h <<EOF
1367 #define $ac_tr_hdr 1
1370 else
1371 echo "$ac_t""no" 1>&6
1373 done
1375 for ac_func in getpagesize
1377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1378 echo "configure:1379: checking for $ac_func" >&5
1379 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1380 echo $ac_n "(cached) $ac_c" 1>&6
1381 else
1382 cat > conftest.$ac_ext <<EOF
1383 #line 1384 "configure"
1384 #include "confdefs.h"
1385 /* System header to define __stub macros and hopefully few prototypes,
1386 which can conflict with char $ac_func(); below. */
1387 #include <assert.h>
1388 /* Override any gcc2 internal prototype to avoid an error. */
1389 /* We use char because int might match the return type of a gcc2
1390 builtin and then its argument prototype would still apply. */
1391 char $ac_func();
1393 int main() {
1395 /* The GNU C library defines this for functions which it implements
1396 to always fail with ENOSYS. Some functions are actually named
1397 something starting with __ and the normal name is an alias. */
1398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1399 choke me
1400 #else
1401 $ac_func();
1402 #endif
1404 ; return 0; }
1406 if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1407 rm -rf conftest*
1408 eval "ac_cv_func_$ac_func=yes"
1409 else
1410 echo "configure: failed program was:" >&5
1411 cat conftest.$ac_ext >&5
1412 rm -rf conftest*
1413 eval "ac_cv_func_$ac_func=no"
1415 rm -f conftest*
1418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1419 echo "$ac_t""yes" 1>&6
1420 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1421 cat >> confdefs.h <<EOF
1422 #define $ac_tr_func 1
1425 else
1426 echo "$ac_t""no" 1>&6
1428 done
1430 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1431 echo "configure:1432: checking for working mmap" >&5
1432 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1433 echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435 if test "$cross_compiling" = yes; then
1436 ac_cv_func_mmap_fixed_mapped=no
1437 else
1438 cat > conftest.$ac_ext <<EOF
1439 #line 1440 "configure"
1440 #include "confdefs.h"
1442 /* Thanks to Mike Haertel and Jim Avera for this test.
1443 Here is a matrix of mmap possibilities:
1444 mmap private not fixed
1445 mmap private fixed at somewhere currently unmapped
1446 mmap private fixed at somewhere already mapped
1447 mmap shared not fixed
1448 mmap shared fixed at somewhere currently unmapped
1449 mmap shared fixed at somewhere already mapped
1450 For private mappings, we should verify that changes cannot be read()
1451 back from the file, nor mmap's back from the file at a different
1452 address. (There have been systems where private was not correctly
1453 implemented like the infamous i386 svr4.0, and systems where the
1454 VM page cache was not coherent with the filesystem buffer cache
1455 like early versions of FreeBSD and possibly contemporary NetBSD.)
1456 For shared mappings, we should conversely verify that changes get
1457 propogated back to all the places they're supposed to be.
1459 Grep wants private fixed already mapped.
1460 The main things grep needs to know about mmap are:
1461 * does it exist and is it safe to write into the mmap'd area
1462 * how to use it (BSD variants) */
1463 #include <sys/types.h>
1464 #include <fcntl.h>
1465 #include <sys/mman.h>
1467 /* This mess was copied from the GNU getpagesize.h. */
1468 #ifndef HAVE_GETPAGESIZE
1469 # ifdef HAVE_UNISTD_H
1470 # include <unistd.h>
1471 # endif
1473 /* Assume that all systems that can run configure have sys/param.h. */
1474 # ifndef HAVE_SYS_PARAM_H
1475 # define HAVE_SYS_PARAM_H 1
1476 # endif
1478 # ifdef _SC_PAGESIZE
1479 # define getpagesize() sysconf(_SC_PAGESIZE)
1480 # else /* no _SC_PAGESIZE */
1481 # ifdef HAVE_SYS_PARAM_H
1482 # include <sys/param.h>
1483 # ifdef EXEC_PAGESIZE
1484 # define getpagesize() EXEC_PAGESIZE
1485 # else /* no EXEC_PAGESIZE */
1486 # ifdef NBPG
1487 # define getpagesize() NBPG * CLSIZE
1488 # ifndef CLSIZE
1489 # define CLSIZE 1
1490 # endif /* no CLSIZE */
1491 # else /* no NBPG */
1492 # ifdef NBPC
1493 # define getpagesize() NBPC
1494 # else /* no NBPC */
1495 # ifdef PAGESIZE
1496 # define getpagesize() PAGESIZE
1497 # endif /* PAGESIZE */
1498 # endif /* no NBPC */
1499 # endif /* no NBPG */
1500 # endif /* no EXEC_PAGESIZE */
1501 # else /* no HAVE_SYS_PARAM_H */
1502 # define getpagesize() 8192 /* punt totally */
1503 # endif /* no HAVE_SYS_PARAM_H */
1504 # endif /* no _SC_PAGESIZE */
1506 #endif /* no HAVE_GETPAGESIZE */
1508 #ifdef __cplusplus
1509 extern "C" { void *malloc(unsigned); }
1510 #else
1511 char *malloc();
1512 #endif
1515 main()
1517 char *data, *data2, *data3;
1518 int i, pagesize;
1519 int fd;
1521 pagesize = getpagesize();
1524 * First, make a file with some known garbage in it.
1526 data = malloc(pagesize);
1527 if (!data)
1528 exit(1);
1529 for (i = 0; i < pagesize; ++i)
1530 *(data + i) = rand();
1531 umask(0);
1532 fd = creat("conftestmmap", 0600);
1533 if (fd < 0)
1534 exit(1);
1535 if (write(fd, data, pagesize) != pagesize)
1536 exit(1);
1537 close(fd);
1540 * Next, try to mmap the file at a fixed address which
1541 * already has something else allocated at it. If we can,
1542 * also make sure that we see the same garbage.
1544 fd = open("conftestmmap", O_RDWR);
1545 if (fd < 0)
1546 exit(1);
1547 data2 = malloc(2 * pagesize);
1548 if (!data2)
1549 exit(1);
1550 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1551 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1552 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1553 exit(1);
1554 for (i = 0; i < pagesize; ++i)
1555 if (*(data + i) != *(data2 + i))
1556 exit(1);
1559 * Finally, make sure that changes to the mapped area
1560 * do not percolate back to the file as seen by read().
1561 * (This is a bug on some variants of i386 svr4.0.)
1563 for (i = 0; i < pagesize; ++i)
1564 *(data2 + i) = *(data2 + i) + 1;
1565 data3 = malloc(pagesize);
1566 if (!data3)
1567 exit(1);
1568 if (read(fd, data3, pagesize) != pagesize)
1569 exit(1);
1570 for (i = 0; i < pagesize; ++i)
1571 if (*(data + i) != *(data3 + i))
1572 exit(1);
1573 close(fd);
1574 unlink("conftestmmap");
1575 exit(0);
1579 if { (eval echo configure:1580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1580 then
1581 ac_cv_func_mmap_fixed_mapped=yes
1582 else
1583 echo "configure: failed program was:" >&5
1584 cat conftest.$ac_ext >&5
1585 rm -fr conftest*
1586 ac_cv_func_mmap_fixed_mapped=no
1588 rm -fr conftest*
1593 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1594 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1595 cat >> confdefs.h <<\EOF
1596 #define HAVE_MMAP 1
1602 # autoconf.info says this should be called right after AC_INIT.
1605 ac_aux_dir=
1606 for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
1616 done
1617 if test -z "$ac_aux_dir"; then
1618 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
1620 ac_config_guess=$ac_aux_dir/config.guess
1621 ac_config_sub=$ac_aux_dir/config.sub
1622 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1625 # Do some error checking and defaulting for the host and target type.
1626 # The inputs are:
1627 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1629 # The rules are:
1630 # 1. You are not allowed to specify --host, --target, and nonopt at the
1631 # same time.
1632 # 2. Host defaults to nonopt.
1633 # 3. If nonopt is not specified, then host defaults to the current host,
1634 # as determined by config.guess.
1635 # 4. Target and build default to nonopt.
1636 # 5. If nonopt is not specified, then target and build default to host.
1638 # The aliases save the names the user supplied, while $host etc.
1639 # will get canonicalized.
1640 case $host---$target---$nonopt in
1641 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1642 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1643 esac
1646 # Make sure we can run config.sub.
1647 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1648 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1651 echo $ac_n "checking host system type""... $ac_c" 1>&6
1652 echo "configure:1653: checking host system type" >&5
1654 host_alias=$host
1655 case "$host_alias" in
1656 NONE)
1657 case $nonopt in
1658 NONE)
1659 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1660 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1661 fi ;;
1662 *) host_alias=$nonopt ;;
1663 esac ;;
1664 esac
1666 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1667 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1668 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1669 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1670 echo "$ac_t""$host" 1>&6
1672 echo $ac_n "checking target system type""... $ac_c" 1>&6
1673 echo "configure:1674: checking target system type" >&5
1675 target_alias=$target
1676 case "$target_alias" in
1677 NONE)
1678 case $nonopt in
1679 NONE) target_alias=$host_alias ;;
1680 *) target_alias=$nonopt ;;
1681 esac ;;
1682 esac
1684 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1685 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1686 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1687 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1688 echo "$ac_t""$target" 1>&6
1690 echo $ac_n "checking build system type""... $ac_c" 1>&6
1691 echo "configure:1692: checking build system type" >&5
1693 build_alias=$build
1694 case "$build_alias" in
1695 NONE)
1696 case $nonopt in
1697 NONE) build_alias=$host_alias ;;
1698 *) build_alias=$nonopt ;;
1699 esac ;;
1700 esac
1702 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1703 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1704 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1705 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1706 echo "$ac_t""$build" 1>&6
1708 test "$host_alias" != "$target_alias" &&
1709 test "$program_prefix$program_suffix$program_transform_name" = \
1710 NONENONEs,x,x, &&
1711 program_prefix=${target_alias}-
1713 if test "$program_transform_name" = s,x,x,; then
1714 program_transform_name=
1715 else
1716 # Double any \ or $. echo might interpret backslashes.
1717 cat <<\EOF_SED > conftestsed
1718 s,\\,\\\\,g; s,\$,$$,g
1719 EOF_SED
1720 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1721 rm -f conftestsed
1723 test "$program_prefix" != NONE &&
1724 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1725 # Use a double $ so make ignores it.
1726 test "$program_suffix" != NONE &&
1727 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1729 # sed with no file args requires a program.
1730 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1732 # Extract the first word of "gcc", so it can be a program name with args.
1733 set dummy gcc; ac_word=$2
1734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1735 echo "configure:1736: checking for $ac_word" >&5
1736 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1737 echo $ac_n "(cached) $ac_c" 1>&6
1738 else
1739 if test -n "$CC"; then
1740 ac_cv_prog_CC="$CC" # Let the user override the test.
1741 else
1742 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1743 for ac_dir in $PATH; do
1744 test -z "$ac_dir" && ac_dir=.
1745 if test -f $ac_dir/$ac_word; then
1746 ac_cv_prog_CC="gcc"
1747 break
1749 done
1750 IFS="$ac_save_ifs"
1753 CC="$ac_cv_prog_CC"
1754 if test -n "$CC"; then
1755 echo "$ac_t""$CC" 1>&6
1756 else
1757 echo "$ac_t""no" 1>&6
1760 if test -z "$CC"; then
1761 # Extract the first word of "cc", so it can be a program name with args.
1762 set dummy cc; ac_word=$2
1763 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1764 echo "configure:1765: checking for $ac_word" >&5
1765 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1766 echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768 if test -n "$CC"; then
1769 ac_cv_prog_CC="$CC" # Let the user override the test.
1770 else
1771 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1772 ac_prog_rejected=no
1773 for ac_dir in $PATH; do
1774 test -z "$ac_dir" && ac_dir=.
1775 if test -f $ac_dir/$ac_word; then
1776 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1777 ac_prog_rejected=yes
1778 continue
1780 ac_cv_prog_CC="cc"
1781 break
1783 done
1784 IFS="$ac_save_ifs"
1785 if test $ac_prog_rejected = yes; then
1786 # We found a bogon in the path, so make sure we never use it.
1787 set dummy $ac_cv_prog_CC
1788 shift
1789 if test $# -gt 0; then
1790 # We chose a different compiler from the bogus one.
1791 # However, it has the same basename, so the bogon will be chosen
1792 # first if we set CC to just the basename; use the full file name.
1793 shift
1794 set dummy "$ac_dir/$ac_word" "$@"
1795 shift
1796 ac_cv_prog_CC="$@"
1801 CC="$ac_cv_prog_CC"
1802 if test -n "$CC"; then
1803 echo "$ac_t""$CC" 1>&6
1804 else
1805 echo "$ac_t""no" 1>&6
1808 if test -z "$CC"; then
1809 case "`uname -s`" in
1810 *win32* | *WIN32*)
1811 # Extract the first word of "cl", so it can be a program name with args.
1812 set dummy cl; ac_word=$2
1813 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1814 echo "configure:1815: checking for $ac_word" >&5
1815 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1817 else
1818 if test -n "$CC"; then
1819 ac_cv_prog_CC="$CC" # Let the user override the test.
1820 else
1821 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1822 for ac_dir in $PATH; do
1823 test -z "$ac_dir" && ac_dir=.
1824 if test -f $ac_dir/$ac_word; then
1825 ac_cv_prog_CC="cl"
1826 break
1828 done
1829 IFS="$ac_save_ifs"
1832 CC="$ac_cv_prog_CC"
1833 if test -n "$CC"; then
1834 echo "$ac_t""$CC" 1>&6
1835 else
1836 echo "$ac_t""no" 1>&6
1839 esac
1841 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1844 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1845 echo "configure:1846: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1847 ac_ext=c
1848 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1849 ac_cpp='$CPP $CPPFLAGS'
1850 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1851 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1852 cross_compiling=$ac_cv_prog_cc_cross
1854 cat > conftest.$ac_ext <<EOF
1855 #line 1856 "configure"
1856 #include "confdefs.h"
1857 main(){return(0);}
1859 if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1860 ac_cv_prog_cc_works=yes
1861 # If we can't run a trivial program, we are probably using a cross compiler.
1862 if (./conftest; exit) 2>/dev/null; then
1863 ac_cv_prog_cc_cross=no
1864 else
1865 ac_cv_prog_cc_cross=yes
1867 else
1868 echo "configure: failed program was:" >&5
1869 cat conftest.$ac_ext >&5
1870 ac_cv_prog_cc_works=no
1872 rm -fr conftest*
1874 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1875 if test $ac_cv_prog_cc_works = no; then
1876 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1878 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1879 echo "configure:1880: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1880 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1881 cross_compiling=$ac_cv_prog_cc_cross
1883 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1884 echo "configure:1885: checking whether we are using GNU C" >&5
1885 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1886 echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888 cat > conftest.c <<EOF
1889 #ifdef __GNUC__
1890 yes;
1891 #endif
1893 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1894 ac_cv_prog_gcc=yes
1895 else
1896 ac_cv_prog_gcc=no
1900 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1902 if test $ac_cv_prog_gcc = yes; then
1903 GCC=yes
1904 else
1905 GCC=
1908 ac_test_CFLAGS="${CFLAGS+set}"
1909 ac_save_CFLAGS="$CFLAGS"
1910 CFLAGS=
1911 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1912 echo "configure:1913: checking whether ${CC-cc} accepts -g" >&5
1913 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1915 else
1916 echo 'void f(){}' > conftest.c
1917 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1918 ac_cv_prog_cc_g=yes
1919 else
1920 ac_cv_prog_cc_g=no
1922 rm -f conftest*
1926 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1927 if test "$ac_test_CFLAGS" = set; then
1928 CFLAGS="$ac_save_CFLAGS"
1929 elif test $ac_cv_prog_cc_g = yes; then
1930 if test "$GCC" = yes; then
1931 CFLAGS="-g -O2"
1932 else
1933 CFLAGS="-g"
1935 else
1936 if test "$GCC" = yes; then
1937 CFLAGS="-O2"
1938 else
1939 CFLAGS=
1943 # Find a good install program. We prefer a C program (faster),
1944 # so one script is as good as another. But avoid the broken or
1945 # incompatible versions:
1946 # SysV /etc/install, /usr/sbin/install
1947 # SunOS /usr/etc/install
1948 # IRIX /sbin/install
1949 # AIX /bin/install
1950 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1951 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1952 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1953 # ./install, which can be erroneously created by make from ./install.sh.
1954 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1955 echo "configure:1956: checking for a BSD compatible install" >&5
1956 if test -z "$INSTALL"; then
1957 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1958 echo $ac_n "(cached) $ac_c" 1>&6
1959 else
1960 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1961 for ac_dir in $PATH; do
1962 # Account for people who put trailing slashes in PATH elements.
1963 case "$ac_dir/" in
1964 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1966 # OSF1 and SCO ODT 3.0 have their own names for install.
1967 # Don't use installbsd from OSF since it installs stuff as root
1968 # by default.
1969 for ac_prog in ginstall scoinst install; do
1970 if test -f $ac_dir/$ac_prog; then
1971 if test $ac_prog = install &&
1972 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1973 # AIX install. It has an incompatible calling convention.
1975 else
1976 ac_cv_path_install="$ac_dir/$ac_prog -c"
1977 break 2
1980 done
1982 esac
1983 done
1984 IFS="$ac_save_IFS"
1987 if test "${ac_cv_path_install+set}" = set; then
1988 INSTALL="$ac_cv_path_install"
1989 else
1990 # As a last resort, use the slow shell script. We don't cache a
1991 # path for INSTALL within a source directory, because that will
1992 # break other packages using the cache if that directory is
1993 # removed, or if the path is relative.
1994 INSTALL="$ac_install_sh"
1997 echo "$ac_t""$INSTALL" 1>&6
1999 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2000 # It thinks the first close brace ends the variable substitution.
2001 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2003 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2006 # Put a plausible default for CC_FOR_BUILD in Makefile.
2007 if test "x$cross_compiling" = "xno"; then
2008 CC_FOR_BUILD='$(CC)'
2009 else
2010 CC_FOR_BUILD=gcc
2016 AR=${AR-ar}
2018 # Extract the first word of "ranlib", so it can be a program name with args.
2019 set dummy ranlib; ac_word=$2
2020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2021 echo "configure:2022: checking for $ac_word" >&5
2022 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2023 echo $ac_n "(cached) $ac_c" 1>&6
2024 else
2025 if test -n "$RANLIB"; then
2026 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2027 else
2028 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2029 for ac_dir in $PATH; do
2030 test -z "$ac_dir" && ac_dir=.
2031 if test -f $ac_dir/$ac_word; then
2032 ac_cv_prog_RANLIB="ranlib"
2033 break
2035 done
2036 IFS="$ac_save_ifs"
2037 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2040 RANLIB="$ac_cv_prog_RANLIB"
2041 if test -n "$RANLIB"; then
2042 echo "$ac_t""$RANLIB" 1>&6
2043 else
2044 echo "$ac_t""no" 1>&6
2048 ALL_LINGUAS=
2050 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2051 unistd.h values.h sys/param.h
2053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2055 echo "configure:2056: checking for $ac_hdr" >&5
2056 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2057 echo $ac_n "(cached) $ac_c" 1>&6
2058 else
2059 cat > conftest.$ac_ext <<EOF
2060 #line 2061 "configure"
2061 #include "confdefs.h"
2062 #include <$ac_hdr>
2064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2065 { (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2067 if test -z "$ac_err"; then
2068 rm -rf conftest*
2069 eval "ac_cv_header_$ac_safe=yes"
2070 else
2071 echo "$ac_err" >&5
2072 echo "configure: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 rm -rf conftest*
2075 eval "ac_cv_header_$ac_safe=no"
2077 rm -f conftest*
2079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2080 echo "$ac_t""yes" 1>&6
2081 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2082 cat >> confdefs.h <<EOF
2083 #define $ac_tr_hdr 1
2086 else
2087 echo "$ac_t""no" 1>&6
2089 done
2091 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2092 __argz_count __argz_stringify __argz_next
2094 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2095 echo "configure:2096: checking for $ac_func" >&5
2096 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2097 echo $ac_n "(cached) $ac_c" 1>&6
2098 else
2099 cat > conftest.$ac_ext <<EOF
2100 #line 2101 "configure"
2101 #include "confdefs.h"
2102 /* System header to define __stub macros and hopefully few prototypes,
2103 which can conflict with char $ac_func(); below. */
2104 #include <assert.h>
2105 /* Override any gcc2 internal prototype to avoid an error. */
2106 /* We use char because int might match the return type of a gcc2
2107 builtin and then its argument prototype would still apply. */
2108 char $ac_func();
2110 int main() {
2112 /* The GNU C library defines this for functions which it implements
2113 to always fail with ENOSYS. Some functions are actually named
2114 something starting with __ and the normal name is an alias. */
2115 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2116 choke me
2117 #else
2118 $ac_func();
2119 #endif
2121 ; return 0; }
2123 if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2124 rm -rf conftest*
2125 eval "ac_cv_func_$ac_func=yes"
2126 else
2127 echo "configure: failed program was:" >&5
2128 cat conftest.$ac_ext >&5
2129 rm -rf conftest*
2130 eval "ac_cv_func_$ac_func=no"
2132 rm -f conftest*
2135 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2136 echo "$ac_t""yes" 1>&6
2137 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2138 cat >> confdefs.h <<EOF
2139 #define $ac_tr_func 1
2142 else
2143 echo "$ac_t""no" 1>&6
2145 done
2148 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2149 for ac_func in stpcpy
2151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2152 echo "configure:2153: checking for $ac_func" >&5
2153 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2155 else
2156 cat > conftest.$ac_ext <<EOF
2157 #line 2158 "configure"
2158 #include "confdefs.h"
2159 /* System header to define __stub macros and hopefully few prototypes,
2160 which can conflict with char $ac_func(); below. */
2161 #include <assert.h>
2162 /* Override any gcc2 internal prototype to avoid an error. */
2163 /* We use char because int might match the return type of a gcc2
2164 builtin and then its argument prototype would still apply. */
2165 char $ac_func();
2167 int main() {
2169 /* The GNU C library defines this for functions which it implements
2170 to always fail with ENOSYS. Some functions are actually named
2171 something starting with __ and the normal name is an alias. */
2172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2173 choke me
2174 #else
2175 $ac_func();
2176 #endif
2178 ; return 0; }
2180 if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2181 rm -rf conftest*
2182 eval "ac_cv_func_$ac_func=yes"
2183 else
2184 echo "configure: failed program was:" >&5
2185 cat conftest.$ac_ext >&5
2186 rm -rf conftest*
2187 eval "ac_cv_func_$ac_func=no"
2189 rm -f conftest*
2192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2193 echo "$ac_t""yes" 1>&6
2194 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2195 cat >> confdefs.h <<EOF
2196 #define $ac_tr_func 1
2199 else
2200 echo "$ac_t""no" 1>&6
2202 done
2205 if test "${ac_cv_func_stpcpy}" = "yes"; then
2206 cat >> confdefs.h <<\EOF
2207 #define HAVE_STPCPY 1
2212 if test $ac_cv_header_locale_h = yes; then
2213 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2214 echo "configure:2215: checking for LC_MESSAGES" >&5
2215 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2216 echo $ac_n "(cached) $ac_c" 1>&6
2217 else
2218 cat > conftest.$ac_ext <<EOF
2219 #line 2220 "configure"
2220 #include "confdefs.h"
2221 #include <locale.h>
2222 int main() {
2223 return LC_MESSAGES
2224 ; return 0; }
2226 if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2227 rm -rf conftest*
2228 am_cv_val_LC_MESSAGES=yes
2229 else
2230 echo "configure: failed program was:" >&5
2231 cat conftest.$ac_ext >&5
2232 rm -rf conftest*
2233 am_cv_val_LC_MESSAGES=no
2235 rm -f conftest*
2238 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2239 if test $am_cv_val_LC_MESSAGES = yes; then
2240 cat >> confdefs.h <<\EOF
2241 #define HAVE_LC_MESSAGES 1
2246 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2247 echo "configure:2248: checking whether NLS is requested" >&5
2248 # Check whether --enable-nls or --disable-nls was given.
2249 if test "${enable_nls+set}" = set; then
2250 enableval="$enable_nls"
2251 USE_NLS=$enableval
2252 else
2253 USE_NLS=yes
2256 echo "$ac_t""$USE_NLS" 1>&6
2259 USE_INCLUDED_LIBINTL=no
2261 if test "$USE_NLS" = "yes"; then
2262 cat >> confdefs.h <<\EOF
2263 #define ENABLE_NLS 1
2266 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2267 echo "configure:2268: checking whether included gettext is requested" >&5
2268 # Check whether --with-included-gettext or --without-included-gettext was given.
2269 if test "${with_included_gettext+set}" = set; then
2270 withval="$with_included_gettext"
2271 nls_cv_force_use_gnu_gettext=$withval
2272 else
2273 nls_cv_force_use_gnu_gettext=no
2276 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2278 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2279 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2280 nls_cv_header_intl=
2281 nls_cv_header_libgt=
2282 CATOBJEXT=NONE
2284 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2285 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2286 echo "configure:2287: checking for libintl.h" >&5
2287 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2288 echo $ac_n "(cached) $ac_c" 1>&6
2289 else
2290 cat > conftest.$ac_ext <<EOF
2291 #line 2292 "configure"
2292 #include "confdefs.h"
2293 #include <libintl.h>
2295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2296 { (eval echo configure:2297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2298 if test -z "$ac_err"; then
2299 rm -rf conftest*
2300 eval "ac_cv_header_$ac_safe=yes"
2301 else
2302 echo "$ac_err" >&5
2303 echo "configure: failed program was:" >&5
2304 cat conftest.$ac_ext >&5
2305 rm -rf conftest*
2306 eval "ac_cv_header_$ac_safe=no"
2308 rm -f conftest*
2310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2311 echo "$ac_t""yes" 1>&6
2312 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2313 echo "configure:2314: checking for gettext in libc" >&5
2314 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2315 echo $ac_n "(cached) $ac_c" 1>&6
2316 else
2317 cat > conftest.$ac_ext <<EOF
2318 #line 2319 "configure"
2319 #include "confdefs.h"
2320 #include <libintl.h>
2321 int main() {
2322 return (int) gettext ("")
2323 ; return 0; }
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326 rm -rf conftest*
2327 gt_cv_func_gettext_libc=yes
2328 else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -rf conftest*
2332 gt_cv_func_gettext_libc=no
2334 rm -f conftest*
2337 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2339 if test "$gt_cv_func_gettext_libc" != "yes"; then
2340 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2341 echo "configure:2342: checking for bindtextdomain in -lintl" >&5
2342 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2344 echo $ac_n "(cached) $ac_c" 1>&6
2345 else
2346 ac_save_LIBS="$LIBS"
2347 LIBS="-lintl $LIBS"
2348 cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 /* Override any gcc2 internal prototype to avoid an error. */
2352 /* We use char because int might match the return type of a gcc2
2353 builtin and then its argument prototype would still apply. */
2354 char bindtextdomain();
2356 int main() {
2357 bindtextdomain()
2358 ; return 0; }
2360 if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2361 rm -rf conftest*
2362 eval "ac_cv_lib_$ac_lib_var=yes"
2363 else
2364 echo "configure: failed program was:" >&5
2365 cat conftest.$ac_ext >&5
2366 rm -rf conftest*
2367 eval "ac_cv_lib_$ac_lib_var=no"
2369 rm -f conftest*
2370 LIBS="$ac_save_LIBS"
2373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2374 echo "$ac_t""yes" 1>&6
2375 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2376 echo "configure:2377: checking for gettext in libintl" >&5
2377 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2378 echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380 cat > conftest.$ac_ext <<EOF
2381 #line 2382 "configure"
2382 #include "confdefs.h"
2384 int main() {
2385 return (int) gettext ("")
2386 ; return 0; }
2388 if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2389 rm -rf conftest*
2390 gt_cv_func_gettext_libintl=yes
2391 else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 gt_cv_func_gettext_libintl=no
2397 rm -f conftest*
2400 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2401 else
2402 echo "$ac_t""no" 1>&6
2407 if test "$gt_cv_func_gettext_libc" = "yes" \
2408 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2409 cat >> confdefs.h <<\EOF
2410 #define HAVE_GETTEXT 1
2413 # Extract the first word of "msgfmt", so it can be a program name with args.
2414 set dummy msgfmt; ac_word=$2
2415 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2416 echo "configure:2417: checking for $ac_word" >&5
2417 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2418 echo $ac_n "(cached) $ac_c" 1>&6
2419 else
2420 case "$MSGFMT" in
2422 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2425 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2426 for ac_dir in $PATH; do
2427 test -z "$ac_dir" && ac_dir=.
2428 if test -f $ac_dir/$ac_word; then
2429 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2430 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2431 break
2434 done
2435 IFS="$ac_save_ifs"
2436 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2438 esac
2440 MSGFMT="$ac_cv_path_MSGFMT"
2441 if test -n "$MSGFMT"; then
2442 echo "$ac_t""$MSGFMT" 1>&6
2443 else
2444 echo "$ac_t""no" 1>&6
2446 if test "$MSGFMT" != "no"; then
2447 for ac_func in dcgettext
2449 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2450 echo "configure:2451: checking for $ac_func" >&5
2451 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2453 else
2454 cat > conftest.$ac_ext <<EOF
2455 #line 2456 "configure"
2456 #include "confdefs.h"
2457 /* System header to define __stub macros and hopefully few prototypes,
2458 which can conflict with char $ac_func(); below. */
2459 #include <assert.h>
2460 /* Override any gcc2 internal prototype to avoid an error. */
2461 /* We use char because int might match the return type of a gcc2
2462 builtin and then its argument prototype would still apply. */
2463 char $ac_func();
2465 int main() {
2467 /* The GNU C library defines this for functions which it implements
2468 to always fail with ENOSYS. Some functions are actually named
2469 something starting with __ and the normal name is an alias. */
2470 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2471 choke me
2472 #else
2473 $ac_func();
2474 #endif
2476 ; return 0; }
2478 if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479 rm -rf conftest*
2480 eval "ac_cv_func_$ac_func=yes"
2481 else
2482 echo "configure: failed program was:" >&5
2483 cat conftest.$ac_ext >&5
2484 rm -rf conftest*
2485 eval "ac_cv_func_$ac_func=no"
2487 rm -f conftest*
2490 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2491 echo "$ac_t""yes" 1>&6
2492 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2493 cat >> confdefs.h <<EOF
2494 #define $ac_tr_func 1
2497 else
2498 echo "$ac_t""no" 1>&6
2500 done
2502 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2503 set dummy gmsgfmt; ac_word=$2
2504 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2505 echo "configure:2506: checking for $ac_word" >&5
2506 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2507 echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509 case "$GMSGFMT" in
2511 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2513 ?:/*)
2514 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2517 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2518 for ac_dir in $PATH; do
2519 test -z "$ac_dir" && ac_dir=.
2520 if test -f $ac_dir/$ac_word; then
2521 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2522 break
2524 done
2525 IFS="$ac_save_ifs"
2526 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2528 esac
2530 GMSGFMT="$ac_cv_path_GMSGFMT"
2531 if test -n "$GMSGFMT"; then
2532 echo "$ac_t""$GMSGFMT" 1>&6
2533 else
2534 echo "$ac_t""no" 1>&6
2537 # Extract the first word of "xgettext", so it can be a program name with args.
2538 set dummy xgettext; ac_word=$2
2539 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2540 echo "configure:2541: checking for $ac_word" >&5
2541 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2542 echo $ac_n "(cached) $ac_c" 1>&6
2543 else
2544 case "$XGETTEXT" in
2546 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2549 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2550 for ac_dir in $PATH; do
2551 test -z "$ac_dir" && ac_dir=.
2552 if test -f $ac_dir/$ac_word; then
2553 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2554 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2555 break
2558 done
2559 IFS="$ac_save_ifs"
2560 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2562 esac
2564 XGETTEXT="$ac_cv_path_XGETTEXT"
2565 if test -n "$XGETTEXT"; then
2566 echo "$ac_t""$XGETTEXT" 1>&6
2567 else
2568 echo "$ac_t""no" 1>&6
2571 cat > conftest.$ac_ext <<EOF
2572 #line 2573 "configure"
2573 #include "confdefs.h"
2575 int main() {
2576 extern int _nl_msg_cat_cntr;
2577 return _nl_msg_cat_cntr
2578 ; return 0; }
2580 if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2581 rm -rf conftest*
2582 CATOBJEXT=.gmo
2583 DATADIRNAME=share
2584 else
2585 echo "configure: failed program was:" >&5
2586 cat conftest.$ac_ext >&5
2587 rm -rf conftest*
2588 CATOBJEXT=.mo
2589 DATADIRNAME=lib
2591 rm -f conftest*
2592 INSTOBJEXT=.mo
2596 else
2597 echo "$ac_t""no" 1>&6
2602 if test "$CATOBJEXT" = "NONE"; then
2603 nls_cv_use_gnu_gettext=yes
2607 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2608 INTLOBJS="\$(GETTOBJS)"
2609 # Extract the first word of "msgfmt", so it can be a program name with args.
2610 set dummy msgfmt; ac_word=$2
2611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2612 echo "configure:2613: checking for $ac_word" >&5
2613 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2614 echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616 case "$MSGFMT" in
2618 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2622 for ac_dir in $PATH; do
2623 test -z "$ac_dir" && ac_dir=.
2624 if test -f $ac_dir/$ac_word; then
2625 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2626 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2627 break
2630 done
2631 IFS="$ac_save_ifs"
2632 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2634 esac
2636 MSGFMT="$ac_cv_path_MSGFMT"
2637 if test -n "$MSGFMT"; then
2638 echo "$ac_t""$MSGFMT" 1>&6
2639 else
2640 echo "$ac_t""no" 1>&6
2643 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2644 set dummy gmsgfmt; ac_word=$2
2645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2646 echo "configure:2647: checking for $ac_word" >&5
2647 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2648 echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650 case "$GMSGFMT" in
2652 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2654 ?:/*)
2655 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2658 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2659 for ac_dir in $PATH; do
2660 test -z "$ac_dir" && ac_dir=.
2661 if test -f $ac_dir/$ac_word; then
2662 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2663 break
2665 done
2666 IFS="$ac_save_ifs"
2667 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2669 esac
2671 GMSGFMT="$ac_cv_path_GMSGFMT"
2672 if test -n "$GMSGFMT"; then
2673 echo "$ac_t""$GMSGFMT" 1>&6
2674 else
2675 echo "$ac_t""no" 1>&6
2678 # Extract the first word of "xgettext", so it can be a program name with args.
2679 set dummy xgettext; ac_word=$2
2680 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2681 echo "configure:2682: checking for $ac_word" >&5
2682 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2683 echo $ac_n "(cached) $ac_c" 1>&6
2684 else
2685 case "$XGETTEXT" in
2687 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2691 for ac_dir in $PATH; do
2692 test -z "$ac_dir" && ac_dir=.
2693 if test -f $ac_dir/$ac_word; then
2694 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2695 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2696 break
2699 done
2700 IFS="$ac_save_ifs"
2701 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2703 esac
2705 XGETTEXT="$ac_cv_path_XGETTEXT"
2706 if test -n "$XGETTEXT"; then
2707 echo "$ac_t""$XGETTEXT" 1>&6
2708 else
2709 echo "$ac_t""no" 1>&6
2713 USE_INCLUDED_LIBINTL=yes
2714 CATOBJEXT=.gmo
2715 INSTOBJEXT=.mo
2716 DATADIRNAME=share
2717 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2718 INTLLIBS=$INTLDEPS
2719 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2720 nls_cv_header_intl=libintl.h
2721 nls_cv_header_libgt=libgettext.h
2724 if test "$XGETTEXT" != ":"; then
2725 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2727 else
2728 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2729 XGETTEXT=":"
2733 # We need to process the po/ directory.
2734 POSUB=po
2735 else
2736 DATADIRNAME=share
2737 nls_cv_header_intl=libintl.h
2738 nls_cv_header_libgt=libgettext.h
2741 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2742 # because some of the sources are only built for this goal.
2743 if test "$PACKAGE" = gettext; then
2744 USE_NLS=yes
2745 USE_INCLUDED_LIBINTL=yes
2748 for lang in $ALL_LINGUAS; do
2749 GMOFILES="$GMOFILES $lang.gmo"
2750 POFILES="$POFILES $lang.po"
2751 done
2766 if test "x$CATOBJEXT" != "x"; then
2767 if test "x$ALL_LINGUAS" = "x"; then
2768 LINGUAS=
2769 else
2770 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2771 echo "configure:2772: checking for catalogs to be installed" >&5
2772 NEW_LINGUAS=
2773 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2774 case "$ALL_LINGUAS" in
2775 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2776 esac
2777 done
2778 LINGUAS=$NEW_LINGUAS
2779 echo "$ac_t""$LINGUAS" 1>&6
2782 if test -n "$LINGUAS"; then
2783 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2787 if test $ac_cv_header_locale_h = yes; then
2788 INCLUDE_LOCALE_H="#include <locale.h>"
2789 else
2790 INCLUDE_LOCALE_H="\
2791 /* The system does not provide the header <locale.h>. Take care yourself. */"
2795 if test -f $srcdir/po2tbl.sed.in; then
2796 if test "$CATOBJEXT" = ".cat"; then
2797 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2798 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2799 echo "configure:2800: checking for linux/version.h" >&5
2800 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2801 echo $ac_n "(cached) $ac_c" 1>&6
2802 else
2803 cat > conftest.$ac_ext <<EOF
2804 #line 2805 "configure"
2805 #include "confdefs.h"
2806 #include <linux/version.h>
2808 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2809 { (eval echo configure:2810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2810 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2811 if test -z "$ac_err"; then
2812 rm -rf conftest*
2813 eval "ac_cv_header_$ac_safe=yes"
2814 else
2815 echo "$ac_err" >&5
2816 echo "configure: failed program was:" >&5
2817 cat conftest.$ac_ext >&5
2818 rm -rf conftest*
2819 eval "ac_cv_header_$ac_safe=no"
2821 rm -f conftest*
2823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2824 echo "$ac_t""yes" 1>&6
2825 msgformat=linux
2826 else
2827 echo "$ac_t""no" 1>&6
2828 msgformat=xopen
2832 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2834 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2835 $srcdir/po2tbl.sed.in > po2tbl.sed
2838 if test "$PACKAGE" = "gettext"; then
2839 GT_NO="#NO#"
2840 GT_YES=
2841 else
2842 GT_NO=
2843 GT_YES="#YES#"
2848 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2854 if test -d $srcdir/po; then
2855 test -d po || mkdir po
2856 if test "x$srcdir" != "x."; then
2857 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2858 posrcprefix="$srcdir/"
2859 else
2860 posrcprefix="../$srcdir/"
2862 else
2863 posrcprefix="../"
2865 rm -f po/POTFILES
2866 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2867 < $srcdir/po/POTFILES.in > po/POTFILES
2871 # Check for common headers.
2872 # FIXME: Seems to me this can cause problems for i386-windows hosts.
2873 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
2874 for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
2876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2878 echo "configure:2879: checking for $ac_hdr" >&5
2879 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2880 echo $ac_n "(cached) $ac_c" 1>&6
2881 else
2882 cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885 #include <$ac_hdr>
2887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2888 { (eval echo configure:2889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2890 if test -z "$ac_err"; then
2891 rm -rf conftest*
2892 eval "ac_cv_header_$ac_safe=yes"
2893 else
2894 echo "$ac_err" >&5
2895 echo "configure: failed program was:" >&5
2896 cat conftest.$ac_ext >&5
2897 rm -rf conftest*
2898 eval "ac_cv_header_$ac_safe=no"
2900 rm -f conftest*
2902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2903 echo "$ac_t""yes" 1>&6
2904 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2905 cat >> confdefs.h <<EOF
2906 #define $ac_tr_hdr 1
2909 else
2910 echo "$ac_t""no" 1>&6
2912 done
2914 for ac_hdr in sys/time.h sys/resource.h
2916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2918 echo "configure:2919: checking for $ac_hdr" >&5
2919 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2920 echo $ac_n "(cached) $ac_c" 1>&6
2921 else
2922 cat > conftest.$ac_ext <<EOF
2923 #line 2924 "configure"
2924 #include "confdefs.h"
2925 #include <$ac_hdr>
2927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2928 { (eval echo configure:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2930 if test -z "$ac_err"; then
2931 rm -rf conftest*
2932 eval "ac_cv_header_$ac_safe=yes"
2933 else
2934 echo "$ac_err" >&5
2935 echo "configure: failed program was:" >&5
2936 cat conftest.$ac_ext >&5
2937 rm -rf conftest*
2938 eval "ac_cv_header_$ac_safe=no"
2940 rm -f conftest*
2942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2943 echo "$ac_t""yes" 1>&6
2944 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2945 cat >> confdefs.h <<EOF
2946 #define $ac_tr_hdr 1
2949 else
2950 echo "$ac_t""no" 1>&6
2952 done
2954 for ac_hdr in fcntl.h fpu_control.h
2956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2958 echo "configure:2959: checking for $ac_hdr" >&5
2959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2960 echo $ac_n "(cached) $ac_c" 1>&6
2961 else
2962 cat > conftest.$ac_ext <<EOF
2963 #line 2964 "configure"
2964 #include "confdefs.h"
2965 #include <$ac_hdr>
2967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2968 { (eval echo configure:2969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2970 if test -z "$ac_err"; then
2971 rm -rf conftest*
2972 eval "ac_cv_header_$ac_safe=yes"
2973 else
2974 echo "$ac_err" >&5
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2977 rm -rf conftest*
2978 eval "ac_cv_header_$ac_safe=no"
2980 rm -f conftest*
2982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2983 echo "$ac_t""yes" 1>&6
2984 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2985 cat >> confdefs.h <<EOF
2986 #define $ac_tr_hdr 1
2989 else
2990 echo "$ac_t""no" 1>&6
2992 done
2994 for ac_hdr in dlfcn.h errno.h sys/stat.h
2996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2998 echo "configure:2999: checking for $ac_hdr" >&5
2999 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3001 else
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3004 "configure"
3004 #include "confdefs.h"
3005 #include <$ac_hdr>
3007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3008 { (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3010 if test -z "$ac_err"; then
3011 rm -rf conftest*
3012 eval "ac_cv_header_$ac_safe=yes"
3013 else
3014 echo "$ac_err" >&5
3015 echo "configure: failed program was:" >&5
3016 cat conftest.$ac_ext >&5
3017 rm -rf conftest*
3018 eval "ac_cv_header_$ac_safe=no"
3020 rm -f conftest*
3022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3023 echo "$ac_t""yes" 1>&6
3024 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3025 cat >> confdefs.h <<EOF
3026 #define $ac_tr_hdr 1
3029 else
3030 echo "$ac_t""no" 1>&6
3032 done
3034 for ac_func in getrusage time sigaction __setfpucw
3036 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3037 echo "configure:3038: checking for $ac_func" >&5
3038 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3039 echo $ac_n "(cached) $ac_c" 1>&6
3040 else
3041 cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 /* System header to define __stub macros and hopefully few prototypes,
3045 which can conflict with char $ac_func(); below. */
3046 #include <assert.h>
3047 /* Override any gcc2 internal prototype to avoid an error. */
3048 /* We use char because int might match the return type of a gcc2
3049 builtin and then its argument prototype would still apply. */
3050 char $ac_func();
3052 int main() {
3054 /* The GNU C library defines this for functions which it implements
3055 to always fail with ENOSYS. Some functions are actually named
3056 something starting with __ and the normal name is an alias. */
3057 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3058 choke me
3059 #else
3060 $ac_func();
3061 #endif
3063 ; return 0; }
3065 if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3066 rm -rf conftest*
3067 eval "ac_cv_func_$ac_func=yes"
3068 else
3069 echo "configure: failed program was:" >&5
3070 cat conftest.$ac_ext >&5
3071 rm -rf conftest*
3072 eval "ac_cv_func_$ac_func=no"
3074 rm -f conftest*
3077 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3078 echo "$ac_t""yes" 1>&6
3079 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3080 cat >> confdefs.h <<EOF
3081 #define $ac_tr_func 1
3084 else
3085 echo "$ac_t""no" 1>&6
3087 done
3090 # Check for socket libraries
3091 echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
3092 echo "configure:3093: checking for bind in -lsocket" >&5
3093 ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
3094 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3095 echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097 ac_save_LIBS="$LIBS"
3098 LIBS="-lsocket $LIBS"
3099 cat > conftest.$ac_ext <<EOF
3100 #line 3101 "configure"
3101 #include "confdefs.h"
3102 /* Override any gcc2 internal prototype to avoid an error. */
3103 /* We use char because int might match the return type of a gcc2
3104 builtin and then its argument prototype would still apply. */
3105 char bind();
3107 int main() {
3108 bind()
3109 ; return 0; }
3111 if { (eval echo configure:3112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3112 rm -rf conftest*
3113 eval "ac_cv_lib_$ac_lib_var=yes"
3114 else
3115 echo "configure: failed program was:" >&5
3116 cat conftest.$ac_ext >&5
3117 rm -rf conftest*
3118 eval "ac_cv_lib_$ac_lib_var=no"
3120 rm -f conftest*
3121 LIBS="$ac_save_LIBS"
3124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3125 echo "$ac_t""yes" 1>&6
3126 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3127 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3128 cat >> confdefs.h <<EOF
3129 #define $ac_tr_lib 1
3132 LIBS="-lsocket $LIBS"
3134 else
3135 echo "$ac_t""no" 1>&6
3138 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3139 echo "configure:3140: checking for gethostbyname in -lnsl" >&5
3140 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3141 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3142 echo $ac_n "(cached) $ac_c" 1>&6
3143 else
3144 ac_save_LIBS="$LIBS"
3145 LIBS="-lnsl $LIBS"
3146 cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 /* Override any gcc2 internal prototype to avoid an error. */
3150 /* We use char because int might match the return type of a gcc2
3151 builtin and then its argument prototype would still apply. */
3152 char gethostbyname();
3154 int main() {
3155 gethostbyname()
3156 ; return 0; }
3158 if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3159 rm -rf conftest*
3160 eval "ac_cv_lib_$ac_lib_var=yes"
3161 else
3162 echo "configure: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
3164 rm -rf conftest*
3165 eval "ac_cv_lib_$ac_lib_var=no"
3167 rm -f conftest*
3168 LIBS="$ac_save_LIBS"
3171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3172 echo "$ac_t""yes" 1>&6
3173 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3174 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3175 cat >> confdefs.h <<EOF
3176 #define $ac_tr_lib 1
3179 LIBS="-lnsl $LIBS"
3181 else
3182 echo "$ac_t""no" 1>&6
3186 . ${srcdir}/../../bfd/configure.host
3190 USE_MAINTAINER_MODE=no
3191 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
3192 if test "${enable_maintainer_mode+set}" = set; then
3193 enableval="$enable_maintainer_mode"
3194 case "${enableval}" in
3195 yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
3196 no) MAINT="#" ;;
3197 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
3198 esac
3199 if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
3200 echo "Setting maintainer mode" 6>&1
3202 else
3203 MAINT="#"
3208 # Check whether --enable-sim-bswap or --disable-sim-bswap was given.
3209 if test "${enable_sim_bswap+set}" = set; then
3210 enableval="$enable_sim_bswap"
3211 case "${enableval}" in
3212 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
3213 no) sim_bswap="-DWITH_BSWAP=0";;
3214 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
3215 esac
3216 if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
3217 echo "Setting bswap flags = $sim_bswap" 6>&1
3219 else
3220 sim_bswap=""
3225 # Check whether --enable-sim-cflags or --disable-sim-cflags was given.
3226 if test "${enable_sim_cflags+set}" = set; then
3227 enableval="$enable_sim_cflags"
3228 case "${enableval}" in
3229 yes) sim_cflags="-O2 -fomit-frame-pointer";;
3230 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
3231 no) sim_cflags="";;
3232 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3233 esac
3234 if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
3235 echo "Setting sim cflags = $sim_cflags" 6>&1
3237 else
3238 sim_cflags=""
3243 # Check whether --enable-sim-debug or --disable-sim-debug was given.
3244 if test "${enable_sim_debug+set}" = set; then
3245 enableval="$enable_sim_debug"
3246 case "${enableval}" in
3247 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
3248 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
3249 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
3250 esac
3251 if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
3252 echo "Setting sim debug = $sim_debug" 6>&1
3254 else
3255 sim_debug=""
3260 # Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3261 if test "${enable_sim_stdio+set}" = set; then
3262 enableval="$enable_sim_stdio"
3263 case "${enableval}" in
3264 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3265 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3266 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3267 esac
3268 if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3269 echo "Setting stdio flags = $sim_stdio" 6>&1
3271 else
3272 sim_stdio=""
3277 # Check whether --enable-sim-trace or --disable-sim-trace was given.
3278 if test "${enable_sim_trace+set}" = set; then
3279 enableval="$enable_sim_trace"
3280 case "${enableval}" in
3281 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
3282 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
3283 [-0-9]*)
3284 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
3285 [a-z]*)
3286 sim_trace=""
3287 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3288 if test x"$sim_trace" = x; then
3289 sim_trace="-DWITH_TRACE='(TRACE_$x"
3290 else
3291 sim_trace="${sim_trace}|TRACE_$x"
3293 done
3294 sim_trace="$sim_trace)'" ;;
3295 esac
3296 if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3297 echo "Setting sim trace = $sim_trace" 6>&1
3299 else
3300 sim_trace=""
3305 # Check whether --enable-sim-profile or --disable-sim-profile was given.
3306 if test "${enable_sim_profile+set}" = set; then
3307 enableval="$enable_sim_profile"
3308 case "${enableval}" in
3309 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
3310 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
3311 [-0-9]*)
3312 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
3313 [a-z]*)
3314 sim_profile=""
3315 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3316 if test x"$sim_profile" = x; then
3317 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
3318 else
3319 sim_profile="${sim_profile}|PROFILE_$x"
3321 done
3322 sim_profile="$sim_profile)'" ;;
3323 esac
3324 if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
3325 echo "Setting sim profile = $sim_profile" 6>&1
3327 else
3328 sim_profile=""
3333 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3334 echo "configure:3335: checking return type of signal handlers" >&5
3335 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3336 echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338 cat > conftest.$ac_ext <<EOF
3339 #line 3340 "configure"
3340 #include "confdefs.h"
3341 #include <sys/types.h>
3342 #include <signal.h>
3343 #ifdef signal
3344 #undef signal
3345 #endif
3346 #ifdef __cplusplus
3347 extern "C" void (*signal (int, void (*)(int)))(int);
3348 #else
3349 void (*signal ()) ();
3350 #endif
3352 int main() {
3353 int i;
3354 ; return 0; }
3356 if { (eval echo configure:3357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3357 rm -rf conftest*
3358 ac_cv_type_signal=void
3359 else
3360 echo "configure: failed program was:" >&5
3361 cat conftest.$ac_ext >&5
3362 rm -rf conftest*
3363 ac_cv_type_signal=int
3365 rm -f conftest*
3368 echo "$ac_t""$ac_cv_type_signal" 1>&6
3369 cat >> confdefs.h <<EOF
3370 #define RETSIGTYPE $ac_cv_type_signal
3375 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3376 echo "configure:3377: checking for executable suffix" >&5
3377 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
3378 echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380 if test "$CYGWIN32" = yes; then
3381 am_cv_exeext=.exe
3382 else
3383 cat > am_c_test.c << 'EOF'
3384 int main() {
3385 /* Nothing needed here */
3388 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
3389 am_cv_exeext=`ls am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
3390 rm -f am_c_test*
3393 test x"${am_cv_exeext}" = x && am_cv_exeext=no
3395 EXEEXT=""
3396 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
3397 echo "$ac_t""${am_cv_exeext}" 1>&6
3400 sim_link_files=
3401 sim_link_links=
3403 sim_link_links=tconfig.h
3404 if test -f ${srcdir}/tconfig.in
3405 then
3406 sim_link_files=tconfig.in
3407 else
3408 sim_link_files=../common/tconfig.in
3411 # targ-vals.def points to the libc macro description file.
3412 case "${target}" in
3413 *-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
3414 esac
3415 sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
3416 sim_link_links="${sim_link_links} targ-vals.def"
3420 program_transform_name="s,^,${program_prefix}gx-,"
3421 target_alias="${target_alias}-gx"
3423 sim_link_files="${sim_link_files} m32r-sim.h ../../opcodes/m32r-opc.h"
3424 sim_link_links="${sim_link_links} cpu-sim.h cpu-opc.h"
3427 wire_endian="BIG_ENDIAN"
3428 default_endian=""
3429 # Check whether --enable-sim-endian or --disable-sim-endian was given.
3430 if test "${enable_sim_endian+set}" = set; then
3431 enableval="$enable_sim_endian"
3432 case "${enableval}" in
3433 b*|B*) sim_endian="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN";;
3434 l*|L*) sim_endian="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN";;
3435 yes) if test x"$wire_endian" != x; then
3436 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3437 else
3438 if test x"$default_endian" != x; then
3439 sim_endian="-DWITH_TARGET_BYTE_ORDER=${default_endian}"
3440 else
3441 echo "No hard-wired endian for target $target" 1>&6
3442 sim_endian="-DWITH_TARGET_BYTE_ORDER=0"
3444 fi;;
3445 no) if test x"$default_endian" != x; then
3446 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3447 else
3448 if test x"$wire_endian" != x; then
3449 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${wire_endian}"
3450 else
3451 echo "No default endian for target $target" 1>&6
3452 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=0"
3454 fi;;
3455 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-endian"" 1>&2; exit 1; }; sim_endian="";;
3456 esac
3457 if test x"$silent" != x"yes" && test x"$sim_endian" != x""; then
3458 echo "Setting endian flags = $sim_endian" 6>&1
3460 else
3461 if test x"$default_endian" != x; then
3462 sim_endian="-DWITH_DEFAULT_TARGET_BYTE_ORDER=${default_endian}"
3463 else
3464 if test x"$wire_endian" != x; then
3465 sim_endian="-DWITH_TARGET_BYTE_ORDER=${wire_endian}"
3466 else
3467 sim_endian=
3472 wire_alignment="NONSTRICT_ALIGNMENT"
3473 default_alignment=""
3475 # Check whether --enable-sim-alignment or --disable-sim-alignment was given.
3476 if test "${enable_sim_alignment+set}" = set; then
3477 enableval="$enable_sim_alignment"
3478 case "${enableval}" in
3479 strict | STRICT) sim_alignment="-DWITH_ALIGNMENT=STRICT_ALIGNMENT";;
3480 nonstrict | NONSTRICT) sim_alignment="-DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT";;
3481 forced | FORCED) sim_alignment="-DWITH_ALIGNMENT=FORCED_ALIGNMENT";;
3482 yes) if test x"$wire_alignment" != x; then
3483 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3484 else
3485 if test x"$default_alignment" != x; then
3486 sim_alignment="-DWITH_ALIGNMENT=${default_alignment}"
3487 else
3488 echo "No hard-wired alignment for target $target" 1>&6
3489 sim_alignment="-DWITH_ALIGNMENT=0"
3491 fi;;
3492 no) if test x"$default_alignment" != x; then
3493 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3494 else
3495 if test x"$wire_alignment" != x; then
3496 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}"
3497 else
3498 echo "No default alignment for target $target" 1>&6
3499 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0"
3501 fi;;
3502 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-alignment"" 1>&2; exit 1; }; sim_alignment="";;
3503 esac
3504 if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then
3505 echo "Setting alignment flags = $sim_alignment" 6>&1
3507 else
3508 if test x"$default_alignment" != x; then
3509 sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}"
3510 else
3511 if test x"$wire_alignment" != x; then
3512 sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}"
3513 else
3514 sim_alignment=
3520 # Check whether --enable-sim-hostendian or --disable-sim-hostendian was given.
3521 if test "${enable_sim_hostendian+set}" = set; then
3522 enableval="$enable_sim_hostendian"
3523 case "${enableval}" in
3524 no) sim_hostendian="-DWITH_HOST_BYTE_ORDER=0";;
3525 b*|B*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN";;
3526 l*|L*) sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN";;
3527 *) { echo "configure: error: "Unknown value $enableval for --enable-sim-hostendian"" 1>&2; exit 1; }; sim_hostendian="";;
3528 esac
3529 if test x"$silent" != x"yes" && test x"$sim_hostendian" != x""; then
3530 echo "Setting hostendian flags = $sim_hostendian" 6>&1
3532 else
3534 if test "x$cross_compiling" = "xno"; then
3535 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3536 echo "configure:3537: checking whether byte ordering is bigendian" >&5
3537 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3538 echo $ac_n "(cached) $ac_c" 1>&6
3539 else
3540 ac_cv_c_bigendian=unknown
3541 # See if sys/param.h defines the BYTE_ORDER macro.
3542 cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 #include <sys/types.h>
3546 #include <sys/param.h>
3547 int main() {
3549 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3550 bogus endian macros
3551 #endif
3552 ; return 0; }
3554 if { (eval echo configure:3555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3555 rm -rf conftest*
3556 # It does; now see whether it defined to BIG_ENDIAN or not.
3557 cat > conftest.$ac_ext <<EOF
3558 #line 3559 "configure"
3559 #include "confdefs.h"
3560 #include <sys/types.h>
3561 #include <sys/param.h>
3562 int main() {
3564 #if BYTE_ORDER != BIG_ENDIAN
3565 not big endian
3566 #endif
3567 ; return 0; }
3569 if { (eval echo configure:3570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3570 rm -rf conftest*
3571 ac_cv_c_bigendian=yes
3572 else
3573 echo "configure: failed program was:" >&5
3574 cat conftest.$ac_ext >&5
3575 rm -rf conftest*
3576 ac_cv_c_bigendian=no
3578 rm -f conftest*
3579 else
3580 echo "configure: failed program was:" >&5
3581 cat conftest.$ac_ext >&5
3583 rm -f conftest*
3584 if test $ac_cv_c_bigendian = unknown; then
3585 if test "$cross_compiling" = yes; then
3586 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3587 else
3588 cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591 main () {
3592 /* Are we little or big endian? From Harbison&Steele. */
3593 union
3595 long l;
3596 char c[sizeof (long)];
3597 } u;
3598 u.l = 1;
3599 exit (u.c[sizeof (long) - 1] == 1);
3602 if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3603 then
3604 ac_cv_c_bigendian=no
3605 else
3606 echo "configure: failed program was:" >&5
3607 cat conftest.$ac_ext >&5
3608 rm -fr conftest*
3609 ac_cv_c_bigendian=yes
3611 rm -fr conftest*
3617 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3618 if test $ac_cv_c_bigendian = yes; then
3619 cat >> confdefs.h <<\EOF
3620 #define WORDS_BIGENDIAN 1
3625 if test $ac_cv_c_bigendian = yes; then
3626 sim_hostendian="-DWITH_HOST_BYTE_ORDER=BIG_ENDIAN"
3627 else
3628 sim_hostendian="-DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN"
3630 else
3631 sim_hostendian="-DWITH_HOST_BYTE_ORDER=0"
3636 default_sim_default_model="m32r/d"
3637 # Check whether --enable-sim-default-model or --disable-sim-default-model was given.
3638 if test "${enable_sim_default_model+set}" = set; then
3639 enableval="$enable_sim_default_model"
3640 case "${enableval}" in
3641 yes|no) { echo "configure: error: "Missing argument to --enable-sim-default-model"" 1>&2; exit 1; };;
3642 *) sim_default_model="-DWITH_DEFAULT_MODEL='\"${enableval}\"'";;
3643 esac
3644 if test x"$silent" != x"yes" && test x"$sim_default_model" != x""; then
3645 echo "Setting default model = $sim_default_model" 6>&1
3647 else
3648 sim_default_model="-DWITH_DEFAULT_MODEL='\"${default_sim_default_model}\"'"
3653 # Check whether --enable-sim-environment or --disable-sim-environment was given.
3654 if test "${enable_sim_environment+set}" = set; then
3655 enableval="$enable_sim_environment"
3656 case "${enableval}" in
3657 all | ALL) sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT";;
3658 user | USER) sim_environment="-DWITH_ENVIRONMENT=USER_ENVIRONMENT";;
3659 virtual | VIRTUAL) sim_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT";;
3660 operating | OPERATING) sim_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT";;
3661 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-environment"" 1>&2; exit 1; };
3662 sim_environment="";;
3663 esac
3664 if test x"$silent" != x"yes" && test x"$sim_environment" != x""; then
3665 echo "Setting sim environment = $sim_environment" 6>&1
3667 else
3668 sim_environment="-DWITH_ENVIRONMENT=ALL_ENVIRONMENT"
3672 default_sim_inline=""
3673 # Check whether --enable-sim-inline or --disable-sim-inline was given.
3674 if test "${enable_sim_inline+set}" = set; then
3675 enableval="$enable_sim_inline"
3676 sim_inline=""
3677 case "$enableval" in
3678 no) sim_inline="-DDEFAULT_INLINE=0";;
3679 0) sim_inline="-DDEFAULT_INLINE=0";;
3680 yes | 2) sim_inline="-DDEFAULT_INLINE=ALL_C_INLINE";;
3681 1) sim_inline="-DDEFAULT_INLINE=INLINE_LOCALS";;
3682 *) for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3683 new_flag=""
3684 case "$x" in
3685 *_INLINE=*) new_flag="-D$x";;
3686 *=*) new_flag=`echo "$x" | sed -e "s/=/_INLINE=/" -e "s/^/-D/"`;;
3687 *_INLINE) new_flag="-D$x=ALL_C_INLINE";;
3688 *) new_flag="-D$x""_INLINE=ALL_C_INLINE";;
3689 esac
3690 if test x"$sim_inline" = x""; then
3691 sim_inline="$new_flag"
3692 else
3693 sim_inline="$sim_inline $new_flag"
3695 done;;
3696 esac
3697 if test x"$silent" != x"yes" && test x"$sim_inline" != x""; then
3698 echo "Setting inline flags = $sim_inline" 6>&1
3700 else
3702 if test "x$cross_compiling" = "xno"; then
3703 if test x"$GCC" != "x" -a x"${default_sim_inline}" != "x" ; then
3704 sim_inline="${default_sim_inline}"
3705 if test x"$silent" != x"yes"; then
3706 echo "Setting inline flags = $sim_inline" 6>&1
3708 else
3709 sim_inline=""
3711 else
3712 sim_inline="-DDEFAULT_INLINE=0"
3717 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3718 echo "configure:3719: checking for dlopen in -ldl" >&5
3719 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3720 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3721 echo $ac_n "(cached) $ac_c" 1>&6
3722 else
3723 ac_save_LIBS="$LIBS"
3724 LIBS="-ldl $LIBS"
3725 cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3728 /* Override any gcc2 internal prototype to avoid an error. */
3729 /* We use char because int might match the return type of a gcc2
3730 builtin and then its argument prototype would still apply. */
3731 char dlopen();
3733 int main() {
3734 dlopen()
3735 ; return 0; }
3737 if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3738 rm -rf conftest*
3739 eval "ac_cv_lib_$ac_lib_var=yes"
3740 else
3741 echo "configure: failed program was:" >&5
3742 cat conftest.$ac_ext >&5
3743 rm -rf conftest*
3744 eval "ac_cv_lib_$ac_lib_var=no"
3746 rm -f conftest*
3747 LIBS="$ac_save_LIBS"
3750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751 echo "$ac_t""yes" 1>&6
3752 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3753 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3754 cat >> confdefs.h <<EOF
3755 #define $ac_tr_lib 1
3758 LIBS="-ldl $LIBS"
3760 else
3761 echo "$ac_t""no" 1>&6
3764 for ac_func in getenv
3766 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3767 echo "configure:3768: checking for $ac_func" >&5
3768 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3769 echo $ac_n "(cached) $ac_c" 1>&6
3770 else
3771 cat > conftest.$ac_ext <<EOF
3772 #line 3773 "configure"
3773 #include "confdefs.h"
3774 /* System header to define __stub macros and hopefully few prototypes,
3775 which can conflict with char $ac_func(); below. */
3776 #include <assert.h>
3777 /* Override any gcc2 internal prototype to avoid an error. */
3778 /* We use char because int might match the return type of a gcc2
3779 builtin and then its argument prototype would still apply. */
3780 char $ac_func();
3782 int main() {
3784 /* The GNU C library defines this for functions which it implements
3785 to always fail with ENOSYS. Some functions are actually named
3786 something starting with __ and the normal name is an alias. */
3787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3788 choke me
3789 #else
3790 $ac_func();
3791 #endif
3793 ; return 0; }
3795 if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3796 rm -rf conftest*
3797 eval "ac_cv_func_$ac_func=yes"
3798 else
3799 echo "configure: failed program was:" >&5
3800 cat conftest.$ac_ext >&5
3801 rm -rf conftest*
3802 eval "ac_cv_func_$ac_func=no"
3804 rm -f conftest*
3807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3808 echo "$ac_t""yes" 1>&6
3809 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3810 cat >> confdefs.h <<EOF
3811 #define $ac_tr_func 1
3814 else
3815 echo "$ac_t""no" 1>&6
3817 done
3822 trap '' 1 2 15
3823 cat > confcache <<\EOF
3824 # This file is a shell script that caches the results of configure
3825 # tests run on this system so they can be shared between configure
3826 # scripts and configure runs. It is not useful on other systems.
3827 # If it contains results you don't want to keep, you may remove or edit it.
3829 # By default, configure uses ./config.cache as the cache file,
3830 # creating it if it does not exist already. You can give configure
3831 # the --cache-file=FILE option to use a different cache file; that is
3832 # what configure does when it calls configure scripts in
3833 # subdirectories, so they share the cache.
3834 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3835 # config.status only pays attention to the cache file if you give it the
3836 # --recheck option to rerun configure.
3839 # The following way of writing the cache mishandles newlines in values,
3840 # but we know of no workaround that is simple, portable, and efficient.
3841 # So, don't put newlines in cache variables' values.
3842 # Ultrix sh set writes to stderr and can't be redirected directly,
3843 # and sets the high bit in the cache file unless we assign to the vars.
3844 (set) 2>&1 |
3845 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
3846 *ac_space=\ *)
3847 # `set' does not quote correctly, so add quotes (double-quote substitution
3848 # turns \\\\ into \\, and sed turns \\ into \).
3849 sed -n \
3850 -e "s/'/'\\\\''/g" \
3851 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3854 # `set' quotes correctly as required by POSIX, so do not add quotes.
3855 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3857 esac >> confcache
3858 if cmp -s $cache_file confcache; then
3860 else
3861 if test -w $cache_file; then
3862 echo "updating cache $cache_file"
3863 cat confcache > $cache_file
3864 else
3865 echo "not updating unwritable cache $cache_file"
3868 rm -f confcache
3870 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3872 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3873 # Let make expand exec_prefix.
3874 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3876 # Any assignment to VPATH causes Sun make to only execute
3877 # the first set of double-colon rules, so remove it if not needed.
3878 # If there is a colon in the path, we need to keep it.
3879 if test "x$srcdir" = x.; then
3880 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3883 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3885 DEFS=-DHAVE_CONFIG_H
3887 # Without the "./", some shells look in PATH for config.status.
3888 : ${CONFIG_STATUS=./config.status}
3890 echo creating $CONFIG_STATUS
3891 rm -f $CONFIG_STATUS
3892 cat > $CONFIG_STATUS <<EOF
3893 #! /bin/sh
3894 # Generated automatically by configure.
3895 # Run this file to recreate the current configuration.
3896 # This directory was configured as follows,
3897 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3899 # $0 $ac_configure_args
3901 # Compiler output produced by configure, useful for debugging
3902 # configure, is in ./config.log if it exists.
3904 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3905 for ac_option
3907 case "\$ac_option" in
3908 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3909 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3910 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3911 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3912 echo "$CONFIG_STATUS generated by autoconf version 2.12.2"
3913 exit 0 ;;
3914 -help | --help | --hel | --he | --h)
3915 echo "\$ac_cs_usage"; exit 0 ;;
3916 *) echo "\$ac_cs_usage"; exit 1 ;;
3917 esac
3918 done
3920 ac_given_srcdir=$srcdir
3921 ac_given_INSTALL="$INSTALL"
3923 trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3925 cat >> $CONFIG_STATUS <<EOF
3927 # Protect against being on the right side of a sed subst in config.status.
3928 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3929 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3930 $ac_vpsub
3931 $extrasub
3932 s%@sim_environment@%$sim_environment%g
3933 s%@sim_alignment@%$sim_alignment%g
3934 s%@sim_assert@%$sim_assert%g
3935 s%@sim_bitsize@%$sim_bitsize%g
3936 s%@sim_endian@%$sim_endian%g
3937 s%@sim_hostendian@%$sim_hostendian%g
3938 s%@sim_float@%$sim_float%g
3939 s%@sim_scache@%$sim_scache%g
3940 s%@sim_default_model@%$sim_default_model%g
3941 s%@sim_hw_cflags@%$sim_hw_cflags%g
3942 s%@sim_hw_objs@%$sim_hw_objs%g
3943 s%@sim_hw@%$sim_hw%g
3944 s%@sim_inline@%$sim_inline%g
3945 s%@sim_packages@%$sim_packages%g
3946 s%@sim_regparm@%$sim_regparm%g
3947 s%@sim_reserved_bits@%$sim_reserved_bits%g
3948 s%@sim_smp@%$sim_smp%g
3949 s%@sim_stdcall@%$sim_stdcall%g
3950 s%@sim_xor_endian@%$sim_xor_endian%g
3951 s%@build_warnings@%$build_warnings%g
3952 s%@SHELL@%$SHELL%g
3953 s%@CFLAGS@%$CFLAGS%g
3954 s%@CPPFLAGS@%$CPPFLAGS%g
3955 s%@CXXFLAGS@%$CXXFLAGS%g
3956 s%@DEFS@%$DEFS%g
3957 s%@LDFLAGS@%$LDFLAGS%g
3958 s%@LIBS@%$LIBS%g
3959 s%@exec_prefix@%$exec_prefix%g
3960 s%@prefix@%$prefix%g
3961 s%@program_transform_name@%$program_transform_name%g
3962 s%@bindir@%$bindir%g
3963 s%@sbindir@%$sbindir%g
3964 s%@libexecdir@%$libexecdir%g
3965 s%@datadir@%$datadir%g
3966 s%@sysconfdir@%$sysconfdir%g
3967 s%@sharedstatedir@%$sharedstatedir%g
3968 s%@localstatedir@%$localstatedir%g
3969 s%@libdir@%$libdir%g
3970 s%@includedir@%$includedir%g
3971 s%@oldincludedir@%$oldincludedir%g
3972 s%@infodir@%$infodir%g
3973 s%@mandir@%$mandir%g
3974 s%@host@%$host%g
3975 s%@host_alias@%$host_alias%g
3976 s%@host_cpu@%$host_cpu%g
3977 s%@host_vendor@%$host_vendor%g
3978 s%@host_os@%$host_os%g
3979 s%@target@%$target%g
3980 s%@target_alias@%$target_alias%g
3981 s%@target_cpu@%$target_cpu%g
3982 s%@target_vendor@%$target_vendor%g
3983 s%@target_os@%$target_os%g
3984 s%@build@%$build%g
3985 s%@build_alias@%$build_alias%g
3986 s%@build_cpu@%$build_cpu%g
3987 s%@build_vendor@%$build_vendor%g
3988 s%@build_os@%$build_os%g
3989 s%@CC@%$CC%g
3990 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3991 s%@INSTALL_DATA@%$INSTALL_DATA%g
3992 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
3993 s%@HDEFINES@%$HDEFINES%g
3994 s%@AR@%$AR%g
3995 s%@RANLIB@%$RANLIB%g
3996 s%@SET_MAKE@%$SET_MAKE%g
3997 s%@CPP@%$CPP%g
3998 s%@ALLOCA@%$ALLOCA%g
3999 s%@USE_NLS@%$USE_NLS%g
4000 s%@MSGFMT@%$MSGFMT%g
4001 s%@GMSGFMT@%$GMSGFMT%g
4002 s%@XGETTEXT@%$XGETTEXT%g
4003 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
4004 s%@CATALOGS@%$CATALOGS%g
4005 s%@CATOBJEXT@%$CATOBJEXT%g
4006 s%@DATADIRNAME@%$DATADIRNAME%g
4007 s%@GMOFILES@%$GMOFILES%g
4008 s%@INSTOBJEXT@%$INSTOBJEXT%g
4009 s%@INTLDEPS@%$INTLDEPS%g
4010 s%@INTLLIBS@%$INTLLIBS%g
4011 s%@INTLOBJS@%$INTLOBJS%g
4012 s%@POFILES@%$POFILES%g
4013 s%@POSUB@%$POSUB%g
4014 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
4015 s%@GT_NO@%$GT_NO%g
4016 s%@GT_YES@%$GT_YES%g
4017 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
4018 s%@l@%$l%g
4019 s%@MAINT@%$MAINT%g
4020 s%@sim_bswap@%$sim_bswap%g
4021 s%@sim_cflags@%$sim_cflags%g
4022 s%@sim_debug@%$sim_debug%g
4023 s%@sim_stdio@%$sim_stdio%g
4024 s%@sim_trace@%$sim_trace%g
4025 s%@sim_profile@%$sim_profile%g
4026 s%@EXEEXT@%$EXEEXT%g
4028 CEOF
4031 cat >> $CONFIG_STATUS <<\EOF
4033 # Split the substitutions into bite-sized pieces for seds with
4034 # small command number limits, like on Digital OSF/1 and HP-UX.
4035 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4036 ac_file=1 # Number of current file.
4037 ac_beg=1 # First line for current file.
4038 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4039 ac_more_lines=:
4040 ac_sed_cmds=""
4041 while $ac_more_lines; do
4042 if test $ac_beg -gt 1; then
4043 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4044 else
4045 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4047 if test ! -s conftest.s$ac_file; then
4048 ac_more_lines=false
4049 rm -f conftest.s$ac_file
4050 else
4051 if test -z "$ac_sed_cmds"; then
4052 ac_sed_cmds="sed -f conftest.s$ac_file"
4053 else
4054 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4056 ac_file=`expr $ac_file + 1`
4057 ac_beg=$ac_end
4058 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4060 done
4061 if test -z "$ac_sed_cmds"; then
4062 ac_sed_cmds=cat
4066 cat >> $CONFIG_STATUS <<EOF
4068 CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
4070 cat >> $CONFIG_STATUS <<\EOF
4071 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4072 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4073 case "$ac_file" in
4074 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4075 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4076 *) ac_file_in="${ac_file}.in" ;;
4077 esac
4079 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4081 # Remove last slash and all that follows it. Not all systems have dirname.
4082 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4083 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4084 # The file is in a subdirectory.
4085 test ! -d "$ac_dir" && mkdir "$ac_dir"
4086 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4087 # A "../" for each directory in $ac_dir_suffix.
4088 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4089 else
4090 ac_dir_suffix= ac_dots=
4093 case "$ac_given_srcdir" in
4094 .) srcdir=.
4095 if test -z "$ac_dots"; then top_srcdir=.
4096 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4097 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4098 *) # Relative path.
4099 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4100 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4101 esac
4103 case "$ac_given_INSTALL" in
4104 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4105 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4106 esac
4108 echo creating "$ac_file"
4109 rm -f "$ac_file"
4110 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4111 case "$ac_file" in
4112 *Makefile*) ac_comsub="1i\\
4113 # $configure_input" ;;
4114 *) ac_comsub= ;;
4115 esac
4117 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4118 sed -e "$ac_comsub
4119 s%@configure_input@%$configure_input%g
4120 s%@srcdir@%$srcdir%g
4121 s%@top_srcdir@%$top_srcdir%g
4122 s%@INSTALL@%$INSTALL%g
4123 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4124 fi; done
4125 rm -f conftest.s*
4127 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4128 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4130 # ac_d sets the value in "#define NAME VALUE" lines.
4131 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4132 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4133 ac_dC='\3'
4134 ac_dD='%g'
4135 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4136 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4137 ac_uB='\([ ]\)%\1#\2define\3'
4138 ac_uC=' '
4139 ac_uD='\4%g'
4140 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4141 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4142 ac_eB='$%\1#\2define\3'
4143 ac_eC=' '
4144 ac_eD='%g'
4146 if test "${CONFIG_HEADERS+set}" != set; then
4148 cat >> $CONFIG_STATUS <<EOF
4149 CONFIG_HEADERS="config.h:config.in"
4151 cat >> $CONFIG_STATUS <<\EOF
4153 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4154 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4155 case "$ac_file" in
4156 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4157 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4158 *) ac_file_in="${ac_file}.in" ;;
4159 esac
4161 echo creating $ac_file
4163 rm -f conftest.frag conftest.in conftest.out
4164 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4165 cat $ac_file_inputs > conftest.in
4169 # Transform confdefs.h into a sed script conftest.vals that substitutes
4170 # the proper values into config.h.in to produce config.h. And first:
4171 # Protect against being on the right side of a sed subst in config.status.
4172 # Protect against being in an unquoted here document in config.status.
4173 rm -f conftest.vals
4174 cat > conftest.hdr <<\EOF
4175 s/[\\&%]/\\&/g
4176 s%[\\$`]%\\&%g
4177 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4178 s%ac_d%ac_u%gp
4179 s%ac_u%ac_e%gp
4181 sed -n -f conftest.hdr confdefs.h > conftest.vals
4182 rm -f conftest.hdr
4184 # This sed command replaces #undef with comments. This is necessary, for
4185 # example, in the case of _POSIX_SOURCE, which is predefined and required
4186 # on some systems where configure will not decide to define it.
4187 cat >> conftest.vals <<\EOF
4188 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4191 # Break up conftest.vals because some shells have a limit on
4192 # the size of here documents, and old seds have small limits too.
4194 rm -f conftest.tail
4195 while :
4197 ac_lines=`grep -c . conftest.vals`
4198 # grep -c gives empty output for an empty file on some AIX systems.
4199 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4200 # Write a limited-size here document to conftest.frag.
4201 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4202 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4203 echo 'CEOF
4204 sed -f conftest.frag conftest.in > conftest.out
4205 rm -f conftest.in
4206 mv conftest.out conftest.in
4207 ' >> $CONFIG_STATUS
4208 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4209 rm -f conftest.vals
4210 mv conftest.tail conftest.vals
4211 done
4212 rm -f conftest.vals
4214 cat >> $CONFIG_STATUS <<\EOF
4215 rm -f conftest.frag conftest.h
4216 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4217 cat conftest.in >> conftest.h
4218 rm -f conftest.in
4219 if cmp -s $ac_file conftest.h 2>/dev/null; then
4220 echo "$ac_file is unchanged"
4221 rm -f conftest.h
4222 else
4223 # Remove last slash and all that follows it. Not all systems have dirname.
4224 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4225 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4226 # The file is in a subdirectory.
4227 test ! -d "$ac_dir" && mkdir "$ac_dir"
4229 rm -f $ac_file
4230 mv conftest.h $ac_file
4232 fi; done
4236 cat >> $CONFIG_STATUS <<EOF
4237 ac_sources="$sim_link_files"
4238 ac_dests="$sim_link_links"
4241 cat >> $CONFIG_STATUS <<\EOF
4242 srcdir=$ac_given_srcdir
4243 while test -n "$ac_sources"; do
4244 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
4245 set $ac_sources; ac_source=$1; shift; ac_sources=$*
4247 echo "linking $srcdir/$ac_source to $ac_dest"
4249 if test ! -r $srcdir/$ac_source; then
4250 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
4252 rm -f $ac_dest
4254 # Make relative symlinks.
4255 # Remove last slash and all that follows it. Not all systems have dirname.
4256 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
4257 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
4258 # The dest file is in a subdirectory.
4259 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
4260 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
4261 # A "../" for each directory in $ac_dest_dir_suffix.
4262 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
4263 else
4264 ac_dest_dir_suffix= ac_dots=
4267 case "$srcdir" in
4268 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
4269 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
4270 esac
4272 # Make a symlink if possible; otherwise try a hard link.
4273 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
4274 ln $srcdir/$ac_source $ac_dest; then :
4275 else
4276 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
4278 done
4280 cat >> $CONFIG_STATUS <<EOF
4283 cat >> $CONFIG_STATUS <<\EOF
4284 case "x$CONFIG_FILES" in
4285 xMakefile*)
4286 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
4287 rm -f Makesim1.tmp Makesim2.tmp Makefile
4288 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
4289 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
4290 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
4291 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
4292 <Makefile.sim >Makefile
4293 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
4295 esac
4296 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
4298 exit 0
4300 chmod +x $CONFIG_STATUS
4301 rm -fr confdefs* $ac_clean_files
4302 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1