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