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