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