Add patch against GNU Binutils-2.20 to support "meminfo".
[libmeminfo.git] / libelf / configure
blob69d9ae883630d7fba599ecaae41b44cc772c4905
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-maintainer-mode
16 enable maintainer-specific make rules (default: auto)"
17 ac_help="$ac_help
18 --enable-compat install <libelf.h>, <nlist.h> and <gelf.h> (default: auto)"
19 ac_help="$ac_help
20 --enable-elf64 compile in 64-bit support (default: auto)"
21 ac_help="$ac_help
22 --enable-versioning compile in versioning support (default: auto)"
23 ac_help="$ac_help
24 --enable-nls use Native Language Support (default: yes)"
25 ac_help="$ac_help
26 --enable-shared build shared library (default: yes)"
27 ac_help="$ac_help
28 --enable-gnu-names use GNU library naming conventions (default: no)"
29 ac_help="$ac_help
30 --enable-extended-format support extended file formats (default: no)"
31 ac_help="$ac_help
32 --enable-sanity-checks enable sanity checks by default (default: yes)"
33 ac_help="$ac_help
34 --enable-debug include extra debugging code (default: no)"
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 srcdir=
53 target=NONE
54 verbose=
55 x_includes=NONE
56 x_libraries=NONE
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
70 # Initialize some other variables.
71 subdirs=
72 MFLAGS= MAKEFLAGS=
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
75 ac_max_here_lines=12
77 ac_prev=
78 for ac_option
81 # If the previous option needs an argument, assign it.
82 if test -n "$ac_prev"; then
83 eval "$ac_prev=\$ac_option"
84 ac_prev=
85 continue
88 case "$ac_option" in
89 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90 *) ac_optarg= ;;
91 esac
93 # Accept the important Cygnus configure options, so we can diagnose typos.
95 case "$ac_option" in
97 -bindir | --bindir | --bindi | --bind | --bin | --bi)
98 ac_prev=bindir ;;
99 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100 bindir="$ac_optarg" ;;
102 -build | --build | --buil | --bui | --bu)
103 ac_prev=build ;;
104 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105 build="$ac_optarg" ;;
107 -cache-file | --cache-file | --cache-fil | --cache-fi \
108 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109 ac_prev=cache_file ;;
110 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112 cache_file="$ac_optarg" ;;
114 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
115 ac_prev=datadir ;;
116 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
117 | --da=*)
118 datadir="$ac_optarg" ;;
120 -disable-* | --disable-*)
121 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
122 # Reject names that are not valid shell variable names.
123 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
124 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 eval "enable_${ac_feature}=no" ;;
129 -enable-* | --enable-*)
130 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131 # Reject names that are not valid shell variable names.
132 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136 case "$ac_option" in
137 *=*) ;;
138 *) ac_optarg=yes ;;
139 esac
140 eval "enable_${ac_feature}='$ac_optarg'" ;;
142 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144 | --exec | --exe | --ex)
145 ac_prev=exec_prefix ;;
146 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148 | --exec=* | --exe=* | --ex=*)
149 exec_prefix="$ac_optarg" ;;
151 -gas | --gas | --ga | --g)
152 # Obsolete; use --with-gas.
153 with_gas=yes ;;
155 -help | --help | --hel | --he)
156 # Omit some internal or obsolete options to make the list less imposing.
157 # This message is too long to be a string in the A/UX 3.1 sh.
158 cat << EOF
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
161 Configuration:
162 --cache-file=FILE cache test results in FILE
163 --help print this message
164 --no-create do not create output files
165 --quiet, --silent do not print \`checking...' messages
166 --version print the version of autoconf that created configure
167 Directory and file names:
168 --prefix=PREFIX install architecture-independent files in PREFIX
169 [$ac_default_prefix]
170 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
171 [same as prefix]
172 --bindir=DIR user executables in DIR [EPREFIX/bin]
173 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
174 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
175 --datadir=DIR read-only architecture-independent data in DIR
176 [PREFIX/share]
177 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
178 --sharedstatedir=DIR modifiable architecture-independent data in DIR
179 [PREFIX/com]
180 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
181 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
182 --includedir=DIR C header files in DIR [PREFIX/include]
183 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
184 --infodir=DIR info documentation in DIR [PREFIX/info]
185 --mandir=DIR man documentation in DIR [PREFIX/man]
186 --srcdir=DIR find the sources in DIR [configure dir or ..]
187 --program-prefix=PREFIX prepend PREFIX to installed program names
188 --program-suffix=SUFFIX append SUFFIX to installed program names
189 --program-transform-name=PROGRAM
190 run sed PROGRAM on installed program names
192 cat << EOF
193 Host type:
194 --build=BUILD configure for building on BUILD [BUILD=HOST]
195 --host=HOST configure for HOST [guessed]
196 --target=TARGET configure for TARGET [TARGET=HOST]
197 Features and packages:
198 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
199 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
200 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
201 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
202 --x-includes=DIR X include files are in DIR
203 --x-libraries=DIR X library files are in DIR
205 if test -n "$ac_help"; then
206 echo "--enable and --with options recognized:$ac_help"
208 exit 0 ;;
210 -host | --host | --hos | --ho)
211 ac_prev=host ;;
212 -host=* | --host=* | --hos=* | --ho=*)
213 host="$ac_optarg" ;;
215 -includedir | --includedir | --includedi | --included | --include \
216 | --includ | --inclu | --incl | --inc)
217 ac_prev=includedir ;;
218 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219 | --includ=* | --inclu=* | --incl=* | --inc=*)
220 includedir="$ac_optarg" ;;
222 -infodir | --infodir | --infodi | --infod | --info | --inf)
223 ac_prev=infodir ;;
224 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225 infodir="$ac_optarg" ;;
227 -libdir | --libdir | --libdi | --libd)
228 ac_prev=libdir ;;
229 -libdir=* | --libdir=* | --libdi=* | --libd=*)
230 libdir="$ac_optarg" ;;
232 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233 | --libexe | --libex | --libe)
234 ac_prev=libexecdir ;;
235 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236 | --libexe=* | --libex=* | --libe=*)
237 libexecdir="$ac_optarg" ;;
239 -localstatedir | --localstatedir | --localstatedi | --localstated \
240 | --localstate | --localstat | --localsta | --localst \
241 | --locals | --local | --loca | --loc | --lo)
242 ac_prev=localstatedir ;;
243 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246 localstatedir="$ac_optarg" ;;
248 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249 ac_prev=mandir ;;
250 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251 mandir="$ac_optarg" ;;
253 -nfp | --nfp | --nf)
254 # Obsolete; use --without-fp.
255 with_fp=no ;;
257 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258 | --no-cr | --no-c)
259 no_create=yes ;;
261 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
263 no_recursion=yes ;;
265 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267 | --oldin | --oldi | --old | --ol | --o)
268 ac_prev=oldincludedir ;;
269 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272 oldincludedir="$ac_optarg" ;;
274 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275 ac_prev=prefix ;;
276 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277 prefix="$ac_optarg" ;;
279 -program-prefix | --program-prefix | --program-prefi | --program-pref \
280 | --program-pre | --program-pr | --program-p)
281 ac_prev=program_prefix ;;
282 -program-prefix=* | --program-prefix=* | --program-prefi=* \
283 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284 program_prefix="$ac_optarg" ;;
286 -program-suffix | --program-suffix | --program-suffi | --program-suff \
287 | --program-suf | --program-su | --program-s)
288 ac_prev=program_suffix ;;
289 -program-suffix=* | --program-suffix=* | --program-suffi=* \
290 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291 program_suffix="$ac_optarg" ;;
293 -program-transform-name | --program-transform-name \
294 | --program-transform-nam | --program-transform-na \
295 | --program-transform-n | --program-transform- \
296 | --program-transform | --program-transfor \
297 | --program-transfo | --program-transf \
298 | --program-trans | --program-tran \
299 | --progr-tra | --program-tr | --program-t)
300 ac_prev=program_transform_name ;;
301 -program-transform-name=* | --program-transform-name=* \
302 | --program-transform-nam=* | --program-transform-na=* \
303 | --program-transform-n=* | --program-transform-=* \
304 | --program-transform=* | --program-transfor=* \
305 | --program-transfo=* | --program-transf=* \
306 | --program-trans=* | --program-tran=* \
307 | --progr-tra=* | --program-tr=* | --program-t=*)
308 program_transform_name="$ac_optarg" ;;
310 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311 | -silent | --silent | --silen | --sile | --sil)
312 silent=yes ;;
314 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
315 ac_prev=sbindir ;;
316 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
317 | --sbi=* | --sb=*)
318 sbindir="$ac_optarg" ;;
320 -sharedstatedir | --sharedstatedir | --sharedstatedi \
321 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322 | --sharedst | --shareds | --shared | --share | --shar \
323 | --sha | --sh)
324 ac_prev=sharedstatedir ;;
325 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
328 | --sha=* | --sh=*)
329 sharedstatedir="$ac_optarg" ;;
331 -site | --site | --sit)
332 ac_prev=site ;;
333 -site=* | --site=* | --sit=*)
334 site="$ac_optarg" ;;
336 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337 ac_prev=srcdir ;;
338 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339 srcdir="$ac_optarg" ;;
341 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342 | --syscon | --sysco | --sysc | --sys | --sy)
343 ac_prev=sysconfdir ;;
344 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346 sysconfdir="$ac_optarg" ;;
348 -target | --target | --targe | --targ | --tar | --ta | --t)
349 ac_prev=target ;;
350 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351 target="$ac_optarg" ;;
353 -v | -verbose | --verbose | --verbos | --verbo | --verb)
354 verbose=yes ;;
356 -version | --version | --versio | --versi | --vers)
357 echo "configure generated by autoconf version 2.13"
358 exit 0 ;;
360 -with-* | --with-*)
361 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 case "$ac_option" in
368 *=*) ;;
369 *) ac_optarg=yes ;;
370 esac
371 eval "with_${ac_package}='$ac_optarg'" ;;
373 -without-* | --without-*)
374 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375 # Reject names that are not valid shell variable names.
376 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
379 ac_package=`echo $ac_package| sed 's/-/_/g'`
380 eval "with_${ac_package}=no" ;;
382 --x)
383 # Obsolete; use --with-x.
384 with_x=yes ;;
386 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387 | --x-incl | --x-inc | --x-in | --x-i)
388 ac_prev=x_includes ;;
389 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391 x_includes="$ac_optarg" ;;
393 -x-libraries | --x-libraries | --x-librarie | --x-librari \
394 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395 ac_prev=x_libraries ;;
396 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398 x_libraries="$ac_optarg" ;;
400 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
404 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405 echo "configure: warning: $ac_option: invalid host type" 1>&2
407 if test "x$nonopt" != xNONE; then
408 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
410 nonopt="$ac_option"
413 esac
414 done
416 if test -n "$ac_prev"; then
417 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
422 # File descriptor usage:
423 # 0 standard input
424 # 1 file creation
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
431 exec 6>/dev/null
432 else
433 exec 6>&1
435 exec 5>./config.log
437 echo "\
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
440 " 1>&5
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
444 ac_configure_args=
445 for ac_arg
447 case "$ac_arg" in
448 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449 | --no-cr | --no-c) ;;
450 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
455 esac
456 done
458 # NLS nuisances.
459 # Only set these to C if already set. These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
471 echo > confdefs.h
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=VERSION
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479 ac_srcdir_defaulted=yes
480 # Try the directory containing this script, then its parent.
481 ac_prog=$0
482 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
484 srcdir=$ac_confdir
485 if test ! -r $srcdir/$ac_unique_file; then
486 srcdir=..
488 else
489 ac_srcdir_defaulted=no
491 if test ! -r $srcdir/$ac_unique_file; then
492 if test "$ac_srcdir_defaulted" = yes; then
493 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
494 else
495 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502 if test "x$prefix" != xNONE; then
503 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
504 else
505 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
508 for ac_site_file in $CONFIG_SITE; do
509 if test -r "$ac_site_file"; then
510 echo "loading site script $ac_site_file"
511 . "$ac_site_file"
513 done
515 if test -r "$cache_file"; then
516 echo "loading cache $cache_file"
517 . $cache_file
518 else
519 echo "creating cache $cache_file"
520 > $cache_file
523 ac_ext=c
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
530 ac_exeext=
531 ac_objext=o
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535 ac_n= ac_c='
536 ' ac_t=' '
537 else
538 ac_n=-n ac_c= ac_t=
540 else
541 ac_n= ac_c='\c' ac_t=
549 PACKAGE=libelf
550 VERSION=`cat $srcdir/VERSION`
553 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
554 if test "${enable_maintainer_mode+set}" = set; then
555 enableval="$enable_maintainer_mode"
556 mr_enable_maintainer_mode="$enableval"
557 else
558 case :${I_AM_THE_MAINTAINER_OF}: in
559 *:libelf:*) mr_enable_maintainer_mode=yes;;
560 *) mr_enable_maintainer_mode=no;;
561 esac
564 if test x"$mr_enable_maintainer_mode" = x"yes"; then
565 MAINT=
566 else
567 MAINT='maintainer-only-'
572 ALL_LINGUAS=`cd $srcdir/po && echo *.po | sed 's/\.po//g'`
574 set `echo $VERSION | sed 's/\./ /g'`
575 MAJOR=${1-1}
576 MINOR=${2-0}
577 PATCH=${3-0}
580 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
581 echo "configure:582: checking whether ${MAKE-make} sets \${MAKE}" >&5
582 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
583 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
584 echo $ac_n "(cached) $ac_c" 1>&6
585 else
586 cat > conftestmake <<\EOF
587 all:
588 @echo 'ac_maketemp="${MAKE}"'
590 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
591 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
592 if test -n "$ac_maketemp"; then
593 eval ac_cv_prog_make_${ac_make}_set=yes
594 else
595 eval ac_cv_prog_make_${ac_make}_set=no
597 rm -f conftestmake
599 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
600 echo "$ac_t""yes" 1>&6
601 SET_MAKE=
602 else
603 echo "$ac_t""no" 1>&6
604 SET_MAKE="MAKE=${MAKE-make}"
607 # Extract the first word of "gcc", so it can be a program name with args.
608 set dummy gcc; ac_word=$2
609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
610 echo "configure:611: checking for $ac_word" >&5
611 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
612 echo $ac_n "(cached) $ac_c" 1>&6
613 else
614 if test -n "$CC"; then
615 ac_cv_prog_CC="$CC" # Let the user override the test.
616 else
617 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
618 ac_dummy="$PATH"
619 for ac_dir in $ac_dummy; do
620 test -z "$ac_dir" && ac_dir=.
621 if test -f $ac_dir/$ac_word; then
622 ac_cv_prog_CC="gcc"
623 break
625 done
626 IFS="$ac_save_ifs"
629 CC="$ac_cv_prog_CC"
630 if test -n "$CC"; then
631 echo "$ac_t""$CC" 1>&6
632 else
633 echo "$ac_t""no" 1>&6
636 if test -z "$CC"; then
637 # Extract the first word of "cc", so it can be a program name with args.
638 set dummy cc; ac_word=$2
639 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
640 echo "configure:641: checking for $ac_word" >&5
641 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
642 echo $ac_n "(cached) $ac_c" 1>&6
643 else
644 if test -n "$CC"; then
645 ac_cv_prog_CC="$CC" # Let the user override the test.
646 else
647 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
648 ac_prog_rejected=no
649 ac_dummy="$PATH"
650 for ac_dir in $ac_dummy; do
651 test -z "$ac_dir" && ac_dir=.
652 if test -f $ac_dir/$ac_word; then
653 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
654 ac_prog_rejected=yes
655 continue
657 ac_cv_prog_CC="cc"
658 break
660 done
661 IFS="$ac_save_ifs"
662 if test $ac_prog_rejected = yes; then
663 # We found a bogon in the path, so make sure we never use it.
664 set dummy $ac_cv_prog_CC
665 shift
666 if test $# -gt 0; then
667 # We chose a different compiler from the bogus one.
668 # However, it has the same basename, so the bogon will be chosen
669 # first if we set CC to just the basename; use the full file name.
670 shift
671 set dummy "$ac_dir/$ac_word" "$@"
672 shift
673 ac_cv_prog_CC="$@"
678 CC="$ac_cv_prog_CC"
679 if test -n "$CC"; then
680 echo "$ac_t""$CC" 1>&6
681 else
682 echo "$ac_t""no" 1>&6
685 if test -z "$CC"; then
686 case "`uname -s`" in
687 *win32* | *WIN32*)
688 # Extract the first word of "cl", so it can be a program name with args.
689 set dummy cl; ac_word=$2
690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691 echo "configure:692: checking for $ac_word" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
694 else
695 if test -n "$CC"; then
696 ac_cv_prog_CC="$CC" # Let the user override the test.
697 else
698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
699 ac_dummy="$PATH"
700 for ac_dir in $ac_dummy; do
701 test -z "$ac_dir" && ac_dir=.
702 if test -f $ac_dir/$ac_word; then
703 ac_cv_prog_CC="cl"
704 break
706 done
707 IFS="$ac_save_ifs"
710 CC="$ac_cv_prog_CC"
711 if test -n "$CC"; then
712 echo "$ac_t""$CC" 1>&6
713 else
714 echo "$ac_t""no" 1>&6
717 esac
719 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
722 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
723 echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
725 ac_ext=c
726 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
727 ac_cpp='$CPP $CPPFLAGS'
728 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
729 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
730 cross_compiling=$ac_cv_prog_cc_cross
732 cat > conftest.$ac_ext << EOF
734 #line 735 "configure"
735 #include "confdefs.h"
737 main(){return(0);}
739 if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
740 ac_cv_prog_cc_works=yes
741 # If we can't run a trivial program, we are probably using a cross compiler.
742 if (./conftest; exit) 2>/dev/null; then
743 ac_cv_prog_cc_cross=no
744 else
745 ac_cv_prog_cc_cross=yes
747 else
748 echo "configure: failed program was:" >&5
749 cat conftest.$ac_ext >&5
750 ac_cv_prog_cc_works=no
752 rm -fr conftest*
753 ac_ext=c
754 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
755 ac_cpp='$CPP $CPPFLAGS'
756 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
757 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
758 cross_compiling=$ac_cv_prog_cc_cross
760 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
761 if test $ac_cv_prog_cc_works = no; then
762 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
765 echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
766 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
767 cross_compiling=$ac_cv_prog_cc_cross
769 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
770 echo "configure:771: checking whether we are using GNU C" >&5
771 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773 else
774 cat > conftest.c <<EOF
775 #ifdef __GNUC__
776 yes;
777 #endif
779 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
780 ac_cv_prog_gcc=yes
781 else
782 ac_cv_prog_gcc=no
786 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
788 if test $ac_cv_prog_gcc = yes; then
789 GCC=yes
790 else
791 GCC=
794 ac_test_CFLAGS="${CFLAGS+set}"
795 ac_save_CFLAGS="$CFLAGS"
796 CFLAGS=
797 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
798 echo "configure:799: checking whether ${CC-cc} accepts -g" >&5
799 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801 else
802 echo 'void f(){}' > conftest.c
803 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
804 ac_cv_prog_cc_g=yes
805 else
806 ac_cv_prog_cc_g=no
808 rm -f conftest*
812 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
813 if test "$ac_test_CFLAGS" = set; then
814 CFLAGS="$ac_save_CFLAGS"
815 elif test $ac_cv_prog_cc_g = yes; then
816 if test "$GCC" = yes; then
817 CFLAGS="-g -O2"
818 else
819 CFLAGS="-g"
821 else
822 if test "$GCC" = yes; then
823 CFLAGS="-O2"
824 else
825 CFLAGS=
829 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
830 echo "configure:831: checking how to run the C preprocessor" >&5
831 # On Suns, sometimes $CPP names a directory.
832 if test -n "$CPP" && test -d "$CPP"; then
833 CPP=
835 if test -z "$CPP"; then
836 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
837 echo $ac_n "(cached) $ac_c" 1>&6
838 else
839 # This must be in double quotes, not single quotes, because CPP may get
840 # substituted into the Makefile and "${CC-cc}" will confuse make.
841 CPP="${CC-cc} -E"
842 # On the NeXT, cc -E runs the code through the compiler's parser,
843 # not just through cpp.
844 cat > conftest.$ac_ext <<EOF
845 #line 846 "configure"
846 #include "confdefs.h"
847 #include <assert.h>
848 Syntax Error
850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
851 { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
853 if test -z "$ac_err"; then
855 else
856 echo "$ac_err" >&5
857 echo "configure: failed program was:" >&5
858 cat conftest.$ac_ext >&5
859 rm -rf conftest*
860 CPP="${CC-cc} -E -traditional-cpp"
861 cat > conftest.$ac_ext <<EOF
862 #line 863 "configure"
863 #include "confdefs.h"
864 #include <assert.h>
865 Syntax Error
867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
868 { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
870 if test -z "$ac_err"; then
872 else
873 echo "$ac_err" >&5
874 echo "configure: failed program was:" >&5
875 cat conftest.$ac_ext >&5
876 rm -rf conftest*
877 CPP="${CC-cc} -nologo -E"
878 cat > conftest.$ac_ext <<EOF
879 #line 880 "configure"
880 #include "confdefs.h"
881 #include <assert.h>
882 Syntax Error
884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
885 { (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
887 if test -z "$ac_err"; then
889 else
890 echo "$ac_err" >&5
891 echo "configure: failed program was:" >&5
892 cat conftest.$ac_ext >&5
893 rm -rf conftest*
894 CPP=/lib/cpp
896 rm -f conftest*
898 rm -f conftest*
900 rm -f conftest*
901 ac_cv_prog_CPP="$CPP"
903 CPP="$ac_cv_prog_CPP"
904 else
905 ac_cv_prog_CPP="$CPP"
907 echo "$ac_t""$CPP" 1>&6
909 ac_aux_dir=
910 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
911 if test -f $ac_dir/install-sh; then
912 ac_aux_dir=$ac_dir
913 ac_install_sh="$ac_aux_dir/install-sh -c"
914 break
915 elif test -f $ac_dir/install.sh; then
916 ac_aux_dir=$ac_dir
917 ac_install_sh="$ac_aux_dir/install.sh -c"
918 break
920 done
921 if test -z "$ac_aux_dir"; then
922 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
924 ac_config_guess=$ac_aux_dir/config.guess
925 ac_config_sub=$ac_aux_dir/config.sub
926 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
928 # Find a good install program. We prefer a C program (faster),
929 # so one script is as good as another. But avoid the broken or
930 # incompatible versions:
931 # SysV /etc/install, /usr/sbin/install
932 # SunOS /usr/etc/install
933 # IRIX /sbin/install
934 # AIX /bin/install
935 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
936 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
937 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
938 # ./install, which can be erroneously created by make from ./install.sh.
939 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
940 echo "configure:941: checking for a BSD compatible install" >&5
941 if test -z "$INSTALL"; then
942 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
943 echo $ac_n "(cached) $ac_c" 1>&6
944 else
945 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
946 for ac_dir in $PATH; do
947 # Account for people who put trailing slashes in PATH elements.
948 case "$ac_dir/" in
949 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
951 # OSF1 and SCO ODT 3.0 have their own names for install.
952 # Don't use installbsd from OSF since it installs stuff as root
953 # by default.
954 for ac_prog in ginstall scoinst install; do
955 if test -f $ac_dir/$ac_prog; then
956 if test $ac_prog = install &&
957 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
958 # AIX install. It has an incompatible calling convention.
960 else
961 ac_cv_path_install="$ac_dir/$ac_prog -c"
962 break 2
965 done
967 esac
968 done
969 IFS="$ac_save_IFS"
972 if test "${ac_cv_path_install+set}" = set; then
973 INSTALL="$ac_cv_path_install"
974 else
975 # As a last resort, use the slow shell script. We don't cache a
976 # path for INSTALL within a source directory, because that will
977 # break other packages using the cache if that directory is
978 # removed, or if the path is relative.
979 INSTALL="$ac_install_sh"
982 echo "$ac_t""$INSTALL" 1>&6
984 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
985 # It thinks the first close brace ends the variable substitution.
986 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
988 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
990 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
992 # Extract the first word of "ranlib", so it can be a program name with args.
993 set dummy ranlib; ac_word=$2
994 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
995 echo "configure:996: checking for $ac_word" >&5
996 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
997 echo $ac_n "(cached) $ac_c" 1>&6
998 else
999 if test -n "$RANLIB"; then
1000 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1001 else
1002 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1003 ac_dummy="$PATH"
1004 for ac_dir in $ac_dummy; do
1005 test -z "$ac_dir" && ac_dir=.
1006 if test -f $ac_dir/$ac_word; then
1007 ac_cv_prog_RANLIB="ranlib"
1008 break
1010 done
1011 IFS="$ac_save_ifs"
1012 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1015 RANLIB="$ac_cv_prog_RANLIB"
1016 if test -n "$RANLIB"; then
1017 echo "$ac_t""$RANLIB" 1>&6
1018 else
1019 echo "$ac_t""no" 1>&6
1022 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1023 echo "configure:1024: checking whether ln -s works" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1025 echo $ac_n "(cached) $ac_c" 1>&6
1026 else
1027 rm -f conftestdata
1028 if ln -s X conftestdata 2>/dev/null
1029 then
1030 rm -f conftestdata
1031 ac_cv_prog_LN_S="ln -s"
1032 else
1033 ac_cv_prog_LN_S=ln
1036 LN_S="$ac_cv_prog_LN_S"
1037 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1038 echo "$ac_t""yes" 1>&6
1039 else
1040 echo "$ac_t""no" 1>&6
1045 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1046 echo "configure:1047: checking for ANSI C header files" >&5
1047 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1048 echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050 cat > conftest.$ac_ext <<EOF
1051 #line 1052 "configure"
1052 #include "confdefs.h"
1053 #include <stdlib.h>
1054 #include <stdarg.h>
1055 #include <string.h>
1056 #include <float.h>
1058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1059 { (eval echo configure:1060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1061 if test -z "$ac_err"; then
1062 rm -rf conftest*
1063 ac_cv_header_stdc=yes
1064 else
1065 echo "$ac_err" >&5
1066 echo "configure: failed program was:" >&5
1067 cat conftest.$ac_ext >&5
1068 rm -rf conftest*
1069 ac_cv_header_stdc=no
1071 rm -f conftest*
1073 if test $ac_cv_header_stdc = yes; then
1074 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1075 cat > conftest.$ac_ext <<EOF
1076 #line 1077 "configure"
1077 #include "confdefs.h"
1078 #include <string.h>
1080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1081 egrep "memchr" >/dev/null 2>&1; then
1083 else
1084 rm -rf conftest*
1085 ac_cv_header_stdc=no
1087 rm -f conftest*
1091 if test $ac_cv_header_stdc = yes; then
1092 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1093 cat > conftest.$ac_ext <<EOF
1094 #line 1095 "configure"
1095 #include "confdefs.h"
1096 #include <stdlib.h>
1098 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1099 egrep "free" >/dev/null 2>&1; then
1101 else
1102 rm -rf conftest*
1103 ac_cv_header_stdc=no
1105 rm -f conftest*
1109 if test $ac_cv_header_stdc = yes; then
1110 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1111 if test "$cross_compiling" = yes; then
1113 else
1114 cat > conftest.$ac_ext <<EOF
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1117 #include <ctype.h>
1118 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1119 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1120 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1121 int main () { int i; for (i = 0; i < 256; i++)
1122 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1123 exit (0); }
1126 if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1127 then
1129 else
1130 echo "configure: failed program was:" >&5
1131 cat conftest.$ac_ext >&5
1132 rm -fr conftest*
1133 ac_cv_header_stdc=no
1135 rm -fr conftest*
1141 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1142 if test $ac_cv_header_stdc = yes; then
1143 cat >> confdefs.h <<\EOF
1144 #define STDC_HEADERS 1
1149 for ac_hdr in unistd.h stdint.h fcntl.h
1151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1153 echo "configure:1154: checking for $ac_hdr" >&5
1154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1155 echo $ac_n "(cached) $ac_c" 1>&6
1156 else
1157 cat > conftest.$ac_ext <<EOF
1158 #line 1159 "configure"
1159 #include "confdefs.h"
1160 #include <$ac_hdr>
1162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1163 { (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1165 if test -z "$ac_err"; then
1166 rm -rf conftest*
1167 eval "ac_cv_header_$ac_safe=yes"
1168 else
1169 echo "$ac_err" >&5
1170 echo "configure: failed program was:" >&5
1171 cat conftest.$ac_ext >&5
1172 rm -rf conftest*
1173 eval "ac_cv_header_$ac_safe=no"
1175 rm -f conftest*
1177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1178 echo "$ac_t""yes" 1>&6
1179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1180 cat >> confdefs.h <<EOF
1181 #define $ac_tr_hdr 1
1184 else
1185 echo "$ac_t""no" 1>&6
1187 done
1189 for ac_hdr in elf.h sys/elf.h link.h sys/link.h
1191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1193 echo "configure:1194: checking for $ac_hdr" >&5
1194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1195 echo $ac_n "(cached) $ac_c" 1>&6
1196 else
1197 cat > conftest.$ac_ext <<EOF
1198 #line 1199 "configure"
1199 #include "confdefs.h"
1200 #include <$ac_hdr>
1202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1203 { (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1205 if test -z "$ac_err"; then
1206 rm -rf conftest*
1207 eval "ac_cv_header_$ac_safe=yes"
1208 else
1209 echo "$ac_err" >&5
1210 echo "configure: failed program was:" >&5
1211 cat conftest.$ac_ext >&5
1212 rm -rf conftest*
1213 eval "ac_cv_header_$ac_safe=no"
1215 rm -f conftest*
1217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1218 echo "$ac_t""yes" 1>&6
1219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1220 cat >> confdefs.h <<EOF
1221 #define $ac_tr_hdr 1
1224 else
1225 echo "$ac_t""no" 1>&6
1227 done
1229 echo $ac_n "checking if ${CC} can compile elf.h""... $ac_c" 1>&6
1230 echo "configure:1231: checking if ${CC} can compile elf.h" >&5
1231 if eval "test \"`echo '$''{'libelf_cv_elf_h_works'+set}'`\" = set"; then
1232 echo $ac_n "(cached) $ac_c" 1>&6
1233 else
1235 cat > conftest.$ac_ext <<EOF
1236 #line 1237 "configure"
1237 #include "confdefs.h"
1238 #if HAVE_ELF_H
1239 #include <elf.h>
1240 #elif HAVE_SYS_ELF_H
1241 #include <sys/elf.h>
1242 #endif
1243 int main() {
1244 Elf32_Ehdr dummy
1245 ; return 0; }
1247 if { (eval echo configure:1248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1248 rm -rf conftest*
1249 libelf_cv_elf_h_works=yes
1250 else
1251 echo "configure: failed program was:" >&5
1252 cat conftest.$ac_ext >&5
1253 rm -rf conftest*
1254 libelf_cv_elf_h_works=no
1256 rm -f conftest*
1260 echo "$ac_t""$libelf_cv_elf_h_works" 1>&6
1261 if test "$libelf_cv_elf_h_works" = no; then
1262 ac_cv_header_elf_h=no
1263 ac_cv_header_sys_elf_h=no
1265 if test "$ac_cv_header_elf_h" = yes; then
1266 cat >> confdefs.h <<\EOF
1267 #define __LIBELF_HEADER_ELF_H <elf.h>
1270 elif test "$ac_cv_header_sys_elf_h" = yes; then
1271 cat >> confdefs.h <<\EOF
1272 #define __LIBELF_HEADER_ELF_H <sys/elf.h>
1277 for ac_hdr in ar.h libelf.h nlist.h gelf.h
1279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1281 echo "configure:1282: checking for $ac_hdr" >&5
1282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1283 echo $ac_n "(cached) $ac_c" 1>&6
1284 else
1285 cat > conftest.$ac_ext <<EOF
1286 #line 1287 "configure"
1287 #include "confdefs.h"
1288 #include <$ac_hdr>
1290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1291 { (eval echo configure:1292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1293 if test -z "$ac_err"; then
1294 rm -rf conftest*
1295 eval "ac_cv_header_$ac_safe=yes"
1296 else
1297 echo "$ac_err" >&5
1298 echo "configure: failed program was:" >&5
1299 cat conftest.$ac_ext >&5
1300 rm -rf conftest*
1301 eval "ac_cv_header_$ac_safe=no"
1303 rm -f conftest*
1305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1306 echo "$ac_t""yes" 1>&6
1307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1308 cat >> confdefs.h <<EOF
1309 #define $ac_tr_hdr 1
1312 else
1313 echo "$ac_t""no" 1>&6
1315 done
1317 echo $ac_n "checking whether to install <libelf.h>, <nlist.h> and <gelf.h>""... $ac_c" 1>&6
1318 echo "configure:1319: checking whether to install <libelf.h>, <nlist.h> and <gelf.h>" >&5
1319 # Check whether --enable-compat or --disable-compat was given.
1320 if test "${enable_compat+set}" = set; then
1321 enableval="$enable_compat"
1322 DO_COMPAT="$enableval"
1323 else
1324 if test "$ac_cv_header_libelf_h$ac_cv_header_nlist_h$ac_cv_header_gelf_h" = yesyesyes
1325 then DO_COMPAT=no
1326 else DO_COMPAT=yes
1330 echo "$ac_t""$DO_COMPAT" 1>&6
1333 echo $ac_n "checking for working const""... $ac_c" 1>&6
1334 echo "configure:1335: checking for working const" >&5
1335 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337 else
1338 cat > conftest.$ac_ext <<EOF
1339 #line 1340 "configure"
1340 #include "confdefs.h"
1342 int main() {
1344 /* Ultrix mips cc rejects this. */
1345 typedef int charset[2]; const charset x;
1346 /* SunOS 4.1.1 cc rejects this. */
1347 char const *const *ccp;
1348 char **p;
1349 /* NEC SVR4.0.2 mips cc rejects this. */
1350 struct point {int x, y;};
1351 static struct point const zero = {0,0};
1352 /* AIX XL C 1.02.0.0 rejects this.
1353 It does not let you subtract one const X* pointer from another in an arm
1354 of an if-expression whose if-part is not a constant expression */
1355 const char *g = "string";
1356 ccp = &g + (g ? g-g : 0);
1357 /* HPUX 7.0 cc rejects these. */
1358 ++ccp;
1359 p = (char**) ccp;
1360 ccp = (char const *const *) p;
1361 { /* SCO 3.2v4 cc rejects this. */
1362 char *t;
1363 char const *s = 0 ? (char *) 0 : (char const *) 0;
1365 *t++ = 0;
1367 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1368 int x[] = {25, 17};
1369 const int *foo = &x[0];
1370 ++foo;
1372 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1373 typedef const int *iptr;
1374 iptr p = 0;
1375 ++p;
1377 { /* AIX XL C 1.02.0.0 rejects this saying
1378 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1379 struct s { int j; const int *ap[3]; };
1380 struct s *b; b->j = 5;
1382 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1383 const int foo = 10;
1386 ; return 0; }
1388 if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1389 rm -rf conftest*
1390 ac_cv_c_const=yes
1391 else
1392 echo "configure: failed program was:" >&5
1393 cat conftest.$ac_ext >&5
1394 rm -rf conftest*
1395 ac_cv_c_const=no
1397 rm -f conftest*
1400 echo "$ac_t""$ac_cv_c_const" 1>&6
1401 if test $ac_cv_c_const = no; then
1402 cat >> confdefs.h <<\EOF
1403 #define const
1408 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1409 echo "configure:1410: checking for off_t" >&5
1410 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1411 echo $ac_n "(cached) $ac_c" 1>&6
1412 else
1413 cat > conftest.$ac_ext <<EOF
1414 #line 1415 "configure"
1415 #include "confdefs.h"
1416 #include <sys/types.h>
1417 #if STDC_HEADERS
1418 #include <stdlib.h>
1419 #include <stddef.h>
1420 #endif
1422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1423 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1424 rm -rf conftest*
1425 ac_cv_type_off_t=yes
1426 else
1427 rm -rf conftest*
1428 ac_cv_type_off_t=no
1430 rm -f conftest*
1433 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1434 if test $ac_cv_type_off_t = no; then
1435 cat >> confdefs.h <<\EOF
1436 #define off_t long
1441 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1442 echo "configure:1443: checking for size_t" >&5
1443 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1444 echo $ac_n "(cached) $ac_c" 1>&6
1445 else
1446 cat > conftest.$ac_ext <<EOF
1447 #line 1448 "configure"
1448 #include "confdefs.h"
1449 #include <sys/types.h>
1450 #if STDC_HEADERS
1451 #include <stdlib.h>
1452 #include <stddef.h>
1453 #endif
1455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1456 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1457 rm -rf conftest*
1458 ac_cv_type_size_t=yes
1459 else
1460 rm -rf conftest*
1461 ac_cv_type_size_t=no
1463 rm -f conftest*
1466 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1467 if test $ac_cv_type_size_t = no; then
1468 cat >> confdefs.h <<\EOF
1469 #define size_t unsigned
1475 echo $ac_n "checking size of short""... $ac_c" 1>&6
1476 echo "configure:1477: checking size of short" >&5
1477 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1478 echo $ac_n "(cached) $ac_c" 1>&6
1479 else
1480 if test "$cross_compiling" = yes; then
1481 ac_cv_sizeof_short=2
1482 else
1483 cat > conftest.$ac_ext <<EOF
1484 #line 1485 "configure"
1485 #include "confdefs.h"
1486 #include <stdio.h>
1487 main()
1489 FILE *f=fopen("conftestval", "w");
1490 if (!f) exit(1);
1491 fprintf(f, "%d\n", sizeof(short));
1492 exit(0);
1495 if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1496 then
1497 ac_cv_sizeof_short=`cat conftestval`
1498 else
1499 echo "configure: failed program was:" >&5
1500 cat conftest.$ac_ext >&5
1501 rm -fr conftest*
1502 ac_cv_sizeof_short=0
1504 rm -fr conftest*
1508 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1509 cat >> confdefs.h <<EOF
1510 #define SIZEOF_SHORT $ac_cv_sizeof_short
1514 echo $ac_n "checking size of int""... $ac_c" 1>&6
1515 echo "configure:1516: checking size of int" >&5
1516 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1517 echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519 if test "$cross_compiling" = yes; then
1520 ac_cv_sizeof_int=4
1521 else
1522 cat > conftest.$ac_ext <<EOF
1523 #line 1524 "configure"
1524 #include "confdefs.h"
1525 #include <stdio.h>
1526 main()
1528 FILE *f=fopen("conftestval", "w");
1529 if (!f) exit(1);
1530 fprintf(f, "%d\n", sizeof(int));
1531 exit(0);
1534 if { (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1535 then
1536 ac_cv_sizeof_int=`cat conftestval`
1537 else
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1540 rm -fr conftest*
1541 ac_cv_sizeof_int=0
1543 rm -fr conftest*
1547 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1548 cat >> confdefs.h <<EOF
1549 #define SIZEOF_INT $ac_cv_sizeof_int
1553 echo $ac_n "checking size of long""... $ac_c" 1>&6
1554 echo "configure:1555: checking size of long" >&5
1555 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1556 echo $ac_n "(cached) $ac_c" 1>&6
1557 else
1558 if test "$cross_compiling" = yes; then
1559 ac_cv_sizeof_long=4
1560 else
1561 cat > conftest.$ac_ext <<EOF
1562 #line 1563 "configure"
1563 #include "confdefs.h"
1564 #include <stdio.h>
1565 main()
1567 FILE *f=fopen("conftestval", "w");
1568 if (!f) exit(1);
1569 fprintf(f, "%d\n", sizeof(long));
1570 exit(0);
1573 if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1574 then
1575 ac_cv_sizeof_long=`cat conftestval`
1576 else
1577 echo "configure: failed program was:" >&5
1578 cat conftest.$ac_ext >&5
1579 rm -fr conftest*
1580 ac_cv_sizeof_long=0
1582 rm -fr conftest*
1586 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1587 cat >> confdefs.h <<EOF
1588 #define SIZEOF_LONG $ac_cv_sizeof_long
1592 echo $ac_n "checking size of long long""... $ac_c" 1>&6
1593 echo "configure:1594: checking size of long long" >&5
1594 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1595 echo $ac_n "(cached) $ac_c" 1>&6
1596 else
1597 if test "$cross_compiling" = yes; then
1598 ac_cv_sizeof_long_long=0
1599 else
1600 cat > conftest.$ac_ext <<EOF
1601 #line 1602 "configure"
1602 #include "confdefs.h"
1603 #include <stdio.h>
1604 main()
1606 FILE *f=fopen("conftestval", "w");
1607 if (!f) exit(1);
1608 fprintf(f, "%d\n", sizeof(long long));
1609 exit(0);
1612 if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1613 then
1614 ac_cv_sizeof_long_long=`cat conftestval`
1615 else
1616 echo "configure: failed program was:" >&5
1617 cat conftest.$ac_ext >&5
1618 rm -fr conftest*
1619 ac_cv_sizeof_long_long=0
1621 rm -fr conftest*
1625 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1626 cat >> confdefs.h <<EOF
1627 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1631 # Windows port
1632 echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1633 echo "configure:1634: checking size of __int64" >&5
1634 if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1635 echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637 if test "$cross_compiling" = yes; then
1638 ac_cv_sizeof___int64=0
1639 else
1640 cat > conftest.$ac_ext <<EOF
1641 #line 1642 "configure"
1642 #include "confdefs.h"
1643 #include <stdio.h>
1644 main()
1646 FILE *f=fopen("conftestval", "w");
1647 if (!f) exit(1);
1648 fprintf(f, "%d\n", sizeof(__int64));
1649 exit(0);
1652 if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1653 then
1654 ac_cv_sizeof___int64=`cat conftestval`
1655 else
1656 echo "configure: failed program was:" >&5
1657 cat conftest.$ac_ext >&5
1658 rm -fr conftest*
1659 ac_cv_sizeof___int64=0
1661 rm -fr conftest*
1665 echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1666 cat >> confdefs.h <<EOF
1667 #define SIZEOF___INT64 $ac_cv_sizeof___int64
1672 if test "$ac_cv_header_elf_h" = yes \
1673 || test "$ac_cv_header_sys_elf_h" = yes; then
1675 # Slowaris declares Elf32_Dyn in <link.h>.
1676 # QNX declares Elf32_Dyn in <sys/link.h>.
1677 echo $ac_n "checking for struct Elf32_Dyn""... $ac_c" 1>&6
1678 echo "configure:1679: checking for struct Elf32_Dyn" >&5
1679 if eval "test \"`echo '$''{'libelf_cv_struct_elf32_dyn'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1683 cat > conftest.$ac_ext <<EOF
1684 #line 1685 "configure"
1685 #include "confdefs.h"
1686 #include __LIBELF_HEADER_ELF_H
1687 int main() {
1688 Elf32_Dyn x
1689 ; return 0; }
1691 if { (eval echo configure:1692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1692 rm -rf conftest*
1693 libelf_cv_struct_elf32_dyn=yes
1694 else
1695 echo "configure: failed program was:" >&5
1696 cat conftest.$ac_ext >&5
1697 rm -rf conftest*
1698 cat > conftest.$ac_ext <<EOF
1699 #line 1700 "configure"
1700 #include "confdefs.h"
1701 #include <link.h>
1702 int main() {
1703 Elf32_Dyn x
1704 ; return 0; }
1706 if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1707 rm -rf conftest*
1708 libelf_cv_struct_elf32_dyn=link.h
1709 else
1710 echo "configure: failed program was:" >&5
1711 cat conftest.$ac_ext >&5
1712 rm -rf conftest*
1713 cat > conftest.$ac_ext <<EOF
1714 #line 1715 "configure"
1715 #include "confdefs.h"
1716 #include <sys/link.h>
1717 int main() {
1718 Elf32_Dyn x
1719 ; return 0; }
1721 if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1722 rm -rf conftest*
1723 libelf_cv_struct_elf32_dyn=sys/link.h
1724 else
1725 echo "configure: failed program was:" >&5
1726 cat conftest.$ac_ext >&5
1727 rm -rf conftest*
1728 libelf_cv_struct_elf32_dyn=no
1730 rm -f conftest*
1732 rm -f conftest*
1734 rm -f conftest*
1737 echo "$ac_t""$libelf_cv_struct_elf32_dyn" 1>&6
1738 if test "$libelf_cv_struct_elf32_dyn" = link.h; then
1739 cat >> confdefs.h <<\EOF
1740 #define __LIBELF_NEED_LINK_H 1
1743 elif test "$libelf_cv_struct_elf32_dyn" = sys/link.h; then
1744 cat >> confdefs.h <<\EOF
1745 #define __LIBELF_NEED_SYS_LINK_H 1
1748 elif test "$libelf_cv_struct_elf32_dyn" = no; then
1749 { echo "configure: error: no declaration for Elf32_Dyn" 1>&2; exit 1; }
1752 # Linux declares struct nlist in <elf.h>.
1753 echo $ac_n "checking for struct nlist in elf.h""... $ac_c" 1>&6
1754 echo "configure:1755: checking for struct nlist in elf.h" >&5
1755 if eval "test \"`echo '$''{'libelf_cv_struct_nlist'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757 else
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 #include __LIBELF_HEADER_ELF_H
1763 int main() {
1764 struct nlist nl
1765 ; return 0; }
1767 if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768 rm -rf conftest*
1769 libelf_cv_struct_nlist=yes
1770 else
1771 echo "configure: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1773 rm -rf conftest*
1774 libelf_cv_struct_nlist=no
1776 rm -f conftest*
1779 echo "$ac_t""$libelf_cv_struct_nlist" 1>&6
1780 if test "$libelf_cv_struct_nlist" = yes; then
1781 cat >> confdefs.h <<\EOF
1782 #define HAVE_STRUCT_NLIST_DECLARATION 1
1787 # Check for 64-bit data types.
1788 echo $ac_n "checking for struct Elf64_Ehdr""... $ac_c" 1>&6
1789 echo "configure:1790: checking for struct Elf64_Ehdr" >&5
1790 if eval "test \"`echo '$''{'libelf_cv_struct_elf64_ehdr'+set}'`\" = set"; then
1791 echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793 cat > conftest.$ac_ext <<EOF
1794 #line 1795 "configure"
1795 #include "confdefs.h"
1796 #include __LIBELF_HEADER_ELF_H
1797 int main() {
1798 Elf64_Ehdr x
1799 ; return 0; }
1801 if { (eval echo configure:1802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1802 rm -rf conftest*
1803 libelf_cv_struct_elf64_ehdr=yes
1804 else
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 rm -rf conftest*
1808 libelf_cv_struct_elf64_ehdr=no
1810 rm -f conftest*
1813 echo "$ac_t""$libelf_cv_struct_elf64_ehdr" 1>&6
1815 # Linux lacks typedefs for scalar ELF64_* types.
1816 echo $ac_n "checking for Elf64_Addr""... $ac_c" 1>&6
1817 echo "configure:1818: checking for Elf64_Addr" >&5
1818 if eval "test \"`echo '$''{'libelf_cv_type_elf64_addr'+set}'`\" = set"; then
1819 echo $ac_n "(cached) $ac_c" 1>&6
1820 else
1821 cat > conftest.$ac_ext <<EOF
1822 #line 1823 "configure"
1823 #include "confdefs.h"
1824 #include __LIBELF_HEADER_ELF_H
1825 int main() {
1826 Elf64_Addr x
1827 ; return 0; }
1829 if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1830 rm -rf conftest*
1831 libelf_cv_type_elf64_addr=yes
1832 else
1833 echo "configure: failed program was:" >&5
1834 cat conftest.$ac_ext >&5
1835 rm -rf conftest*
1836 libelf_cv_type_elf64_addr=no
1838 rm -f conftest*
1841 echo "$ac_t""$libelf_cv_type_elf64_addr" 1>&6
1843 # IRIX' struct Elf64_Rel is slightly different. Ugh.
1844 echo $ac_n "checking for struct Elf64_Rel""... $ac_c" 1>&6
1845 echo "configure:1846: checking for struct Elf64_Rel" >&5
1846 if eval "test \"`echo '$''{'libelf_cv_struct_elf64_rel'+set}'`\" = set"; then
1847 echo $ac_n "(cached) $ac_c" 1>&6
1848 else
1849 cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 #include __LIBELF_HEADER_ELF_H
1853 int main() {
1854 Elf64_Rel x; x.r_info = 1
1855 ; return 0; }
1857 if { (eval echo configure:1858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1858 rm -rf conftest*
1859 libelf_cv_struct_elf64_rel=yes
1860 else
1861 echo "configure: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 rm -rf conftest*
1864 cat > conftest.$ac_ext <<EOF
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1867 #include __LIBELF_HEADER_ELF_H
1868 int main() {
1869 Elf64_Rel x; x.r_sym = 1
1870 ; return 0; }
1872 if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1873 rm -rf conftest*
1874 libelf_cv_struct_elf64_rel=irix
1875 else
1876 echo "configure: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 rm -rf conftest*
1879 libelf_cv_struct_elf64_rel=no
1881 rm -f conftest*
1883 rm -f conftest*
1886 echo "$ac_t""$libelf_cv_struct_elf64_rel" 1>&6
1888 case "$libelf_cv_struct_elf64_ehdr:\
1889 $libelf_cv_type_elf64_addr:\
1890 $libelf_cv_struct_elf64_rel" in
1891 yes:yes:yes)
1892 libelf_64bit=yes;;
1893 yes:yes:irix)
1894 cat >> confdefs.h <<\EOF
1895 #define __LIBELF64_IRIX 1
1898 libelf_64bit=yes;;
1899 yes:no:yes)
1900 cat >> confdefs.h <<\EOF
1901 #define __LIBELF64_LINUX 1
1904 libelf_64bit=yes;;
1906 libelf_64bit=no;;
1907 esac
1909 # Check for symbol versioning definitions
1910 echo $ac_n "checking for Elf32_Verdef""... $ac_c" 1>&6
1911 echo "configure:1912: checking for Elf32_Verdef" >&5
1912 if eval "test \"`echo '$''{'libelf_cv_verdef32'+set}'`\" = set"; then
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915 cat > conftest.$ac_ext <<EOF
1916 #line 1917 "configure"
1917 #include "confdefs.h"
1918 #include __LIBELF_HEADER_ELF_H
1919 #if __LIBELF_NEED_LINK_H
1920 #include <link.h> /* Solaris wants this */
1921 #endif
1922 int main() {
1923 struct {
1924 Elf32_Verdef vd;
1925 Elf32_Verdaux vda;
1926 Elf32_Verneed vn;
1927 Elf32_Vernaux vna;
1929 ; return 0; }
1931 if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1932 rm -rf conftest*
1933 libelf_cv_verdef32=yes
1934 else
1935 echo "configure: failed program was:" >&5
1936 cat conftest.$ac_ext >&5
1937 rm -rf conftest*
1938 libelf_cv_verdef32=no
1940 rm -f conftest*
1943 echo "$ac_t""$libelf_cv_verdef32" 1>&6
1945 echo $ac_n "checking for Elf64_Verdef""... $ac_c" 1>&6
1946 echo "configure:1947: checking for Elf64_Verdef" >&5
1947 if eval "test \"`echo '$''{'libelf_cv_verdef64'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950 cat > conftest.$ac_ext <<EOF
1951 #line 1952 "configure"
1952 #include "confdefs.h"
1953 #include __LIBELF_HEADER_ELF_H
1954 #if __LIBELF_NEED_LINK_H
1955 #include <link.h> /* Solaris wants this */
1956 #endif
1957 int main() {
1958 struct {
1959 Elf64_Verdef vd;
1960 Elf64_Verdaux vda;
1961 Elf64_Verneed vn;
1962 Elf64_Vernaux vna;
1964 ; return 0; }
1966 if { (eval echo configure:1967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1967 rm -rf conftest*
1968 libelf_cv_verdef64=yes
1969 else
1970 echo "configure: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1972 rm -rf conftest*
1973 libelf_cv_verdef64=no
1975 rm -f conftest*
1978 echo "$ac_t""$libelf_cv_verdef64" 1>&6
1980 echo $ac_n "checking for SHT_SUNW_verdef""... $ac_c" 1>&6
1981 echo "configure:1982: checking for SHT_SUNW_verdef" >&5
1982 if eval "test \"`echo '$''{'libelf_cv_sun_verdef'+set}'`\" = set"; then
1983 echo $ac_n "(cached) $ac_c" 1>&6
1984 else
1985 cat > conftest.$ac_ext <<EOF
1986 #line 1987 "configure"
1987 #include "confdefs.h"
1988 #include __LIBELF_HEADER_ELF_H
1989 int main() {
1990 Elf32_Word x = SHT_SUNW_verdef + SHT_SUNW_verneed + SHT_SUNW_versym
1991 ; return 0; }
1993 if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1994 rm -rf conftest*
1995 libelf_cv_sun_verdef=yes
1996 else
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
1999 rm -rf conftest*
2000 libelf_cv_sun_verdef=no
2002 rm -f conftest*
2005 echo "$ac_t""$libelf_cv_sun_verdef" 1>&6
2007 echo $ac_n "checking for SHT_GNU_verdef""... $ac_c" 1>&6
2008 echo "configure:2009: checking for SHT_GNU_verdef" >&5
2009 if eval "test \"`echo '$''{'libelf_cv_gnu_verdef'+set}'`\" = set"; then
2010 echo $ac_n "(cached) $ac_c" 1>&6
2011 else
2012 cat > conftest.$ac_ext <<EOF
2013 #line 2014 "configure"
2014 #include "confdefs.h"
2015 #include __LIBELF_HEADER_ELF_H
2016 int main() {
2017 Elf32_Word x = SHT_GNU_verdef + SHT_GNU_verneed + SHT_GNU_versym
2018 ; return 0; }
2020 if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2021 rm -rf conftest*
2022 libelf_cv_gnu_verdef=yes
2023 else
2024 echo "configure: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 rm -rf conftest*
2027 libelf_cv_gnu_verdef=no
2029 rm -f conftest*
2032 echo "$ac_t""$libelf_cv_gnu_verdef" 1>&6
2033 else
2034 # lib/elf_repl.h supports 64-bit
2035 libelf_64bit=yes
2037 # lib/elf_repl.h supports symbol versioning
2038 libelf_cv_verdef32=yes
2039 libelf_cv_verdef64=yes
2040 libelf_cv_sun_verdef=yes
2041 libelf_cv_gnu_verdef=yes
2044 echo $ac_n "checking for 64-bit integer""... $ac_c" 1>&6
2045 echo "configure:2046: checking for 64-bit integer" >&5
2046 if eval "test \"`echo '$''{'libelf_cv_int64'+set}'`\" = set"; then
2047 echo $ac_n "(cached) $ac_c" 1>&6
2048 else
2050 if test "$ac_cv_sizeof_long" = 8; then
2051 libelf_cv_int64='long'
2052 elif test "$ac_cv_sizeof___int64" = 8; then
2053 libelf_cv_int64='__int64'
2054 elif test "$ac_cv_sizeof_long_long" = 8; then
2055 libelf_cv_int64='long long'
2056 else
2057 libelf_cv_int64=no
2061 echo "$ac_t""$libelf_cv_int64" 1>&6
2062 if test "$libelf_cv_int64" = no; then
2063 libelf_64bit=no
2064 else
2065 cat >> confdefs.h <<EOF
2066 #define __libelf_i64_t $libelf_cv_int64
2069 cat >> confdefs.h <<EOF
2070 #define __libelf_u64_t unsigned $libelf_cv_int64
2075 echo $ac_n "checking for 32-bit integer""... $ac_c" 1>&6
2076 echo "configure:2077: checking for 32-bit integer" >&5
2077 if eval "test \"`echo '$''{'libelf_cv_int32'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
2079 else
2081 if test "$ac_cv_sizeof_int" = 4; then
2082 libelf_cv_int32='int'
2083 elif test "$ac_cv_sizeof_long" = 4; then
2084 libelf_cv_int32='long'
2085 else
2086 libelf_cv_int32=no
2090 echo "$ac_t""$libelf_cv_int32" 1>&6
2091 if test "$libelf_cv_int32" = no; then
2092 { echo "configure: error: neither int nor long is 32-bit" 1>&2; exit 1; }
2093 else
2094 cat >> confdefs.h <<EOF
2095 #define __libelf_i32_t $libelf_cv_int32
2098 cat >> confdefs.h <<EOF
2099 #define __libelf_u32_t unsigned $libelf_cv_int32
2104 echo $ac_n "checking for 16-bit integer""... $ac_c" 1>&6
2105 echo "configure:2106: checking for 16-bit integer" >&5
2106 if eval "test \"`echo '$''{'libelf_cv_int16'+set}'`\" = set"; then
2107 echo $ac_n "(cached) $ac_c" 1>&6
2108 else
2110 if test "$ac_cv_sizeof_short" = 2; then
2111 libelf_cv_int16='short'
2112 elif test "$ac_cv_sizeof_int" = 2; then
2113 libelf_cv_int16='int'
2114 else
2115 libelf_cv_int16=no
2119 echo "$ac_t""$libelf_cv_int16" 1>&6
2120 if test "$libelf_cv_int16" = no; then
2121 { echo "configure: error: neither short nor int is 16-bit" 1>&2; exit 1; }
2122 else
2123 cat >> confdefs.h <<EOF
2124 #define __libelf_i16_t $libelf_cv_int16
2127 cat >> confdefs.h <<EOF
2128 #define __libelf_u16_t unsigned $libelf_cv_int16
2133 for ac_hdr in unistd.h
2135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2137 echo "configure:2138: checking for $ac_hdr" >&5
2138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2139 echo $ac_n "(cached) $ac_c" 1>&6
2140 else
2141 cat > conftest.$ac_ext <<EOF
2142 #line 2143 "configure"
2143 #include "confdefs.h"
2144 #include <$ac_hdr>
2146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2147 { (eval echo configure:2148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2149 if test -z "$ac_err"; then
2150 rm -rf conftest*
2151 eval "ac_cv_header_$ac_safe=yes"
2152 else
2153 echo "$ac_err" >&5
2154 echo "configure: failed program was:" >&5
2155 cat conftest.$ac_ext >&5
2156 rm -rf conftest*
2157 eval "ac_cv_header_$ac_safe=no"
2159 rm -f conftest*
2161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2162 echo "$ac_t""yes" 1>&6
2163 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2164 cat >> confdefs.h <<EOF
2165 #define $ac_tr_hdr 1
2168 else
2169 echo "$ac_t""no" 1>&6
2171 done
2173 for ac_func in getpagesize
2175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2176 echo "configure:2177: checking for $ac_func" >&5
2177 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2178 echo $ac_n "(cached) $ac_c" 1>&6
2179 else
2180 cat > conftest.$ac_ext <<EOF
2181 #line 2182 "configure"
2182 #include "confdefs.h"
2183 /* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $ac_func(); below. */
2185 #include <assert.h>
2186 /* Override any gcc2 internal prototype to avoid an error. */
2187 /* We use char because int might match the return type of a gcc2
2188 builtin and then its argument prototype would still apply. */
2189 char $ac_func();
2191 int main() {
2193 /* The GNU C library defines this for functions which it implements
2194 to always fail with ENOSYS. Some functions are actually named
2195 something starting with __ and the normal name is an alias. */
2196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2197 choke me
2198 #else
2199 $ac_func();
2200 #endif
2202 ; return 0; }
2204 if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2205 rm -rf conftest*
2206 eval "ac_cv_func_$ac_func=yes"
2207 else
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_func_$ac_func=no"
2213 rm -f conftest*
2216 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2217 echo "$ac_t""yes" 1>&6
2218 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2219 cat >> confdefs.h <<EOF
2220 #define $ac_tr_func 1
2223 else
2224 echo "$ac_t""no" 1>&6
2226 done
2228 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2229 echo "configure:2230: checking for working mmap" >&5
2230 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2231 echo $ac_n "(cached) $ac_c" 1>&6
2232 else
2233 if test "$cross_compiling" = yes; then
2234 ac_cv_func_mmap_fixed_mapped=no
2235 else
2236 cat > conftest.$ac_ext <<EOF
2237 #line 2238 "configure"
2238 #include "confdefs.h"
2240 /* Thanks to Mike Haertel and Jim Avera for this test.
2241 Here is a matrix of mmap possibilities:
2242 mmap private not fixed
2243 mmap private fixed at somewhere currently unmapped
2244 mmap private fixed at somewhere already mapped
2245 mmap shared not fixed
2246 mmap shared fixed at somewhere currently unmapped
2247 mmap shared fixed at somewhere already mapped
2248 For private mappings, we should verify that changes cannot be read()
2249 back from the file, nor mmap's back from the file at a different
2250 address. (There have been systems where private was not correctly
2251 implemented like the infamous i386 svr4.0, and systems where the
2252 VM page cache was not coherent with the filesystem buffer cache
2253 like early versions of FreeBSD and possibly contemporary NetBSD.)
2254 For shared mappings, we should conversely verify that changes get
2255 propogated back to all the places they're supposed to be.
2257 Grep wants private fixed already mapped.
2258 The main things grep needs to know about mmap are:
2259 * does it exist and is it safe to write into the mmap'd area
2260 * how to use it (BSD variants) */
2261 #include <sys/types.h>
2262 #include <fcntl.h>
2263 #include <sys/mman.h>
2265 /* This mess was copied from the GNU getpagesize.h. */
2266 #ifndef HAVE_GETPAGESIZE
2267 # ifdef HAVE_UNISTD_H
2268 # include <unistd.h>
2269 # endif
2271 /* Assume that all systems that can run configure have sys/param.h. */
2272 # ifndef HAVE_SYS_PARAM_H
2273 # define HAVE_SYS_PARAM_H 1
2274 # endif
2276 # ifdef _SC_PAGESIZE
2277 # define getpagesize() sysconf(_SC_PAGESIZE)
2278 # else /* no _SC_PAGESIZE */
2279 # ifdef HAVE_SYS_PARAM_H
2280 # include <sys/param.h>
2281 # ifdef EXEC_PAGESIZE
2282 # define getpagesize() EXEC_PAGESIZE
2283 # else /* no EXEC_PAGESIZE */
2284 # ifdef NBPG
2285 # define getpagesize() NBPG * CLSIZE
2286 # ifndef CLSIZE
2287 # define CLSIZE 1
2288 # endif /* no CLSIZE */
2289 # else /* no NBPG */
2290 # ifdef NBPC
2291 # define getpagesize() NBPC
2292 # else /* no NBPC */
2293 # ifdef PAGESIZE
2294 # define getpagesize() PAGESIZE
2295 # endif /* PAGESIZE */
2296 # endif /* no NBPC */
2297 # endif /* no NBPG */
2298 # endif /* no EXEC_PAGESIZE */
2299 # else /* no HAVE_SYS_PARAM_H */
2300 # define getpagesize() 8192 /* punt totally */
2301 # endif /* no HAVE_SYS_PARAM_H */
2302 # endif /* no _SC_PAGESIZE */
2304 #endif /* no HAVE_GETPAGESIZE */
2306 #ifdef __cplusplus
2307 extern "C" { void *malloc(unsigned); }
2308 #else
2309 char *malloc();
2310 #endif
2313 main()
2315 char *data, *data2, *data3;
2316 int i, pagesize;
2317 int fd;
2319 pagesize = getpagesize();
2322 * First, make a file with some known garbage in it.
2324 data = malloc(pagesize);
2325 if (!data)
2326 exit(1);
2327 for (i = 0; i < pagesize; ++i)
2328 *(data + i) = rand();
2329 umask(0);
2330 fd = creat("conftestmmap", 0600);
2331 if (fd < 0)
2332 exit(1);
2333 if (write(fd, data, pagesize) != pagesize)
2334 exit(1);
2335 close(fd);
2338 * Next, try to mmap the file at a fixed address which
2339 * already has something else allocated at it. If we can,
2340 * also make sure that we see the same garbage.
2342 fd = open("conftestmmap", O_RDWR);
2343 if (fd < 0)
2344 exit(1);
2345 data2 = malloc(2 * pagesize);
2346 if (!data2)
2347 exit(1);
2348 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2349 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2350 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2351 exit(1);
2352 for (i = 0; i < pagesize; ++i)
2353 if (*(data + i) != *(data2 + i))
2354 exit(1);
2357 * Finally, make sure that changes to the mapped area
2358 * do not percolate back to the file as seen by read().
2359 * (This is a bug on some variants of i386 svr4.0.)
2361 for (i = 0; i < pagesize; ++i)
2362 *(data2 + i) = *(data2 + i) + 1;
2363 data3 = malloc(pagesize);
2364 if (!data3)
2365 exit(1);
2366 if (read(fd, data3, pagesize) != pagesize)
2367 exit(1);
2368 for (i = 0; i < pagesize; ++i)
2369 if (*(data + i) != *(data3 + i))
2370 exit(1);
2371 close(fd);
2372 unlink("conftestmmap");
2373 exit(0);
2377 if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2378 then
2379 ac_cv_func_mmap_fixed_mapped=yes
2380 else
2381 echo "configure: failed program was:" >&5
2382 cat conftest.$ac_ext >&5
2383 rm -fr conftest*
2384 ac_cv_func_mmap_fixed_mapped=no
2386 rm -fr conftest*
2391 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2392 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2393 cat >> confdefs.h <<\EOF
2394 #define HAVE_MMAP 1
2399 for ac_func in ftruncate memcmp memcpy memmove
2401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2402 echo "configure:2403: checking for $ac_func" >&5
2403 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2404 echo $ac_n "(cached) $ac_c" 1>&6
2405 else
2406 cat > conftest.$ac_ext <<EOF
2407 #line 2408 "configure"
2408 #include "confdefs.h"
2409 /* System header to define __stub macros and hopefully few prototypes,
2410 which can conflict with char $ac_func(); below. */
2411 #include <assert.h>
2412 /* Override any gcc2 internal prototype to avoid an error. */
2413 /* We use char because int might match the return type of a gcc2
2414 builtin and then its argument prototype would still apply. */
2415 char $ac_func();
2417 int main() {
2419 /* The GNU C library defines this for functions which it implements
2420 to always fail with ENOSYS. Some functions are actually named
2421 something starting with __ and the normal name is an alias. */
2422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2423 choke me
2424 #else
2425 $ac_func();
2426 #endif
2428 ; return 0; }
2430 if { (eval echo configure:2431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2431 rm -rf conftest*
2432 eval "ac_cv_func_$ac_func=yes"
2433 else
2434 echo "configure: failed program was:" >&5
2435 cat conftest.$ac_ext >&5
2436 rm -rf conftest*
2437 eval "ac_cv_func_$ac_func=no"
2439 rm -f conftest*
2442 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2443 echo "$ac_t""yes" 1>&6
2444 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2445 cat >> confdefs.h <<EOF
2446 #define $ac_tr_func 1
2449 else
2450 echo "$ac_t""no" 1>&6
2452 done
2454 for ac_func in memset
2456 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2457 echo "configure:2458: checking for $ac_func" >&5
2458 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2459 echo $ac_n "(cached) $ac_c" 1>&6
2460 else
2461 cat > conftest.$ac_ext <<EOF
2462 #line 2463 "configure"
2463 #include "confdefs.h"
2464 /* System header to define __stub macros and hopefully few prototypes,
2465 which can conflict with char $ac_func(); below. */
2466 #include <assert.h>
2467 /* Override any gcc2 internal prototype to avoid an error. */
2468 /* We use char because int might match the return type of a gcc2
2469 builtin and then its argument prototype would still apply. */
2470 char $ac_func();
2472 int main() {
2474 /* The GNU C library defines this for functions which it implements
2475 to always fail with ENOSYS. Some functions are actually named
2476 something starting with __ and the normal name is an alias. */
2477 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2478 choke me
2479 #else
2480 $ac_func();
2481 #endif
2483 ; return 0; }
2485 if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2486 rm -rf conftest*
2487 eval "ac_cv_func_$ac_func=yes"
2488 else
2489 echo "configure: failed program was:" >&5
2490 cat conftest.$ac_ext >&5
2491 rm -rf conftest*
2492 eval "ac_cv_func_$ac_func=no"
2494 rm -f conftest*
2497 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2498 echo "$ac_t""yes" 1>&6
2499 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2500 cat >> confdefs.h <<EOF
2501 #define $ac_tr_func 1
2504 else
2505 echo "$ac_t""no" 1>&6
2506 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2508 done
2511 if test "$ac_cv_func_memset" = yes; then
2512 cat >> confdefs.h <<\EOF
2513 #define HAVE_MEMSET 1
2518 echo $ac_n "checking whether overlapping arrays are copied correctly""... $ac_c" 1>&6
2519 echo "configure:2520: checking whether overlapping arrays are copied correctly" >&5
2520 if eval "test \"`echo '$''{'libelf_cv_working_memmove'+set}'`\" = set"; then
2521 echo $ac_n "(cached) $ac_c" 1>&6
2522 else
2523 if test "$cross_compiling" = yes; then
2524 libelf_cv_working_memmove='maybe not'
2525 else
2526 cat > conftest.$ac_ext <<EOF
2527 #line 2528 "configure"
2528 #include "confdefs.h"
2529 #include "confdefs.h"
2530 #if HAVE_MEMMOVE
2531 extern void *memmove();
2532 #else
2533 extern void bcopy();
2534 #define memmove(d,s,n) bcopy((s),(d),(n))
2535 #endif
2536 extern int strcmp();
2537 main() {
2538 char buf[] = "0123456789";
2539 memmove(buf + 1, buf, 9);
2540 if (strcmp(buf, "0012345678")) exit(1);
2541 exit(0);
2544 if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2545 then
2546 libelf_cv_working_memmove=yes
2547 else
2548 echo "configure: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 rm -fr conftest*
2551 libelf_cv_working_memmove=no
2553 rm -fr conftest*
2558 echo "$ac_t""$libelf_cv_working_memmove" 1>&6
2559 if test "$libelf_cv_working_memmove" != yes; then
2560 cat >> confdefs.h <<\EOF
2561 #define HAVE_BROKEN_MEMMOVE 1
2566 echo $ac_n "checking the coffee machine""... $ac_c" 1>&6
2567 echo "configure:2568: checking the coffee machine" >&5
2568 if eval "test \"`echo '$''{'mr_cv_coffee_machine'+set}'`\" = set"; then
2569 echo $ac_n "(cached) $ac_c" 1>&6
2570 else
2571 mr_cv_coffee_machine='empty - operator may not work as expected'
2574 echo "$ac_t""$mr_cv_coffee_machine" 1>&6
2576 echo $ac_n "checking whether 64-bit ELF support is sufficient""... $ac_c" 1>&6
2577 echo "configure:2578: checking whether 64-bit ELF support is sufficient" >&5
2578 echo "$ac_t""$libelf_64bit" 1>&6
2579 echo $ac_n "checking whether to include 64-bit support""... $ac_c" 1>&6
2580 echo "configure:2581: checking whether to include 64-bit support" >&5
2581 if test "$libelf_64bit" = no; then
2582 libelf_enable_64bit=no
2583 else
2584 # Check whether --enable-elf64 or --disable-elf64 was given.
2585 if test "${enable_elf64+set}" = set; then
2586 enableval="$enable_elf64"
2587 libelf_enable_64bit="$enableval"
2588 else
2589 libelf_enable_64bit=yes
2593 echo "$ac_t""$libelf_enable_64bit" 1>&6
2594 if test "$libelf_enable_64bit" = yes; then
2595 cat >> confdefs.h <<\EOF
2596 #define __LIBELF64 1
2601 echo $ac_n "checking whether versioning support is sufficient""... $ac_c" 1>&6
2602 echo "configure:2603: checking whether versioning support is sufficient" >&5
2603 libelf_versioning=no
2604 case "$libelf_enable_64bit:$libelf_cv_verdef32:$libelf_cv_verdef64" in
2605 no:yes:* | yes:yes:yes)
2606 if test "$libelf_cv_sun_verdef" = yes; then
2607 cat >> confdefs.h <<\EOF
2608 #define __LIBELF_SUN_SYMBOL_VERSIONS 1
2611 libelf_versioning=yes
2612 elif test "$libelf_cv_gnu_verdef" = yes; then
2613 cat >> confdefs.h <<\EOF
2614 #define __LIBELF_GNU_SYMBOL_VERSIONS 1
2617 libelf_versioning=yes
2618 fi;;
2619 esac
2620 echo "$ac_t""$libelf_versioning" 1>&6
2621 echo $ac_n "checking whether to include versioning support""... $ac_c" 1>&6
2622 echo "configure:2623: checking whether to include versioning support" >&5
2623 if test "$libelf_versioning" = no; then
2624 libelf_enable_versioning=no
2625 else
2626 # Check whether --enable-versioning or --disable-versioning was given.
2627 if test "${enable_versioning+set}" = set; then
2628 enableval="$enable_versioning"
2629 libelf_enable_versioning="$enableval"
2630 else
2631 libelf_enable_versioning=yes
2635 echo "$ac_t""$libelf_enable_versioning" 1>&6
2636 if test "$libelf_enable_versioning" = yes; then
2637 cat >> confdefs.h <<\EOF
2638 #define __LIBELF_SYMBOL_VERSIONS 1
2646 # Needed for `make dist' even if NLS is disabled.
2647 GMOFILES=
2648 MSGFILES=
2649 POFILES=
2650 for mr_lang in $ALL_LINGUAS; do
2651 GMOFILES="$GMOFILES $mr_lang.gmo"
2652 MSGFILES="$MSGFILES $mr_lang.msg"
2653 POFILES="$POFILES $mr_lang.po"
2654 done
2659 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2660 echo "configure:2661: checking whether NLS is requested" >&5
2661 # Check whether --enable-nls or --disable-nls was given.
2662 if test "${enable_nls+set}" = set; then
2663 enableval="$enable_nls"
2664 mr_enable_nls="$enableval"
2665 else
2666 mr_enable_nls=yes
2669 echo "$ac_t""$mr_enable_nls" 1>&6
2671 CATOBJEXT=
2672 INSTOBJEXT=
2673 localedir=
2674 if test "$mr_enable_nls" = yes; then
2675 mr_PATH=`echo ":$PATH" | sed -e 's,:^:*openwin^:*,,g' -e 's,^:,,'`
2676 echo $ac_n "checking for dgettext""... $ac_c" 1>&6
2677 echo "configure:2678: checking for dgettext" >&5
2678 if eval "test \"`echo '$''{'mr_cv_func_dgettext'+set}'`\" = set"; then
2679 echo $ac_n "(cached) $ac_c" 1>&6
2680 else
2682 cat > conftest.$ac_ext <<EOF
2683 #line 2684 "configure"
2684 #include "confdefs.h"
2685 #include <libintl.h>
2686 int main() {
2687 char *s = dgettext("", ""); return 0
2688 ; return 0; }
2690 if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2691 rm -rf conftest*
2692 mr_cv_func_dgettext=yes
2693 else
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2696 rm -rf conftest*
2697 mr_cv_func_dgettext=no
2699 rm -f conftest*
2703 echo "$ac_t""$mr_cv_func_dgettext" 1>&6
2704 if test "$mr_cv_func_dgettext" = yes; then
2705 # Extract the first word of "msgfmt", so it can be a program name with args.
2706 set dummy msgfmt; ac_word=$2
2707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708 echo "configure:2709: checking for $ac_word" >&5
2709 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2710 echo $ac_n "(cached) $ac_c" 1>&6
2711 else
2712 case "$MSGFMT" in
2714 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2716 ?:/*)
2717 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2721 ac_dummy="$mr_PATH"
2722 for ac_dir in $ac_dummy; do
2723 test -z "$ac_dir" && ac_dir=.
2724 if test -f $ac_dir/$ac_word; then
2725 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2726 break
2728 done
2729 IFS="$ac_save_ifs"
2730 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2732 esac
2734 MSGFMT="$ac_cv_path_MSGFMT"
2735 if test -n "$MSGFMT"; then
2736 echo "$ac_t""$MSGFMT" 1>&6
2737 else
2738 echo "$ac_t""no" 1>&6
2741 if test "$MSGFMT" != no; then
2742 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2743 set dummy gmsgfmt; ac_word=$2
2744 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2745 echo "configure:2746: checking for $ac_word" >&5
2746 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2747 echo $ac_n "(cached) $ac_c" 1>&6
2748 else
2749 case "$GMSGFMT" in
2751 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2753 ?:/*)
2754 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2758 ac_dummy="$mr_PATH"
2759 for ac_dir in $ac_dummy; do
2760 test -z "$ac_dir" && ac_dir=.
2761 if test -f $ac_dir/$ac_word; then
2762 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2763 break
2765 done
2766 IFS="$ac_save_ifs"
2767 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2769 esac
2771 GMSGFMT="$ac_cv_path_GMSGFMT"
2772 if test -n "$GMSGFMT"; then
2773 echo "$ac_t""$GMSGFMT" 1>&6
2774 else
2775 echo "$ac_t""no" 1>&6
2778 # Extract the first word of "xgettext", so it can be a program name with args.
2779 set dummy xgettext; ac_word=$2
2780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2781 echo "configure:2782: checking for $ac_word" >&5
2782 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2783 echo $ac_n "(cached) $ac_c" 1>&6
2784 else
2785 case "$XGETTEXT" in
2787 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2789 ?:/*)
2790 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a dos path.
2793 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2794 ac_dummy="$mr_PATH"
2795 for ac_dir in $ac_dummy; do
2796 test -z "$ac_dir" && ac_dir=.
2797 if test -f $ac_dir/$ac_word; then
2798 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2799 break
2801 done
2802 IFS="$ac_save_ifs"
2803 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext"
2805 esac
2807 XGETTEXT="$ac_cv_path_XGETTEXT"
2808 if test -n "$XGETTEXT"; then
2809 echo "$ac_t""$XGETTEXT" 1>&6
2810 else
2811 echo "$ac_t""no" 1>&6
2814 # Extract the first word of "msgmerge", so it can be a program name with args.
2815 set dummy msgmerge; ac_word=$2
2816 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2817 echo "configure:2818: checking for $ac_word" >&5
2818 if eval "test \"`echo '$''{'ac_cv_path_MSGMERGE'+set}'`\" = set"; then
2819 echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821 case "$MSGMERGE" in
2823 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
2825 ?:/*)
2826 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a dos path.
2829 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2830 ac_dummy="$mr_PATH"
2831 for ac_dir in $ac_dummy; do
2832 test -z "$ac_dir" && ac_dir=.
2833 if test -f $ac_dir/$ac_word; then
2834 ac_cv_path_MSGMERGE="$ac_dir/$ac_word"
2835 break
2837 done
2838 IFS="$ac_save_ifs"
2839 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE="msgmerge"
2841 esac
2843 MSGMERGE="$ac_cv_path_MSGMERGE"
2844 if test -n "$MSGMERGE"; then
2845 echo "$ac_t""$MSGMERGE" 1>&6
2846 else
2847 echo "$ac_t""no" 1>&6
2850 echo $ac_n "checking for GNU gettext""... $ac_c" 1>&6
2851 echo "configure:2852: checking for GNU gettext" >&5
2852 if eval "test \"`echo '$''{'mr_cv_gnu_gettext'+set}'`\" = set"; then
2853 echo $ac_n "(cached) $ac_c" 1>&6
2854 else
2856 cat > conftest.$ac_ext <<EOF
2857 #line 2858 "configure"
2858 #include "confdefs.h"
2860 int main() {
2861 extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr
2862 ; return 0; }
2864 if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2865 rm -rf conftest*
2866 mr_cv_gnu_gettext=yes
2867 else
2868 echo "configure: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
2870 rm -rf conftest*
2871 mr_cv_gnu_gettext=no
2873 rm -f conftest*
2877 echo "$ac_t""$mr_cv_gnu_gettext" 1>&6
2878 if test "$mr_cv_gnu_gettext" = yes; then
2879 echo $ac_n "checking for losing catgets-based GNU gettext""... $ac_c" 1>&6
2880 echo "configure:2881: checking for losing catgets-based GNU gettext" >&5
2881 if eval "test \"`echo '$''{'mr_cv_catgets_based_gettext'+set}'`\" = set"; then
2882 echo $ac_n "(cached) $ac_c" 1>&6
2883 else
2885 cat > conftest.$ac_ext <<EOF
2886 #line 2887 "configure"
2887 #include "confdefs.h"
2889 int main() {
2890 extern int _msg_tbl_length; return _msg_tbl_length
2891 ; return 0; }
2893 if { (eval echo configure:2894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2894 rm -rf conftest*
2895 mr_cv_catgets_based_gettext=yes
2896 else
2897 echo "configure: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 rm -rf conftest*
2900 mr_cv_catgets_based_gettext=no
2902 rm -f conftest*
2906 echo "$ac_t""$mr_cv_catgets_based_gettext" 1>&6
2907 if test "$mr_cv_catgets_based_gettext" = yes; then
2908 # This loses completely. Turn it off and use catgets.
2909 LIBS=`echo $LIBS | sed 's,-lintl,,g'`
2910 mr_cv_func_dgettext=no
2911 else
2912 # Is there a better test for this case?
2913 echo $ac_n "checking for pure GNU gettext""... $ac_c" 1>&6
2914 echo "configure:2915: checking for pure GNU gettext" >&5
2915 if eval "test \"`echo '$''{'mr_cv_pure_gnu_gettext'+set}'`\" = set"; then
2916 echo $ac_n "(cached) $ac_c" 1>&6
2917 else
2919 cat > conftest.$ac_ext <<EOF
2920 #line 2921 "configure"
2921 #include "confdefs.h"
2923 int main() {
2924 extern int gettext(); return gettext()
2925 ; return 0; }
2927 if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2928 rm -rf conftest*
2929 mr_cv_pure_gnu_gettext=yes
2930 else
2931 echo "configure: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2933 rm -rf conftest*
2934 mr_cv_pure_gnu_gettext=no
2936 rm -f conftest*
2940 echo "$ac_t""$mr_cv_pure_gnu_gettext" 1>&6
2941 if test "$mr_cv_pure_gnu_gettext" = yes; then
2942 CATOBJEXT=.gmo
2943 localedir='$(prefix)/share/locale'
2944 else
2945 CATOBJEXT=.mo
2946 localedir='$(prefix)/lib/locale'
2948 INSTOBJEXT=.mo
2950 else
2951 # System provided gettext
2952 CATOBJEXT=.mo
2953 INSTOBJEXT=.mo
2954 localedir='$(prefix)/lib/locale'
2956 else
2957 # Gettext but no msgfmt. Try catgets.
2958 mr_cv_func_dgettext=no
2961 if test "$mr_cv_func_dgettext" = yes; then
2962 cat >> confdefs.h <<\EOF
2963 #define HAVE_DGETTEXT 1
2966 else
2967 echo $ac_n "checking for catgets""... $ac_c" 1>&6
2968 echo "configure:2969: checking for catgets" >&5
2969 if eval "test \"`echo '$''{'mr_cv_func_catgets'+set}'`\" = set"; then
2970 echo $ac_n "(cached) $ac_c" 1>&6
2971 else
2973 cat > conftest.$ac_ext <<EOF
2974 #line 2975 "configure"
2975 #include "confdefs.h"
2976 #include <nl_types.h>
2977 int main() {
2978 catgets(catopen("",0),0,0,"");return 0;
2979 ; return 0; }
2981 if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2982 rm -rf conftest*
2983 mr_cv_func_catgets=yes
2984 else
2985 echo "configure: failed program was:" >&5
2986 cat conftest.$ac_ext >&5
2987 rm -rf conftest*
2988 mr_cv_func_catgets=no
2990 rm -f conftest*
2994 echo "$ac_t""$mr_cv_func_catgets" 1>&6
2995 if test "$mr_cv_func_catgets" = yes; then
2996 # Extract the first word of "gencat", so it can be a program name with args.
2997 set dummy gencat; ac_word=$2
2998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2999 echo "configure:3000: checking for $ac_word" >&5
3000 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003 case "$GENCAT" in
3005 ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
3007 ?:/*)
3008 ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
3011 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3012 ac_dummy="$mr_PATH"
3013 for ac_dir in $ac_dummy; do
3014 test -z "$ac_dir" && ac_dir=.
3015 if test -f $ac_dir/$ac_word; then
3016 ac_cv_path_GENCAT="$ac_dir/$ac_word"
3017 break
3019 done
3020 IFS="$ac_save_ifs"
3021 test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
3023 esac
3025 GENCAT="$ac_cv_path_GENCAT"
3026 if test -n "$GENCAT"; then
3027 echo "$ac_t""$GENCAT" 1>&6
3028 else
3029 echo "$ac_t""no" 1>&6
3032 if test "$GENCAT" != no; then
3033 cat >> confdefs.h <<\EOF
3034 #define HAVE_CATGETS 1
3037 # Extract the first word of "gmsgfmt msgfmt", so it can be a program name with args.
3038 set dummy gmsgfmt msgfmt; ac_word=$2
3039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_word" >&5
3041 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3042 echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044 case "$GMSGFMT" in
3046 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3048 ?:/*)
3049 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3052 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3053 ac_dummy="$mr_PATH"
3054 for ac_dir in $ac_dummy; do
3055 test -z "$ac_dir" && ac_dir=.
3056 if test -f $ac_dir/$ac_word; then
3057 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3058 break
3060 done
3061 IFS="$ac_save_ifs"
3062 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="msgfmt"
3064 esac
3066 GMSGFMT="$ac_cv_path_GMSGFMT"
3067 if test -n "$GMSGFMT"; then
3068 echo "$ac_t""$GMSGFMT" 1>&6
3069 else
3070 echo "$ac_t""no" 1>&6
3073 # Extract the first word of "xgettext", so it can be a program name with args.
3074 set dummy xgettext; ac_word=$2
3075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3076 echo "configure:3077: checking for $ac_word" >&5
3077 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3078 echo $ac_n "(cached) $ac_c" 1>&6
3079 else
3080 case "$XGETTEXT" in
3082 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3084 ?:/*)
3085 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a dos path.
3088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3089 ac_dummy="$mr_PATH"
3090 for ac_dir in $ac_dummy; do
3091 test -z "$ac_dir" && ac_dir=.
3092 if test -f $ac_dir/$ac_word; then
3093 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3094 break
3096 done
3097 IFS="$ac_save_ifs"
3098 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext"
3100 esac
3102 XGETTEXT="$ac_cv_path_XGETTEXT"
3103 if test -n "$XGETTEXT"; then
3104 echo "$ac_t""$XGETTEXT" 1>&6
3105 else
3106 echo "$ac_t""no" 1>&6
3109 CATOBJEXT=.cat
3110 INSTOBJEXT=.cat
3111 localedir='$(prefix)/lib/locale'
3113 else
3114 echo "configure: warning: no NLS support, disabled" 1>&2
3115 mr_enable_nls=no
3123 POSUB=
3124 CATALOGS=
3125 if test "$mr_enable_nls" = yes; then
3126 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3127 echo "configure:3128: checking for catalogs to be installed" >&5
3128 mr_linguas=
3129 for mr_lang in ${LINGUAS=$ALL_LINGUAS}; do
3130 case " $ALL_LINGUAS " in
3131 *" $mr_lang "*)
3132 mr_linguas="$mr_linguas$mr_lang "
3133 CATALOGS="$CATALOGS $mr_lang$CATOBJEXT"
3135 esac
3136 done
3137 echo "$ac_t""$mr_linguas" 1>&6
3138 POSUB=po
3143 LIBINTL=
3144 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
3145 echo "configure:3146: checking for gettext in -lintl" >&5
3146 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
3147 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3148 echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150 ac_save_LIBS="$LIBS"
3151 LIBS="-lintl $LIBS"
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 /* Override any gcc2 internal prototype to avoid an error. */
3156 /* We use char because int might match the return type of a gcc2
3157 builtin and then its argument prototype would still apply. */
3158 char gettext();
3160 int main() {
3161 gettext()
3162 ; return 0; }
3164 if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3165 rm -rf conftest*
3166 eval "ac_cv_lib_$ac_lib_var=yes"
3167 else
3168 echo "configure: failed program was:" >&5
3169 cat conftest.$ac_ext >&5
3170 rm -rf conftest*
3171 eval "ac_cv_lib_$ac_lib_var=no"
3173 rm -f conftest*
3174 LIBS="$ac_save_LIBS"
3177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3178 echo "$ac_t""yes" 1>&6
3179 LIBINTL=-lintl
3180 else
3181 echo "$ac_t""no" 1>&6
3187 # Make sure we can run config.sub.
3188 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
3189 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
3192 echo $ac_n "checking host system type""... $ac_c" 1>&6
3193 echo "configure:3194: checking host system type" >&5
3195 host_alias=$host
3196 case "$host_alias" in
3197 NONE)
3198 case $nonopt in
3199 NONE)
3200 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
3201 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
3202 fi ;;
3203 *) host_alias=$nonopt ;;
3204 esac ;;
3205 esac
3207 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
3208 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3209 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3210 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3211 echo "$ac_t""$host" 1>&6
3215 PICFLAGS=
3216 SHLIB_SFX=
3217 SHLINK_SFX=
3218 SONAME_SFX=
3219 LINK_SHLIB=
3220 INSTALL_SHLIB=
3221 DEPSHLIBS=
3222 echo $ac_n "checking whether to build a shared library""... $ac_c" 1>&6
3223 echo "configure:3224: checking whether to build a shared library" >&5
3224 # Check whether --enable-shared or --disable-shared was given.
3225 if test "${enable_shared+set}" = set; then
3226 enableval="$enable_shared"
3227 mr_enable_shared="$enableval"
3228 else
3229 mr_enable_shared=yes
3232 echo "$ac_t""$mr_enable_shared" 1>&6
3233 if test "$mr_enable_shared" = yes; then
3234 echo $ac_n "checking whether GNU naming conventions are requested""... $ac_c" 1>&6
3235 echo "configure:3236: checking whether GNU naming conventions are requested" >&5
3236 # Check whether --enable-gnu-names or --disable-gnu-names was given.
3237 if test "${enable_gnu_names+set}" = set; then
3238 enableval="$enable_gnu_names"
3239 mr_enable_gnu_names="$enableval"
3240 else
3241 mr_enable_gnu_names=no
3244 echo "$ac_t""$mr_enable_gnu_names" 1>&6
3247 # Extract the first word of "ld", so it can be a program name with args.
3248 set dummy ld; ac_word=$2
3249 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3250 echo "configure:3251: checking for $ac_word" >&5
3251 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
3252 echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254 case "$LD" in
3256 ac_cv_path_LD="$LD" # Let the user override the test with a path.
3258 ?:/*)
3259 ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
3262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3263 ac_dummy="$PATH"
3264 for ac_dir in $ac_dummy; do
3265 test -z "$ac_dir" && ac_dir=.
3266 if test -f $ac_dir/$ac_word; then
3267 ac_cv_path_LD="$ac_dir/$ac_word"
3268 break
3270 done
3271 IFS="$ac_save_ifs"
3272 test -z "$ac_cv_path_LD" && ac_cv_path_LD="ld"
3274 esac
3276 LD="$ac_cv_path_LD"
3277 if test -n "$LD"; then
3278 echo "$ac_t""$LD" 1>&6
3279 else
3280 echo "$ac_t""no" 1>&6
3283 case "$host" in
3284 *-linux*|*-gnu*)
3285 if test "$GCC" = yes; then
3288 echo $ac_n "checking for native ELF system""... $ac_c" 1>&6
3289 echo "configure:3290: checking for native ELF system" >&5
3290 if eval "test \"`echo '$''{'mr_cv_target_elf'+set}'`\" = set"; then
3291 echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293 if test "$cross_compiling" = yes; then
3294 mr_cv_target_elf=no
3295 else
3296 cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 #include <stdio.h>
3301 main(int argc, char **argv) {
3302 char buf[BUFSIZ];
3303 FILE *fp;
3304 int n;
3306 if ((fp = fopen(*argv, "r")) == NULL) {
3307 exit(1);
3309 n = fread(buf, 1, sizeof(buf), fp);
3310 if (n >= 52
3311 && buf[0] == '\177'
3312 && buf[1] == 'E'
3313 && buf[2] == 'L'
3314 && buf[3] == 'F') {
3315 exit(0);
3317 exit(1);
3320 if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3321 then
3322 mr_cv_target_elf=yes
3323 else
3324 echo "configure: failed program was:" >&5
3325 cat conftest.$ac_ext >&5
3326 rm -fr conftest*
3327 mr_cv_target_elf=no
3329 rm -fr conftest*
3334 echo "$ac_t""$mr_cv_target_elf" 1>&6
3335 if test "$mr_cv_target_elf" = yes; then
3336 PICFLAGS='-fPIC -DPIC'
3337 if test "$mr_enable_gnu_names" = yes
3338 then SHLIB_SFX='-$(VERSION).so'
3339 else SHLIB_SFX='.so.$(VERSION)'
3341 SHLINK_SFX='.so'
3342 SONAME_SFX='.so.$(MAJOR)'
3343 LINK_SHLIB='$(CC) -shared -Wl,-soname,$(SONAME)'
3344 INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3345 DEPSHLIBS='-lc'
3346 else
3347 echo "configure: warning: shared libraries not supported for $host" 1>&2
3348 mr_enable_shared=no
3350 elif ${CC} -V 2>&1 | grep 'Intel(R) C++ Compiler' >/dev/null 2>&1; then
3351 echo "configure: warning: Use --disable-shared if $CC fails to build the shared library" 1>&2
3352 PICFLAGS='-fPIC -DPIC'
3353 if test "$mr_enable_gnu_names" = yes
3354 then SHLIB_SFX='-$(VERSION).so'
3355 else SHLIB_SFX='.so.$(VERSION)'
3357 SHLINK_SFX='.so'
3358 SONAME_SFX='.so.$(MAJOR)'
3359 LINK_SHLIB='$(CC) -shared -Wl,-soname,$(SONAME)'
3360 INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3361 DEPSHLIBS='-lc'
3362 else
3363 echo "configure: warning: GNU CC required for building shared libraries" 1>&2
3364 mr_enable_shared=no
3367 i386-pc-nto-qnx*)
3370 echo $ac_n "checking for native ELF system""... $ac_c" 1>&6
3371 echo "configure:3372: checking for native ELF system" >&5
3372 if eval "test \"`echo '$''{'mr_cv_target_elf'+set}'`\" = set"; then
3373 echo $ac_n "(cached) $ac_c" 1>&6
3374 else
3375 if test "$cross_compiling" = yes; then
3376 mr_cv_target_elf=no
3377 else
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 #include <stdio.h>
3383 main(int argc, char **argv) {
3384 char buf[BUFSIZ];
3385 FILE *fp;
3386 int n;
3388 if ((fp = fopen(*argv, "r")) == NULL) {
3389 exit(1);
3391 n = fread(buf, 1, sizeof(buf), fp);
3392 if (n >= 52
3393 && buf[0] == '\177'
3394 && buf[1] == 'E'
3395 && buf[2] == 'L'
3396 && buf[3] == 'F') {
3397 exit(0);
3399 exit(1);
3402 if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3403 then
3404 mr_cv_target_elf=yes
3405 else
3406 echo "configure: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 rm -fr conftest*
3409 mr_cv_target_elf=no
3411 rm -fr conftest*
3416 echo "$ac_t""$mr_cv_target_elf" 1>&6
3417 if test "$mr_cv_target_elf" = yes; then
3418 PICFLAGS='-fPIC -DPIC'
3419 if test "$mr_enable_gnu_names" = yes
3420 then SHLIB_SFX='-$(VERSION).so'
3421 else SHLIB_SFX='.so.$(VERSION)'
3423 SHLINK_SFX='.so'
3424 SONAME_SFX='.so.$(MAJOR)'
3425 LINK_SHLIB='$(CC) -shared -Wl,-soname,$(SONAME)'
3426 INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3427 DEPSHLIBS='-lc'
3428 else
3429 echo "configure: warning: shared libraries not supported for $host" 1>&2
3430 mr_enable_shared=no
3433 sparc-sun-solaris2*)
3434 if test "$GCC" = yes; then
3435 PICFLAGS='-fPIC -DPIC'
3436 else
3437 PICFLAGS='-K PIC -DPIC'
3439 if test "$mr_enable_gnu_names" = yes
3440 then SHLIB_SFX='-$(MAJOR).so'
3441 else SHLIB_SFX='.so.$(MAJOR)'
3443 SONAME_SFX='.so.$(MAJOR)'
3444 SHLINK_SFX='.so'
3445 LINK_SHLIB='$(LD) -G -z text -h $(SONAME)'
3446 INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3449 echo "configure: warning: shared libraries not supported for $host" 1>&2
3450 mr_enable_shared=no
3452 esac
3453 else
3454 mr_enable_shared=no
3463 DO_SHLIB="$mr_enable_shared"
3467 # Check whether --enable-extended-format or --disable-extended-format was given.
3468 if test "${enable_extended_format+set}" = set; then
3469 enableval="$enable_extended_format"
3470 mr_enable_extended_format="$enableval"
3471 else
3472 mr_enable_extended_format=no
3475 if test "$mr_enable_extended_format" = yes; then
3476 cat >> confdefs.h <<\EOF
3477 #define ENABLE_EXTENDED_FORMAT 1
3482 # Check whether --enable-sanity-checks or --disable-sanity-checks was given.
3483 if test "${enable_sanity_checks+set}" = set; then
3484 enableval="$enable_sanity_checks"
3485 mr_enable_sanity_checks="$enableval"
3486 else
3487 mr_enable_sanity_checks=yes
3490 if test "$mr_enable_sanity_checks" = yes; then
3491 cat >> confdefs.h <<\EOF
3492 #define ENABLE_SANITY_CHECKS 1
3499 # Check whether --enable-debug or --disable-debug was given.
3500 if test "${enable_debug+set}" = set; then
3501 enableval="$enable_debug"
3502 mr_enable_debug="$enableval"
3503 else
3504 mr_enable_debug=no
3507 if test "$mr_enable_debug" = yes; then
3508 cat >> confdefs.h <<\EOF
3509 #define ENABLE_DEBUG 1
3515 trap '' 1 2 15
3516 cat > confcache <<\EOF
3517 # This file is a shell script that caches the results of configure
3518 # tests run on this system so they can be shared between configure
3519 # scripts and configure runs. It is not useful on other systems.
3520 # If it contains results you don't want to keep, you may remove or edit it.
3522 # By default, configure uses ./config.cache as the cache file,
3523 # creating it if it does not exist already. You can give configure
3524 # the --cache-file=FILE option to use a different cache file; that is
3525 # what configure does when it calls configure scripts in
3526 # subdirectories, so they share the cache.
3527 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3528 # config.status only pays attention to the cache file if you give it the
3529 # --recheck option to rerun configure.
3532 # The following way of writing the cache mishandles newlines in values,
3533 # but we know of no workaround that is simple, portable, and efficient.
3534 # So, don't put newlines in cache variables' values.
3535 # Ultrix sh set writes to stderr and can't be redirected directly,
3536 # and sets the high bit in the cache file unless we assign to the vars.
3537 (set) 2>&1 |
3538 case `(ac_space=' '; set | grep ac_space) 2>&1` in
3539 *ac_space=\ *)
3540 # `set' does not quote correctly, so add quotes (double-quote substitution
3541 # turns \\\\ into \\, and sed turns \\ into \).
3542 sed -n \
3543 -e "s/'/'\\\\''/g" \
3544 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3547 # `set' quotes correctly as required by POSIX, so do not add quotes.
3548 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3550 esac >> confcache
3551 if cmp -s $cache_file confcache; then
3553 else
3554 if test -w $cache_file; then
3555 echo "updating cache $cache_file"
3556 cat confcache > $cache_file
3557 else
3558 echo "not updating unwritable cache $cache_file"
3561 rm -f confcache
3563 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3565 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3566 # Let make expand exec_prefix.
3567 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3569 # Any assignment to VPATH causes Sun make to only execute
3570 # the first set of double-colon rules, so remove it if not needed.
3571 # If there is a colon in the path, we need to keep it.
3572 if test "x$srcdir" = x.; then
3573 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3576 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3578 DEFS=-DHAVE_CONFIG_H
3580 # Without the "./", some shells look in PATH for config.status.
3581 : ${CONFIG_STATUS=./config.status}
3583 echo creating $CONFIG_STATUS
3584 rm -f $CONFIG_STATUS
3585 cat > $CONFIG_STATUS <<EOF
3586 #! /bin/sh
3587 # Generated automatically by configure.
3588 # Run this file to recreate the current configuration.
3589 # This directory was configured as follows,
3590 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3592 # $0 $ac_configure_args
3594 # Compiler output produced by configure, useful for debugging
3595 # configure, is in ./config.log if it exists.
3597 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3598 for ac_option
3600 case "\$ac_option" in
3601 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3602 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3603 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3604 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3605 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3606 exit 0 ;;
3607 -help | --help | --hel | --he | --h)
3608 echo "\$ac_cs_usage"; exit 0 ;;
3609 *) echo "\$ac_cs_usage"; exit 1 ;;
3610 esac
3611 done
3613 ac_given_srcdir=$srcdir
3614 ac_given_INSTALL="$INSTALL"
3616 trap 'rm -fr `echo "Makefile lib/Makefile po/Makefile libelf.pc config.h lib/sys_elf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3618 cat >> $CONFIG_STATUS <<EOF
3620 # Protect against being on the right side of a sed subst in config.status.
3621 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3622 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3623 $ac_vpsub
3624 $extrasub
3625 s%@SHELL@%$SHELL%g
3626 s%@CFLAGS@%$CFLAGS%g
3627 s%@CPPFLAGS@%$CPPFLAGS%g
3628 s%@CXXFLAGS@%$CXXFLAGS%g
3629 s%@FFLAGS@%$FFLAGS%g
3630 s%@DEFS@%$DEFS%g
3631 s%@LDFLAGS@%$LDFLAGS%g
3632 s%@LIBS@%$LIBS%g
3633 s%@exec_prefix@%$exec_prefix%g
3634 s%@prefix@%$prefix%g
3635 s%@program_transform_name@%$program_transform_name%g
3636 s%@bindir@%$bindir%g
3637 s%@sbindir@%$sbindir%g
3638 s%@libexecdir@%$libexecdir%g
3639 s%@datadir@%$datadir%g
3640 s%@sysconfdir@%$sysconfdir%g
3641 s%@sharedstatedir@%$sharedstatedir%g
3642 s%@localstatedir@%$localstatedir%g
3643 s%@libdir@%$libdir%g
3644 s%@includedir@%$includedir%g
3645 s%@oldincludedir@%$oldincludedir%g
3646 s%@infodir@%$infodir%g
3647 s%@mandir@%$mandir%g
3648 s%@PACKAGE@%$PACKAGE%g
3649 s%@VERSION@%$VERSION%g
3650 s%@MAINT@%$MAINT%g
3651 s%@MAJOR@%$MAJOR%g
3652 s%@SET_MAKE@%$SET_MAKE%g
3653 s%@CC@%$CC%g
3654 s%@CPP@%$CPP%g
3655 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3656 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3657 s%@INSTALL_DATA@%$INSTALL_DATA%g
3658 s%@RANLIB@%$RANLIB%g
3659 s%@LN_S@%$LN_S%g
3660 s%@DO_COMPAT@%$DO_COMPAT%g
3661 s%@LIBOBJS@%$LIBOBJS%g
3662 s%@GMOFILES@%$GMOFILES%g
3663 s%@MSGFILES@%$MSGFILES%g
3664 s%@POFILES@%$POFILES%g
3665 s%@MSGFMT@%$MSGFMT%g
3666 s%@GMSGFMT@%$GMSGFMT%g
3667 s%@XGETTEXT@%$XGETTEXT%g
3668 s%@MSGMERGE@%$MSGMERGE%g
3669 s%@GENCAT@%$GENCAT%g
3670 s%@CATOBJEXT@%$CATOBJEXT%g
3671 s%@INSTOBJEXT@%$INSTOBJEXT%g
3672 s%@localedir@%$localedir%g
3673 s%@CATALOGS@%$CATALOGS%g
3674 s%@POSUB@%$POSUB%g
3675 s%@LIBINTL@%$LIBINTL%g
3676 s%@host@%$host%g
3677 s%@host_alias@%$host_alias%g
3678 s%@host_cpu@%$host_cpu%g
3679 s%@host_vendor@%$host_vendor%g
3680 s%@host_os@%$host_os%g
3681 s%@LD@%$LD%g
3682 s%@PICFLAGS@%$PICFLAGS%g
3683 s%@SHLIB_SFX@%$SHLIB_SFX%g
3684 s%@SHLINK_SFX@%$SHLINK_SFX%g
3685 s%@SONAME_SFX@%$SONAME_SFX%g
3686 s%@LINK_SHLIB@%$LINK_SHLIB%g
3687 s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
3688 s%@DEPSHLIBS@%$DEPSHLIBS%g
3689 s%@DO_SHLIB@%$DO_SHLIB%g
3691 CEOF
3694 cat >> $CONFIG_STATUS <<\EOF
3696 # Split the substitutions into bite-sized pieces for seds with
3697 # small command number limits, like on Digital OSF/1 and HP-UX.
3698 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3699 ac_file=1 # Number of current file.
3700 ac_beg=1 # First line for current file.
3701 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3702 ac_more_lines=:
3703 ac_sed_cmds=""
3704 while $ac_more_lines; do
3705 if test $ac_beg -gt 1; then
3706 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3707 else
3708 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3710 if test ! -s conftest.s$ac_file; then
3711 ac_more_lines=false
3712 rm -f conftest.s$ac_file
3713 else
3714 if test -z "$ac_sed_cmds"; then
3715 ac_sed_cmds="sed -f conftest.s$ac_file"
3716 else
3717 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3719 ac_file=`expr $ac_file + 1`
3720 ac_beg=$ac_end
3721 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3723 done
3724 if test -z "$ac_sed_cmds"; then
3725 ac_sed_cmds=cat
3729 cat >> $CONFIG_STATUS <<EOF
3731 CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile po/Makefile libelf.pc"}
3733 cat >> $CONFIG_STATUS <<\EOF
3734 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3735 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3736 case "$ac_file" in
3737 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3738 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3739 *) ac_file_in="${ac_file}.in" ;;
3740 esac
3742 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3744 # Remove last slash and all that follows it. Not all systems have dirname.
3745 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3746 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3747 # The file is in a subdirectory.
3748 test ! -d "$ac_dir" && mkdir "$ac_dir"
3749 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3750 # A "../" for each directory in $ac_dir_suffix.
3751 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3752 else
3753 ac_dir_suffix= ac_dots=
3756 case "$ac_given_srcdir" in
3757 .) srcdir=.
3758 if test -z "$ac_dots"; then top_srcdir=.
3759 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3760 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3761 *) # Relative path.
3762 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3763 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3764 esac
3766 case "$ac_given_INSTALL" in
3767 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3768 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3769 esac
3771 echo creating "$ac_file"
3772 rm -f "$ac_file"
3773 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3774 case "$ac_file" in
3775 *Makefile*) ac_comsub="1i\\
3776 # $configure_input" ;;
3777 *) ac_comsub= ;;
3778 esac
3780 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3781 sed -e "$ac_comsub
3782 s%@configure_input@%$configure_input%g
3783 s%@srcdir@%$srcdir%g
3784 s%@top_srcdir@%$top_srcdir%g
3785 s%@INSTALL@%$INSTALL%g
3786 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3787 fi; done
3788 rm -f conftest.s*
3790 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3791 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3793 # ac_d sets the value in "#define NAME VALUE" lines.
3794 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3795 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3796 ac_dC='\3'
3797 ac_dD='%g'
3798 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3799 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3800 ac_uB='\([ ]\)%\1#\2define\3'
3801 ac_uC=' '
3802 ac_uD='\4%g'
3803 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3804 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3805 ac_eB='$%\1#\2define\3'
3806 ac_eC=' '
3807 ac_eD='%g'
3809 if test "${CONFIG_HEADERS+set}" != set; then
3811 cat >> $CONFIG_STATUS <<EOF
3812 CONFIG_HEADERS="config.h lib/sys_elf.h"
3814 cat >> $CONFIG_STATUS <<\EOF
3816 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3817 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3818 case "$ac_file" in
3819 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3820 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3821 *) ac_file_in="${ac_file}.in" ;;
3822 esac
3824 echo creating $ac_file
3826 rm -f conftest.frag conftest.in conftest.out
3827 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3828 cat $ac_file_inputs > conftest.in
3832 # Transform confdefs.h into a sed script conftest.vals that substitutes
3833 # the proper values into config.h.in to produce config.h. And first:
3834 # Protect against being on the right side of a sed subst in config.status.
3835 # Protect against being in an unquoted here document in config.status.
3836 rm -f conftest.vals
3837 cat > conftest.hdr <<\EOF
3838 s/[\\&%]/\\&/g
3839 s%[\\$`]%\\&%g
3840 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3841 s%ac_d%ac_u%gp
3842 s%ac_u%ac_e%gp
3844 sed -n -f conftest.hdr confdefs.h > conftest.vals
3845 rm -f conftest.hdr
3847 # This sed command replaces #undef with comments. This is necessary, for
3848 # example, in the case of _POSIX_SOURCE, which is predefined and required
3849 # on some systems where configure will not decide to define it.
3850 cat >> conftest.vals <<\EOF
3851 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3854 # Break up conftest.vals because some shells have a limit on
3855 # the size of here documents, and old seds have small limits too.
3857 rm -f conftest.tail
3858 while :
3860 ac_lines=`grep -c . conftest.vals`
3861 # grep -c gives empty output for an empty file on some AIX systems.
3862 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3863 # Write a limited-size here document to conftest.frag.
3864 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3865 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3866 echo 'CEOF
3867 sed -f conftest.frag conftest.in > conftest.out
3868 rm -f conftest.in
3869 mv conftest.out conftest.in
3870 ' >> $CONFIG_STATUS
3871 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3872 rm -f conftest.vals
3873 mv conftest.tail conftest.vals
3874 done
3875 rm -f conftest.vals
3877 cat >> $CONFIG_STATUS <<\EOF
3878 rm -f conftest.frag conftest.h
3879 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3880 cat conftest.in >> conftest.h
3881 rm -f conftest.in
3882 if cmp -s $ac_file conftest.h 2>/dev/null; then
3883 echo "$ac_file is unchanged"
3884 rm -f conftest.h
3885 else
3886 # Remove last slash and all that follows it. Not all systems have dirname.
3887 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3888 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3889 # The file is in a subdirectory.
3890 test ! -d "$ac_dir" && mkdir "$ac_dir"
3892 rm -f $ac_file
3893 mv conftest.h $ac_file
3895 fi; done
3898 cat >> $CONFIG_STATUS <<EOF
3901 cat >> $CONFIG_STATUS <<\EOF
3902 echo timestamp > stamp-h; echo timestamp > lib/stamp-h
3903 exit 0
3905 chmod +x $CONFIG_STATUS
3906 rm -fr confdefs* $ac_clean_files
3907 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3910 # vi: set ts=8 sw=2 :