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