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