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