1#! /bin/sh
2
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.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-maintainer-mode
16                          enable maintainer-specific make rules (default: auto)"
17ac_help="$ac_help
18  --enable-compat         install <libelf.h>, <nlist.h> and <gelf.h> (default: auto)"
19ac_help="$ac_help
20  --enable-elf64          compile in 64-bit support (default: auto)"
21ac_help="$ac_help
22  --enable-versioning     compile in versioning support (default: auto)"
23ac_help="$ac_help
24  --enable-nls            use Native Language Support (default: yes)"
25ac_help="$ac_help
26  --enable-shared         build shared library (default: yes)"
27ac_help="$ac_help
28  --enable-gnu-names      use GNU library naming conventions (default: no)"
29ac_help="$ac_help
30  --enable-extended-format    support extended file formats (default: no)"
31ac_help="$ac_help
32  --enable-sanity-checks      enable sanity checks by default (default: yes)"
33ac_help="$ac_help
34  --enable-debug          include extra debugging code (default: no)"
35
36# Initialize some variables set by options.
37# The variables have the same names as the options, with
38# dashes changed to underlines.
39build=NONE
40cache_file=./config.cache
41exec_prefix=NONE
42host=NONE
43no_create=
44nonopt=NONE
45no_recursion=
46prefix=NONE
47program_prefix=NONE
48program_suffix=NONE
49program_transform_name=s,x,x,
50silent=
51site=
52srcdir=
53target=NONE
54verbose=
55x_includes=NONE
56x_libraries=NONE
57bindir='${exec_prefix}/bin'
58sbindir='${exec_prefix}/sbin'
59libexecdir='${exec_prefix}/libexec'
60datadir='${prefix}/share'
61sysconfdir='${prefix}/etc'
62sharedstatedir='${prefix}/com'
63localstatedir='${prefix}/var'
64libdir='${exec_prefix}/lib'
65includedir='${prefix}/include'
66oldincludedir='/usr/include'
67infodir='${prefix}/info'
68mandir='${prefix}/man'
69
70# Initialize some other variables.
71subdirs=
72MFLAGS= MAKEFLAGS=
73SHELL=${CONFIG_SHELL-/bin/sh}
74# Maximum number of lines to put in a shell here document.
75ac_max_here_lines=12
76
77ac_prev=
78for ac_option
79do
80
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
86  fi
87
88  case "$ac_option" in
89  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90  *) ac_optarg= ;;
91  esac
92
93  # Accept the important Cygnus configure options, so we can diagnose typos.
94
95  case "$ac_option" in
96
97  -bindir | --bindir | --bindi | --bind | --bin | --bi)
98    ac_prev=bindir ;;
99  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100    bindir="$ac_optarg" ;;
101
102  -build | --build | --buil | --bui | --bu)
103    ac_prev=build ;;
104  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105    build="$ac_optarg" ;;
106
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" ;;
113
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" ;;
119
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; }
125    fi
126    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127    eval "enable_${ac_feature}=no" ;;
128
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; }
134    fi
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'" ;;
141
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" ;;
150
151  -gas | --gas | --ga | --g)
152    # Obsolete; use --with-gas.
153    with_gas=yes ;;
154
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
159Usage: configure [options] [host]
160Options: [defaults in brackets after descriptions]
161Configuration:
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
167Directory 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
191EOF
192    cat << EOF
193Host 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]
197Features 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
204EOF
205    if test -n "$ac_help"; then
206      echo "--enable and --with options recognized:$ac_help"
207    fi
208    exit 0 ;;
209
210  -host | --host | --hos | --ho)
211    ac_prev=host ;;
212  -host=* | --host=* | --hos=* | --ho=*)
213    host="$ac_optarg" ;;
214
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" ;;
221
222  -infodir | --infodir | --infodi | --infod | --info | --inf)
223    ac_prev=infodir ;;
224  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225    infodir="$ac_optarg" ;;
226
227  -libdir | --libdir | --libdi | --libd)
228    ac_prev=libdir ;;
229  -libdir=* | --libdir=* | --libdi=* | --libd=*)
230    libdir="$ac_optarg" ;;
231
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" ;;
238
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" ;;
247
248  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249    ac_prev=mandir ;;
250  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251    mandir="$ac_optarg" ;;
252
253  -nfp | --nfp | --nf)
254    # Obsolete; use --without-fp.
255    with_fp=no ;;
256
257  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258  | --no-cr | --no-c)
259    no_create=yes ;;
260
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 ;;
264
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" ;;
273
274  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275    ac_prev=prefix ;;
276  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277    prefix="$ac_optarg" ;;
278
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" ;;
285
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" ;;
292
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" ;;
309
310  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311  | -silent | --silent | --silen | --sile | --sil)
312    silent=yes ;;
313
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" ;;
319
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" ;;
330
331  -site | --site | --sit)
332    ac_prev=site ;;
333  -site=* | --site=* | --sit=*)
334    site="$ac_optarg" ;;
335
336  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337    ac_prev=srcdir ;;
338  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339    srcdir="$ac_optarg" ;;
340
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" ;;
347
348  -target | --target | --targe | --targ | --tar | --ta | --t)
349    ac_prev=target ;;
350  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351    target="$ac_optarg" ;;
352
353  -v | -verbose | --verbose | --verbos | --verbo | --verb)
354    verbose=yes ;;
355
356  -version | --version | --versio | --versi | --vers)
357    echo "configure generated by autoconf version 2.13"
358    exit 0 ;;
359
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; }
365    fi
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'" ;;
372
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; }
378    fi
379    ac_package=`echo $ac_package| sed 's/-/_/g'`
380    eval "with_${ac_package}=no" ;;
381
382  --x)
383    # Obsolete; use --with-x.
384    with_x=yes ;;
385
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" ;;
392
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" ;;
399
400  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
401    ;;
402
403  *)
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
406    fi
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; }
409    fi
410    nonopt="$ac_option"
411    ;;
412
413  esac
414done
415
416if test -n "$ac_prev"; then
417  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
418fi
419
420trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
421
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
430if test "$silent" = yes; then
431  exec 6>/dev/null
432else
433  exec 6>&1
434fi
435exec 5>./config.log
436
437echo "\
438This file contains any messages produced by compilers while
439running configure, to aid debugging if configure makes a mistake.
440" 1>&5
441
442# Strip out --no-create and --no-recursion so they do not pile up.
443# Also quote any args containing shell metacharacters.
444ac_configure_args=
445for ac_arg
446do
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
456done
457
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.
463if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
464if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
467
468# confdefs.h avoids OS command line length limits that DEFS can exceed.
469rm -rf conftest* confdefs.h
470# AIX cpp loses on an empty file, so make sure it contains at least a newline.
471echo > confdefs.h
472
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.
475ac_unique_file=VERSION
476
477# Find the source files, if location was not specified.
478if 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=..
487  fi
488else
489  ac_srcdir_defaulted=no
490fi
491if 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; }
496  fi
497fi
498srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
499
500# Prefer explicitly selected file to automatically selected ones.
501if 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"
506  fi
507fi
508for 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"
512  fi
513done
514
515if test -r "$cache_file"; then
516  echo "loading cache $cache_file"
517  . $cache_file
518else
519  echo "creating cache $cache_file"
520  > $cache_file
521fi
522
523ac_ext=c
524# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525ac_cpp='$CPP $CPPFLAGS'
526ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528cross_compiling=$ac_cv_prog_cc_cross
529
530ac_exeext=
531ac_objext=o
532if (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=
539  fi
540else
541  ac_n= ac_c='\c' ac_t=
542fi
543
544
545
546
547
548
549    PACKAGE=libelf
550  VERSION=`cat $srcdir/VERSION`
551
552
553  # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
554if test "${enable_maintainer_mode+set}" = set; then
555  enableval="$enable_maintainer_mode"
556  mr_enable_maintainer_mode="$enableval"
557else
558  case :${I_AM_THE_MAINTAINER_OF}: in
559      *:libelf:*) mr_enable_maintainer_mode=yes;;
560      *) mr_enable_maintainer_mode=no;;
561    esac
562fi
563
564  if test x"$mr_enable_maintainer_mode" = x"yes"; then
565    MAINT=
566  else
567    MAINT='maintainer-only-'
568  fi
569
570
571
572ALL_LINGUAS=`cd $srcdir/po && echo *.po | sed 's/\.po//g'`
573
574set `echo $VERSION | sed 's/\./ /g'`
575MAJOR=${1-1}
576MINOR=${2-0}
577PATCH=${3-0}
578
579
580echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
581echo "configure:582: checking whether ${MAKE-make} sets \${MAKE}" >&5
582set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
583if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
584  echo $ac_n "(cached) $ac_c" 1>&6
585else
586  cat > conftestmake <<\EOF
587all:
588	@echo 'ac_maketemp="${MAKE}"'
589EOF
590# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
591eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
592if test -n "$ac_maketemp"; then
593  eval ac_cv_prog_make_${ac_make}_set=yes
594else
595  eval ac_cv_prog_make_${ac_make}_set=no
596fi
597rm -f conftestmake
598fi
599if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
600  echo "$ac_t""yes" 1>&6
601  SET_MAKE=
602else
603  echo "$ac_t""no" 1>&6
604  SET_MAKE="MAKE=${MAKE-make}"
605fi
606
607# Extract the first word of "gcc", so it can be a program name with args.
608set dummy gcc; ac_word=$2
609echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
610echo "configure:611: checking for $ac_word" >&5
611if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
612  echo $ac_n "(cached) $ac_c" 1>&6
613else
614  if test -n "$CC"; then
615  ac_cv_prog_CC="$CC" # Let the user override the test.
616else
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
624    fi
625  done
626  IFS="$ac_save_ifs"
627fi
628fi
629CC="$ac_cv_prog_CC"
630if test -n "$CC"; then
631  echo "$ac_t""$CC" 1>&6
632else
633  echo "$ac_t""no" 1>&6
634fi
635
636if test -z "$CC"; then
637  # Extract the first word of "cc", so it can be a program name with args.
638set dummy cc; ac_word=$2
639echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
640echo "configure:641: checking for $ac_word" >&5
641if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
642  echo $ac_n "(cached) $ac_c" 1>&6
643else
644  if test -n "$CC"; then
645  ac_cv_prog_CC="$CC" # Let the user override the test.
646else
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
656      fi
657      ac_cv_prog_CC="cc"
658      break
659    fi
660  done
661  IFS="$ac_save_ifs"
662if 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="$@"
674  fi
675fi
676fi
677fi
678CC="$ac_cv_prog_CC"
679if test -n "$CC"; then
680  echo "$ac_t""$CC" 1>&6
681else
682  echo "$ac_t""no" 1>&6
683fi
684
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.
689set dummy cl; ac_word=$2
690echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
691echo "configure:692: checking for $ac_word" >&5
692if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693  echo $ac_n "(cached) $ac_c" 1>&6
694else
695  if test -n "$CC"; then
696  ac_cv_prog_CC="$CC" # Let the user override the test.
697else
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
705    fi
706  done
707  IFS="$ac_save_ifs"
708fi
709fi
710CC="$ac_cv_prog_CC"
711if test -n "$CC"; then
712  echo "$ac_t""$CC" 1>&6
713else
714  echo "$ac_t""no" 1>&6
715fi
716 ;;
717    esac
718  fi
719  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
720fi
721
722echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
723echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
724
725ac_ext=c
726# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
727ac_cpp='$CPP $CPPFLAGS'
728ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
729ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
730cross_compiling=$ac_cv_prog_cc_cross
731
732cat > conftest.$ac_ext << EOF
733
734#line 735 "configure"
735#include "confdefs.h"
736
737main(){return(0);}
738EOF
739if { (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
746  fi
747else
748  echo "configure: failed program was:" >&5
749  cat conftest.$ac_ext >&5
750  ac_cv_prog_cc_works=no
751fi
752rm -fr conftest*
753ac_ext=c
754# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
755ac_cpp='$CPP $CPPFLAGS'
756ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
757ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
758cross_compiling=$ac_cv_prog_cc_cross
759
760echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
761if 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; }
763fi
764echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
765echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
766echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
767cross_compiling=$ac_cv_prog_cc_cross
768
769echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
770echo "configure:771: checking whether we are using GNU C" >&5
771if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
772  echo $ac_n "(cached) $ac_c" 1>&6
773else
774  cat > conftest.c <<EOF
775#ifdef __GNUC__
776  yes;
777#endif
778EOF
779if { 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
781else
782  ac_cv_prog_gcc=no
783fi
784fi
785
786echo "$ac_t""$ac_cv_prog_gcc" 1>&6
787
788if test $ac_cv_prog_gcc = yes; then
789  GCC=yes
790else
791  GCC=
792fi
793
794ac_test_CFLAGS="${CFLAGS+set}"
795ac_save_CFLAGS="$CFLAGS"
796CFLAGS=
797echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
798echo "configure:799: checking whether ${CC-cc} accepts -g" >&5
799if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
800  echo $ac_n "(cached) $ac_c" 1>&6
801else
802  echo 'void f(){}' > conftest.c
803if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
804  ac_cv_prog_cc_g=yes
805else
806  ac_cv_prog_cc_g=no
807fi
808rm -f conftest*
809
810fi
811
812echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
813if test "$ac_test_CFLAGS" = set; then
814  CFLAGS="$ac_save_CFLAGS"
815elif test $ac_cv_prog_cc_g = yes; then
816  if test "$GCC" = yes; then
817    CFLAGS="-g -O2"
818  else
819    CFLAGS="-g"
820  fi
821else
822  if test "$GCC" = yes; then
823    CFLAGS="-O2"
824  else
825    CFLAGS=
826  fi
827fi
828
829echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
830echo "configure:831: checking how to run the C preprocessor" >&5
831# On Suns, sometimes $CPP names a directory.
832if test -n "$CPP" && test -d "$CPP"; then
833  CPP=
834fi
835if test -z "$CPP"; then
836if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
837  echo $ac_n "(cached) $ac_c" 1>&6
838else
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>
848Syntax Error
849EOF
850ac_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; }
852ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
853if test -z "$ac_err"; then
854  :
855else
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>
865Syntax Error
866EOF
867ac_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; }
869ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
870if test -z "$ac_err"; then
871  :
872else
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>
882Syntax Error
883EOF
884ac_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; }
886ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
887if test -z "$ac_err"; then
888  :
889else
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
895fi
896rm -f conftest*
897fi
898rm -f conftest*
899fi
900rm -f conftest*
901  ac_cv_prog_CPP="$CPP"
902fi
903  CPP="$ac_cv_prog_CPP"
904else
905  ac_cv_prog_CPP="$CPP"
906fi
907echo "$ac_t""$CPP" 1>&6
908
909ac_aux_dir=
910for 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
919  fi
920done
921if 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; }
923fi
924ac_config_guess=$ac_aux_dir/config.guess
925ac_config_sub=$ac_aux_dir/config.sub
926ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
927
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.
939echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
940echo "configure:941: checking for a BSD compatible install" >&5
941if test -z "$INSTALL"; then
942if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
943  echo $ac_n "(cached) $ac_c" 1>&6
944else
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/*) ;;
950    *)
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.
959	    :
960	  else
961	    ac_cv_path_install="$ac_dir/$ac_prog -c"
962	    break 2
963	  fi
964	fi
965      done
966      ;;
967    esac
968  done
969  IFS="$ac_save_IFS"
970
971fi
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"
980  fi
981fi
982echo "$ac_t""$INSTALL" 1>&6
983
984# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
985# It thinks the first close brace ends the variable substitution.
986test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
987
988test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
989
990test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
991
992# Extract the first word of "ranlib", so it can be a program name with args.
993set dummy ranlib; ac_word=$2
994echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
995echo "configure:996: checking for $ac_word" >&5
996if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
997  echo $ac_n "(cached) $ac_c" 1>&6
998else
999  if test -n "$RANLIB"; then
1000  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1001else
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
1009    fi
1010  done
1011  IFS="$ac_save_ifs"
1012  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1013fi
1014fi
1015RANLIB="$ac_cv_prog_RANLIB"
1016if test -n "$RANLIB"; then
1017  echo "$ac_t""$RANLIB" 1>&6
1018else
1019  echo "$ac_t""no" 1>&6
1020fi
1021
1022echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1023echo "configure:1024: checking whether ln -s works" >&5
1024if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1025  echo $ac_n "(cached) $ac_c" 1>&6
1026else
1027  rm -f conftestdata
1028if ln -s X conftestdata 2>/dev/null
1029then
1030  rm -f conftestdata
1031  ac_cv_prog_LN_S="ln -s"
1032else
1033  ac_cv_prog_LN_S=ln
1034fi
1035fi
1036LN_S="$ac_cv_prog_LN_S"
1037if test "$ac_cv_prog_LN_S" = "ln -s"; then
1038  echo "$ac_t""yes" 1>&6
1039else
1040  echo "$ac_t""no" 1>&6
1041fi
1042
1043
1044
1045echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1046echo "configure:1047: checking for ANSI C header files" >&5
1047if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1048  echo $ac_n "(cached) $ac_c" 1>&6
1049else
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>
1057EOF
1058ac_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; }
1060ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1061if test -z "$ac_err"; then
1062  rm -rf conftest*
1063  ac_cv_header_stdc=yes
1064else
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
1070fi
1071rm -f conftest*
1072
1073if test $ac_cv_header_stdc = yes; then
1074  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1075cat > conftest.$ac_ext <<EOF
1076#line 1077 "configure"
1077#include "confdefs.h"
1078#include <string.h>
1079EOF
1080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1081  egrep "memchr" >/dev/null 2>&1; then
1082  :
1083else
1084  rm -rf conftest*
1085  ac_cv_header_stdc=no
1086fi
1087rm -f conftest*
1088
1089fi
1090
1091if test $ac_cv_header_stdc = yes; then
1092  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1093cat > conftest.$ac_ext <<EOF
1094#line 1095 "configure"
1095#include "confdefs.h"
1096#include <stdlib.h>
1097EOF
1098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1099  egrep "free" >/dev/null 2>&1; then
1100  :
1101else
1102  rm -rf conftest*
1103  ac_cv_header_stdc=no
1104fi
1105rm -f conftest*
1106
1107fi
1108
1109if test $ac_cv_header_stdc = yes; then
1110  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1111if test "$cross_compiling" = yes; then
1112  :
1113else
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)))
1121int main () { int i; for (i = 0; i < 256; i++)
1122if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1123exit (0); }
1124
1125EOF
1126if { (eval echo configure:1127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1127then
1128  :
1129else
1130  echo "configure: failed program was:" >&5
1131  cat conftest.$ac_ext >&5
1132  rm -fr conftest*
1133  ac_cv_header_stdc=no
1134fi
1135rm -fr conftest*
1136fi
1137
1138fi
1139fi
1140
1141echo "$ac_t""$ac_cv_header_stdc" 1>&6
1142if test $ac_cv_header_stdc = yes; then
1143  cat >> confdefs.h <<\EOF
1144#define STDC_HEADERS 1
1145EOF
1146
1147fi
1148
1149for ac_hdr in unistd.h stdint.h fcntl.h elf.h
1150do
1151ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1152echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1153echo "configure:1154: checking for $ac_hdr" >&5
1154if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1155  echo $ac_n "(cached) $ac_c" 1>&6
1156else
1157  cat > conftest.$ac_ext <<EOF
1158#line 1159 "configure"
1159#include "confdefs.h"
1160#include <$ac_hdr>
1161EOF
1162ac_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; }
1164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1165if test -z "$ac_err"; then
1166  rm -rf conftest*
1167  eval "ac_cv_header_$ac_safe=yes"
1168else
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"
1174fi
1175rm -f conftest*
1176fi
1177if 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
1182EOF
1183
1184else
1185  echo "$ac_t""no" 1>&6
1186fi
1187done
1188
1189for ac_hdr in elf.h sys/elf.h link.h sys/link.h
1190do
1191ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1192echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1193echo "configure:1194: checking for $ac_hdr" >&5
1194if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1195  echo $ac_n "(cached) $ac_c" 1>&6
1196else
1197  cat > conftest.$ac_ext <<EOF
1198#line 1199 "configure"
1199#include "confdefs.h"
1200#include <$ac_hdr>
1201EOF
1202ac_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; }
1204ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1205if test -z "$ac_err"; then
1206  rm -rf conftest*
1207  eval "ac_cv_header_$ac_safe=yes"
1208else
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"
1214fi
1215rm -f conftest*
1216fi
1217if 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
1222EOF
1223
1224else
1225  echo "$ac_t""no" 1>&6
1226fi
1227done
1228
1229echo $ac_n "checking if ${CC} can compile elf.h""... $ac_c" 1>&6
1230echo "configure:1231: checking if ${CC} can compile elf.h" >&5
1231if eval "test \"`echo '$''{'libelf_cv_elf_h_works'+set}'`\" = set"; then
1232  echo $ac_n "(cached) $ac_c" 1>&6
1233else
1234
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
1243int main() {
1244Elf32_Ehdr dummy
1245; return 0; }
1246EOF
1247if { (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
1250else
1251  echo "configure: failed program was:" >&5
1252  cat conftest.$ac_ext >&5
1253  rm -rf conftest*
1254  libelf_cv_elf_h_works=no
1255fi
1256rm -f conftest*
1257
1258fi
1259
1260echo "$ac_t""$libelf_cv_elf_h_works" 1>&6
1261if test "$libelf_cv_elf_h_works" = no; then
1262  ac_cv_header_elf_h=no
1263  ac_cv_header_sys_elf_h=no
1264fi
1265if test "$ac_cv_header_elf_h" = yes; then
1266  cat >> confdefs.h <<\EOF
1267#define __LIBELF_HEADER_ELF_H <elf.h>
1268EOF
1269
1270elif test "$ac_cv_header_sys_elf_h" = yes; then
1271  cat >> confdefs.h <<\EOF
1272#define __LIBELF_HEADER_ELF_H <sys/elf.h>
1273EOF
1274
1275fi
1276
1277for ac_hdr in ar.h libelf.h nlist.h gelf.h
1278do
1279ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1280echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1281echo "configure:1282: checking for $ac_hdr" >&5
1282if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1283  echo $ac_n "(cached) $ac_c" 1>&6
1284else
1285  cat > conftest.$ac_ext <<EOF
1286#line 1287 "configure"
1287#include "confdefs.h"
1288#include <$ac_hdr>
1289EOF
1290ac_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; }
1292ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1293if test -z "$ac_err"; then
1294  rm -rf conftest*
1295  eval "ac_cv_header_$ac_safe=yes"
1296else
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"
1302fi
1303rm -f conftest*
1304fi
1305if 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
1310EOF
1311
1312else
1313  echo "$ac_t""no" 1>&6
1314fi
1315done
1316
1317echo $ac_n "checking whether to install <libelf.h>, <nlist.h> and <gelf.h>""... $ac_c" 1>&6
1318echo "configure:1319: checking whether to install <libelf.h>, <nlist.h> and <gelf.h>" >&5
1319# Check whether --enable-compat or --disable-compat was given.
1320if test "${enable_compat+set}" = set; then
1321  enableval="$enable_compat"
1322  DO_COMPAT="$enableval"
1323else
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
1327  fi
1328fi
1329
1330echo "$ac_t""$DO_COMPAT" 1>&6
1331
1332
1333echo $ac_n "checking for working const""... $ac_c" 1>&6
1334echo "configure:1335: checking for working const" >&5
1335if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1336  echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338  cat > conftest.$ac_ext <<EOF
1339#line 1340 "configure"
1340#include "confdefs.h"
1341
1342int main() {
1343
1344/* Ultrix mips cc rejects this.  */
1345typedef int charset[2]; const charset x;
1346/* SunOS 4.1.1 cc rejects this.  */
1347char const *const *ccp;
1348char **p;
1349/* NEC SVR4.0.2 mips cc rejects this.  */
1350struct point {int x, y;};
1351static 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 */
1355const char *g = "string";
1356ccp = &g + (g ? g-g : 0);
1357/* HPUX 7.0 cc rejects these. */
1358++ccp;
1359p = (char**) ccp;
1360ccp = (char const *const *) p;
1361{ /* SCO 3.2v4 cc rejects this.  */
1362  char *t;
1363  char const *s = 0 ? (char *) 0 : (char const *) 0;
1364
1365  *t++ = 0;
1366}
1367{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1368  int x[] = {25, 17};
1369  const int *foo = &x[0];
1370  ++foo;
1371}
1372{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1373  typedef const int *iptr;
1374  iptr p = 0;
1375  ++p;
1376}
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;
1381}
1382{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1383  const int foo = 10;
1384}
1385
1386; return 0; }
1387EOF
1388if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1389  rm -rf conftest*
1390  ac_cv_c_const=yes
1391else
1392  echo "configure: failed program was:" >&5
1393  cat conftest.$ac_ext >&5
1394  rm -rf conftest*
1395  ac_cv_c_const=no
1396fi
1397rm -f conftest*
1398fi
1399
1400echo "$ac_t""$ac_cv_c_const" 1>&6
1401if test $ac_cv_c_const = no; then
1402  cat >> confdefs.h <<\EOF
1403#define const
1404EOF
1405
1406fi
1407
1408echo $ac_n "checking for off_t""... $ac_c" 1>&6
1409echo "configure:1410: checking for off_t" >&5
1410if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1411  echo $ac_n "(cached) $ac_c" 1>&6
1412else
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
1421EOF
1422if (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
1426else
1427  rm -rf conftest*
1428  ac_cv_type_off_t=no
1429fi
1430rm -f conftest*
1431
1432fi
1433echo "$ac_t""$ac_cv_type_off_t" 1>&6
1434if test $ac_cv_type_off_t = no; then
1435  cat >> confdefs.h <<\EOF
1436#define off_t long
1437EOF
1438
1439fi
1440
1441echo $ac_n "checking for size_t""... $ac_c" 1>&6
1442echo "configure:1443: checking for size_t" >&5
1443if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1444  echo $ac_n "(cached) $ac_c" 1>&6
1445else
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
1454EOF
1455if (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
1459else
1460  rm -rf conftest*
1461  ac_cv_type_size_t=no
1462fi
1463rm -f conftest*
1464
1465fi
1466echo "$ac_t""$ac_cv_type_size_t" 1>&6
1467if test $ac_cv_type_size_t = no; then
1468  cat >> confdefs.h <<\EOF
1469#define size_t unsigned
1470EOF
1471
1472fi
1473
1474
1475echo $ac_n "checking size of short""... $ac_c" 1>&6
1476echo "configure:1477: checking size of short" >&5
1477if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
1478  echo $ac_n "(cached) $ac_c" 1>&6
1479else
1480  if test "$cross_compiling" = yes; then
1481  ac_cv_sizeof_short=2
1482else
1483  cat > conftest.$ac_ext <<EOF
1484#line 1485 "configure"
1485#include "confdefs.h"
1486#include <stdio.h>
1487main()
1488{
1489  FILE *f=fopen("conftestval", "w");
1490  if (!f) exit(1);
1491  fprintf(f, "%d\n", sizeof(short));
1492  exit(0);
1493}
1494EOF
1495if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1496then
1497  ac_cv_sizeof_short=`cat conftestval`
1498else
1499  echo "configure: failed program was:" >&5
1500  cat conftest.$ac_ext >&5
1501  rm -fr conftest*
1502  ac_cv_sizeof_short=0
1503fi
1504rm -fr conftest*
1505fi
1506
1507fi
1508echo "$ac_t""$ac_cv_sizeof_short" 1>&6
1509cat >> confdefs.h <<EOF
1510#define SIZEOF_SHORT $ac_cv_sizeof_short
1511EOF
1512
1513
1514echo $ac_n "checking size of int""... $ac_c" 1>&6
1515echo "configure:1516: checking size of int" >&5
1516if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1517  echo $ac_n "(cached) $ac_c" 1>&6
1518else
1519  if test "$cross_compiling" = yes; then
1520  ac_cv_sizeof_int=4
1521else
1522  cat > conftest.$ac_ext <<EOF
1523#line 1524 "configure"
1524#include "confdefs.h"
1525#include <stdio.h>
1526main()
1527{
1528  FILE *f=fopen("conftestval", "w");
1529  if (!f) exit(1);
1530  fprintf(f, "%d\n", sizeof(int));
1531  exit(0);
1532}
1533EOF
1534if { (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1535then
1536  ac_cv_sizeof_int=`cat conftestval`
1537else
1538  echo "configure: failed program was:" >&5
1539  cat conftest.$ac_ext >&5
1540  rm -fr conftest*
1541  ac_cv_sizeof_int=0
1542fi
1543rm -fr conftest*
1544fi
1545
1546fi
1547echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1548cat >> confdefs.h <<EOF
1549#define SIZEOF_INT $ac_cv_sizeof_int
1550EOF
1551
1552
1553echo $ac_n "checking size of long""... $ac_c" 1>&6
1554echo "configure:1555: checking size of long" >&5
1555if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1556  echo $ac_n "(cached) $ac_c" 1>&6
1557else
1558  if test "$cross_compiling" = yes; then
1559  ac_cv_sizeof_long=4
1560else
1561  cat > conftest.$ac_ext <<EOF
1562#line 1563 "configure"
1563#include "confdefs.h"
1564#include <stdio.h>
1565main()
1566{
1567  FILE *f=fopen("conftestval", "w");
1568  if (!f) exit(1);
1569  fprintf(f, "%d\n", sizeof(long));
1570  exit(0);
1571}
1572EOF
1573if { (eval echo configure:1574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1574then
1575  ac_cv_sizeof_long=`cat conftestval`
1576else
1577  echo "configure: failed program was:" >&5
1578  cat conftest.$ac_ext >&5
1579  rm -fr conftest*
1580  ac_cv_sizeof_long=0
1581fi
1582rm -fr conftest*
1583fi
1584
1585fi
1586echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1587cat >> confdefs.h <<EOF
1588#define SIZEOF_LONG $ac_cv_sizeof_long
1589EOF
1590
1591
1592echo $ac_n "checking size of long long""... $ac_c" 1>&6
1593echo "configure:1594: checking size of long long" >&5
1594if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
1595  echo $ac_n "(cached) $ac_c" 1>&6
1596else
1597  if test "$cross_compiling" = yes; then
1598  ac_cv_sizeof_long_long=0
1599else
1600  cat > conftest.$ac_ext <<EOF
1601#line 1602 "configure"
1602#include "confdefs.h"
1603#include <stdio.h>
1604main()
1605{
1606  FILE *f=fopen("conftestval", "w");
1607  if (!f) exit(1);
1608  fprintf(f, "%d\n", sizeof(long long));
1609  exit(0);
1610}
1611EOF
1612if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1613then
1614  ac_cv_sizeof_long_long=`cat conftestval`
1615else
1616  echo "configure: failed program was:" >&5
1617  cat conftest.$ac_ext >&5
1618  rm -fr conftest*
1619  ac_cv_sizeof_long_long=0
1620fi
1621rm -fr conftest*
1622fi
1623
1624fi
1625echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
1626cat >> confdefs.h <<EOF
1627#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
1628EOF
1629
1630
1631# Windows port
1632echo $ac_n "checking size of __int64""... $ac_c" 1>&6
1633echo "configure:1634: checking size of __int64" >&5
1634if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
1635  echo $ac_n "(cached) $ac_c" 1>&6
1636else
1637  if test "$cross_compiling" = yes; then
1638  ac_cv_sizeof___int64=0
1639else
1640  cat > conftest.$ac_ext <<EOF
1641#line 1642 "configure"
1642#include "confdefs.h"
1643#include <stdio.h>
1644main()
1645{
1646  FILE *f=fopen("conftestval", "w");
1647  if (!f) exit(1);
1648  fprintf(f, "%d\n", sizeof(__int64));
1649  exit(0);
1650}
1651EOF
1652if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1653then
1654  ac_cv_sizeof___int64=`cat conftestval`
1655else
1656  echo "configure: failed program was:" >&5
1657  cat conftest.$ac_ext >&5
1658  rm -fr conftest*
1659  ac_cv_sizeof___int64=0
1660fi
1661rm -fr conftest*
1662fi
1663
1664fi
1665echo "$ac_t""$ac_cv_sizeof___int64" 1>&6
1666cat >> confdefs.h <<EOF
1667#define SIZEOF___INT64 $ac_cv_sizeof___int64
1668EOF
1669
1670
1671
1672if test "$ac_cv_header_elf_h" = yes \
1673|| test "$ac_cv_header_sys_elf_h" = yes; then
1674
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
1678echo "configure:1679: checking for struct Elf32_Dyn" >&5
1679if eval "test \"`echo '$''{'libelf_cv_struct_elf32_dyn'+set}'`\" = set"; then
1680  echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682
1683    cat > conftest.$ac_ext <<EOF
1684#line 1685 "configure"
1685#include "confdefs.h"
1686#include __LIBELF_HEADER_ELF_H
1687int main() {
1688Elf32_Dyn x
1689; return 0; }
1690EOF
1691if { (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
1694else
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>
1702int main() {
1703Elf32_Dyn x
1704; return 0; }
1705EOF
1706if { (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
1709else
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>
1717int main() {
1718Elf32_Dyn x
1719; return 0; }
1720EOF
1721if { (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
1724else
1725  echo "configure: failed program was:" >&5
1726  cat conftest.$ac_ext >&5
1727  rm -rf conftest*
1728  libelf_cv_struct_elf32_dyn=no
1729fi
1730rm -f conftest*
1731fi
1732rm -f conftest*
1733fi
1734rm -f conftest*
1735fi
1736
1737echo "$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
1741EOF
1742
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
1746EOF
1747
1748  elif test "$libelf_cv_struct_elf32_dyn" = no; then
1749    { echo "configure: error: no declaration for Elf32_Dyn" 1>&2; exit 1; }
1750  fi
1751
1752  # Linux declares struct nlist in <elf.h>.
1753  echo $ac_n "checking for struct nlist in elf.h""... $ac_c" 1>&6
1754echo "configure:1755: checking for struct nlist in elf.h" >&5
1755if eval "test \"`echo '$''{'libelf_cv_struct_nlist'+set}'`\" = set"; then
1756  echo $ac_n "(cached) $ac_c" 1>&6
1757else
1758
1759    cat > conftest.$ac_ext <<EOF
1760#line 1761 "configure"
1761#include "confdefs.h"
1762#include __LIBELF_HEADER_ELF_H
1763int main() {
1764struct nlist nl
1765; return 0; }
1766EOF
1767if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768  rm -rf conftest*
1769  libelf_cv_struct_nlist=yes
1770else
1771  echo "configure: failed program was:" >&5
1772  cat conftest.$ac_ext >&5
1773  rm -rf conftest*
1774  libelf_cv_struct_nlist=no
1775fi
1776rm -f conftest*
1777fi
1778
1779echo "$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
1783EOF
1784
1785  fi
1786
1787  # Check for 64-bit data types.
1788  echo $ac_n "checking for struct Elf64_Ehdr""... $ac_c" 1>&6
1789echo "configure:1790: checking for struct Elf64_Ehdr" >&5
1790if eval "test \"`echo '$''{'libelf_cv_struct_elf64_ehdr'+set}'`\" = set"; then
1791  echo $ac_n "(cached) $ac_c" 1>&6
1792else
1793  cat > conftest.$ac_ext <<EOF
1794#line 1795 "configure"
1795#include "confdefs.h"
1796#include __LIBELF_HEADER_ELF_H
1797int main() {
1798Elf64_Ehdr x
1799; return 0; }
1800EOF
1801if { (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
1804else
1805  echo "configure: failed program was:" >&5
1806  cat conftest.$ac_ext >&5
1807  rm -rf conftest*
1808  libelf_cv_struct_elf64_ehdr=no
1809fi
1810rm -f conftest*
1811fi
1812
1813echo "$ac_t""$libelf_cv_struct_elf64_ehdr" 1>&6
1814
1815  # Linux lacks typedefs for scalar ELF64_* types.
1816  echo $ac_n "checking for Elf64_Addr""... $ac_c" 1>&6
1817echo "configure:1818: checking for Elf64_Addr" >&5
1818if eval "test \"`echo '$''{'libelf_cv_type_elf64_addr'+set}'`\" = set"; then
1819  echo $ac_n "(cached) $ac_c" 1>&6
1820else
1821  cat > conftest.$ac_ext <<EOF
1822#line 1823 "configure"
1823#include "confdefs.h"
1824#include __LIBELF_HEADER_ELF_H
1825int main() {
1826Elf64_Addr x
1827; return 0; }
1828EOF
1829if { (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
1832else
1833  echo "configure: failed program was:" >&5
1834  cat conftest.$ac_ext >&5
1835  rm -rf conftest*
1836  libelf_cv_type_elf64_addr=no
1837fi
1838rm -f conftest*
1839fi
1840
1841echo "$ac_t""$libelf_cv_type_elf64_addr" 1>&6
1842
1843  # IRIX' struct Elf64_Rel is slightly different. Ugh.
1844  echo $ac_n "checking for struct Elf64_Rel""... $ac_c" 1>&6
1845echo "configure:1846: checking for struct Elf64_Rel" >&5
1846if eval "test \"`echo '$''{'libelf_cv_struct_elf64_rel'+set}'`\" = set"; then
1847  echo $ac_n "(cached) $ac_c" 1>&6
1848else
1849  cat > conftest.$ac_ext <<EOF
1850#line 1851 "configure"
1851#include "confdefs.h"
1852#include __LIBELF_HEADER_ELF_H
1853int main() {
1854Elf64_Rel x; x.r_info = 1
1855; return 0; }
1856EOF
1857if { (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
1860else
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
1868int main() {
1869Elf64_Rel x; x.r_sym = 1
1870; return 0; }
1871EOF
1872if { (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
1875else
1876  echo "configure: failed program was:" >&5
1877  cat conftest.$ac_ext >&5
1878  rm -rf conftest*
1879  libelf_cv_struct_elf64_rel=no
1880fi
1881rm -f conftest*
1882fi
1883rm -f conftest*
1884fi
1885
1886echo "$ac_t""$libelf_cv_struct_elf64_rel" 1>&6
1887
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
1896EOF
1897
1898      libelf_64bit=yes;;
1899    yes:no:yes)
1900      cat >> confdefs.h <<\EOF
1901#define __LIBELF64_LINUX 1
1902EOF
1903
1904      libelf_64bit=yes;;
1905    *)
1906      libelf_64bit=no;;
1907  esac
1908
1909  # Check for symbol versioning definitions
1910  echo $ac_n "checking for Elf32_Verdef""... $ac_c" 1>&6
1911echo "configure:1912: checking for Elf32_Verdef" >&5
1912if eval "test \"`echo '$''{'libelf_cv_verdef32'+set}'`\" = set"; then
1913  echo $ac_n "(cached) $ac_c" 1>&6
1914else
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
1922int main() {
1923struct {
1924	Elf32_Verdef vd;
1925	Elf32_Verdaux vda;
1926	Elf32_Verneed vn;
1927	Elf32_Vernaux vna;
1928      } x
1929; return 0; }
1930EOF
1931if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1932  rm -rf conftest*
1933  libelf_cv_verdef32=yes
1934else
1935  echo "configure: failed program was:" >&5
1936  cat conftest.$ac_ext >&5
1937  rm -rf conftest*
1938  libelf_cv_verdef32=no
1939fi
1940rm -f conftest*
1941fi
1942
1943echo "$ac_t""$libelf_cv_verdef32" 1>&6
1944
1945  echo $ac_n "checking for Elf64_Verdef""... $ac_c" 1>&6
1946echo "configure:1947: checking for Elf64_Verdef" >&5
1947if eval "test \"`echo '$''{'libelf_cv_verdef64'+set}'`\" = set"; then
1948  echo $ac_n "(cached) $ac_c" 1>&6
1949else
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
1957int main() {
1958struct {
1959	Elf64_Verdef vd;
1960	Elf64_Verdaux vda;
1961	Elf64_Verneed vn;
1962	Elf64_Vernaux vna;
1963      } x
1964; return 0; }
1965EOF
1966if { (eval echo configure:1967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1967  rm -rf conftest*
1968  libelf_cv_verdef64=yes
1969else
1970  echo "configure: failed program was:" >&5
1971  cat conftest.$ac_ext >&5
1972  rm -rf conftest*
1973  libelf_cv_verdef64=no
1974fi
1975rm -f conftest*
1976fi
1977
1978echo "$ac_t""$libelf_cv_verdef64" 1>&6
1979
1980  echo $ac_n "checking for SHT_SUNW_verdef""... $ac_c" 1>&6
1981echo "configure:1982: checking for SHT_SUNW_verdef" >&5
1982if eval "test \"`echo '$''{'libelf_cv_sun_verdef'+set}'`\" = set"; then
1983  echo $ac_n "(cached) $ac_c" 1>&6
1984else
1985  cat > conftest.$ac_ext <<EOF
1986#line 1987 "configure"
1987#include "confdefs.h"
1988#include __LIBELF_HEADER_ELF_H
1989int main() {
1990Elf32_Word x = SHT_SUNW_verdef + SHT_SUNW_verneed + SHT_SUNW_versym
1991; return 0; }
1992EOF
1993if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1994  rm -rf conftest*
1995  libelf_cv_sun_verdef=yes
1996else
1997  echo "configure: failed program was:" >&5
1998  cat conftest.$ac_ext >&5
1999  rm -rf conftest*
2000  libelf_cv_sun_verdef=no
2001fi
2002rm -f conftest*
2003fi
2004
2005echo "$ac_t""$libelf_cv_sun_verdef" 1>&6
2006
2007  echo $ac_n "checking for SHT_GNU_verdef""... $ac_c" 1>&6
2008echo "configure:2009: checking for SHT_GNU_verdef" >&5
2009if eval "test \"`echo '$''{'libelf_cv_gnu_verdef'+set}'`\" = set"; then
2010  echo $ac_n "(cached) $ac_c" 1>&6
2011else
2012  cat > conftest.$ac_ext <<EOF
2013#line 2014 "configure"
2014#include "confdefs.h"
2015#include __LIBELF_HEADER_ELF_H
2016int main() {
2017Elf32_Word x = SHT_GNU_verdef + SHT_GNU_verneed + SHT_GNU_versym
2018; return 0; }
2019EOF
2020if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2021  rm -rf conftest*
2022  libelf_cv_gnu_verdef=yes
2023else
2024  echo "configure: failed program was:" >&5
2025  cat conftest.$ac_ext >&5
2026  rm -rf conftest*
2027  libelf_cv_gnu_verdef=no
2028fi
2029rm -f conftest*
2030fi
2031
2032echo "$ac_t""$libelf_cv_gnu_verdef" 1>&6
2033else
2034  # lib/elf_repl.h supports 64-bit
2035  libelf_64bit=yes
2036
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
2042fi
2043
2044echo $ac_n "checking for 64-bit integer""... $ac_c" 1>&6
2045echo "configure:2046: checking for 64-bit integer" >&5
2046if eval "test \"`echo '$''{'libelf_cv_int64'+set}'`\" = set"; then
2047  echo $ac_n "(cached) $ac_c" 1>&6
2048else
2049
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
2058  fi
2059fi
2060
2061echo "$ac_t""$libelf_cv_int64" 1>&6
2062if test "$libelf_cv_int64" = no; then
2063  libelf_64bit=no
2064else
2065  cat >> confdefs.h <<EOF
2066#define __libelf_i64_t $libelf_cv_int64
2067EOF
2068
2069  cat >> confdefs.h <<EOF
2070#define __libelf_u64_t unsigned $libelf_cv_int64
2071EOF
2072
2073fi
2074
2075echo $ac_n "checking for 32-bit integer""... $ac_c" 1>&6
2076echo "configure:2077: checking for 32-bit integer" >&5
2077if eval "test \"`echo '$''{'libelf_cv_int32'+set}'`\" = set"; then
2078  echo $ac_n "(cached) $ac_c" 1>&6
2079else
2080
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
2087  fi
2088fi
2089
2090echo "$ac_t""$libelf_cv_int32" 1>&6
2091if test "$libelf_cv_int32" = no; then
2092  { echo "configure: error: neither int nor long is 32-bit" 1>&2; exit 1; }
2093else
2094  cat >> confdefs.h <<EOF
2095#define __libelf_i32_t $libelf_cv_int32
2096EOF
2097
2098  cat >> confdefs.h <<EOF
2099#define __libelf_u32_t unsigned $libelf_cv_int32
2100EOF
2101
2102fi
2103
2104echo $ac_n "checking for 16-bit integer""... $ac_c" 1>&6
2105echo "configure:2106: checking for 16-bit integer" >&5
2106if eval "test \"`echo '$''{'libelf_cv_int16'+set}'`\" = set"; then
2107  echo $ac_n "(cached) $ac_c" 1>&6
2108else
2109
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
2116  fi
2117fi
2118
2119echo "$ac_t""$libelf_cv_int16" 1>&6
2120if test "$libelf_cv_int16" = no; then
2121  { echo "configure: error: neither short nor int is 16-bit" 1>&2; exit 1; }
2122else
2123  cat >> confdefs.h <<EOF
2124#define __libelf_i16_t $libelf_cv_int16
2125EOF
2126
2127  cat >> confdefs.h <<EOF
2128#define __libelf_u16_t unsigned $libelf_cv_int16
2129EOF
2130
2131fi
2132
2133for ac_hdr in unistd.h
2134do
2135ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2136echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2137echo "configure:2138: checking for $ac_hdr" >&5
2138if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2139  echo $ac_n "(cached) $ac_c" 1>&6
2140else
2141  cat > conftest.$ac_ext <<EOF
2142#line 2143 "configure"
2143#include "confdefs.h"
2144#include <$ac_hdr>
2145EOF
2146ac_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; }
2148ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2149if test -z "$ac_err"; then
2150  rm -rf conftest*
2151  eval "ac_cv_header_$ac_safe=yes"
2152else
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"
2158fi
2159rm -f conftest*
2160fi
2161if 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
2166EOF
2167
2168else
2169  echo "$ac_t""no" 1>&6
2170fi
2171done
2172
2173for ac_func in getpagesize
2174do
2175echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2176echo "configure:2177: checking for $ac_func" >&5
2177if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2178  echo $ac_n "(cached) $ac_c" 1>&6
2179else
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.  */
2189char $ac_func();
2190
2191int main() {
2192
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)
2197choke me
2198#else
2199$ac_func();
2200#endif
2201
2202; return 0; }
2203EOF
2204if { (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"
2207else
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"
2212fi
2213rm -f conftest*
2214fi
2215
2216if 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
2221EOF
2222
2223else
2224  echo "$ac_t""no" 1>&6
2225fi
2226done
2227
2228echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2229echo "configure:2230: checking for working mmap" >&5
2230if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2231  echo $ac_n "(cached) $ac_c" 1>&6
2232else
2233  if test "$cross_compiling" = yes; then
2234  ac_cv_func_mmap_fixed_mapped=no
2235else
2236  cat > conftest.$ac_ext <<EOF
2237#line 2238 "configure"
2238#include "confdefs.h"
2239
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.
2256
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>
2264
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
2270
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
2275
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 */
2303
2304#endif /* no HAVE_GETPAGESIZE */
2305
2306#ifdef __cplusplus
2307extern "C" { void *malloc(unsigned); }
2308#else
2309char *malloc();
2310#endif
2311
2312int
2313main()
2314{
2315	char *data, *data2, *data3;
2316	int i, pagesize;
2317	int fd;
2318
2319	pagesize = getpagesize();
2320
2321	/*
2322	 * First, make a file with some known garbage in it.
2323	 */
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);
2336
2337	/*
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.
2341	 */
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);
2355
2356	/*
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.)
2360	 */
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);
2374}
2375
2376EOF
2377if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2378then
2379  ac_cv_func_mmap_fixed_mapped=yes
2380else
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
2385fi
2386rm -fr conftest*
2387fi
2388
2389fi
2390
2391echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2392if test $ac_cv_func_mmap_fixed_mapped = yes; then
2393  cat >> confdefs.h <<\EOF
2394#define HAVE_MMAP 1
2395EOF
2396
2397fi
2398
2399for ac_func in ftruncate memcmp memcpy memmove
2400do
2401echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2402echo "configure:2403: checking for $ac_func" >&5
2403if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2404  echo $ac_n "(cached) $ac_c" 1>&6
2405else
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.  */
2415char $ac_func();
2416
2417int main() {
2418
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)
2423choke me
2424#else
2425$ac_func();
2426#endif
2427
2428; return 0; }
2429EOF
2430if { (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"
2433else
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"
2438fi
2439rm -f conftest*
2440fi
2441
2442if 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
2447EOF
2448
2449else
2450  echo "$ac_t""no" 1>&6
2451fi
2452done
2453
2454for ac_func in memset
2455do
2456echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2457echo "configure:2458: checking for $ac_func" >&5
2458if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2459  echo $ac_n "(cached) $ac_c" 1>&6
2460else
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.  */
2470char $ac_func();
2471
2472int main() {
2473
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)
2478choke me
2479#else
2480$ac_func();
2481#endif
2482
2483; return 0; }
2484EOF
2485if { (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"
2488else
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"
2493fi
2494rm -f conftest*
2495fi
2496
2497if 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
2502EOF
2503
2504else
2505  echo "$ac_t""no" 1>&6
2506LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2507fi
2508done
2509
2510
2511if test "$ac_cv_func_memset" = yes; then
2512  cat >> confdefs.h <<\EOF
2513#define HAVE_MEMSET 1
2514EOF
2515
2516fi
2517
2518echo $ac_n "checking whether overlapping arrays are copied correctly""... $ac_c" 1>&6
2519echo "configure:2520: checking whether overlapping arrays are copied correctly" >&5
2520if eval "test \"`echo '$''{'libelf_cv_working_memmove'+set}'`\" = set"; then
2521  echo $ac_n "(cached) $ac_c" 1>&6
2522else
2523  if test "$cross_compiling" = yes; then
2524  libelf_cv_working_memmove='maybe not'
2525else
2526  cat > conftest.$ac_ext <<EOF
2527#line 2528 "configure"
2528#include "confdefs.h"
2529#include "confdefs.h"
2530#if HAVE_MEMMOVE
2531extern void *memmove();
2532#else
2533extern void bcopy();
2534#define memmove(d,s,n) bcopy((s),(d),(n))
2535#endif
2536extern int strcmp();
2537main() {
2538  char buf[] = "0123456789";
2539  memmove(buf + 1, buf, 9);
2540  if (strcmp(buf, "0012345678")) exit(1);
2541  exit(0);
2542}
2543EOF
2544if { (eval echo configure:2545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2545then
2546      libelf_cv_working_memmove=yes
2547else
2548  echo "configure: failed program was:" >&5
2549  cat conftest.$ac_ext >&5
2550  rm -fr conftest*
2551  libelf_cv_working_memmove=no
2552fi
2553rm -fr conftest*
2554fi
2555
2556fi
2557
2558echo "$ac_t""$libelf_cv_working_memmove" 1>&6
2559if test "$libelf_cv_working_memmove" != yes; then
2560  cat >> confdefs.h <<\EOF
2561#define HAVE_BROKEN_MEMMOVE 1
2562EOF
2563
2564fi
2565
2566echo $ac_n "checking the coffee machine""... $ac_c" 1>&6
2567echo "configure:2568: checking the coffee machine" >&5
2568if eval "test \"`echo '$''{'mr_cv_coffee_machine'+set}'`\" = set"; then
2569  echo $ac_n "(cached) $ac_c" 1>&6
2570else
2571  mr_cv_coffee_machine='empty - operator may not work as expected'
2572fi
2573
2574echo "$ac_t""$mr_cv_coffee_machine" 1>&6
2575
2576echo $ac_n "checking whether 64-bit ELF support is sufficient""... $ac_c" 1>&6
2577echo "configure:2578: checking whether 64-bit ELF support is sufficient" >&5
2578echo "$ac_t""$libelf_64bit" 1>&6
2579echo $ac_n "checking whether to include 64-bit support""... $ac_c" 1>&6
2580echo "configure:2581: checking whether to include 64-bit support" >&5
2581if test "$libelf_64bit" = no; then
2582  libelf_enable_64bit=no
2583else
2584  # Check whether --enable-elf64 or --disable-elf64 was given.
2585if test "${enable_elf64+set}" = set; then
2586  enableval="$enable_elf64"
2587  libelf_enable_64bit="$enableval"
2588else
2589  libelf_enable_64bit=yes
2590fi
2591
2592fi
2593echo "$ac_t""$libelf_enable_64bit" 1>&6
2594if test "$libelf_enable_64bit" = yes; then
2595  cat >> confdefs.h <<\EOF
2596#define __LIBELF64 1
2597EOF
2598
2599fi
2600
2601echo $ac_n "checking whether versioning support is sufficient""... $ac_c" 1>&6
2602echo "configure:2603: checking whether versioning support is sufficient" >&5
2603libelf_versioning=no
2604case "$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
2609EOF
2610
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
2615EOF
2616
2617      libelf_versioning=yes
2618    fi;;
2619esac
2620echo "$ac_t""$libelf_versioning" 1>&6
2621echo $ac_n "checking whether to include versioning support""... $ac_c" 1>&6
2622echo "configure:2623: checking whether to include versioning support" >&5
2623if test "$libelf_versioning" = no; then
2624  libelf_enable_versioning=no
2625else
2626  # Check whether --enable-versioning or --disable-versioning was given.
2627if test "${enable_versioning+set}" = set; then
2628  enableval="$enable_versioning"
2629  libelf_enable_versioning="$enableval"
2630else
2631  libelf_enable_versioning=yes
2632fi
2633
2634fi
2635echo "$ac_t""$libelf_enable_versioning" 1>&6
2636if test "$libelf_enable_versioning" = yes; then
2637  cat >> confdefs.h <<\EOF
2638#define __LIBELF_SYMBOL_VERSIONS 1
2639EOF
2640
2641fi
2642
2643
2644
2645
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
2655
2656
2657
2658
2659  echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2660echo "configure:2661: checking whether NLS is requested" >&5
2661  # Check whether --enable-nls or --disable-nls was given.
2662if test "${enable_nls+set}" = set; then
2663  enableval="$enable_nls"
2664  mr_enable_nls="$enableval"
2665else
2666  mr_enable_nls=yes
2667fi
2668
2669  echo "$ac_t""$mr_enable_nls" 1>&6
2670
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
2677echo "configure:2678: checking for dgettext" >&5
2678if eval "test \"`echo '$''{'mr_cv_func_dgettext'+set}'`\" = set"; then
2679  echo $ac_n "(cached) $ac_c" 1>&6
2680else
2681
2682	cat > conftest.$ac_ext <<EOF
2683#line 2684 "configure"
2684#include "confdefs.h"
2685#include <libintl.h>
2686int main() {
2687char *s = dgettext("", ""); return 0
2688; return 0; }
2689EOF
2690if { (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
2693else
2694  echo "configure: failed program was:" >&5
2695  cat conftest.$ac_ext >&5
2696  rm -rf conftest*
2697  mr_cv_func_dgettext=no
2698fi
2699rm -f conftest*
2700
2701fi
2702
2703echo "$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.
2706set dummy msgfmt; ac_word=$2
2707echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2708echo "configure:2709: checking for $ac_word" >&5
2709if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2710  echo $ac_n "(cached) $ac_c" 1>&6
2711else
2712  case "$MSGFMT" in
2713  /*)
2714  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2715  ;;
2716  ?:/*)
2717  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a dos path.
2718  ;;
2719  *)
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
2727    fi
2728  done
2729  IFS="$ac_save_ifs"
2730  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2731  ;;
2732esac
2733fi
2734MSGFMT="$ac_cv_path_MSGFMT"
2735if test -n "$MSGFMT"; then
2736  echo "$ac_t""$MSGFMT" 1>&6
2737else
2738  echo "$ac_t""no" 1>&6
2739fi
2740
2741      if test "$MSGFMT" != no; then
2742	# Extract the first word of "gmsgfmt", so it can be a program name with args.
2743set dummy gmsgfmt; ac_word=$2
2744echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2745echo "configure:2746: checking for $ac_word" >&5
2746if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2747  echo $ac_n "(cached) $ac_c" 1>&6
2748else
2749  case "$GMSGFMT" in
2750  /*)
2751  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2752  ;;
2753  ?:/*)
2754  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2755  ;;
2756  *)
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
2764    fi
2765  done
2766  IFS="$ac_save_ifs"
2767  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2768  ;;
2769esac
2770fi
2771GMSGFMT="$ac_cv_path_GMSGFMT"
2772if test -n "$GMSGFMT"; then
2773  echo "$ac_t""$GMSGFMT" 1>&6
2774else
2775  echo "$ac_t""no" 1>&6
2776fi
2777
2778	# Extract the first word of "xgettext", so it can be a program name with args.
2779set dummy xgettext; ac_word=$2
2780echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2781echo "configure:2782: checking for $ac_word" >&5
2782if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2783  echo $ac_n "(cached) $ac_c" 1>&6
2784else
2785  case "$XGETTEXT" in
2786  /*)
2787  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2788  ;;
2789  ?:/*)
2790  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a dos path.
2791  ;;
2792  *)
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
2800    fi
2801  done
2802  IFS="$ac_save_ifs"
2803  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext"
2804  ;;
2805esac
2806fi
2807XGETTEXT="$ac_cv_path_XGETTEXT"
2808if test -n "$XGETTEXT"; then
2809  echo "$ac_t""$XGETTEXT" 1>&6
2810else
2811  echo "$ac_t""no" 1>&6
2812fi
2813
2814	# Extract the first word of "msgmerge", so it can be a program name with args.
2815set dummy msgmerge; ac_word=$2
2816echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2817echo "configure:2818: checking for $ac_word" >&5
2818if eval "test \"`echo '$''{'ac_cv_path_MSGMERGE'+set}'`\" = set"; then
2819  echo $ac_n "(cached) $ac_c" 1>&6
2820else
2821  case "$MSGMERGE" in
2822  /*)
2823  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
2824  ;;
2825  ?:/*)
2826  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a dos path.
2827  ;;
2828  *)
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
2836    fi
2837  done
2838  IFS="$ac_save_ifs"
2839  test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE="msgmerge"
2840  ;;
2841esac
2842fi
2843MSGMERGE="$ac_cv_path_MSGMERGE"
2844if test -n "$MSGMERGE"; then
2845  echo "$ac_t""$MSGMERGE" 1>&6
2846else
2847  echo "$ac_t""no" 1>&6
2848fi
2849
2850	echo $ac_n "checking for GNU gettext""... $ac_c" 1>&6
2851echo "configure:2852: checking for GNU gettext" >&5
2852if eval "test \"`echo '$''{'mr_cv_gnu_gettext'+set}'`\" = set"; then
2853  echo $ac_n "(cached) $ac_c" 1>&6
2854else
2855
2856	    cat > conftest.$ac_ext <<EOF
2857#line 2858 "configure"
2858#include "confdefs.h"
2859
2860int main() {
2861extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr
2862; return 0; }
2863EOF
2864if { (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
2867else
2868  echo "configure: failed program was:" >&5
2869  cat conftest.$ac_ext >&5
2870  rm -rf conftest*
2871  mr_cv_gnu_gettext=no
2872fi
2873rm -f conftest*
2874
2875fi
2876
2877echo "$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
2880echo "configure:2881: checking for losing catgets-based GNU gettext" >&5
2881if eval "test \"`echo '$''{'mr_cv_catgets_based_gettext'+set}'`\" = set"; then
2882  echo $ac_n "(cached) $ac_c" 1>&6
2883else
2884
2885	      cat > conftest.$ac_ext <<EOF
2886#line 2887 "configure"
2887#include "confdefs.h"
2888
2889int main() {
2890extern int _msg_tbl_length; return _msg_tbl_length
2891; return 0; }
2892EOF
2893if { (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
2896else
2897  echo "configure: failed program was:" >&5
2898  cat conftest.$ac_ext >&5
2899  rm -rf conftest*
2900  mr_cv_catgets_based_gettext=no
2901fi
2902rm -f conftest*
2903
2904fi
2905
2906echo "$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
2914echo "configure:2915: checking for pure GNU gettext" >&5
2915if eval "test \"`echo '$''{'mr_cv_pure_gnu_gettext'+set}'`\" = set"; then
2916  echo $ac_n "(cached) $ac_c" 1>&6
2917else
2918
2919		cat > conftest.$ac_ext <<EOF
2920#line 2921 "configure"
2921#include "confdefs.h"
2922
2923int main() {
2924extern int gettext(); return gettext()
2925; return 0; }
2926EOF
2927if { (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
2930else
2931  echo "configure: failed program was:" >&5
2932  cat conftest.$ac_ext >&5
2933  rm -rf conftest*
2934  mr_cv_pure_gnu_gettext=no
2935fi
2936rm -f conftest*
2937
2938fi
2939
2940echo "$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'
2947	    fi
2948	    INSTOBJEXT=.mo
2949	  fi
2950	else
2951	  # System provided gettext
2952	  CATOBJEXT=.mo
2953	  INSTOBJEXT=.mo
2954	  localedir='$(prefix)/lib/locale'
2955	fi
2956      else
2957	# Gettext but no msgfmt. Try catgets.
2958	mr_cv_func_dgettext=no
2959      fi
2960    fi
2961    if test "$mr_cv_func_dgettext" = yes; then
2962      cat >> confdefs.h <<\EOF
2963#define HAVE_DGETTEXT 1
2964EOF
2965
2966    else
2967      echo $ac_n "checking for catgets""... $ac_c" 1>&6
2968echo "configure:2969: checking for catgets" >&5
2969if eval "test \"`echo '$''{'mr_cv_func_catgets'+set}'`\" = set"; then
2970  echo $ac_n "(cached) $ac_c" 1>&6
2971else
2972
2973	cat > conftest.$ac_ext <<EOF
2974#line 2975 "configure"
2975#include "confdefs.h"
2976#include <nl_types.h>
2977int main() {
2978catgets(catopen("",0),0,0,"");return 0;
2979; return 0; }
2980EOF
2981if { (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
2984else
2985  echo "configure: failed program was:" >&5
2986  cat conftest.$ac_ext >&5
2987  rm -rf conftest*
2988  mr_cv_func_catgets=no
2989fi
2990rm -f conftest*
2991
2992fi
2993
2994echo "$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.
2997set dummy gencat; ac_word=$2
2998echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2999echo "configure:3000: checking for $ac_word" >&5
3000if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
3001  echo $ac_n "(cached) $ac_c" 1>&6
3002else
3003  case "$GENCAT" in
3004  /*)
3005  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
3006  ;;
3007  ?:/*)
3008  ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
3009  ;;
3010  *)
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
3018    fi
3019  done
3020  IFS="$ac_save_ifs"
3021  test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
3022  ;;
3023esac
3024fi
3025GENCAT="$ac_cv_path_GENCAT"
3026if test -n "$GENCAT"; then
3027  echo "$ac_t""$GENCAT" 1>&6
3028else
3029  echo "$ac_t""no" 1>&6
3030fi
3031
3032	if test "$GENCAT" != no; then
3033	  cat >> confdefs.h <<\EOF
3034#define HAVE_CATGETS 1
3035EOF
3036
3037	  # Extract the first word of "gmsgfmt msgfmt", so it can be a program name with args.
3038set dummy gmsgfmt msgfmt; ac_word=$2
3039echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040echo "configure:3041: checking for $ac_word" >&5
3041if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3042  echo $ac_n "(cached) $ac_c" 1>&6
3043else
3044  case "$GMSGFMT" in
3045  /*)
3046  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3047  ;;
3048  ?:/*)
3049  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3050  ;;
3051  *)
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
3059    fi
3060  done
3061  IFS="$ac_save_ifs"
3062  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="msgfmt"
3063  ;;
3064esac
3065fi
3066GMSGFMT="$ac_cv_path_GMSGFMT"
3067if test -n "$GMSGFMT"; then
3068  echo "$ac_t""$GMSGFMT" 1>&6
3069else
3070  echo "$ac_t""no" 1>&6
3071fi
3072
3073	  # Extract the first word of "xgettext", so it can be a program name with args.
3074set dummy xgettext; ac_word=$2
3075echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3076echo "configure:3077: checking for $ac_word" >&5
3077if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3078  echo $ac_n "(cached) $ac_c" 1>&6
3079else
3080  case "$XGETTEXT" in
3081  /*)
3082  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3083  ;;
3084  ?:/*)
3085  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a dos path.
3086  ;;
3087  *)
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
3095    fi
3096  done
3097  IFS="$ac_save_ifs"
3098  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="xgettext"
3099  ;;
3100esac
3101fi
3102XGETTEXT="$ac_cv_path_XGETTEXT"
3103if test -n "$XGETTEXT"; then
3104  echo "$ac_t""$XGETTEXT" 1>&6
3105else
3106  echo "$ac_t""no" 1>&6
3107fi
3108
3109	  CATOBJEXT=.cat
3110	  INSTOBJEXT=.cat
3111	  localedir='$(prefix)/lib/locale'
3112	fi
3113      else
3114	echo "configure: warning: no NLS support, disabled" 1>&2
3115	mr_enable_nls=no
3116      fi
3117    fi
3118  fi
3119
3120
3121
3122
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
3127echo "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"
3134	  ;;
3135      esac
3136    done
3137    echo "$ac_t""$mr_linguas" 1>&6
3138    POSUB=po
3139  fi
3140
3141
3142
3143LIBINTL=
3144echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
3145echo "configure:3146: checking for gettext in -lintl" >&5
3146ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
3147if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3148  echo $ac_n "(cached) $ac_c" 1>&6
3149else
3150  ac_save_LIBS="$LIBS"
3151LIBS="-lintl  $LIBS"
3152cat > 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.  */
3158char gettext();
3159
3160int main() {
3161gettext()
3162; return 0; }
3163EOF
3164if { (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"
3167else
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"
3172fi
3173rm -f conftest*
3174LIBS="$ac_save_LIBS"
3175
3176fi
3177if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3178  echo "$ac_t""yes" 1>&6
3179  LIBINTL=-lintl
3180else
3181  echo "$ac_t""no" 1>&6
3182fi
3183
3184
3185
3186
3187# Make sure we can run config.sub.
3188if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
3189else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
3190fi
3191
3192echo $ac_n "checking host system type""... $ac_c" 1>&6
3193echo "configure:3194: checking host system type" >&5
3194
3195host_alias=$host
3196case "$host_alias" in
3197NONE)
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 ;;
3205esac
3206
3207host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
3208host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3209host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3210host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3211echo "$ac_t""$host" 1>&6
3212
3213
3214
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
3223echo "configure:3224: checking whether to build a shared library" >&5
3224  # Check whether --enable-shared or --disable-shared was given.
3225if test "${enable_shared+set}" = set; then
3226  enableval="$enable_shared"
3227  mr_enable_shared="$enableval"
3228else
3229  mr_enable_shared=yes
3230fi
3231
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
3235echo "configure:3236: checking whether GNU naming conventions are requested" >&5
3236    # Check whether --enable-gnu-names or --disable-gnu-names was given.
3237if test "${enable_gnu_names+set}" = set; then
3238  enableval="$enable_gnu_names"
3239  mr_enable_gnu_names="$enableval"
3240else
3241  mr_enable_gnu_names=no
3242fi
3243
3244    echo "$ac_t""$mr_enable_gnu_names" 1>&6
3245
3246
3247    # Extract the first word of "ld", so it can be a program name with args.
3248set dummy ld; ac_word=$2
3249echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3250echo "configure:3251: checking for $ac_word" >&5
3251if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
3252  echo $ac_n "(cached) $ac_c" 1>&6
3253else
3254  case "$LD" in
3255  /*)
3256  ac_cv_path_LD="$LD" # Let the user override the test with a path.
3257  ;;
3258  ?:/*)
3259  ac_cv_path_LD="$LD" # Let the user override the test with a dos path.
3260  ;;
3261  *)
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
3269    fi
3270  done
3271  IFS="$ac_save_ifs"
3272  test -z "$ac_cv_path_LD" && ac_cv_path_LD="ld"
3273  ;;
3274esac
3275fi
3276LD="$ac_cv_path_LD"
3277if test -n "$LD"; then
3278  echo "$ac_t""$LD" 1>&6
3279else
3280  echo "$ac_t""no" 1>&6
3281fi
3282
3283    case "$host" in
3284      *-linux*|*-gnu*|*-dragonfly*|*-freebsd*)
3285	if test "$GCC" = yes; then
3286
3287
3288  echo $ac_n "checking for native ELF system""... $ac_c" 1>&6
3289echo "configure:3290: checking for native ELF system" >&5
3290if eval "test \"`echo '$''{'mr_cv_target_elf'+set}'`\" = set"; then
3291  echo $ac_n "(cached) $ac_c" 1>&6
3292else
3293  if test "$cross_compiling" = yes; then
3294  mr_cv_target_elf=no
3295else
3296  cat > conftest.$ac_ext <<EOF
3297#line 3298 "configure"
3298#include "confdefs.h"
3299#include <stdio.h>
3300int
3301main(int argc, char **argv) {
3302  char buf[BUFSIZ];
3303  FILE *fp;
3304  int n;
3305
3306  if ((fp = fopen(*argv, "r")) == NULL) {
3307    exit(1);
3308  }
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);
3316  }
3317  exit(1);
3318}
3319EOF
3320if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3321then
3322        mr_cv_target_elf=yes
3323else
3324  echo "configure: failed program was:" >&5
3325  cat conftest.$ac_ext >&5
3326  rm -fr conftest*
3327  mr_cv_target_elf=no
3328fi
3329rm -fr conftest*
3330fi
3331
3332fi
3333
3334echo "$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.$(MAJOR)'
3340	    fi
3341	    SHLINK_SFX='.so'
3342	    SONAME_SFX='.so.$(MAJOR)'
3343	    LINK_SHLIB='$(CC) -shared -Wl,-soname,$(SONAME) $(LDFLAGS)'
3344	    INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3345	  else
3346	    echo "configure: warning: shared libraries not supported for $host" 1>&2
3347	    mr_enable_shared=no
3348	  fi
3349	elif ${CC} -V 2>&1 | grep 'Intel(R) C++ Compiler' >/dev/null 2>&1; then
3350	  echo "configure: warning: Use --disable-shared if $CC fails to build the shared library" 1>&2
3351	  PICFLAGS='-fPIC -DPIC'
3352	  if test "$mr_enable_gnu_names" = yes
3353	  then SHLIB_SFX='-$(VERSION).so'
3354	  else SHLIB_SFX='.so.$(VERSION)'
3355	  fi
3356	  SHLINK_SFX='.so'
3357	  SONAME_SFX='.so.$(MAJOR)'
3358	  LINK_SHLIB='$(CC) -shared -Wl,-soname,$(SONAME)'
3359	  INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3360	  DEPSHLIBS='-lc'
3361	else
3362	  echo "configure: warning: GNU CC required for building shared libraries" 1>&2
3363	  mr_enable_shared=no
3364	fi
3365	;;
3366      i386-pc-nto-qnx*)
3367
3368
3369  echo $ac_n "checking for native ELF system""... $ac_c" 1>&6
3370echo "configure:3372: checking for native ELF system" >&5
3371if eval "test \"`echo '$''{'mr_cv_target_elf'+set}'`\" = set"; then
3372  echo $ac_n "(cached) $ac_c" 1>&6
3373else
3374  if test "$cross_compiling" = yes; then
3375  mr_cv_target_elf=no
3376else
3377  cat > conftest.$ac_ext <<EOF
3378#line 3380 "configure"
3379#include "confdefs.h"
3380#include <stdio.h>
3381int
3382main(int argc, char **argv) {
3383  char buf[BUFSIZ];
3384  FILE *fp;
3385  int n;
3386
3387  if ((fp = fopen(*argv, "r")) == NULL) {
3388    exit(1);
3389  }
3390  n = fread(buf, 1, sizeof(buf), fp);
3391  if (n >= 52
3392   && buf[0] == '\177'
3393   && buf[1] == 'E'
3394   && buf[2] == 'L'
3395   && buf[3] == 'F') {
3396    exit(0);
3397  }
3398  exit(1);
3399}
3400EOF
3401if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3402then
3403        mr_cv_target_elf=yes
3404else
3405  echo "configure: failed program was:" >&5
3406  cat conftest.$ac_ext >&5
3407  rm -fr conftest*
3408  mr_cv_target_elf=no
3409fi
3410rm -fr conftest*
3411fi
3412
3413fi
3414
3415echo "$ac_t""$mr_cv_target_elf" 1>&6
3416	if test "$mr_cv_target_elf" = yes; then
3417	  PICFLAGS='-fPIC -DPIC'
3418	  if test "$mr_enable_gnu_names" = yes
3419	  then SHLIB_SFX='-$(VERSION).so'
3420	  else SHLIB_SFX='.so.$(VERSION)'
3421	  fi
3422	  SHLINK_SFX='.so'
3423	  SONAME_SFX='.so.$(MAJOR)'
3424	  LINK_SHLIB='$(CC) -shared -Wl,-soname,$(SONAME)'
3425	  INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3426	  DEPSHLIBS='-lc'
3427	else
3428	  echo "configure: warning: shared libraries not supported for $host" 1>&2
3429	  mr_enable_shared=no
3430	fi
3431	;;
3432      sparc-sun-solaris2*)
3433	if test "$GCC" = yes; then
3434	  PICFLAGS='-fPIC -DPIC'
3435	else
3436	  PICFLAGS='-K PIC -DPIC'
3437	fi
3438	if test "$mr_enable_gnu_names" = yes
3439	then SHLIB_SFX='-$(MAJOR).so'
3440	else SHLIB_SFX='.so.$(MAJOR)'
3441	fi
3442	SONAME_SFX='.so.$(MAJOR)'
3443	SHLINK_SFX='.so'
3444	LINK_SHLIB='$(LD) -G -z text -h $(SONAME)'
3445	INSTALL_SHLIB='$(INSTALL_PROGRAM)'
3446	;;
3447      *)
3448	echo "configure: warning: shared libraries not supported for $host" 1>&2
3449	mr_enable_shared=no
3450	;;
3451    esac
3452  else
3453    mr_enable_shared=no
3454  fi
3455
3456
3457
3458
3459
3460
3461
3462  DO_SHLIB="$mr_enable_shared"
3463
3464
3465
3466# Check whether --enable-extended-format or --disable-extended-format was given.
3467if test "${enable_extended_format+set}" = set; then
3468  enableval="$enable_extended_format"
3469  mr_enable_extended_format="$enableval"
3470else
3471  mr_enable_extended_format=no
3472fi
3473
3474if test "$mr_enable_extended_format" = yes; then
3475  cat >> confdefs.h <<\EOF
3476#define ENABLE_EXTENDED_FORMAT 1
3477EOF
3478
3479fi
3480
3481# Check whether --enable-sanity-checks or --disable-sanity-checks was given.
3482if test "${enable_sanity_checks+set}" = set; then
3483  enableval="$enable_sanity_checks"
3484  mr_enable_sanity_checks="$enableval"
3485else
3486  mr_enable_sanity_checks=yes
3487fi
3488
3489if test "$mr_enable_sanity_checks" = yes; then
3490  cat >> confdefs.h <<\EOF
3491#define ENABLE_SANITY_CHECKS 1
3492EOF
3493
3494fi
3495
3496
3497
3498  # Check whether --enable-debug or --disable-debug was given.
3499if test "${enable_debug+set}" = set; then
3500  enableval="$enable_debug"
3501  mr_enable_debug="$enableval"
3502else
3503  mr_enable_debug=no
3504fi
3505
3506  if test "$mr_enable_debug" = yes; then
3507    cat >> confdefs.h <<\EOF
3508#define ENABLE_DEBUG 1
3509EOF
3510
3511  fi
3512
3513
3514trap '' 1 2 15
3515cat > confcache <<\EOF
3516# This file is a shell script that caches the results of configure
3517# tests run on this system so they can be shared between configure
3518# scripts and configure runs.  It is not useful on other systems.
3519# If it contains results you don't want to keep, you may remove or edit it.
3520#
3521# By default, configure uses ./config.cache as the cache file,
3522# creating it if it does not exist already.  You can give configure
3523# the --cache-file=FILE option to use a different cache file; that is
3524# what configure does when it calls configure scripts in
3525# subdirectories, so they share the cache.
3526# Giving --cache-file=/dev/null disables caching, for debugging configure.
3527# config.status only pays attention to the cache file if you give it the
3528# --recheck option to rerun configure.
3529#
3530EOF
3531# The following way of writing the cache mishandles newlines in values,
3532# but we know of no workaround that is simple, portable, and efficient.
3533# So, don't put newlines in cache variables' values.
3534# Ultrix sh set writes to stderr and can't be redirected directly,
3535# and sets the high bit in the cache file unless we assign to the vars.
3536(set) 2>&1 |
3537  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3538  *ac_space=\ *)
3539    # `set' does not quote correctly, so add quotes (double-quote substitution
3540    # turns \\\\ into \\, and sed turns \\ into \).
3541    sed -n \
3542      -e "s/'/'\\\\''/g" \
3543      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3544    ;;
3545  *)
3546    # `set' quotes correctly as required by POSIX, so do not add quotes.
3547    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3548    ;;
3549  esac >> confcache
3550if cmp -s $cache_file confcache; then
3551  :
3552else
3553  if test -w $cache_file; then
3554    echo "updating cache $cache_file"
3555    cat confcache > $cache_file
3556  else
3557    echo "not updating unwritable cache $cache_file"
3558  fi
3559fi
3560rm -f confcache
3561
3562trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3563
3564test "x$prefix" = xNONE && prefix=$ac_default_prefix
3565# Let make expand exec_prefix.
3566test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3567
3568# Any assignment to VPATH causes Sun make to only execute
3569# the first set of double-colon rules, so remove it if not needed.
3570# If there is a colon in the path, we need to keep it.
3571if test "x$srcdir" = x.; then
3572  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
3573fi
3574
3575trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3576
3577DEFS=-DHAVE_CONFIG_H
3578
3579# Without the "./", some shells look in PATH for config.status.
3580: ${CONFIG_STATUS=./config.status}
3581
3582echo creating $CONFIG_STATUS
3583rm -f $CONFIG_STATUS
3584cat > $CONFIG_STATUS <<EOF
3585#! /bin/sh
3586# Generated automatically by configure.
3587# Run this file to recreate the current configuration.
3588# This directory was configured as follows,
3589# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3590#
3591# $0 $ac_configure_args
3592#
3593# Compiler output produced by configure, useful for debugging
3594# configure, is in ./config.log if it exists.
3595
3596ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3597for ac_option
3598do
3599  case "\$ac_option" in
3600  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3601    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3602    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3603  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3604    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3605    exit 0 ;;
3606  -help | --help | --hel | --he | --h)
3607    echo "\$ac_cs_usage"; exit 0 ;;
3608  *) echo "\$ac_cs_usage"; exit 1 ;;
3609  esac
3610done
3611
3612ac_given_srcdir=$srcdir
3613ac_given_INSTALL="$INSTALL"
3614
3615trap '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
3616EOF
3617cat >> $CONFIG_STATUS <<EOF
3618
3619# Protect against being on the right side of a sed subst in config.status.
3620sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3621 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3622$ac_vpsub
3623$extrasub
3624s%@SHELL@%$SHELL%g
3625s%@CFLAGS@%$CFLAGS%g
3626s%@CPPFLAGS@%$CPPFLAGS%g
3627s%@CXXFLAGS@%$CXXFLAGS%g
3628s%@FFLAGS@%$FFLAGS%g
3629s%@DEFS@%$DEFS%g
3630s%@LDFLAGS@%$LDFLAGS%g
3631s%@LIBS@%$LIBS%g
3632s%@exec_prefix@%$exec_prefix%g
3633s%@prefix@%$prefix%g
3634s%@program_transform_name@%$program_transform_name%g
3635s%@bindir@%$bindir%g
3636s%@sbindir@%$sbindir%g
3637s%@libexecdir@%$libexecdir%g
3638s%@datadir@%$datadir%g
3639s%@sysconfdir@%$sysconfdir%g
3640s%@sharedstatedir@%$sharedstatedir%g
3641s%@localstatedir@%$localstatedir%g
3642s%@libdir@%$libdir%g
3643s%@includedir@%$includedir%g
3644s%@oldincludedir@%$oldincludedir%g
3645s%@infodir@%$infodir%g
3646s%@mandir@%$mandir%g
3647s%@PACKAGE@%$PACKAGE%g
3648s%@VERSION@%$VERSION%g
3649s%@MAINT@%$MAINT%g
3650s%@MAJOR@%$MAJOR%g
3651s%@SET_MAKE@%$SET_MAKE%g
3652s%@CC@%$CC%g
3653s%@CPP@%$CPP%g
3654s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3655s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3656s%@INSTALL_DATA@%$INSTALL_DATA%g
3657s%@RANLIB@%$RANLIB%g
3658s%@LN_S@%$LN_S%g
3659s%@DO_COMPAT@%$DO_COMPAT%g
3660s%@LIBOBJS@%$LIBOBJS%g
3661s%@GMOFILES@%$GMOFILES%g
3662s%@MSGFILES@%$MSGFILES%g
3663s%@POFILES@%$POFILES%g
3664s%@MSGFMT@%$MSGFMT%g
3665s%@GMSGFMT@%$GMSGFMT%g
3666s%@XGETTEXT@%$XGETTEXT%g
3667s%@MSGMERGE@%$MSGMERGE%g
3668s%@GENCAT@%$GENCAT%g
3669s%@CATOBJEXT@%$CATOBJEXT%g
3670s%@INSTOBJEXT@%$INSTOBJEXT%g
3671s%@localedir@%$localedir%g
3672s%@CATALOGS@%$CATALOGS%g
3673s%@POSUB@%$POSUB%g
3674s%@LIBINTL@%$LIBINTL%g
3675s%@host@%$host%g
3676s%@host_alias@%$host_alias%g
3677s%@host_cpu@%$host_cpu%g
3678s%@host_vendor@%$host_vendor%g
3679s%@host_os@%$host_os%g
3680s%@LD@%$LD%g
3681s%@PICFLAGS@%$PICFLAGS%g
3682s%@SHLIB_SFX@%$SHLIB_SFX%g
3683s%@SHLINK_SFX@%$SHLINK_SFX%g
3684s%@SONAME_SFX@%$SONAME_SFX%g
3685s%@LINK_SHLIB@%$LINK_SHLIB%g
3686s%@INSTALL_SHLIB@%$INSTALL_SHLIB%g
3687s%@DEPSHLIBS@%$DEPSHLIBS%g
3688s%@DO_SHLIB@%$DO_SHLIB%g
3689
3690CEOF
3691EOF
3692
3693cat >> $CONFIG_STATUS <<\EOF
3694
3695# Split the substitutions into bite-sized pieces for seds with
3696# small command number limits, like on Digital OSF/1 and HP-UX.
3697ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3698ac_file=1 # Number of current file.
3699ac_beg=1 # First line for current file.
3700ac_end=$ac_max_sed_cmds # Line after last line for current file.
3701ac_more_lines=:
3702ac_sed_cmds=""
3703while $ac_more_lines; do
3704  if test $ac_beg -gt 1; then
3705    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3706  else
3707    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3708  fi
3709  if test ! -s conftest.s$ac_file; then
3710    ac_more_lines=false
3711    rm -f conftest.s$ac_file
3712  else
3713    if test -z "$ac_sed_cmds"; then
3714      ac_sed_cmds="sed -f conftest.s$ac_file"
3715    else
3716      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3717    fi
3718    ac_file=`expr $ac_file + 1`
3719    ac_beg=$ac_end
3720    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3721  fi
3722done
3723if test -z "$ac_sed_cmds"; then
3724  ac_sed_cmds=cat
3725fi
3726EOF
3727
3728cat >> $CONFIG_STATUS <<EOF
3729
3730CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile po/Makefile libelf.pc"}
3731EOF
3732cat >> $CONFIG_STATUS <<\EOF
3733for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3734  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3735  case "$ac_file" in
3736  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3737       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3738  *) ac_file_in="${ac_file}.in" ;;
3739  esac
3740
3741  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3742
3743  # Remove last slash and all that follows it.  Not all systems have dirname.
3744  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3745  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3746    # The file is in a subdirectory.
3747    test ! -d "$ac_dir" && mkdir "$ac_dir"
3748    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3749    # A "../" for each directory in $ac_dir_suffix.
3750    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3751  else
3752    ac_dir_suffix= ac_dots=
3753  fi
3754
3755  case "$ac_given_srcdir" in
3756  .)  srcdir=.
3757      if test -z "$ac_dots"; then top_srcdir=.
3758      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3759  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3760  *) # Relative path.
3761    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3762    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3763  esac
3764
3765  case "$ac_given_INSTALL" in
3766  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3767  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3768  esac
3769
3770  echo creating "$ac_file"
3771  rm -f "$ac_file"
3772  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3773  case "$ac_file" in
3774  *Makefile*) ac_comsub="1i\\
3775# $configure_input" ;;
3776  *) ac_comsub= ;;
3777  esac
3778
3779  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3780  sed -e "$ac_comsub
3781s%@configure_input@%$configure_input%g
3782s%@srcdir@%$srcdir%g
3783s%@top_srcdir@%$top_srcdir%g
3784s%@INSTALL@%$INSTALL%g
3785" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3786fi; done
3787rm -f conftest.s*
3788
3789# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3790# NAME is the cpp macro being defined and VALUE is the value it is being given.
3791#
3792# ac_d sets the value in "#define NAME VALUE" lines.
3793ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
3794ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
3795ac_dC='\3'
3796ac_dD='%g'
3797# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3798ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3799ac_uB='\([ 	]\)%\1#\2define\3'
3800ac_uC=' '
3801ac_uD='\4%g'
3802# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3803ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3804ac_eB='$%\1#\2define\3'
3805ac_eC=' '
3806ac_eD='%g'
3807
3808if test "${CONFIG_HEADERS+set}" != set; then
3809EOF
3810cat >> $CONFIG_STATUS <<EOF
3811  CONFIG_HEADERS="config.h lib/sys_elf.h"
3812EOF
3813cat >> $CONFIG_STATUS <<\EOF
3814fi
3815for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3816  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3817  case "$ac_file" in
3818  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3819       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3820  *) ac_file_in="${ac_file}.in" ;;
3821  esac
3822
3823  echo creating $ac_file
3824
3825  rm -f conftest.frag conftest.in conftest.out
3826  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3827  cat $ac_file_inputs > conftest.in
3828
3829EOF
3830
3831# Transform confdefs.h into a sed script conftest.vals that substitutes
3832# the proper values into config.h.in to produce config.h.  And first:
3833# Protect against being on the right side of a sed subst in config.status.
3834# Protect against being in an unquoted here document in config.status.
3835rm -f conftest.vals
3836cat > conftest.hdr <<\EOF
3837s/[\\&%]/\\&/g
3838s%[\\$`]%\\&%g
3839s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3840s%ac_d%ac_u%gp
3841s%ac_u%ac_e%gp
3842EOF
3843sed -n -f conftest.hdr confdefs.h > conftest.vals
3844rm -f conftest.hdr
3845
3846# This sed command replaces #undef with comments.  This is necessary, for
3847# example, in the case of _POSIX_SOURCE, which is predefined and required
3848# on some systems where configure will not decide to define it.
3849cat >> conftest.vals <<\EOF
3850s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3851EOF
3852
3853# Break up conftest.vals because some shells have a limit on
3854# the size of here documents, and old seds have small limits too.
3855
3856rm -f conftest.tail
3857while :
3858do
3859  ac_lines=`grep -c . conftest.vals`
3860  # grep -c gives empty output for an empty file on some AIX systems.
3861  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3862  # Write a limited-size here document to conftest.frag.
3863  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3864  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3865  echo 'CEOF
3866  sed -f conftest.frag conftest.in > conftest.out
3867  rm -f conftest.in
3868  mv conftest.out conftest.in
3869' >> $CONFIG_STATUS
3870  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3871  rm -f conftest.vals
3872  mv conftest.tail conftest.vals
3873done
3874rm -f conftest.vals
3875
3876cat >> $CONFIG_STATUS <<\EOF
3877  rm -f conftest.frag conftest.h
3878  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3879  cat conftest.in >> conftest.h
3880  rm -f conftest.in
3881  if cmp -s $ac_file conftest.h 2>/dev/null; then
3882    echo "$ac_file is unchanged"
3883    rm -f conftest.h
3884  else
3885    # Remove last slash and all that follows it.  Not all systems have dirname.
3886      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3887      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3888      # The file is in a subdirectory.
3889      test ! -d "$ac_dir" && mkdir "$ac_dir"
3890    fi
3891    rm -f $ac_file
3892    mv conftest.h $ac_file
3893  fi
3894fi; done
3895
3896EOF
3897cat >> $CONFIG_STATUS <<EOF
3898
3899EOF
3900cat >> $CONFIG_STATUS <<\EOF
3901echo timestamp > stamp-h; echo timestamp > lib/stamp-h
3902exit 0
3903EOF
3904chmod +x $CONFIG_STATUS
3905rm -fr confdefs* $ac_clean_files
3906test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3907
3908
3909# vi: set ts=8 sw=2 :
3910