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