]> git.sesse.net Git - vlc/blob - configure
3f33f05c811bf8d785250d8700c0737d05f75a1d
[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 #include <stdlib.h>
2128 #include <sys/stat.h>
2129
2130 #ifdef HAVE_UNISTD_H
2131 # include <unistd.h>
2132 #endif
2133
2134 /* This mess was copied from the GNU getpagesize.h.  */
2135 #ifndef HAVE_GETPAGESIZE
2136
2137 /* Assume that all systems that can run configure have sys/param.h.  */
2138 # ifndef HAVE_SYS_PARAM_H
2139 #  define HAVE_SYS_PARAM_H 1
2140 # endif
2141
2142 # ifdef _SC_PAGESIZE
2143 #  define getpagesize() sysconf(_SC_PAGESIZE)
2144 # else /* no _SC_PAGESIZE */
2145 #  ifdef HAVE_SYS_PARAM_H
2146 #   include <sys/param.h>
2147 #   ifdef EXEC_PAGESIZE
2148 #    define getpagesize() EXEC_PAGESIZE
2149 #   else /* no EXEC_PAGESIZE */
2150 #    ifdef NBPG
2151 #     define getpagesize() NBPG * CLSIZE
2152 #     ifndef CLSIZE
2153 #      define CLSIZE 1
2154 #     endif /* no CLSIZE */
2155 #    else /* no NBPG */
2156 #     ifdef NBPC
2157 #      define getpagesize() NBPC
2158 #     else /* no NBPC */
2159 #      ifdef PAGESIZE
2160 #       define getpagesize() PAGESIZE
2161 #      endif /* PAGESIZE */
2162 #     endif /* no NBPC */
2163 #    endif /* no NBPG */
2164 #   endif /* no EXEC_PAGESIZE */
2165 #  else /* no HAVE_SYS_PARAM_H */
2166 #   define getpagesize() 8192   /* punt totally */
2167 #  endif /* no HAVE_SYS_PARAM_H */
2168 # endif /* no _SC_PAGESIZE */
2169
2170 #endif /* no HAVE_GETPAGESIZE */
2171
2172 #ifdef __cplusplus
2173 extern "C" { void *malloc(unsigned); }
2174 #else
2175 char *malloc();
2176 #endif
2177
2178 int
2179 main()
2180 {
2181         char *data, *data2, *data3;
2182         int i, pagesize;
2183         int fd;
2184
2185         pagesize = getpagesize();
2186
2187         /*
2188          * First, make a file with some known garbage in it.
2189          */
2190         data = (char*)malloc(pagesize);
2191         if (!data)
2192                 exit(1);
2193         for (i = 0; i < pagesize; ++i)
2194                 *(data + i) = rand();
2195         umask(0);
2196         fd = creat("conftestmmap", 0600);
2197         if (fd < 0)
2198                 exit(1);
2199         if (write(fd, data, pagesize) != pagesize)
2200                 exit(1);
2201         close(fd);
2202
2203         /*
2204          * Next, try to mmap the file at a fixed address which
2205          * already has something else allocated at it.  If we can,
2206          * also make sure that we see the same garbage.
2207          */
2208         fd = open("conftestmmap", O_RDWR);
2209         if (fd < 0)
2210                 exit(1);
2211         data2 = (char*)malloc(2 * pagesize);
2212         if (!data2)
2213                 exit(1);
2214         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2215         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2216             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2217                 exit(1);
2218         for (i = 0; i < pagesize; ++i)
2219                 if (*(data + i) != *(data2 + i))
2220                         exit(1);
2221
2222         /*
2223          * Finally, make sure that changes to the mapped area
2224          * do not percolate back to the file as seen by read().
2225          * (This is a bug on some variants of i386 svr4.0.)
2226          */
2227         for (i = 0; i < pagesize; ++i)
2228                 *(data2 + i) = *(data2 + i) + 1;
2229         data3 = (char*)malloc(pagesize);
2230         if (!data3)
2231                 exit(1);
2232         if (read(fd, data3, pagesize) != pagesize)
2233                 exit(1);
2234         for (i = 0; i < pagesize; ++i)
2235                 if (*(data + i) != *(data3 + i))
2236                         exit(1);
2237         close(fd);
2238         unlink("conftestmmap");
2239         exit(0);
2240 }
2241
2242 EOF
2243 if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2244 then
2245   ac_cv_func_mmap_fixed_mapped=yes
2246 else
2247   echo "configure: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   rm -fr conftest*
2250   ac_cv_func_mmap_fixed_mapped=no
2251 fi
2252 rm -fr conftest*
2253 fi
2254
2255 fi
2256
2257 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2258 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2259   cat >> confdefs.h <<\EOF
2260 #define HAVE_MMAP 1
2261 EOF
2262
2263 fi
2264
2265 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2266 echo "configure:2267: checking return type of signal handlers" >&5
2267 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2268   echo $ac_n "(cached) $ac_c" 1>&6
2269 else
2270   cat > conftest.$ac_ext <<EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2273 #include <sys/types.h>
2274 #include <signal.h>
2275 #ifdef signal
2276 #undef signal
2277 #endif
2278 #ifdef __cplusplus
2279 extern "C" void (*signal (int, void (*)(int)))(int);
2280 #else
2281 void (*signal ()) ();
2282 #endif
2283
2284 int main() {
2285 int i;
2286 ; return 0; }
2287 EOF
2288 if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2289   rm -rf conftest*
2290   ac_cv_type_signal=void
2291 else
2292   echo "configure: failed program was:" >&5
2293   cat conftest.$ac_ext >&5
2294   rm -rf conftest*
2295   ac_cv_type_signal=int
2296 fi
2297 rm -f conftest*
2298 fi
2299
2300 echo "$ac_t""$ac_cv_type_signal" 1>&6
2301 cat >> confdefs.h <<EOF
2302 #define RETSIGTYPE $ac_cv_type_signal
2303 EOF
2304
2305
2306 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2307 echo "configure:2308: checking for dlopen in -ldl" >&5
2308 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2309 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2310   echo $ac_n "(cached) $ac_c" 1>&6
2311 else
2312   ac_save_LIBS="$LIBS"
2313 LIBS="-ldl  $LIBS"
2314 cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 /* Override any gcc2 internal prototype to avoid an error.  */
2318 /* We use char because int might match the return type of a gcc2
2319     builtin and then its argument prototype would still apply.  */
2320 char dlopen();
2321
2322 int main() {
2323 dlopen()
2324 ; return 0; }
2325 EOF
2326 if { (eval echo configure:2327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2327   rm -rf conftest*
2328   eval "ac_cv_lib_$ac_lib_var=yes"
2329 else
2330   echo "configure: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   rm -rf conftest*
2333   eval "ac_cv_lib_$ac_lib_var=no"
2334 fi
2335 rm -f conftest*
2336 LIBS="$ac_save_LIBS"
2337
2338 fi
2339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2340   echo "$ac_t""yes" 1>&6
2341   LIB="${LIB} -ldl"
2342 else
2343   echo "$ac_t""no" 1>&6
2344 fi
2345
2346 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
2347 echo "configure:2348: checking for pow in -lm" >&5
2348 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
2349 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2350   echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352   ac_save_LIBS="$LIBS"
2353 LIBS="-lm  $LIBS"
2354 cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 /* Override any gcc2 internal prototype to avoid an error.  */
2358 /* We use char because int might match the return type of a gcc2
2359     builtin and then its argument prototype would still apply.  */
2360 char pow();
2361
2362 int main() {
2363 pow()
2364 ; return 0; }
2365 EOF
2366 if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2367   rm -rf conftest*
2368   eval "ac_cv_lib_$ac_lib_var=yes"
2369 else
2370   echo "configure: failed program was:" >&5
2371   cat conftest.$ac_ext >&5
2372   rm -rf conftest*
2373   eval "ac_cv_lib_$ac_lib_var=no"
2374 fi
2375 rm -f conftest*
2376 LIBS="$ac_save_LIBS"
2377
2378 fi
2379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2380   echo "$ac_t""yes" 1>&6
2381   LIB_YUV="${LIB_YUV} -lm"
2382 else
2383   echo "$ac_t""no" 1>&6
2384 fi
2385
2386
2387 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
2388 CFLAGS="${CFLAGS} -I/usr/local/include"
2389
2390 PTHREAD_LIBS=error
2391 echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
2392 echo "configure:2393: checking for pthread_attr_init in -lpthread" >&5
2393 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2395   echo $ac_n "(cached) $ac_c" 1>&6
2396 else
2397   ac_save_LIBS="$LIBS"
2398 LIBS="-lpthread  $LIBS"
2399 cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 /* Override any gcc2 internal prototype to avoid an error.  */
2403 /* We use char because int might match the return type of a gcc2
2404     builtin and then its argument prototype would still apply.  */
2405 char pthread_attr_init();
2406
2407 int main() {
2408 pthread_attr_init()
2409 ; return 0; }
2410 EOF
2411 if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2412   rm -rf conftest*
2413   eval "ac_cv_lib_$ac_lib_var=yes"
2414 else
2415   echo "configure: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   rm -rf conftest*
2418   eval "ac_cv_lib_$ac_lib_var=no"
2419 fi
2420 rm -f conftest*
2421 LIBS="$ac_save_LIBS"
2422
2423 fi
2424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2425   echo "$ac_t""yes" 1>&6
2426   THREAD_LIB="-lpthread"
2427 else
2428   echo "$ac_t""no" 1>&6
2429 fi
2430
2431 if test "x${THREAD_LIB}" = xerror; then
2432   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
2433 echo "configure:2434: checking for pthread_attr_init in -lpthreads" >&5
2434 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2435 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2436   echo $ac_n "(cached) $ac_c" 1>&6
2437 else
2438   ac_save_LIBS="$LIBS"
2439 LIBS="-lpthreads  $LIBS"
2440 cat > conftest.$ac_ext <<EOF
2441 #line 2442 "configure"
2442 #include "confdefs.h"
2443 /* Override any gcc2 internal prototype to avoid an error.  */
2444 /* We use char because int might match the return type of a gcc2
2445     builtin and then its argument prototype would still apply.  */
2446 char pthread_attr_init();
2447
2448 int main() {
2449 pthread_attr_init()
2450 ; return 0; }
2451 EOF
2452 if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2453   rm -rf conftest*
2454   eval "ac_cv_lib_$ac_lib_var=yes"
2455 else
2456   echo "configure: failed program was:" >&5
2457   cat conftest.$ac_ext >&5
2458   rm -rf conftest*
2459   eval "ac_cv_lib_$ac_lib_var=no"
2460 fi
2461 rm -f conftest*
2462 LIBS="$ac_save_LIBS"
2463
2464 fi
2465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2466   echo "$ac_t""yes" 1>&6
2467   THREAD_LIB="-lpthreads"
2468 else
2469   echo "$ac_t""no" 1>&6
2470 fi
2471
2472 fi
2473 if test "x${THREAD_LIB}" = xerror; then
2474   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
2475 echo "configure:2476: checking for pthread_attr_init in -lc_r" >&5
2476 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2477 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   ac_save_LIBS="$LIBS"
2481 LIBS="-lc_r  $LIBS"
2482 cat > conftest.$ac_ext <<EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2485 /* Override any gcc2 internal prototype to avoid an error.  */
2486 /* We use char because int might match the return type of a gcc2
2487     builtin and then its argument prototype would still apply.  */
2488 char pthread_attr_init();
2489
2490 int main() {
2491 pthread_attr_init()
2492 ; return 0; }
2493 EOF
2494 if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2495   rm -rf conftest*
2496   eval "ac_cv_lib_$ac_lib_var=yes"
2497 else
2498   echo "configure: failed program was:" >&5
2499   cat conftest.$ac_ext >&5
2500   rm -rf conftest*
2501   eval "ac_cv_lib_$ac_lib_var=no"
2502 fi
2503 rm -f conftest*
2504 LIBS="$ac_save_LIBS"
2505
2506 fi
2507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2508   echo "$ac_t""yes" 1>&6
2509   THREAD_LIB="-lc_r"
2510 else
2511   echo "$ac_t""no" 1>&6
2512 fi
2513
2514 fi
2515 if test "x${THREAD_LIB}" = xerror; then
2516   THREAD_LIBS=""
2517   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
2518 echo "configure:2519: checking for pthread_attr_init" >&5
2519 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
2520   echo $ac_n "(cached) $ac_c" 1>&6
2521 else
2522   cat > conftest.$ac_ext <<EOF
2523 #line 2524 "configure"
2524 #include "confdefs.h"
2525 /* System header to define __stub macros and hopefully few prototypes,
2526     which can conflict with char pthread_attr_init(); below.  */
2527 #include <assert.h>
2528 /* Override any gcc2 internal prototype to avoid an error.  */
2529 /* We use char because int might match the return type of a gcc2
2530     builtin and then its argument prototype would still apply.  */
2531 char pthread_attr_init();
2532
2533 int main() {
2534
2535 /* The GNU C library defines this for functions which it implements
2536     to always fail with ENOSYS.  Some functions are actually named
2537     something starting with __ and the normal name is an alias.  */
2538 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
2539 choke me
2540 #else
2541 pthread_attr_init();
2542 #endif
2543
2544 ; return 0; }
2545 EOF
2546 if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2547   rm -rf conftest*
2548   eval "ac_cv_func_pthread_attr_init=yes"
2549 else
2550   echo "configure: failed program was:" >&5
2551   cat conftest.$ac_ext >&5
2552   rm -rf conftest*
2553   eval "ac_cv_func_pthread_attr_init=no"
2554 fi
2555 rm -f conftest*
2556 fi
2557
2558 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
2559   echo "$ac_t""yes" 1>&6
2560   :
2561 else
2562   echo "$ac_t""no" 1>&6
2563 fi
2564
2565 fi
2566
2567 cat > conftest.$ac_ext <<EOF
2568 #line 2569 "configure"
2569 #include "confdefs.h"
2570 #include <pthread.h>
2571 EOF
2572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2573   egrep "pthread_cond_t" >/dev/null 2>&1; then
2574   rm -rf conftest*
2575   
2576   cat >> confdefs.h <<\EOF
2577 #define PTHREAD_COND_T_IN_PTHREAD_H 1
2578 EOF
2579
2580 fi
2581 rm -f conftest*
2582
2583 cat > conftest.$ac_ext <<EOF
2584 #line 2585 "configure"
2585 #include "confdefs.h"
2586 #include <strings.h>
2587 EOF
2588 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2589   egrep "strncasecmp" >/dev/null 2>&1; then
2590   rm -rf conftest*
2591   
2592   cat >> confdefs.h <<\EOF
2593 #define STRNCASECMP_IN_STRINGS_H 1
2594 EOF
2595
2596 fi
2597 rm -f conftest*
2598
2599
2600 for ac_hdr in stddef.h getopt.h strings.h
2601 do
2602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2603 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2604 echo "configure:2605: checking for $ac_hdr" >&5
2605 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2606   echo $ac_n "(cached) $ac_c" 1>&6
2607 else
2608   cat > conftest.$ac_ext <<EOF
2609 #line 2610 "configure"
2610 #include "confdefs.h"
2611 #include <$ac_hdr>
2612 EOF
2613 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2614 { (eval echo configure:2615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2615 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2616 if test -z "$ac_err"; then
2617   rm -rf conftest*
2618   eval "ac_cv_header_$ac_safe=yes"
2619 else
2620   echo "$ac_err" >&5
2621   echo "configure: failed program was:" >&5
2622   cat conftest.$ac_ext >&5
2623   rm -rf conftest*
2624   eval "ac_cv_header_$ac_safe=no"
2625 fi
2626 rm -f conftest*
2627 fi
2628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2629   echo "$ac_t""yes" 1>&6
2630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2631   cat >> confdefs.h <<EOF
2632 #define $ac_tr_hdr 1
2633 EOF
2634  
2635 else
2636   echo "$ac_t""no" 1>&6
2637 fi
2638 done
2639
2640 for ac_hdr in sys/sockio.h fcntl.h sys/time.h
2641 do
2642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2644 echo "configure:2645: checking for $ac_hdr" >&5
2645 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2646   echo $ac_n "(cached) $ac_c" 1>&6
2647 else
2648   cat > conftest.$ac_ext <<EOF
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651 #include <$ac_hdr>
2652 EOF
2653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2654 { (eval echo configure:2655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2656 if test -z "$ac_err"; then
2657   rm -rf conftest*
2658   eval "ac_cv_header_$ac_safe=yes"
2659 else
2660   echo "$ac_err" >&5
2661   echo "configure: failed program was:" >&5
2662   cat conftest.$ac_ext >&5
2663   rm -rf conftest*
2664   eval "ac_cv_header_$ac_safe=no"
2665 fi
2666 rm -f conftest*
2667 fi
2668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2669   echo "$ac_t""yes" 1>&6
2670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2671   cat >> confdefs.h <<EOF
2672 #define $ac_tr_hdr 1
2673 EOF
2674  
2675 else
2676   echo "$ac_t""no" 1>&6
2677 fi
2678 done
2679
2680 for ac_hdr in sys/soundcard.h machine/soundcard.h
2681 do
2682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2684 echo "configure:2685: checking for $ac_hdr" >&5
2685 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2686   echo $ac_n "(cached) $ac_c" 1>&6
2687 else
2688   cat > conftest.$ac_ext <<EOF
2689 #line 2690 "configure"
2690 #include "confdefs.h"
2691 #include <$ac_hdr>
2692 EOF
2693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2694 { (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2696 if test -z "$ac_err"; then
2697   rm -rf conftest*
2698   eval "ac_cv_header_$ac_safe=yes"
2699 else
2700   echo "$ac_err" >&5
2701   echo "configure: failed program was:" >&5
2702   cat conftest.$ac_ext >&5
2703   rm -rf conftest*
2704   eval "ac_cv_header_$ac_safe=no"
2705 fi
2706 rm -f conftest*
2707 fi
2708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2709   echo "$ac_t""yes" 1>&6
2710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2711   cat >> confdefs.h <<EOF
2712 #define $ac_tr_hdr 1
2713 EOF
2714  
2715 else
2716   echo "$ac_t""no" 1>&6
2717 fi
2718 done
2719
2720 for ac_hdr in dlfcn.h image.h
2721 do
2722 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2723 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2724 echo "configure:2725: checking for $ac_hdr" >&5
2725 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2726   echo $ac_n "(cached) $ac_c" 1>&6
2727 else
2728   cat > conftest.$ac_ext <<EOF
2729 #line 2730 "configure"
2730 #include "confdefs.h"
2731 #include <$ac_hdr>
2732 EOF
2733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2734 { (eval echo configure:2735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2736 if test -z "$ac_err"; then
2737   rm -rf conftest*
2738   eval "ac_cv_header_$ac_safe=yes"
2739 else
2740   echo "$ac_err" >&5
2741   echo "configure: failed program was:" >&5
2742   cat conftest.$ac_ext >&5
2743   rm -rf conftest*
2744   eval "ac_cv_header_$ac_safe=no"
2745 fi
2746 rm -f conftest*
2747 fi
2748 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2749   echo "$ac_t""yes" 1>&6
2750     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2751   cat >> confdefs.h <<EOF
2752 #define $ac_tr_hdr 1
2753 EOF
2754  
2755 else
2756   echo "$ac_t""no" 1>&6
2757 fi
2758 done
2759
2760 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2761 do
2762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2764 echo "configure:2765: checking for $ac_hdr" >&5
2765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2766   echo $ac_n "(cached) $ac_c" 1>&6
2767 else
2768   cat > conftest.$ac_ext <<EOF
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2771 #include <$ac_hdr>
2772 EOF
2773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2774 { (eval echo configure:2775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2776 if test -z "$ac_err"; then
2777   rm -rf conftest*
2778   eval "ac_cv_header_$ac_safe=yes"
2779 else
2780   echo "$ac_err" >&5
2781   echo "configure: failed program was:" >&5
2782   cat conftest.$ac_ext >&5
2783   rm -rf conftest*
2784   eval "ac_cv_header_$ac_safe=no"
2785 fi
2786 rm -f conftest*
2787 fi
2788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2789   echo "$ac_t""yes" 1>&6
2790     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2791   cat >> confdefs.h <<EOF
2792 #define $ac_tr_hdr 1
2793 EOF
2794  
2795 else
2796   echo "$ac_t""no" 1>&6
2797 fi
2798 done
2799
2800 for ac_hdr in machine/param.h
2801 do
2802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2804 echo "configure:2805: checking for $ac_hdr" >&5
2805 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2806   echo $ac_n "(cached) $ac_c" 1>&6
2807 else
2808   cat > conftest.$ac_ext <<EOF
2809 #line 2810 "configure"
2810 #include "confdefs.h"
2811 #include <$ac_hdr>
2812 EOF
2813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2814 { (eval echo configure:2815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2816 if test -z "$ac_err"; then
2817   rm -rf conftest*
2818   eval "ac_cv_header_$ac_safe=yes"
2819 else
2820   echo "$ac_err" >&5
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823   rm -rf conftest*
2824   eval "ac_cv_header_$ac_safe=no"
2825 fi
2826 rm -f conftest*
2827 fi
2828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2829   echo "$ac_t""yes" 1>&6
2830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2831   cat >> confdefs.h <<EOF
2832 #define $ac_tr_hdr 1
2833 EOF
2834  
2835 else
2836   echo "$ac_t""no" 1>&6
2837 fi
2838 done
2839
2840
2841 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
2842 do
2843 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2844 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2845 echo "configure:2846: checking for $ac_hdr" >&5
2846 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2847   echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849   cat > conftest.$ac_ext <<EOF
2850 #line 2851 "configure"
2851 #include "confdefs.h"
2852 #include <$ac_hdr>
2853 EOF
2854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2855 { (eval echo configure:2856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2857 if test -z "$ac_err"; then
2858   rm -rf conftest*
2859   eval "ac_cv_header_$ac_safe=yes"
2860 else
2861   echo "$ac_err" >&5
2862   echo "configure: failed program was:" >&5
2863   cat conftest.$ac_ext >&5
2864   rm -rf conftest*
2865   eval "ac_cv_header_$ac_safe=no"
2866 fi
2867 rm -f conftest*
2868 fi
2869 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2870   echo "$ac_t""yes" 1>&6
2871     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2872   cat >> confdefs.h <<EOF
2873 #define $ac_tr_hdr 1
2874 EOF
2875  
2876 else
2877   echo "$ac_t""no" 1>&6
2878 fi
2879 done
2880
2881
2882 CFLAGS="${save_CFLAGS} -Wall -Werror"
2883 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
2884 echo "configure:2885: checking for ntohl in sys/param.h" >&5
2885 cat > conftest.$ac_ext <<EOF
2886 #line 2887 "configure"
2887 #include "confdefs.h"
2888 #include <sys/param.h>
2889 void foo() { int meuh; ntohl(meuh); }
2890 int main() {
2891
2892 ; return 0; }
2893 EOF
2894 if { (eval echo configure:2895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2895   rm -rf conftest*
2896   cat >> confdefs.h <<\EOF
2897 #define NTOHL_IN_SYS_PARAM_H 1
2898 EOF
2899
2900  echo "$ac_t""yes" 1>&6
2901 else
2902   echo "configure: failed program was:" >&5
2903   cat conftest.$ac_ext >&5
2904   rm -rf conftest*
2905   echo "$ac_t""no" 1>&6
2906 fi
2907 rm -f conftest*
2908
2909 CFLAGS="${save_CFLAGS} -finline-limit=12"
2910 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
2911 echo "configure:2912: checking if \$CC accepts -finline-limit" >&5
2912 cat > conftest.$ac_ext <<EOF
2913 #line 2914 "configure"
2914 #include "confdefs.h"
2915
2916 int main() {
2917
2918 ; return 0; }
2919 EOF
2920 if { (eval echo configure:2921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2921   rm -rf conftest*
2922   save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; echo "$ac_t""yes" 1>&6
2923 else
2924   echo "configure: failed program was:" >&5
2925   cat conftest.$ac_ext >&5
2926   rm -rf conftest*
2927   echo "$ac_t""no" 1>&6
2928 fi
2929 rm -f conftest*
2930
2931 CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
2932 echo $ac_n "checking if \$CC compiles plugins with -bundle -undefined suppress""... $ac_c" 1>&6
2933 echo "configure:2934: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
2934 cat > conftest.$ac_ext <<EOF
2935 #line 2936 "configure"
2936 #include "confdefs.h"
2937
2938 int main() {
2939
2940 ; return 0; }
2941 EOF
2942 if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2943   rm -rf conftest*
2944   PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
2945 else
2946   echo "configure: failed program was:" >&5
2947   cat conftest.$ac_ext >&5
2948   rm -rf conftest*
2949   echo "$ac_t""no" 1>&6
2950 fi
2951 rm -f conftest*
2952
2953 CFLAGS="${save_CFLAGS} -shared"
2954 echo $ac_n "checking if \$CC compiles plugins with -shared""... $ac_c" 1>&6
2955 echo "configure:2956: checking if \$CC compiles plugins with -shared" >&5
2956 cat > conftest.$ac_ext <<EOF
2957 #line 2958 "configure"
2958 #include "confdefs.h"
2959
2960 int main() {
2961
2962 ; return 0; }
2963 EOF
2964 if { (eval echo configure:2965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2965   rm -rf conftest*
2966   PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
2967 else
2968   echo "configure: failed program was:" >&5
2969   cat conftest.$ac_ext >&5
2970   rm -rf conftest*
2971   echo "$ac_t""no" 1>&6
2972 fi
2973 rm -f conftest*
2974
2975 CFLAGS="${save_CFLAGS}"
2976
2977 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
2978 echo "configure:2979: checking for boolean_t in sys/types.h" >&5
2979 cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #include <sys/types.h>
2983 void quux() { boolean_t foo; }
2984 int main() {
2985
2986 ; return 0; }
2987 EOF
2988 if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2989   rm -rf conftest*
2990   cat >> confdefs.h <<\EOF
2991 #define BOOLEAN_T_IN_SYS_TYPES_H 1
2992 EOF
2993
2994  echo "$ac_t""yes" 1>&6
2995 else
2996   echo "configure: failed program was:" >&5
2997   cat conftest.$ac_ext >&5
2998   rm -rf conftest*
2999   echo "$ac_t""no" 1>&6
3000 fi
3001 rm -f conftest*
3002 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
3003 echo "configure:3004: checking for boolean_t in pthread.h" >&5
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3007 #include <pthread.h>
3008 void quux() { boolean_t foo; }
3009 int main() {
3010
3011 ; return 0; }
3012 EOF
3013 if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3014   rm -rf conftest*
3015   cat >> confdefs.h <<\EOF
3016 #define BOOLEAN_T_IN_PTHREAD_H 1
3017 EOF
3018
3019  echo "$ac_t""yes" 1>&6
3020 else
3021   echo "configure: failed program was:" >&5
3022   cat conftest.$ac_ext >&5
3023   rm -rf conftest*
3024   echo "$ac_t""no" 1>&6
3025 fi
3026 rm -f conftest*
3027
3028 echo $ac_n "checking for working const""... $ac_c" 1>&6
3029 echo "configure:3030: checking for working const" >&5
3030 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   cat > conftest.$ac_ext <<EOF
3034 #line 3035 "configure"
3035 #include "confdefs.h"
3036
3037 int main() {
3038
3039 /* Ultrix mips cc rejects this.  */
3040 typedef int charset[2]; const charset x = {0,0};
3041 /* SunOS 4.1.1 cc rejects this.  */
3042 char const *const *ccp;
3043 char **p;
3044 /* NEC SVR4.0.2 mips cc rejects this.  */
3045 struct point {int x, y;};
3046 static struct point const zero = {0,0};
3047 /* AIX XL C 1.02.0.0 rejects this.
3048    It does not let you subtract one const X* pointer from another in an arm
3049    of an if-expression whose if-part is not a constant expression */
3050 const char *g = "string";
3051 ccp = &g + (g ? g-g : 0);
3052 /* HPUX 7.0 cc rejects these. */
3053 ++ccp;
3054 p = (char**) ccp;
3055 ccp = (char const *const *) p;
3056 { /* SCO 3.2v4 cc rejects this.  */
3057   char *t;
3058   char const *s = 0 ? (char *) 0 : (char const *) 0;
3059
3060   *t++ = 0;
3061 }
3062 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3063   int x[] = {25, 17};
3064   const int *foo = &x[0];
3065   ++foo;
3066 }
3067 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3068   typedef const int *iptr;
3069   iptr p = 0;
3070   ++p;
3071 }
3072 { /* AIX XL C 1.02.0.0 rejects this saying
3073      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3074   struct s { int j; const int *ap[3]; };
3075   struct s *b; b->j = 5;
3076 }
3077 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3078   const int foo = 10;
3079 }
3080
3081 ; return 0; }
3082 EOF
3083 if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3084   rm -rf conftest*
3085   ac_cv_c_const=yes
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   rm -rf conftest*
3090   ac_cv_c_const=no
3091 fi
3092 rm -f conftest*
3093 fi
3094
3095 echo "$ac_t""$ac_cv_c_const" 1>&6
3096 if test $ac_cv_c_const = no; then
3097   cat >> confdefs.h <<\EOF
3098 #define const 
3099 EOF
3100
3101 fi
3102
3103 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3104 echo "configure:3105: checking for ANSI C header files" >&5
3105 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3106   echo $ac_n "(cached) $ac_c" 1>&6
3107 else
3108   cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111 #include <stdlib.h>
3112 #include <stdarg.h>
3113 #include <string.h>
3114 #include <float.h>
3115 EOF
3116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3117 { (eval echo configure:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3119 if test -z "$ac_err"; then
3120   rm -rf conftest*
3121   ac_cv_header_stdc=yes
3122 else
3123   echo "$ac_err" >&5
3124   echo "configure: failed program was:" >&5
3125   cat conftest.$ac_ext >&5
3126   rm -rf conftest*
3127   ac_cv_header_stdc=no
3128 fi
3129 rm -f conftest*
3130
3131 if test $ac_cv_header_stdc = yes; then
3132   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3133 cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136 #include <string.h>
3137 EOF
3138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3139   egrep "memchr" >/dev/null 2>&1; then
3140   :
3141 else
3142   rm -rf conftest*
3143   ac_cv_header_stdc=no
3144 fi
3145 rm -f conftest*
3146
3147 fi
3148
3149 if test $ac_cv_header_stdc = yes; then
3150   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3151 cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154 #include <stdlib.h>
3155 EOF
3156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3157   egrep "free" >/dev/null 2>&1; then
3158   :
3159 else
3160   rm -rf conftest*
3161   ac_cv_header_stdc=no
3162 fi
3163 rm -f conftest*
3164
3165 fi
3166
3167 if test $ac_cv_header_stdc = yes; then
3168   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3169 if test "$cross_compiling" = yes; then
3170   :
3171 else
3172   cat > conftest.$ac_ext <<EOF
3173 #line 3174 "configure"
3174 #include "confdefs.h"
3175 #include <ctype.h>
3176 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3177 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3178 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3179 int main () { int i; for (i = 0; i < 256; i++)
3180 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3181 exit (0); }
3182
3183 EOF
3184 if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3185 then
3186   :
3187 else
3188   echo "configure: failed program was:" >&5
3189   cat conftest.$ac_ext >&5
3190   rm -fr conftest*
3191   ac_cv_header_stdc=no
3192 fi
3193 rm -fr conftest*
3194 fi
3195
3196 fi
3197 fi
3198
3199 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3200 if test $ac_cv_header_stdc = yes; then
3201   cat >> confdefs.h <<\EOF
3202 #define STDC_HEADERS 1
3203 EOF
3204
3205 fi
3206
3207 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3208 echo "configure:3209: checking for size_t" >&5
3209 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215 #include <sys/types.h>
3216 #if STDC_HEADERS
3217 #include <stdlib.h>
3218 #include <stddef.h>
3219 #endif
3220 EOF
3221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3222   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3223   rm -rf conftest*
3224   ac_cv_type_size_t=yes
3225 else
3226   rm -rf conftest*
3227   ac_cv_type_size_t=no
3228 fi
3229 rm -f conftest*
3230
3231 fi
3232 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3233 if test $ac_cv_type_size_t = no; then
3234   cat >> confdefs.h <<\EOF
3235 #define size_t unsigned
3236 EOF
3237
3238 fi
3239
3240 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3241 echo "configure:3242: checking whether time.h and sys/time.h may both be included" >&5
3242 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3243   echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245   cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <sys/types.h>
3249 #include <sys/time.h>
3250 #include <time.h>
3251 int main() {
3252 struct tm *tp;
3253 ; return 0; }
3254 EOF
3255 if { (eval echo configure:3256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3256   rm -rf conftest*
3257   ac_cv_header_time=yes
3258 else
3259   echo "configure: failed program was:" >&5
3260   cat conftest.$ac_ext >&5
3261   rm -rf conftest*
3262   ac_cv_header_time=no
3263 fi
3264 rm -f conftest*
3265 fi
3266
3267 echo "$ac_t""$ac_cv_header_time" 1>&6
3268 if test $ac_cv_header_time = yes; then
3269   cat >> confdefs.h <<\EOF
3270 #define TIME_WITH_SYS_TIME 1
3271 EOF
3272
3273 fi
3274
3275
3276 ARCH=${host_cpu}
3277
3278 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
3279 PLUGINS="${PLUGINS}"
3280
3281 MMX_MODULES="yuvmmx idctmmx motionmmx"
3282 MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
3283
3284 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
3285 echo "configure:3286: checking if \$CC groks MMX inline assembly" >&5
3286 cat > conftest.$ac_ext <<EOF
3287 #line 3288 "configure"
3288 #include "confdefs.h"
3289 void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
3290 int main() {
3291
3292 ; return 0; }
3293 EOF
3294 if { (eval echo configure:3295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3295   rm -rf conftest*
3296   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
3297   echo "$ac_t""yes" 1>&6
3298 else
3299   echo "configure: failed program was:" >&5
3300   cat conftest.$ac_ext >&5
3301   rm -rf conftest*
3302   echo "$ac_t""no" 1>&6
3303 fi
3304 rm -f conftest*
3305
3306 echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
3307 echo "configure:3308: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
3312 int main() {
3313
3314 ; return 0; }
3315 EOF
3316 if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3317   rm -rf conftest*
3318   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
3319   echo "$ac_t""yes" 1>&6
3320 else
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   echo "$ac_t""no" 1>&6
3325 fi
3326 rm -f conftest*
3327
3328
3329 for ac_hdr in winioctl.h
3330 do
3331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3333 echo "configure:3334: checking for $ac_hdr" >&5
3334 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3335   echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337   cat > conftest.$ac_ext <<EOF
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3340 #include <$ac_hdr>
3341 EOF
3342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3343 { (eval echo configure:3344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3345 if test -z "$ac_err"; then
3346   rm -rf conftest*
3347   eval "ac_cv_header_$ac_safe=yes"
3348 else
3349   echo "$ac_err" >&5
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   rm -rf conftest*
3353   eval "ac_cv_header_$ac_safe=no"
3354 fi
3355 rm -f conftest*
3356 fi
3357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3358   echo "$ac_t""yes" 1>&6
3359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3360   cat >> confdefs.h <<EOF
3361 #define $ac_tr_hdr 1
3362 EOF
3363  
3364   CAN_BUILD_LIBDVDCSS=1
3365
3366 else
3367   echo "$ac_t""no" 1>&6
3368 fi
3369 done
3370
3371
3372 for ac_hdr in sys/ioctl.h
3373 do
3374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3376 echo "configure:3377: checking for $ac_hdr" >&5
3377 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3378   echo $ac_n "(cached) $ac_c" 1>&6
3379 else
3380   cat > conftest.$ac_ext <<EOF
3381 #line 3382 "configure"
3382 #include "confdefs.h"
3383 #include <$ac_hdr>
3384 EOF
3385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3386 { (eval echo configure:3387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3388 if test -z "$ac_err"; then
3389   rm -rf conftest*
3390   eval "ac_cv_header_$ac_safe=yes"
3391 else
3392   echo "$ac_err" >&5
3393   echo "configure: failed program was:" >&5
3394   cat conftest.$ac_ext >&5
3395   rm -rf conftest*
3396   eval "ac_cv_header_$ac_safe=no"
3397 fi
3398 rm -f conftest*
3399 fi
3400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3401   echo "$ac_t""yes" 1>&6
3402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3403   cat >> confdefs.h <<EOF
3404 #define $ac_tr_hdr 1
3405 EOF
3406  
3407   CAN_BUILD_LIBDVDCSS=1
3408   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h
3409 do
3410 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3411 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3412 echo "configure:3413: checking for $ac_hdr" >&5
3413 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3414   echo $ac_n "(cached) $ac_c" 1>&6
3415 else
3416   cat > conftest.$ac_ext <<EOF
3417 #line 3418 "configure"
3418 #include "confdefs.h"
3419 #include <$ac_hdr>
3420 EOF
3421 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3422 { (eval echo configure:3423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3423 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3424 if test -z "$ac_err"; then
3425   rm -rf conftest*
3426   eval "ac_cv_header_$ac_safe=yes"
3427 else
3428   echo "$ac_err" >&5
3429   echo "configure: failed program was:" >&5
3430   cat conftest.$ac_ext >&5
3431   rm -rf conftest*
3432   eval "ac_cv_header_$ac_safe=no"
3433 fi
3434 rm -f conftest*
3435 fi
3436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3437   echo "$ac_t""yes" 1>&6
3438     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3439   cat >> confdefs.h <<EOF
3440 #define $ac_tr_hdr 1
3441 EOF
3442  
3443 else
3444   echo "$ac_t""no" 1>&6
3445 fi
3446 done
3447
3448   BSD_DVD_STRUCT=0
3449         cat > conftest.$ac_ext <<EOF
3450 #line 3451 "configure"
3451 #include "confdefs.h"
3452 #include <sys/dvdio.h>
3453 EOF
3454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3455   egrep "dvd_struct" >/dev/null 2>&1; then
3456   rm -rf conftest*
3457   
3458     cat >> confdefs.h <<\EOF
3459 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
3460 EOF
3461
3462     BSD_DVD_STRUCT=1
3463   
3464 fi
3465 rm -f conftest*
3466
3467         cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <sys/cdio.h>
3471 EOF
3472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3473   egrep "dvd_struct" >/dev/null 2>&1; then
3474   rm -rf conftest*
3475   
3476     cat >> confdefs.h <<\EOF
3477 #define DVD_STRUCT_IN_SYS_CDIO_H 1
3478 EOF
3479
3480     BSD_DVD_STRUCT=1
3481   
3482 fi
3483 rm -f conftest*
3484
3485   if test x$BSD_DVD_STRUCT = x1; then
3486     cat >> confdefs.h <<\EOF
3487 #define HAVE_BSD_DVD_STRUCT 1
3488 EOF
3489
3490   fi
3491         cat > conftest.$ac_ext <<EOF
3492 #line 3493 "configure"
3493 #include "confdefs.h"
3494 #include <linux/cdrom.h>
3495 EOF
3496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3497   egrep "dvd_struct" >/dev/null 2>&1; then
3498   rm -rf conftest*
3499   
3500     cat >> confdefs.h <<\EOF
3501 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
3502 EOF
3503
3504   
3505 fi
3506 rm -f conftest*
3507
3508
3509 else
3510   echo "$ac_t""no" 1>&6
3511 fi
3512 done
3513
3514
3515 case ${host_os} in
3516   darwin*)
3517     SYS=darwin
3518     ;;
3519   *)
3520     SYS=${host_os}
3521     ;;
3522 esac
3523
3524 # Check whether --enable-ppro or --disable-ppro was given.
3525 if test "${enable_ppro+set}" = set; then
3526   enableval="$enable_ppro"
3527    if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3528 else
3529    if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3530 fi
3531
3532
3533 # Check whether --enable-mmx or --disable-mmx was given.
3534 if test "${enable_mmx+set}" = set; then
3535   enableval="$enable_mmx"
3536    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
3537   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3538 else
3539    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";
3540   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3541 fi
3542
3543
3544 # Check whether --enable-altivec or --disable-altivec was given.
3545 if test "${enable_altivec+set}" = set; then
3546   enableval="$enable_altivec"
3547    if test x$enableval = xyes; then ARCH="${ARCH} altivec"
3548     BUILTINS="${BUILTINS} idctaltivec"
3549     LIB_IDCTALTIVEC="-framework vecLib"
3550   fi 
3551 fi
3552
3553 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
3554
3555 DEBUG=0
3556 # Check whether --enable-debug or --disable-debug was given.
3557 if test "${enable_debug+set}" = set; then
3558   enableval="$enable_debug"
3559    if test x$enableval = xyes; then DEBUG=1; fi 
3560 fi
3561
3562
3563 STATS=0
3564 # Check whether --enable-stats or --disable-stats was given.
3565 if test "${enable_stats+set}" = set; then
3566   enableval="$enable_stats"
3567    if test x$enableval = xyes; then STATS=1; fi 
3568 fi
3569
3570
3571 TRACE=0
3572 # Check whether --enable-trace or --disable-trace was given.
3573 if test "${enable_trace+set}" = set; then
3574   enableval="$enable_trace"
3575    if test x$enableval = xyes; then TRACE=1; fi 
3576 fi
3577
3578
3579 PROFILING=0
3580 # Check whether --enable-profiling or --disable-profiling was given.
3581 if test "${enable_profiling+set}" = set; then
3582   enableval="$enable_profiling"
3583    if test x$enableval = xyes; then PROFILING=1; fi 
3584 fi
3585
3586
3587 # Check whether --enable-optimizations or --disable-optimizations was given.
3588 if test "${enable_optimizations+set}" = set; then
3589   enableval="$enable_optimizations"
3590    if test x$enableval = xno; then OPTIMS=0; fi 
3591 else
3592    OPTIMS=1 
3593 fi
3594
3595
3596 # Check whether --enable-pth or --disable-pth was given.
3597 if test "${enable_pth+set}" = set; then
3598   enableval="$enable_pth"
3599    if test x$enableval = xyes; then
3600     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3601 echo "configure:3602: checking for pth_init in -lpth" >&5
3602 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
3603 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3604   echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606   ac_save_LIBS="$LIBS"
3607 LIBS="-lpth  $LIBS"
3608 cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611 /* Override any gcc2 internal prototype to avoid an error.  */
3612 /* We use char because int might match the return type of a gcc2
3613     builtin and then its argument prototype would still apply.  */
3614 char pth_init();
3615
3616 int main() {
3617 pth_init()
3618 ; return 0; }
3619 EOF
3620 if { (eval echo configure:3621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3621   rm -rf conftest*
3622   eval "ac_cv_lib_$ac_lib_var=yes"
3623 else
3624   echo "configure: failed program was:" >&5
3625   cat conftest.$ac_ext >&5
3626   rm -rf conftest*
3627   eval "ac_cv_lib_$ac_lib_var=no"
3628 fi
3629 rm -f conftest*
3630 LIBS="$ac_save_LIBS"
3631
3632 fi
3633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3634   echo "$ac_t""yes" 1>&6
3635     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3636     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3637   cat >> confdefs.h <<EOF
3638 #define $ac_tr_lib 1
3639 EOF
3640
3641   LIBS="-lpth $LIBS"
3642
3643 else
3644   echo "$ac_t""no" 1>&6
3645 fi
3646
3647     cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 #include <pth.h>
3651 EOF
3652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3653   egrep "pth_init" >/dev/null 2>&1; then
3654   rm -rf conftest*
3655   
3656       cat >> confdefs.h <<\EOF
3657 #define PTH_INIT_IN_PTH_H 1
3658 EOF
3659
3660     THREAD_LIB="-lpth"
3661     fi
3662 fi
3663 rm -f conftest*
3664
3665
3666 fi
3667
3668
3669 LIB="${LIB} ${THREAD_LIB}"
3670
3671 LOCAL_LIBDVDCSS=0
3672 STATIC_LIBDVDCSS=0
3673 # Check whether --with-dvdcss or --without-dvdcss was given.
3674 if test "${with_dvdcss+set}" = set; then
3675   withval="$with_dvdcss"
3676    case "x${withval}" in
3677     xlocal-static|xyes)
3678       # local libdvdcss, statically linked
3679       if test x${CAN_BUILD_LIBDVDCSS} = x1
3680       then
3681         LOCAL_LIBDVDCSS=1
3682         STATIC_LIBDVDCSS=1
3683         BUILTINS="${BUILTINS} dvd"
3684         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3685         LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
3686         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
3687       fi
3688     ;;
3689     xlocal-shared)
3690       # local libdvdcss, dynamically linked
3691       if test x${CAN_BUILD_LIBDVDCSS} = x1
3692       then
3693         LOCAL_LIBDVDCSS=1
3694         BUILTINS="${BUILTINS} dvd"
3695         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3696         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
3697         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
3698       fi
3699     ;;
3700     *)
3701       # existing libdvdcss
3702       BUILTINS="${BUILTINS} dvd"
3703       if test "x$withval" != "xyes"
3704       then
3705         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
3706         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
3707       fi
3708       LIB_DVD="${LIB_DVD} -ldvdcss"
3709       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
3710     esac 
3711 else
3712   # user didn't decide, we choose to use local libdvdcss and link statically
3713    if test x${CAN_BUILD_LIBDVDCSS} = x1
3714     then
3715       LOCAL_LIBDVDCSS=1
3716       STATIC_LIBDVDCSS=1
3717       BUILTINS="${BUILTINS} dvd"
3718       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3719       LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
3720       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
3721     fi 
3722 fi
3723
3724
3725 CSS=0
3726 # Check whether --enable-css or --disable-css was given.
3727 if test "${enable_css+set}" = set; then
3728   enableval="$enable_css"
3729    if test x$enableval = xyes
3730     then
3731       CSS=1
3732     fi 
3733 else
3734    CSS=1; 
3735 fi
3736
3737
3738 if test x${CSS} = x1
3739 then
3740   cat >> confdefs.h <<\EOF
3741 #define HAVE_CSS 1
3742 EOF
3743
3744 fi
3745
3746 # Check whether --enable-dummy or --disable-dummy was given.
3747 if test "${enable_dummy+set}" = set; then
3748   enableval="$enable_dummy"
3749   :
3750 fi
3751
3752
3753 if test x$enable_dummy != xno
3754 then
3755   BUILTINS="${BUILTINS} dummy"
3756 fi
3757
3758 # Check whether --enable-null or --disable-null was given.
3759 if test "${enable_null+set}" = set; then
3760   enableval="$enable_null"
3761   :
3762 fi
3763
3764
3765 if test x$enable_null != xno
3766 then
3767   BUILTINS="${BUILTINS} null"
3768 fi
3769
3770 # Check whether --enable-rc or --disable-rc was given.
3771 if test "${enable_rc+set}" = set; then
3772   enableval="$enable_rc"
3773   :
3774 fi
3775
3776
3777 if test x$enable_rc != xno
3778 then
3779   BUILTINS="${BUILTINS} rc"
3780 fi
3781
3782 if test x$SYS = xbeos
3783 then
3784     BUILTINS="${BUILTINS} beos"
3785     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3786     PLCFLAGS="${PLCFLAGS} -nostart"
3787
3788 else
3789
3790 # Check whether --enable-dsp or --disable-dsp was given.
3791 if test "${enable_dsp+set}" = set; then
3792   enableval="$enable_dsp"
3793   :
3794 fi
3795
3796
3797 if test x$enable_dsp != xno
3798 then
3799   if test -c /dev/dsp
3800   then
3801     PLUGINS="${PLUGINS} dsp"
3802   fi
3803 fi
3804
3805 # Check whether --enable-esd or --disable-esd was given.
3806 if test "${enable_esd+set}" = set; then
3807   enableval="$enable_esd"
3808   if test x$enable_esd = xyes
3809    then
3810      # Extract the first word of "esd-config", so it can be a program name with args.
3811 set dummy esd-config; ac_word=$2
3812 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3813 echo "configure:3814: checking for $ac_word" >&5
3814 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3815   echo $ac_n "(cached) $ac_c" 1>&6
3816 else
3817   case "$ESD_CONFIG" in
3818   /*)
3819   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3820   ;;
3821   ?:/*)                  
3822   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3823   ;;
3824   *)
3825   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3826   ac_dummy="$PATH"
3827   for ac_dir in $ac_dummy; do 
3828     test -z "$ac_dir" && ac_dir=.
3829     if test -f $ac_dir/$ac_word; then
3830       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3831       break
3832     fi
3833   done
3834   IFS="$ac_save_ifs"
3835   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3836   ;;
3837 esac
3838 fi
3839 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3840 if test -n "$ESD_CONFIG"; then
3841   echo "$ac_t""$ESD_CONFIG" 1>&6
3842 else
3843   echo "$ac_t""no" 1>&6
3844 fi
3845
3846      if test x${ESD_CONFIG} != xno
3847      then
3848        PLUGINS="${PLUGINS} esd"
3849        LIB_ESD="`${ESD_CONFIG} --libs`"
3850      fi
3851    fi
3852 fi
3853
3854
3855 # Check whether --enable-darwin or --disable-darwin was given.
3856 if test "${enable_darwin+set}" = set; then
3857   enableval="$enable_darwin"
3858   if test x$enable_darwin = xyes; then
3859      PLUGINS="${PLUGINS} darwin"
3860      LIB_DARWIN="-framework CoreAudio"
3861    fi
3862 fi
3863
3864
3865 # Check whether --enable-macosx or --disable-macosx was given.
3866 if test "${enable_macosx+set}" = set; then
3867   enableval="$enable_macosx"
3868   if test x$enable_macosx = xyes
3869    then
3870      BUILTINS="${BUILTINS} macosx"
3871      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3872      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3873      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3874    fi
3875 else
3876   for ac_hdr in Carbon/Carbon.h
3877 do
3878 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3879 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3880 echo "configure:3881: checking for $ac_hdr" >&5
3881 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3882   echo $ac_n "(cached) $ac_c" 1>&6
3883 else
3884   cat > conftest.$ac_ext <<EOF
3885 #line 3886 "configure"
3886 #include "confdefs.h"
3887 #include <$ac_hdr>
3888 EOF
3889 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3890 { (eval echo configure:3891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3891 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3892 if test -z "$ac_err"; then
3893   rm -rf conftest*
3894   eval "ac_cv_header_$ac_safe=yes"
3895 else
3896   echo "$ac_err" >&5
3897   echo "configure: failed program was:" >&5
3898   cat conftest.$ac_ext >&5
3899   rm -rf conftest*
3900   eval "ac_cv_header_$ac_safe=no"
3901 fi
3902 rm -f conftest*
3903 fi
3904 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3905   echo "$ac_t""yes" 1>&6
3906     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3907   cat >> confdefs.h <<EOF
3908 #define $ac_tr_hdr 1
3909 EOF
3910  BUILTINS="${BUILTINS} macosx"
3911      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3912      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3913      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3914    
3915 else
3916   echo "$ac_t""no" 1>&6
3917 fi
3918 done
3919
3920 fi
3921
3922
3923 # Check whether --enable-qnx or --disable-qnx was given.
3924 if test "${enable_qnx+set}" = set; then
3925   enableval="$enable_qnx"
3926   :
3927 fi
3928
3929     if test x$enable_qnx != xno
3930     then
3931       for ac_hdr in Ph.h
3932 do
3933 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3934 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3935 echo "configure:3936: checking for $ac_hdr" >&5
3936 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3937   echo $ac_n "(cached) $ac_c" 1>&6
3938 else
3939   cat > conftest.$ac_ext <<EOF
3940 #line 3941 "configure"
3941 #include "confdefs.h"
3942 #include <$ac_hdr>
3943 EOF
3944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3945 { (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3947 if test -z "$ac_err"; then
3948   rm -rf conftest*
3949   eval "ac_cv_header_$ac_safe=yes"
3950 else
3951   echo "$ac_err" >&5
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   eval "ac_cv_header_$ac_safe=no"
3956 fi
3957 rm -f conftest*
3958 fi
3959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3960   echo "$ac_t""yes" 1>&6
3961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3962   cat >> confdefs.h <<EOF
3963 #define $ac_tr_hdr 1
3964 EOF
3965  
3966         PLUGINS="${PLUGINS} qnx"
3967         LIB_QNX="-lasound -lph"
3968       
3969 else
3970   echo "$ac_t""no" 1>&6
3971 fi
3972 done
3973
3974     fi
3975
3976 # Check whether --enable-fb or --disable-fb was given.
3977 if test "${enable_fb+set}" = set; then
3978   enableval="$enable_fb"
3979   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
3980 fi
3981
3982
3983 # Check whether --with-ggi or --without-ggi was given.
3984 if test "${with_ggi+set}" = set; then
3985   withval="$with_ggi"
3986    if test "x$withval" != "xno"
3987     then
3988       PLUGINS="${PLUGINS} ggi"
3989       if test "x$withval" != "xyes"
3990       then
3991         LIB_GGI="-l"$withval
3992       else
3993         LIB_GGI="-lggi"
3994       fi
3995     fi 
3996 fi
3997
3998
3999 # Check whether --enable-sdl or --disable-sdl was given.
4000 if test "${enable_sdl+set}" = set; then
4001   enableval="$enable_sdl"
4002   :
4003 fi
4004
4005 if test "x$enable_sdl" != "xno"
4006 then
4007   # Extract the first word of "sdl12-config", so it can be a program name with args.
4008 set dummy sdl12-config; ac_word=$2
4009 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4010 echo "configure:4011: checking for $ac_word" >&5
4011 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
4012   echo $ac_n "(cached) $ac_c" 1>&6
4013 else
4014   case "$SDL12_CONFIG" in
4015   /*)
4016   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
4017   ;;
4018   ?:/*)                  
4019   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
4020   ;;
4021   *)
4022   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4023   ac_dummy="$PATH"
4024   for ac_dir in $ac_dummy; do 
4025     test -z "$ac_dir" && ac_dir=.
4026     if test -f $ac_dir/$ac_word; then
4027       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
4028       break
4029     fi
4030   done
4031   IFS="$ac_save_ifs"
4032   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
4033   ;;
4034 esac
4035 fi
4036 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
4037 if test -n "$SDL12_CONFIG"; then
4038   echo "$ac_t""$SDL12_CONFIG" 1>&6
4039 else
4040   echo "$ac_t""no" 1>&6
4041 fi
4042
4043   SDL_CONFIG=${SDL12_CONFIG}
4044   SDL_HEADER="SDL12/SDL.h"
4045   if test x${SDL_CONFIG} = xno
4046   then
4047     # Extract the first word of "sdl11-config", so it can be a program name with args.
4048 set dummy sdl11-config; ac_word=$2
4049 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4050 echo "configure:4051: checking for $ac_word" >&5
4051 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
4052   echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054   case "$SDL11_CONFIG" in
4055   /*)
4056   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
4057   ;;
4058   ?:/*)                  
4059   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
4060   ;;
4061   *)
4062   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4063   ac_dummy="$PATH"
4064   for ac_dir in $ac_dummy; do 
4065     test -z "$ac_dir" && ac_dir=.
4066     if test -f $ac_dir/$ac_word; then
4067       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
4068       break
4069     fi
4070   done
4071   IFS="$ac_save_ifs"
4072   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
4073   ;;
4074 esac
4075 fi
4076 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
4077 if test -n "$SDL11_CONFIG"; then
4078   echo "$ac_t""$SDL11_CONFIG" 1>&6
4079 else
4080   echo "$ac_t""no" 1>&6
4081 fi
4082
4083     SDL_CONFIG=${SDL11_CONFIG}
4084     SDL_HEADER="SDL11/SDL.h"
4085   fi
4086   if test x${SDL_CONFIG} = xno
4087   then
4088     # Extract the first word of "sdl-config", so it can be a program name with args.
4089 set dummy sdl-config; ac_word=$2
4090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4091 echo "configure:4092: checking for $ac_word" >&5
4092 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4093   echo $ac_n "(cached) $ac_c" 1>&6
4094 else
4095   case "$SDL_CONFIG" in
4096   /*)
4097   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4098   ;;
4099   ?:/*)                  
4100   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4101   ;;
4102   *)
4103   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4104   ac_dummy="$PATH"
4105   for ac_dir in $ac_dummy; do 
4106     test -z "$ac_dir" && ac_dir=.
4107     if test -f $ac_dir/$ac_word; then
4108       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4109       break
4110     fi
4111   done
4112   IFS="$ac_save_ifs"
4113   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4114   ;;
4115 esac
4116 fi
4117 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
4118 if test -n "$SDL_CONFIG"; then
4119   echo "$ac_t""$SDL_CONFIG" 1>&6
4120 else
4121   echo "$ac_t""no" 1>&6
4122 fi
4123
4124     SDL_HEADER="SDL/SDL.h"
4125   fi
4126   if test x${SDL_CONFIG} != xno
4127   then
4128     PLUGINS="${PLUGINS} sdl"
4129     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
4130     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
4131     save_CFLAGS=$CFLAGS
4132     CFLAGS="$CFLAGS $CFLAGS_SDL"
4133     for ac_hdr in ${SDL_HEADER}
4134 do
4135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4137 echo "configure:4138: checking for $ac_hdr" >&5
4138 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4139   echo $ac_n "(cached) $ac_c" 1>&6
4140 else
4141   cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144 #include <$ac_hdr>
4145 EOF
4146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4147 { (eval echo configure:4148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4149 if test -z "$ac_err"; then
4150   rm -rf conftest*
4151   eval "ac_cv_header_$ac_safe=yes"
4152 else
4153   echo "$ac_err" >&5
4154   echo "configure: failed program was:" >&5
4155   cat conftest.$ac_ext >&5
4156   rm -rf conftest*
4157   eval "ac_cv_header_$ac_safe=no"
4158 fi
4159 rm -f conftest*
4160 fi
4161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4162   echo "$ac_t""yes" 1>&6
4163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4164   cat >> confdefs.h <<EOF
4165 #define $ac_tr_hdr 1
4166 EOF
4167  cat >> confdefs.h <<EOF
4168 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
4169 EOF
4170
4171 else
4172   echo "$ac_t""no" 1>&6
4173 echo "The development package for SDL is not installed. Please install it"
4174         echo "and try again. Alternatively you can also configure with --disable-sdl."
4175         exit 1 
4176 fi
4177 done
4178
4179     CFLAGS=$save_CFLAGS
4180     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
4181     then
4182       echo "You need SDL version 1.1.5 or later. Install it and try again."
4183       echo "Alternatively, you can also configure with --disable-sdl."
4184       exit 1
4185     fi
4186   elif test "x$enable_sdl" =  "xyes"
4187   then
4188     echo "I couldn't find the SDL package. You can download libSDL from"
4189     echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
4190     echo "nice day."
4191     exit 1
4192   fi
4193 fi
4194
4195 # Check whether --with-directx or --without-directx was given.
4196 if test "${with_directx+set}" = set; then
4197   withval="$with_directx"
4198    if test "x$withval" != "xno"
4199     then
4200       PLUGINS="${PLUGINS} directx"
4201       if test "x$withval" != "xyes"
4202       then
4203         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4204         INCLUDE="${INCLUDE} -I"$withval"/include"
4205       else
4206         for ac_hdr in directx.h
4207 do
4208 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4209 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4210 echo "configure:4211: checking for $ac_hdr" >&5
4211 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4212   echo $ac_n "(cached) $ac_c" 1>&6
4213 else
4214   cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <$ac_hdr>
4218 EOF
4219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4220 { (eval echo configure:4221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4222 if test -z "$ac_err"; then
4223   rm -rf conftest*
4224   eval "ac_cv_header_$ac_safe=yes"
4225 else
4226   echo "$ac_err" >&5
4227   echo "configure: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229   rm -rf conftest*
4230   eval "ac_cv_header_$ac_safe=no"
4231 fi
4232 rm -f conftest*
4233 fi
4234 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4235   echo "$ac_t""yes" 1>&6
4236     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4237   cat >> confdefs.h <<EOF
4238 #define $ac_tr_hdr 1
4239 EOF
4240  
4241 else
4242   echo "$ac_t""no" 1>&6
4243 echo "Cannot find DirectX headers !"; exit
4244 fi
4245 done
4246
4247         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4248       fi
4249     fi 
4250 fi
4251
4252     if test "x$withval" = "x"
4253     then
4254       for ac_hdr in directx.h
4255 do
4256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4258 echo "configure:4259: checking for $ac_hdr" >&5
4259 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4260   echo $ac_n "(cached) $ac_c" 1>&6
4261 else
4262   cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 #include <$ac_hdr>
4266 EOF
4267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4268 { (eval echo configure:4269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4270 if test -z "$ac_err"; then
4271   rm -rf conftest*
4272   eval "ac_cv_header_$ac_safe=yes"
4273 else
4274   echo "$ac_err" >&5
4275   echo "configure: failed program was:" >&5
4276   cat conftest.$ac_ext >&5
4277   rm -rf conftest*
4278   eval "ac_cv_header_$ac_safe=no"
4279 fi
4280 rm -f conftest*
4281 fi
4282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4283   echo "$ac_t""yes" 1>&6
4284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4285   cat >> confdefs.h <<EOF
4286 #define $ac_tr_hdr 1
4287 EOF
4288  PLUGINS="${PLUGINS} directx"
4289        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293 done
4294
4295     fi
4296
4297 # Check whether --with-glide or --without-glide was given.
4298 if test "${with_glide+set}" = set; then
4299   withval="$with_glide"
4300    if test "x$withval" != "xno"
4301     then
4302       PLUGINS="${PLUGINS} glide"
4303       if test "x$withval" != "xyes"
4304       then
4305         LIB_GLIDE="-l"$withval" -lm"
4306       else
4307         LIB_GLIDE="-lglide2x -lm"
4308       fi
4309     fi 
4310 fi
4311
4312
4313 # Check whether --enable-ncurses or --disable-ncurses was given.
4314 if test "${enable_ncurses+set}" = set; then
4315   enableval="$enable_ncurses"
4316   if test x$enable_ncurses = xyes; then
4317      PLUGINS="${PLUGINS} ncurses"
4318      LIB_NCURSES="-lncurses"
4319    fi
4320 fi
4321
4322
4323 # Check whether --enable-qt or --disable-qt was given.
4324 if test "${enable_qt+set}" = set; then
4325   enableval="$enable_qt"
4326   if test x$enable_qt = xyes; then
4327      PLUGINS="${PLUGINS} qt"
4328      ALIASES="${ALIASES} qvlc"
4329      LIB_QT="-lqt -L${QTDIR}/lib"
4330      if test -x ${QTDIR}/bin/moc
4331      then
4332        MOC=${QTDIR}/bin/moc
4333      else
4334        MOC=moc
4335      fi
4336    fi
4337 fi
4338
4339
4340 # Check whether --enable-kde or --disable-kde was given.
4341 if test "${enable_kde+set}" = set; then
4342   enableval="$enable_kde"
4343   if test x$enable_kde = xyes; then
4344      PLUGINS="${PLUGINS} kde"
4345      ALIASES="${ALIASES} kvlc"
4346      LIB_KDE="-L${KDEDIR}/lib -lkfile"
4347      if test -x ${QTDIR}/bin/moc
4348      then
4349        MOC=${QTDIR}/bin/moc
4350      else
4351        MOC=moc
4352      fi
4353    fi
4354 fi
4355
4356
4357 # Check whether --enable-gnome or --disable-gnome was given.
4358 if test "${enable_gnome+set}" = set; then
4359   enableval="$enable_gnome"
4360   if test x$enable_gnome = xyes; then
4361      PLUGINS="${PLUGINS} gnome"
4362      ALIASES="${ALIASES} gnome-vlc"
4363      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4364    fi
4365 fi
4366
4367
4368 # Check whether --enable-gtk or --disable-gtk was given.
4369 if test "${enable_gtk+set}" = set; then
4370   enableval="$enable_gtk"
4371   :
4372 fi
4373
4374 if test x$enable_gtk != xno
4375 then
4376   # look for gtk-config
4377   # Extract the first word of "gtk-config", so it can be a program name with args.
4378 set dummy gtk-config; ac_word=$2
4379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4380 echo "configure:4381: checking for $ac_word" >&5
4381 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   case "$GTK_CONFIG" in
4385   /*)
4386   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4387   ;;
4388   ?:/*)                  
4389   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4390   ;;
4391   *)
4392   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4393   ac_dummy="$PATH"
4394   for ac_dir in $ac_dummy; do 
4395     test -z "$ac_dir" && ac_dir=.
4396     if test -f $ac_dir/$ac_word; then
4397       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4398       break
4399     fi
4400   done
4401   IFS="$ac_save_ifs"
4402   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4403   ;;
4404 esac
4405 fi
4406 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4407 if test -n "$GTK_CONFIG"; then
4408   echo "$ac_t""$GTK_CONFIG" 1>&6
4409 else
4410   echo "$ac_t""no" 1>&6
4411 fi
4412
4413   if test -x ${GTK_CONFIG}
4414   then
4415     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4416     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4417   fi
4418   # now look for the gtk.h header
4419   saved_CPPFLAGS=$CPPFLAGS
4420   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
4421   for ac_hdr in gtk/gtk.h
4422 do
4423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4425 echo "configure:4426: checking for $ac_hdr" >&5
4426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4427   echo $ac_n "(cached) $ac_c" 1>&6
4428 else
4429   cat > conftest.$ac_ext <<EOF
4430 #line 4431 "configure"
4431 #include "confdefs.h"
4432 #include <$ac_hdr>
4433 EOF
4434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4435 { (eval echo configure:4436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4437 if test -z "$ac_err"; then
4438   rm -rf conftest*
4439   eval "ac_cv_header_$ac_safe=yes"
4440 else
4441   echo "$ac_err" >&5
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   eval "ac_cv_header_$ac_safe=no"
4446 fi
4447 rm -f conftest*
4448 fi
4449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4450   echo "$ac_t""yes" 1>&6
4451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4452   cat >> confdefs.h <<EOF
4453 #define $ac_tr_hdr 1
4454 EOF
4455  
4456     PLUGINS="${PLUGINS} gtk"
4457     ALIASES="${ALIASES} gvlc"
4458   
4459 else
4460   echo "$ac_t""no" 1>&6
4461 fi
4462 done
4463
4464   CPPFLAGS=$saved_CPPFLAGS
4465 fi
4466
4467 # Check whether --enable-x11 or --disable-x11 was given.
4468 if test "${enable_x11+set}" = set; then
4469   enableval="$enable_x11"
4470   :
4471 fi
4472
4473 if test x$enable_x11 != xno; then
4474   if test x$x_includes = xNONE; then
4475     x_includes=/usr/X11R6/include
4476   fi
4477   if test x$x_libraries = xNONE; then
4478     x_libraries=/usr/X11R6/lib
4479   fi
4480   saved_CPPFLAGS=$CPPFLAGS
4481   CPPFLAGS="$CPPFLAGS -I$x_includes"
4482   for ac_hdr in X11/Xlib.h
4483 do
4484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4486 echo "configure:4487: checking for $ac_hdr" >&5
4487 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4488   echo $ac_n "(cached) $ac_c" 1>&6
4489 else
4490   cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 #include <$ac_hdr>
4494 EOF
4495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4496 { (eval echo configure:4497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4498 if test -z "$ac_err"; then
4499   rm -rf conftest*
4500   eval "ac_cv_header_$ac_safe=yes"
4501 else
4502   echo "$ac_err" >&5
4503   echo "configure: failed program was:" >&5
4504   cat conftest.$ac_ext >&5
4505   rm -rf conftest*
4506   eval "ac_cv_header_$ac_safe=no"
4507 fi
4508 rm -f conftest*
4509 fi
4510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4511   echo "$ac_t""yes" 1>&6
4512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4513   cat >> confdefs.h <<EOF
4514 #define $ac_tr_hdr 1
4515 EOF
4516  
4517     PLUGINS="${PLUGINS} x11"
4518     LIB_X11="-L$x_libraries -lX11 -lXext"
4519     CFLAGS_X11="-I$x_includes"
4520   
4521   CPPFLAGS=$saved_CPPFLAGS
4522 else
4523   echo "$ac_t""no" 1>&6
4524 fi
4525 done
4526
4527 fi
4528
4529 # Check whether --enable-xvideo or --disable-xvideo was given.
4530 if test "${enable_xvideo+set}" = set; then
4531   enableval="$enable_xvideo"
4532   :
4533 fi
4534
4535 if test x$enable_xvideo != xno; then
4536   if test x$x_includes = xNONE; then
4537     x_includes=/usr/X11R6/include
4538   fi
4539   if test x$x_libraries = xNONE; then
4540     x_libraries=/usr/X11R6/lib
4541   fi
4542   saved_CPPFLAGS=$CPPFLAGS
4543   CPPFLAGS="$CPPFLAGS -I$x_includes"
4544   for ac_hdr in X11/extensions/Xv.h
4545 do
4546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4548 echo "configure:4549: checking for $ac_hdr" >&5
4549 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4550   echo $ac_n "(cached) $ac_c" 1>&6
4551 else
4552   cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555 #include <$ac_hdr>
4556 EOF
4557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4558 { (eval echo configure:4559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4560 if test -z "$ac_err"; then
4561   rm -rf conftest*
4562   eval "ac_cv_header_$ac_safe=yes"
4563 else
4564   echo "$ac_err" >&5
4565   echo "configure: failed program was:" >&5
4566   cat conftest.$ac_ext >&5
4567   rm -rf conftest*
4568   eval "ac_cv_header_$ac_safe=no"
4569 fi
4570 rm -f conftest*
4571 fi
4572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4573   echo "$ac_t""yes" 1>&6
4574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4575   cat >> confdefs.h <<EOF
4576 #define $ac_tr_hdr 1
4577 EOF
4578  
4579     PLUGINS="${PLUGINS} xvideo"
4580     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4581     CFLAGS_X11="-I$x_includes"
4582   
4583   CPPFLAGS=$saved_CPPFLAGS
4584 else
4585   echo "$ac_t""no" 1>&6
4586 fi
4587 done
4588
4589 fi
4590
4591 # Check whether --enable-alsa or --disable-alsa was given.
4592 if test "${enable_alsa+set}" = set; then
4593   enableval="$enable_alsa"
4594   if test x$enable_alsa = xyes
4595    then
4596      ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4597 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4598 echo "configure:4599: checking for sys/asoundlib.h" >&5
4599 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4600   echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602   cat > conftest.$ac_ext <<EOF
4603 #line 4604 "configure"
4604 #include "confdefs.h"
4605 #include <sys/asoundlib.h>
4606 EOF
4607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4608 { (eval echo configure:4609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4610 if test -z "$ac_err"; then
4611   rm -rf conftest*
4612   eval "ac_cv_header_$ac_safe=yes"
4613 else
4614   echo "$ac_err" >&5
4615   echo "configure: failed program was:" >&5
4616   cat conftest.$ac_ext >&5
4617   rm -rf conftest*
4618   eval "ac_cv_header_$ac_safe=no"
4619 fi
4620 rm -f conftest*
4621 fi
4622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4623   echo "$ac_t""yes" 1>&6
4624   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4625 echo "configure:4626: checking for main in -lasound" >&5
4626 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4627 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   ac_save_LIBS="$LIBS"
4631 LIBS="-lasound  $LIBS"
4632 cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635
4636 int main() {
4637 main()
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641   rm -rf conftest*
4642   eval "ac_cv_lib_$ac_lib_var=yes"
4643 else
4644   echo "configure: failed program was:" >&5
4645   cat conftest.$ac_ext >&5
4646   rm -rf conftest*
4647   eval "ac_cv_lib_$ac_lib_var=no"
4648 fi
4649 rm -f conftest*
4650 LIBS="$ac_save_LIBS"
4651
4652 fi
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654   echo "$ac_t""yes" 1>&6
4655   have_alsa="true"
4656 else
4657   echo "$ac_t""no" 1>&6
4658 have_alsa="false"
4659 fi
4660
4661 else
4662   echo "$ac_t""no" 1>&6
4663 have_alsa="false"
4664 fi
4665
4666      if test x$have_alsa = xtrue
4667      then
4668        PLUGINS="${PLUGINS} alsa"
4669        LIB_ALSA="-lasound"
4670      fi
4671    fi
4672 fi
4673
4674
4675 fi
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
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730 trap '' 1 2 15
4731 cat > confcache <<\EOF
4732 # This file is a shell script that caches the results of configure
4733 # tests run on this system so they can be shared between configure
4734 # scripts and configure runs.  It is not useful on other systems.
4735 # If it contains results you don't want to keep, you may remove or edit it.
4736 #
4737 # By default, configure uses ./config.cache as the cache file,
4738 # creating it if it does not exist already.  You can give configure
4739 # the --cache-file=FILE option to use a different cache file; that is
4740 # what configure does when it calls configure scripts in
4741 # subdirectories, so they share the cache.
4742 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4743 # config.status only pays attention to the cache file if you give it the
4744 # --recheck option to rerun configure.
4745 #
4746 EOF
4747 # The following way of writing the cache mishandles newlines in values,
4748 # but we know of no workaround that is simple, portable, and efficient.
4749 # So, don't put newlines in cache variables' values.
4750 # Ultrix sh set writes to stderr and can't be redirected directly,
4751 # and sets the high bit in the cache file unless we assign to the vars.
4752 (set) 2>&1 |
4753   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4754   *ac_space=\ *)
4755     # `set' does not quote correctly, so add quotes (double-quote substitution
4756     # turns \\\\ into \\, and sed turns \\ into \).
4757     sed -n \
4758       -e "s/'/'\\\\''/g" \
4759       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4760     ;;
4761   *)
4762     # `set' quotes correctly as required by POSIX, so do not add quotes.
4763     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4764     ;;
4765   esac >> confcache
4766 if cmp -s $cache_file confcache; then
4767   :
4768 else
4769   if test -w $cache_file; then
4770     echo "updating cache $cache_file"
4771     cat confcache > $cache_file
4772   else
4773     echo "not updating unwritable cache $cache_file"
4774   fi
4775 fi
4776 rm -f confcache
4777
4778 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4779
4780 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4781 # Let make expand exec_prefix.
4782 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4783
4784 # Any assignment to VPATH causes Sun make to only execute
4785 # the first set of double-colon rules, so remove it if not needed.
4786 # If there is a colon in the path, we need to keep it.
4787 if test "x$srcdir" = x.; then
4788   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4789 fi
4790
4791 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4792
4793 DEFS=-DHAVE_CONFIG_H
4794
4795 # Without the "./", some shells look in PATH for config.status.
4796 : ${CONFIG_STATUS=./config.status}
4797
4798 echo creating $CONFIG_STATUS
4799 rm -f $CONFIG_STATUS
4800 cat > $CONFIG_STATUS <<EOF
4801 #! /bin/sh
4802 # Generated automatically by configure.
4803 # Run this file to recreate the current configuration.
4804 # This directory was configured as follows,
4805 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4806 #
4807 # $0 $ac_configure_args
4808 #
4809 # Compiler output produced by configure, useful for debugging
4810 # configure, is in ./config.log if it exists.
4811
4812 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4813 for ac_option
4814 do
4815   case "\$ac_option" in
4816   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4817     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4818     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4819   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4820     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4821     exit 0 ;;
4822   -help | --help | --hel | --he | --h)
4823     echo "\$ac_cs_usage"; exit 0 ;;
4824   *) echo "\$ac_cs_usage"; exit 1 ;;
4825   esac
4826 done
4827
4828 ac_given_srcdir=$srcdir
4829 ac_given_INSTALL="$INSTALL"
4830
4831 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4832 EOF
4833 cat >> $CONFIG_STATUS <<EOF
4834
4835 # Protect against being on the right side of a sed subst in config.status.
4836 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4837  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4838 $ac_vpsub
4839 $extrasub
4840 s%@SHELL@%$SHELL%g
4841 s%@CFLAGS@%$CFLAGS%g
4842 s%@CPPFLAGS@%$CPPFLAGS%g
4843 s%@CXXFLAGS@%$CXXFLAGS%g
4844 s%@FFLAGS@%$FFLAGS%g
4845 s%@DEFS@%$DEFS%g
4846 s%@LDFLAGS@%$LDFLAGS%g
4847 s%@LIBS@%$LIBS%g
4848 s%@exec_prefix@%$exec_prefix%g
4849 s%@prefix@%$prefix%g
4850 s%@program_transform_name@%$program_transform_name%g
4851 s%@bindir@%$bindir%g
4852 s%@sbindir@%$sbindir%g
4853 s%@libexecdir@%$libexecdir%g
4854 s%@datadir@%$datadir%g
4855 s%@sysconfdir@%$sysconfdir%g
4856 s%@sharedstatedir@%$sharedstatedir%g
4857 s%@localstatedir@%$localstatedir%g
4858 s%@libdir@%$libdir%g
4859 s%@includedir@%$includedir%g
4860 s%@oldincludedir@%$oldincludedir%g
4861 s%@infodir@%$infodir%g
4862 s%@mandir@%$mandir%g
4863 s%@host@%$host%g
4864 s%@host_alias@%$host_alias%g
4865 s%@host_cpu@%$host_cpu%g
4866 s%@host_vendor@%$host_vendor%g
4867 s%@host_os@%$host_os%g
4868 s%@VLC_VERSION@%$VLC_VERSION%g
4869 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
4870 s%@VLC_CODENAME@%$VLC_CODENAME%g
4871 s%@SET_MAKE@%$SET_MAKE%g
4872 s%@CC@%$CC%g
4873 s%@CPP@%$CPP%g
4874 s%@RANLIB@%$RANLIB%g
4875 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4876 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4877 s%@INSTALL_DATA@%$INSTALL_DATA%g
4878 s%@ESD_CONFIG@%$ESD_CONFIG%g
4879 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
4880 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
4881 s%@SDL_CONFIG@%$SDL_CONFIG%g
4882 s%@GTK_CONFIG@%$GTK_CONFIG%g
4883 s%@SYS@%$SYS%g
4884 s%@ARCH@%$ARCH%g
4885 s%@PLUGINS@%$PLUGINS%g
4886 s%@BUILTINS@%$BUILTINS%g
4887 s%@ALIASES@%$ALIASES%g
4888 s%@DEFINE@%$DEFINE%g
4889 s%@INCLUDE@%$INCLUDE%g
4890 s%@DEBUG@%$DEBUG%g
4891 s%@STATS@%$STATS%g
4892 s%@ASM@%$ASM%g
4893 s%@TRACE@%$TRACE%g
4894 s%@PROFILING@%$PROFILING%g
4895 s%@OPTIMS@%$OPTIMS%g
4896 s%@GETOPT@%$GETOPT%g
4897 s%@CSS@%$CSS%g
4898 s%@MOC@%$MOC%g
4899 s%@WINDRES@%$WINDRES%g
4900 s%@LCFLAGS@%$LCFLAGS%g
4901 s%@PLCFLAGS@%$PLCFLAGS%g
4902 s%@LIB@%$LIB%g
4903 s%@LIB_ALSA@%$LIB_ALSA%g
4904 s%@LIB_BEOS@%$LIB_BEOS%g
4905 s%@LIB_DARWIN@%$LIB_DARWIN%g
4906 s%@LIB_DVD@%$LIB_DVD%g
4907 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
4908 s%@LIB_ESD@%$LIB_ESD%g
4909 s%@LIB_GGI@%$LIB_GGI%g
4910 s%@LIB_GLIDE@%$LIB_GLIDE%g
4911 s%@LIB_GNOME@%$LIB_GNOME%g
4912 s%@LIB_GTK@%$LIB_GTK%g
4913 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4914 s%@LIB_KDE@%$LIB_KDE%g
4915 s%@LIB_MACOSX@%$LIB_MACOSX%g
4916 s%@LIB_QNX@%$LIB_QNX%g
4917 s%@LIB_NCURSES@%$LIB_NCURSES%g
4918 s%@LIB_QT@%$LIB_QT%g
4919 s%@LIB_TS@%$LIB_TS%g
4920 s%@LIB_SDL@%$LIB_SDL%g
4921 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4922 s%@LIB_X11@%$LIB_X11%g
4923 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4924 s%@LIB_YUV@%$LIB_YUV%g
4925 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4926 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4927 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4928 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4929 s%@CFLAGS_X11@%$CFLAGS_X11%g
4930 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4931
4932 CEOF
4933 EOF
4934
4935 cat >> $CONFIG_STATUS <<\EOF
4936
4937 # Split the substitutions into bite-sized pieces for seds with
4938 # small command number limits, like on Digital OSF/1 and HP-UX.
4939 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4940 ac_file=1 # Number of current file.
4941 ac_beg=1 # First line for current file.
4942 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4943 ac_more_lines=:
4944 ac_sed_cmds=""
4945 while $ac_more_lines; do
4946   if test $ac_beg -gt 1; then
4947     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4948   else
4949     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4950   fi
4951   if test ! -s conftest.s$ac_file; then
4952     ac_more_lines=false
4953     rm -f conftest.s$ac_file
4954   else
4955     if test -z "$ac_sed_cmds"; then
4956       ac_sed_cmds="sed -f conftest.s$ac_file"
4957     else
4958       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4959     fi
4960     ac_file=`expr $ac_file + 1`
4961     ac_beg=$ac_end
4962     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4963   fi
4964 done
4965 if test -z "$ac_sed_cmds"; then
4966   ac_sed_cmds=cat
4967 fi
4968 EOF
4969
4970 cat >> $CONFIG_STATUS <<EOF
4971
4972 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4973 EOF
4974 cat >> $CONFIG_STATUS <<\EOF
4975 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4976   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4977   case "$ac_file" in
4978   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4979        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4980   *) ac_file_in="${ac_file}.in" ;;
4981   esac
4982
4983   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4984
4985   # Remove last slash and all that follows it.  Not all systems have dirname.
4986   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4987   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4988     # The file is in a subdirectory.
4989     test ! -d "$ac_dir" && mkdir "$ac_dir"
4990     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4991     # A "../" for each directory in $ac_dir_suffix.
4992     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4993   else
4994     ac_dir_suffix= ac_dots=
4995   fi
4996
4997   case "$ac_given_srcdir" in
4998   .)  srcdir=.
4999       if test -z "$ac_dots"; then top_srcdir=.
5000       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5001   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5002   *) # Relative path.
5003     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5004     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5005   esac
5006
5007   case "$ac_given_INSTALL" in
5008   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5009   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5010   esac
5011
5012   echo creating "$ac_file"
5013   rm -f "$ac_file"
5014   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5015   case "$ac_file" in
5016   *Makefile*) ac_comsub="1i\\
5017 # $configure_input" ;;
5018   *) ac_comsub= ;;
5019   esac
5020
5021   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5022   sed -e "$ac_comsub
5023 s%@configure_input@%$configure_input%g
5024 s%@srcdir@%$srcdir%g
5025 s%@top_srcdir@%$top_srcdir%g
5026 s%@INSTALL@%$INSTALL%g
5027 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5028 fi; done
5029 rm -f conftest.s*
5030
5031 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5032 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5033 #
5034 # ac_d sets the value in "#define NAME VALUE" lines.
5035 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5036 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5037 ac_dC='\3'
5038 ac_dD='%g'
5039 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5040 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5041 ac_uB='\([      ]\)%\1#\2define\3'
5042 ac_uC=' '
5043 ac_uD='\4%g'
5044 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5045 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5046 ac_eB='$%\1#\2define\3'
5047 ac_eC=' '
5048 ac_eD='%g'
5049
5050 if test "${CONFIG_HEADERS+set}" != set; then
5051 EOF
5052 cat >> $CONFIG_STATUS <<EOF
5053   CONFIG_HEADERS="include/defs.h"
5054 EOF
5055 cat >> $CONFIG_STATUS <<\EOF
5056 fi
5057 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5058   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5059   case "$ac_file" in
5060   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5061        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5062   *) ac_file_in="${ac_file}.in" ;;
5063   esac
5064
5065   echo creating $ac_file
5066
5067   rm -f conftest.frag conftest.in conftest.out
5068   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5069   cat $ac_file_inputs > conftest.in
5070
5071 EOF
5072
5073 # Transform confdefs.h into a sed script conftest.vals that substitutes
5074 # the proper values into config.h.in to produce config.h.  And first:
5075 # Protect against being on the right side of a sed subst in config.status.
5076 # Protect against being in an unquoted here document in config.status.
5077 rm -f conftest.vals
5078 cat > conftest.hdr <<\EOF
5079 s/[\\&%]/\\&/g
5080 s%[\\$`]%\\&%g
5081 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5082 s%ac_d%ac_u%gp
5083 s%ac_u%ac_e%gp
5084 EOF
5085 sed -n -f conftest.hdr confdefs.h > conftest.vals
5086 rm -f conftest.hdr
5087
5088 # This sed command replaces #undef with comments.  This is necessary, for
5089 # example, in the case of _POSIX_SOURCE, which is predefined and required
5090 # on some systems where configure will not decide to define it.
5091 cat >> conftest.vals <<\EOF
5092 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5093 EOF
5094
5095 # Break up conftest.vals because some shells have a limit on
5096 # the size of here documents, and old seds have small limits too.
5097
5098 rm -f conftest.tail
5099 while :
5100 do
5101   ac_lines=`grep -c . conftest.vals`
5102   # grep -c gives empty output for an empty file on some AIX systems.
5103   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5104   # Write a limited-size here document to conftest.frag.
5105   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5106   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5107   echo 'CEOF
5108   sed -f conftest.frag conftest.in > conftest.out
5109   rm -f conftest.in
5110   mv conftest.out conftest.in
5111 ' >> $CONFIG_STATUS
5112   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5113   rm -f conftest.vals
5114   mv conftest.tail conftest.vals
5115 done
5116 rm -f conftest.vals
5117
5118 cat >> $CONFIG_STATUS <<\EOF
5119   rm -f conftest.frag conftest.h
5120   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5121   cat conftest.in >> conftest.h
5122   rm -f conftest.in
5123   if cmp -s $ac_file conftest.h 2>/dev/null; then
5124     echo "$ac_file is unchanged"
5125     rm -f conftest.h
5126   else
5127     # Remove last slash and all that follows it.  Not all systems have dirname.
5128       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5129       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5130       # The file is in a subdirectory.
5131       test ! -d "$ac_dir" && mkdir "$ac_dir"
5132     fi
5133     rm -f $ac_file
5134     mv conftest.h $ac_file
5135   fi
5136 fi; done
5137
5138 EOF
5139 cat >> $CONFIG_STATUS <<EOF
5140
5141 EOF
5142 cat >> $CONFIG_STATUS <<\EOF
5143
5144 exit 0
5145 EOF
5146 chmod +x $CONFIG_STATUS
5147 rm -fr confdefs* $ac_clean_files
5148 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5149
5150
5151 echo "
5152 global configuration
5153 --------------------
5154 system                : ${SYS}
5155 architecture          : ${ARCH}
5156 optimizations         : ${OPTIMS}
5157
5158 vlc configuration
5159 -----------------
5160 vlc version           : ${VLC_VERSION}
5161 debug mode            : ${DEBUG}
5162 statistics            : ${STATS}
5163 trace mode            : ${TRACE}
5164 profiling             : ${PROFILING}
5165 need builtin getopt   : ${GETOPT}
5166 built-in modules      :${BUILTINS}
5167 plugin modules        :${PLUGINS}
5168 vlc aliases           :${ALIASES}
5169
5170 libdvdcss configuration
5171 -----------------------
5172 need to be built      : ${LOCAL_LIBDVDCSS}"
5173
5174 if test x${LOCAL_LIBDVDCSS} = x1
5175 then
5176   echo "link statically       : ${STATIC_LIBDVDCSS}
5177 CSS decryption        : ${CSS}"
5178 fi
5179
5180 echo "
5181 You may now tune Makefile.opts at your convenience. To build vlc and its
5182 plugins, type \`make vlc plugins'. If you want to build libdvdcss only,
5183 type \`make libdvdcss'."
5184