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