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