* config/tc-d30v.c (do_assemble): Accept a new parameter requesting
[deliverable/binutils-gdb.git] / mmalloc / configure
CommitLineData
c93a17b7
JM
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.4
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14
15# Initialize some variables set by options.
16# The variables have the same names as the options, with
17# dashes changed to underlines.
18build=NONE
19cache_file=./config.cache
20exec_prefix=NONE
21host=NONE
22no_create=
23nonopt=NONE
24no_recursion=
25prefix=NONE
26program_prefix=NONE
27program_suffix=NONE
28program_transform_name=s,x,x,
29silent=
30site=
31srcdir=
32target=NONE
33verbose=
34x_includes=NONE
35x_libraries=NONE
36
37# Initialize some other variables.
38subdirs=
39
40ac_prev=
41for ac_option
42do
43
44 # If the previous option needs an argument, assign it.
45 if test -n "$ac_prev"; then
46 eval "$ac_prev=\$ac_option"
47 ac_prev=
48 continue
49 fi
50
51 case "$ac_option" in
52 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53 *) ac_optarg= ;;
54 esac
55
56 # Accept the important Cygnus configure options, so we can diagnose typos.
57
58 case "$ac_option" in
59
60 -build | --build | --buil | --bui | --bu | --b)
61 ac_prev=build ;;
62 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
63 build="$ac_optarg" ;;
64
65 -cache-file | --cache-file | --cache-fil | --cache-fi \
66 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
67 ac_prev=cache_file ;;
68 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
69 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
70 cache_file="$ac_optarg" ;;
71
72 -disable-* | --disable-*)
73 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
74 # Reject names that are not valid shell variable names.
75 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
76 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
77 fi
78 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
79 eval "enable_${ac_feature}=no" ;;
80
81 -enable-* | --enable-*)
82 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
83 # Reject names that are not valid shell variable names.
84 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
85 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
86 fi
87 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
88 case "$ac_option" in
89 *=*) ;;
90 *) ac_optarg=yes ;;
91 esac
92 eval "enable_${ac_feature}='$ac_optarg'" ;;
93
94 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
95 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
96 | --exec | --exe | --ex)
97 ac_prev=exec_prefix ;;
98 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
99 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
100 | --exec=* | --exe=* | --ex=*)
101 exec_prefix="$ac_optarg" ;;
102
103 -gas | --gas | --ga | --g)
104 # Obsolete; use --with-gas.
105 with_gas=yes ;;
106
107 -help | --help | --hel | --he)
108 # Omit some internal or obsolete options to make the list less imposing.
109 # This message is too long to be a string in the A/UX 3.1 sh.
110 cat << EOF
111Usage: configure [options] [host]
112Options: [defaults in brackets after descriptions]
113Configuration:
114 --cache-file=FILE cache test results in FILE
115 --help print this message
116 --no-create do not create output files
117 --quiet, --silent do not print \`checking...' messages
118 --version print the version of autoconf that created configure
119Directory and file names:
120 --prefix=PREFIX install architecture-independent files in PREFIX
121 [$ac_default_prefix]
122 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
123 [same as prefix]
124 --srcdir=DIR find the sources in DIR [configure dir or ..]
125 --program-prefix=PREFIX prepend PREFIX to installed program names
126 --program-suffix=SUFFIX append SUFFIX to installed program names
127 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
128Host type:
129 --build=BUILD configure for building on BUILD [BUILD=HOST]
130 --host=HOST configure for HOST [guessed]
131 --target=TARGET configure for TARGET [TARGET=HOST]
132Features and packages:
133 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
134 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
135 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
136 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
137 --x-includes=DIR X include files are in DIR
138 --x-libraries=DIR X library files are in DIR
139--enable and --with options recognized:$ac_help
140EOF
141 exit 0 ;;
142
143 -host | --host | --hos | --ho)
144 ac_prev=host ;;
145 -host=* | --host=* | --hos=* | --ho=*)
146 host="$ac_optarg" ;;
147
148 -nfp | --nfp | --nf)
149 # Obsolete; use --without-fp.
150 with_fp=no ;;
151
152 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
153 | --no-cr | --no-c)
154 no_create=yes ;;
155
156 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
157 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
158 no_recursion=yes ;;
159
160 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
161 ac_prev=prefix ;;
162 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
163 prefix="$ac_optarg" ;;
164
165 -program-prefix | --program-prefix | --program-prefi | --program-pref \
166 | --program-pre | --program-pr | --program-p)
167 ac_prev=program_prefix ;;
168 -program-prefix=* | --program-prefix=* | --program-prefi=* \
169 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
170 program_prefix="$ac_optarg" ;;
171
172 -program-suffix | --program-suffix | --program-suffi | --program-suff \
173 | --program-suf | --program-su | --program-s)
174 ac_prev=program_suffix ;;
175 -program-suffix=* | --program-suffix=* | --program-suffi=* \
176 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
177 program_suffix="$ac_optarg" ;;
178
179 -program-transform-name | --program-transform-name \
180 | --program-transform-nam | --program-transform-na \
181 | --program-transform-n | --program-transform- \
182 | --program-transform | --program-transfor \
183 | --program-transfo | --program-transf \
184 | --program-trans | --program-tran \
185 | --progr-tra | --program-tr | --program-t)
186 ac_prev=program_transform_name ;;
187 -program-transform-name=* | --program-transform-name=* \
188 | --program-transform-nam=* | --program-transform-na=* \
189 | --program-transform-n=* | --program-transform-=* \
190 | --program-transform=* | --program-transfor=* \
191 | --program-transfo=* | --program-transf=* \
192 | --program-trans=* | --program-tran=* \
193 | --progr-tra=* | --program-tr=* | --program-t=*)
194 program_transform_name="$ac_optarg" ;;
195
196 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
197 | -silent | --silent | --silen | --sile | --sil)
198 silent=yes ;;
199
200 -site | --site | --sit)
201 ac_prev=site ;;
202 -site=* | --site=* | --sit=*)
203 site="$ac_optarg" ;;
204
205 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
206 ac_prev=srcdir ;;
207 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
208 srcdir="$ac_optarg" ;;
209
210 -target | --target | --targe | --targ | --tar | --ta | --t)
211 ac_prev=target ;;
212 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
213 target="$ac_optarg" ;;
214
215 -v | -verbose | --verbose | --verbos | --verbo | --verb)
216 verbose=yes ;;
217
218 -version | --version | --versio | --versi | --vers)
219 echo "configure generated by autoconf version 2.4"
220 exit 0 ;;
221
222 -with-* | --with-*)
223 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
224 # Reject names that are not valid shell variable names.
225 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
226 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
227 fi
228 ac_package=`echo $ac_package| sed 's/-/_/g'`
229 case "$ac_option" in
230 *=*) ;;
231 *) ac_optarg=yes ;;
232 esac
233 eval "with_${ac_package}='$ac_optarg'" ;;
234
235 -without-* | --without-*)
236 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
237 # Reject names that are not valid shell variable names.
238 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
239 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
240 fi
241 ac_package=`echo $ac_package| sed 's/-/_/g'`
242 eval "with_${ac_package}=no" ;;
243
244 --x)
245 # Obsolete; use --with-x.
246 with_x=yes ;;
247
248 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
249 | --x-incl | --x-inc | --x-in | --x-i)
250 ac_prev=x_includes ;;
251 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
252 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
253 x_includes="$ac_optarg" ;;
254
255 -x-libraries | --x-libraries | --x-librarie | --x-librari \
256 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
257 ac_prev=x_libraries ;;
258 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
259 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
260 x_libraries="$ac_optarg" ;;
261
262 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
263 ;;
264
265 *)
266 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
267 echo "configure: warning: $ac_option: invalid host type" 1>&2
268 fi
269 if test "x$nonopt" != xNONE; then
270 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
271 fi
272 nonopt="$ac_option"
273 ;;
274
275 esac
276done
277
278if test -n "$ac_prev"; then
279 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
280fi
281
282trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
283
284# File descriptor usage:
285# 0 standard input
286# 1 file creation
287# 2 errors and warnings
288# 3 some systems may open it to /dev/tty
289# 4 used on the Kubota Titan
290# 6 checking for... messages and results
291# 5 compiler messages saved in config.log
292if test "$silent" = yes; then
293 exec 6>/dev/null
294else
295 exec 6>&1
296fi
297exec 5>./config.log
298
299echo "\
300This file contains any messages produced by compilers while
301running configure, to aid debugging if configure makes a mistake.
302" 1>&5
303
304# Strip out --no-create and --no-recursion so they do not pile up.
305# Also quote any args containing shell metacharacters.
306ac_configure_args=
307for ac_arg
308do
309 case "$ac_arg" in
310 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
311 | --no-cr | --no-c) ;;
312 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
313 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
314 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
315 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
316 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
317 esac
318done
319
320# NLS nuisances.
321# Only set LANG and LC_ALL to C if already set.
322# These must not be set unconditionally because not all systems understand
323# e.g. LANG=C (notably SCO).
324if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
325if test "${LANG+set}" = set; then LANG=C; export LANG; fi
326
327# confdefs.h avoids OS command line length limits that DEFS can exceed.
328rm -rf conftest* confdefs.h
329# AIX cpp loses on an empty file, so make sure it contains at least a newline.
330echo > confdefs.h
331
332# A filename unique to this package, relative to the directory that
333# configure is in, which we can look for to find out if srcdir is correct.
334ac_unique_file=mmalloc.c
335
336# Find the source files, if location was not specified.
337if test -z "$srcdir"; then
338 ac_srcdir_defaulted=yes
339 # Try the directory containing this script, then its parent.
340 ac_prog=$0
341 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
342 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
343 srcdir=$ac_confdir
344 if test ! -r $srcdir/$ac_unique_file; then
345 srcdir=..
346 fi
347else
348 ac_srcdir_defaulted=no
349fi
350if test ! -r $srcdir/$ac_unique_file; then
351 if test "$ac_srcdir_defaulted" = yes; then
352 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
353 else
354 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
355 fi
356fi
357srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
358
359# Prefer explicitly selected file to automatically selected ones.
360if test -z "$CONFIG_SITE"; then
361 if test "x$prefix" != xNONE; then
362 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
363 else
364 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
365 fi
366fi
367for ac_site_file in $CONFIG_SITE; do
368 if test -r "$ac_site_file"; then
369 echo "loading site script $ac_site_file"
370 . "$ac_site_file"
371 fi
372done
373
374if test -r "$cache_file"; then
375 echo "loading cache $cache_file"
376 . $cache_file
377else
378 echo "creating cache $cache_file"
379 > $cache_file
380fi
381
382ac_ext=c
383# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
384ac_cpp='$CPP $CPPFLAGS'
385ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
386ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
387
388if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
389 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
390 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
391 ac_n= ac_c='
392' ac_t=' '
393 else
394 ac_n=-n ac_c= ac_t=
395 fi
396else
397 ac_n= ac_c='\c' ac_t=
398fi
399
400
401
402CC=${CC-cc}
403# Extract the first word of "gcc", so it can be a program name with args.
404set dummy gcc; ac_word=$2
405echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
406if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
407 echo $ac_n "(cached) $ac_c" 1>&6
408else
409 if test -n "$CC"; then
410 ac_cv_prog_CC="$CC" # Let the user override the test.
411else
412 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
413 for ac_dir in $PATH; do
414 test -z "$ac_dir" && ac_dir=.
415 if test -f $ac_dir/$ac_word; then
416 ac_cv_prog_CC="gcc"
417 break
418 fi
419 done
420 IFS="$ac_save_ifs"
421 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
422fi
423fi
424CC="$ac_cv_prog_CC"
425if test -n "$CC"; then
426 echo "$ac_t""$CC" 1>&6
427else
428 echo "$ac_t""no" 1>&6
429fi
430
431
432echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
433if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
434 echo $ac_n "(cached) $ac_c" 1>&6
435else
436 cat > conftest.c <<EOF
437#ifdef __GNUC__
438 yes;
439#endif
440EOF
441if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
442 ac_cv_prog_gcc=yes
443else
444 ac_cv_prog_gcc=no
445fi
446fi
447echo "$ac_t""$ac_cv_prog_gcc" 1>&6
448if test $ac_cv_prog_gcc = yes; then
449 GCC=yes
450 if test "${CFLAGS+set}" != set; then
451 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
452if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
453 echo $ac_n "(cached) $ac_c" 1>&6
454else
455 echo 'void f(){}' > conftest.c
456if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
457 ac_cv_prog_gcc_g=yes
458else
459 ac_cv_prog_gcc_g=no
460fi
461rm -f conftest*
462
463fi
464 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
465 if test $ac_cv_prog_gcc_g = yes; then
466 CFLAGS="-g -O"
467 else
468 CFLAGS="-O"
469 fi
470 fi
471else
472 GCC=
473 test "${CFLAGS+set}" = set || CFLAGS="-g"
474fi
475
476ac_aux_dir=
477for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
478 if test -f $ac_dir/install-sh; then
479 ac_aux_dir=$ac_dir
480 ac_install_sh="$ac_aux_dir/install-sh -c"
481 break
482 elif test -f $ac_dir/install.sh; then
483 ac_aux_dir=$ac_dir
484 ac_install_sh="$ac_aux_dir/install.sh -c"
485 break
486 fi
487done
488if test -z "$ac_aux_dir"; then
489 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
490fi
491ac_config_guess=$ac_aux_dir/config.guess
492ac_config_sub=$ac_aux_dir/config.sub
493ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
494
495# Find a good install program. We prefer a C program (faster),
496# so one script is as good as another. But avoid the broken or
497# incompatible versions:
498# SysV /etc/install, /usr/sbin/install
499# SunOS /usr/etc/install
500# IRIX /sbin/install
501# AIX /bin/install
502# AFS /usr/afsws/bin/install, which mishandles nonexistent args
503# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
504# ./install, which can be erroneously created by make from ./install.sh.
505echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
506if test -z "$INSTALL"; then
507if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
508 echo $ac_n "(cached) $ac_c" 1>&6
509else
510 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
511 for ac_dir in $PATH; do
512 # Account for people who put trailing slashes in PATH elements.
513 case "$ac_dir/" in
514 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
515 *)
516 # OSF1 and SCO ODT 3.0 have their own names for install.
517 for ac_prog in ginstall installbsd scoinst install; do
518 if test -f $ac_dir/$ac_prog; then
519 if test $ac_prog = install &&
520 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
521 # AIX install. It has an incompatible calling convention.
522 # OSF/1 installbsd also uses dspmsg, but is usable.
523 :
524 else
525 ac_cv_path_install="$ac_dir/$ac_prog -c"
526 break 2
527 fi
528 fi
529 done
530 ;;
531 esac
532 done
533 IFS="$ac_save_ifs"
534 # As a last resort, use the slow shell script.
535 test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
536fi
537 INSTALL="$ac_cv_path_install"
538fi
539echo "$ac_t""$INSTALL" 1>&6
540
541# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
542# It thinks the first close brace ends the variable substitution.
543test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
544
545test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
546
547# Extract the first word of "ranlib", so it can be a program name with args.
548set dummy ranlib; ac_word=$2
549echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
550if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
551 echo $ac_n "(cached) $ac_c" 1>&6
552else
553 if test -n "$RANLIB"; then
554 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
555else
556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
557 for ac_dir in $PATH; do
558 test -z "$ac_dir" && ac_dir=.
559 if test -f $ac_dir/$ac_word; then
560 ac_cv_prog_RANLIB="ranlib"
561 break
562 fi
563 done
564 IFS="$ac_save_ifs"
565 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
566fi
567fi
568RANLIB="$ac_cv_prog_RANLIB"
569if test -n "$RANLIB"; then
570 echo "$ac_t""$RANLIB" 1>&6
571else
572 echo "$ac_t""no" 1>&6
573fi
574
575
576# If we cannot run a trivial program, we must be cross compiling.
577echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
578if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
579 echo $ac_n "(cached) $ac_c" 1>&6
580else
581 if test "$cross_compiling" = yes; then
582 ac_cv_c_cross=yes
583else
584cat > conftest.$ac_ext <<EOF
585#line 586 "configure"
586#include "confdefs.h"
587main(){return(0);}
588EOF
589eval $ac_link
590if test -s conftest && (./conftest; exit) 2>/dev/null; then
591 ac_cv_c_cross=no
592else
593 ac_cv_c_cross=yes
594fi
595fi
596rm -fr conftest*
597fi
598cross_compiling=$ac_cv_c_cross
599echo "$ac_t""$ac_cv_c_cross" 1>&6
600
601echo $ac_n "checking for working mmap""... $ac_c" 1>&6
602if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
603 echo $ac_n "(cached) $ac_c" 1>&6
604else
605 if test "$cross_compiling" = yes; then
606 ac_cv_func_mmap=no
607else
608cat > conftest.$ac_ext <<EOF
609#line 610 "configure"
610#include "confdefs.h"
611
612/* Thanks to Mike Haertel and Jim Avera for this test. */
613#include <sys/types.h>
614#include <fcntl.h>
615#include <sys/mman.h>
616
617#ifdef BSD
618# ifndef BSD4_1
619# define HAVE_GETPAGESIZE
620# endif
621#endif
622
623#ifndef HAVE_GETPAGESIZE
624# include <sys/param.h>
625# ifdef EXEC_PAGESIZE
626# define getpagesize() EXEC_PAGESIZE
627# else
628# ifdef NBPG
629# define getpagesize() NBPG * CLSIZE
630# ifndef CLSIZE
631# define CLSIZE 1
632# endif
633# else
634# ifdef NBPC
635# define getpagesize() NBPC
636# else
637# define getpagesize() PAGESIZE /* SVR4 */
638# endif
639# endif
640# endif
641#endif
642
643#ifdef __osf__
644# define valloc malloc
645#endif
646
647#ifdef __cplusplus
648extern "C" { void *valloc(unsigned), *malloc(unsigned); }
649#else
650char *valloc(), *malloc();
651#endif
652
653int
654main()
655{
656 char *buf1, *buf2, *buf3;
657 int i = getpagesize(), j;
658 int i2 = getpagesize()*2;
659 int fd;
660
661 buf1 = (char *)valloc(i2);
662 buf2 = (char *)valloc(i);
663 buf3 = (char *)malloc(i2);
664 for (j = 0; j < i2; ++j)
665 *(buf1 + j) = rand();
666 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
667 write(fd, buf1, i2);
668 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
669 for (j = 0; j < i; ++j)
670 if (*(buf1 + j) != *(buf2 + j))
671 exit(1);
672 lseek(fd, (long)i, 0);
673 read(fd, buf2, i); /* read into mapped memory -- file should not change */
674 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
675 lseek(fd, (long)0, 0);
676 read(fd, buf3, i2);
677 for (j = 0; j < i2; ++j)
678 if (*(buf1 + j) != *(buf3 + j))
679 exit(1);
680 exit(0);
681}
682
683EOF
684eval $ac_link
685if test -s conftest && (./conftest; exit) 2>/dev/null; then
686 ac_cv_func_mmap=yes
687else
688 ac_cv_func_mmap=no
689fi
690fi
691rm -fr conftest*
692fi
693echo "$ac_t""$ac_cv_func_mmap" 1>&6
694if test $ac_cv_func_mmap = yes; then
695 cat >> confdefs.h <<\EOF
696#define HAVE_MMAP 1
697EOF
698
699fi
700
701echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
702# On Suns, sometimes $CPP names a directory.
703if test -n "$CPP" && test -d "$CPP"; then
704 CPP=
705fi
706if test -z "$CPP"; then
707if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
708 echo $ac_n "(cached) $ac_c" 1>&6
709else
710 # This must be in double quotes, not single quotes, because CPP may get
711 # substituted into the Makefile and "${CC-cc}" will confuse make.
712 CPP="${CC-cc} -E"
713 # On the NeXT, cc -E runs the code through the compiler's parser,
714 # not just through cpp.
715 cat > conftest.$ac_ext <<EOF
716#line 717 "configure"
717#include "confdefs.h"
718#include <assert.h>
719Syntax Error
720EOF
721eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
722ac_err=`grep -v '^ *+' conftest.out`
723if test -z "$ac_err"; then
724 :
725else
726 echo "$ac_err" >&5
727 rm -rf conftest*
728 CPP="${CC-cc} -E -traditional-cpp"
729 cat > conftest.$ac_ext <<EOF
730#line 731 "configure"
731#include "confdefs.h"
732#include <assert.h>
733Syntax Error
734EOF
735eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
736ac_err=`grep -v '^ *+' conftest.out`
737if test -z "$ac_err"; then
738 :
739else
740 echo "$ac_err" >&5
741 rm -rf conftest*
742 CPP=/lib/cpp
743fi
744rm -f conftest*
745fi
746rm -f conftest*
747 ac_cv_prog_CPP="$CPP"
748fi
749 CPP="$ac_cv_prog_CPP"
750else
751 ac_cv_prog_CPP="$CPP"
752fi
753echo "$ac_t""$CPP" 1>&6
754
755echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
756if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
757 echo $ac_n "(cached) $ac_c" 1>&6
758else
759 cat > conftest.$ac_ext <<EOF
760#line 761 "configure"
761#include "confdefs.h"
762#include <stdlib.h>
763#include <stdarg.h>
764#include <string.h>
765#include <float.h>
766EOF
767eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
768ac_err=`grep -v '^ *+' conftest.out`
769if test -z "$ac_err"; then
770 rm -rf conftest*
771 ac_cv_header_stdc=yes
772else
773 echo "$ac_err" >&5
774 rm -rf conftest*
775 ac_cv_header_stdc=no
776fi
777rm -f conftest*
778
779if test $ac_cv_header_stdc = yes; then
780 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
781cat > conftest.$ac_ext <<EOF
782#line 783 "configure"
783#include "confdefs.h"
784#include <string.h>
785EOF
786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
787 egrep "memchr" >/dev/null 2>&1; then
788 :
789else
790 rm -rf conftest*
791 ac_cv_header_stdc=no
792fi
793rm -f conftest*
794
795fi
796
797if test $ac_cv_header_stdc = yes; then
798 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
799cat > conftest.$ac_ext <<EOF
800#line 801 "configure"
801#include "confdefs.h"
802#include <stdlib.h>
803EOF
804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
805 egrep "free" >/dev/null 2>&1; then
806 :
807else
808 rm -rf conftest*
809 ac_cv_header_stdc=no
810fi
811rm -f conftest*
812
813fi
814
815if test $ac_cv_header_stdc = yes; then
816 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
817if test "$cross_compiling" = yes; then
818 ac_cv_header_stdc=no
819else
820cat > conftest.$ac_ext <<EOF
821#line 822 "configure"
822#include "confdefs.h"
823#include <ctype.h>
824#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
825#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
826#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
827int main () { int i; for (i = 0; i < 256; i++)
828if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
829exit (0); }
830
831EOF
832eval $ac_link
833if test -s conftest && (./conftest; exit) 2>/dev/null; then
834 :
835else
836 ac_cv_header_stdc=no
837fi
838fi
839rm -fr conftest*
840fi
841fi
842echo "$ac_t""$ac_cv_header_stdc" 1>&6
843if test $ac_cv_header_stdc = yes; then
844 cat >> confdefs.h <<\EOF
845#define STDC_HEADERS 1
846EOF
847
848fi
849
68bfadda
JM
850for ac_hdr in stddef.h
851do
852ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
853echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
89097c5b
JM
854if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
855 echo $ac_n "(cached) $ac_c" 1>&6
856else
857 cat > conftest.$ac_ext <<EOF
68bfadda 858#line 859 "configure"
89097c5b 859#include "confdefs.h"
68bfadda 860#include <$ac_hdr>
89097c5b
JM
861EOF
862eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
863ac_err=`grep -v '^ *+' conftest.out`
864if test -z "$ac_err"; then
865 rm -rf conftest*
866 eval "ac_cv_header_$ac_safe=yes"
867else
868 echo "$ac_err" >&5
869 rm -rf conftest*
870 eval "ac_cv_header_$ac_safe=no"
871fi
872rm -f conftest*
873fi
874if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
875 echo "$ac_t""yes" 1>&6
68bfadda
JM
876 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
877 cat >> confdefs.h <<EOF
878#define $ac_tr_hdr 1
879EOF
880
89097c5b
JM
881else
882 echo "$ac_t""no" 1>&6
883fi
68bfadda 884done
89097c5b 885
c93a17b7
JM
886
887trap '' 1 2 15
888cat > confcache <<\EOF
889# This file is a shell script that caches the results of configure
890# tests run on this system so they can be shared between configure
891# scripts and configure runs. It is not useful on other systems.
892# If it contains results you don't want to keep, you may remove or edit it.
893#
894# By default, configure uses ./config.cache as the cache file,
895# creating it if it does not exist already. You can give configure
896# the --cache-file=FILE option to use a different cache file; that is
897# what configure does when it calls configure scripts in
898# subdirectories, so they share the cache.
899# Giving --cache-file=/dev/null disables caching, for debugging configure.
900# config.status only pays attention to the cache file if you give it the
901# --recheck option to rerun configure.
902#
903EOF
904# Ultrix sh set writes to stderr and can't be redirected directly,
905# and sets the high bit in the cache file unless we assign to the vars.
906(set) 2>&1 |
907 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
908 >> confcache
909if cmp -s $cache_file confcache; then
910 :
911else
912 if test -w $cache_file; then
913 echo "updating cache $cache_file"
914 cat confcache > $cache_file
915 else
916 echo "not updating unwritable cache $cache_file"
917 fi
918fi
919rm -f confcache
920
921trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
922
923test "x$prefix" = xNONE && prefix=$ac_default_prefix
924# Let make expand exec_prefix.
925test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
926
927# Any assignment to VPATH causes Sun make to only execute
928# the first set of double-colon rules, so remove it if not needed.
929# If there is a colon in the path, we need to keep it.
930if test "x$srcdir" = x.; then
931 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
932fi
933
934trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
935
936# Transform confdefs.h into DEFS.
937# Protect against shell expansion while executing Makefile rules.
938# Protect against Makefile macro expansion.
939cat > conftest.defs <<\EOF
940s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
941s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
942s%\[%\\&%g
943s%\]%\\&%g
944s%\$%$$%g
945EOF
946DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
947rm -f conftest.defs
948
949
950# Without the "./", some shells look in PATH for config.status.
951: ${CONFIG_STATUS=./config.status}
952
953echo creating $CONFIG_STATUS
954rm -f $CONFIG_STATUS
955cat > $CONFIG_STATUS <<EOF
956#! /bin/sh
957# Generated automatically by configure.
958# Run this file to recreate the current configuration.
959# This directory was configured as follows,
960# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
961#
962# $0 $ac_configure_args
963#
964# Compiler output produced by configure, useful for debugging
965# configure, is in ./config.log if it exists.
966
967ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
968for ac_option
969do
970 case "\$ac_option" in
971 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
972 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
973 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
974 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
975 echo "$CONFIG_STATUS generated by autoconf version 2.4"
976 exit 0 ;;
977 -help | --help | --hel | --he | --h)
978 echo "\$ac_cs_usage"; exit 0 ;;
979 *) echo "\$ac_cs_usage"; exit 1 ;;
980 esac
981done
982
983ac_given_srcdir=$srcdir
984ac_given_INSTALL="$INSTALL"
985
986trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
987
988# Protect against being on the right side of a sed subst in config.status.
989sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
990 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
991$ac_vpsub
992$extrasub
993s%@CFLAGS@%$CFLAGS%g
994s%@CPPFLAGS@%$CPPFLAGS%g
995s%@CXXFLAGS@%$CXXFLAGS%g
996s%@DEFS@%$DEFS%g
997s%@LDFLAGS@%$LDFLAGS%g
998s%@LIBS@%$LIBS%g
999s%@exec_prefix@%$exec_prefix%g
1000s%@prefix@%$prefix%g
1001s%@program_transform_name@%$program_transform_name%g
1002s%@CC@%$CC%g
1003s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1004s%@INSTALL_DATA@%$INSTALL_DATA%g
1005s%@RANLIB@%$RANLIB%g
1006s%@CPP@%$CPP%g
1007
1008CEOF
1009EOF
1010cat >> $CONFIG_STATUS <<EOF
1011
1012CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1013EOF
1014cat >> $CONFIG_STATUS <<\EOF
1015for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1016 # Support "outfile[:infile]", defaulting infile="outfile.in".
1017 case "$ac_file" in
1018 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1019 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1020 *) ac_file_in="${ac_file}.in" ;;
1021 esac
1022
1023 # Adjust relative srcdir, etc. for subdirectories.
1024
1025 # Remove last slash and all that follows it. Not all systems have dirname.
1026 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1027 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1028 # The file is in a subdirectory.
1029 test ! -d "$ac_dir" && mkdir "$ac_dir"
1030 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1031 # A "../" for each directory in $ac_dir_suffix.
1032 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1033 else
1034 ac_dir_suffix= ac_dots=
1035 fi
1036
1037 case "$ac_given_srcdir" in
1038 .) srcdir=.
1039 if test -z "$ac_dots"; then top_srcdir=.
1040 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1041 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1042 *) # Relative path.
1043 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1044 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1045 esac
1046
1047 case "$ac_given_INSTALL" in
1048 [/$]*) INSTALL="$ac_given_INSTALL" ;;
1049 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1050 esac
1051 echo creating "$ac_file"
1052 rm -f "$ac_file"
1053 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1054 case "$ac_file" in
1055 *Makefile*) ac_comsub="1i\\
1056# $configure_input" ;;
1057 *) ac_comsub= ;;
1058 esac
1059 sed -e "$ac_comsub
1060s%@configure_input@%$configure_input%g
1061s%@srcdir@%$srcdir%g
1062s%@top_srcdir@%$top_srcdir%g
1063s%@INSTALL@%$INSTALL%g
1064" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1065fi; done
1066rm -f conftest.subs
1067
1068
1069
1070exit 0
1071EOF
1072chmod +x $CONFIG_STATUS
1073rm -fr confdefs* $ac_clean_files
1074test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1075
This page took 0.130197 seconds and 4 git commands to generate.