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