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