]> git.sesse.net Git - vlc/blob - configure
e9c1c4eb947c75a56c32c70148b7ca9d169f15b3
[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 # Check whether --enable-ppro or --disable-ppro was given.
3571 if test "${enable_ppro+set}" = set; then
3572   enableval="$enable_ppro"
3573    if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3574 else
3575    if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3576 fi
3577
3578
3579 # Check whether --enable-mmx or --disable-mmx was given.
3580 if test "${enable_mmx+set}" = set; then
3581   enableval="$enable_mmx"
3582    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
3583   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3584 else
3585    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";
3586   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3587 fi
3588
3589
3590 # Check whether --enable-altivec or --disable-altivec was given.
3591 if test "${enable_altivec+set}" = set; then
3592   enableval="$enable_altivec"
3593    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
3594     BUILTINS="${BUILTINS} idctaltivec"
3595     LIB_IDCTALTIVEC="-framework vecLib"
3596   fi 
3597 fi
3598
3599 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
3600
3601 # Check whether --enable-debug or --disable-debug was given.
3602 if test "${enable_debug+set}" = set; then
3603   enableval="$enable_debug"
3604    if test x$enableval = xyes; then DEBUG=1; fi 
3605 fi
3606
3607
3608 # Check whether --enable-stats or --disable-stats was given.
3609 if test "${enable_stats+set}" = set; then
3610   enableval="$enable_stats"
3611    if test x$enableval = xyes; then STATS=1; fi 
3612 fi
3613
3614
3615 # Check whether --enable-trace or --disable-trace was given.
3616 if test "${enable_trace+set}" = set; then
3617   enableval="$enable_trace"
3618    if test x$enableval = xyes; then TRACE=1; fi 
3619 fi
3620
3621
3622 # Check whether --enable-profiling or --disable-profiling was given.
3623 if test "${enable_profiling+set}" = set; then
3624   enableval="$enable_profiling"
3625    if test x$enableval = xyes; then PROFILING=1; fi 
3626 fi
3627
3628
3629 # Check whether --enable-optimizations or --disable-optimizations was given.
3630 if test "${enable_optimizations+set}" = set; then
3631   enableval="$enable_optimizations"
3632    if test x$enableval = xno; then OPTIMS=0; fi 
3633 else
3634    OPTIMS=1 
3635 fi
3636
3637
3638 # Check whether --enable-pth or --disable-pth was given.
3639 if test "${enable_pth+set}" = set; then
3640   enableval="$enable_pth"
3641    if test x$enableval = xyes; then
3642     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3643 echo "configure:3644: checking for pth_init in -lpth" >&5
3644 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
3645 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   ac_save_LIBS="$LIBS"
3649 LIBS="-lpth  $LIBS"
3650 cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 /* Override any gcc2 internal prototype to avoid an error.  */
3654 /* We use char because int might match the return type of a gcc2
3655     builtin and then its argument prototype would still apply.  */
3656 char pth_init();
3657
3658 int main() {
3659 pth_init()
3660 ; return 0; }
3661 EOF
3662 if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3663   rm -rf conftest*
3664   eval "ac_cv_lib_$ac_lib_var=yes"
3665 else
3666   echo "configure: failed program was:" >&5
3667   cat conftest.$ac_ext >&5
3668   rm -rf conftest*
3669   eval "ac_cv_lib_$ac_lib_var=no"
3670 fi
3671 rm -f conftest*
3672 LIBS="$ac_save_LIBS"
3673
3674 fi
3675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3676   echo "$ac_t""yes" 1>&6
3677     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3678     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3679   cat >> confdefs.h <<EOF
3680 #define $ac_tr_lib 1
3681 EOF
3682
3683   LIBS="-lpth $LIBS"
3684
3685 else
3686   echo "$ac_t""no" 1>&6
3687 fi
3688
3689     cat > conftest.$ac_ext <<EOF
3690 #line 3691 "configure"
3691 #include "confdefs.h"
3692 #include <pth.h>
3693 EOF
3694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3695   egrep "pth_init" >/dev/null 2>&1; then
3696   rm -rf conftest*
3697   
3698       cat >> confdefs.h <<\EOF
3699 #define PTH_INIT_IN_PTH_H 1
3700 EOF
3701
3702     THREAD_LIB="-lpth"
3703     fi
3704 fi
3705 rm -f conftest*
3706
3707
3708 fi
3709
3710
3711 LIB="${LIB} ${THREAD_LIB}"
3712
3713 # Check whether --enable-css or --disable-css was given.
3714 if test "${enable_css+set}" = set; then
3715   enableval="$enable_css"
3716    if test x$enableval = xyes; then CSS=1; else CSS=0; fi 
3717 else
3718    CSS=1; 
3719 fi
3720
3721 if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
3722 #define HAVE_CSS 1
3723 EOF
3724  fi
3725
3726 for ac_hdr in videolan/dvdcss.h
3727 do
3728 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3729 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3730 echo "configure:3731: checking for $ac_hdr" >&5
3731 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3732   echo $ac_n "(cached) $ac_c" 1>&6
3733 else
3734   cat > conftest.$ac_ext <<EOF
3735 #line 3736 "configure"
3736 #include "confdefs.h"
3737 #include <$ac_hdr>
3738 EOF
3739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3740 { (eval echo configure:3741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3742 if test -z "$ac_err"; then
3743   rm -rf conftest*
3744   eval "ac_cv_header_$ac_safe=yes"
3745 else
3746   echo "$ac_err" >&5
3747   echo "configure: failed program was:" >&5
3748   cat conftest.$ac_ext >&5
3749   rm -rf conftest*
3750   eval "ac_cv_header_$ac_safe=no"
3751 fi
3752 rm -f conftest*
3753 fi
3754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3755   echo "$ac_t""yes" 1>&6
3756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3757   cat >> confdefs.h <<EOF
3758 #define $ac_tr_hdr 1
3759 EOF
3760  
3761   # installed libdvdcss
3762   BUILTINS="${BUILTINS} dvd"
3763   LIB_DVD="${LIB_DVD} -ldvdcss"
3764 else
3765   echo "$ac_t""no" 1>&6
3766 if test x${LIBDVDCSS} = x1; then
3767     # local libdvdcss
3768     LOCAL_LIBDVDCSS=1
3769     BUILTINS="${BUILTINS} dvd"
3770     CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3771   fi
3772 fi
3773 done
3774
3775
3776 # Check whether --enable-dummy or --disable-dummy was given.
3777 if test "${enable_dummy+set}" = set; then
3778   enableval="$enable_dummy"
3779   :
3780 fi
3781
3782 if test x$enable_dummy != xno; then
3783   BUILTINS="${BUILTINS} dummy"; fi
3784
3785 # Check whether --enable-null or --disable-null was given.
3786 if test "${enable_null+set}" = set; then
3787   enableval="$enable_null"
3788   :
3789 fi
3790
3791 if test x$enable_null != xno; then
3792   BUILTINS="${BUILTINS} null"; fi
3793
3794 # Check whether --enable-rc or --disable-rc was given.
3795 if test "${enable_rc+set}" = set; then
3796   enableval="$enable_rc"
3797   :
3798 fi
3799
3800 if test x$enable_rc != xno; then
3801   BUILTINS="${BUILTINS} rc"; fi
3802
3803 SYS=${host_os}
3804
3805 if test x$host_os = xbeos; then
3806     BUILTINS="${BUILTINS} beos"
3807     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3808     PLCFLAGS="${PLCFLAGS} -nostart"
3809
3810 else
3811
3812 # Check whether --enable-dsp or --disable-dsp was given.
3813 if test "${enable_dsp+set}" = set; then
3814   enableval="$enable_dsp"
3815   :
3816 fi
3817
3818 if test x$enable_dsp != xno; then
3819   if test -c /dev/dsp; then
3820     PLUGINS="${PLUGINS} dsp"
3821   fi
3822 fi
3823
3824 # Check whether --enable-esd or --disable-esd was given.
3825 if test "${enable_esd+set}" = set; then
3826   enableval="$enable_esd"
3827   if test x$enable_esd = xyes; then
3828      # Extract the first word of "esd-config", so it can be a program name with args.
3829 set dummy esd-config; ac_word=$2
3830 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3831 echo "configure:3832: checking for $ac_word" >&5
3832 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   case "$ESD_CONFIG" in
3836   /*)
3837   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3838   ;;
3839   ?:/*)                  
3840   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3841   ;;
3842   *)
3843   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3844   ac_dummy="$PATH"
3845   for ac_dir in $ac_dummy; do 
3846     test -z "$ac_dir" && ac_dir=.
3847     if test -f $ac_dir/$ac_word; then
3848       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3849       break
3850     fi
3851   done
3852   IFS="$ac_save_ifs"
3853   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3854   ;;
3855 esac
3856 fi
3857 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3858 if test -n "$ESD_CONFIG"; then
3859   echo "$ac_t""$ESD_CONFIG" 1>&6
3860 else
3861   echo "$ac_t""no" 1>&6
3862 fi
3863
3864      if test x${ESD_CONFIG} != xno; then
3865        PLUGINS="${PLUGINS} esd"
3866        LIB_ESD="`${ESD_CONFIG} --libs`"
3867      fi
3868    fi
3869 fi
3870
3871
3872 # Check whether --enable-darwin or --disable-darwin was given.
3873 if test "${enable_darwin+set}" = set; then
3874   enableval="$enable_darwin"
3875   if test x$enable_darwin = xyes; then
3876      PLUGINS="${PLUGINS} darwin"
3877      LIB_DARWIN="-framework CoreAudio"
3878    fi
3879 fi
3880
3881
3882 # Check whether --enable-macosx or --disable-macosx was given.
3883 if test "${enable_macosx+set}" = set; then
3884   enableval="$enable_macosx"
3885   if test x$enable_macosx = xyes; then
3886      BUILTINS="${BUILTINS} macosx"
3887      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3888      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3889      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3890    fi
3891 else
3892   for ac_hdr in Carbon/Carbon.h
3893 do
3894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3896 echo "configure:3897: checking for $ac_hdr" >&5
3897 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3898   echo $ac_n "(cached) $ac_c" 1>&6
3899 else
3900   cat > conftest.$ac_ext <<EOF
3901 #line 3902 "configure"
3902 #include "confdefs.h"
3903 #include <$ac_hdr>
3904 EOF
3905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3906 { (eval echo configure:3907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3908 if test -z "$ac_err"; then
3909   rm -rf conftest*
3910   eval "ac_cv_header_$ac_safe=yes"
3911 else
3912   echo "$ac_err" >&5
3913   echo "configure: failed program was:" >&5
3914   cat conftest.$ac_ext >&5
3915   rm -rf conftest*
3916   eval "ac_cv_header_$ac_safe=no"
3917 fi
3918 rm -f conftest*
3919 fi
3920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3921   echo "$ac_t""yes" 1>&6
3922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3923   cat >> confdefs.h <<EOF
3924 #define $ac_tr_hdr 1
3925 EOF
3926  BUILTINS="${BUILTINS} macosx"
3927      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3928      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3929      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3930    
3931 else
3932   echo "$ac_t""no" 1>&6
3933 fi
3934 done
3935
3936 fi
3937
3938
3939 # Check whether --enable-fb or --disable-fb was given.
3940 if test "${enable_fb+set}" = set; then
3941   enableval="$enable_fb"
3942   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
3943 fi
3944
3945
3946 # Check whether --with-ggi or --without-ggi was given.
3947 if test "${with_ggi+set}" = set; then
3948   withval="$with_ggi"
3949    if test "x$withval" != "xno";
3950     then
3951       PLUGINS="${PLUGINS} ggi";
3952       if test "x$withval" != "xyes";
3953       then
3954         LIB_GGI="-l"$withval
3955       else
3956         LIB_GGI="-lggi"
3957       fi
3958     fi 
3959 fi
3960
3961
3962 # Check whether --with-sdl or --without-sdl was given.
3963 if test "${with_sdl+set}" = set; then
3964   withval="$with_sdl"
3965    if test "x$withval" != "xno";
3966     then
3967       PLUGINS="${PLUGINS} sdl";
3968       if test "x$withval" != "xyes";
3969       then
3970         LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
3971         CFLAGS_SDL="-I"$withval"/include"
3972       else
3973         for ac_hdr in SDL/SDL.h
3974 do
3975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3977 echo "configure:3978: checking for $ac_hdr" >&5
3978 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3979   echo $ac_n "(cached) $ac_c" 1>&6
3980 else
3981   cat > conftest.$ac_ext <<EOF
3982 #line 3983 "configure"
3983 #include "confdefs.h"
3984 #include <$ac_hdr>
3985 EOF
3986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3987 { (eval echo configure:3988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3989 if test -z "$ac_err"; then
3990   rm -rf conftest*
3991   eval "ac_cv_header_$ac_safe=yes"
3992 else
3993   echo "$ac_err" >&5
3994   echo "configure: failed program was:" >&5
3995   cat conftest.$ac_ext >&5
3996   rm -rf conftest*
3997   eval "ac_cv_header_$ac_safe=no"
3998 fi
3999 rm -f conftest*
4000 fi
4001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4002   echo "$ac_t""yes" 1>&6
4003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4004   cat >> confdefs.h <<EOF
4005 #define $ac_tr_hdr 1
4006 EOF
4007  
4008 else
4009   echo "$ac_t""no" 1>&6
4010 echo "Cannot find SDL headers !"; exit
4011 fi
4012 done
4013
4014         LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
4015       fi
4016     fi 
4017 fi
4018
4019     if test "x$withval" = "x";
4020     then
4021       for ac_hdr in SDL/SDL.h
4022 do
4023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4025 echo "configure:4026: checking for $ac_hdr" >&5
4026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4027   echo $ac_n "(cached) $ac_c" 1>&6
4028 else
4029   cat > conftest.$ac_ext <<EOF
4030 #line 4031 "configure"
4031 #include "confdefs.h"
4032 #include <$ac_hdr>
4033 EOF
4034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4035 { (eval echo configure:4036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4037 if test -z "$ac_err"; then
4038   rm -rf conftest*
4039   eval "ac_cv_header_$ac_safe=yes"
4040 else
4041   echo "$ac_err" >&5
4042   echo "configure: failed program was:" >&5
4043   cat conftest.$ac_ext >&5
4044   rm -rf conftest*
4045   eval "ac_cv_header_$ac_safe=no"
4046 fi
4047 rm -f conftest*
4048 fi
4049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4050   echo "$ac_t""yes" 1>&6
4051     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4052   cat >> confdefs.h <<EOF
4053 #define $ac_tr_hdr 1
4054 EOF
4055  PLUGINS="${PLUGINS} sdl"
4056        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
4057 else
4058   echo "$ac_t""no" 1>&6
4059 fi
4060 done
4061
4062     fi
4063
4064 # Check whether --with-directx or --without-directx was given.
4065 if test "${with_directx+set}" = set; then
4066   withval="$with_directx"
4067    if test "x$withval" != "xno";
4068     then
4069       PLUGINS="${PLUGINS} directx";
4070       if test "x$withval" != "xyes";
4071       then
4072         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4073         INCLUDE="${INCLUDE} -I"$withval"/include"
4074       else
4075         for ac_hdr in directx.h
4076 do
4077 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4078 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4079 echo "configure:4080: checking for $ac_hdr" >&5
4080 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4081   echo $ac_n "(cached) $ac_c" 1>&6
4082 else
4083   cat > conftest.$ac_ext <<EOF
4084 #line 4085 "configure"
4085 #include "confdefs.h"
4086 #include <$ac_hdr>
4087 EOF
4088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4089 { (eval echo configure:4090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4091 if test -z "$ac_err"; then
4092   rm -rf conftest*
4093   eval "ac_cv_header_$ac_safe=yes"
4094 else
4095   echo "$ac_err" >&5
4096   echo "configure: failed program was:" >&5
4097   cat conftest.$ac_ext >&5
4098   rm -rf conftest*
4099   eval "ac_cv_header_$ac_safe=no"
4100 fi
4101 rm -f conftest*
4102 fi
4103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4104   echo "$ac_t""yes" 1>&6
4105     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4106   cat >> confdefs.h <<EOF
4107 #define $ac_tr_hdr 1
4108 EOF
4109  
4110 else
4111   echo "$ac_t""no" 1>&6
4112 echo "Cannot find DirectX headers !"; exit
4113 fi
4114 done
4115
4116         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4117       fi
4118     fi 
4119 fi
4120
4121     if test "x$withval" = "x";
4122     then
4123       for ac_hdr in directx.h
4124 do
4125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4127 echo "configure:4128: checking for $ac_hdr" >&5
4128 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4129   echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131   cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <$ac_hdr>
4135 EOF
4136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4137 { (eval echo configure:4138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4139 if test -z "$ac_err"; then
4140   rm -rf conftest*
4141   eval "ac_cv_header_$ac_safe=yes"
4142 else
4143   echo "$ac_err" >&5
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   eval "ac_cv_header_$ac_safe=no"
4148 fi
4149 rm -f conftest*
4150 fi
4151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4152   echo "$ac_t""yes" 1>&6
4153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4154   cat >> confdefs.h <<EOF
4155 #define $ac_tr_hdr 1
4156 EOF
4157  PLUGINS="${PLUGINS} directx"
4158        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162 done
4163
4164     fi
4165
4166 # Check whether --with-glide or --without-glide was given.
4167 if test "${with_glide+set}" = set; then
4168   withval="$with_glide"
4169    if test "x$withval" != "xno";
4170     then
4171       PLUGINS="${PLUGINS} glide";
4172       if test "x$withval" != "xyes";
4173       then
4174         LIB_GLIDE="-l"$withval" -lm"
4175       else
4176         LIB_GLIDE="-lglide2x -lm"
4177       fi
4178     fi 
4179 fi
4180
4181
4182 # Check whether --enable-ncurses or --disable-ncurses was given.
4183 if test "${enable_ncurses+set}" = set; then
4184   enableval="$enable_ncurses"
4185   if test x$enable_ncurses = xyes; then
4186      PLUGINS="${PLUGINS} ncurses"
4187      LIB_NCURSES="-lncurses"
4188    fi
4189 fi
4190
4191
4192 # Check whether --enable-qt or --disable-qt was given.
4193 if test "${enable_qt+set}" = set; then
4194   enableval="$enable_qt"
4195   if test x$enable_qt = xyes; then
4196      PLUGINS="${PLUGINS} qt"
4197      ALIASES="${ALIASES} qvlc"
4198      LIB_QT="-lqt -L${QTDIR}/lib"
4199      if test -x ${QTDIR}/bin/moc ;
4200      then
4201        MOC=${QTDIR}/bin/moc
4202      else
4203        MOC=moc
4204      fi
4205    fi
4206 fi
4207
4208
4209 # Check whether --enable-kde or --disable-kde was given.
4210 if test "${enable_kde+set}" = set; then
4211   enableval="$enable_kde"
4212   if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi
4213 fi
4214
4215
4216 # Check whether --enable-gnome or --disable-gnome was given.
4217 if test "${enable_gnome+set}" = set; then
4218   enableval="$enable_gnome"
4219   if test x$enable_gnome = xyes; then
4220      PLUGINS="${PLUGINS} gnome"
4221      ALIASES="${ALIASES} gnome-vlc"
4222      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4223    fi
4224 fi
4225
4226
4227 # Check whether --enable-gtk or --disable-gtk was given.
4228 if test "${enable_gtk+set}" = set; then
4229   enableval="$enable_gtk"
4230   :
4231 fi
4232
4233 if test x$enable_gtk != xno; then
4234   # Extract the first word of "gtk-config", so it can be a program name with args.
4235 set dummy gtk-config; ac_word=$2
4236 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4237 echo "configure:4238: checking for $ac_word" >&5
4238 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   case "$GTK_CONFIG" in
4242   /*)
4243   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4244   ;;
4245   ?:/*)                  
4246   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4247   ;;
4248   *)
4249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4250   ac_dummy="$PATH"
4251   for ac_dir in $ac_dummy; do 
4252     test -z "$ac_dir" && ac_dir=.
4253     if test -f $ac_dir/$ac_word; then
4254       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4255       break
4256     fi
4257   done
4258   IFS="$ac_save_ifs"
4259   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4260   ;;
4261 esac
4262 fi
4263 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4264 if test -n "$GTK_CONFIG"; then
4265   echo "$ac_t""$GTK_CONFIG" 1>&6
4266 else
4267   echo "$ac_t""no" 1>&6
4268 fi
4269
4270   if test x${GTK_CONFIG} != xno; then
4271     PLUGINS="${PLUGINS} gtk"
4272     ALIASES="${ALIASES} gvlc"
4273     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4274     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4275   fi
4276 fi
4277
4278 # Check whether --enable-x11 or --disable-x11 was given.
4279 if test "${enable_x11+set}" = set; then
4280   enableval="$enable_x11"
4281   :
4282 fi
4283
4284 if test x$enable_x11 != xno; then
4285   if test x$x_includes = xNONE; then
4286     x_includes=/usr/X11R6/include
4287   fi
4288   if test x$x_libraries = xNONE; then
4289     x_libraries=/usr/X11R6/lib
4290   fi
4291   saved_CPPFLAGS=$CPPFLAGS
4292   CPPFLAGS="$CPPFLAGS -I$x_includes"
4293   for ac_hdr in X11/Xlib.h
4294 do
4295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4297 echo "configure:4298: checking for $ac_hdr" >&5
4298 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304 #include <$ac_hdr>
4305 EOF
4306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4307 { (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4309 if test -z "$ac_err"; then
4310   rm -rf conftest*
4311   eval "ac_cv_header_$ac_safe=yes"
4312 else
4313   echo "$ac_err" >&5
4314   echo "configure: failed program was:" >&5
4315   cat conftest.$ac_ext >&5
4316   rm -rf conftest*
4317   eval "ac_cv_header_$ac_safe=no"
4318 fi
4319 rm -f conftest*
4320 fi
4321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4322   echo "$ac_t""yes" 1>&6
4323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4324   cat >> confdefs.h <<EOF
4325 #define $ac_tr_hdr 1
4326 EOF
4327  
4328     PLUGINS="${PLUGINS} x11"
4329     LIB_X11="-L$x_libraries -lX11 -lXext"
4330     CFLAGS_X11="-I$x_includes"
4331   
4332   CPPFLAGS=$saved_CPPFLAGS
4333 else
4334   echo "$ac_t""no" 1>&6
4335 fi
4336 done
4337
4338 fi
4339
4340 # Check whether --enable-xvideo or --disable-xvideo was given.
4341 if test "${enable_xvideo+set}" = set; then
4342   enableval="$enable_xvideo"
4343   :
4344 fi
4345
4346 if test x$enable_xvideo != xno; then
4347   if test x$x_includes = xNONE; then
4348     x_includes=/usr/X11R6/include
4349   fi
4350   if test x$x_libraries = xNONE; then
4351     x_libraries=/usr/X11R6/lib
4352   fi
4353   saved_CPPFLAGS=$CPPFLAGS
4354   CPPFLAGS="$CPPFLAGS -I$x_includes"
4355   for ac_hdr in X11/extensions/Xv.h
4356 do
4357 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4358 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4359 echo "configure:4360: checking for $ac_hdr" >&5
4360 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <$ac_hdr>
4367 EOF
4368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4369 { (eval echo configure:4370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4371 if test -z "$ac_err"; then
4372   rm -rf conftest*
4373   eval "ac_cv_header_$ac_safe=yes"
4374 else
4375   echo "$ac_err" >&5
4376   echo "configure: failed program was:" >&5
4377   cat conftest.$ac_ext >&5
4378   rm -rf conftest*
4379   eval "ac_cv_header_$ac_safe=no"
4380 fi
4381 rm -f conftest*
4382 fi
4383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4384   echo "$ac_t""yes" 1>&6
4385     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4386   cat >> confdefs.h <<EOF
4387 #define $ac_tr_hdr 1
4388 EOF
4389  
4390     PLUGINS="${PLUGINS} xvideo"
4391     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4392     CFLAGS_X11="-I$x_includes"
4393   
4394   CPPFLAGS=$saved_CPPFLAGS
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398 done
4399
4400 fi
4401
4402 # Check whether --enable-alsa or --disable-alsa was given.
4403 if test "${enable_alsa+set}" = set; then
4404   enableval="$enable_alsa"
4405   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4406 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4407 echo "configure:4408: checking for sys/asoundlib.h" >&5
4408 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414 #include <sys/asoundlib.h>
4415 EOF
4416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4417 { (eval echo configure:4418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4419 if test -z "$ac_err"; then
4420   rm -rf conftest*
4421   eval "ac_cv_header_$ac_safe=yes"
4422 else
4423   echo "$ac_err" >&5
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -rf conftest*
4427   eval "ac_cv_header_$ac_safe=no"
4428 fi
4429 rm -f conftest*
4430 fi
4431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4432   echo "$ac_t""yes" 1>&6
4433   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4434 echo "configure:4435: checking for main in -lasound" >&5
4435 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4436 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4437   echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439   ac_save_LIBS="$LIBS"
4440 LIBS="-lasound  $LIBS"
4441 cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444
4445 int main() {
4446 main()
4447 ; return 0; }
4448 EOF
4449 if { (eval echo configure:4450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4450   rm -rf conftest*
4451   eval "ac_cv_lib_$ac_lib_var=yes"
4452 else
4453   echo "configure: failed program was:" >&5
4454   cat conftest.$ac_ext >&5
4455   rm -rf conftest*
4456   eval "ac_cv_lib_$ac_lib_var=no"
4457 fi
4458 rm -f conftest*
4459 LIBS="$ac_save_LIBS"
4460
4461 fi
4462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4463   echo "$ac_t""yes" 1>&6
4464   have_alsa="true"
4465 else
4466   echo "$ac_t""no" 1>&6
4467 have_alsa="false"
4468 fi
4469
4470 else
4471   echo "$ac_t""no" 1>&6
4472 have_alsa="false"
4473 fi
4474  if test x$have_alsa = xtrue; then
4475      PLUGINS="${PLUGINS} alsa"
4476      LIB_ALSA="-lasound"
4477    fi; fi
4478 fi
4479
4480
4481 fi
4482
4483
4484
4485
4486
4487
4488
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 trap '' 1 2 15
4532 cat > confcache <<\EOF
4533 # This file is a shell script that caches the results of configure
4534 # tests run on this system so they can be shared between configure
4535 # scripts and configure runs.  It is not useful on other systems.
4536 # If it contains results you don't want to keep, you may remove or edit it.
4537 #
4538 # By default, configure uses ./config.cache as the cache file,
4539 # creating it if it does not exist already.  You can give configure
4540 # the --cache-file=FILE option to use a different cache file; that is
4541 # what configure does when it calls configure scripts in
4542 # subdirectories, so they share the cache.
4543 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4544 # config.status only pays attention to the cache file if you give it the
4545 # --recheck option to rerun configure.
4546 #
4547 EOF
4548 # The following way of writing the cache mishandles newlines in values,
4549 # but we know of no workaround that is simple, portable, and efficient.
4550 # So, don't put newlines in cache variables' values.
4551 # Ultrix sh set writes to stderr and can't be redirected directly,
4552 # and sets the high bit in the cache file unless we assign to the vars.
4553 (set) 2>&1 |
4554   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4555   *ac_space=\ *)
4556     # `set' does not quote correctly, so add quotes (double-quote substitution
4557     # turns \\\\ into \\, and sed turns \\ into \).
4558     sed -n \
4559       -e "s/'/'\\\\''/g" \
4560       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4561     ;;
4562   *)
4563     # `set' quotes correctly as required by POSIX, so do not add quotes.
4564     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4565     ;;
4566   esac >> confcache
4567 if cmp -s $cache_file confcache; then
4568   :
4569 else
4570   if test -w $cache_file; then
4571     echo "updating cache $cache_file"
4572     cat confcache > $cache_file
4573   else
4574     echo "not updating unwritable cache $cache_file"
4575   fi
4576 fi
4577 rm -f confcache
4578
4579 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4580
4581 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4582 # Let make expand exec_prefix.
4583 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4584
4585 # Any assignment to VPATH causes Sun make to only execute
4586 # the first set of double-colon rules, so remove it if not needed.
4587 # If there is a colon in the path, we need to keep it.
4588 if test "x$srcdir" = x.; then
4589   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4590 fi
4591
4592 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4593
4594 DEFS=-DHAVE_CONFIG_H
4595
4596 # Without the "./", some shells look in PATH for config.status.
4597 : ${CONFIG_STATUS=./config.status}
4598
4599 echo creating $CONFIG_STATUS
4600 rm -f $CONFIG_STATUS
4601 cat > $CONFIG_STATUS <<EOF
4602 #! /bin/sh
4603 # Generated automatically by configure.
4604 # Run this file to recreate the current configuration.
4605 # This directory was configured as follows,
4606 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4607 #
4608 # $0 $ac_configure_args
4609 #
4610 # Compiler output produced by configure, useful for debugging
4611 # configure, is in ./config.log if it exists.
4612
4613 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4614 for ac_option
4615 do
4616   case "\$ac_option" in
4617   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4618     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4619     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4620   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4621     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4622     exit 0 ;;
4623   -help | --help | --hel | --he | --h)
4624     echo "\$ac_cs_usage"; exit 0 ;;
4625   *) echo "\$ac_cs_usage"; exit 1 ;;
4626   esac
4627 done
4628
4629 ac_given_srcdir=$srcdir
4630 ac_given_INSTALL="$INSTALL"
4631
4632 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4633 EOF
4634 cat >> $CONFIG_STATUS <<EOF
4635
4636 # Protect against being on the right side of a sed subst in config.status.
4637 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4638  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4639 $ac_vpsub
4640 $extrasub
4641 s%@SHELL@%$SHELL%g
4642 s%@CFLAGS@%$CFLAGS%g
4643 s%@CPPFLAGS@%$CPPFLAGS%g
4644 s%@CXXFLAGS@%$CXXFLAGS%g
4645 s%@FFLAGS@%$FFLAGS%g
4646 s%@DEFS@%$DEFS%g
4647 s%@LDFLAGS@%$LDFLAGS%g
4648 s%@LIBS@%$LIBS%g
4649 s%@exec_prefix@%$exec_prefix%g
4650 s%@prefix@%$prefix%g
4651 s%@program_transform_name@%$program_transform_name%g
4652 s%@bindir@%$bindir%g
4653 s%@sbindir@%$sbindir%g
4654 s%@libexecdir@%$libexecdir%g
4655 s%@datadir@%$datadir%g
4656 s%@sysconfdir@%$sysconfdir%g
4657 s%@sharedstatedir@%$sharedstatedir%g
4658 s%@localstatedir@%$localstatedir%g
4659 s%@libdir@%$libdir%g
4660 s%@includedir@%$includedir%g
4661 s%@oldincludedir@%$oldincludedir%g
4662 s%@infodir@%$infodir%g
4663 s%@mandir@%$mandir%g
4664 s%@host@%$host%g
4665 s%@host_alias@%$host_alias%g
4666 s%@host_cpu@%$host_cpu%g
4667 s%@host_vendor@%$host_vendor%g
4668 s%@host_os@%$host_os%g
4669 s%@VLC_VERSION@%$VLC_VERSION%g
4670 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
4671 s%@VLC_CODENAME@%$VLC_CODENAME%g
4672 s%@SET_MAKE@%$SET_MAKE%g
4673 s%@CC@%$CC%g
4674 s%@CPP@%$CPP%g
4675 s%@RANLIB@%$RANLIB%g
4676 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4677 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4678 s%@INSTALL_DATA@%$INSTALL_DATA%g
4679 s%@GETOPT@%$GETOPT%g
4680 s%@ESD_CONFIG@%$ESD_CONFIG%g
4681 s%@GTK_CONFIG@%$GTK_CONFIG%g
4682 s%@SYS@%$SYS%g
4683 s%@ARCH@%$ARCH%g
4684 s%@PLUGINS@%$PLUGINS%g
4685 s%@BUILTINS@%$BUILTINS%g
4686 s%@ALIASES@%$ALIASES%g
4687 s%@DEFINE@%$DEFINE%g
4688 s%@INCLUDE@%$INCLUDE%g
4689 s%@DEBUG@%$DEBUG%g
4690 s%@STATS@%$STATS%g
4691 s%@ASM@%$ASM%g
4692 s%@TRACE@%$TRACE%g
4693 s%@PROFILING@%$PROFILING%g
4694 s%@OPTIMS@%$OPTIMS%g
4695 s%@CSS@%$CSS%g
4696 s%@MOC@%$MOC%g
4697 s%@LCFLAGS@%$LCFLAGS%g
4698 s%@PLCFLAGS@%$PLCFLAGS%g
4699 s%@LIB@%$LIB%g
4700 s%@LIB_ALSA@%$LIB_ALSA%g
4701 s%@LIB_BEOS@%$LIB_BEOS%g
4702 s%@LIB_DARWIN@%$LIB_DARWIN%g
4703 s%@LIB_DVD@%$LIB_DVD%g
4704 s%@LIB_ESD@%$LIB_ESD%g
4705 s%@LIB_GGI@%$LIB_GGI%g
4706 s%@LIB_GLIDE@%$LIB_GLIDE%g
4707 s%@LIB_GNOME@%$LIB_GNOME%g
4708 s%@LIB_GTK@%$LIB_GTK%g
4709 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4710 s%@LIB_MACOSX@%$LIB_MACOSX%g
4711 s%@LIB_NCURSES@%$LIB_NCURSES%g
4712 s%@LIB_QT@%$LIB_QT%g
4713 s%@LIB_TS@%$LIB_TS%g
4714 s%@LIB_SDL@%$LIB_SDL%g
4715 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4716 s%@LIB_X11@%$LIB_X11%g
4717 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4718 s%@LIB_YUV@%$LIB_YUV%g
4719 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4720 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4721 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4722 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4723 s%@CFLAGS_X11@%$CFLAGS_X11%g
4724 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4725
4726 CEOF
4727 EOF
4728
4729 cat >> $CONFIG_STATUS <<\EOF
4730
4731 # Split the substitutions into bite-sized pieces for seds with
4732 # small command number limits, like on Digital OSF/1 and HP-UX.
4733 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4734 ac_file=1 # Number of current file.
4735 ac_beg=1 # First line for current file.
4736 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4737 ac_more_lines=:
4738 ac_sed_cmds=""
4739 while $ac_more_lines; do
4740   if test $ac_beg -gt 1; then
4741     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4742   else
4743     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4744   fi
4745   if test ! -s conftest.s$ac_file; then
4746     ac_more_lines=false
4747     rm -f conftest.s$ac_file
4748   else
4749     if test -z "$ac_sed_cmds"; then
4750       ac_sed_cmds="sed -f conftest.s$ac_file"
4751     else
4752       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4753     fi
4754     ac_file=`expr $ac_file + 1`
4755     ac_beg=$ac_end
4756     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4757   fi
4758 done
4759 if test -z "$ac_sed_cmds"; then
4760   ac_sed_cmds=cat
4761 fi
4762 EOF
4763
4764 cat >> $CONFIG_STATUS <<EOF
4765
4766 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4767 EOF
4768 cat >> $CONFIG_STATUS <<\EOF
4769 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4770   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4771   case "$ac_file" in
4772   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4773        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4774   *) ac_file_in="${ac_file}.in" ;;
4775   esac
4776
4777   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4778
4779   # Remove last slash and all that follows it.  Not all systems have dirname.
4780   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4781   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4782     # The file is in a subdirectory.
4783     test ! -d "$ac_dir" && mkdir "$ac_dir"
4784     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4785     # A "../" for each directory in $ac_dir_suffix.
4786     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4787   else
4788     ac_dir_suffix= ac_dots=
4789   fi
4790
4791   case "$ac_given_srcdir" in
4792   .)  srcdir=.
4793       if test -z "$ac_dots"; then top_srcdir=.
4794       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4795   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4796   *) # Relative path.
4797     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4798     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4799   esac
4800
4801   case "$ac_given_INSTALL" in
4802   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4803   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4804   esac
4805
4806   echo creating "$ac_file"
4807   rm -f "$ac_file"
4808   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4809   case "$ac_file" in
4810   *Makefile*) ac_comsub="1i\\
4811 # $configure_input" ;;
4812   *) ac_comsub= ;;
4813   esac
4814
4815   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4816   sed -e "$ac_comsub
4817 s%@configure_input@%$configure_input%g
4818 s%@srcdir@%$srcdir%g
4819 s%@top_srcdir@%$top_srcdir%g
4820 s%@INSTALL@%$INSTALL%g
4821 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4822 fi; done
4823 rm -f conftest.s*
4824
4825 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4826 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4827 #
4828 # ac_d sets the value in "#define NAME VALUE" lines.
4829 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4830 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4831 ac_dC='\3'
4832 ac_dD='%g'
4833 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4834 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4835 ac_uB='\([      ]\)%\1#\2define\3'
4836 ac_uC=' '
4837 ac_uD='\4%g'
4838 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4839 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4840 ac_eB='$%\1#\2define\3'
4841 ac_eC=' '
4842 ac_eD='%g'
4843
4844 if test "${CONFIG_HEADERS+set}" != set; then
4845 EOF
4846 cat >> $CONFIG_STATUS <<EOF
4847   CONFIG_HEADERS="include/defs.h"
4848 EOF
4849 cat >> $CONFIG_STATUS <<\EOF
4850 fi
4851 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4852   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4853   case "$ac_file" in
4854   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4855        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4856   *) ac_file_in="${ac_file}.in" ;;
4857   esac
4858
4859   echo creating $ac_file
4860
4861   rm -f conftest.frag conftest.in conftest.out
4862   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4863   cat $ac_file_inputs > conftest.in
4864
4865 EOF
4866
4867 # Transform confdefs.h into a sed script conftest.vals that substitutes
4868 # the proper values into config.h.in to produce config.h.  And first:
4869 # Protect against being on the right side of a sed subst in config.status.
4870 # Protect against being in an unquoted here document in config.status.
4871 rm -f conftest.vals
4872 cat > conftest.hdr <<\EOF
4873 s/[\\&%]/\\&/g
4874 s%[\\$`]%\\&%g
4875 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4876 s%ac_d%ac_u%gp
4877 s%ac_u%ac_e%gp
4878 EOF
4879 sed -n -f conftest.hdr confdefs.h > conftest.vals
4880 rm -f conftest.hdr
4881
4882 # This sed command replaces #undef with comments.  This is necessary, for
4883 # example, in the case of _POSIX_SOURCE, which is predefined and required
4884 # on some systems where configure will not decide to define it.
4885 cat >> conftest.vals <<\EOF
4886 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4887 EOF
4888
4889 # Break up conftest.vals because some shells have a limit on
4890 # the size of here documents, and old seds have small limits too.
4891
4892 rm -f conftest.tail
4893 while :
4894 do
4895   ac_lines=`grep -c . conftest.vals`
4896   # grep -c gives empty output for an empty file on some AIX systems.
4897   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4898   # Write a limited-size here document to conftest.frag.
4899   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4900   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4901   echo 'CEOF
4902   sed -f conftest.frag conftest.in > conftest.out
4903   rm -f conftest.in
4904   mv conftest.out conftest.in
4905 ' >> $CONFIG_STATUS
4906   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4907   rm -f conftest.vals
4908   mv conftest.tail conftest.vals
4909 done
4910 rm -f conftest.vals
4911
4912 cat >> $CONFIG_STATUS <<\EOF
4913   rm -f conftest.frag conftest.h
4914   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4915   cat conftest.in >> conftest.h
4916   rm -f conftest.in
4917   if cmp -s $ac_file conftest.h 2>/dev/null; then
4918     echo "$ac_file is unchanged"
4919     rm -f conftest.h
4920   else
4921     # Remove last slash and all that follows it.  Not all systems have dirname.
4922       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4923       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4924       # The file is in a subdirectory.
4925       test ! -d "$ac_dir" && mkdir "$ac_dir"
4926     fi
4927     rm -f $ac_file
4928     mv conftest.h $ac_file
4929   fi
4930 fi; done
4931
4932 EOF
4933 cat >> $CONFIG_STATUS <<EOF
4934
4935 EOF
4936 cat >> $CONFIG_STATUS <<\EOF
4937
4938 exit 0
4939 EOF
4940 chmod +x $CONFIG_STATUS
4941 rm -fr confdefs* $ac_clean_files
4942 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4943
4944
4945 echo "
4946 global configuration
4947 --------------------
4948 system                : ${SYS}
4949 architecture          : ${ARCH}
4950 optimizations         : ${OPTIMS}
4951 inline assembly       : ${ASM}
4952
4953 vlc configuration
4954 -----------------
4955 vlc version           : ${VLC_VERSION}
4956 debug mode            : ${DEBUG}
4957 statistics            : ${STATS}
4958 trace mode            : ${TRACE}
4959 profiling             : ${PROFILING}
4960 need builtin getopt   : ${GETOPT}
4961 built-in modules      :${BUILTINS}
4962 plugin modules        :${PLUGINS}
4963 vlc aliases           :${ALIASES}
4964
4965 libdvdcss configuration
4966 -----------------------
4967 CSS decryption        : ${CSS}
4968
4969 You may now tune Makefile.opts at your convenience. To build vlc, type
4970 \`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
4971