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