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