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