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