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