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