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