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