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