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