]> git.sesse.net Git - vlc/blob - configure
* Better gtk-config detection.
[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 local-static, local-shared or a path to another libdvdcss such as /usr/local (default local-static)"
34 ac_help="$ac_help
35   --disable-css           Disable DVD CSS decryption (default enabled)"
36 ac_help="$ac_help
37   --disable-dummy         dummy module (default enabled)"
38 ac_help="$ac_help
39   --disable-null          Null module (default enabled)"
40 ac_help="$ac_help
41   --disable-rc            rc module (default enabled)"
42 ac_help="$ac_help
43   --disable-dsp           Linux /dev/dsp support (default enabled)"
44 ac_help="$ac_help
45   --enable-esd            Esound library support (default disabled)"
46 ac_help="$ac_help
47   --enable-darwin         Darwin sound support (default disabled)"
48 ac_help="$ac_help
49   --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)"
50 ac_help="$ac_help
51   --disable-qnx           QNX RTOS support (default enabled in QNX RTOS)"
52 ac_help="$ac_help
53   --enable-fb             Linux framebuffer support (default disabled)"
54 ac_help="$ac_help
55   --with-ggi[=name]       GGI support (default disabled)"
56 ac_help="$ac_help
57   --disable-sdl           SDL support (default enabled)"
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/main.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 VLC_VERSION=0.2.81
638
639 LIBDVDCSS_VERSION=0.0.2
640
641 VLC_CODENAME=Ourumov
642
643
644 save_CFLAGS="${CFLAGS}"
645
646 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
647 echo "configure:648: checking whether ${MAKE-make} sets \${MAKE}" >&5
648 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
649 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
650   echo $ac_n "(cached) $ac_c" 1>&6
651 else
652   cat > conftestmake <<\EOF
653 all:
654         @echo 'ac_maketemp="${MAKE}"'
655 EOF
656 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
657 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
658 if test -n "$ac_maketemp"; then
659   eval ac_cv_prog_make_${ac_make}_set=yes
660 else
661   eval ac_cv_prog_make_${ac_make}_set=no
662 fi
663 rm -f conftestmake
664 fi
665 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
666   echo "$ac_t""yes" 1>&6
667   SET_MAKE=
668 else
669   echo "$ac_t""no" 1>&6
670   SET_MAKE="MAKE=${MAKE-make}"
671 fi
672
673 # Extract the first word of "gcc", so it can be a program name with args.
674 set dummy gcc; ac_word=$2
675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
676 echo "configure:677: checking for $ac_word" >&5
677 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
678   echo $ac_n "(cached) $ac_c" 1>&6
679 else
680   if test -n "$CC"; then
681   ac_cv_prog_CC="$CC" # Let the user override the test.
682 else
683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
684   ac_dummy="$PATH"
685   for ac_dir in $ac_dummy; do
686     test -z "$ac_dir" && ac_dir=.
687     if test -f $ac_dir/$ac_word; then
688       ac_cv_prog_CC="gcc"
689       break
690     fi
691   done
692   IFS="$ac_save_ifs"
693 fi
694 fi
695 CC="$ac_cv_prog_CC"
696 if test -n "$CC"; then
697   echo "$ac_t""$CC" 1>&6
698 else
699   echo "$ac_t""no" 1>&6
700 fi
701
702 if test -z "$CC"; then
703   # Extract the first word of "cc", so it can be a program name with args.
704 set dummy cc; ac_word=$2
705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
706 echo "configure:707: checking for $ac_word" >&5
707 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
708   echo $ac_n "(cached) $ac_c" 1>&6
709 else
710   if test -n "$CC"; then
711   ac_cv_prog_CC="$CC" # Let the user override the test.
712 else
713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
714   ac_prog_rejected=no
715   ac_dummy="$PATH"
716   for ac_dir in $ac_dummy; do
717     test -z "$ac_dir" && ac_dir=.
718     if test -f $ac_dir/$ac_word; then
719       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
720         ac_prog_rejected=yes
721         continue
722       fi
723       ac_cv_prog_CC="cc"
724       break
725     fi
726   done
727   IFS="$ac_save_ifs"
728 if test $ac_prog_rejected = yes; then
729   # We found a bogon in the path, so make sure we never use it.
730   set dummy $ac_cv_prog_CC
731   shift
732   if test $# -gt 0; then
733     # We chose a different compiler from the bogus one.
734     # However, it has the same basename, so the bogon will be chosen
735     # first if we set CC to just the basename; use the full file name.
736     shift
737     set dummy "$ac_dir/$ac_word" "$@"
738     shift
739     ac_cv_prog_CC="$@"
740   fi
741 fi
742 fi
743 fi
744 CC="$ac_cv_prog_CC"
745 if test -n "$CC"; then
746   echo "$ac_t""$CC" 1>&6
747 else
748   echo "$ac_t""no" 1>&6
749 fi
750
751   if test -z "$CC"; then
752     case "`uname -s`" in
753     *win32* | *WIN32*)
754       # Extract the first word of "cl", so it can be a program name with args.
755 set dummy cl; ac_word=$2
756 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
757 echo "configure:758: checking for $ac_word" >&5
758 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
759   echo $ac_n "(cached) $ac_c" 1>&6
760 else
761   if test -n "$CC"; then
762   ac_cv_prog_CC="$CC" # Let the user override the test.
763 else
764   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
765   ac_dummy="$PATH"
766   for ac_dir in $ac_dummy; do
767     test -z "$ac_dir" && ac_dir=.
768     if test -f $ac_dir/$ac_word; then
769       ac_cv_prog_CC="cl"
770       break
771     fi
772   done
773   IFS="$ac_save_ifs"
774 fi
775 fi
776 CC="$ac_cv_prog_CC"
777 if test -n "$CC"; then
778   echo "$ac_t""$CC" 1>&6
779 else
780   echo "$ac_t""no" 1>&6
781 fi
782  ;;
783     esac
784   fi
785   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
786 fi
787
788 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
789 echo "configure:790: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
790
791 ac_ext=c
792 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
793 ac_cpp='$CPP $CPPFLAGS'
794 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
795 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
796 cross_compiling=$ac_cv_prog_cc_cross
797
798 cat > conftest.$ac_ext << EOF
799
800 #line 801 "configure"
801 #include "confdefs.h"
802
803 main(){return(0);}
804 EOF
805 if { (eval echo configure:806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
806   ac_cv_prog_cc_works=yes
807   # If we can't run a trivial program, we are probably using a cross compiler.
808   if (./conftest; exit) 2>/dev/null; then
809     ac_cv_prog_cc_cross=no
810   else
811     ac_cv_prog_cc_cross=yes
812   fi
813 else
814   echo "configure: failed program was:" >&5
815   cat conftest.$ac_ext >&5
816   ac_cv_prog_cc_works=no
817 fi
818 rm -fr conftest*
819 ac_ext=c
820 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
821 ac_cpp='$CPP $CPPFLAGS'
822 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
823 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
824 cross_compiling=$ac_cv_prog_cc_cross
825
826 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
827 if test $ac_cv_prog_cc_works = no; then
828   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
829 fi
830 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
831 echo "configure:832: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
832 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
833 cross_compiling=$ac_cv_prog_cc_cross
834
835 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
836 echo "configure:837: checking whether we are using GNU C" >&5
837 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
838   echo $ac_n "(cached) $ac_c" 1>&6
839 else
840   cat > conftest.c <<EOF
841 #ifdef __GNUC__
842   yes;
843 #endif
844 EOF
845 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
846   ac_cv_prog_gcc=yes
847 else
848   ac_cv_prog_gcc=no
849 fi
850 fi
851
852 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
853
854 if test $ac_cv_prog_gcc = yes; then
855   GCC=yes
856 else
857   GCC=
858 fi
859
860 ac_test_CFLAGS="${CFLAGS+set}"
861 ac_save_CFLAGS="$CFLAGS"
862 CFLAGS=
863 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
864 echo "configure:865: checking whether ${CC-cc} accepts -g" >&5
865 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
866   echo $ac_n "(cached) $ac_c" 1>&6
867 else
868   echo 'void f(){}' > conftest.c
869 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
870   ac_cv_prog_cc_g=yes
871 else
872   ac_cv_prog_cc_g=no
873 fi
874 rm -f conftest*
875
876 fi
877
878 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
879 if test "$ac_test_CFLAGS" = set; then
880   CFLAGS="$ac_save_CFLAGS"
881 elif test $ac_cv_prog_cc_g = yes; then
882   if test "$GCC" = yes; then
883     CFLAGS="-g -O2"
884   else
885     CFLAGS="-g"
886   fi
887 else
888   if test "$GCC" = yes; then
889     CFLAGS="-O2"
890   else
891     CFLAGS=
892   fi
893 fi
894
895 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
896 echo "configure:897: checking how to run the C preprocessor" >&5
897 # On Suns, sometimes $CPP names a directory.
898 if test -n "$CPP" && test -d "$CPP"; then
899   CPP=
900 fi
901 if test -z "$CPP"; then
902 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
903   echo $ac_n "(cached) $ac_c" 1>&6
904 else
905     # This must be in double quotes, not single quotes, because CPP may get
906   # substituted into the Makefile and "${CC-cc}" will confuse make.
907   CPP="${CC-cc} -E"
908   # On the NeXT, cc -E runs the code through the compiler's parser,
909   # not just through cpp.
910   cat > conftest.$ac_ext <<EOF
911 #line 912 "configure"
912 #include "confdefs.h"
913 #include <assert.h>
914 Syntax Error
915 EOF
916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
917 { (eval echo configure:918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
919 if test -z "$ac_err"; then
920   :
921 else
922   echo "$ac_err" >&5
923   echo "configure: failed program was:" >&5
924   cat conftest.$ac_ext >&5
925   rm -rf conftest*
926   CPP="${CC-cc} -E -traditional-cpp"
927   cat > conftest.$ac_ext <<EOF
928 #line 929 "configure"
929 #include "confdefs.h"
930 #include <assert.h>
931 Syntax Error
932 EOF
933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
934 { (eval echo configure:935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
936 if test -z "$ac_err"; then
937   :
938 else
939   echo "$ac_err" >&5
940   echo "configure: failed program was:" >&5
941   cat conftest.$ac_ext >&5
942   rm -rf conftest*
943   CPP="${CC-cc} -nologo -E"
944   cat > conftest.$ac_ext <<EOF
945 #line 946 "configure"
946 #include "confdefs.h"
947 #include <assert.h>
948 Syntax Error
949 EOF
950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
951 { (eval echo configure:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
952 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
953 if test -z "$ac_err"; then
954   :
955 else
956   echo "$ac_err" >&5
957   echo "configure: failed program was:" >&5
958   cat conftest.$ac_ext >&5
959   rm -rf conftest*
960   CPP=/lib/cpp
961 fi
962 rm -f conftest*
963 fi
964 rm -f conftest*
965 fi
966 rm -f conftest*
967   ac_cv_prog_CPP="$CPP"
968 fi
969   CPP="$ac_cv_prog_CPP"
970 else
971   ac_cv_prog_CPP="$CPP"
972 fi
973 echo "$ac_t""$CPP" 1>&6
974
975 # Extract the first word of "ranlib", so it can be a program name with args.
976 set dummy ranlib; ac_word=$2
977 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
978 echo "configure:979: checking for $ac_word" >&5
979 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
980   echo $ac_n "(cached) $ac_c" 1>&6
981 else
982   if test -n "$RANLIB"; then
983   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
984 else
985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
986   ac_dummy="$PATH"
987   for ac_dir in $ac_dummy; do
988     test -z "$ac_dir" && ac_dir=.
989     if test -f $ac_dir/$ac_word; then
990       ac_cv_prog_RANLIB="ranlib"
991       break
992     fi
993   done
994   IFS="$ac_save_ifs"
995   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
996 fi
997 fi
998 RANLIB="$ac_cv_prog_RANLIB"
999 if test -n "$RANLIB"; then
1000   echo "$ac_t""$RANLIB" 1>&6
1001 else
1002   echo "$ac_t""no" 1>&6
1003 fi
1004
1005
1006 # Find a good install program.  We prefer a C program (faster),
1007 # so one script is as good as another.  But avoid the broken or
1008 # incompatible versions:
1009 # SysV /etc/install, /usr/sbin/install
1010 # SunOS /usr/etc/install
1011 # IRIX /sbin/install
1012 # AIX /bin/install
1013 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1014 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1015 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1016 # ./install, which can be erroneously created by make from ./install.sh.
1017 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1018 echo "configure:1019: checking for a BSD compatible install" >&5
1019 if test -z "$INSTALL"; then
1020 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1021   echo $ac_n "(cached) $ac_c" 1>&6
1022 else
1023     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1024   for ac_dir in $PATH; do
1025     # Account for people who put trailing slashes in PATH elements.
1026     case "$ac_dir/" in
1027     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1028     *)
1029       # OSF1 and SCO ODT 3.0 have their own names for install.
1030       # Don't use installbsd from OSF since it installs stuff as root
1031       # by default.
1032       for ac_prog in ginstall scoinst install; do
1033         if test -f $ac_dir/$ac_prog; then
1034           if test $ac_prog = install &&
1035             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1036             # AIX install.  It has an incompatible calling convention.
1037             :
1038           else
1039             ac_cv_path_install="$ac_dir/$ac_prog -c"
1040             break 2
1041           fi
1042         fi
1043       done
1044       ;;
1045     esac
1046   done
1047   IFS="$ac_save_IFS"
1048
1049 fi
1050   if test "${ac_cv_path_install+set}" = set; then
1051     INSTALL="$ac_cv_path_install"
1052   else
1053     # As a last resort, use the slow shell script.  We don't cache a
1054     # path for INSTALL within a source directory, because that will
1055     # break other packages using the cache if that directory is
1056     # removed, or if the path is relative.
1057     INSTALL="$ac_install_sh"
1058   fi
1059 fi
1060 echo "$ac_t""$INSTALL" 1>&6
1061
1062 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1063 # It thinks the first close brace ends the variable substitution.
1064 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1065
1066 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1067
1068 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1069
1070
1071 if test x${cross_compiling} != xyes; then
1072   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1073 echo "configure:1074: checking whether byte ordering is bigendian" >&5
1074 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1075   echo $ac_n "(cached) $ac_c" 1>&6
1076 else
1077   ac_cv_c_bigendian=unknown
1078 # See if sys/param.h defines the BYTE_ORDER macro.
1079 cat > conftest.$ac_ext <<EOF
1080 #line 1081 "configure"
1081 #include "confdefs.h"
1082 #include <sys/types.h>
1083 #include <sys/param.h>
1084 int main() {
1085
1086 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1087  bogus endian macros
1088 #endif
1089 ; return 0; }
1090 EOF
1091 if { (eval echo configure:1092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1092   rm -rf conftest*
1093   # It does; now see whether it defined to BIG_ENDIAN or not.
1094 cat > conftest.$ac_ext <<EOF
1095 #line 1096 "configure"
1096 #include "confdefs.h"
1097 #include <sys/types.h>
1098 #include <sys/param.h>
1099 int main() {
1100
1101 #if BYTE_ORDER != BIG_ENDIAN
1102  not big endian
1103 #endif
1104 ; return 0; }
1105 EOF
1106 if { (eval echo configure:1107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1107   rm -rf conftest*
1108   ac_cv_c_bigendian=yes
1109 else
1110   echo "configure: failed program was:" >&5
1111   cat conftest.$ac_ext >&5
1112   rm -rf conftest*
1113   ac_cv_c_bigendian=no
1114 fi
1115 rm -f conftest*
1116 else
1117   echo "configure: failed program was:" >&5
1118   cat conftest.$ac_ext >&5
1119 fi
1120 rm -f conftest*
1121 if test $ac_cv_c_bigendian = unknown; then
1122 if test "$cross_compiling" = yes; then
1123     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1124 else
1125   cat > conftest.$ac_ext <<EOF
1126 #line 1127 "configure"
1127 #include "confdefs.h"
1128 main () {
1129   /* Are we little or big endian?  From Harbison&Steele.  */
1130   union
1131   {
1132     long l;
1133     char c[sizeof (long)];
1134   } u;
1135   u.l = 1;
1136   exit (u.c[sizeof (long) - 1] == 1);
1137 }
1138 EOF
1139 if { (eval echo configure:1140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1140 then
1141   ac_cv_c_bigendian=no
1142 else
1143   echo "configure: failed program was:" >&5
1144   cat conftest.$ac_ext >&5
1145   rm -fr conftest*
1146   ac_cv_c_bigendian=yes
1147 fi
1148 rm -fr conftest*
1149 fi
1150
1151 fi
1152 fi
1153
1154 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1155 if test $ac_cv_c_bigendian = yes; then
1156   cat >> confdefs.h <<\EOF
1157 #define WORDS_BIGENDIAN 1
1158 EOF
1159
1160 fi
1161
1162 fi
1163
1164 for ac_func in gettimeofday select strerror strtod strtol
1165 do
1166 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1167 echo "configure:1168: checking for $ac_func" >&5
1168 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1169   echo $ac_n "(cached) $ac_c" 1>&6
1170 else
1171   cat > conftest.$ac_ext <<EOF
1172 #line 1173 "configure"
1173 #include "confdefs.h"
1174 /* System header to define __stub macros and hopefully few prototypes,
1175     which can conflict with char $ac_func(); below.  */
1176 #include <assert.h>
1177 /* Override any gcc2 internal prototype to avoid an error.  */
1178 /* We use char because int might match the return type of a gcc2
1179     builtin and then its argument prototype would still apply.  */
1180 char $ac_func();
1181
1182 int main() {
1183
1184 /* The GNU C library defines this for functions which it implements
1185     to always fail with ENOSYS.  Some functions are actually named
1186     something starting with __ and the normal name is an alias.  */
1187 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1188 choke me
1189 #else
1190 $ac_func();
1191 #endif
1192
1193 ; return 0; }
1194 EOF
1195 if { (eval echo configure:1196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1196   rm -rf conftest*
1197   eval "ac_cv_func_$ac_func=yes"
1198 else
1199   echo "configure: failed program was:" >&5
1200   cat conftest.$ac_ext >&5
1201   rm -rf conftest*
1202   eval "ac_cv_func_$ac_func=no"
1203 fi
1204 rm -f conftest*
1205 fi
1206
1207 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1208   echo "$ac_t""yes" 1>&6
1209     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1210   cat >> confdefs.h <<EOF
1211 #define $ac_tr_func 1
1212 EOF
1213  
1214 else
1215   echo "$ac_t""no" 1>&6
1216 fi
1217 done
1218
1219 for ac_func in setenv putenv
1220 do
1221 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1222 echo "configure:1223: checking for $ac_func" >&5
1223 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1224   echo $ac_n "(cached) $ac_c" 1>&6
1225 else
1226   cat > conftest.$ac_ext <<EOF
1227 #line 1228 "configure"
1228 #include "confdefs.h"
1229 /* System header to define __stub macros and hopefully few prototypes,
1230     which can conflict with char $ac_func(); below.  */
1231 #include <assert.h>
1232 /* Override any gcc2 internal prototype to avoid an error.  */
1233 /* We use char because int might match the return type of a gcc2
1234     builtin and then its argument prototype would still apply.  */
1235 char $ac_func();
1236
1237 int main() {
1238
1239 /* The GNU C library defines this for functions which it implements
1240     to always fail with ENOSYS.  Some functions are actually named
1241     something starting with __ and the normal name is an alias.  */
1242 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1243 choke me
1244 #else
1245 $ac_func();
1246 #endif
1247
1248 ; return 0; }
1249 EOF
1250 if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1251   rm -rf conftest*
1252   eval "ac_cv_func_$ac_func=yes"
1253 else
1254   echo "configure: failed program was:" >&5
1255   cat conftest.$ac_ext >&5
1256   rm -rf conftest*
1257   eval "ac_cv_func_$ac_func=no"
1258 fi
1259 rm -f conftest*
1260 fi
1261
1262 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1263   echo "$ac_t""yes" 1>&6
1264     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1265   cat >> confdefs.h <<EOF
1266 #define $ac_tr_func 1
1267 EOF
1268  
1269 else
1270   echo "$ac_t""no" 1>&6
1271 fi
1272 done
1273
1274 echo $ac_n "checking for connect""... $ac_c" 1>&6
1275 echo "configure:1276: checking for connect" >&5
1276 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1277   echo $ac_n "(cached) $ac_c" 1>&6
1278 else
1279   cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282 /* System header to define __stub macros and hopefully few prototypes,
1283     which can conflict with char connect(); below.  */
1284 #include <assert.h>
1285 /* Override any gcc2 internal prototype to avoid an error.  */
1286 /* We use char because int might match the return type of a gcc2
1287     builtin and then its argument prototype would still apply.  */
1288 char connect();
1289
1290 int main() {
1291
1292 /* The GNU C library defines this for functions which it implements
1293     to always fail with ENOSYS.  Some functions are actually named
1294     something starting with __ and the normal name is an alias.  */
1295 #if defined (__stub_connect) || defined (__stub___connect)
1296 choke me
1297 #else
1298 connect();
1299 #endif
1300
1301 ; return 0; }
1302 EOF
1303 if { (eval echo configure:1304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1304   rm -rf conftest*
1305   eval "ac_cv_func_connect=yes"
1306 else
1307   echo "configure: failed program was:" >&5
1308   cat conftest.$ac_ext >&5
1309   rm -rf conftest*
1310   eval "ac_cv_func_connect=no"
1311 fi
1312 rm -f conftest*
1313 fi
1314
1315 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1316   echo "$ac_t""yes" 1>&6
1317   :
1318 else
1319   echo "$ac_t""no" 1>&6
1320
1321   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1322 echo "configure:1323: checking for connect in -lsocket" >&5
1323 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1324 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1325   echo $ac_n "(cached) $ac_c" 1>&6
1326 else
1327   ac_save_LIBS="$LIBS"
1328 LIBS="-lsocket  $LIBS"
1329 cat > conftest.$ac_ext <<EOF
1330 #line 1331 "configure"
1331 #include "confdefs.h"
1332 /* Override any gcc2 internal prototype to avoid an error.  */
1333 /* We use char because int might match the return type of a gcc2
1334     builtin and then its argument prototype would still apply.  */
1335 char connect();
1336
1337 int main() {
1338 connect()
1339 ; return 0; }
1340 EOF
1341 if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1342   rm -rf conftest*
1343   eval "ac_cv_lib_$ac_lib_var=yes"
1344 else
1345   echo "configure: failed program was:" >&5
1346   cat conftest.$ac_ext >&5
1347   rm -rf conftest*
1348   eval "ac_cv_lib_$ac_lib_var=no"
1349 fi
1350 rm -f conftest*
1351 LIBS="$ac_save_LIBS"
1352
1353 fi
1354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1355   echo "$ac_t""yes" 1>&6
1356   LIB="${LIB} -lsocket"
1357 else
1358   echo "$ac_t""no" 1>&6
1359 fi
1360
1361
1362 fi
1363
1364 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1365 echo "configure:1366: checking for gethostbyname" >&5
1366 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1367   echo $ac_n "(cached) $ac_c" 1>&6
1368 else
1369   cat > conftest.$ac_ext <<EOF
1370 #line 1371 "configure"
1371 #include "confdefs.h"
1372 /* System header to define __stub macros and hopefully few prototypes,
1373     which can conflict with char gethostbyname(); below.  */
1374 #include <assert.h>
1375 /* Override any gcc2 internal prototype to avoid an error.  */
1376 /* We use char because int might match the return type of a gcc2
1377     builtin and then its argument prototype would still apply.  */
1378 char gethostbyname();
1379
1380 int main() {
1381
1382 /* The GNU C library defines this for functions which it implements
1383     to always fail with ENOSYS.  Some functions are actually named
1384     something starting with __ and the normal name is an alias.  */
1385 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1386 choke me
1387 #else
1388 gethostbyname();
1389 #endif
1390
1391 ; return 0; }
1392 EOF
1393 if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1394   rm -rf conftest*
1395   eval "ac_cv_func_gethostbyname=yes"
1396 else
1397   echo "configure: failed program was:" >&5
1398   cat conftest.$ac_ext >&5
1399   rm -rf conftest*
1400   eval "ac_cv_func_gethostbyname=no"
1401 fi
1402 rm -f conftest*
1403 fi
1404
1405 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1406   echo "$ac_t""yes" 1>&6
1407   :
1408 else
1409   echo "$ac_t""no" 1>&6
1410
1411   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1412 echo "configure:1413: checking for gethostbyname in -lnsl" >&5
1413 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1415   echo $ac_n "(cached) $ac_c" 1>&6
1416 else
1417   ac_save_LIBS="$LIBS"
1418 LIBS="-lnsl  $LIBS"
1419 cat > conftest.$ac_ext <<EOF
1420 #line 1421 "configure"
1421 #include "confdefs.h"
1422 /* Override any gcc2 internal prototype to avoid an error.  */
1423 /* We use char because int might match the return type of a gcc2
1424     builtin and then its argument prototype would still apply.  */
1425 char gethostbyname();
1426
1427 int main() {
1428 gethostbyname()
1429 ; return 0; }
1430 EOF
1431 if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1432   rm -rf conftest*
1433   eval "ac_cv_lib_$ac_lib_var=yes"
1434 else
1435   echo "configure: failed program was:" >&5
1436   cat conftest.$ac_ext >&5
1437   rm -rf conftest*
1438   eval "ac_cv_lib_$ac_lib_var=no"
1439 fi
1440 rm -f conftest*
1441 LIBS="$ac_save_LIBS"
1442
1443 fi
1444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1445   echo "$ac_t""yes" 1>&6
1446   LIB="${LIB} -lnsl"
1447 else
1448   echo "$ac_t""no" 1>&6
1449 fi
1450
1451
1452 fi
1453
1454 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
1455 echo "configure:1456: checking for nanosleep" >&5
1456 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
1457   echo $ac_n "(cached) $ac_c" 1>&6
1458 else
1459   cat > conftest.$ac_ext <<EOF
1460 #line 1461 "configure"
1461 #include "confdefs.h"
1462 /* System header to define __stub macros and hopefully few prototypes,
1463     which can conflict with char nanosleep(); below.  */
1464 #include <assert.h>
1465 /* Override any gcc2 internal prototype to avoid an error.  */
1466 /* We use char because int might match the return type of a gcc2
1467     builtin and then its argument prototype would still apply.  */
1468 char nanosleep();
1469
1470 int main() {
1471
1472 /* The GNU C library defines this for functions which it implements
1473     to always fail with ENOSYS.  Some functions are actually named
1474     something starting with __ and the normal name is an alias.  */
1475 #if defined (__stub_nanosleep) || defined (__stub___nanosleep)
1476 choke me
1477 #else
1478 nanosleep();
1479 #endif
1480
1481 ; return 0; }
1482 EOF
1483 if { (eval echo configure:1484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1484   rm -rf conftest*
1485   eval "ac_cv_func_nanosleep=yes"
1486 else
1487   echo "configure: failed program was:" >&5
1488   cat conftest.$ac_ext >&5
1489   rm -rf conftest*
1490   eval "ac_cv_func_nanosleep=no"
1491 fi
1492 rm -f conftest*
1493 fi
1494
1495 if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
1496   echo "$ac_t""yes" 1>&6
1497   :
1498 else
1499   echo "$ac_t""no" 1>&6
1500
1501   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
1502 echo "configure:1503: checking for nanosleep in -lrt" >&5
1503 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
1504 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1505   echo $ac_n "(cached) $ac_c" 1>&6
1506 else
1507   ac_save_LIBS="$LIBS"
1508 LIBS="-lrt  $LIBS"
1509 cat > conftest.$ac_ext <<EOF
1510 #line 1511 "configure"
1511 #include "confdefs.h"
1512 /* Override any gcc2 internal prototype to avoid an error.  */
1513 /* We use char because int might match the return type of a gcc2
1514     builtin and then its argument prototype would still apply.  */
1515 char nanosleep();
1516
1517 int main() {
1518 nanosleep()
1519 ; return 0; }
1520 EOF
1521 if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1522   rm -rf conftest*
1523   eval "ac_cv_lib_$ac_lib_var=yes"
1524 else
1525   echo "configure: failed program was:" >&5
1526   cat conftest.$ac_ext >&5
1527   rm -rf conftest*
1528   eval "ac_cv_lib_$ac_lib_var=no"
1529 fi
1530 rm -f conftest*
1531 LIBS="$ac_save_LIBS"
1532
1533 fi
1534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1535   echo "$ac_t""yes" 1>&6
1536   LIB="${LIB} -lrt"
1537 else
1538   echo "$ac_t""no" 1>&6
1539
1540     echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
1541 echo "configure:1542: checking for nanosleep in -lposix4" >&5
1542 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
1543 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1544   echo $ac_n "(cached) $ac_c" 1>&6
1545 else
1546   ac_save_LIBS="$LIBS"
1547 LIBS="-lposix4  $LIBS"
1548 cat > conftest.$ac_ext <<EOF
1549 #line 1550 "configure"
1550 #include "confdefs.h"
1551 /* Override any gcc2 internal prototype to avoid an error.  */
1552 /* We use char because int might match the return type of a gcc2
1553     builtin and then its argument prototype would still apply.  */
1554 char nanosleep();
1555
1556 int main() {
1557 nanosleep()
1558 ; return 0; }
1559 EOF
1560 if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1561   rm -rf conftest*
1562   eval "ac_cv_lib_$ac_lib_var=yes"
1563 else
1564   echo "configure: failed program was:" >&5
1565   cat conftest.$ac_ext >&5
1566   rm -rf conftest*
1567   eval "ac_cv_lib_$ac_lib_var=no"
1568 fi
1569 rm -f conftest*
1570 LIBS="$ac_save_LIBS"
1571
1572 fi
1573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1574   echo "$ac_t""yes" 1>&6
1575   LIB="${LIB} -lposix4"
1576 else
1577   echo "$ac_t""no" 1>&6
1578 fi
1579
1580   
1581 fi
1582
1583
1584 fi
1585
1586 for ac_func in usleep
1587 do
1588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1589 echo "configure:1590: checking for $ac_func" >&5
1590 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1591   echo $ac_n "(cached) $ac_c" 1>&6
1592 else
1593   cat > conftest.$ac_ext <<EOF
1594 #line 1595 "configure"
1595 #include "confdefs.h"
1596 /* System header to define __stub macros and hopefully few prototypes,
1597     which can conflict with char $ac_func(); below.  */
1598 #include <assert.h>
1599 /* Override any gcc2 internal prototype to avoid an error.  */
1600 /* We use char because int might match the return type of a gcc2
1601     builtin and then its argument prototype would still apply.  */
1602 char $ac_func();
1603
1604 int main() {
1605
1606 /* The GNU C library defines this for functions which it implements
1607     to always fail with ENOSYS.  Some functions are actually named
1608     something starting with __ and the normal name is an alias.  */
1609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1610 choke me
1611 #else
1612 $ac_func();
1613 #endif
1614
1615 ; return 0; }
1616 EOF
1617 if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1618   rm -rf conftest*
1619   eval "ac_cv_func_$ac_func=yes"
1620 else
1621   echo "configure: failed program was:" >&5
1622   cat conftest.$ac_ext >&5
1623   rm -rf conftest*
1624   eval "ac_cv_func_$ac_func=no"
1625 fi
1626 rm -f conftest*
1627 fi
1628
1629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1630   echo "$ac_t""yes" 1>&6
1631     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1632   cat >> confdefs.h <<EOF
1633 #define $ac_tr_func 1
1634 EOF
1635  
1636 else
1637   echo "$ac_t""no" 1>&6
1638 fi
1639 done
1640
1641 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
1642 echo "configure:1643: checking for inet_aton" >&5
1643 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
1644   echo $ac_n "(cached) $ac_c" 1>&6
1645 else
1646   cat > conftest.$ac_ext <<EOF
1647 #line 1648 "configure"
1648 #include "confdefs.h"
1649 /* System header to define __stub macros and hopefully few prototypes,
1650     which can conflict with char inet_aton(); below.  */
1651 #include <assert.h>
1652 /* Override any gcc2 internal prototype to avoid an error.  */
1653 /* We use char because int might match the return type of a gcc2
1654     builtin and then its argument prototype would still apply.  */
1655 char inet_aton();
1656
1657 int main() {
1658
1659 /* The GNU C library defines this for functions which it implements
1660     to always fail with ENOSYS.  Some functions are actually named
1661     something starting with __ and the normal name is an alias.  */
1662 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
1663 choke me
1664 #else
1665 inet_aton();
1666 #endif
1667
1668 ; return 0; }
1669 EOF
1670 if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1671   rm -rf conftest*
1672   eval "ac_cv_func_inet_aton=yes"
1673 else
1674   echo "configure: failed program was:" >&5
1675   cat conftest.$ac_ext >&5
1676   rm -rf conftest*
1677   eval "ac_cv_func_inet_aton=no"
1678 fi
1679 rm -f conftest*
1680 fi
1681
1682 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
1683   echo "$ac_t""yes" 1>&6
1684   :
1685 else
1686   echo "$ac_t""no" 1>&6
1687
1688   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
1689 echo "configure:1690: checking for inet_aton in -lresolv" >&5
1690 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
1691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1692   echo $ac_n "(cached) $ac_c" 1>&6
1693 else
1694   ac_save_LIBS="$LIBS"
1695 LIBS="-lresolv  $LIBS"
1696 cat > conftest.$ac_ext <<EOF
1697 #line 1698 "configure"
1698 #include "confdefs.h"
1699 /* Override any gcc2 internal prototype to avoid an error.  */
1700 /* We use char because int might match the return type of a gcc2
1701     builtin and then its argument prototype would still apply.  */
1702 char inet_aton();
1703
1704 int main() {
1705 inet_aton()
1706 ; return 0; }
1707 EOF
1708 if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1709   rm -rf conftest*
1710   eval "ac_cv_lib_$ac_lib_var=yes"
1711 else
1712   echo "configure: failed program was:" >&5
1713   cat conftest.$ac_ext >&5
1714   rm -rf conftest*
1715   eval "ac_cv_lib_$ac_lib_var=no"
1716 fi
1717 rm -f conftest*
1718 LIBS="$ac_save_LIBS"
1719
1720 fi
1721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1722   echo "$ac_t""yes" 1>&6
1723   LIB="${LIB} -lresolv"
1724 else
1725   echo "$ac_t""no" 1>&6
1726 fi
1727
1728
1729 fi
1730
1731 for ac_func in vasprintf
1732 do
1733 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1734 echo "configure:1735: checking for $ac_func" >&5
1735 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1736   echo $ac_n "(cached) $ac_c" 1>&6
1737 else
1738   cat > conftest.$ac_ext <<EOF
1739 #line 1740 "configure"
1740 #include "confdefs.h"
1741 /* System header to define __stub macros and hopefully few prototypes,
1742     which can conflict with char $ac_func(); below.  */
1743 #include <assert.h>
1744 /* Override any gcc2 internal prototype to avoid an error.  */
1745 /* We use char because int might match the return type of a gcc2
1746     builtin and then its argument prototype would still apply.  */
1747 char $ac_func();
1748
1749 int main() {
1750
1751 /* The GNU C library defines this for functions which it implements
1752     to always fail with ENOSYS.  Some functions are actually named
1753     something starting with __ and the normal name is an alias.  */
1754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1755 choke me
1756 #else
1757 $ac_func();
1758 #endif
1759
1760 ; return 0; }
1761 EOF
1762 if { (eval echo configure:1763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1763   rm -rf conftest*
1764   eval "ac_cv_func_$ac_func=yes"
1765 else
1766   echo "configure: failed program was:" >&5
1767   cat conftest.$ac_ext >&5
1768   rm -rf conftest*
1769   eval "ac_cv_func_$ac_func=no"
1770 fi
1771 rm -f conftest*
1772 fi
1773
1774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1775   echo "$ac_t""yes" 1>&6
1776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1777   cat >> confdefs.h <<EOF
1778 #define $ac_tr_func 1
1779 EOF
1780  
1781 else
1782   echo "$ac_t""no" 1>&6
1783 fi
1784 done
1785
1786 for ac_func in swab
1787 do
1788 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1789 echo "configure:1790: checking for $ac_func" >&5
1790 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1791   echo $ac_n "(cached) $ac_c" 1>&6
1792 else
1793   cat > conftest.$ac_ext <<EOF
1794 #line 1795 "configure"
1795 #include "confdefs.h"
1796 /* System header to define __stub macros and hopefully few prototypes,
1797     which can conflict with char $ac_func(); below.  */
1798 #include <assert.h>
1799 /* Override any gcc2 internal prototype to avoid an error.  */
1800 /* We use char because int might match the return type of a gcc2
1801     builtin and then its argument prototype would still apply.  */
1802 char $ac_func();
1803
1804 int main() {
1805
1806 /* The GNU C library defines this for functions which it implements
1807     to always fail with ENOSYS.  Some functions are actually named
1808     something starting with __ and the normal name is an alias.  */
1809 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1810 choke me
1811 #else
1812 $ac_func();
1813 #endif
1814
1815 ; return 0; }
1816 EOF
1817 if { (eval echo configure:1818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1818   rm -rf conftest*
1819   eval "ac_cv_func_$ac_func=yes"
1820 else
1821   echo "configure: failed program was:" >&5
1822   cat conftest.$ac_ext >&5
1823   rm -rf conftest*
1824   eval "ac_cv_func_$ac_func=no"
1825 fi
1826 rm -f conftest*
1827 fi
1828
1829 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1830   echo "$ac_t""yes" 1>&6
1831     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1832   cat >> confdefs.h <<EOF
1833 #define $ac_tr_func 1
1834 EOF
1835  
1836 else
1837   echo "$ac_t""no" 1>&6
1838 fi
1839 done
1840
1841
1842 for ac_func in sigrelse
1843 do
1844 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1845 echo "configure:1846: checking for $ac_func" >&5
1846 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1847   echo $ac_n "(cached) $ac_c" 1>&6
1848 else
1849   cat > conftest.$ac_ext <<EOF
1850 #line 1851 "configure"
1851 #include "confdefs.h"
1852 /* System header to define __stub macros and hopefully few prototypes,
1853     which can conflict with char $ac_func(); below.  */
1854 #include <assert.h>
1855 /* Override any gcc2 internal prototype to avoid an error.  */
1856 /* We use char because int might match the return type of a gcc2
1857     builtin and then its argument prototype would still apply.  */
1858 char $ac_func();
1859
1860 int main() {
1861
1862 /* The GNU C library defines this for functions which it implements
1863     to always fail with ENOSYS.  Some functions are actually named
1864     something starting with __ and the normal name is an alias.  */
1865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1866 choke me
1867 #else
1868 $ac_func();
1869 #endif
1870
1871 ; return 0; }
1872 EOF
1873 if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1874   rm -rf conftest*
1875   eval "ac_cv_func_$ac_func=yes"
1876 else
1877   echo "configure: failed program was:" >&5
1878   cat conftest.$ac_ext >&5
1879   rm -rf conftest*
1880   eval "ac_cv_func_$ac_func=no"
1881 fi
1882 rm -f conftest*
1883 fi
1884
1885 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1886   echo "$ac_t""yes" 1>&6
1887     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1888   cat >> confdefs.h <<EOF
1889 #define $ac_tr_func 1
1890 EOF
1891  
1892 else
1893   echo "$ac_t""no" 1>&6
1894 fi
1895 done
1896
1897
1898 GETOPT=0
1899 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
1900 echo "configure:1901: checking for getopt_long" >&5
1901 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
1902   echo $ac_n "(cached) $ac_c" 1>&6
1903 else
1904   cat > conftest.$ac_ext <<EOF
1905 #line 1906 "configure"
1906 #include "confdefs.h"
1907 /* System header to define __stub macros and hopefully few prototypes,
1908     which can conflict with char getopt_long(); below.  */
1909 #include <assert.h>
1910 /* Override any gcc2 internal prototype to avoid an error.  */
1911 /* We use char because int might match the return type of a gcc2
1912     builtin and then its argument prototype would still apply.  */
1913 char getopt_long();
1914
1915 int main() {
1916
1917 /* The GNU C library defines this for functions which it implements
1918     to always fail with ENOSYS.  Some functions are actually named
1919     something starting with __ and the normal name is an alias.  */
1920 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
1921 choke me
1922 #else
1923 getopt_long();
1924 #endif
1925
1926 ; return 0; }
1927 EOF
1928 if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1929   rm -rf conftest*
1930   eval "ac_cv_func_getopt_long=yes"
1931 else
1932   echo "configure: failed program was:" >&5
1933   cat conftest.$ac_ext >&5
1934   rm -rf conftest*
1935   eval "ac_cv_func_getopt_long=no"
1936 fi
1937 rm -f conftest*
1938 fi
1939
1940 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
1941   echo "$ac_t""yes" 1>&6
1942   cat >> confdefs.h <<\EOF
1943 #define HAVE_GETOPT_LONG 1
1944 EOF
1945
1946 else
1947   echo "$ac_t""no" 1>&6
1948  # FreeBSD has a gnugetopt library for this:
1949   echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
1950 echo "configure:1951: checking for getopt_long in -lgnugetopt" >&5
1951 ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
1952 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1953   echo $ac_n "(cached) $ac_c" 1>&6
1954 else
1955   ac_save_LIBS="$LIBS"
1956 LIBS="-lgnugetopt  $LIBS"
1957 cat > conftest.$ac_ext <<EOF
1958 #line 1959 "configure"
1959 #include "confdefs.h"
1960 /* Override any gcc2 internal prototype to avoid an error.  */
1961 /* We use char because int might match the return type of a gcc2
1962     builtin and then its argument prototype would still apply.  */
1963 char getopt_long();
1964
1965 int main() {
1966 getopt_long()
1967 ; return 0; }
1968 EOF
1969 if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1970   rm -rf conftest*
1971   eval "ac_cv_lib_$ac_lib_var=yes"
1972 else
1973   echo "configure: failed program was:" >&5
1974   cat conftest.$ac_ext >&5
1975   rm -rf conftest*
1976   eval "ac_cv_lib_$ac_lib_var=no"
1977 fi
1978 rm -f conftest*
1979 LIBS="$ac_save_LIBS"
1980
1981 fi
1982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1983   echo "$ac_t""yes" 1>&6
1984   cat >> confdefs.h <<\EOF
1985 #define HAVE_GETOPT_LONG 1
1986 EOF
1987  LIB="${LIB} -lgnugetopt"
1988 else
1989   echo "$ac_t""no" 1>&6
1990 GETOPT=1
1991 fi
1992
1993 fi
1994
1995
1996 for ac_hdr in unistd.h
1997 do
1998 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1999 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2000 echo "configure:2001: checking for $ac_hdr" >&5
2001 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2002   echo $ac_n "(cached) $ac_c" 1>&6
2003 else
2004   cat > conftest.$ac_ext <<EOF
2005 #line 2006 "configure"
2006 #include "confdefs.h"
2007 #include <$ac_hdr>
2008 EOF
2009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2010 { (eval echo configure:2011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2012 if test -z "$ac_err"; then
2013   rm -rf conftest*
2014   eval "ac_cv_header_$ac_safe=yes"
2015 else
2016   echo "$ac_err" >&5
2017   echo "configure: failed program was:" >&5
2018   cat conftest.$ac_ext >&5
2019   rm -rf conftest*
2020   eval "ac_cv_header_$ac_safe=no"
2021 fi
2022 rm -f conftest*
2023 fi
2024 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2025   echo "$ac_t""yes" 1>&6
2026     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2027   cat >> confdefs.h <<EOF
2028 #define $ac_tr_hdr 1
2029 EOF
2030  
2031 else
2032   echo "$ac_t""no" 1>&6
2033 fi
2034 done
2035
2036 for ac_func in getpagesize
2037 do
2038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2039 echo "configure:2040: checking for $ac_func" >&5
2040 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2041   echo $ac_n "(cached) $ac_c" 1>&6
2042 else
2043   cat > conftest.$ac_ext <<EOF
2044 #line 2045 "configure"
2045 #include "confdefs.h"
2046 /* System header to define __stub macros and hopefully few prototypes,
2047     which can conflict with char $ac_func(); below.  */
2048 #include <assert.h>
2049 /* Override any gcc2 internal prototype to avoid an error.  */
2050 /* We use char because int might match the return type of a gcc2
2051     builtin and then its argument prototype would still apply.  */
2052 char $ac_func();
2053
2054 int main() {
2055
2056 /* The GNU C library defines this for functions which it implements
2057     to always fail with ENOSYS.  Some functions are actually named
2058     something starting with __ and the normal name is an alias.  */
2059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2060 choke me
2061 #else
2062 $ac_func();
2063 #endif
2064
2065 ; return 0; }
2066 EOF
2067 if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2068   rm -rf conftest*
2069   eval "ac_cv_func_$ac_func=yes"
2070 else
2071   echo "configure: failed program was:" >&5
2072   cat conftest.$ac_ext >&5
2073   rm -rf conftest*
2074   eval "ac_cv_func_$ac_func=no"
2075 fi
2076 rm -f conftest*
2077 fi
2078
2079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2080   echo "$ac_t""yes" 1>&6
2081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2082   cat >> confdefs.h <<EOF
2083 #define $ac_tr_func 1
2084 EOF
2085  
2086 else
2087   echo "$ac_t""no" 1>&6
2088 fi
2089 done
2090
2091 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2092 echo "configure:2093: checking for working mmap" >&5
2093 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2094   echo $ac_n "(cached) $ac_c" 1>&6
2095 else
2096   if test "$cross_compiling" = yes; then
2097   ac_cv_func_mmap_fixed_mapped=no
2098 else
2099   cat > conftest.$ac_ext <<EOF
2100 #line 2101 "configure"
2101 #include "confdefs.h"
2102
2103 /* Thanks to Mike Haertel and Jim Avera for this test.
2104    Here is a matrix of mmap possibilities:
2105         mmap private not fixed
2106         mmap private fixed at somewhere currently unmapped
2107         mmap private fixed at somewhere already mapped
2108         mmap shared not fixed
2109         mmap shared fixed at somewhere currently unmapped
2110         mmap shared fixed at somewhere already mapped
2111    For private mappings, we should verify that changes cannot be read()
2112    back from the file, nor mmap's back from the file at a different
2113    address.  (There have been systems where private was not correctly
2114    implemented like the infamous i386 svr4.0, and systems where the
2115    VM page cache was not coherent with the filesystem buffer cache
2116    like early versions of FreeBSD and possibly contemporary NetBSD.)
2117    For shared mappings, we should conversely verify that changes get
2118    propogated back to all the places they're supposed to be.
2119
2120    Grep wants private fixed already mapped.
2121    The main things grep needs to know about mmap are:
2122    * does it exist and is it safe to write into the mmap'd area
2123    * how to use it (BSD variants)  */
2124 #include <sys/types.h>
2125 #include <fcntl.h>
2126 #include <sys/mman.h>
2127
2128 /* This mess was copied from the GNU getpagesize.h.  */
2129 #ifndef HAVE_GETPAGESIZE
2130 # ifdef HAVE_UNISTD_H
2131 #  include <unistd.h>
2132 # endif
2133
2134 /* Assume that all systems that can run configure have sys/param.h.  */
2135 # ifndef HAVE_SYS_PARAM_H
2136 #  define HAVE_SYS_PARAM_H 1
2137 # endif
2138
2139 # ifdef _SC_PAGESIZE
2140 #  define getpagesize() sysconf(_SC_PAGESIZE)
2141 # else /* no _SC_PAGESIZE */
2142 #  ifdef HAVE_SYS_PARAM_H
2143 #   include <sys/param.h>
2144 #   ifdef EXEC_PAGESIZE
2145 #    define getpagesize() EXEC_PAGESIZE
2146 #   else /* no EXEC_PAGESIZE */
2147 #    ifdef NBPG
2148 #     define getpagesize() NBPG * CLSIZE
2149 #     ifndef CLSIZE
2150 #      define CLSIZE 1
2151 #     endif /* no CLSIZE */
2152 #    else /* no NBPG */
2153 #     ifdef NBPC
2154 #      define getpagesize() NBPC
2155 #     else /* no NBPC */
2156 #      ifdef PAGESIZE
2157 #       define getpagesize() PAGESIZE
2158 #      endif /* PAGESIZE */
2159 #     endif /* no NBPC */
2160 #    endif /* no NBPG */
2161 #   endif /* no EXEC_PAGESIZE */
2162 #  else /* no HAVE_SYS_PARAM_H */
2163 #   define getpagesize() 8192   /* punt totally */
2164 #  endif /* no HAVE_SYS_PARAM_H */
2165 # endif /* no _SC_PAGESIZE */
2166
2167 #endif /* no HAVE_GETPAGESIZE */
2168
2169 #ifdef __cplusplus
2170 extern "C" { void *malloc(unsigned); }
2171 #else
2172 char *malloc();
2173 #endif
2174
2175 int
2176 main()
2177 {
2178         char *data, *data2, *data3;
2179         int i, pagesize;
2180         int fd;
2181
2182         pagesize = getpagesize();
2183
2184         /*
2185          * First, make a file with some known garbage in it.
2186          */
2187         data = malloc(pagesize);
2188         if (!data)
2189                 exit(1);
2190         for (i = 0; i < pagesize; ++i)
2191                 *(data + i) = rand();
2192         umask(0);
2193         fd = creat("conftestmmap", 0600);
2194         if (fd < 0)
2195                 exit(1);
2196         if (write(fd, data, pagesize) != pagesize)
2197                 exit(1);
2198         close(fd);
2199
2200         /*
2201          * Next, try to mmap the file at a fixed address which
2202          * already has something else allocated at it.  If we can,
2203          * also make sure that we see the same garbage.
2204          */
2205         fd = open("conftestmmap", O_RDWR);
2206         if (fd < 0)
2207                 exit(1);
2208         data2 = malloc(2 * pagesize);
2209         if (!data2)
2210                 exit(1);
2211         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2212         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2213             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2214                 exit(1);
2215         for (i = 0; i < pagesize; ++i)
2216                 if (*(data + i) != *(data2 + i))
2217                         exit(1);
2218
2219         /*
2220          * Finally, make sure that changes to the mapped area
2221          * do not percolate back to the file as seen by read().
2222          * (This is a bug on some variants of i386 svr4.0.)
2223          */
2224         for (i = 0; i < pagesize; ++i)
2225                 *(data2 + i) = *(data2 + i) + 1;
2226         data3 = malloc(pagesize);
2227         if (!data3)
2228                 exit(1);
2229         if (read(fd, data3, pagesize) != pagesize)
2230                 exit(1);
2231         for (i = 0; i < pagesize; ++i)
2232                 if (*(data + i) != *(data3 + i))
2233                         exit(1);
2234         close(fd);
2235         unlink("conftestmmap");
2236         exit(0);
2237 }
2238
2239 EOF
2240 if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2241 then
2242   ac_cv_func_mmap_fixed_mapped=yes
2243 else
2244   echo "configure: failed program was:" >&5
2245   cat conftest.$ac_ext >&5
2246   rm -fr conftest*
2247   ac_cv_func_mmap_fixed_mapped=no
2248 fi
2249 rm -fr conftest*
2250 fi
2251
2252 fi
2253
2254 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2255 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2256   cat >> confdefs.h <<\EOF
2257 #define HAVE_MMAP 1
2258 EOF
2259
2260 fi
2261
2262 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2263 echo "configure:2264: checking return type of signal handlers" >&5
2264 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2265   echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267   cat > conftest.$ac_ext <<EOF
2268 #line 2269 "configure"
2269 #include "confdefs.h"
2270 #include <sys/types.h>
2271 #include <signal.h>
2272 #ifdef signal
2273 #undef signal
2274 #endif
2275 #ifdef __cplusplus
2276 extern "C" void (*signal (int, void (*)(int)))(int);
2277 #else
2278 void (*signal ()) ();
2279 #endif
2280
2281 int main() {
2282 int i;
2283 ; return 0; }
2284 EOF
2285 if { (eval echo configure:2286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2286   rm -rf conftest*
2287   ac_cv_type_signal=void
2288 else
2289   echo "configure: failed program was:" >&5
2290   cat conftest.$ac_ext >&5
2291   rm -rf conftest*
2292   ac_cv_type_signal=int
2293 fi
2294 rm -f conftest*
2295 fi
2296
2297 echo "$ac_t""$ac_cv_type_signal" 1>&6
2298 cat >> confdefs.h <<EOF
2299 #define RETSIGTYPE $ac_cv_type_signal
2300 EOF
2301
2302
2303 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2304 echo "configure:2305: checking for dlopen in -ldl" >&5
2305 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2307   echo $ac_n "(cached) $ac_c" 1>&6
2308 else
2309   ac_save_LIBS="$LIBS"
2310 LIBS="-ldl  $LIBS"
2311 cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314 /* Override any gcc2 internal prototype to avoid an error.  */
2315 /* We use char because int might match the return type of a gcc2
2316     builtin and then its argument prototype would still apply.  */
2317 char dlopen();
2318
2319 int main() {
2320 dlopen()
2321 ; return 0; }
2322 EOF
2323 if { (eval echo configure:2324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2324   rm -rf conftest*
2325   eval "ac_cv_lib_$ac_lib_var=yes"
2326 else
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   eval "ac_cv_lib_$ac_lib_var=no"
2331 fi
2332 rm -f conftest*
2333 LIBS="$ac_save_LIBS"
2334
2335 fi
2336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2337   echo "$ac_t""yes" 1>&6
2338   LIB="${LIB} -ldl"
2339 else
2340   echo "$ac_t""no" 1>&6
2341 fi
2342
2343 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
2344 echo "configure:2345: checking for pow in -lm" >&5
2345 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
2346 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2347   echo $ac_n "(cached) $ac_c" 1>&6
2348 else
2349   ac_save_LIBS="$LIBS"
2350 LIBS="-lm  $LIBS"
2351 cat > conftest.$ac_ext <<EOF
2352 #line 2353 "configure"
2353 #include "confdefs.h"
2354 /* Override any gcc2 internal prototype to avoid an error.  */
2355 /* We use char because int might match the return type of a gcc2
2356     builtin and then its argument prototype would still apply.  */
2357 char pow();
2358
2359 int main() {
2360 pow()
2361 ; return 0; }
2362 EOF
2363 if { (eval echo configure:2364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2364   rm -rf conftest*
2365   eval "ac_cv_lib_$ac_lib_var=yes"
2366 else
2367   echo "configure: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   rm -rf conftest*
2370   eval "ac_cv_lib_$ac_lib_var=no"
2371 fi
2372 rm -f conftest*
2373 LIBS="$ac_save_LIBS"
2374
2375 fi
2376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2377   echo "$ac_t""yes" 1>&6
2378   LIB_YUV="${LIB_YUV} -lm"
2379 else
2380   echo "$ac_t""no" 1>&6
2381 fi
2382
2383
2384 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
2385 CFLAGS="${CFLAGS} -I/usr/local/include"
2386
2387 PTHREAD_LIBS=error
2388 echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
2389 echo "configure:2390: checking for pthread_attr_init in -lpthread" >&5
2390 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2391 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2392   echo $ac_n "(cached) $ac_c" 1>&6
2393 else
2394   ac_save_LIBS="$LIBS"
2395 LIBS="-lpthread  $LIBS"
2396 cat > conftest.$ac_ext <<EOF
2397 #line 2398 "configure"
2398 #include "confdefs.h"
2399 /* Override any gcc2 internal prototype to avoid an error.  */
2400 /* We use char because int might match the return type of a gcc2
2401     builtin and then its argument prototype would still apply.  */
2402 char pthread_attr_init();
2403
2404 int main() {
2405 pthread_attr_init()
2406 ; return 0; }
2407 EOF
2408 if { (eval echo configure:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2409   rm -rf conftest*
2410   eval "ac_cv_lib_$ac_lib_var=yes"
2411 else
2412   echo "configure: failed program was:" >&5
2413   cat conftest.$ac_ext >&5
2414   rm -rf conftest*
2415   eval "ac_cv_lib_$ac_lib_var=no"
2416 fi
2417 rm -f conftest*
2418 LIBS="$ac_save_LIBS"
2419
2420 fi
2421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2422   echo "$ac_t""yes" 1>&6
2423   THREAD_LIB="-lpthread"
2424 else
2425   echo "$ac_t""no" 1>&6
2426 fi
2427
2428 if test "x${THREAD_LIB}" = xerror; then
2429   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
2430 echo "configure:2431: checking for pthread_attr_init in -lpthreads" >&5
2431 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2433   echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435   ac_save_LIBS="$LIBS"
2436 LIBS="-lpthreads  $LIBS"
2437 cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 /* Override any gcc2 internal prototype to avoid an error.  */
2441 /* We use char because int might match the return type of a gcc2
2442     builtin and then its argument prototype would still apply.  */
2443 char pthread_attr_init();
2444
2445 int main() {
2446 pthread_attr_init()
2447 ; return 0; }
2448 EOF
2449 if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2450   rm -rf conftest*
2451   eval "ac_cv_lib_$ac_lib_var=yes"
2452 else
2453   echo "configure: failed program was:" >&5
2454   cat conftest.$ac_ext >&5
2455   rm -rf conftest*
2456   eval "ac_cv_lib_$ac_lib_var=no"
2457 fi
2458 rm -f conftest*
2459 LIBS="$ac_save_LIBS"
2460
2461 fi
2462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2463   echo "$ac_t""yes" 1>&6
2464   THREAD_LIB="-lpthreads"
2465 else
2466   echo "$ac_t""no" 1>&6
2467 fi
2468
2469 fi
2470 if test "x${THREAD_LIB}" = xerror; then
2471   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
2472 echo "configure:2473: checking for pthread_attr_init in -lc_r" >&5
2473 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2475   echo $ac_n "(cached) $ac_c" 1>&6
2476 else
2477   ac_save_LIBS="$LIBS"
2478 LIBS="-lc_r  $LIBS"
2479 cat > conftest.$ac_ext <<EOF
2480 #line 2481 "configure"
2481 #include "confdefs.h"
2482 /* Override any gcc2 internal prototype to avoid an error.  */
2483 /* We use char because int might match the return type of a gcc2
2484     builtin and then its argument prototype would still apply.  */
2485 char pthread_attr_init();
2486
2487 int main() {
2488 pthread_attr_init()
2489 ; return 0; }
2490 EOF
2491 if { (eval echo configure:2492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2492   rm -rf conftest*
2493   eval "ac_cv_lib_$ac_lib_var=yes"
2494 else
2495   echo "configure: failed program was:" >&5
2496   cat conftest.$ac_ext >&5
2497   rm -rf conftest*
2498   eval "ac_cv_lib_$ac_lib_var=no"
2499 fi
2500 rm -f conftest*
2501 LIBS="$ac_save_LIBS"
2502
2503 fi
2504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2505   echo "$ac_t""yes" 1>&6
2506   THREAD_LIB="-lc_r"
2507 else
2508   echo "$ac_t""no" 1>&6
2509 fi
2510
2511 fi
2512 if test "x${THREAD_LIB}" = xerror; then
2513   THREAD_LIBS=""
2514   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
2515 echo "configure:2516: checking for pthread_attr_init" >&5
2516 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 /* System header to define __stub macros and hopefully few prototypes,
2523     which can conflict with char pthread_attr_init(); below.  */
2524 #include <assert.h>
2525 /* Override any gcc2 internal prototype to avoid an error.  */
2526 /* We use char because int might match the return type of a gcc2
2527     builtin and then its argument prototype would still apply.  */
2528 char pthread_attr_init();
2529
2530 int main() {
2531
2532 /* The GNU C library defines this for functions which it implements
2533     to always fail with ENOSYS.  Some functions are actually named
2534     something starting with __ and the normal name is an alias.  */
2535 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
2536 choke me
2537 #else
2538 pthread_attr_init();
2539 #endif
2540
2541 ; return 0; }
2542 EOF
2543 if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2544   rm -rf conftest*
2545   eval "ac_cv_func_pthread_attr_init=yes"
2546 else
2547   echo "configure: failed program was:" >&5
2548   cat conftest.$ac_ext >&5
2549   rm -rf conftest*
2550   eval "ac_cv_func_pthread_attr_init=no"
2551 fi
2552 rm -f conftest*
2553 fi
2554
2555 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
2556   echo "$ac_t""yes" 1>&6
2557   :
2558 else
2559   echo "$ac_t""no" 1>&6
2560 fi
2561
2562 fi
2563
2564 cat > conftest.$ac_ext <<EOF
2565 #line 2566 "configure"
2566 #include "confdefs.h"
2567 #include <pthread.h>
2568 EOF
2569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2570   egrep "pthread_cond_t" >/dev/null 2>&1; then
2571   rm -rf conftest*
2572   
2573   cat >> confdefs.h <<\EOF
2574 #define PTHREAD_COND_T_IN_PTHREAD_H 1
2575 EOF
2576
2577 fi
2578 rm -f conftest*
2579
2580 cat > conftest.$ac_ext <<EOF
2581 #line 2582 "configure"
2582 #include "confdefs.h"
2583 #include <strings.h>
2584 EOF
2585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2586   egrep "strncasecmp" >/dev/null 2>&1; then
2587   rm -rf conftest*
2588   
2589   cat >> confdefs.h <<\EOF
2590 #define STRNCASECMP_IN_STRINGS_H 1
2591 EOF
2592
2593 fi
2594 rm -f conftest*
2595
2596
2597 for ac_hdr in stddef.h getopt.h strings.h
2598 do
2599 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2600 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2601 echo "configure:2602: checking for $ac_hdr" >&5
2602 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2603   echo $ac_n "(cached) $ac_c" 1>&6
2604 else
2605   cat > conftest.$ac_ext <<EOF
2606 #line 2607 "configure"
2607 #include "confdefs.h"
2608 #include <$ac_hdr>
2609 EOF
2610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2611 { (eval echo configure:2612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2613 if test -z "$ac_err"; then
2614   rm -rf conftest*
2615   eval "ac_cv_header_$ac_safe=yes"
2616 else
2617   echo "$ac_err" >&5
2618   echo "configure: failed program was:" >&5
2619   cat conftest.$ac_ext >&5
2620   rm -rf conftest*
2621   eval "ac_cv_header_$ac_safe=no"
2622 fi
2623 rm -f conftest*
2624 fi
2625 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2626   echo "$ac_t""yes" 1>&6
2627     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2628   cat >> confdefs.h <<EOF
2629 #define $ac_tr_hdr 1
2630 EOF
2631  
2632 else
2633   echo "$ac_t""no" 1>&6
2634 fi
2635 done
2636
2637 for ac_hdr in sys/sockio.h fcntl.h sys/time.h
2638 do
2639 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2640 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2641 echo "configure:2642: checking for $ac_hdr" >&5
2642 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2643   echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645   cat > conftest.$ac_ext <<EOF
2646 #line 2647 "configure"
2647 #include "confdefs.h"
2648 #include <$ac_hdr>
2649 EOF
2650 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2651 { (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2652 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2653 if test -z "$ac_err"; then
2654   rm -rf conftest*
2655   eval "ac_cv_header_$ac_safe=yes"
2656 else
2657   echo "$ac_err" >&5
2658   echo "configure: failed program was:" >&5
2659   cat conftest.$ac_ext >&5
2660   rm -rf conftest*
2661   eval "ac_cv_header_$ac_safe=no"
2662 fi
2663 rm -f conftest*
2664 fi
2665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2666   echo "$ac_t""yes" 1>&6
2667     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2668   cat >> confdefs.h <<EOF
2669 #define $ac_tr_hdr 1
2670 EOF
2671  
2672 else
2673   echo "$ac_t""no" 1>&6
2674 fi
2675 done
2676
2677 for ac_hdr in sys/soundcard.h machine/soundcard.h
2678 do
2679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2681 echo "configure:2682: checking for $ac_hdr" >&5
2682 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2683   echo $ac_n "(cached) $ac_c" 1>&6
2684 else
2685   cat > conftest.$ac_ext <<EOF
2686 #line 2687 "configure"
2687 #include "confdefs.h"
2688 #include <$ac_hdr>
2689 EOF
2690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2691 { (eval echo configure:2692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2693 if test -z "$ac_err"; then
2694   rm -rf conftest*
2695   eval "ac_cv_header_$ac_safe=yes"
2696 else
2697   echo "$ac_err" >&5
2698   echo "configure: failed program was:" >&5
2699   cat conftest.$ac_ext >&5
2700   rm -rf conftest*
2701   eval "ac_cv_header_$ac_safe=no"
2702 fi
2703 rm -f conftest*
2704 fi
2705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2706   echo "$ac_t""yes" 1>&6
2707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2708   cat >> confdefs.h <<EOF
2709 #define $ac_tr_hdr 1
2710 EOF
2711  
2712 else
2713   echo "$ac_t""no" 1>&6
2714 fi
2715 done
2716
2717 for ac_hdr in dlfcn.h image.h
2718 do
2719 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2720 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2721 echo "configure:2722: checking for $ac_hdr" >&5
2722 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2723   echo $ac_n "(cached) $ac_c" 1>&6
2724 else
2725   cat > conftest.$ac_ext <<EOF
2726 #line 2727 "configure"
2727 #include "confdefs.h"
2728 #include <$ac_hdr>
2729 EOF
2730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2731 { (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2733 if test -z "$ac_err"; then
2734   rm -rf conftest*
2735   eval "ac_cv_header_$ac_safe=yes"
2736 else
2737   echo "$ac_err" >&5
2738   echo "configure: failed program was:" >&5
2739   cat conftest.$ac_ext >&5
2740   rm -rf conftest*
2741   eval "ac_cv_header_$ac_safe=no"
2742 fi
2743 rm -f conftest*
2744 fi
2745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2746   echo "$ac_t""yes" 1>&6
2747     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2748   cat >> confdefs.h <<EOF
2749 #define $ac_tr_hdr 1
2750 EOF
2751  
2752 else
2753   echo "$ac_t""no" 1>&6
2754 fi
2755 done
2756
2757 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2758 do
2759 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2760 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2761 echo "configure:2762: checking for $ac_hdr" >&5
2762 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2763   echo $ac_n "(cached) $ac_c" 1>&6
2764 else
2765   cat > conftest.$ac_ext <<EOF
2766 #line 2767 "configure"
2767 #include "confdefs.h"
2768 #include <$ac_hdr>
2769 EOF
2770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2771 { (eval echo configure:2772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2773 if test -z "$ac_err"; then
2774   rm -rf conftest*
2775   eval "ac_cv_header_$ac_safe=yes"
2776 else
2777   echo "$ac_err" >&5
2778   echo "configure: failed program was:" >&5
2779   cat conftest.$ac_ext >&5
2780   rm -rf conftest*
2781   eval "ac_cv_header_$ac_safe=no"
2782 fi
2783 rm -f conftest*
2784 fi
2785 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2786   echo "$ac_t""yes" 1>&6
2787     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2788   cat >> confdefs.h <<EOF
2789 #define $ac_tr_hdr 1
2790 EOF
2791  
2792 else
2793   echo "$ac_t""no" 1>&6
2794 fi
2795 done
2796
2797 for ac_hdr in machine/param.h
2798 do
2799 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2800 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2801 echo "configure:2802: checking for $ac_hdr" >&5
2802 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 #include <$ac_hdr>
2809 EOF
2810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2811 { (eval echo configure:2812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2813 if test -z "$ac_err"; then
2814   rm -rf conftest*
2815   eval "ac_cv_header_$ac_safe=yes"
2816 else
2817   echo "$ac_err" >&5
2818   echo "configure: failed program was:" >&5
2819   cat conftest.$ac_ext >&5
2820   rm -rf conftest*
2821   eval "ac_cv_header_$ac_safe=no"
2822 fi
2823 rm -f conftest*
2824 fi
2825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2826   echo "$ac_t""yes" 1>&6
2827     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2828   cat >> confdefs.h <<EOF
2829 #define $ac_tr_hdr 1
2830 EOF
2831  
2832 else
2833   echo "$ac_t""no" 1>&6
2834 fi
2835 done
2836
2837
2838 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
2839 do
2840 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2841 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2842 echo "configure:2843: checking for $ac_hdr" >&5
2843 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2844   echo $ac_n "(cached) $ac_c" 1>&6
2845 else
2846   cat > conftest.$ac_ext <<EOF
2847 #line 2848 "configure"
2848 #include "confdefs.h"
2849 #include <$ac_hdr>
2850 EOF
2851 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2852 { (eval echo configure:2853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2853 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2854 if test -z "$ac_err"; then
2855   rm -rf conftest*
2856   eval "ac_cv_header_$ac_safe=yes"
2857 else
2858   echo "$ac_err" >&5
2859   echo "configure: failed program was:" >&5
2860   cat conftest.$ac_ext >&5
2861   rm -rf conftest*
2862   eval "ac_cv_header_$ac_safe=no"
2863 fi
2864 rm -f conftest*
2865 fi
2866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2867   echo "$ac_t""yes" 1>&6
2868     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2869   cat >> confdefs.h <<EOF
2870 #define $ac_tr_hdr 1
2871 EOF
2872  
2873 else
2874   echo "$ac_t""no" 1>&6
2875 fi
2876 done
2877
2878
2879 CFLAGS="${save_CFLAGS} -Wall -Werror"
2880 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
2881 echo "configure:2882: checking for ntohl in sys/param.h" >&5
2882 cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885 #include <sys/param.h>
2886 void foo() { int meuh; ntohl(meuh); }
2887 int main() {
2888
2889 ; return 0; }
2890 EOF
2891 if { (eval echo configure:2892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2892   rm -rf conftest*
2893   cat >> confdefs.h <<\EOF
2894 #define NTOHL_IN_SYS_PARAM_H 1
2895 EOF
2896
2897  echo "$ac_t""yes" 1>&6
2898 else
2899   echo "configure: failed program was:" >&5
2900   cat conftest.$ac_ext >&5
2901   rm -rf conftest*
2902   echo "$ac_t""no" 1>&6
2903 fi
2904 rm -f conftest*
2905
2906 CFLAGS="${save_CFLAGS} -finline-limit=12"
2907 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
2908 echo "configure:2909: checking if \$CC accepts -finline-limit" >&5
2909 cat > conftest.$ac_ext <<EOF
2910 #line 2911 "configure"
2911 #include "confdefs.h"
2912
2913 int main() {
2914
2915 ; return 0; }
2916 EOF
2917 if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918   rm -rf conftest*
2919   save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; echo "$ac_t""yes" 1>&6
2920 else
2921   echo "configure: failed program was:" >&5
2922   cat conftest.$ac_ext >&5
2923   rm -rf conftest*
2924   echo "$ac_t""no" 1>&6
2925 fi
2926 rm -f conftest*
2927
2928 CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
2929 echo $ac_n "checking if \$CC compiles plugins with -bundle -undefined suppress""... $ac_c" 1>&6
2930 echo "configure:2931: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
2931 cat > conftest.$ac_ext <<EOF
2932 #line 2933 "configure"
2933 #include "confdefs.h"
2934
2935 int main() {
2936
2937 ; return 0; }
2938 EOF
2939 if { (eval echo configure:2940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2940   rm -rf conftest*
2941   PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
2942 else
2943   echo "configure: failed program was:" >&5
2944   cat conftest.$ac_ext >&5
2945   rm -rf conftest*
2946   echo "$ac_t""no" 1>&6
2947 fi
2948 rm -f conftest*
2949
2950 CFLAGS="${save_CFLAGS} -shared"
2951 echo $ac_n "checking if \$CC compiles plugins with -shared""... $ac_c" 1>&6
2952 echo "configure:2953: checking if \$CC compiles plugins with -shared" >&5
2953 cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956
2957 int main() {
2958
2959 ; return 0; }
2960 EOF
2961 if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2962   rm -rf conftest*
2963   PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
2964 else
2965   echo "configure: failed program was:" >&5
2966   cat conftest.$ac_ext >&5
2967   rm -rf conftest*
2968   echo "$ac_t""no" 1>&6
2969 fi
2970 rm -f conftest*
2971
2972 CFLAGS="${save_CFLAGS}"
2973
2974 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
2975 echo "configure:2976: checking for boolean_t in sys/types.h" >&5
2976 cat > conftest.$ac_ext <<EOF
2977 #line 2978 "configure"
2978 #include "confdefs.h"
2979 #include <sys/types.h>
2980 void quux() { boolean_t foo; }
2981 int main() {
2982
2983 ; return 0; }
2984 EOF
2985 if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2986   rm -rf conftest*
2987   cat >> confdefs.h <<\EOF
2988 #define BOOLEAN_T_IN_SYS_TYPES_H 1
2989 EOF
2990
2991  echo "$ac_t""yes" 1>&6
2992 else
2993   echo "configure: failed program was:" >&5
2994   cat conftest.$ac_ext >&5
2995   rm -rf conftest*
2996   echo "$ac_t""no" 1>&6
2997 fi
2998 rm -f conftest*
2999 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
3000 echo "configure:3001: checking for boolean_t in pthread.h" >&5
3001 cat > conftest.$ac_ext <<EOF
3002 #line 3003 "configure"
3003 #include "confdefs.h"
3004 #include <pthread.h>
3005 void quux() { boolean_t foo; }
3006 int main() {
3007
3008 ; return 0; }
3009 EOF
3010 if { (eval echo configure:3011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3011   rm -rf conftest*
3012   cat >> confdefs.h <<\EOF
3013 #define BOOLEAN_T_IN_PTHREAD_H 1
3014 EOF
3015
3016  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 echo $ac_n "checking for working const""... $ac_c" 1>&6
3026 echo "configure:3027: checking for working const" >&5
3027 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   cat > conftest.$ac_ext <<EOF
3031 #line 3032 "configure"
3032 #include "confdefs.h"
3033
3034 int main() {
3035
3036 /* Ultrix mips cc rejects this.  */
3037 typedef int charset[2]; const charset x;
3038 /* SunOS 4.1.1 cc rejects this.  */
3039 char const *const *ccp;
3040 char **p;
3041 /* NEC SVR4.0.2 mips cc rejects this.  */
3042 struct point {int x, y;};
3043 static struct point const zero = {0,0};
3044 /* AIX XL C 1.02.0.0 rejects this.
3045    It does not let you subtract one const X* pointer from another in an arm
3046    of an if-expression whose if-part is not a constant expression */
3047 const char *g = "string";
3048 ccp = &g + (g ? g-g : 0);
3049 /* HPUX 7.0 cc rejects these. */
3050 ++ccp;
3051 p = (char**) ccp;
3052 ccp = (char const *const *) p;
3053 { /* SCO 3.2v4 cc rejects this.  */
3054   char *t;
3055   char const *s = 0 ? (char *) 0 : (char const *) 0;
3056
3057   *t++ = 0;
3058 }
3059 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3060   int x[] = {25, 17};
3061   const int *foo = &x[0];
3062   ++foo;
3063 }
3064 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3065   typedef const int *iptr;
3066   iptr p = 0;
3067   ++p;
3068 }
3069 { /* AIX XL C 1.02.0.0 rejects this saying
3070      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3071   struct s { int j; const int *ap[3]; };
3072   struct s *b; b->j = 5;
3073 }
3074 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3075   const int foo = 10;
3076 }
3077
3078 ; return 0; }
3079 EOF
3080 if { (eval echo configure:3081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3081   rm -rf conftest*
3082   ac_cv_c_const=yes
3083 else
3084   echo "configure: failed program was:" >&5
3085   cat conftest.$ac_ext >&5
3086   rm -rf conftest*
3087   ac_cv_c_const=no
3088 fi
3089 rm -f conftest*
3090 fi
3091
3092 echo "$ac_t""$ac_cv_c_const" 1>&6
3093 if test $ac_cv_c_const = no; then
3094   cat >> confdefs.h <<\EOF
3095 #define const 
3096 EOF
3097
3098 fi
3099
3100 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3101 echo "configure:3102: checking for ANSI C header files" >&5
3102 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3103   echo $ac_n "(cached) $ac_c" 1>&6
3104 else
3105   cat > conftest.$ac_ext <<EOF
3106 #line 3107 "configure"
3107 #include "confdefs.h"
3108 #include <stdlib.h>
3109 #include <stdarg.h>
3110 #include <string.h>
3111 #include <float.h>
3112 EOF
3113 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3114 { (eval echo configure:3115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3115 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3116 if test -z "$ac_err"; then
3117   rm -rf conftest*
3118   ac_cv_header_stdc=yes
3119 else
3120   echo "$ac_err" >&5
3121   echo "configure: failed program was:" >&5
3122   cat conftest.$ac_ext >&5
3123   rm -rf conftest*
3124   ac_cv_header_stdc=no
3125 fi
3126 rm -f conftest*
3127
3128 if test $ac_cv_header_stdc = yes; then
3129   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3130 cat > conftest.$ac_ext <<EOF
3131 #line 3132 "configure"
3132 #include "confdefs.h"
3133 #include <string.h>
3134 EOF
3135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3136   egrep "memchr" >/dev/null 2>&1; then
3137   :
3138 else
3139   rm -rf conftest*
3140   ac_cv_header_stdc=no
3141 fi
3142 rm -f conftest*
3143
3144 fi
3145
3146 if test $ac_cv_header_stdc = yes; then
3147   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3148 cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151 #include <stdlib.h>
3152 EOF
3153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3154   egrep "free" >/dev/null 2>&1; then
3155   :
3156 else
3157   rm -rf conftest*
3158   ac_cv_header_stdc=no
3159 fi
3160 rm -f conftest*
3161
3162 fi
3163
3164 if test $ac_cv_header_stdc = yes; then
3165   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3166 if test "$cross_compiling" = yes; then
3167   :
3168 else
3169   cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <ctype.h>
3173 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3174 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3175 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3176 int main () { int i; for (i = 0; i < 256; i++)
3177 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3178 exit (0); }
3179
3180 EOF
3181 if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3182 then
3183   :
3184 else
3185   echo "configure: failed program was:" >&5
3186   cat conftest.$ac_ext >&5
3187   rm -fr conftest*
3188   ac_cv_header_stdc=no
3189 fi
3190 rm -fr conftest*
3191 fi
3192
3193 fi
3194 fi
3195
3196 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3197 if test $ac_cv_header_stdc = yes; then
3198   cat >> confdefs.h <<\EOF
3199 #define STDC_HEADERS 1
3200 EOF
3201
3202 fi
3203
3204 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3205 echo "configure:3206: checking for size_t" >&5
3206 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3207   echo $ac_n "(cached) $ac_c" 1>&6
3208 else
3209   cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212 #include <sys/types.h>
3213 #if STDC_HEADERS
3214 #include <stdlib.h>
3215 #include <stddef.h>
3216 #endif
3217 EOF
3218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3219   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3220   rm -rf conftest*
3221   ac_cv_type_size_t=yes
3222 else
3223   rm -rf conftest*
3224   ac_cv_type_size_t=no
3225 fi
3226 rm -f conftest*
3227
3228 fi
3229 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3230 if test $ac_cv_type_size_t = no; then
3231   cat >> confdefs.h <<\EOF
3232 #define size_t unsigned
3233 EOF
3234
3235 fi
3236
3237 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3238 echo "configure:3239: checking whether time.h and sys/time.h may both be included" >&5
3239 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3240   echo $ac_n "(cached) $ac_c" 1>&6
3241 else
3242   cat > conftest.$ac_ext <<EOF
3243 #line 3244 "configure"
3244 #include "confdefs.h"
3245 #include <sys/types.h>
3246 #include <sys/time.h>
3247 #include <time.h>
3248 int main() {
3249 struct tm *tp;
3250 ; return 0; }
3251 EOF
3252 if { (eval echo configure:3253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3253   rm -rf conftest*
3254   ac_cv_header_time=yes
3255 else
3256   echo "configure: failed program was:" >&5
3257   cat conftest.$ac_ext >&5
3258   rm -rf conftest*
3259   ac_cv_header_time=no
3260 fi
3261 rm -f conftest*
3262 fi
3263
3264 echo "$ac_t""$ac_cv_header_time" 1>&6
3265 if test $ac_cv_header_time = yes; then
3266   cat >> confdefs.h <<\EOF
3267 #define TIME_WITH_SYS_TIME 1
3268 EOF
3269
3270 fi
3271
3272
3273 ARCH=${host_cpu}
3274
3275 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
3276 PLUGINS="${PLUGINS}"
3277
3278 MMX_MODULES="yuvmmx idctmmx motionmmx"
3279 MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
3280
3281 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
3282 echo "configure:3283: checking if \$CC groks MMX inline assembly" >&5
3283 cat > conftest.$ac_ext <<EOF
3284 #line 3285 "configure"
3285 #include "confdefs.h"
3286 void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
3287 int main() {
3288
3289 ; return 0; }
3290 EOF
3291 if { (eval echo configure:3292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3292   rm -rf conftest*
3293   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
3294   echo "$ac_t""yes" 1>&6
3295 else
3296   echo "configure: failed program was:" >&5
3297   cat conftest.$ac_ext >&5
3298   rm -rf conftest*
3299   echo "$ac_t""no" 1>&6
3300 fi
3301 rm -f conftest*
3302
3303 echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
3304 echo "configure:3305: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
3305 cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
3309 int main() {
3310
3311 ; return 0; }
3312 EOF
3313 if { (eval echo configure:3314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3314   rm -rf conftest*
3315   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
3316   echo "$ac_t""yes" 1>&6
3317 else
3318   echo "configure: failed program was:" >&5
3319   cat conftest.$ac_ext >&5
3320   rm -rf conftest*
3321   echo "$ac_t""no" 1>&6
3322 fi
3323 rm -f conftest*
3324
3325
3326 for ac_hdr in winioctl.h
3327 do
3328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3330 echo "configure:3331: checking for $ac_hdr" >&5
3331 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3332   echo $ac_n "(cached) $ac_c" 1>&6
3333 else
3334   cat > conftest.$ac_ext <<EOF
3335 #line 3336 "configure"
3336 #include "confdefs.h"
3337 #include <$ac_hdr>
3338 EOF
3339 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3340 { (eval echo configure:3341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3341 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3342 if test -z "$ac_err"; then
3343   rm -rf conftest*
3344   eval "ac_cv_header_$ac_safe=yes"
3345 else
3346   echo "$ac_err" >&5
3347   echo "configure: failed program was:" >&5
3348   cat conftest.$ac_ext >&5
3349   rm -rf conftest*
3350   eval "ac_cv_header_$ac_safe=no"
3351 fi
3352 rm -f conftest*
3353 fi
3354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3355   echo "$ac_t""yes" 1>&6
3356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3357   cat >> confdefs.h <<EOF
3358 #define $ac_tr_hdr 1
3359 EOF
3360  
3361   CAN_BUILD_LIBDVDCSS=1
3362
3363 else
3364   echo "$ac_t""no" 1>&6
3365 fi
3366 done
3367
3368
3369 for ac_hdr in sys/ioctl.h
3370 do
3371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3373 echo "configure:3374: checking for $ac_hdr" >&5
3374 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3375   echo $ac_n "(cached) $ac_c" 1>&6
3376 else
3377   cat > conftest.$ac_ext <<EOF
3378 #line 3379 "configure"
3379 #include "confdefs.h"
3380 #include <$ac_hdr>
3381 EOF
3382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3383 { (eval echo configure:3384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3385 if test -z "$ac_err"; then
3386   rm -rf conftest*
3387   eval "ac_cv_header_$ac_safe=yes"
3388 else
3389   echo "$ac_err" >&5
3390   echo "configure: failed program was:" >&5
3391   cat conftest.$ac_ext >&5
3392   rm -rf conftest*
3393   eval "ac_cv_header_$ac_safe=no"
3394 fi
3395 rm -f conftest*
3396 fi
3397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3398   echo "$ac_t""yes" 1>&6
3399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3400   cat >> confdefs.h <<EOF
3401 #define $ac_tr_hdr 1
3402 EOF
3403  
3404   CAN_BUILD_LIBDVDCSS=1
3405   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h
3406 do
3407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3409 echo "configure:3410: checking for $ac_hdr" >&5
3410 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   cat > conftest.$ac_ext <<EOF
3414 #line 3415 "configure"
3415 #include "confdefs.h"
3416 #include <$ac_hdr>
3417 EOF
3418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3419 { (eval echo configure:3420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3421 if test -z "$ac_err"; then
3422   rm -rf conftest*
3423   eval "ac_cv_header_$ac_safe=yes"
3424 else
3425   echo "$ac_err" >&5
3426   echo "configure: failed program was:" >&5
3427   cat conftest.$ac_ext >&5
3428   rm -rf conftest*
3429   eval "ac_cv_header_$ac_safe=no"
3430 fi
3431 rm -f conftest*
3432 fi
3433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3434   echo "$ac_t""yes" 1>&6
3435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3436   cat >> confdefs.h <<EOF
3437 #define $ac_tr_hdr 1
3438 EOF
3439  
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443 done
3444
3445   BSD_DVD_STRUCT=0
3446         cat > conftest.$ac_ext <<EOF
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449 #include <sys/dvdio.h>
3450 EOF
3451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3452   egrep "dvd_struct" >/dev/null 2>&1; then
3453   rm -rf conftest*
3454   
3455     cat >> confdefs.h <<\EOF
3456 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
3457 EOF
3458
3459     BSD_DVD_STRUCT=1
3460   
3461 fi
3462 rm -f conftest*
3463
3464         cat > conftest.$ac_ext <<EOF
3465 #line 3466 "configure"
3466 #include "confdefs.h"
3467 #include <sys/cdio.h>
3468 EOF
3469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3470   egrep "dvd_struct" >/dev/null 2>&1; then
3471   rm -rf conftest*
3472   
3473     cat >> confdefs.h <<\EOF
3474 #define DVD_STRUCT_IN_SYS_CDIO_H 1
3475 EOF
3476
3477     BSD_DVD_STRUCT=1
3478   
3479 fi
3480 rm -f conftest*
3481
3482   if test x$BSD_DVD_STRUCT = x1; then
3483     cat >> confdefs.h <<\EOF
3484 #define HAVE_BSD_DVD_STRUCT 1
3485 EOF
3486
3487   fi
3488         cat > conftest.$ac_ext <<EOF
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491 #include <linux/cdrom.h>
3492 EOF
3493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3494   egrep "dvd_struct" >/dev/null 2>&1; then
3495   rm -rf conftest*
3496   
3497     cat >> confdefs.h <<\EOF
3498 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
3499 EOF
3500
3501   
3502 fi
3503 rm -f conftest*
3504
3505
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 done
3510
3511
3512 case ${host_os} in
3513   darwin*)
3514     SYS=darwin
3515     ;;
3516   *)
3517     SYS=${host_os}
3518     ;;
3519 esac
3520
3521 # Check whether --enable-ppro or --disable-ppro was given.
3522 if test "${enable_ppro+set}" = set; then
3523   enableval="$enable_ppro"
3524    if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3525 else
3526    if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3527 fi
3528
3529
3530 # Check whether --enable-mmx or --disable-mmx was given.
3531 if test "${enable_mmx+set}" = set; then
3532   enableval="$enable_mmx"
3533    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
3534   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3535 else
3536    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";
3537   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3538 fi
3539
3540
3541 # Check whether --enable-altivec or --disable-altivec was given.
3542 if test "${enable_altivec+set}" = set; then
3543   enableval="$enable_altivec"
3544    if test x$enableval = xyes; then ARCH="${ARCH} altivec"
3545     BUILTINS="${BUILTINS} idctaltivec"
3546     LIB_IDCTALTIVEC="-framework vecLib"
3547   fi 
3548 fi
3549
3550 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
3551
3552 DEBUG=0
3553 # Check whether --enable-debug or --disable-debug was given.
3554 if test "${enable_debug+set}" = set; then
3555   enableval="$enable_debug"
3556    if test x$enableval = xyes; then DEBUG=1; fi 
3557 fi
3558
3559
3560 STATS=0
3561 # Check whether --enable-stats or --disable-stats was given.
3562 if test "${enable_stats+set}" = set; then
3563   enableval="$enable_stats"
3564    if test x$enableval = xyes; then STATS=1; fi 
3565 fi
3566
3567
3568 TRACE=0
3569 # Check whether --enable-trace or --disable-trace was given.
3570 if test "${enable_trace+set}" = set; then
3571   enableval="$enable_trace"
3572    if test x$enableval = xyes; then TRACE=1; fi 
3573 fi
3574
3575
3576 PROFILING=0
3577 # Check whether --enable-profiling or --disable-profiling was given.
3578 if test "${enable_profiling+set}" = set; then
3579   enableval="$enable_profiling"
3580    if test x$enableval = xyes; then PROFILING=1; fi 
3581 fi
3582
3583
3584 # Check whether --enable-optimizations or --disable-optimizations was given.
3585 if test "${enable_optimizations+set}" = set; then
3586   enableval="$enable_optimizations"
3587    if test x$enableval = xno; then OPTIMS=0; fi 
3588 else
3589    OPTIMS=1 
3590 fi
3591
3592
3593 # Check whether --enable-pth or --disable-pth was given.
3594 if test "${enable_pth+set}" = set; then
3595   enableval="$enable_pth"
3596    if test x$enableval = xyes; then
3597     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3598 echo "configure:3599: checking for pth_init in -lpth" >&5
3599 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
3600 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3601   echo $ac_n "(cached) $ac_c" 1>&6
3602 else
3603   ac_save_LIBS="$LIBS"
3604 LIBS="-lpth  $LIBS"
3605 cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 /* Override any gcc2 internal prototype to avoid an error.  */
3609 /* We use char because int might match the return type of a gcc2
3610     builtin and then its argument prototype would still apply.  */
3611 char pth_init();
3612
3613 int main() {
3614 pth_init()
3615 ; return 0; }
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3618   rm -rf conftest*
3619   eval "ac_cv_lib_$ac_lib_var=yes"
3620 else
3621   echo "configure: failed program was:" >&5
3622   cat conftest.$ac_ext >&5
3623   rm -rf conftest*
3624   eval "ac_cv_lib_$ac_lib_var=no"
3625 fi
3626 rm -f conftest*
3627 LIBS="$ac_save_LIBS"
3628
3629 fi
3630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3631   echo "$ac_t""yes" 1>&6
3632     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3633     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3634   cat >> confdefs.h <<EOF
3635 #define $ac_tr_lib 1
3636 EOF
3637
3638   LIBS="-lpth $LIBS"
3639
3640 else
3641   echo "$ac_t""no" 1>&6
3642 fi
3643
3644     cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 #include <pth.h>
3648 EOF
3649 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3650   egrep "pth_init" >/dev/null 2>&1; then
3651   rm -rf conftest*
3652   
3653       cat >> confdefs.h <<\EOF
3654 #define PTH_INIT_IN_PTH_H 1
3655 EOF
3656
3657     THREAD_LIB="-lpth"
3658     fi
3659 fi
3660 rm -f conftest*
3661
3662
3663 fi
3664
3665
3666 LIB="${LIB} ${THREAD_LIB}"
3667
3668 LOCAL_LIBDVDCSS=0
3669 STATIC_LIBDVDCSS=0
3670 # Check whether --with-dvdcss or --without-dvdcss was given.
3671 if test "${with_dvdcss+set}" = set; then
3672   withval="$with_dvdcss"
3673    case "x${withval}" in
3674     xlocal-static|xyes)
3675       # local libdvdcss, statically linked
3676       if test x${CAN_BUILD_LIBDVDCSS} = x1
3677       then
3678         LOCAL_LIBDVDCSS=1
3679         STATIC_LIBDVDCSS=1
3680         BUILTINS="${BUILTINS} dvd"
3681         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3682         LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
3683         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
3684       fi
3685     ;;
3686     xlocal-shared)
3687       # local libdvdcss, dynamically linked
3688       if test x${CAN_BUILD_LIBDVDCSS} = x1
3689       then
3690         LOCAL_LIBDVDCSS=1
3691         BUILTINS="${BUILTINS} dvd"
3692         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3693         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
3694         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
3695       fi
3696     ;;
3697     *)
3698       # existing libdvdcss
3699       BUILTINS="${BUILTINS} dvd"
3700       if test "x$withval" != "xyes"
3701       then
3702         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
3703         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
3704       fi
3705       LIB_DVD="${LIB_DVD} -ldvdcss"
3706       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
3707     esac 
3708 else
3709   # user didn't decide, we choose to use local libdvdcss and link statically
3710    if test x${CAN_BUILD_LIBDVDCSS} = x1
3711     then
3712       LOCAL_LIBDVDCSS=1
3713       STATIC_LIBDVDCSS=1
3714       BUILTINS="${BUILTINS} dvd"
3715       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3716       LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
3717       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
3718     fi 
3719 fi
3720
3721
3722 CSS=0
3723 # Check whether --enable-css or --disable-css was given.
3724 if test "${enable_css+set}" = set; then
3725   enableval="$enable_css"
3726    if test x$enableval = xyes
3727     then
3728       CSS=1
3729     fi 
3730 else
3731    CSS=1; 
3732 fi
3733
3734
3735 if test x${CSS} = x1
3736 then
3737   cat >> confdefs.h <<\EOF
3738 #define HAVE_CSS 1
3739 EOF
3740
3741 fi
3742
3743 # Check whether --enable-dummy or --disable-dummy was given.
3744 if test "${enable_dummy+set}" = set; then
3745   enableval="$enable_dummy"
3746   :
3747 fi
3748
3749
3750 if test x$enable_dummy != xno
3751 then
3752   BUILTINS="${BUILTINS} dummy"
3753 fi
3754
3755 # Check whether --enable-null or --disable-null was given.
3756 if test "${enable_null+set}" = set; then
3757   enableval="$enable_null"
3758   :
3759 fi
3760
3761
3762 if test x$enable_null != xno
3763 then
3764   BUILTINS="${BUILTINS} null"
3765 fi
3766
3767 # Check whether --enable-rc or --disable-rc was given.
3768 if test "${enable_rc+set}" = set; then
3769   enableval="$enable_rc"
3770   :
3771 fi
3772
3773
3774 if test x$enable_rc != xno
3775 then
3776   BUILTINS="${BUILTINS} rc"
3777 fi
3778
3779 if test x$SYS = xbeos
3780 then
3781     BUILTINS="${BUILTINS} beos"
3782     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3783     PLCFLAGS="${PLCFLAGS} -nostart"
3784
3785 else
3786
3787 # Check whether --enable-dsp or --disable-dsp was given.
3788 if test "${enable_dsp+set}" = set; then
3789   enableval="$enable_dsp"
3790   :
3791 fi
3792
3793
3794 if test x$enable_dsp != xno
3795 then
3796   if test -c /dev/dsp
3797   then
3798     PLUGINS="${PLUGINS} dsp"
3799   fi
3800 fi
3801
3802 # Check whether --enable-esd or --disable-esd was given.
3803 if test "${enable_esd+set}" = set; then
3804   enableval="$enable_esd"
3805   if test x$enable_esd = xyes
3806    then
3807      # Extract the first word of "esd-config", so it can be a program name with args.
3808 set dummy esd-config; ac_word=$2
3809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3810 echo "configure:3811: checking for $ac_word" >&5
3811 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3812   echo $ac_n "(cached) $ac_c" 1>&6
3813 else
3814   case "$ESD_CONFIG" in
3815   /*)
3816   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3817   ;;
3818   ?:/*)                  
3819   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3820   ;;
3821   *)
3822   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3823   ac_dummy="$PATH"
3824   for ac_dir in $ac_dummy; do 
3825     test -z "$ac_dir" && ac_dir=.
3826     if test -f $ac_dir/$ac_word; then
3827       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3828       break
3829     fi
3830   done
3831   IFS="$ac_save_ifs"
3832   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3833   ;;
3834 esac
3835 fi
3836 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3837 if test -n "$ESD_CONFIG"; then
3838   echo "$ac_t""$ESD_CONFIG" 1>&6
3839 else
3840   echo "$ac_t""no" 1>&6
3841 fi
3842
3843      if test x${ESD_CONFIG} != xno
3844      then
3845        PLUGINS="${PLUGINS} esd"
3846        LIB_ESD="`${ESD_CONFIG} --libs`"
3847      fi
3848    fi
3849 fi
3850
3851
3852 # Check whether --enable-darwin or --disable-darwin was given.
3853 if test "${enable_darwin+set}" = set; then
3854   enableval="$enable_darwin"
3855   if test x$enable_darwin = xyes; then
3856      PLUGINS="${PLUGINS} darwin"
3857      LIB_DARWIN="-framework CoreAudio"
3858    fi
3859 fi
3860
3861
3862 # Check whether --enable-macosx or --disable-macosx was given.
3863 if test "${enable_macosx+set}" = set; then
3864   enableval="$enable_macosx"
3865   if test x$enable_macosx = xyes
3866    then
3867      BUILTINS="${BUILTINS} macosx"
3868      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3869      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3870      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3871    fi
3872 else
3873   for ac_hdr in Carbon/Carbon.h
3874 do
3875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3877 echo "configure:3878: checking for $ac_hdr" >&5
3878 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <$ac_hdr>
3885 EOF
3886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3887 { (eval echo configure:3888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3889 if test -z "$ac_err"; then
3890   rm -rf conftest*
3891   eval "ac_cv_header_$ac_safe=yes"
3892 else
3893   echo "$ac_err" >&5
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -rf conftest*
3897   eval "ac_cv_header_$ac_safe=no"
3898 fi
3899 rm -f conftest*
3900 fi
3901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3902   echo "$ac_t""yes" 1>&6
3903     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3904   cat >> confdefs.h <<EOF
3905 #define $ac_tr_hdr 1
3906 EOF
3907  BUILTINS="${BUILTINS} macosx"
3908      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3909      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3910      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3911    
3912 else
3913   echo "$ac_t""no" 1>&6
3914 fi
3915 done
3916
3917 fi
3918
3919
3920 # Check whether --enable-qnx or --disable-qnx was given.
3921 if test "${enable_qnx+set}" = set; then
3922   enableval="$enable_qnx"
3923   :
3924 fi
3925
3926     if test x$enable_qnx != xno
3927     then
3928       for ac_hdr in Ph.h
3929 do
3930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3932 echo "configure:3933: checking for $ac_hdr" >&5
3933 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3934   echo $ac_n "(cached) $ac_c" 1>&6
3935 else
3936   cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 #include <$ac_hdr>
3940 EOF
3941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3942 { (eval echo configure:3943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3944 if test -z "$ac_err"; then
3945   rm -rf conftest*
3946   eval "ac_cv_header_$ac_safe=yes"
3947 else
3948   echo "$ac_err" >&5
3949   echo "configure: failed program was:" >&5
3950   cat conftest.$ac_ext >&5
3951   rm -rf conftest*
3952   eval "ac_cv_header_$ac_safe=no"
3953 fi
3954 rm -f conftest*
3955 fi
3956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3957   echo "$ac_t""yes" 1>&6
3958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3959   cat >> confdefs.h <<EOF
3960 #define $ac_tr_hdr 1
3961 EOF
3962  
3963         PLUGINS="${PLUGINS} qnx"
3964         LIB_QNX="-lasound -lph"
3965       
3966 else
3967   echo "$ac_t""no" 1>&6
3968 fi
3969 done
3970
3971     fi
3972
3973 # Check whether --enable-fb or --disable-fb was given.
3974 if test "${enable_fb+set}" = set; then
3975   enableval="$enable_fb"
3976   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
3977 fi
3978
3979
3980 # Check whether --with-ggi or --without-ggi was given.
3981 if test "${with_ggi+set}" = set; then
3982   withval="$with_ggi"
3983    if test "x$withval" != "xno"
3984     then
3985       PLUGINS="${PLUGINS} ggi"
3986       if test "x$withval" != "xyes"
3987       then
3988         LIB_GGI="-l"$withval
3989       else
3990         LIB_GGI="-lggi"
3991       fi
3992     fi 
3993 fi
3994
3995
3996 # Check whether --enable-sdl or --disable-sdl was given.
3997 if test "${enable_sdl+set}" = set; then
3998   enableval="$enable_sdl"
3999   :
4000 fi
4001
4002 if test "x$withval" != "xno"
4003 then
4004   # Extract the first word of "sdl-config", so it can be a program name with args.
4005 set dummy sdl-config; ac_word=$2
4006 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4007 echo "configure:4008: checking for $ac_word" >&5
4008 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   case "$SDL_CONFIG" in
4012   /*)
4013   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4014   ;;
4015   ?:/*)                  
4016   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4017   ;;
4018   *)
4019   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4020   ac_dummy="$PATH"
4021   for ac_dir in $ac_dummy; do 
4022     test -z "$ac_dir" && ac_dir=.
4023     if test -f $ac_dir/$ac_word; then
4024       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4025       break
4026     fi
4027   done
4028   IFS="$ac_save_ifs"
4029   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4030   ;;
4031 esac
4032 fi
4033 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4034 if test -n "$SDL_CONFIG"; then
4035   echo "$ac_t""$SDL_CONFIG" 1>&6
4036 else
4037   echo "$ac_t""no" 1>&6
4038 fi
4039
4040   SDL_HEADER="SDL/SDL.h"
4041   if test x${SDL_CONFIG} = xno; then
4042     # Extract the first word of "sdl11-config", so it can be a program name with args.
4043 set dummy sdl11-config; ac_word=$2
4044 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4045 echo "configure:4046: checking for $ac_word" >&5
4046 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
4047   echo $ac_n "(cached) $ac_c" 1>&6
4048 else
4049   case "$SDL11_CONFIG" in
4050   /*)
4051   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   ?:/*)                  
4054   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
4055   ;;
4056   *)
4057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4058   ac_dummy="$PATH"
4059   for ac_dir in $ac_dummy; do 
4060     test -z "$ac_dir" && ac_dir=.
4061     if test -f $ac_dir/$ac_word; then
4062       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
4063       break
4064     fi
4065   done
4066   IFS="$ac_save_ifs"
4067   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
4068   ;;
4069 esac
4070 fi
4071 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
4072 if test -n "$SDL11_CONFIG"; then
4073   echo "$ac_t""$SDL11_CONFIG" 1>&6
4074 else
4075   echo "$ac_t""no" 1>&6
4076 fi
4077
4078     SDL_CONFIG=${SDL11_CONFIG}
4079     SDL_HEADER="SDL11/SDL.h"
4080   fi
4081   if test x${SDL_CONFIG} = xno; then
4082     # Extract the first word of "sdl12-config", so it can be a program name with args.
4083 set dummy sdl12-config; ac_word=$2
4084 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4085 echo "configure:4086: checking for $ac_word" >&5
4086 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   case "$SDL12_CONFIG" in
4090   /*)
4091   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
4092   ;;
4093   ?:/*)                  
4094   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
4095   ;;
4096   *)
4097   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4098   ac_dummy="$PATH"
4099   for ac_dir in $ac_dummy; do 
4100     test -z "$ac_dir" && ac_dir=.
4101     if test -f $ac_dir/$ac_word; then
4102       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
4103       break
4104     fi
4105   done
4106   IFS="$ac_save_ifs"
4107   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
4108   ;;
4109 esac
4110 fi
4111 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
4112 if test -n "$SDL12_CONFIG"; then
4113   echo "$ac_t""$SDL12_CONFIG" 1>&6
4114 else
4115   echo "$ac_t""no" 1>&6
4116 fi
4117
4118     SDL_CONFIG=${SDL12_CONFIG}
4119     SDL_HEADER="SDL12/SDL.h"
4120   fi
4121   if test x${SDL_CONFIG} != xno; then
4122     for ac_hdr in $SDL_HEADER
4123 do
4124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4126 echo "configure:4127: checking for $ac_hdr" >&5
4127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4128   echo $ac_n "(cached) $ac_c" 1>&6
4129 else
4130   cat > conftest.$ac_ext <<EOF
4131 #line 4132 "configure"
4132 #include "confdefs.h"
4133 #include <$ac_hdr>
4134 EOF
4135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4136 { (eval echo configure:4137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4138 if test -z "$ac_err"; then
4139   rm -rf conftest*
4140   eval "ac_cv_header_$ac_safe=yes"
4141 else
4142   echo "$ac_err" >&5
4143   echo "configure: failed program was:" >&5
4144   cat conftest.$ac_ext >&5
4145   rm -rf conftest*
4146   eval "ac_cv_header_$ac_safe=no"
4147 fi
4148 rm -f conftest*
4149 fi
4150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4151   echo "$ac_t""yes" 1>&6
4152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4153   cat >> confdefs.h <<EOF
4154 #define $ac_tr_hdr 1
4155 EOF
4156  
4157 else
4158   echo "$ac_t""no" 1>&6
4159 echo "The development package for SDL is not installed. Please install it"
4160           echo "and try again."
4161           exit 
4162 fi
4163 done
4164
4165     if expr 1.1.5 \> $($SDL_CONFIG --version) >/dev/null
4166     then
4167       echo "You need SDL version 1.1.5 or later."
4168       exit
4169     fi
4170     PLUGINS="${PLUGINS} sdl"
4171     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
4172     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
4173   elif test "x$withval" =  "xyes"
4174   then
4175     echo "I couldn't find the SDL package. You can download libSDL from"
4176     echo "http://www.libsdl.org/."
4177     exit
4178   fi
4179 fi
4180
4181 # Check whether --with-directx or --without-directx was given.
4182 if test "${with_directx+set}" = set; then
4183   withval="$with_directx"
4184    if test "x$withval" != "xno"
4185     then
4186       PLUGINS="${PLUGINS} directx"
4187       if test "x$withval" != "xyes"
4188       then
4189         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4190         INCLUDE="${INCLUDE} -I"$withval"/include"
4191       else
4192         for ac_hdr in directx.h
4193 do
4194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4196 echo "configure:4197: checking for $ac_hdr" >&5
4197 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 #include <$ac_hdr>
4204 EOF
4205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4206 { (eval echo configure:4207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4208 if test -z "$ac_err"; then
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=yes"
4211 else
4212   echo "$ac_err" >&5
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -rf conftest*
4216   eval "ac_cv_header_$ac_safe=no"
4217 fi
4218 rm -f conftest*
4219 fi
4220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4221   echo "$ac_t""yes" 1>&6
4222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4223   cat >> confdefs.h <<EOF
4224 #define $ac_tr_hdr 1
4225 EOF
4226  
4227 else
4228   echo "$ac_t""no" 1>&6
4229 echo "Cannot find DirectX headers !"; exit
4230 fi
4231 done
4232
4233         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4234       fi
4235     fi 
4236 fi
4237
4238     if test "x$withval" = "x"
4239     then
4240       for ac_hdr in directx.h
4241 do
4242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4244 echo "configure:4245: checking for $ac_hdr" >&5
4245 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4246   echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248   cat > conftest.$ac_ext <<EOF
4249 #line 4250 "configure"
4250 #include "confdefs.h"
4251 #include <$ac_hdr>
4252 EOF
4253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4254 { (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4256 if test -z "$ac_err"; then
4257   rm -rf conftest*
4258   eval "ac_cv_header_$ac_safe=yes"
4259 else
4260   echo "$ac_err" >&5
4261   echo "configure: failed program was:" >&5
4262   cat conftest.$ac_ext >&5
4263   rm -rf conftest*
4264   eval "ac_cv_header_$ac_safe=no"
4265 fi
4266 rm -f conftest*
4267 fi
4268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4269   echo "$ac_t""yes" 1>&6
4270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4271   cat >> confdefs.h <<EOF
4272 #define $ac_tr_hdr 1
4273 EOF
4274  PLUGINS="${PLUGINS} directx"
4275        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4276 else
4277   echo "$ac_t""no" 1>&6
4278 fi
4279 done
4280
4281     fi
4282
4283 # Check whether --with-glide or --without-glide was given.
4284 if test "${with_glide+set}" = set; then
4285   withval="$with_glide"
4286    if test "x$withval" != "xno"
4287     then
4288       PLUGINS="${PLUGINS} glide"
4289       if test "x$withval" != "xyes"
4290       then
4291         LIB_GLIDE="-l"$withval" -lm"
4292       else
4293         LIB_GLIDE="-lglide2x -lm"
4294       fi
4295     fi 
4296 fi
4297
4298
4299 # Check whether --enable-ncurses or --disable-ncurses was given.
4300 if test "${enable_ncurses+set}" = set; then
4301   enableval="$enable_ncurses"
4302   if test x$enable_ncurses = xyes; then
4303      PLUGINS="${PLUGINS} ncurses"
4304      LIB_NCURSES="-lncurses"
4305    fi
4306 fi
4307
4308
4309 # Check whether --enable-qt or --disable-qt was given.
4310 if test "${enable_qt+set}" = set; then
4311   enableval="$enable_qt"
4312   if test x$enable_qt = xyes; then
4313      PLUGINS="${PLUGINS} qt"
4314      ALIASES="${ALIASES} qvlc"
4315      LIB_QT="-lqt -L${QTDIR}/lib"
4316      if test -x ${QTDIR}/bin/moc
4317      then
4318        MOC=${QTDIR}/bin/moc
4319      else
4320        MOC=moc
4321      fi
4322    fi
4323 fi
4324
4325
4326 # Check whether --enable-kde or --disable-kde was given.
4327 if test "${enable_kde+set}" = set; then
4328   enableval="$enable_kde"
4329   if test x$enable_kde = xyes; then
4330      PLUGINS="${PLUGINS} kde"
4331      ALIASES="${ALIASES} kvlc"
4332      LIB_KDE="-lkfile"
4333    fi
4334 fi
4335
4336
4337 # Check whether --enable-gnome or --disable-gnome was given.
4338 if test "${enable_gnome+set}" = set; then
4339   enableval="$enable_gnome"
4340   if test x$enable_gnome = xyes; then
4341      PLUGINS="${PLUGINS} gnome"
4342      ALIASES="${ALIASES} gnome-vlc"
4343      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4344    fi
4345 fi
4346
4347
4348 # Check whether --enable-gtk or --disable-gtk was given.
4349 if test "${enable_gtk+set}" = set; then
4350   enableval="$enable_gtk"
4351   :
4352 fi
4353
4354 if test x$enable_gtk != xno
4355 then
4356   # look for gtk-config
4357   # Extract the first word of "gtk-config", so it can be a program name with args.
4358 set dummy gtk-config; ac_word=$2
4359 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4360 echo "configure:4361: checking for $ac_word" >&5
4361 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4362   echo $ac_n "(cached) $ac_c" 1>&6
4363 else
4364   case "$GTK_CONFIG" in
4365   /*)
4366   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4367   ;;
4368   ?:/*)                  
4369   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4370   ;;
4371   *)
4372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4373   ac_dummy="$PATH"
4374   for ac_dir in $ac_dummy; do 
4375     test -z "$ac_dir" && ac_dir=.
4376     if test -f $ac_dir/$ac_word; then
4377       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4378       break
4379     fi
4380   done
4381   IFS="$ac_save_ifs"
4382   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4383   ;;
4384 esac
4385 fi
4386 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4387 if test -n "$GTK_CONFIG"; then
4388   echo "$ac_t""$GTK_CONFIG" 1>&6
4389 else
4390   echo "$ac_t""no" 1>&6
4391 fi
4392
4393   if test -x ${GTK_CONFIG}
4394   then
4395     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4396     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4397   fi
4398   # now look for the gtk.h header
4399   saved_CPPFLAGS=$CPPFLAGS
4400   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
4401   for ac_hdr in gtk/gtk.h
4402 do
4403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4405 echo "configure:4406: checking for $ac_hdr" >&5
4406 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 #include <$ac_hdr>
4413 EOF
4414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4415 { (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4417 if test -z "$ac_err"; then
4418   rm -rf conftest*
4419   eval "ac_cv_header_$ac_safe=yes"
4420 else
4421   echo "$ac_err" >&5
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -rf conftest*
4425   eval "ac_cv_header_$ac_safe=no"
4426 fi
4427 rm -f conftest*
4428 fi
4429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4430   echo "$ac_t""yes" 1>&6
4431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4432   cat >> confdefs.h <<EOF
4433 #define $ac_tr_hdr 1
4434 EOF
4435  
4436     PLUGINS="${PLUGINS} gtk"
4437     ALIASES="${ALIASES} gvlc"
4438   
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442 done
4443
4444   CPPFLAGS=$saved_CPPFLAGS
4445 fi
4446
4447 # Check whether --enable-x11 or --disable-x11 was given.
4448 if test "${enable_x11+set}" = set; then
4449   enableval="$enable_x11"
4450   :
4451 fi
4452
4453 if test x$enable_x11 != xno; then
4454   if test x$x_includes = xNONE; then
4455     x_includes=/usr/X11R6/include
4456   fi
4457   if test x$x_libraries = xNONE; then
4458     x_libraries=/usr/X11R6/lib
4459   fi
4460   saved_CPPFLAGS=$CPPFLAGS
4461   CPPFLAGS="$CPPFLAGS -I$x_includes"
4462   for ac_hdr in X11/Xlib.h
4463 do
4464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4466 echo "configure:4467: checking for $ac_hdr" >&5
4467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4468   echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470   cat > conftest.$ac_ext <<EOF
4471 #line 4472 "configure"
4472 #include "confdefs.h"
4473 #include <$ac_hdr>
4474 EOF
4475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4476 { (eval echo configure:4477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4478 if test -z "$ac_err"; then
4479   rm -rf conftest*
4480   eval "ac_cv_header_$ac_safe=yes"
4481 else
4482   echo "$ac_err" >&5
4483   echo "configure: failed program was:" >&5
4484   cat conftest.$ac_ext >&5
4485   rm -rf conftest*
4486   eval "ac_cv_header_$ac_safe=no"
4487 fi
4488 rm -f conftest*
4489 fi
4490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4491   echo "$ac_t""yes" 1>&6
4492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4493   cat >> confdefs.h <<EOF
4494 #define $ac_tr_hdr 1
4495 EOF
4496  
4497     PLUGINS="${PLUGINS} x11"
4498     LIB_X11="-L$x_libraries -lX11 -lXext"
4499     CFLAGS_X11="-I$x_includes"
4500   
4501   CPPFLAGS=$saved_CPPFLAGS
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505 done
4506
4507 fi
4508
4509 # Check whether --enable-xvideo or --disable-xvideo was given.
4510 if test "${enable_xvideo+set}" = set; then
4511   enableval="$enable_xvideo"
4512   :
4513 fi
4514
4515 if test x$enable_xvideo != xno; then
4516   if test x$x_includes = xNONE; then
4517     x_includes=/usr/X11R6/include
4518   fi
4519   if test x$x_libraries = xNONE; then
4520     x_libraries=/usr/X11R6/lib
4521   fi
4522   saved_CPPFLAGS=$CPPFLAGS
4523   CPPFLAGS="$CPPFLAGS -I$x_includes"
4524   for ac_hdr in X11/extensions/Xv.h
4525 do
4526 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4527 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4528 echo "configure:4529: checking for $ac_hdr" >&5
4529 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   cat > conftest.$ac_ext <<EOF
4533 #line 4534 "configure"
4534 #include "confdefs.h"
4535 #include <$ac_hdr>
4536 EOF
4537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4538 { (eval echo configure:4539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4540 if test -z "$ac_err"; then
4541   rm -rf conftest*
4542   eval "ac_cv_header_$ac_safe=yes"
4543 else
4544   echo "$ac_err" >&5
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -rf conftest*
4548   eval "ac_cv_header_$ac_safe=no"
4549 fi
4550 rm -f conftest*
4551 fi
4552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4553   echo "$ac_t""yes" 1>&6
4554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4555   cat >> confdefs.h <<EOF
4556 #define $ac_tr_hdr 1
4557 EOF
4558  
4559     PLUGINS="${PLUGINS} xvideo"
4560     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4561     CFLAGS_X11="-I$x_includes"
4562   
4563   CPPFLAGS=$saved_CPPFLAGS
4564 else
4565   echo "$ac_t""no" 1>&6
4566 fi
4567 done
4568
4569 fi
4570
4571 # Check whether --enable-alsa or --disable-alsa was given.
4572 if test "${enable_alsa+set}" = set; then
4573   enableval="$enable_alsa"
4574   if test x$enable_alsa = xyes
4575    then
4576      ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4577 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4578 echo "configure:4579: checking for sys/asoundlib.h" >&5
4579 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   cat > conftest.$ac_ext <<EOF
4583 #line 4584 "configure"
4584 #include "confdefs.h"
4585 #include <sys/asoundlib.h>
4586 EOF
4587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4588 { (eval echo configure:4589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4590 if test -z "$ac_err"; then
4591   rm -rf conftest*
4592   eval "ac_cv_header_$ac_safe=yes"
4593 else
4594   echo "$ac_err" >&5
4595   echo "configure: failed program was:" >&5
4596   cat conftest.$ac_ext >&5
4597   rm -rf conftest*
4598   eval "ac_cv_header_$ac_safe=no"
4599 fi
4600 rm -f conftest*
4601 fi
4602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4603   echo "$ac_t""yes" 1>&6
4604   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4605 echo "configure:4606: checking for main in -lasound" >&5
4606 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4608   echo $ac_n "(cached) $ac_c" 1>&6
4609 else
4610   ac_save_LIBS="$LIBS"
4611 LIBS="-lasound  $LIBS"
4612 cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615
4616 int main() {
4617 main()
4618 ; return 0; }
4619 EOF
4620 if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4621   rm -rf conftest*
4622   eval "ac_cv_lib_$ac_lib_var=yes"
4623 else
4624   echo "configure: failed program was:" >&5
4625   cat conftest.$ac_ext >&5
4626   rm -rf conftest*
4627   eval "ac_cv_lib_$ac_lib_var=no"
4628 fi
4629 rm -f conftest*
4630 LIBS="$ac_save_LIBS"
4631
4632 fi
4633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4634   echo "$ac_t""yes" 1>&6
4635   have_alsa="true"
4636 else
4637   echo "$ac_t""no" 1>&6
4638 have_alsa="false"
4639 fi
4640
4641 else
4642   echo "$ac_t""no" 1>&6
4643 have_alsa="false"
4644 fi
4645
4646      if test x$have_alsa = xtrue
4647      then
4648        PLUGINS="${PLUGINS} alsa"
4649        LIB_ALSA="-lasound"
4650      fi
4651    fi
4652 fi
4653
4654
4655 fi
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710 trap '' 1 2 15
4711 cat > confcache <<\EOF
4712 # This file is a shell script that caches the results of configure
4713 # tests run on this system so they can be shared between configure
4714 # scripts and configure runs.  It is not useful on other systems.
4715 # If it contains results you don't want to keep, you may remove or edit it.
4716 #
4717 # By default, configure uses ./config.cache as the cache file,
4718 # creating it if it does not exist already.  You can give configure
4719 # the --cache-file=FILE option to use a different cache file; that is
4720 # what configure does when it calls configure scripts in
4721 # subdirectories, so they share the cache.
4722 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4723 # config.status only pays attention to the cache file if you give it the
4724 # --recheck option to rerun configure.
4725 #
4726 EOF
4727 # The following way of writing the cache mishandles newlines in values,
4728 # but we know of no workaround that is simple, portable, and efficient.
4729 # So, don't put newlines in cache variables' values.
4730 # Ultrix sh set writes to stderr and can't be redirected directly,
4731 # and sets the high bit in the cache file unless we assign to the vars.
4732 (set) 2>&1 |
4733   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4734   *ac_space=\ *)
4735     # `set' does not quote correctly, so add quotes (double-quote substitution
4736     # turns \\\\ into \\, and sed turns \\ into \).
4737     sed -n \
4738       -e "s/'/'\\\\''/g" \
4739       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4740     ;;
4741   *)
4742     # `set' quotes correctly as required by POSIX, so do not add quotes.
4743     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4744     ;;
4745   esac >> confcache
4746 if cmp -s $cache_file confcache; then
4747   :
4748 else
4749   if test -w $cache_file; then
4750     echo "updating cache $cache_file"
4751     cat confcache > $cache_file
4752   else
4753     echo "not updating unwritable cache $cache_file"
4754   fi
4755 fi
4756 rm -f confcache
4757
4758 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4759
4760 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4761 # Let make expand exec_prefix.
4762 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4763
4764 # Any assignment to VPATH causes Sun make to only execute
4765 # the first set of double-colon rules, so remove it if not needed.
4766 # If there is a colon in the path, we need to keep it.
4767 if test "x$srcdir" = x.; then
4768   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4769 fi
4770
4771 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4772
4773 DEFS=-DHAVE_CONFIG_H
4774
4775 # Without the "./", some shells look in PATH for config.status.
4776 : ${CONFIG_STATUS=./config.status}
4777
4778 echo creating $CONFIG_STATUS
4779 rm -f $CONFIG_STATUS
4780 cat > $CONFIG_STATUS <<EOF
4781 #! /bin/sh
4782 # Generated automatically by configure.
4783 # Run this file to recreate the current configuration.
4784 # This directory was configured as follows,
4785 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4786 #
4787 # $0 $ac_configure_args
4788 #
4789 # Compiler output produced by configure, useful for debugging
4790 # configure, is in ./config.log if it exists.
4791
4792 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4793 for ac_option
4794 do
4795   case "\$ac_option" in
4796   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4797     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4798     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4799   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4800     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4801     exit 0 ;;
4802   -help | --help | --hel | --he | --h)
4803     echo "\$ac_cs_usage"; exit 0 ;;
4804   *) echo "\$ac_cs_usage"; exit 1 ;;
4805   esac
4806 done
4807
4808 ac_given_srcdir=$srcdir
4809 ac_given_INSTALL="$INSTALL"
4810
4811 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4812 EOF
4813 cat >> $CONFIG_STATUS <<EOF
4814
4815 # Protect against being on the right side of a sed subst in config.status.
4816 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4817  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4818 $ac_vpsub
4819 $extrasub
4820 s%@SHELL@%$SHELL%g
4821 s%@CFLAGS@%$CFLAGS%g
4822 s%@CPPFLAGS@%$CPPFLAGS%g
4823 s%@CXXFLAGS@%$CXXFLAGS%g
4824 s%@FFLAGS@%$FFLAGS%g
4825 s%@DEFS@%$DEFS%g
4826 s%@LDFLAGS@%$LDFLAGS%g
4827 s%@LIBS@%$LIBS%g
4828 s%@exec_prefix@%$exec_prefix%g
4829 s%@prefix@%$prefix%g
4830 s%@program_transform_name@%$program_transform_name%g
4831 s%@bindir@%$bindir%g
4832 s%@sbindir@%$sbindir%g
4833 s%@libexecdir@%$libexecdir%g
4834 s%@datadir@%$datadir%g
4835 s%@sysconfdir@%$sysconfdir%g
4836 s%@sharedstatedir@%$sharedstatedir%g
4837 s%@localstatedir@%$localstatedir%g
4838 s%@libdir@%$libdir%g
4839 s%@includedir@%$includedir%g
4840 s%@oldincludedir@%$oldincludedir%g
4841 s%@infodir@%$infodir%g
4842 s%@mandir@%$mandir%g
4843 s%@host@%$host%g
4844 s%@host_alias@%$host_alias%g
4845 s%@host_cpu@%$host_cpu%g
4846 s%@host_vendor@%$host_vendor%g
4847 s%@host_os@%$host_os%g
4848 s%@VLC_VERSION@%$VLC_VERSION%g
4849 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
4850 s%@VLC_CODENAME@%$VLC_CODENAME%g
4851 s%@SET_MAKE@%$SET_MAKE%g
4852 s%@CC@%$CC%g
4853 s%@CPP@%$CPP%g
4854 s%@RANLIB@%$RANLIB%g
4855 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4856 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4857 s%@INSTALL_DATA@%$INSTALL_DATA%g
4858 s%@ESD_CONFIG@%$ESD_CONFIG%g
4859 s%@SDL_CONFIG@%$SDL_CONFIG%g
4860 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
4861 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
4862 s%@GTK_CONFIG@%$GTK_CONFIG%g
4863 s%@SYS@%$SYS%g
4864 s%@ARCH@%$ARCH%g
4865 s%@PLUGINS@%$PLUGINS%g
4866 s%@BUILTINS@%$BUILTINS%g
4867 s%@ALIASES@%$ALIASES%g
4868 s%@DEFINE@%$DEFINE%g
4869 s%@INCLUDE@%$INCLUDE%g
4870 s%@DEBUG@%$DEBUG%g
4871 s%@STATS@%$STATS%g
4872 s%@ASM@%$ASM%g
4873 s%@TRACE@%$TRACE%g
4874 s%@PROFILING@%$PROFILING%g
4875 s%@OPTIMS@%$OPTIMS%g
4876 s%@GETOPT@%$GETOPT%g
4877 s%@CSS@%$CSS%g
4878 s%@MOC@%$MOC%g
4879 s%@WINDRES@%$WINDRES%g
4880 s%@LCFLAGS@%$LCFLAGS%g
4881 s%@PLCFLAGS@%$PLCFLAGS%g
4882 s%@LIB@%$LIB%g
4883 s%@LIB_ALSA@%$LIB_ALSA%g
4884 s%@LIB_BEOS@%$LIB_BEOS%g
4885 s%@LIB_DARWIN@%$LIB_DARWIN%g
4886 s%@LIB_DVD@%$LIB_DVD%g
4887 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
4888 s%@LIB_ESD@%$LIB_ESD%g
4889 s%@LIB_GGI@%$LIB_GGI%g
4890 s%@LIB_GLIDE@%$LIB_GLIDE%g
4891 s%@LIB_GNOME@%$LIB_GNOME%g
4892 s%@LIB_GTK@%$LIB_GTK%g
4893 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4894 s%@LIB_KDE@%$LIB_KDE%g
4895 s%@LIB_MACOSX@%$LIB_MACOSX%g
4896 s%@LIB_QNX@%$LIB_QNX%g
4897 s%@LIB_NCURSES@%$LIB_NCURSES%g
4898 s%@LIB_QT@%$LIB_QT%g
4899 s%@LIB_TS@%$LIB_TS%g
4900 s%@LIB_SDL@%$LIB_SDL%g
4901 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4902 s%@LIB_X11@%$LIB_X11%g
4903 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4904 s%@LIB_YUV@%$LIB_YUV%g
4905 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4906 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4907 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4908 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4909 s%@CFLAGS_X11@%$CFLAGS_X11%g
4910 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4911
4912 CEOF
4913 EOF
4914
4915 cat >> $CONFIG_STATUS <<\EOF
4916
4917 # Split the substitutions into bite-sized pieces for seds with
4918 # small command number limits, like on Digital OSF/1 and HP-UX.
4919 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4920 ac_file=1 # Number of current file.
4921 ac_beg=1 # First line for current file.
4922 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4923 ac_more_lines=:
4924 ac_sed_cmds=""
4925 while $ac_more_lines; do
4926   if test $ac_beg -gt 1; then
4927     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4928   else
4929     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4930   fi
4931   if test ! -s conftest.s$ac_file; then
4932     ac_more_lines=false
4933     rm -f conftest.s$ac_file
4934   else
4935     if test -z "$ac_sed_cmds"; then
4936       ac_sed_cmds="sed -f conftest.s$ac_file"
4937     else
4938       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4939     fi
4940     ac_file=`expr $ac_file + 1`
4941     ac_beg=$ac_end
4942     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4943   fi
4944 done
4945 if test -z "$ac_sed_cmds"; then
4946   ac_sed_cmds=cat
4947 fi
4948 EOF
4949
4950 cat >> $CONFIG_STATUS <<EOF
4951
4952 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4953 EOF
4954 cat >> $CONFIG_STATUS <<\EOF
4955 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4956   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4957   case "$ac_file" in
4958   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4959        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4960   *) ac_file_in="${ac_file}.in" ;;
4961   esac
4962
4963   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4964
4965   # Remove last slash and all that follows it.  Not all systems have dirname.
4966   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4967   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4968     # The file is in a subdirectory.
4969     test ! -d "$ac_dir" && mkdir "$ac_dir"
4970     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4971     # A "../" for each directory in $ac_dir_suffix.
4972     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4973   else
4974     ac_dir_suffix= ac_dots=
4975   fi
4976
4977   case "$ac_given_srcdir" in
4978   .)  srcdir=.
4979       if test -z "$ac_dots"; then top_srcdir=.
4980       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4981   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4982   *) # Relative path.
4983     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4984     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4985   esac
4986
4987   case "$ac_given_INSTALL" in
4988   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4989   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4990   esac
4991
4992   echo creating "$ac_file"
4993   rm -f "$ac_file"
4994   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4995   case "$ac_file" in
4996   *Makefile*) ac_comsub="1i\\
4997 # $configure_input" ;;
4998   *) ac_comsub= ;;
4999   esac
5000
5001   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5002   sed -e "$ac_comsub
5003 s%@configure_input@%$configure_input%g
5004 s%@srcdir@%$srcdir%g
5005 s%@top_srcdir@%$top_srcdir%g
5006 s%@INSTALL@%$INSTALL%g
5007 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5008 fi; done
5009 rm -f conftest.s*
5010
5011 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5012 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5013 #
5014 # ac_d sets the value in "#define NAME VALUE" lines.
5015 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5016 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5017 ac_dC='\3'
5018 ac_dD='%g'
5019 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5020 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5021 ac_uB='\([      ]\)%\1#\2define\3'
5022 ac_uC=' '
5023 ac_uD='\4%g'
5024 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5025 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5026 ac_eB='$%\1#\2define\3'
5027 ac_eC=' '
5028 ac_eD='%g'
5029
5030 if test "${CONFIG_HEADERS+set}" != set; then
5031 EOF
5032 cat >> $CONFIG_STATUS <<EOF
5033   CONFIG_HEADERS="include/defs.h"
5034 EOF
5035 cat >> $CONFIG_STATUS <<\EOF
5036 fi
5037 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5038   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5039   case "$ac_file" in
5040   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5041        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5042   *) ac_file_in="${ac_file}.in" ;;
5043   esac
5044
5045   echo creating $ac_file
5046
5047   rm -f conftest.frag conftest.in conftest.out
5048   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5049   cat $ac_file_inputs > conftest.in
5050
5051 EOF
5052
5053 # Transform confdefs.h into a sed script conftest.vals that substitutes
5054 # the proper values into config.h.in to produce config.h.  And first:
5055 # Protect against being on the right side of a sed subst in config.status.
5056 # Protect against being in an unquoted here document in config.status.
5057 rm -f conftest.vals
5058 cat > conftest.hdr <<\EOF
5059 s/[\\&%]/\\&/g
5060 s%[\\$`]%\\&%g
5061 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5062 s%ac_d%ac_u%gp
5063 s%ac_u%ac_e%gp
5064 EOF
5065 sed -n -f conftest.hdr confdefs.h > conftest.vals
5066 rm -f conftest.hdr
5067
5068 # This sed command replaces #undef with comments.  This is necessary, for
5069 # example, in the case of _POSIX_SOURCE, which is predefined and required
5070 # on some systems where configure will not decide to define it.
5071 cat >> conftest.vals <<\EOF
5072 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5073 EOF
5074
5075 # Break up conftest.vals because some shells have a limit on
5076 # the size of here documents, and old seds have small limits too.
5077
5078 rm -f conftest.tail
5079 while :
5080 do
5081   ac_lines=`grep -c . conftest.vals`
5082   # grep -c gives empty output for an empty file on some AIX systems.
5083   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5084   # Write a limited-size here document to conftest.frag.
5085   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5086   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5087   echo 'CEOF
5088   sed -f conftest.frag conftest.in > conftest.out
5089   rm -f conftest.in
5090   mv conftest.out conftest.in
5091 ' >> $CONFIG_STATUS
5092   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5093   rm -f conftest.vals
5094   mv conftest.tail conftest.vals
5095 done
5096 rm -f conftest.vals
5097
5098 cat >> $CONFIG_STATUS <<\EOF
5099   rm -f conftest.frag conftest.h
5100   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5101   cat conftest.in >> conftest.h
5102   rm -f conftest.in
5103   if cmp -s $ac_file conftest.h 2>/dev/null; then
5104     echo "$ac_file is unchanged"
5105     rm -f conftest.h
5106   else
5107     # Remove last slash and all that follows it.  Not all systems have dirname.
5108       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5109       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5110       # The file is in a subdirectory.
5111       test ! -d "$ac_dir" && mkdir "$ac_dir"
5112     fi
5113     rm -f $ac_file
5114     mv conftest.h $ac_file
5115   fi
5116 fi; done
5117
5118 EOF
5119 cat >> $CONFIG_STATUS <<EOF
5120
5121 EOF
5122 cat >> $CONFIG_STATUS <<\EOF
5123
5124 exit 0
5125 EOF
5126 chmod +x $CONFIG_STATUS
5127 rm -fr confdefs* $ac_clean_files
5128 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5129
5130
5131 echo "
5132 global configuration
5133 --------------------
5134 system                : ${SYS}
5135 architecture          : ${ARCH}
5136 optimizations         : ${OPTIMS}
5137
5138 vlc configuration
5139 -----------------
5140 vlc version           : ${VLC_VERSION}
5141 debug mode            : ${DEBUG}
5142 statistics            : ${STATS}
5143 trace mode            : ${TRACE}
5144 profiling             : ${PROFILING}
5145 need builtin getopt   : ${GETOPT}
5146 built-in modules      :${BUILTINS}
5147 plugin modules        :${PLUGINS}
5148 vlc aliases           :${ALIASES}
5149
5150 libdvdcss configuration
5151 -----------------------
5152 need to be built      : ${LOCAL_LIBDVDCSS}"
5153
5154 if test x${LOCAL_LIBDVDCSS} = x1
5155 then
5156   echo "link statically       : ${STATIC_LIBDVDCSS}
5157 CSS decryption        : ${CSS}"
5158 fi
5159
5160 echo "
5161 You may now tune Makefile.opts at your convenience. To build vlc and its
5162 plugins, type \`make vlc plugins'. If you want to build libdvdcss only,
5163 type \`make libdvdcss'."
5164