configure 245 KB
Newer Older
1
#! /bin/sh
Sam Hocevar's avatar
 
Sam Hocevar committed
2

3
# Guess values for system-dependent variables and create Makefiles.
Sam Hocevar's avatar
 
Sam Hocevar committed
4 5
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 7 8 9
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

Sam Hocevar's avatar
 
Sam Hocevar committed
10 11
# Defaults:
ac_help=
12
ac_default_prefix=/usr/local
Sam Hocevar's avatar
 
Sam Hocevar committed
13
# Any additions from configure.in:
Sam Hocevar's avatar
 
Sam Hocevar committed
14 15 16 17 18 19
ac_help="$ac_help
  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
ac_help="$ac_help
  --disable-nls           do not use Native Language Support"
ac_help="$ac_help
  --with-included-gettext use the GNU gettext library included here"
20
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
21
"
Sam Hocevar's avatar
 
Sam Hocevar committed
22
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
23
Optimization options:"
Sam Hocevar's avatar
 
Sam Hocevar committed
24
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
25 26
  --with-tuning=ARCH      enable special tuning for an architecture
                          (default i686 on IA-32 and 750 on PPC)"
Sam Hocevar's avatar
 
Sam Hocevar committed
27
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
28
  --disable-optimizations disable compiler optimizations (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
29
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
30
  --disable-altivec       disable altivec optimizations (default enabled on PPC)"
Sam Hocevar's avatar
 
Sam Hocevar committed
31
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
32
  --enable-debug          debug mode (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
33
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
34
  --enable-release        activate extra optimizations (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
35
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
36
Input plugins:"
Sam Hocevar's avatar
 
Sam Hocevar committed
37
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
38 39 40
  --with-dvdcss[=name]    use libdvdcss, either 'yes', 'no', 'local-static',
                          'local-shared', or a path to another libdvdcss such
                          as '/usr/local' (default 'local-static')"
Stéphane Borel's avatar
Stéphane Borel committed
41
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
42
  --with-dvdread[=name]   use libdvdread, same options as dvdcss (default 'no')"
43
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
44
  --enable-vcd            VCD support for Linux (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
45
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
46
Codec plugins:"
Sam Hocevar's avatar
 
Sam Hocevar committed
47
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
48
  --enable-mad            libmad module (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
49
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
50
    --with-mad=PATH       path to libmad"
Sam Hocevar's avatar
 
Sam Hocevar committed
51
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
52
  --disable-a52           AC3 support with liba52 (default enabled)"
53
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
54
Video plugins:"
Sam Hocevar's avatar
 
Sam Hocevar committed
55
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
56
  --disable-x11           X11 support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
57
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
58
  --disable-xvideo        XVideo support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
59
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
60
  --disable-sdl           SDL support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
61
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
62
    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)"
63
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
64
  --enable-directx        Win32 DirectX support (default enabled on Win32)"
Gildas Bazin's avatar
 
Gildas Bazin committed
65
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
66
    --with-directx=PATH   Win32 DirectX headers and libraries"
Sam Hocevar's avatar
 
Sam Hocevar committed
67
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
68
  --enable-fb             Linux framebuffer support (default enabled on Linux)"
Sam Hocevar's avatar
 
Sam Hocevar committed
69 70
ac_help="$ac_help
  --enable-mga            Linux kernel Matrox support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
71
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
72
  --enable-ggi            GGI support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
73
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
74
    --with-ggi=PATH       path to libggi"
75
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
76
  --enable-glide          Glide (3dfx) support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
77
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
78
    --with-glide=PATH     path to libglide"
Xavier Marchesini's avatar
 
Xavier Marchesini committed
79
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
80
Audio plugins:"
Sam Hocevar's avatar
 
Sam Hocevar committed
81
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
82
  --enable-dsp            Linux /dev/dsp support (enabled on Linux)"
Gildas Bazin's avatar
 
Gildas Bazin committed
83
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
84
  --enable-esd            Esound library support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
85
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
86
  --enable-arts           aRts sound server (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
87
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
88
  --enable-alsa           ALSA sound support for Linux (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
89
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
90
  --enable-waveout        Win32 waveOut module (default enabled on Win32)"
Sam Hocevar's avatar
 
Sam Hocevar committed
91
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
92 93 94 95 96
Interface plugins:"
ac_help="$ac_help
  --disable-gtk           Gtk+ support (default enabled)"
ac_help="$ac_help
    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)"
Sam Hocevar's avatar
 
Sam Hocevar committed
97 98 99
ac_help="$ac_help
  --enable-gnome          Gnome interface support (default disabled)"
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
100
  --enable-qt             Qt interface support (default disabled)"
101
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
102
  --enable-kde            KDE interface support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
103
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
104
  --enable-macosx         MacOS X support (default enabled on MacOS X)"
Sam Hocevar's avatar
 
Sam Hocevar committed
105
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
106 107 108 109 110
  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)"
ac_help="$ac_help
  --enable-win32          Win32 interface support (default disabled)"
ac_help="$ac_help
  --enable-ncurses        ncurses interface support (default disabled)"
111 112
ac_help="$ac_help
  --enable-lirc           lirc support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
113
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
114 115 116 117 118 119 120
Misc options:"
ac_help="$ac_help
  --with-words=endianness set endianness (big or little)"
ac_help="$ac_help
  --with-dll-path=PATH    path to Win32 DLLs (default search in \$PWD)"
ac_help="$ac_help
  --enable-gprof          gprof profiling (default disabled)"
121
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
122
  --enable-cprof          cprof profiling (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
123
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
124 125 126 127 128
  --enable-pth            GNU Pth support (default disabled)"
ac_help="$ac_help
  --enable-st             State Threads (default disabled)"
ac_help="$ac_help
  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
129 130 131 132

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
Sam Hocevar's avatar
 
Sam Hocevar committed
133 134
build=NONE
cache_file=./config.cache
135
exec_prefix=NONE
Sam Hocevar's avatar
 
Sam Hocevar committed
136
host=NONE
137
no_create=
Sam Hocevar's avatar
 
Sam Hocevar committed
138
nonopt=NONE
139 140 141 142 143 144 145 146
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
Sam Hocevar's avatar
 
Sam Hocevar committed
147
target=NONE
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

Sam Hocevar's avatar
 
Sam Hocevar committed
164 165 166 167 168 169
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
170 171 172 173

ac_prev=
for ac_option
do
Sam Hocevar's avatar
 
Sam Hocevar committed
174

175 176 177 178 179 180 181
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
182 183 184 185
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
186 187 188

  # Accept the important Cygnus configure options, so we can diagnose typos.

Sam Hocevar's avatar
 
Sam Hocevar committed
189
  case "$ac_option" in
190 191 192 193

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
194
    bindir="$ac_optarg" ;;
195 196

  -build | --build | --buil | --bui | --bu)
Sam Hocevar's avatar
 
Sam Hocevar committed
197
    ac_prev=build ;;
198
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
199
    build="$ac_optarg" ;;
200 201 202 203 204 205

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
206
    cache_file="$ac_optarg" ;;
207 208 209 210 211

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
212
    datadir="$ac_optarg" ;;
213 214

  -disable-* | --disable-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
215
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
216
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
217 218 219 220 221
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;
222 223

  -enable-* | --enable-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
224
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
225
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
226 227 228 229 230 231
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
232 233
      *) ac_optarg=yes ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
234
    eval "enable_${ac_feature}='$ac_optarg'" ;;
235 236 237 238 239 240 241 242

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
243
    exec_prefix="$ac_optarg" ;;
244 245 246 247 248

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

Sam Hocevar's avatar
 
Sam Hocevar committed
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;
303 304

  -host | --host | --hos | --ho)
Sam Hocevar's avatar
 
Sam Hocevar committed
305
    ac_prev=host ;;
306
  -host=* | --host=* | --hos=* | --ho=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
307
    host="$ac_optarg" ;;
308 309 310 311 312 313

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
314
    includedir="$ac_optarg" ;;
315 316 317 318

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
319
    infodir="$ac_optarg" ;;
320 321 322 323

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
324
    libdir="$ac_optarg" ;;
325 326 327 328 329 330

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
331
    libexecdir="$ac_optarg" ;;
332 333 334 335 336 337 338 339

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
340
    localstatedir="$ac_optarg" ;;
341 342 343 344

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
345
    mandir="$ac_optarg" ;;
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
366
    oldincludedir="$ac_optarg" ;;
367 368 369 370

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
371
    prefix="$ac_optarg" ;;
372 373 374 375 376 377

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
378
    program_prefix="$ac_optarg" ;;
379 380 381 382 383 384

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
385
    program_suffix="$ac_optarg" ;;
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
402
    program_transform_name="$ac_optarg" ;;
403 404 405 406 407 408 409 410 411

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
412
    sbindir="$ac_optarg" ;;
413 414 415 416 417 418 419 420 421 422

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
423
    sharedstatedir="$ac_optarg" ;;
424 425 426 427

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
428
    site="$ac_optarg" ;;
429 430 431 432

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
433
    srcdir="$ac_optarg" ;;
434 435 436 437 438 439

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
440
    sysconfdir="$ac_optarg" ;;
441 442

  -target | --target | --targe | --targ | --tar | --ta | --t)
Sam Hocevar's avatar
 
Sam Hocevar committed
443
    ac_prev=target ;;
444
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
445
    target="$ac_optarg" ;;
446 447 448 449

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

Sam Hocevar's avatar
 
Sam Hocevar committed
450 451 452
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
453 454

  -with-* | --with-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
455
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
456
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
457 458 459
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
460
    ac_package=`echo $ac_package| sed 's/-/_/g'`
Sam Hocevar's avatar
 
Sam Hocevar committed
461 462
    case "$ac_option" in
      *=*) ;;
463 464
      *) ac_optarg=yes ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
465
    eval "with_${ac_package}='$ac_optarg'" ;;
466 467

  -without-* | --without-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
468
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
469
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
470 471 472 473 474
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;
475 476 477 478 479 480 481 482 483 484

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
485
    x_includes="$ac_optarg" ;;
486 487 488 489 490 491

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
492
    x_libraries="$ac_optarg" ;;
493

Sam Hocevar's avatar
 
Sam Hocevar committed
494
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
495 496 497
    ;;

  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
498 499 500 501 502 503 504
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
505 506 507 508 509 510
    ;;

  esac
done

if test -n "$ac_prev"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
528
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
529 530 531 532 533 534
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
535

Sam Hocevar's avatar
 
Sam Hocevar committed
536 537 538 539
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
540
do
Sam Hocevar's avatar
 
Sam Hocevar committed
541 542 543 544 545 546 547 548
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
549 550 551
  esac
done

Sam Hocevar's avatar
 
Sam Hocevar committed
552 553 554 555 556 557 558 559 560
# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
561

Sam Hocevar's avatar
 
Sam Hocevar committed
562 563 564 565
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
566

Sam Hocevar's avatar
 
Sam Hocevar committed
567 568
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
Sam Hocevar's avatar
 
Sam Hocevar committed
569
ac_unique_file=include/main.h
570 571 572 573 574 575

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
Sam Hocevar's avatar
 
Sam Hocevar committed
576
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
577 578 579 580 581 582 583 584 585 586
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
587
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
588
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
589
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
590 591
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
592
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
593 594 595 596 597 598 599 600 601 602 603

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
604
    echo "loading site script $ac_site_file"
605 606 607 608 609
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
610 611
  echo "loading cache $cache_file"
  . $cache_file
612
else
Sam Hocevar's avatar
 
Sam Hocevar committed
613 614
  echo "creating cache $cache_file"
  > $cache_file
615 616 617
fi

ac_ext=c
Sam Hocevar's avatar
 
Sam Hocevar committed
618
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
619
ac_cpp='$CPP $CPPFLAGS'
Sam Hocevar's avatar
 
Sam Hocevar committed
620 621 622 623 624 625 626 627 628 629 630 631 632 633
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
634
else
Sam Hocevar's avatar
 
Sam Hocevar committed
635
  ac_n= ac_c='\c' ac_t=
636 637
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
638 639


640

641 642 643 644 645 646 647 648 649 650 651 652 653
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
654
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
655
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
656 657 658 659
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.

660

661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681
# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


682
# Make sure we can run config.sub.
Sam Hocevar's avatar
 
Sam Hocevar committed
683 684 685 686 687
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
688
echo "configure:689: checking host system type" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

708
echo $ac_n "checking target system type""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
709
echo "configure:710: checking target system type" >&5
710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
727
echo "configure:728: checking build system type" >&5
728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

749

Sam Hocevar's avatar
 
Sam Hocevar committed
750 751 752
HAVE_VLC=0
if test -r src/interface/main.c; then
  HAVE_VLC=1
753
  VLC_VERSION="0.2.92-dev"
Sam Hocevar's avatar
 
Sam Hocevar committed
754 755
  VLC_CODENAME=Ourumov
fi
756

Sam Hocevar's avatar
 
Sam Hocevar committed
757 758 759
HAVE_LIBDVDCSS=0
if test -r extras/libdvdcss/libdvdcss.c; then
  HAVE_LIBDVDCSS=1
760
  LIBDVDCSS_VERSION="1.0.1-dev"
Sam Hocevar's avatar
 
Sam Hocevar committed
761
  
762 763 764 765 766 767
  if test -r extras/libdvdcss/csskeys.h; then
    cat >> confdefs.h <<\EOF
#define HAVE_CSSKEYS 1
EOF

  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
768
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
769

Sam Hocevar's avatar
 
Sam Hocevar committed
770
save_CFLAGS="${CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
771
save_LDFLAGS="${LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
772

Sam Hocevar's avatar
 
Sam Hocevar committed
773
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
774
echo "configure:775: checking whether ${MAKE-make} sets \${MAKE}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
775 776 777
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
778
else
Sam Hocevar's avatar
 
Sam Hocevar committed
779
  cat > conftestmake <<\EOF
780 781 782 783
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Sam Hocevar's avatar
 
Sam Hocevar committed
784
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
785 786 787 788 789
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
790
rm -f conftestmake
791 792
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
793
  echo "$ac_t""yes" 1>&6
794 795
  SET_MAKE=
else
Sam Hocevar's avatar
 
Sam Hocevar committed
796
  echo "$ac_t""no" 1>&6
797 798 799
  SET_MAKE="MAKE=${MAKE-make}"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
800
# Extract the first word of "gcc", so it can be a program name with args.
801
set dummy gcc; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
802
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
803
echo "configure:804: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
804 805
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
806 807 808 809
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
810 811 812 813 814 815 816 817 818 819
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
820 821
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
822
CC="$ac_cv_prog_CC"
823
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
824
  echo "$ac_t""$CC" 1>&6
825
else
Sam Hocevar's avatar
 
Sam Hocevar committed
826
  echo "$ac_t""no" 1>&6
827 828 829 830 831
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
832
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
833
echo "configure:834: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
834 835
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
836 837 838 839
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
840
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
841
  ac_prog_rejected=no
Sam Hocevar's avatar
 
Sam Hocevar committed
842 843 844 845 846 847 848 849 850 851 852 853 854
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
855 856 857 858
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
Sam Hocevar's avatar
 
Sam Hocevar committed
859
  if test $# -gt 0; then
860 861 862 863
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
Sam Hocevar's avatar
 
Sam Hocevar committed
864
    set dummy "$ac_dir/$ac_word" "$@"
865 866 867 868 869 870
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
871
CC="$ac_cv_prog_CC"
872
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
873
  echo "$ac_t""$CC" 1>&6
874
else
Sam Hocevar's avatar
 
Sam Hocevar committed
875
  echo "$ac_t""no" 1>&6
876 877
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
878 879 880 881 882 883
  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
884
echo "configure:885: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
885 886
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
887 888 889 890
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
891 892 893 894 895 896 897 898 899 900
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
901 902
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
903
CC="$ac_cv_prog_CC"
904
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
905
  echo "$ac_t""$CC" 1>&6
906
else
Sam Hocevar's avatar
 
Sam Hocevar committed
907
  echo "$ac_t""no" 1>&6
908
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
909 910 911 912
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
913 914
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
915
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
916
echo "configure:917: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
917

Sam Hocevar's avatar
 
Sam Hocevar committed
918 919 920 921 922 923
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
924

Sam Hocevar's avatar
 
Sam Hocevar committed
925
cat > conftest.$ac_ext << EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
926

Sam Hocevar's avatar
 
Sam Hocevar committed
927
#line 928 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
928 929
#include "confdefs.h"

Sam Hocevar's avatar
 
Sam Hocevar committed
930 931
main(){return(0);}
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
932
if { (eval echo configure:933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
933 934 935 936
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
Sam Hocevar's avatar
 
Sam Hocevar committed
937
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
938
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
939
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
940 941 942 943
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
944
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
945 946 947 948 949 950 951 952 953 954 955 956 957
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
958
echo "configure:959: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
959 960 961 962
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
963
echo "configure:964: checking whether we are using GNU C" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
964 965 966 967 968 969 970 971
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
972
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
973
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
974
else
Sam Hocevar's avatar
 
Sam Hocevar committed
975 976
  ac_cv_prog_gcc=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
977 978
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
979
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
980

Sam Hocevar's avatar
 
Sam Hocevar committed
981 982
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
983
else
Sam Hocevar's avatar
 
Sam Hocevar committed
984
  GCC=
Sam Hocevar's avatar
 
Sam Hocevar committed
985 986
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
987 988 989 990
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
991
echo "configure:992: checking whether ${CC-cc} accepts -g" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
992 993
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
994
else
Sam Hocevar's avatar
 
Sam Hocevar committed
995 996
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
997 998
  ac_cv_prog_cc_g=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
999
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1000
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1001 1002
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
1003
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1004 1005

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1006
if test "$ac_test_CFLAGS" = set; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1007
  CFLAGS="$ac_save_CFLAGS"
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1021

Sam Hocevar's avatar
 
Sam Hocevar committed
1022
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1023
echo "configure:1024: checking how to run the C preprocessor" >&5
1024 1025 1026 1027 1028
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1029 1030 1031 1032 1033 1034
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
1035
  # On the NeXT, cc -E runs the code through the compiler's parser,
Sam Hocevar's avatar
 
Sam Hocevar committed
1036 1037
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1038
#line 1039 "configure"
1039 1040
#include "confdefs.h"
#include <assert.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1041 1042 1043
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
1044
{ (eval echo configure:1045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1045 1046
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
1047 1048
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1049 1050
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1051
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1052 1053 1054
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1055
#line 1056 "configure"
1056
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
1057 1058 1059 1060
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
1061
{ (eval echo configure:1062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1062 1063 1064
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
1065
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1066 1067
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1068
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1069 1070 1071
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1072
#line 1073 "configure"
1073 1074
#include "confdefs.h"
#include <assert.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1075 1076 1077
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
1078
{ (eval echo configure:1079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1079 1080
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
1081 1082
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1083 1084
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1085
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1086 1087
  rm -rf conftest*
  CPP=/lib/cpp
1088
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1089
rm -f conftest*
1090
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1091
rm -f conftest*
1092
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1093 1094 1095
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1096 1097 1098 1099 1100 1101 1102
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6


Gildas Bazin's avatar
 
Gildas Bazin committed
1103 1104 1105 1106 1107 1108 1109 1110 1111
if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi

# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1112
echo "configure:1113: checking for $ac_word" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_RANLIB"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1144
echo "configure:1145: checking for $ac_word" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  RANLIB=":"
fi
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
1177
ALL_LINGUAS="de fr no ru"
Sam Hocevar's avatar
Sam Hocevar committed
1178

Sam Hocevar's avatar
 
Sam Hocevar committed
1179
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1180
#define PACKAGE "vlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
1181 1182 1183
EOF

cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1184
#define VERSION "$VLC_VERSION"
Sam Hocevar's avatar
 
Sam Hocevar committed
1185 1186 1187 1188 1189
EOF

# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1190
echo "configure:1191: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1219
echo "configure:1220: checking for strerror in -lcposix" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1220 1221 1222 1223 1224 1225 1226
ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lcposix  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1227
#line 1228 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char strerror();

int main() {
strerror()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1238
if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lcposix"
else
  echo "$ac_t""no" 1>&6
fi

  

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1261
echo "configure:1262: checking for ANSI C header files" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1262 1263 1264 1265
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1266
#line 1267 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1267 1268 1269 1270 1271 1272 1273
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
1274
{ (eval echo configure:1275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1291
#line 1292 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1309
#line 1310 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1330
#line 1331 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1341
if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo $ac_n "checking for working const""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1365
echo "configure:1366: checking for working const" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1366 1367 1368 1369
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1370
#line 1371 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1419
if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

echo $ac_n "checking for inline""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1440
echo "configure:1441: checking for inline" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1441 1442 1443 1444 1445 1446
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1447
#line 1448 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1448 1449 1450 1451 1452 1453
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1454
if { (eval echo configure:1455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done

fi

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
  inline | yes) ;;
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
 ;;
  *)  cat >> confdefs.h <<EOF
#define inline $ac_cv_c_inline
EOF
 ;;
esac

echo $ac_n "checking for off_t""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1480
echo "configure:1481: checking for off_t" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1481 1482 1483 1484
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1485
#line 1486 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_off_t=yes
else
  rm -rf conftest*
  ac_cv_type_off_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
  cat >> confdefs.h <<\EOF
#define off_t long
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1513
echo "configure:1514: checking for size_t" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1514 1515 1516 1517
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1518
#line 1519 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF

fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1548
echo "configure:1549: checking for working alloca.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1549 1550 1551 1552
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1553
#line 1554 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1554 1555 1556 1557 1558 1559
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1560
if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
if test $ac_cv_header_alloca_h = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA_H 1
EOF

fi

echo $ac_n "checking for alloca""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1581
echo "configure:1582: checking for alloca" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1582 1583 1584 1585
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1586
#line 1587 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613
#include "confdefs.h"

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1614
if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645
  rm -rf conftest*
  ac_cv_func_alloca_works=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_alloca_works=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
if test $ac_cv_func_alloca_works = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_ALLOCA 1
EOF

fi

if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.${ac_objext}
  cat >> confdefs.h <<\EOF
#define C_ALLOCA 1
EOF


echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1646
echo "configure:1647: checking whether alloca needs Cray hooks" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1647 1648 1649 1650
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1651
#line 1652 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_os_cray=yes
else
  rm -rf conftest*
  ac_cv_os_cray=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1676
echo "configure:1677: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1677 1678 1679 1680
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1681
#line 1682 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1704
if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF

  break
else
  echo "$ac_t""no" 1>&6
fi

done
fi

echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1731
echo "configure:1732: checking stack direction for C alloca" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1732 1733 1734 1735 1736 1737 1738
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1739
#line 1740 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
  exit (find_stack_direction() < 0);
}
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1758
if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782
then
  ac_cv_c_stack_direction=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
#define STACK_DIRECTION $ac_cv_c_stack_direction
EOF

fi

for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1783
echo "configure:1784: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1784 1785 1786 1787
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1788
#line 1789 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1789 1790 1791 1792
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
1793
{ (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1822
echo "configure:1823: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1823 1824 1825 1826
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1827
#line 1828 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1850
if { (eval echo configure:1851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

echo $ac_n "checking for working mmap""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1875
echo "configure:1876: checking for working mmap" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1876 1877 1878 1879 1880 1881 1882
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1883
#line 1884 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022
#include "confdefs.h"

/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the filesystem buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

int
main()
{
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc(pagesize);
	if (!data)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		*(data + i) = rand();
	umask(0);
	fd = creat("conftestmmap", 0600);
	if (fd < 0)
		exit(1);
	if (write(fd, data, pagesize) != pagesize)
		exit(1);
	close(fd);

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open("conftestmmap", O_RDWR);
	if (fd < 0)
		exit(1);
	data2 = malloc(2 * pagesize);
	if (!data2)
		exit(1);
	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data2 + i))
			exit(1);

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read().
	 * (This is a bug on some variants of i386 svr4.0.)
	 */
	for (i = 0; i < pagesize; ++i)
		*(data2 + i) = *(data2 + i) + 1;
	data3 = malloc(pagesize);
	if (!data3)
		exit(1);
	if (read(fd, data3, pagesize) != pagesize)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data3 + i))
			exit(1);
	close(fd);
	unlink("conftestmmap");
	exit(0);
}

EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2023
if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046
then
  ac_cv_func_mmap_fixed_mapped=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
  cat >> confdefs.h <<\EOF
#define HAVE_MMAP 1
EOF

fi


    echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2047
echo "configure:2048: checking whether we are using the GNU C Library 2.1 or newer" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2048 2049 2050 2051
if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2052
#line 2053 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif
	
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Lucky GNU user" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_gnu_library_2_1=yes
else
  rm -rf conftest*
  ac_cv_gnu_library_2_1=no
fi
rm -f conftest*

      
    
fi

echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
    
    GLIBC21="$ac_cv_gnu_library_2_1"
  

                                    
   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2088
echo "configure:2089: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2089 2090 2091 2092
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2093
#line 2094 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2094 2095 2096 2097
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2098
{ (eval echo configure:2099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2129
echo "configure:2130: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2130 2131 2132 2133
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2134
#line 2135 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2157
if { (eval echo configure:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


   
    
  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
  withval="$with_libiconv_prefix"
  
    for dir in `echo "$withval" | tr : ' '`; do
      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
    done
   
fi


  echo $ac_n "checking for iconv""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2197
echo "configure:2198: checking for iconv" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2198 2199 2200 2201 2202 2203 2204
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
    am_cv_func_iconv="no, consider installing GNU libiconv"
    am_cv_lib_iconv=no
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2205
#line 2206 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2206 2207 2208 2209 2210 2211 2212 2213 2214
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
       iconv(cd,NULL,NULL,NULL,NULL);
       iconv_close(cd);
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2215
if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226
  rm -rf conftest*
  am_cv_func_iconv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    if test "$am_cv_func_iconv" != yes; then
      am_save_LIBS="$LIBS"
      LIBS="$LIBS -liconv"
      cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2227
#line 2228 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2228 2229 2230 2231 2232 2233 2234 2235 2236
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int main() {
iconv_t cd = iconv_open("","");
         iconv(cd,NULL,NULL,NULL,NULL);
         iconv_close(cd);
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2237
if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257
  rm -rf conftest*
  am_cv_lib_iconv=yes
        am_cv_func_iconv=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
      LIBS="$am_save_LIBS"
    fi
  
fi

echo "$ac_t""$am_cv_func_iconv" 1>&6
  if test "$am_cv_func_iconv" = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF

    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2258
echo "configure:2259: checking for iconv declaration" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2259 2260 2261 2262 2263
    if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
      cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2264
#line 2265 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2283
if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311
  rm -rf conftest*
  am_cv_proto_iconv_arg1=""
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_proto_iconv_arg1="const"
fi
rm -f conftest*
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi

    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
    echo "$ac_t""${ac_t:-
         }$am_cv_proto_iconv" 1>&6
    cat >> confdefs.h <<EOF
#define ICONV_CONST $am_cv_proto_iconv_arg1
EOF

  fi
  LIBICONV=
  if test "$am_cv_lib_iconv" = yes; then
    LIBICONV="-liconv"
  fi
  

   
  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2312
echo "configure:2313: checking for nl_langinfo and CODESET" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2313 2314 2315 2316
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2317
#line 2318 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2318 2319 2320 2321 2322 2323
#include "confdefs.h"
#include <langinfo.h>
int main() {
char* cs = nl_langinfo(CODESET);
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2324
if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346
  rm -rf conftest*
  am_cv_langinfo_codeset=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_langinfo_codeset=no
fi
rm -f conftest*
    
fi

echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
  if test $am_cv_langinfo_codeset = yes; then
    cat >> confdefs.h <<\EOF
#define HAVE_LANGINFO_CODESET 1
EOF

  fi

   if test $ac_cv_header_locale_h = yes; then
    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2347
echo "configure:2348: checking for LC_MESSAGES" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2348 2349 2350 2351
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2352
#line 2353 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2353 2354 2355 2356 2357 2358
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2359
if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379
  rm -rf conftest*
  am_cv_val_LC_MESSAGES=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_val_LC_MESSAGES=no
fi
rm -f conftest*
fi

echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
    if test $am_cv_val_LC_MESSAGES = yes; then
      cat >> confdefs.h <<\EOF
#define HAVE_LC_MESSAGES 1
EOF

    fi
  fi
   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2380
echo "configure:2381: checking whether NLS is requested" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401
        # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
  enableval="$enable_nls"
  USE_NLS=$enableval
else
  USE_NLS=yes
fi

    echo "$ac_t""$USE_NLS" 1>&6
    

    BUILD_INCLUDED_LIBINTL=no
    USE_INCLUDED_LIBINTL=no
    INTLLIBS=

        if test "$USE_NLS" = "yes"; then
      cat >> confdefs.h <<\EOF
#define ENABLE_NLS 1
EOF

      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2402
echo "configure:2403: checking whether included gettext is requested" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421
      # Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
  withval="$with_included_gettext"
  nls_cv_force_use_gnu_gettext=$withval
else
  nls_cv_force_use_gnu_gettext=no
fi

      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6

      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                        	CATOBJEXT=NONE

                
        

	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2422
echo "configure:2423: checking for libintl.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2423 2424 2425 2426
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2427
#line 2428 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2428 2429 2430 2431
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2432
{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2449
echo "configure:2450: checking for GNU gettext in libc" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2450 2451 2452 2453
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2454
#line 2455 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2455 2456 2457 2458 2459 2460 2461 2462
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int main() {
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2463
if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478
  rm -rf conftest*
  gt_cv_func_gnugettext1_libc=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gnugettext1_libc=no
fi
rm -f conftest*
fi

echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6

	   if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
	     echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2479
echo "configure:2480: checking for GNU gettext in libintl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2480 2481 2482 2483 2484 2485
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  gt_save_LIBS="$LIBS"
		LIBS="$LIBS -lintl $LIBICONV"
		cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2486
#line 2487 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2487 2488 2489 2490 2491 2492 2493 2494
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int main() {
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2495
if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527
  rm -rf conftest*
  gt_cv_func_gnugettext1_libintl=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gnugettext1_libintl=no
fi
rm -f conftest*
		LIBS="$gt_save_LIBS"
fi

echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
	   fi

	   	   	   	   	   if test "$gt_cv_func_gnugettext1_libc" = "yes" \
	      || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
		   && test "$PACKAGE" != gettext; }; then
	     cat >> confdefs.h <<\EOF
#define HAVE_GETTEXT 1
EOF


	     if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
	       	       	       	       INTLLIBS="-lintl $LIBICONV"
	     fi

	     gt_save_LIBS="$LIBS"
	     LIBS="$LIBS $INTLLIBS"
	     for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2528
echo "configure:2529: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2529 2530 2531 2532
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2533
#line 2534 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2556
if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

	     LIBS="$gt_save_LIBS"

	     	     # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2585
echo "configure:2586: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MSGFMT" in
  /*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
  echo "$ac_t""$MSGFMT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

	     # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2619
echo "configure:2620: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GMSGFMT" in
  /*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
  echo "$ac_t""$GMSGFMT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


	     	     # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2656
echo "configure:2657: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
  echo "$ac_t""$XGETTEXT" 1>&6
2683
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2684
  echo "$ac_t""no" 1>&6
2685 2686
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2687 2688 2689 2690

	     CATOBJEXT=.gmo
	   fi
	
2691
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2692
  echo "$ac_t""no" 1>&6
2693 2694
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2695 2696 2697 2698 2699 2700 2701 2702 2703 2704

        if test "$CATOBJEXT" = "NONE"; then
	  	  	  nls_cv_use_gnu_gettext=yes
        fi
      fi

      if test "$nls_cv_use_gnu_gettext" = "yes"; then
                INTLOBJS="\$(GETTOBJS)"
        # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
2705
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2706
echo "configure:2707: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2707
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2708 2709
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739
  case "$MSGFMT" in
  /*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
  echo "$ac_t""$MSGFMT" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

        # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2740
echo "configure:2741: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2741 2742
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2743
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2744 2745 2746 2747 2748 2749 2750 2751
  case "$GMSGFMT" in
  /*)
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
  *)
2752 2753
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
Sam Hocevar's avatar
 
Sam Hocevar committed
2754
  for ac_dir in $ac_dummy; do 
2755 2756
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2757
      ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2758 2759 2760 2761
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
2762 2763 2764
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
2765
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2766 2767 2768 2769 2770
GMSGFMT="$ac_cv_path_GMSGFMT"
if test -n "$GMSGFMT"; then
  echo "$ac_t""$GMSGFMT" 1>&6
else
  echo "$ac_t""no" 1>&6
2771
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2772 2773 2774 2775

        # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2776
echo "configure:2777: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
  echo "$ac_t""$XGETTEXT" 1>&6
2803 2804 2805 2806
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2807 2808 2809 2810 2811 2812 2813
        
	BUILD_INCLUDED_LIBINTL=yes
	USE_INCLUDED_LIBINTL=yes
        CATOBJEXT=.gmo
	INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
	LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
      fi
2814

Sam Hocevar's avatar
 
Sam Hocevar committed
2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845
                  if test "$GMSGFMT" != ":"; then
			if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
	  : ;
	else
	  echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
	  GMSGFMT=":"
	fi
      fi

                  if test "$XGETTEXT" != ":"; then
			if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
	  : ;
	else
	  echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
	  XGETTEXT=":"
	fi
      fi

            POSUB=po
    fi
    


            if test "$PACKAGE" = gettext; then
      BUILD_INCLUDED_LIBINTL=yes
    fi

                                            for ac_prog in bison
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
2846
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2847
echo "configure:2848: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2848
if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2849
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2850
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2851 2852
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
2853
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2854 2855 2856 2857 2858
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2859
      ac_cv_prog_INTLBISON="$ac_prog"
Sam Hocevar's avatar
 
Sam Hocevar committed
2860 2861 2862 2863
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
2864 2865
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2866 2867 2868
INTLBISON="$ac_cv_prog_INTLBISON"
if test -n "$INTLBISON"; then
  echo "$ac_t""$INTLBISON" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2869
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2870
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2871 2872
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2873 2874 2875 2876 2877 2878 2879
test -n "$INTLBISON" && break
done

    if test -z "$INTLBISON"; then
      ac_verc_fail=yes
    else
            echo $ac_n "checking version of bison""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2880
echo "configure:2881: checking version of bison" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926
      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
      case $ac_prog_version in
        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
      esac
      echo "$ac_t""$ac_prog_version" 1>&6
    fi
    if test $ac_verc_fail = yes; then
      INTLBISON=:
    fi

                for lang in $ALL_LINGUAS; do
      GMOFILES="$GMOFILES $lang.gmo"
      POFILES="$POFILES $lang.po"
    done

        
    
    
    
    
    
    
    
    

        nls_cv_header_intl=
    nls_cv_header_libgt=

        DATADIRNAME=share
    

        INSTOBJEXT=.mo
    

        GENCAT=gencat
    
  

   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2927
echo "configure:2928: checking for catalogs to be installed" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961
       NEW_LINGUAS=
       for presentlang in $ALL_LINGUAS; do
         useit=no
         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
           # Use the presentlang catalog if desiredlang is
           #   a. equal to presentlang, or
           #   b. a variant of presentlang (because in this case,
           #      presentlang can be used as a fallback for messages
           #      which are not translated in the desiredlang catalog).
           case "$desiredlang" in
             "$presentlang"*) useit=yes;;
           esac
         done
         if test $useit = yes; then
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
         fi
       done
       LINGUAS=$NEW_LINGUAS
       echo "$ac_t""$LINGUAS" 1>&6
     fi

          if test -n "$LINGUAS"; then
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
     fi
   fi

            MKINSTALLDIRS=
   if test -n "$ac_aux_dir"; then
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
   fi
   if test -z "$MKINSTALLDIRS"; then
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
   fi
   
2962

Sam Hocevar's avatar
 
Sam Hocevar committed
2963 2964 2965
      INTL_LIBTOOL_SUFFIX_PREFIX=
   
  
2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
Sam Hocevar's avatar
 
Sam Hocevar committed
2978
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2979
echo "configure:2980: checking for a BSD compatible install" >&5
2980
if test -z "$INSTALL"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2981 2982
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2983
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2984
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
2985 2986
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
Sam Hocevar's avatar
 
Sam Hocevar committed
2987 2988
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2989 2990 2991 2992 2993
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
Sam Hocevar's avatar
 
Sam Hocevar committed
2994
        if test -f $ac_dir/$ac_prog; then
2995
	  if test $ac_prog = install &&
Sam Hocevar's avatar
 
Sam Hocevar committed
2996
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
Sam Hocevar's avatar
 
Sam Hocevar committed
3008
  IFS="$ac_save_IFS"
3009 3010 3011

fi
  if test "${ac_cv_path_install+set}" = set; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3012
    INSTALL="$ac_cv_path_install"
3013 3014 3015 3016 3017
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
Sam Hocevar's avatar
 
Sam Hocevar committed
3018
    INSTALL="$ac_install_sh"
3019 3020
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3021
echo "$ac_t""$INSTALL" 1>&6
3022 3023 3024 3025 3026

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

Sam Hocevar's avatar
 
Sam Hocevar committed
3027
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3028 3029 3030

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

Sam Hocevar's avatar
 
Sam Hocevar committed
3031

Gildas Bazin's avatar
 
Gildas Bazin committed
3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049
case x"${target_os}" in
  x)
    SYS=unknown
    ;;
  xlinux*)
    SYS=linux
    ;;
  xbsdi*)
    SYS=bsdi
    ;;
  xdarwin*)
    SYS=darwin
    ;;
  x*mingw32*)
    SYS=mingw32
    # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3050
echo "configure:3051: checking for $ac_word" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
else
  echo "$ac_t""no" 1>&6
fi


if test -z "$ac_cv_prog_WINDRES"; then
if test -n "$ac_tool_prefix"; then
  # Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3082
echo "configure:3083: checking for $ac_word" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_WINDRES="windres"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
fi
fi
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

else
  WINDRES=":"
fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3114
    LIB_IPV4="${LIB_IPV4} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3115 3116 3117 3118 3119 3120 3121 3122 3123
    LIB_RC="${LIB_RC} -lws2_32"
    ;;
  x*nto*)
    SYS=nto
    LIB_X11="${LIB_X11} -lsocket"
    LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
    ;;
  xbeos)
    SYS=beos
Sam Hocevar's avatar
 
Sam Hocevar committed
3124
    LIB_IPV4="${LIB_IPV4} -lbind"
Gildas Bazin's avatar
 
Gildas Bazin committed
3125 3126 3127 3128 3129 3130 3131 3132
    LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
    PLDFLAGS="${PLDFLAGS} -nostart"
    ;;
  x*)
    SYS=${target_os}
    ;;
esac

Sam Hocevar's avatar
 
Sam Hocevar committed
3133
for ac_func in gettimeofday select strerror strtod strtol isatty
3134
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3135
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3136
echo "configure:3137: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3137 3138
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3139
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3140
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3141
#line 3142 "configure"
3142 3143
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3144
    which can conflict with char $ac_func(); below.  */
3145 3146 3147
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3148 3149 3150 3151
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3152 3153 3154 3155 3156 3157 3158

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3159
$ac_func();
3160 3161
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3162
; return 0; }
3163
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3164
if { (eval echo configure:3165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3165 3166 3167 3168 3169 3170 3171 3172 3173 3174
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
3175

Sam Hocevar's avatar
 
Sam Hocevar committed
3176 3177 3178 3179 3180 3181 3182 3183 3184
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
3185 3186 3187
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3188
echo $ac_n "checking for connect""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3189
echo "configure:3190: checking for connect" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3190 3191
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3192
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3193
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3194
#line 3195 "configure"
3195 3196
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3197
    which can conflict with char connect(); below.  */
3198 3199 3200
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3201 3202 3203 3204
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
3205 3206 3207 3208 3209 3210 3211

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3212
connect();
3213 3214
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3215 3216
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3217
if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230
  rm -rf conftest*
  eval "ac_cv_func_connect=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3231 3232
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3233
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3234

Sam Hocevar's avatar
 
Sam Hocevar committed
3235
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3236
echo "configure:3237: checking for connect in -lsocket" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3237 3238 3239
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3240
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3241
  ac_save_LIBS="$LIBS"
3242
LIBS="-lsocket  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3243
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3244
#line 3245 "configure"
3245 3246 3247
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3248 3249 3250 3251 3252 3253 3254
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3255
if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3270
  LIB_IPV4="${LIB_IPV4} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
3271 3272
else
  echo "$ac_t""no" 1>&6
3273 3274
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3275

3276 3277
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3278
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3279
echo "configure:3280: checking for gethostbyname" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3280 3281
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3282
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3283
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3284
#line 3285 "configure"
3285 3286
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3287
    which can conflict with char gethostbyname(); below.  */
3288 3289 3290
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3291 3292 3293 3294
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
3295 3296 3297 3298 3299 3300 3301

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3302
gethostbyname();
3303 3304
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3305 3306
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3307
if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3321 3322
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3323
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3324

Sam Hocevar's avatar
 
Sam Hocevar committed
3325
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3326
echo "configure:3327: checking for gethostbyname in -lnsl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3327 3328 3329
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3330
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3331
  ac_save_LIBS="$LIBS"
3332
LIBS="-lnsl  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3333
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3334
#line 3335 "configure"
3335 3336 3337
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3338 3339 3340 3341 3342 3343 3344
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3345
if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450
  LIB_IPV4="${LIB_IPV4} -lnsl"
else
  echo "$ac_t""no" 1>&6
fi


fi

echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:3370: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3375 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
echo "configure:3417: checking for gethostbyname in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lbind  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3425 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:3436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIB_IPV4="${LIB_IPV4} -lbind"
Sam Hocevar's avatar
 
Sam Hocevar committed
3451 3452
else
  echo "$ac_t""no" 1>&6
3453 3454
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3455

3456 3457
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3458
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3459
echo "configure:3460: checking for nanosleep" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3460 3461
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3462
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3463
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3464
#line 3465 "configure"
3465 3466
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3467
    which can conflict with char nanosleep(); below.  */
3468 3469 3470
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3471 3472 3473 3474
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
3475 3476 3477 3478 3479 3480 3481

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3482
nanosleep();
3483 3484
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3485 3486
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3487
if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500
  rm -rf conftest*
  eval "ac_cv_func_nanosleep=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_nanosleep=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3501 3502
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3503
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3504

Sam Hocevar's avatar
 
Sam Hocevar committed
3505
  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3506
echo "configure:3507: checking for nanosleep in -lrt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3507 3508 3509
ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3510
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3511
  ac_save_LIBS="$LIBS"
3512
LIBS="-lrt  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3513
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3514
#line 3515 "configure"
3515 3516 3517
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3518 3519 3520 3521 3522 3523 3524
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3525
if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3540
  LIB="${LIB} -lrt"
3541
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3542
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3543

Sam Hocevar's avatar
 
Sam Hocevar committed
3544
    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3545
echo "configure:3546: checking for nanosleep in -lposix4" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3546 3547 3548
ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3549
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3550
  ac_save_LIBS="$LIBS"
3551
LIBS="-lposix4  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3552
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3553
#line 3554 "configure"
3554 3555 3556
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3557 3558 3559 3560 3561 3562 3563
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3564
if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3579
  LIB="${LIB} -lposix4"
Sam Hocevar's avatar
 
Sam Hocevar committed
3580 3581
else
  echo "$ac_t""no" 1>&6
3582 3583
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3584
  
3585 3586
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3587

3588 3589 3590 3591
fi

for ac_func in usleep
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3592
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3593
echo "configure:3594: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3594 3595 3596 3597
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3598
#line 3599 "configure"
3599 3600
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3601
    which can conflict with char $ac_func(); below.  */
3602 3603 3604
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3605 3606 3607 3608
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3609 3610 3611 3612 3613

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Sam Hocevar's avatar
 
Sam Hocevar committed
3614 3615
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3616
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
3617
#endif
3618

Sam Hocevar's avatar
 
Sam Hocevar committed
3619
; return 0; }
3620
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3621
if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3622 3623 3624 3625 3626 3627 3628 3629 3630 3631
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3632

Sam Hocevar's avatar
 
Sam Hocevar committed
3633 3634 3635 3636 3637 3638 3639 3640 3641
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
3642 3643 3644
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3645
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3646
echo "configure:3647: checking for inet_aton" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3647 3648
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3649
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3650
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3651
#line 3652 "configure"
3652 3653
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3654
    which can conflict with char inet_aton(); below.  */
3655 3656 3657
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3658 3659 3660 3661
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
3662 3663 3664 3665 3666 3667 3668

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_inet_aton) || defined (__stub___inet_aton)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3669
inet_aton();
3670 3671
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3672 3673
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3674
if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3688 3689
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3690
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3691

Sam Hocevar's avatar
 
Sam Hocevar committed
3692
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3693
echo "configure:3694: checking for inet_aton in -lresolv" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3694 3695 3696
ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3697
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3698
  ac_save_LIBS="$LIBS"
3699
LIBS="-lresolv  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3700
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3701
#line 3702 "configure"
3702 3703 3704
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3705 3706 3707 3708 3709 3710 3711
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3712
if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3727
  LIB="${LIB} -lresolv"
Sam Hocevar's avatar
 
Sam Hocevar committed
3728 3729
else
  echo "$ac_t""no" 1>&6
3730 3731
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3732

3733 3734
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3735 3736
for ac_func in vasprintf
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3737
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3738
echo "configure:3739: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3739 3740 3741 3742
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3743
#line 3744 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3744 3745
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3746
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3747 3748 3749
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3750 3751 3752 3753
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3754 3755 3756 3757 3758 3759 3760

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3761
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
3762 3763
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3764
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3765
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3766
if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3767 3768 3769 3770 3771 3772 3773 3774 3775 3776
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3777

Sam Hocevar's avatar
 
Sam Hocevar committed
3778 3779 3780 3781 3782 3783 3784 3785 3786
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3787 3788 3789
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3790 3791
for ac_func in swab
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3792
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3793
echo "configure:3794: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3794 3795 3796 3797
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3798
#line 3799 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3821
if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

3845
for ac_func in memalign valloc
3846 3847
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3848
echo "configure:3849: checking for $ac_func" >&5
3849 3850 3851 3852
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3853
#line 3854 "configure"
3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3876
if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3900 3901 3902 3903

for ac_func in sigrelse
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3904
echo "configure:3905: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3905 3906 3907 3908
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3909
#line 3910 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3910 3911
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
3912
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3913 3914 3915
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
3916 3917 3918 3919
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3920 3921 3922 3923 3924 3925 3926

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
3927
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
3928 3929
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
3930
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3931
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3932
if { (eval echo configure:3933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3933 3934 3935 3936 3937 3938 3939 3940 3941 3942
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3943

Sam Hocevar's avatar
 
Sam Hocevar committed
3944 3945 3946 3947 3948 3949 3950 3951 3952
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3953 3954 3955
fi
done

Gildas Bazin's avatar
 
Gildas Bazin committed
3956 3957 3958
for ac_func in getpwuid_r getpwuid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3959
echo "configure:3960: checking for $ac_func" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
3960 3961 3962 3963
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3964
#line 3965 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3987
if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Gildas Bazin's avatar
 
Gildas Bazin committed
3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4011

Sam Hocevar's avatar
 
Sam Hocevar committed
4012
NEED_GETOPT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
4013
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4014
echo "configure:4015: checking for getopt_long" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4015 4016
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4017
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4018
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4019
#line 4020 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4020 4021
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
4022
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4023 4024 4025
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4026 4027 4028 4029
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4030 4031 4032 4033 4034 4035 4036

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
4037
getopt_long();
Sam Hocevar's avatar
 
Sam Hocevar committed
4038 4039
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
4040 4041
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4042
if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056
  rm -rf conftest*
  eval "ac_cv_func_getopt_long=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_getopt_long=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4057 4058 4059 4060
#define HAVE_GETOPT_LONG 1
EOF

else
Sam Hocevar's avatar
 
Sam Hocevar committed
4061 4062 4063
  echo "$ac_t""no" 1>&6
 # FreeBSD has a gnugetopt library for this:
  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4064
echo "configure:4065: checking for getopt_long in -lgnugetopt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4065 4066 4067
ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4068
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4069
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4070
LIBS="-lgnugetopt  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4071
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4072
#line 4073 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4073 4074 4075
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4076 4077 4078 4079 4080
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
Sam Hocevar's avatar
 
Sam Hocevar committed
4081
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4082
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4083
if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4084 4085
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
4086
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4087 4088
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4089 4090
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
4091
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4092 4093
rm -f conftest*
LIBS="$ac_save_LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4094

4095
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4096 4097
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4098
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4099
#define HAVE_GETOPT_LONG 1
4100
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4101 4102 4103 4104 4105
 LIB="${LIB} -lgnugetopt"
else
  echo "$ac_t""no" 1>&6
NEED_GETOPT=1
fi
4106 4107 4108

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4109

Sam Hocevar's avatar
 
Sam Hocevar committed
4110
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4111
echo "configure:4112: checking return type of signal handlers" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4112 4113
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4114
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4115
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4116
#line 4117 "configure"
4117 4118 4119 4120
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
Sam Hocevar's avatar
 
Sam Hocevar committed
4121
#undef signal
4122 4123 4124 4125 4126 4127 4128
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
4129
int main() {
4130
int i;
Sam Hocevar's avatar
 
Sam Hocevar committed
4131 4132
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4133
if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4134
  rm -rf conftest*
4135 4136
  ac_cv_type_signal=void
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4137 4138 4139 4140
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
4141
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4142
rm -f conftest*
4143 4144
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4145 4146
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
4147 4148 4149
#define RETSIGTYPE $ac_cv_type_signal
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
4150 4151

echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4152
echo "configure:4153: checking for dlopen in -ldl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4153 4154 4155
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4156
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4157
  ac_save_LIBS="$LIBS"
4158
LIBS="-ldl  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4159
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4160
#line 4161 "configure"
4161 4162 4163
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4164 4165 4166 4167 4168 4169 4170
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4171
if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4186
  LIB="${LIB} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
4187 4188
else
  echo "$ac_t""no" 1>&6
4189 4190
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4191
echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4192
echo "configure:4193: checking for cos in -lm" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4193 4194 4195 4196 4197 4198 4199
ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4200
#line 4201 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4201 4202 4203 4204 4205 4206 4207 4208 4209 4210
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char cos();

int main() {
cos()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4211
if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIB_IMDCT="${LIB_IMDCT} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4227
  LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4228 4229 4230 4231
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4232
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4233
echo "configure:4234: checking for pow in -lm" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4234 4235 4236
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4237
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4238
  ac_save_LIBS="$LIBS"
4239
LIBS="-lm  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4240
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4241
#line 4242 "configure"
4242 4243 4244
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4245 4246 4247 4248 4249 4250 4251
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4252
if { (eval echo configure:4253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4267 4268 4269 4270
  LIB_IMDCT="${LIB_IMDCT} -lm"
  LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
  LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"

Sam Hocevar's avatar
 
Sam Hocevar committed
4271 4272
else
  echo "$ac_t""no" 1>&6
4273 4274
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4275

Sam Hocevar's avatar
 
Sam Hocevar committed
4276 4277 4278
THREAD_LIB=error
if test "x${THREAD_LIB}" = xerror; then
  echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4279
echo "configure:4280: checking for pthread_attr_init in -lpthread" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4280 4281
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4282 4283
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4284 4285 4286
  ac_save_LIBS="$LIBS"
LIBS="-lpthread  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4287
#line 4288 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4288 4289 4290 4291 4292 4293 4294
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4295
pthread_attr_init()
Sam Hocevar's avatar
 
Sam Hocevar committed
4296 4297
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4298
if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4299
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4300
  eval "ac_cv_lib_$ac_lib_var=yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4301 4302 4303 4304
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4305
  eval "ac_cv_lib_$ac_lib_var=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4306 4307
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4308
LIBS="$ac_save_LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4309

Sam Hocevar's avatar
 
Sam Hocevar committed
4310 4311
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4312
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4313
  THREAD_LIB="-lpthread"
Sam Hocevar's avatar
 
Sam Hocevar committed
4314 4315
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4316
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4317

Sam Hocevar's avatar
 
Sam Hocevar committed
4318 4319 4320
fi
if test "x${THREAD_LIB}" = xerror; then
  echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4321
echo "configure:4322: checking for pthread_attr_init in -lpthreads" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4322
ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
Sam Hocevar's avatar
 
Sam Hocevar committed
4323 4324
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4325
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4326
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4327
LIBS="-lpthreads  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4328
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4329
#line 4330 "configure"
4330 4331 4332
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4333 4334 4335 4336 4337 4338 4339
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4340
if { (eval echo configure:4341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4355
  THREAD_LIB="-lpthreads"
Sam Hocevar's avatar
 
Sam Hocevar committed
4356 4357
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4358 4359
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4360 4361 4362
fi
if test "x${THREAD_LIB}" = xerror; then
  echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4363
echo "configure:4364: checking for pthread_attr_init in -lc_r" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4364
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
Sam Hocevar's avatar
 
Sam Hocevar committed
4365 4366
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4367
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4368
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4369
LIBS="-lc_r  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4370
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4371
#line 4372 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4372
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4373 4374
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4375 4376 4377 4378 4379 4380 4381
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4382
if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4397
  THREAD_LIB="-lc_r"
Sam Hocevar's avatar
 
Sam Hocevar committed
4398 4399
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4400
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4401

Sam Hocevar's avatar
 
Sam Hocevar committed
4402 4403 4404
fi
if test "x${THREAD_LIB}" = xerror; then
  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4405
echo "configure:4406: checking for pthread_attr_init" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4406
if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4407
  echo $ac_n "(cached) $ac_c" 1>&6
4408
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4409
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4410
#line 4411 "configure"
4411
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4412 4413 4414
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pthread_attr_init(); below.  */
#include <assert.h>
4415 4416
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4417 4418 4419 4420
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4421 4422 4423 4424 4425 4426 4427 4428 4429 4430

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
choke me
#else
pthread_attr_init();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
4431 4432
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4433
if { (eval echo configure:4434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4434
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4435
  eval "ac_cv_func_pthread_attr_init=yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4436 4437 4438 4439
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4440
  eval "ac_cv_func_pthread_attr_init=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4441 4442 4443
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4444 4445

if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4446
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4447
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
4448 4449
else
  echo "$ac_t""no" 1>&6
4450 4451
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4452
  THREAD_LIB=""
Sam Hocevar's avatar
 
Sam Hocevar committed
4453
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4454 4455

echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4456
echo "configure:4457: checking for cthread_fork in -lthreads" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4457 4458
ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4459
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4460
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4461 4462 4463
  ac_save_LIBS="$LIBS"
LIBS="-lthreads  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4464
#line 4465 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4465 4466 4467
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
4468
    builtin and then its argument prototype would still apply.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4469
char cthread_fork();
Sam Hocevar's avatar
 
Sam Hocevar committed
4470 4471

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4472
cthread_fork()
Sam Hocevar's avatar
 
Sam Hocevar committed
4473 4474
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4475
if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4476
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4477
  eval "ac_cv_lib_$ac_lib_var=yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4478 4479 4480 4481
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4482
  eval "ac_cv_lib_$ac_lib_var=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4483 4484
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4485
LIBS="$ac_save_LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4486

Sam Hocevar's avatar
 
Sam Hocevar committed
4487 4488
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4489
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4490
  THREAD_LIB="-lthreads"
Sam Hocevar's avatar
 
Sam Hocevar committed
4491 4492 4493
else
  echo "$ac_t""no" 1>&6
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4494 4495


Sam Hocevar's avatar
 
Sam Hocevar committed
4496
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4497
#line 4498 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4498 4499
#include "confdefs.h"
#include <pthread.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
4500
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4501 4502
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4503 4504 4505
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4506 4507 4508 4509 4510 4511
#define PTHREAD_COND_T_IN_PTHREAD_H 1
EOF

fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
4512
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4513
#line 4514 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4514 4515
#include "confdefs.h"
#include <strings.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
4516
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4517 4518
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4519 4520 4521
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4522 4523 4524 4525 4526
#define STRNCASECMP_IN_STRINGS_H 1
EOF

fi
rm -f conftest*
4527

Sam Hocevar's avatar
 
Sam Hocevar committed
4528

Sam Hocevar's avatar
 
Sam Hocevar committed
4529
for ac_hdr in getopt.h strings.h
Christophe Massiot's avatar
Christophe Massiot committed
4530
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4531 4532
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4533
echo "configure:4534: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4534 4535 4536 4537
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4538
#line 4539 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4539
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4540 4541 4542
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4543
{ (eval echo configure:4544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4544 4545 4546 4547 4548 4549 4550
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Christophe Massiot's avatar
Christophe Massiot committed
4551
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4552 4553
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
4554
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4555
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4556
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4557 4558 4559 4560 4561
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Christophe Massiot's avatar
Christophe Massiot committed
4562
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4563 4564 4565
 
else
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
4566 4567 4568
fi
done

4569
for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
4570
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4571 4572
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4573
echo "configure:4574: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4574 4575 4576 4577
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4578
#line 4579 "configure"
4579
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4580 4581 4582
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4583
{ (eval echo configure:4584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4584 4585 4586 4587 4588 4589 4590
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4591
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4592 4593
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4594
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4595
rm -f conftest*
4596
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4597 4598 4599 4600 4601
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4602
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4603 4604 4605
 
else
  echo "$ac_t""no" 1>&6
4606 4607 4608
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4609
for ac_hdr in dlfcn.h image.h
4610
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4611 4612
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4613
echo "configure:4614: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4614 4615 4616 4617
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4618
#line 4619 "configure"
4619
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4620 4621 4622
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4623
{ (eval echo configure:4624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4624 4625 4626 4627 4628 4629 4630
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4631
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4632 4633
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4634
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4635
rm -f conftest*
4636
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4637 4638 4639 4640 4641
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4642
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4643 4644 4645
 
else
  echo "$ac_t""no" 1>&6
4646 4647 4648
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4649
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4650
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4651 4652
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4653
echo "configure:4654: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4654 4655 4656 4657
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4658
#line 4659 "configure"
4659
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4660 4661 4662
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4663
{ (eval echo configure:4664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4664 4665 4666 4667 4668 4669 4670
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4671
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4672 4673
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4674
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4675
rm -f conftest*
4676
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4677 4678 4679 4680 4681
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4682
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4683 4684 4685
 
else
  echo "$ac_t""no" 1>&6
4686 4687 4688
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4689
for ac_hdr in machine/param.h sys/shm.h
4690
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4691 4692
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4693
echo "configure:4694: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4694 4695 4696 4697
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4698
#line 4699 "configure"
4699
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4700 4701 4702
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4703
{ (eval echo configure:4704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4704 4705 4706 4707 4708 4709 4710
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4711
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4712 4713
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4714
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4715
rm -f conftest*
4716
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4717 4718 4719 4720 4721
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4722
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4723 4724 4725
 
else
  echo "$ac_t""no" 1>&6
4726 4727 4728
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4729

Sam Hocevar's avatar
 
Sam Hocevar committed
4730
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4731
echo "configure:4732: checking whether time.h and sys/time.h may both be included" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4732 4733 4734 4735
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4736
#line 4737 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4737 4738 4739 4740 4741 4742 4743 4744
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4745
if { (eval echo configure:4746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF

fi


Sam Hocevar's avatar
 
Sam Hocevar committed
4766
for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
Benoit Steiner's avatar
 
Benoit Steiner committed
4767
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4768 4769
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4770
echo "configure:4771: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4771 4772 4773 4774
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4775
#line 4776 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4776
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4777 4778 4779
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4780
{ (eval echo configure:4781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4781 4782 4783 4784 4785 4786 4787
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Christophe Massiot's avatar
Christophe Massiot committed
4788
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4789 4790
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
4791
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4792
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4793
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4794 4795 4796 4797 4798
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Christophe Massiot's avatar
Christophe Massiot committed
4799
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4800 4801 4802
 
else
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
4803 4804 4805
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4806

Sam Hocevar's avatar
 
Sam Hocevar committed
4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820
if test x$SYS != xmingw32
then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
  for ac_hdr in X11/extensions/dpms.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4821
echo "configure:4822: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4822 4823 4824 4825
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4826
#line 4827 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4827 4828 4829 4830
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4831
{ (eval echo configure:4832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4853
#line 4854 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877
#include "confdefs.h"
#include <X11/extensions/dpms.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "DPMSInfo" >/dev/null 2>&1; then
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
#define DPMSINFO_IN_DPMS_H 1
EOF

    
fi
rm -f conftest*

  
else
  echo "$ac_t""no" 1>&6
fi
done

  CPPFLAGS=$saved_CPPFLAGS
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4878
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4879
echo "configure:4880: checking for ntohl in sys/param.h" >&5
4880 4881 4882 4883 4884
if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -Wall -Werror"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4885
#line 4886 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4886 4887
#include "confdefs.h"
#include <sys/param.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
4888
int main() {
4889
void foo() { int meuh; ntohl(meuh); }
Sam Hocevar's avatar
 
Sam Hocevar committed
4890 4891
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4892
if { (eval echo configure:4893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4893
  rm -rf conftest*
4894
  ac_cv_c_ntohl_sys_param_h=yes
Christophe Massiot's avatar
Christophe Massiot committed
4895
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4896 4897 4898
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
4899
  ac_cv_c_ntohl_sys_param_h=no
Christophe Massiot's avatar
Christophe Massiot committed
4900
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4901
rm -f conftest*
4902 4903 4904 4905 4906 4907 4908 4909 4910
fi

echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
    cat >> confdefs.h <<\EOF
#define NTOHL_IN_SYS_PARAM_H 1
EOF

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4911

Sam Hocevar's avatar
 
Sam Hocevar committed
4912
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4913
echo "configure:4914: checking if \$CC accepts -finline-limit" >&5
4914 4915 4916 4917 4918
if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -finline-limit-30000"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4919
#line 4920 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4920 4921 4922 4923 4924 4925
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4926
if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4927
  rm -rf conftest*
4928
  ac_cv_c_inline_limit=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
4929 4930 4931 4932
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
4933
  ac_cv_c_inline_limit=no
Sam Hocevar's avatar
 
Sam Hocevar committed
4934 4935
fi
rm -f conftest*
4936
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4937

4938 4939 4940 4941 4942
echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
if test x"$ac_cv_c_inline_limit" != x"no"; then
    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4943
echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4944
echo "configure:4945: checking if \$CC accepts -Wall -Winline" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4945 4946 4947 4948 4949
if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -Wall -Winline"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4950
#line 4951 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4951 4952 4953 4954 4955 4956
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4957
if { (eval echo configure:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973
  rm -rf conftest*
  ac_cv_c_Wall_Winline=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_Wall_Winline=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
if test x"$ac_cv_c_Wall_Winline" != x"no"; then
    save_CFLAGS="${save_CFLAGS} -Wall -Winline"
else
    echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4974
echo "configure:4975: checking if \$CC accepts -wall -winline" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4975 4976 4977 4978 4979
if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -wall -winline"
         cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4980
#line 4981 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4981 4982 4983 4984 4985 4986
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4987
if { (eval echo configure:4988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005
  rm -rf conftest*
  ac_cv_c_wall_winline=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_wall_winline=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
    if test x"$ac_cv_c_wall_winline" != x"no"; then
        save_CFLAGS="${save_CFLAGS} -wall -winline"
    fi
fi

echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5006
echo "configure:5007: checking if \$CC accepts -pipe" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5007 5008 5009 5010 5011
if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -pipe"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5012
#line 5013 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5013 5014 5015 5016 5017 5018
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5019
if { (eval echo configure:5020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036
  rm -rf conftest*
  ac_cv_c_pipe=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_pipe=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_pipe" 1>&6
if test x"$ac_cv_c_pipe" != x"no"; then
    save_CFLAGS="${save_CFLAGS} -pipe"
fi

echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5037
echo "configure:5038: checking if \$CC accepts -O3" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5038 5039 5040 5041 5042
if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -O3"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5043
#line 5044 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5044 5045 5046 5047 5048 5049
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5050
if { (eval echo configure:5051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066
  rm -rf conftest*
  ac_cv_c_o3=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_o3=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_o3" 1>&6
if test x"$ac_cv_c_o3" != x"no"; then
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
else
    echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5067
echo "configure:5068: checking if \$CC accepts -O2" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5068 5069 5070 5071 5072
if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -O2"
         cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5073
#line 5074 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5074 5075 5076 5077 5078 5079
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5080
if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096
  rm -rf conftest*
  ac_cv_c_o2=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_o2=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_o2" 1>&6
    if test x"$ac_cv_c_o2" != x"no"; then
        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
    else
        echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5097
echo "configure:5098: checking if \$CC accepts -O" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5098 5099 5100 5101 5102
if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -O"
             cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5103
#line 5104 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5104 5105 5106 5107 5108 5109
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5110
if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129
  rm -rf conftest*
  ac_cv_c_o=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_o=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_o" 1>&6
        if test x"$ac_cv_c_o" != x"no"; then
            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
        fi
    fi
fi

echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5130
echo "configure:5131: checking if \$CC accepts -ffast-math" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5131 5132 5133 5134 5135
if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -ffast-math"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5136
#line 5137 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5137 5138 5139 5140 5141 5142
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5143
if { (eval echo configure:5144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160
  rm -rf conftest*
  ac_cv_c_fast_math=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_fast_math=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_fast_math" 1>&6
if test x"$ac_cv_c_fast_math" != x"no"; then
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
fi

echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5161
echo "configure:5162: checking if \$CC accepts -funroll-loops" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5162 5163 5164 5165 5166
if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -funroll-loops"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5167
#line 5168 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5168 5169 5170 5171 5172 5173
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5174
if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191
  rm -rf conftest*
  ac_cv_c_unroll_loops=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_unroll_loops=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
if test x"$ac_cv_c_unroll_loops" != x"no"; then
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
fi

echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5192
echo "configure:5193: checking if \$CC accepts -fomit-frame-pointer" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5193 5194 5195 5196 5197
if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5198
#line 5199 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5199 5200 5201 5202 5203 5204
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5205
if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221
  rm -rf conftest*
  ac_cv_c_omit_frame_pointer=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_omit_frame_pointer=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
fi

Christophe Massiot's avatar
Christophe Massiot committed
5222
echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5223
echo "configure:5224: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
5224 5225 5226
if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
Christophe Massiot's avatar
Christophe Massiot committed
5227
  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
5228
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5229
#line 5230 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5230 5231 5232 5233 5234 5235
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5236
if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5237
  rm -rf conftest*
5238
  ac_cv_ld_darwin=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5239 5240 5241 5242
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5243
  ac_cv_ld_darwin=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5244 5245
fi
rm -f conftest*
5246 5247 5248 5249
fi

echo "$ac_t""$ac_cv_ld_darwin" 1>&6
if test x"$ac_cv_ld_darwin" != x"no"; then
Christophe Massiot's avatar
Christophe Massiot committed
5250
    PLDFLAGS="${PLDFLAGS} -bundle -undefined error -lcc_dynamic"
5251
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5252

Sam Hocevar's avatar
 
Sam Hocevar committed
5253
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5254
echo "configure:5255: checking if \$CC accepts -shared" >&5
5255 5256 5257 5258 5259
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  CFLAGS="${save_CFLAGS} -shared"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5260
#line 5261 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5261 5262 5263 5264 5265 5266
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5267
if { (eval echo configure:5268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5268
  rm -rf conftest*
5269
  ac_cv_ld_plugins=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5270 5271 5272 5273
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5274
  ac_cv_ld_plugins=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5275 5276
fi
rm -f conftest*
5277
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5278

5279 5280
echo "$ac_t""$ac_cv_ld_plugins" 1>&6
if test x"$ac_cv_ld_plugins" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5281
    PLDFLAGS="${PLDFLAGS} -shared"
5282 5283
fi
        
Sam Hocevar's avatar
 
Sam Hocevar committed
5284
if test x"${SOFLAGS}" = x; then
5285
    echo $ac_n "checking for soname setting""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5286
echo "configure:5287: checking for soname setting" >&5
5287 5288 5289 5290 5291 5292 5293 5294
if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
        # Standard
        try_SOFLAGS="-Wl,-soname -Wl,"
        LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5295
#line 5296 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5296 5297 5298 5299 5300 5301
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5302
if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5303
  rm -rf conftest*
5304
  ac_cv_ld_soname="${try_SOFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5305 5306 5307 5308
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5309 5310 5311 5312 5313
  
            # SunOS
            try_SOFLAGS="-Wl,-h -Wl,"
            LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
            cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5314
#line 5315 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5315 5316 5317 5318 5319 5320
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5321
if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5322
  rm -rf conftest*
5323
  ac_cv_ld_soname="${try_SOFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5324 5325 5326 5327
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5328 5329 5330 5331
  ac_cv_ld_soname=none
fi
rm -f conftest*
        
Sam Hocevar's avatar
 
Sam Hocevar committed
5332 5333 5334 5335
fi
rm -f conftest*
fi

5336 5337 5338 5339 5340 5341 5342 5343 5344 5345
echo "$ac_t""$ac_cv_ld_soname" 1>&6
    if test x"$ac_cv_ld_soname" != x"none"; then
        SOFLAGS=$ac_cv_ld_soname
    else
        echo "
------------
Your system doesn't seem to have support for dynamic linking. You may
have problems using libdvdcss.
------------
"
5346
    fi
5347 5348
fi

5349
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5350
echo "configure:5351: checking __attribute__ ((aligned ())) support" >&5
5351 5352 5353 5354
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_attribute_aligned=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5355
        CFLAGS="${save_CFLAGS} -Werror"
5356 5357
    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5358
#line 5359 "configure"
5359 5360 5361 5362 5363 5364
#include "confdefs.h"

int main() {
static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5365
if { (eval echo configure:5366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383
  rm -rf conftest*
  ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
    done
fi

echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
if test x"$ac_cv_c_attribute_aligned" != x"0"; then
    cat >> confdefs.h <<EOF
#define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5384
CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5385
LDFLAGS="${save_LDFLAGS}"
Christophe Massiot's avatar
Christophe Massiot committed
5386

Sam Hocevar's avatar
 
Sam Hocevar committed
5387
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5388
echo "configure:5389: checking for boolean_t in sys/types.h" >&5
5389 5390 5391 5392
if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5393
#line 5394 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5394 5395
#include "confdefs.h"
#include <sys/types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
5396
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5397
boolean_t foo;
Sam Hocevar's avatar
 
Sam Hocevar committed
5398 5399
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5400
if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5401
  rm -rf conftest*
5402
  ac_cv_c_boolean_t_sys_types_h=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5403
else
Sam Hocevar's avatar
 
Sam Hocevar committed
5404 5405 5406
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5407
  ac_cv_c_boolean_t_sys_types_h=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5408
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5409
rm -f conftest*
5410 5411 5412 5413 5414 5415 5416 5417 5418 5419
fi

echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
    cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_H 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5420
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5421
echo "configure:5422: checking for boolean_t in pthread.h" >&5
5422 5423 5424 5425
if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5426
#line 5427 "configure"
5427 5428
#include "confdefs.h"
#include <pthread.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
5429
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5430
boolean_t foo;
Sam Hocevar's avatar
 
Sam Hocevar committed
5431 5432
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5433
if { (eval echo configure:5434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5434
  rm -rf conftest*
5435
  ac_cv_c_boolean_t_pthread_h=yes
5436
else
Sam Hocevar's avatar
 
Sam Hocevar committed
5437 5438 5439
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5440
  ac_cv_c_boolean_t_pthread_h=no
5441
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5442
rm -f conftest*
5443 5444 5445 5446 5447 5448 5449 5450 5451 5452
fi

echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
    cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_PTHREAD_H 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5453
echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5454
echo "configure:5455: checking for boolean_t in cthreads.h" >&5
5455 5456 5457 5458
if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5459
#line 5460 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5460 5461 5462
#include "confdefs.h"
#include <cthreads.h>
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5463
boolean_t foo;
Sam Hocevar's avatar
 
Sam Hocevar committed
5464 5465
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5466
if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5467
  rm -rf conftest*
5468
  ac_cv_c_boolean_t_cthreads_h=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5469 5470 5471 5472
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5473
  ac_cv_c_boolean_t_cthreads_h=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5474 5475
fi
rm -f conftest*
5476 5477 5478 5479 5480 5481 5482 5483 5484
fi

echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
    cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_CTHREADS_H 1
EOF

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5485

Sam Hocevar's avatar
 
Sam Hocevar committed
5486 5487 5488 5489 5490 5491 5492 5493
case x"${target_cpu}" in
  x)
    ARCH=unknown
    ;;
  *)
    ARCH=${target_cpu}
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
5494

Sam Hocevar's avatar
 
Sam Hocevar committed
5495
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5496
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
Sam Hocevar's avatar
 
Sam Hocevar committed
5497

Sam Hocevar's avatar
 
Sam Hocevar committed
5498
MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
Sam Hocevar's avatar
 
Sam Hocevar committed
5499 5500
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
Sam Hocevar's avatar
 
Sam Hocevar committed
5501
SSE_MODULES="imdctsse downmixsse"
5502
ALTIVEC_MODULES="idctaltivec motionaltivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5503

Sam Hocevar's avatar
 
Sam Hocevar committed
5504
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5505
echo "configure:5506: checking if \$CC groks MMX inline assembly" >&5
5506 5507 5508 5509
if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5510
#line 5511 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5511 5512
#include "confdefs.h"

5513
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5514
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
Sam Hocevar's avatar
 
Sam Hocevar committed
5515 5516
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5517
if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5518
  rm -rf conftest*
5519
  ac_cv_mmx_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5520
else
Sam Hocevar's avatar
 
Sam Hocevar committed
5521 5522 5523
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5524
  ac_cv_mmx_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5525
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5526
rm -f conftest*
5527 5528 5529 5530 5531 5532
fi

echo "$ac_t""$ac_cv_mmx_inline" 1>&6
if test x"$ac_cv_mmx_inline" != x"no"; then
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5533

Sam Hocevar's avatar
 
Sam Hocevar committed
5534
echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5535
echo "configure:5536: checking if \$CC groks MMX EXT inline assembly" >&5
5536 5537 5538 5539
if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5540
#line 5541 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5541 5542
#include "confdefs.h"

5543
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5544
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
Sam Hocevar's avatar
 
Sam Hocevar committed
5545 5546
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5547
if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5548
  rm -rf conftest*
5549
  ac_cv_mmxext_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5550
else
Sam Hocevar's avatar
 
Sam Hocevar committed
5551 5552 5553
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5554
  ac_cv_mmxext_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5555
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5556
rm -f conftest*
5557 5558 5559 5560 5561 5562
fi

echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
if test x"$ac_cv_mmxext_inline" != x"no"; then
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5563

Sam Hocevar's avatar
 
Sam Hocevar committed
5564
echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5565
echo "configure:5566: checking if \$CC groks 3D Now! inline assembly" >&5
5566 5567 5568 5569
if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5570
#line 5571 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5571 5572
#include "confdefs.h"

5573
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5574
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
Sam Hocevar's avatar
 
Sam Hocevar committed
5575 5576
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5577
if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5578
  rm -rf conftest*
5579
  ac_cv_3dnow_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5580 5581 5582 5583
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5584
  ac_cv_3dnow_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5585 5586
fi
rm -f conftest*
5587 5588 5589 5590
fi

echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
if test x"$ac_cv_3dnow_inline" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5591
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5592
#define CAN_COMPILE_3DNOW 1
Sam Hocevar's avatar
 
Sam Hocevar committed
5593 5594
EOF

5595 5596
  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5597 5598

echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5599
echo "configure:5600: checking if \$CC groks SSE inline assembly" >&5
5600 5601 5602 5603
if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5604
#line 5605 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5605 5606
#include "confdefs.h"

5607
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5608
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
Sam Hocevar's avatar
 
Sam Hocevar committed
5609 5610
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5611
if { (eval echo configure:5612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5612
  rm -rf conftest*
5613
  ac_cv_sse_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5614 5615 5616 5617
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5618
  ac_cv_sse_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5619 5620
fi
rm -f conftest*
5621
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5622

5623 5624
echo "$ac_t""$ac_cv_sse_inline" 1>&6
if test x"$ac_cv_sse_inline" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5625
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5626
#define CAN_COMPILE_SSE 1
Sam Hocevar's avatar
 
Sam Hocevar committed
5627 5628
EOF

5629 5630 5631
  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
5632 5633 5634
# don't try to grok altivec with native mingw32 it doesn't work right now
# we should be able to remove this test with future versions of mingw32
if test x$SYS != xmingw32; then
5635
echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5636
echo "configure:5637: checking if \$CC groks Altivec inline assembly" >&5
5637 5638 5639 5640
if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5641
#line 5642 "configure"
5642 5643
#include "confdefs.h"

5644
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5645
asm volatile("vperm 0,1,2,3");
5646 5647
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5648
if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5649
  rm -rf conftest*
5650
  ac_cv_altivec_inline=yes
5651 5652 5653 5654 5655 5656 5657
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  save_CFLAGS=$CFLAGS
          CFLAGS="$CFLAGS -Wa,-m7400"
          cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5658
#line 5659 "configure"
5659 5660 5661
#include "confdefs.h"

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5662
asm volatile("vperm 0,1,2,3");
5663 5664
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5665
if { (eval echo configure:5666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5666
  rm -rf conftest*
5667
  ac_cv_altivec_inline="-Wa,-m7400"
5668 5669 5670 5671
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5672
  ac_cv_altivec_inline=no
5673
fi
5674 5675 5676 5677
rm -f conftest*
          CFLAGS=$save_CFLAGS
         
fi
5678
rm -f conftest*
5679 5680 5681 5682
fi

echo "$ac_t""$ac_cv_altivec_inline" 1>&6
if test x"$ac_cv_altivec_inline" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5683
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5684
#define CAN_COMPILE_ALTIVEC 1
Sam Hocevar's avatar
 
Sam Hocevar committed
5685 5686
EOF

5687
  if test x"$ac_cv_altivec_inline" != x"yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5688 5689
    CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
    CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
Sam Hocevar's avatar
 
Sam Hocevar committed
5690
    CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
5691
  fi
5692 5693
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
5694

5695
echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5696
echo "configure:5697: checking if \$CC groks Altivec C extensions" >&5
5697 5698 5699
if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
5700 5701 5702
  save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -faltivec"
     # Darwin test
5703
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5704
#line 5705 "configure"
5705
#include "confdefs.h"
5706

5707
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5708
vec_mtvscr((vector unsigned int)(0));
5709 5710
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5711
if { (eval echo configure:5712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5712 5713 5714 5715 5716 5717 5718 5719
  rm -rf conftest*
  ac_cv_c_altivec=-faltivec
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
        # Linux/PPC test
Sam Hocevar's avatar
 
Sam Hocevar committed
5720
        CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
5721
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5722
#line 5723 "configure"
5723
#include "confdefs.h"
5724

5725
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5726
vec_mtvscr((vector unsigned int)(0));
5727 5728
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5729
if { (eval echo configure:5730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5730
  rm -rf conftest*
5731
  ac_cv_c_altivec="-fvec"
5732 5733 5734 5735 5736
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_altivec=no
5737 5738 5739
fi
rm -f conftest*
        
5740 5741 5742
fi
rm -f conftest*
     CFLAGS=$save_CFLAGS
5743
    
5744 5745 5746 5747 5748
fi

echo "$ac_t""$ac_cv_c_altivec" 1>&6
if test x"$ac_cv_c_altivec" != x"no"; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5749
#define CAN_COMPILE_C_ALTIVEC 1
5750 5751
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
5752 5753
  CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
  CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5754
  CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
5755
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5756 5757 5758
fi

echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5759
echo "configure:5760: checking if linker needs -framework vecLib" >&5
5760 5761 5762 5763 5764 5765
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  save_LDFLAGS=$LDFLAGS
     LDFLAGS="$LDFLAGS -framework vecLib"
     cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5766
#line 5767 "configure"
5767 5768 5769 5770 5771 5772
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5773
if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788
  rm -rf conftest*
  ac_cv_ld_altivec=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_altivec=no
fi
rm -f conftest*
     LDFLAGS=$save_LDFLAGS
    
fi

echo "$ac_t""$ac_cv_ld_altivec" 1>&6
if test x"$ac_cv_ld_altivec" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5789 5790
  LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
  LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
Sam Hocevar's avatar
 
Sam Hocevar committed
5791
  LIB="${LIB} -framework vecLib"
5792
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
5793
fi # end if mingw32
Sam Hocevar's avatar
 
Sam Hocevar committed
5794

Sam Hocevar's avatar
 
Sam Hocevar committed
5795 5796
case x$SYS in
  xmingw32)
Sam Hocevar's avatar
 
Sam Hocevar committed
5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814
    DVD_DEVICE="E:"
    VCD_DEVICE="E:"
    ;;
  *)
    DVD_DEVICE="/dev/dvd"
    VCD_DEVICE="/dev/cdrom"
    ;;
esac

cat >> confdefs.h <<EOF
#define DVD_DEVICE "$DVD_DEVICE"
EOF

cat >> confdefs.h <<EOF
#define VCD_DEVICE "$VCD_DEVICE"
EOF


5815

Sam Hocevar's avatar
 
Sam Hocevar committed
5816

Sam Hocevar's avatar
 
Sam Hocevar committed
5817 5818
CAN_BUILD_LIBDVDCSS=0

Sam Hocevar's avatar
 
Sam Hocevar committed
5819 5820 5821 5822
for ac_hdr in winioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5823
echo "configure:5824: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5824 5825 5826 5827
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5828
#line 5829 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5829 5830 5831 5832
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
5833
{ (eval echo configure:5834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
Sam Hocevar's avatar
 
Sam Hocevar committed
5854
  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5855 5856 5857 5858 5859 5860 5861

else
  echo "$ac_t""no" 1>&6
fi
done


Sam Hocevar's avatar
 
Sam Hocevar committed
5862
for ac_hdr in sys/ioctl.h
5863
do
Sam Hocevar's avatar
 
Sam Hocevar committed
5864 5865
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5866
echo "configure:5867: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5867 5868 5869 5870
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5871
#line 5872 "configure"
5872
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
5873 5874 5875
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
5876
{ (eval echo configure:5877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5877 5878 5879 5880 5881 5882 5883
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
5884
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5885 5886
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
5887
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5888
rm -f conftest*
5889
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5890 5891 5892 5893 5894
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
5895
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5896
 
Sam Hocevar's avatar
 
Sam Hocevar committed
5897
  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5898
  for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
5899
do
Sam Hocevar's avatar
 
Sam Hocevar committed
5900 5901
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5902
echo "configure:5903: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5903 5904 5905 5906
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5907
#line 5908 "configure"
5908
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
5909 5910 5911
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
5912
{ (eval echo configure:5913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5913 5914 5915 5916 5917 5918 5919
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
5920
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5921 5922
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
5923
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5924
rm -f conftest*
5925
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5926 5927 5928 5929 5930
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
5931
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5932 5933 5934
 
else
  echo "$ac_t""no" 1>&6
5935 5936 5937
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
5938
  BSD_DVD_STRUCT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5939
  LINUX_DVD_STRUCT=0
5940
  OPENBSD_DVD_STRUCT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5941
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5942
#line 5943 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5943
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
5944
#include <sys/cdio.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
5945
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5946 5947
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5948 5949 5950
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5951
#define DVD_STRUCT_IN_SYS_CDIO_H 1
Sam Hocevar's avatar
 
Sam Hocevar committed
5952 5953
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
5954
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5955
#line 5956 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5956 5957 5958 5959 5960 5961 5962 5963 5964 5965
#include "confdefs.h"
#include <sys/cdio.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct dvd_struct" >/dev/null 2>&1; then
  rm -rf conftest*
  
                    BSD_DVD_STRUCT=1
else
  rm -rf conftest*
5966
  LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
5967 5968 5969
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
5970
  
Sam Hocevar's avatar
 
Sam Hocevar committed
5971 5972 5973
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
5974
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5975
#line 5976 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5976
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
5977
#include <sys/dvdio.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
5978
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5979 5980
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5981 5982 5983
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5984
#define DVD_STRUCT_IN_SYS_DVDIO_H 1
Sam Hocevar's avatar
 
Sam Hocevar committed
5985 5986
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
5987
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5988
#line 5989 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002
#include "confdefs.h"
#include <sys/dvdio.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "struct dvd_struct" >/dev/null 2>&1; then
  rm -rf conftest*
  
                    BSD_DVD_STRUCT=1
else
  rm -rf conftest*
  LINUX_DVD_STRUCT=1
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
6003
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6004 6005 6006
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
6007
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6008
#line 6009 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6009 6010 6011 6012 6013 6014 6015
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6016
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6017
#define DVD_STRUCT_IN_LINUX_CDROM_H 1
Sam Hocevar's avatar
 
Sam Hocevar committed
6018 6019
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
6020 6021 6022 6023 6024
    LINUX_DVD_STRUCT=1
  
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
6025 6026
        NEED_BSDI_LIBDVD=0
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6027
#line 6028 "configure"
6028
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
6029
#include <dvd.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
6030
EOF
6031
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
6032
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
6033 6034 6035
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6036
#define DVD_STRUCT_IN_DVD_H 1
6037 6038
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
6039
    LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6040
    LINUX_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
6041 6042 6043
  
else
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6044
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6045 6046 6047 6048
                for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6049
echo "configure:6050: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6050 6051 6052 6053
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6054
#line 6055 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6055 6056 6057 6058
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6059
{ (eval echo configure:6060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6060 6061 6062 6063 6064 6065 6066 6067 6068 6069
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6070 6071
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6072 6073 6074 6075 6076 6077 6078 6079 6080
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
      NEED_BSDI_LIBDVD=1
Sam Hocevar's avatar
 
Sam Hocevar committed
6081 6082 6083 6084
      cat >> confdefs.h <<\EOF
#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
6085
      SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
Sam Hocevar's avatar
 
Sam Hocevar committed
6086 6087 6088 6089 6090 6091
      LINUX_DVD_STRUCT=1
    
else
  echo "$ac_t""no" 1>&6
fi
done
6092

Sam Hocevar's avatar
 
Sam Hocevar committed
6093 6094 6095 6096 6097 6098
  
fi
rm -f conftest*

        ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6099
echo "configure:6100: checking for sys/scsi/scsi_types.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6100 6101 6102 6103
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6104
#line 6105 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6105
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
6106
#include <sys/scsi/scsi_types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
6107 6108
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6109
{ (eval echo configure:6110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6128
echo "configure:6129: checking for sys/scsi/impl/uscsi.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6129 6130 6131 6132
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6133
#line 6134 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6134 6135 6136 6137
#include "confdefs.h"
#include <sys/scsi/impl/uscsi.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6138
{ (eval echo configure:6139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
      cat >> confdefs.h <<\EOF
#define SOLARIS_USCSI 1
EOF

    
else
  echo "$ac_t""no" 1>&6
fi

  
6165 6166 6167 6168 6169 6170
else
  echo "$ac_t""no" 1>&6
fi

        ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6171
echo "configure:6172: checking for sys/scsi.h" >&5
6172 6173 6174 6175
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6176
#line 6177 "configure"
6177 6178 6179 6180
#include "confdefs.h"
#include <sys/scsi.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6181
{ (eval echo configure:6182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6199
#line 6200 "configure"
6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215
#include "confdefs.h"
#include <sys/scsi.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "sctl_io" >/dev/null 2>&1; then
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
#define HPUX_SCTL_IO 1
EOF

    
fi
rm -f conftest*

  
Sam Hocevar's avatar
 
Sam Hocevar committed
6216 6217 6218 6219
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6220 6221 6222 6223 6224
        if test x$LINUX_DVD_STRUCT = x1; then
    cat >> confdefs.h <<\EOF
#define HAVE_LINUX_DVD_STRUCT 1
EOF

6225 6226 6227 6228 6229 6230
    if test x$OPENBSD_DVD_STRUCT = x1; then
      cat >> confdefs.h <<\EOF
#define HAVE_OPENBSD_DVD_STRUCT 1
EOF

    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6231 6232 6233 6234 6235 6236 6237 6238
  else
    if test x$BSD_DVD_STRUCT = x1; then
      cat >> confdefs.h <<\EOF
#define HAVE_BSD_DVD_STRUCT 1
EOF

    fi
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6239 6240 6241

else
  echo "$ac_t""no" 1>&6
6242 6243 6244
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
6245

Sam Hocevar's avatar
 
Sam Hocevar committed
6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
fi

# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
fi


6259 6260 6261 6262
# Check whether --with-tuning or --without-tuning was given.
if test "${with_tuning+set}" = set; then
  withval="$with_tuning"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
6263 6264
fi

6265 6266 6267
if test "x$withval" != "x"; then
    TUNING=$withval
else
6268
    if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
6269
    else
6270
        if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
6271 6272
    fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6273

Sam Hocevar's avatar
 
Sam Hocevar committed
6274 6275 6276 6277
if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
then
    ARCH="${ARCH} mmx"
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
6278 6279
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6280 6281 6282 6283 6284 6285 6286 6287 6288
# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
   if test x$enableval = xno; then OPTIMS=0; fi 
else
   OPTIMS=1 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
6289 6290 6291
# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
6292 6293 6294
   if test x$enableval = xyes; then ARCH="${ARCH} altivec";
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
else
6295
   if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
6296
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
6297 6298 6299
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
6300
DEBUG=0
Sam Hocevar's avatar
 
Sam Hocevar committed
6301 6302 6303 6304 6305 6306 6307
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
   if test x$enableval = xyes; then DEBUG=1; fi 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
6308 6309 6310 6311 6312 6313 6314
# Check whether --enable-release or --disable-release was given.
if test "${enable_release+set}" = set; then
  enableval="$enable_release"
   if test x$enableval = xyes; then RELEASE=1; fi 
else
   VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
  LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
Sam Hocevar's avatar
 
Sam Hocevar committed
6315 6316 6317 6318
fi



Sam Hocevar's avatar
 
Sam Hocevar committed
6319 6320 6321 6322
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
6323 6324 6325
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372
NEED_LIBDVDCSS=0
STATIC_LIBDVDCSS=0
DUMMY_LIBDVDCSS=0
# Check whether --with-dvdcss or --without-dvdcss was given.
if test "${with_dvdcss+set}" = set; then
  withval="$with_dvdcss"
   case "x${withval}" in
    xlocal-static|xyes)
      # local libdvdcss, statically linked
      BUILTINS="${BUILTINS} dvd"
      if test x${CAN_BUILD_LIBDVDCSS} = x1
      then
        NEED_LIBDVDCSS=1
        STATIC_LIBDVDCSS=1
        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
        LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
      fi
    ;;
    xlocal-shared)
      # local libdvdcss, dynamically linked
      PLUGINS="${PLUGINS} dvd"
      if test x${CAN_BUILD_LIBDVDCSS} = x1
      then
        NEED_LIBDVDCSS=1
        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
        LIB_DVD="${LIB_DVD} -L../../lib -ldvdcss"
      fi
    ;;
    xno)
      # don't use libdvdcss at all, build a DVD module that can dlopen() it
      PLUGINS="${PLUGINS} dvd"
      DUMMY_LIBDVDCSS=1
      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
      CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
      LIB_DVD="${LIB_DVD} -ldl"
    ;;
    *)
      # existing libdvdcss
      PLUGINS="${PLUGINS} dvd"
      if test "x$withval" != "xyes"
      then
        LIB_DVD="${LIB_DVD} -L"$withval"/lib"
        CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
      fi
      LIB_DVD="${LIB_DVD} -ldvdcss"
    esac 
Sam Hocevar's avatar
 
Sam Hocevar committed
6373
else
Sam Hocevar's avatar
 
Sam Hocevar committed
6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390
  # user didn't decide, we choose to use local libdvdcss and link statically
  # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
   if test x${CAN_BUILD_LIBDVDCSS} = x1
    then
      BUILTINS="${BUILTINS} dvd"
      NEED_LIBDVDCSS=1
      STATIC_LIBDVDCSS=1
      CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
      LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
    else
      # XXX: no check for libdl is done, don't try this at home !
      PLUGINS="${PLUGINS} dvd"
      DUMMY_LIBDVDCSS=1
      SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
      LIB_DVD="${LIB_DVD} -ldl"
    fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
6391 6392 6393
fi


6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406
if test x${DUMMY_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
if test x${STATIC_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
# Check whether --with-dvdread or --without-dvdread was given.
if test "${with_dvdread+set}" = set; then
  withval="$with_dvdread"
   case "x${withval}" in
    xlocal-static|xyes)
      if test x${STATIC_LIBDVDREAD} = x1
      then
        BUILTINS="${BUILTINS} dvdread" 
        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
        LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
      else
6407
        { echo "configure: error: Can't link static dvdread with shared dvdcss" 1>&2; exit 1; }
6408 6409 6410 6411 6412 6413 6414
      fi
    ;;
    xno)
    ;;
    x)
      if test x${STATIC_LIBDVDREAD} = x1
      then
Christophe Massiot's avatar
Christophe Massiot committed
6415
        #BUILTINS="${BUILTINS} dvdread" 
6416 6417 6418
        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
        LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
      else
Christophe Massiot's avatar
Christophe Massiot committed
6419
        #PLUGINS="${PLUGINS} dvdread"
6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434
        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread  ${CFLAGS_DVD}"
        LIB_DVDREAD="${LIB_DVDREAD} -Llib -ldvdread ${LIB_DVD}"
      fi 
    ;;
    *)
      if test "x$withval" != "xlocal-shared"
      then
        LIB_DVDREAD="${LIB_DVDREAD} -L"$withval"/lib"
        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I"$withval"/include"
      else
        LIB_DVDREAD="${LIB_DVDREAD} -L../../lib"
        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
      fi
      if test x${STATIC_LIBDVDCSS} = x1
      then
6435
        { echo "configure: error: Can't link shared dvdread with static dvdcss" 1>&2; exit 1; }
6436
      else
Christophe Massiot's avatar
Christophe Massiot committed
6437
        #PLUGINS="${PLUGINS} dvdread"
6438 6439 6440 6441 6442 6443 6444 6445 6446 6447
        CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD}"
        LIB_DVDREAD="${LIB_DVDREAD} -ldvdread ${LIB_DVD}"
      fi
    esac
    if test x${DUMMY_LIBDVDCSS} = x1
    then
      LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -ldl"
    else
      LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -L../../lib -ldvdcss"
    fi 
Stéphane Borel's avatar
Stéphane Borel committed
6448 6449 6450
fi


6451 6452 6453
# Check whether --enable-vcd or --disable-vcd was given.
if test "${enable_vcd+set}" = set; then
  enableval="$enable_vcd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6454
  :
6455 6456 6457
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
6458 6459 6460
if test x$enable_vcd != xno
then
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6461
#line 6462 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6462 6463 6464 6465 6466 6467 6468
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "cdrom_msf0" >/dev/null 2>&1; then
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6469
    PLUGINS="${PLUGINS} vcd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6470 6471 6472 6473
  
fi
rm -f conftest*

6474

Sam Hocevar's avatar
 
Sam Hocevar committed
6475 6476 6477 6478
  if test "x${SYS}" = "xbsdi"
  then
    PLUGINS="${PLUGINS} vcd"
  fi
6479

Sam Hocevar's avatar
 
Sam Hocevar committed
6480 6481 6482
  if test "x${SYS}" = "xdarwin"
  then
    PLUGINS="${PLUGINS} vcd"
Christophe Massiot's avatar
Christophe Massiot committed
6483
    LIB_VCD="${LIB_VCD} -framework IOKit -framework CoreFoundation" 
Sam Hocevar's avatar
 
Sam Hocevar committed
6484
  fi
6485 6486
fi

6487
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6488
#line 6489 "configure"
6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500
#include "confdefs.h"
#include <netinet/in.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "in6_addr" >/dev/null 2>&1; then
  rm -rf conftest*
  
  PLUGINS="${PLUGINS} ipv6"
fi
rm -f conftest*


Sam Hocevar's avatar
 
Sam Hocevar committed
6501 6502 6503 6504

# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
Sam Hocevar's avatar
 
Sam Hocevar committed
6505 6506 6507
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6508

Sam Hocevar's avatar
 
Sam Hocevar committed
6509 6510 6511 6512
# Check whether --enable-mad or --disable-mad was given.
if test "${enable_mad+set}" = set; then
  enableval="$enable_mad"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
6513 6514
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6515 6516 6517 6518 6519
if test x$enable_mad == xyes
then
  PLUGINS="${PLUGINS} mad"
  LIB_MAD="${LIB_MAD} -lmad"
  # Check whether --with-mad or --without-mad was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6520 6521
if test "${with_mad+set}" = set; then
  withval="$with_mad"
Sam Hocevar's avatar
 
Sam Hocevar committed
6522 6523
   if test "x$with_val" != "xno" -a "x$with_val" != "x"
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
6524
        CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
6525 6526 6527 6528 6529 6530 6531 6532 6533
        LIB_MAD="${LIB_MAD} -L$with_val/lib"
      fi 
fi

  save_CFLAGS=$CFLAGS
  save_LDFLAGS=$LDFLAGS
  CFLAGS="$CFLAGS $CFLAGS_MAD"
  LDFLAGS="$LDFLAGS $LIB_MAD"
  for ac_hdr in mad.h
6534 6535 6536
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6537
echo "configure:6538: checking for $ac_hdr" >&5
6538 6539 6540 6541
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6542
#line 6543 "configure"
6543 6544 6545 6546
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6547
{ (eval echo configure:6548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
echo "Cannot find development headers for libmad..."
Sam Hocevar's avatar
 
Sam Hocevar committed
6571 6572
    exit 1
  
6573 6574 6575
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
6576
  echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6577
echo "configure:6578: checking for mad_bit_init in -lmad" >&5
6578 6579 6580 6581 6582 6583 6584
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lmad  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6585
#line 6586 "configure"
6586 6587 6588 6589 6590 6591 6592 6593 6594 6595
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6596
if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lmad $LIBS"

else
  echo "$ac_t""no" 1>&6
 echo "Cannot find libmad library..."
Sam Hocevar's avatar
 
Sam Hocevar committed
6622 6623
    exit 1
  
6624 6625
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6626 6627
  CFLAGS=$save_CFLAGS
  LDFLAGS=$save_LDFLAGS
6628 6629
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6630 6631
if test x$SYS = xbeos
then
Sam Hocevar's avatar
 
Sam Hocevar committed
6632
    PLUGINS="${PLUGINS} beos"
6633 6634 6635

else

Sam Hocevar's avatar
 
Sam Hocevar committed
6636 6637 6638
# Check whether --enable-a52 or --disable-a52 was given.
if test "${enable_a52+set}" = set; then
  enableval="$enable_a52"
Sam Hocevar's avatar
 
Sam Hocevar committed
6639 6640
  :
fi
6641

Sam Hocevar's avatar
 
Sam Hocevar committed
6642 6643 6644
if test "x$enableval" != "xno" -a x$SYS != xmingw32
  then
    for ac_hdr in a52dec/a52.h
Sam Hocevar's avatar
 
Sam Hocevar committed
6645 6646 6647
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6648
echo "configure:6649: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6649 6650 6651 6652
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6653
#line 6654 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6654 6655 6656 6657
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6658
{ (eval echo configure:6659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
Sam Hocevar's avatar
 
Sam Hocevar committed
6679 6680 6681
      BUILTINS="${BUILTINS} a52"
      LIB_A52="${LIB_A52} -la52"
     
Sam Hocevar's avatar
 
Sam Hocevar committed
6682
else
Sam Hocevar's avatar
 
Sam Hocevar committed
6683
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6684
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6685
done
Sam Hocevar's avatar
 
Sam Hocevar committed
6686 6687

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6688

Sam Hocevar's avatar
 
Sam Hocevar committed
6689

Sam Hocevar's avatar
 
Sam Hocevar committed
6690 6691 6692 6693
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
6694 6695
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6696

Sam Hocevar's avatar
 
Sam Hocevar committed
6697 6698 6699 6700
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
6701 6702
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713
if test x$enable_x11 != xno &&
  (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
  for ac_hdr in X11/Xlib.h
6714
do
Sam Hocevar's avatar
 
Sam Hocevar committed
6715 6716
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6717
echo "configure:6718: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6718 6719 6720 6721
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6722
#line 6723 "configure"
6723
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
6724 6725 6726
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6727
{ (eval echo configure:6728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6728 6729 6730 6731 6732 6733 6734
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
6735
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6736 6737
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6738
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6739
rm -f conftest*
6740
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6741 6742 6743 6744 6745
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
6746
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6747 6748 6749 6750 6751
 
    PLUGINS="${PLUGINS} x11"
    LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
    CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6752 6753
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6754
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6755
done
Sam Hocevar's avatar
 
Sam Hocevar committed
6756

Sam Hocevar's avatar
 
Sam Hocevar committed
6757
  CPPFLAGS=$saved_CPPFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
6758 6759
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6760 6761 6762
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
6763 6764 6765
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776
if test x$enable_xvideo != xno &&
  (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
  for ac_hdr in X11/extensions/Xv.h
6777 6778 6779
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6780
echo "configure:6781: checking for $ac_hdr" >&5
6781 6782 6783 6784
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6785
#line 6786 "configure"
6786 6787 6788 6789
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
6790
{ (eval echo configure:6791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
Sam Hocevar's avatar
 
Sam Hocevar committed
6811 6812 6813
    saved_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
    echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6814
echo "configure:6815: checking for XvSetPortAttribute in -lXv_pic" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6815 6816
ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
6817 6818
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
6819 6820 6821
  ac_save_LIBS="$LIBS"
LIBS="-lXv_pic  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6822
#line 6823 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6823
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
6824 6825 6826 6827 6828 6829 6830 6831
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char XvSetPortAttribute();

int main() {
XvSetPortAttribute()
; return 0; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6832
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6833
if { (eval echo configure:6834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Gildas Bazin's avatar
 
Gildas Bazin committed
6834
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6835
  eval "ac_cv_lib_$ac_lib_var=yes"
Gildas Bazin's avatar
 
Gildas Bazin committed
6836 6837 6838 6839
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6840
  eval "ac_cv_lib_$ac_lib_var=no"
Gildas Bazin's avatar
 
Gildas Bazin committed
6841 6842
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6843 6844
LIBS="$ac_save_LIBS"

Gildas Bazin's avatar
 
Gildas Bazin committed
6845
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6846
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
6847
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862
  # We have Xv_pic, that's good, we can build an xvideo.so plugin !
      PLUGINS="${PLUGINS} xvideo"
      LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
      CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
else
  echo "$ac_t""no" 1>&6
# We don't have Xv_pic, let's make xvideo.a as builtin
      BUILTINS="${BUILTINS} xvideo"
      LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
      CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
fi

    CFLAGS=$saved_CFLAGS
  
  CPPFLAGS=$saved_CPPFLAGS
Gildas Bazin's avatar
 
Gildas Bazin committed
6863 6864 6865 6866 6867 6868 6869
else
  echo "$ac_t""no" 1>&6
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6870 6871 6872
# Check whether --enable-sdl or --disable-sdl was given.
if test "${enable_sdl+set}" = set; then
  enableval="$enable_sdl"
6873 6874 6875
  :
fi

6876
if test "x$enable_sdl" != "xno"
6877
then
6878 6879 6880 6881 6882 6883 6884 6885 6886 6887
  SDL_PATH=$PATH
  # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
if test "${with_sdl_config_path+set}" = set; then
  withval="$with_sdl_config_path"
   if test "x$withval" != "xno"
      then
        SDL_PATH=$withval:$PATH
      fi 
fi

6888 6889
  # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
6890
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6891
echo "configure:6892: checking for $ac_word" >&5
6892
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
6893 6894
  echo $ac_n "(cached) $ac_c" 1>&6
else
6895
  case "$SDL12_CONFIG" in
6896
  /*)
6897
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
6898 6899
  ;;
  ?:/*)			 
6900
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
6901 6902 6903
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
6904
  ac_dummy="$SDL_PATH"
6905 6906 6907
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
6908
      ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
6909 6910 6911 6912
      break
    fi
  done
  IFS="$ac_save_ifs"
6913
  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
6914 6915 6916
  ;;
esac
fi
6917 6918 6919
SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
if test -n "$SDL12_CONFIG"; then
  echo "$ac_t""$SDL12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6920
else
6921
  echo "$ac_t""no" 1>&6
6922
fi
6923

6924 6925
  SDL_CONFIG=${SDL12_CONFIG}
  SDL_HEADER="SDL12/SDL.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
6926 6927
  if test x${SDL_CONFIG} = xno
  then
6928 6929 6930
    # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6931
echo "configure:6932: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6932
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
6933 6934
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
6935
  case "$SDL11_CONFIG" in
6936
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
6937
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
6938 6939
  ;;
  ?:/*)			 
Sam Hocevar's avatar
 
Sam Hocevar committed
6940
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
6941 6942 6943
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
6944
  ac_dummy="$SDL_PATH"
6945 6946 6947
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Sam Hocevar's avatar
 
Sam Hocevar committed
6948
      ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
6949 6950 6951 6952
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
6953
  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
6954 6955
  ;;
esac
6956
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6957 6958 6959
SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
if test -n "$SDL11_CONFIG"; then
  echo "$ac_t""$SDL11_CONFIG" 1>&6
6960
else
Sam Hocevar's avatar
 
Sam Hocevar committed
6961
  echo "$ac_t""no" 1>&6
6962 6963
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6964
    SDL_CONFIG=${SDL11_CONFIG}
6965 6966
    SDL_HEADER="SDL11/SDL.h"
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6967 6968
  if test x${SDL_CONFIG} = xno
  then
6969 6970
    # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
6971
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6972
echo "configure:6973: checking for $ac_word" >&5
6973
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
6974 6975
  echo $ac_n "(cached) $ac_c" 1>&6
else
6976
  case "$SDL_CONFIG" in
6977
  /*)
6978
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
6979 6980
  ;;
  ?:/*)			 
6981
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
6982 6983 6984
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
6985
  ac_dummy="$SDL_PATH"
6986 6987 6988
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
6989
      ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
6990 6991 6992 6993
      break
    fi
  done
  IFS="$ac_save_ifs"
6994
  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
6995 6996 6997
  ;;
esac
fi
6998 6999 7000
SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
if test -n "$SDL_CONFIG"; then
  echo "$ac_t""$SDL_CONFIG" 1>&6
7001 7002
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7003 7004
fi

7005
    SDL_HEADER="SDL/SDL.h"
7006
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7007 7008
  if test x${SDL_CONFIG} != xno
  then
7009
    PLUGINS="${PLUGINS} sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7010 7011
    CFLAGS_SDL="${CFLAGS_SDL} `${SDL_CONFIG} --cflags`"
    LIB_SDL="${LIB_SDL} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
Sam Hocevar's avatar
 
Sam Hocevar committed
7012 7013
    save_CPPFLAGS=$CPPFLAGS
    CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
7014
    for ac_hdr in ${SDL_HEADER}
7015
do
Sam Hocevar's avatar
 
Sam Hocevar committed
7016 7017
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7018
echo "configure:7019: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7019 7020 7021 7022
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7023
#line 7024 "configure"
7024
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7025 7026 7027
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7028
{ (eval echo configure:7029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7029 7030 7031 7032 7033 7034 7035
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
7036
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7037 7038
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7039
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7040
rm -f conftest*
7041
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7042 7043 7044 7045 7046
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
7047
EOF
7048 7049 7050 7051
 cat >> confdefs.h <<EOF
#define SDL_INCLUDE_FILE <${SDL_HEADER}>
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
7052 7053
else
  echo "$ac_t""no" 1>&6
7054 7055 7056 7057
{ echo "configure: error: The development package for SDL is not installed. 
Please install it and try again. Alternatively you can also configure with 
--disable-sdl." 1>&2; exit 1; }
      
7058 7059 7060
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
7061
    CPPFLAGS=$save_CPPFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
7062
    if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
7063
    then
7064 7065 7066
      { echo "configure: error: The development package for SDL is not installed.
Please install it and try again. Alternatively you can also configure with
--disable-sdl." 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7067
    fi
7068
  elif test "x$enable_sdl" =  "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7069
  then
7070 7071 7072
    { echo "configure: error: I couldn't find the SDL package. You can download libSDL
from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
    " 1>&2; exit 1; }
7073 7074
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7075

7076 7077 7078
# Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval="$enable_directx"
7079
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
7080 7081
fi

7082 7083
if test "x$enableval" != "xno"
then
Sam Hocevar's avatar
 
Sam Hocevar committed
7084
  if test x$SYS = xmingw32
7085
  then
Xavier Marchesini's avatar
 
Xavier Marchesini committed
7086 7087 7088
    # Check whether --with-directx or --without-directx was given.
if test "${with_directx+set}" = set; then
  withval="$with_directx"
Gildas Bazin's avatar
 
Gildas Bazin committed
7089 7090 7091
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7092
    if test "x$with_directx" = "x"
7093
    then
Gildas Bazin's avatar
 
Gildas Bazin committed
7094
      for ac_hdr in ddraw.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7095 7096 7097
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7098
echo "configure:7099: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7099 7100 7101 7102
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7103
#line 7104 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7104 7105 7106 7107
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7108
{ (eval echo configure:7109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
7128
  PLUGINS="${PLUGINS} directx"
Sam Hocevar's avatar
 
Sam Hocevar committed
7129
        LIB_DIRECTX="${LIB_DIRECTX} -lgdi32" 
Sam Hocevar's avatar
 
Sam Hocevar committed
7130 7131 7132 7133 7134
else
  echo "$ac_t""no" 1>&6
fi
done

7135 7136
    else
      echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7137
echo "configure:7138: checking for directX headers in ${withval}" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
7138
      if test -f ${withval}/ddraw.h
7139 7140
      then
        PLUGINS="${PLUGINS} directx"
Sam Hocevar's avatar
 
Sam Hocevar committed
7141
        LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
Gildas Bazin's avatar
 
Gildas Bazin committed
7142
        INCLUDE="${INCLUDE} -I${withval}"
7143
        echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7144
      else
7145
        echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7146
        { echo "configure: error: Cannot find ${withval}/ddraw.h!" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
7147
      fi
7148 7149
    fi
  fi
7150 7151
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7152 7153 7154
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
Gildas Bazin's avatar
 
Gildas Bazin committed
7155 7156 7157
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7158 7159 7160 7161 7162 7163
    if test x$enable_fb != xno
    then
      for ac_hdr in linux/fb.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7164
echo "configure:7165: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7165 7166 7167 7168
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7169
#line 7170 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7170 7171 7172 7173
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7174
{ (eval echo configure:7175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
Gildas Bazin's avatar
 
Gildas Bazin committed
7187
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
        PLUGINS="${PLUGINS} fb"
      
else
  echo "$ac_t""no" 1>&6
fi
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7201

Sam Hocevar's avatar
 
Sam Hocevar committed
7202 7203 7204 7205 7206 7207
    fi

# Check whether --enable-mga or --disable-mga was given.
if test "${enable_mga+set}" = set; then
  enableval="$enable_mga"
   if test x$enable_mga = xyes
Sam Hocevar's avatar
 
Sam Hocevar committed
7208
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
7209
      PLUGINS="${PLUGINS} mga xmga"
Sam Hocevar's avatar
 
Sam Hocevar committed
7210
    fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
7211 7212 7213
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247
# Check whether --enable-ggi or --disable-ggi was given.
if test "${enable_ggi+set}" = set; then
  enableval="$enable_ggi"
  :
fi

if test x$enable_ggi == xyes
then
  PLUGINS="${PLUGINS} ggi"
  LIB_GGI="${LIB_GGI} -lggi"
  # Check whether --with-ggi or --without-ggi was given.
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
   if test "x$with_val" != "xno" -a "x$with_val" != "x"
      then
        CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include"
        LIB_GGI="${LIB_GGI} -L$with_val/lib"
      fi 
fi

fi

# Check whether --enable-glide or --disable-glide was given.
if test "${enable_glide+set}" = set; then
  enableval="$enable_glide"
  :
fi

if test x$enable_glide == xyes
then
  PLUGINS="${PLUGINS} glide"
  LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
  CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
  # Check whether --with-glide or --without-glide was given.
Christophe Massiot's avatar
Christophe Massiot committed
7248 7249
if test "${with_glide+set}" = set; then
  withval="$with_glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
7250
   if test "x$with_val" != "xno" -a "x$with_val" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7251
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
7252 7253 7254
        CFLAGS_GLIDE="${CFLAGS_GLIDE} -I$with_val/include"
        LIB_GLIDE="${LIB_GLIDE} -L$with_val/lib"
      fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
7255 7256
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7257
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7258

Sam Hocevar's avatar
 
Sam Hocevar committed
7259 7260 7261 7262 7263

# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
7264 7265
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7266

Sam Hocevar's avatar
 
Sam Hocevar committed
7267 7268 7269 7270
# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
7271 7272
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7273

Sam Hocevar's avatar
 
Sam Hocevar committed
7274 7275 7276 7277 7278 7279 7280
if test x$enable_dsp != xno &&
  (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
then
  for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7281
echo "configure:7282: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7282 7283 7284 7285
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7286
#line 7287 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7287 7288 7289 7290
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7291
{ (eval echo configure:7292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
    PLUGINS="${PLUGINS} dsp"
    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7314
echo "configure:7315: checking for main in -lossaudio" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7315 7316 7317 7318 7319 7320 7321
ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lossaudio  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7322
#line 7323 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7323 7324 7325 7326 7327 7328
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7329
if { (eval echo configure:7330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIB_DSP="${LIB_DSP} -lossaudio"
else
  echo "$ac_t""no" 1>&6
fi

  
else
  echo "$ac_t""no" 1>&6
fi
done

fi

# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
  if test x$enable_esd = xyes
   then
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7365
echo "configure:7366: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ESD_CONFIG" in
  /*)
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
if test -n "$ESD_CONFIG"; then
  echo "$ac_t""$ESD_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

     if test x${ESD_CONFIG} != xno
7399
     then
Sam Hocevar's avatar
 
Sam Hocevar committed
7400 7401 7402
       PLUGINS="${PLUGINS} esd"
       CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
       LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
7403
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7404
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7405 7406
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7407

Sam Hocevar's avatar
 
Sam Hocevar committed
7408 7409 7410 7411 7412 7413 7414
# Check whether --enable-arts or --disable-arts was given.
if test "${enable_arts+set}" = set; then
  enableval="$enable_arts"
  if test x$enable_arts = xyes
   then
     # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
7415
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7416
echo "configure:7417: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7417
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
7418 7419
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
7420
  case "$ARTS_CONFIG" in
7421
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7422
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
7423 7424
  ;;
  ?:/*)			 
Sam Hocevar's avatar
 
Sam Hocevar committed
7425
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
7426 7427 7428 7429 7430 7431 7432
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7433
      ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
7434 7435 7436 7437
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7438
  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
7439 7440 7441
  ;;
esac
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7442 7443 7444
ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
if test -n "$ARTS_CONFIG"; then
  echo "$ac_t""$ARTS_CONFIG" 1>&6
7445 7446 7447 7448
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465
     if test x${ARTS_CONFIG} != xno
     then
       PLUGINS="${PLUGINS} arts"
       CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
       LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
     fi
   fi
fi


# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
  if test x$enable_alsa = xyes
   then
     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7466
echo "configure:7467: checking for alsa/asoundlib.h" >&5
7467 7468 7469 7470
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7471
#line 7472 "configure"
7472
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7473
#include <alsa/asoundlib.h>
7474 7475
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7476
{ (eval echo configure:7477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7492
  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7493
echo "configure:7494: checking for main in -lasound" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7494 7495 7496 7497 7498 7499 7500
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lasound  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7501
#line 7502 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7502 7503 7504 7505 7506
#include "confdefs.h"

int main() {
main()
; return 0; }
7507
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7508
if { (eval echo configure:7509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_alsa="true"
else
  echo "$ac_t""no" 1>&6
have_alsa="false"
fi

7529 7530
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7531
have_alsa="false"
7532 7533
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559
     if test x$have_alsa = xtrue
     then
       PLUGINS="${PLUGINS} alsa"
       LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
     fi
   fi
fi


# Check whether --enable-waveout or --disable-waveout was given.
if test "${enable_waveout+set}" = set; then
  enableval="$enable_waveout"
  :
fi

if test "x$enableval" != "xno" -a x$SYS = xmingw32
  then
    PLUGINS="${PLUGINS} waveout"
    LIB_WAVEOUT="-lwinmm"
fi


# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
Sam Hocevar's avatar
 
Sam Hocevar committed
7560 7561
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7562

Sam Hocevar's avatar
 
Sam Hocevar committed
7563 7564 7565
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
Sam Hocevar's avatar
 
Sam Hocevar committed
7566 7567
  :
fi
7568

Sam Hocevar's avatar
 
Sam Hocevar committed
7569 7570
if test x$enable_gtk != xno
then
7571 7572 7573 7574 7575 7576 7577 7578 7579 7580
  GTK_PATH=$PATH
  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
if test "${with_gtk_config_path+set}" = set; then
  withval="$with_gtk_config_path"
   if test "x$withval" != "xno"
      then
        GTK_PATH=$withval:$PATH
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7581
  # look for gtk-config
Sam Hocevar's avatar
 
Sam Hocevar committed
7582 7583
  # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
7584
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7585
echo "configure:7586: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK12_CONFIG" in
  /*)
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$GTK_PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
if test -n "$GTK12_CONFIG"; then
  echo "$ac_t""$GTK12_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  GTK_CONFIG=${GTK12_CONFIG}
  if test x${GTK_CONFIG} = xno
  then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7624
echo "configure:7625: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7625 7626
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7627
else
Sam Hocevar's avatar
 
Sam Hocevar committed
7628 7629
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7630 7631
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7632 7633 7634
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7635
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
7636
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7637
  ac_dummy="$GTK_PATH"
Sam Hocevar's avatar
 
Sam Hocevar committed
7638 7639 7640 7641 7642 7643 7644 7645
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7646 7647 7648 7649
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7650
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7651
if test -n "$GTK_CONFIG"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7652
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7653
else
Sam Hocevar's avatar
 
Sam Hocevar committed
7654
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7655 7656
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7657 7658
  fi
  if test x${GTK_CONFIG} != xno
Sam Hocevar's avatar
 
Sam Hocevar committed
7659
  then
Sam Hocevar's avatar
 
Sam Hocevar committed
7660 7661 7662 7663
    if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
    then
      { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk." 1>&2; exit 1; }
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7664 7665
    CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
    LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
Sam Hocevar's avatar
 
Sam Hocevar committed
7666 7667 7668 7669 7670
    # now look for the gtk.h header
    saved_CPPFLAGS=$CPPFLAGS
    CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
    ac_cv_gtk_headers=yes
    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7671 7672 7673
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7674
echo "configure:7675: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7675 7676 7677 7678
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7679
#line 7680 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7680 7681 7682 7683
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7684
{ (eval echo configure:7685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7707
ac_cv_gtk_headers=no
Sam Hocevar's avatar
 
Sam Hocevar committed
7708 7709
      echo "Cannot find gtk development headers."
    
Sam Hocevar's avatar
 
Sam Hocevar committed
7710 7711 7712
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
7713 7714 7715 7716 7717 7718
    if test "x$ac_cv_gtk_headers" = xyes
    then
      PLUGINS="${PLUGINS} gtk"
      ALIASES="${ALIASES} gvlc"
    fi
    CPPFLAGS=$saved_CPPFLAGS
7719
  fi
7720
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7721

Sam Hocevar's avatar
 
Sam Hocevar committed
7722 7723 7724 7725 7726 7727 7728 7729
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
  if test x$enable_gnome = xyes; then
    # look for gnome-config
    # Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7730
echo "configure:7731: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GNOME_CONFIG" in
  /*)
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
  ;;
esac
fi
GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
if test -n "$GNOME_CONFIG"; then
  echo "$ac_t""$GNOME_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7761
fi
Henri Fallon's avatar
 
Henri Fallon committed
7762

Sam Hocevar's avatar
 
Sam Hocevar committed
7763 7764 7765 7766 7767 7768 7769 7770 7771
    if test -x ${GNOME_CONFIG}
    then
       CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
       LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
    fi
    # now look for the gnome.h header
    saved_CPPFLAGS=$CPPFLAGS
    CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
    for ac_hdr in gnome.h
7772
do
Sam Hocevar's avatar
 
Sam Hocevar committed
7773 7774
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7775
echo "configure:7776: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7776 7777 7778 7779
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7780
#line 7781 "configure"
7781
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7782 7783 7784
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7785
{ (eval echo configure:7786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7786 7787 7788 7789 7790 7791 7792
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
7793
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7794 7795
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7796
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7797
rm -f conftest*
7798
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7799 7800 7801 7802 7803
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
7804
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7805
 
Sam Hocevar's avatar
 
Sam Hocevar committed
7806 7807 7808
      PLUGINS="${PLUGINS} gnome"
      ALIASES="${ALIASES} gnome-vlc"
     
Sam Hocevar's avatar
 
Sam Hocevar committed
7809 7810
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7811 7812 7813
{ echo "configure: error: Can't find gnome headers. Please install the gnome
developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
     
7814 7815 7816
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
7817 7818 7819
  
    CPPFLAGS=$saved_CPPFLAGS
  fi
7820
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7821

Sam Hocevar's avatar
 
Sam Hocevar committed
7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837

# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
  if test x$enable_qt = xyes; then
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
     LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
     CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7838
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7839

Sam Hocevar's avatar
 
Sam Hocevar committed
7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865

# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
  if test x$enable_kde = xyes; then
     PLUGINS="${PLUGINS} kde"
     ALIASES="${ALIASES} kvlc"
     LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
     CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
     CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
fi


# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
  if test x$enable_macosx = xyes
   then
     BUILTINS="${BUILTINS} macosx"
7866
     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
Sam Hocevar's avatar
 
Sam Hocevar committed
7867 7868 7869 7870 7871
     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
     LIB="${LIB} -ObjC"
   fi
else
  for ac_hdr in Cocoa/Cocoa.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7872
do
Sam Hocevar's avatar
 
Sam Hocevar committed
7873 7874
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7875
echo "configure:7876: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7876 7877 7878 7879
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7880
#line 7881 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7881
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7882 7883 7884
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7885
{ (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7886 7887 7888 7889 7890 7891 7892
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7893
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7894 7895
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7896
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7897
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7898
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7899 7900 7901 7902 7903
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Sam Hocevar's avatar
 
Sam Hocevar committed
7904
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7905
 BUILTINS="${BUILTINS} macosx"
7906
     LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
Sam Hocevar's avatar
 
Sam Hocevar committed
7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929
     CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
     LIB="${LIB} -ObjC"
   
else
  echo "$ac_t""no" 1>&6
fi
done

fi


# Check whether --enable-qnx or --disable-qnx was given.
if test "${enable_qnx+set}" = set; then
  enableval="$enable_qnx"
  :
fi

    if test x$enable_qnx != xno
    then
      for ac_hdr in Ph.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7930
echo "configure:7931: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7931
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7932 7933
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
7934
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7935
#line 7936 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7936
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7937
#include <$ac_hdr>
Sam Hocevar's avatar
 
Sam Hocevar committed
7938
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
7939
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
7940
{ (eval echo configure:7941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7941 7942
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7943
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7944
  eval "ac_cv_header_$ac_safe=yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7945
else
Sam Hocevar's avatar
 
Sam Hocevar committed
7946
  echo "$ac_err" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7947 7948 7949
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7950
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7951 7952 7953
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7954
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
7955
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7956 7957 7958 7959 7960 7961 7962 7963
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
        PLUGINS="${PLUGINS} qnx"
        LIB_QNX="${LIB_QNX} -lasound -lph"
      
Sam Hocevar's avatar
 
Sam Hocevar committed
7964 7965 7966
else
  echo "$ac_t""no" 1>&6
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7967
done
Sam Hocevar's avatar
 
Sam Hocevar committed
7968

Sam Hocevar's avatar
 
Sam Hocevar committed
7969 7970 7971 7972 7973 7974 7975 7976 7977
    fi

# Check whether --enable-win32 or --disable-win32 was given.
if test "${enable_win32+set}" = set; then
  enableval="$enable_win32"
   if test "x$enableval" != "xno"
    then
      PLUGINS="${PLUGINS} win32"
    fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
7978
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7979

Sam Hocevar's avatar
 
Sam Hocevar committed
7980 7981 7982 7983 7984 7985 7986 7987

# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
  if test x$enable_ncurses = xyes; then
     PLUGINS="${PLUGINS} ncurses"
     LIB_NCURSES="${LIB_NCURSES} -lncurses"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7988
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7989

Sam Hocevar's avatar
 
Sam Hocevar committed
7990

7991 7992 7993 7994 7995 7996 7997 7998 7999 8000
# Check whether --enable-lirc or --disable-lirc was given.
if test "${enable_lirc+set}" = set; then
  enableval="$enable_lirc"
  :
fi

if test x$enable_lirc = xyes
then
  ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8001
echo "configure:8002: checking for lirc/lirc_client.h" >&5
8002 8003 8004 8005
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8006
#line 8007 "configure"
8007 8008 8009 8010
#include "confdefs.h"
#include <lirc/lirc_client.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
8011
{ (eval echo configure:8012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8028
echo "configure:8029: checking for lirc_init in -llirc_client" >&5
8029 8030 8031 8032 8033 8034 8035
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-llirc_client  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8036
#line 8037 "configure"
8037 8038 8039 8040 8041 8042 8043 8044 8045 8046
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char lirc_init();

int main() {
lirc_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8047
if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_lirc="true"
else
  echo "$ac_t""no" 1>&6
have_lirc="false"
fi

else
  echo "$ac_t""no" 1>&6
have_lirc="false"
fi

  if test x$have_lirc = xtrue
  then
    PLUGINS="${PLUGINS} lirc"
    LIB_LIRC="${LIB_LIRC} -llirc_client"
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103
fi

# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
  :
fi


# Check whether --with-words or --without-words was given.
if test "${with_words+set}" = set; then
  withval="$with_words"
  :
fi

  case "x$withval" in
    xbig)
      ac_cv_c_bigendian=yes
      ;;
    xlittle)
      ac_cv_c_bigendian=no
      ;;
    *)
                  echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8104
echo "configure:8105: checking whether the byte order is big-endian" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8105
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8106 8107
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188
  ac_cv_c_bigendian=unknown
        cat >conftest.c <<EOF
        short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
        short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
        void _a(void) { char*s = (char*)am; s = (char *)ai; }
        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
        void _e(void) { char*s = (char*)em; s = (char*)ei; }
        int main(void) { _a(); _e(); return 0; }
EOF
        
        if test -f conftest.c
        then 
          if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
              && test -f conftest.o
          then
            if test "`strings conftest.o | grep BIGenDianSyS`"
            then
              ac_cv_c_bigendian=yes
            fi
            if test "`strings conftest.o | grep LiTTleEnDian`"
            then
              ac_cv_c_bigendian=no
            fi
          fi
        fi
      
fi

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
      if test x$ac_cv_c_bigendian = xunknown
      then
        { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
      fi
      ;;
  esac
if test $ac_cv_c_bigendian = yes
then
  cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF

fi

DLL_PATH=.
# Check whether --with-dll-path or --without-dll-path was given.
if test "${with_dll_path+set}" = set; then
  withval="$with_dll_path"
   if test "x$withval" != "xno"
    then
      DLL_PATH=$withval
    fi 
fi


GPROF=0
# Check whether --enable-gprof or --disable-gprof was given.
if test "${enable_gprof+set}" = set; then
  enableval="$enable_gprof"
   if test x$enableval = xyes; then GPROF=1; fi 
fi


CPROF=0
# Check whether --enable-cprof or --disable-cprof was given.
if test "${enable_cprof+set}" = set; then
  enableval="$enable_cprof"
   if test x$enableval = xyes;
  then
    LIB="${LIB} -lcprof"
    CPROF=1
  fi

fi


# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
   if test x$enableval = xyes; then
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8189
echo "configure:8190: checking for pth_init in -lpth" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8190 8191 8192 8193 8194 8195 8196
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpth  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8197
#line 8198 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8198
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8199 8200 8201 8202 8203 8204 8205 8206
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
8207
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8208
if { (eval echo configure:8209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8209
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8210
  eval "ac_cv_lib_$ac_lib_var=yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8211 8212
else
  echo "configure: failed program was:" >&5
Henri Fallon's avatar
 
Henri Fallon committed
8213
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8214
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8215
  eval "ac_cv_lib_$ac_lib_var=no"
Henri Fallon's avatar
 
Henri Fallon committed
8216
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8217
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8218 8219
LIBS="$ac_save_LIBS"

Henri Fallon's avatar
 
Henri Fallon committed
8220
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8221
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8222
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235
    ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lpth $LIBS"

else
  echo "$ac_t""no" 1>&6
fi

    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8236
#line 8237 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261
#include "confdefs.h"
#include <pth.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
#define PTH_INIT_IN_PTH_H 1
EOF

    THREAD_LIB="-lpth"
    fi
fi
rm -f conftest*


fi


# Check whether --enable-st or --disable-st was given.
if test "${enable_st+set}" = set; then
  enableval="$enable_st"
   if test x$enableval = xyes; then
    echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8262
echo "configure:8263: checking for st_init in -lst" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8263
ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
Sam Hocevar's avatar
 
Sam Hocevar committed
8264 8265
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
8266
else
Sam Hocevar's avatar
 
Sam Hocevar committed
8267
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8268
LIBS="-lst  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8269
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8270
#line 8271 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8271
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8272 8273 8274 8275
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char st_init();
Henri Fallon's avatar
 
Henri Fallon committed
8276

Sam Hocevar's avatar
 
Sam Hocevar committed
8277
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
8278
st_init()
Sam Hocevar's avatar
 
Sam Hocevar committed
8279 8280
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8281
if { (eval echo configure:8282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8296 8297 8298 8299 8300 8301 8302
    ac_tr_lib=HAVE_LIB`echo st | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lst $LIBS"
Henri Fallon's avatar
 
Henri Fallon committed
8303 8304

else
Sam Hocevar's avatar
 
Sam Hocevar committed
8305
  echo "$ac_t""no" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
8306
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8307

Sam Hocevar's avatar
 
Sam Hocevar committed
8308
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8309
#line 8310 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322
#include "confdefs.h"
#include <st.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "st_init" >/dev/null 2>&1; then
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
#define ST_INIT_IN_ST_H 1
EOF

    THREAD_LIB="-lst"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8323
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8324
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8325

Sam Hocevar's avatar
 
Sam Hocevar committed
8326

8327 8328
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8329 8330 8331

LIB="${LIB} ${THREAD_LIB}"

8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342
# Check whether --enable-plugins or --disable-plugins was given.
if test "${enable_plugins+set}" = set; then
  enableval="$enable_plugins"
  if test x$enable_plugins = xno
   then
     BUILTINS="${BUILTINS} ${PLUGINS}"
     PLUGINS=
   fi
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366
cat >> confdefs.h <<EOF
#define VERSION_MESSAGE "vlc $VLC_VERSION $VLC_CODENAME Copyright 1996-2001 VideoLAN\n"
EOF

cat >> confdefs.h <<EOF
#define COPYRIGHT_MESSAGE "VideoLAN Client - version $VLC_VERSION $VLC_CODENAME - (c) 1996-2002 VideoLAN"
EOF


VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
cat >> confdefs.h <<EOF
#define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
EOF

cat >> confdefs.h <<EOF
#define MODULE_SYMBOL $VLC_SYMBOL
EOF


DATA_PATH="${ac_tool_prefix}/share/videolan"

PLUGIN_PATH="${ac_tool_prefix}/share/videolan"


8367

8368 8369 8370 8371 8372





Henri Fallon's avatar
 
Henri Fallon committed
8373 8374 8375



Christophe Massiot's avatar
Christophe Massiot committed
8376 8377 8378



Sam Hocevar's avatar
 
Sam Hocevar committed
8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392














Sam Hocevar's avatar
 
Sam Hocevar committed
8393

Sam Hocevar's avatar
 
Sam Hocevar committed
8394

Sam Hocevar's avatar
 
Sam Hocevar committed
8395 8396 8397 8398




Sam Hocevar's avatar
 
Sam Hocevar committed
8399

Sam Hocevar's avatar
 
Sam Hocevar committed
8400 8401


8402

Sam Hocevar's avatar
 
Sam Hocevar committed
8403

Sam Hocevar's avatar
 
Sam Hocevar committed
8404

Sam Hocevar's avatar
 
Sam Hocevar committed
8405

Sam Hocevar's avatar
 
Sam Hocevar committed
8406

Sam Hocevar's avatar
 
Sam Hocevar committed
8407

Sam Hocevar's avatar
 
Sam Hocevar committed
8408 8409 8410



Sam Hocevar's avatar
 
Sam Hocevar committed
8411

Sam Hocevar's avatar
 
Sam Hocevar committed
8412

Sam Hocevar's avatar
 
Sam Hocevar committed
8413

Sam Hocevar's avatar
 
Sam Hocevar committed
8414

Sam Hocevar's avatar
 
Sam Hocevar committed
8415

Sam Hocevar's avatar
 
Sam Hocevar committed
8416 8417


8418

Sam Hocevar's avatar
 
Sam Hocevar committed
8419

Sam Hocevar's avatar
 
Sam Hocevar committed
8420 8421 8422



8423 8424


Sam Hocevar's avatar
 
Sam Hocevar committed
8425 8426 8427



Stéphane Borel's avatar
Stéphane Borel committed
8428 8429 8430



8431

8432

8433

Sam Hocevar's avatar
 
Sam Hocevar committed
8434 8435 8436 8437 8438 8439 8440 8441 8442









8443

Sam Hocevar's avatar
 
Sam Hocevar committed
8444 8445


Sam Hocevar's avatar
 
Sam Hocevar committed
8446 8447 8448



Gildas Bazin's avatar
 
Gildas Bazin committed
8449

Sam Hocevar's avatar
 
Sam Hocevar committed
8450 8451


Sam Hocevar's avatar
 
Sam Hocevar committed
8452

Gildas Bazin's avatar
 
Gildas Bazin committed
8453

Gildas Bazin's avatar
 
Gildas Bazin committed
8454

Sam Hocevar's avatar
 
Sam Hocevar committed
8455

Sam Hocevar's avatar
 
Sam Hocevar committed
8456 8457


Sam Hocevar's avatar
 
Sam Hocevar committed
8458

8459

Sam Hocevar's avatar
 
Sam Hocevar committed
8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505

trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
8506
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8507
rm -f confcache
8508

Sam Hocevar's avatar
 
Sam Hocevar committed
8509
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Sam Hocevar's avatar
 
Sam Hocevar committed
8510

Sam Hocevar's avatar
 
Sam Hocevar committed
8511 8512 8513
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8514

Sam Hocevar's avatar
 
Sam Hocevar committed
8515 8516 8517 8518 8519 8520 8521 8522 8523 8524
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H
8525

Sam Hocevar's avatar
 
Sam Hocevar committed
8526 8527
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
8528

Sam Hocevar's avatar
 
Sam Hocevar committed
8529 8530 8531 8532 8533 8534 8535 8536
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8537
#
Sam Hocevar's avatar
 
Sam Hocevar committed
8538
# $0 $ac_configure_args
8539
#
Sam Hocevar's avatar
 
Sam Hocevar committed
8540 8541
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
8542

Sam Hocevar's avatar
 
Sam Hocevar committed
8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
Sam Hocevar's avatar
 
Sam Hocevar committed
8561

Sam Hocevar's avatar
 
Sam Hocevar committed
8562
trap 'rm -fr `echo "Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8563
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8564
cat >> $CONFIG_STATUS <<EOF
8565

Sam Hocevar's avatar
 
Sam Hocevar committed
8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
8599 8600 8601 8602 8603 8604 8605 8606 8607 8608
s%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8609
s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8610 8611 8612 8613
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635
s%@ALLOCA@%$ALLOCA%g
s%@GLIBC21@%$GLIBC21%g
s%@LIBICONV@%$LIBICONV%g
s%@USE_NLS@%$USE_NLS%g
s%@MSGFMT@%$MSGFMT%g
s%@GMSGFMT@%$GMSGFMT%g
s%@XGETTEXT@%$XGETTEXT%g
s%@INTLBISON@%$INTLBISON%g
s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
s%@CATALOGS@%$CATALOGS%g
s%@CATOBJEXT@%$CATOBJEXT%g
s%@GMOFILES@%$GMOFILES%g
s%@INTLLIBS@%$INTLLIBS%g
s%@INTLOBJS@%$INTLOBJS%g
s%@POFILES@%$POFILES%g
s%@POSUB@%$POSUB%g
s%@DATADIRNAME@%$DATADIRNAME%g
s%@INSTOBJEXT@%$INSTOBJEXT%g
s%@GENCAT@%$GENCAT%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8636 8637 8638
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
8639
s%@WINDRES@%$WINDRES%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8640
s%@SDL12_CONFIG@%$SDL12_CONFIG%g
8641 8642
s%@SDL11_CONFIG@%$SDL11_CONFIG%g
s%@SDL_CONFIG@%$SDL_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8643 8644
s%@ESD_CONFIG@%$ESD_CONFIG%g
s%@ARTS_CONFIG@%$ARTS_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8645
s%@GTK12_CONFIG@%$GTK12_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8646
s%@GTK_CONFIG@%$GTK_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8647
s%@GNOME_CONFIG@%$GNOME_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8648 8649
s%@DATA_PATH@%$DATA_PATH%g
s%@PLUGIN_PATH@%$PLUGIN_PATH%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8650 8651 8652 8653 8654 8655 8656
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
s%@BUILTINS@%$BUILTINS%g
s%@ALIASES@%$ALIASES%g
s%@INCLUDE@%$INCLUDE%g
s%@DEBUG@%$DEBUG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8657
s%@ASM@%$ASM%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8658 8659
s%@CPROF@%$CPROF%g
s%@GPROF@%$GPROF%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8660
s%@OPTIMS@%$OPTIMS%g
8661
s%@TUNING@%$TUNING%g
8662
s%@RELEASE@%$RELEASE%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8663
s%@MOC@%$MOC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8664
s%@DLL_PATH@%$DLL_PATH%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8665 8666
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8667 8668 8669
s%@VCD_DEVICE@%$VCD_DEVICE%g
s%@DVD_DEVICE@%$DVD_DEVICE%g
s%@PLDFLAGS@%$PLDFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8670
s%@SOFLAGS@%$SOFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8671 8672
s%@LIB@%$LIB%g
s%@LIB_ALSA@%$LIB_ALSA%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8673
s%@LIB_ARTS@%$LIB_ARTS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8674 8675
s%@LIB_BEOS@%$LIB_BEOS%g
s%@LIB_DARWIN@%$LIB_DARWIN%g
Gildas Bazin's avatar
 
Gildas Bazin committed
8676
s%@LIB_DIRECTX@%$LIB_DIRECTX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8677
s%@LIB_DSP@%$LIB_DSP%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8678
s%@LIB_DVD@%$LIB_DVD%g
Stéphane Borel's avatar
Stéphane Borel committed
8679
s%@LIB_DVDREAD@%$LIB_DVDREAD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8680
s%@LIB_ESD@%$LIB_ESD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8681
s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8682 8683 8684 8685
s%@LIB_GGI@%$LIB_GGI%g
s%@LIB_GLIDE@%$LIB_GLIDE%g
s%@LIB_GNOME@%$LIB_GNOME%g
s%@LIB_GTK@%$LIB_GTK%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8686
s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8687 8688 8689
s%@LIB_IMDCT@%$LIB_IMDCT%g
s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8690 8691
s%@LIB_IPV4@%$LIB_IPV4%g
s%@LIB_IPV6@%$LIB_IPV6%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8692
s%@LIB_KDE@%$LIB_KDE%g
Gildas Bazin's avatar
 
Gildas Bazin committed
8693
s%@LIB_A52@%$LIB_A52%g
Gildas Bazin's avatar
 
Gildas Bazin committed
8694
s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
8695
s%@LIB_LIBDVDREAD@%$LIB_LIBDVDREAD%g
8696
s%@LIB_LIRC@%$LIB_LIRC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8697
s%@LIB_MACOSX@%$LIB_MACOSX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8698
s%@LIB_MAD@%$LIB_MAD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8699
s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8700
s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8701
s%@LIB_NCURSES@%$LIB_NCURSES%g
Gildas Bazin's avatar
 
Gildas Bazin committed
8702
s%@LIB_QNX@%$LIB_QNX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8703
s%@LIB_QT@%$LIB_QT%g
Gildas Bazin's avatar
 
Gildas Bazin committed
8704
s%@LIB_RC@%$LIB_RC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8705
s%@LIB_SDL@%$LIB_SDL%g
8706
s%@LIB_VCD@%$LIB_VCD%g
Gildas Bazin's avatar
 
Gildas Bazin committed
8707
s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8708
s%@LIB_WIN32@%$LIB_WIN32%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8709 8710 8711
s%@LIB_X11@%$LIB_X11%g
s%@LIB_XVIDEO@%$LIB_XVIDEO%g
s%@CFLAGS_VLC@%$CFLAGS_VLC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8712
s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8713
s%@CFLAGS_DVD@%$CFLAGS_DVD%g
Stéphane Borel's avatar
Stéphane Borel committed
8714
s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8715
s%@CFLAGS_ESD@%$CFLAGS_ESD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8716 8717
s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8718
s%@CFLAGS_GTK@%$CFLAGS_GTK%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8719 8720 8721 8722
s%@CFLAGS_KDE@%$CFLAGS_KDE%g
s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8723
s%@CFLAGS_MAD@%$CFLAGS_MAD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8724
s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8725 8726
s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8727
s%@CFLAGS_QT@%$CFLAGS_QT%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8728
s%@CFLAGS_SDL@%$CFLAGS_SDL%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8729
s%@CFLAGS_WIN32@%$CFLAGS_WIN32%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8730
s%@CFLAGS_X11@%$CFLAGS_X11%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8731
s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8732 8733
s%@SRC_DVD_EXTRA@%$SRC_DVD_EXTRA%g
s%@SRC_DVDCSS_EXTRA@%$SRC_DVDCSS_EXTRA%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8734
s%@NEED_GETOPT@%$NEED_GETOPT%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8735
s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
Sam Hocevar's avatar
 
Sam Hocevar committed
8762
    else
Sam Hocevar's avatar
 
Sam Hocevar committed
8763
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8764
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8765 8766 8767
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
8768
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8769 8770 8771 8772 8773
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
8774

Sam Hocevar's avatar
 
Sam Hocevar committed
8775 8776
cat >> $CONFIG_STATUS <<EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
8777
CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts po/Makefile.in"}
8778
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8779 8780
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8781
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Sam Hocevar's avatar
 
Sam Hocevar committed
8782 8783 8784 8785
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
8786 8787
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
8788
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Sam Hocevar's avatar
 
Sam Hocevar committed
8789

Sam Hocevar's avatar
 
Sam Hocevar committed
8790 8791 8792 8793 8794 8795
  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8796
    # A "../" for each directory in $ac_dir_suffix.
Sam Hocevar's avatar
 
Sam Hocevar committed
8797
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8798 8799 8800 8801
  else
    ac_dir_suffix= ac_dots=
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8802 8803 8804 8805 8806
  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8807
  *) # Relative path.
Sam Hocevar's avatar
 
Sam Hocevar committed
8808 8809
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
8810 8811
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
8812 8813 8814
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8815 8816
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
8817 8818 8819 8820 8821 8822 8823 8824
  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac
8825

Sam Hocevar's avatar
 
Sam Hocevar committed
8826 8827 8828 8829 8830 8831 8832 8833 8834
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
8835 8836 8837 8838 8839

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
Sam Hocevar's avatar
 
Sam Hocevar committed
8840 8841 8842 8843 8844 8845 8846
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
8847
ac_uC=' '
Sam Hocevar's avatar
 
Sam Hocevar committed
8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/defs.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8863
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Sam Hocevar's avatar
 
Sam Hocevar committed
8864 8865 8866 8867
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
8868 8869
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
8870 8871 8872 8873 8874
  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in
8875 8876 8877

EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
8889
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8890 8891
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
8892 8893 8894 8895

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
Sam Hocevar's avatar
 
Sam Hocevar committed
8896 8897
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8898 8899
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
8900 8901
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
8902 8903

rm -f conftest.tail
Sam Hocevar's avatar
 
Sam Hocevar committed
8904
while :
8905
do
Sam Hocevar's avatar
 
Sam Hocevar committed
8906 8907 8908 8909 8910 8911
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8912
  echo 'CEOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8913 8914 8915 8916 8917 8918 8919
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
8920
done
Sam Hocevar's avatar
 
Sam Hocevar committed
8921 8922 8923 8924 8925 8926 8927 8928 8929 8930
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
8931
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
8932 8933
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8934
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8935 8936
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
8937
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8938 8939
    rm -f $ac_file
    mv conftest.h $ac_file
8940
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8941 8942
fi; done

8943
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8944
cat >> $CONFIG_STATUS <<EOF
8945

Sam Hocevar's avatar
 
Sam Hocevar committed
8946

Sam Hocevar's avatar
 
Sam Hocevar committed
8947 8948
EOF
cat >> $CONFIG_STATUS <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977
for ac_file in $CONFIG_FILES; do
        # Support "outfile[:infile[:infile...]]"
        case "$ac_file" in
          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
        esac
        # PO directories have a Makefile.in generated from Makefile.in.in.
        case "$ac_file" in */Makefile.in)
          # Adjust a relative srcdir.
          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
          # In autoconf-2.13 it is called $ac_given_srcdir.
          # In autoconf-2.50 it is called $srcdir.
          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
          case "$ac_given_srcdir" in
            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
            /*) top_srcdir="$ac_given_srcdir" ;;
            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
          esac
          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
            rm -f "$ac_dir/POTFILES"
            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
            test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
          fi
          ;;
        esac
      done
8978

Sam Hocevar's avatar
 
Sam Hocevar committed
8979
exit 0
8980 8981
EOF
chmod +x $CONFIG_STATUS
Sam Hocevar's avatar
 
Sam Hocevar committed
8982 8983 8984
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

8985

8986
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
8987 8988 8989 8990
global configuration
--------------------
system                : ${SYS}
architecture          : ${ARCH}
8991
optimizations         : ${OPTIMS}
8992 8993
tuning:               : ${TUNING}
release:              : ${RELEASE}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8994

Sam Hocevar's avatar
 
Sam Hocevar committed
8995 8996 8997
if test x${HAVE_VLC} = x1
then
  echo "
8998 8999 9000
vlc configuration
-----------------
vlc version           : ${VLC_VERSION}
9001
debug mode            : ${DEBUG}
Sam Hocevar's avatar
 
Sam Hocevar committed
9002
cprof/gprof support   : ${CPROF}/${GPROF}
Sam Hocevar's avatar
 
Sam Hocevar committed
9003
need builtin getopt   : ${NEED_GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
9004
built-in modules      :${BUILTINS}
9005
plug-in modules       :${PLUGINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9006 9007
vlc aliases           :${ALIASES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9008

Sam Hocevar's avatar
 
Sam Hocevar committed
9009
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
9010 9011
libdvdcss configuration
-----------------------
Sam Hocevar's avatar
 
Sam Hocevar committed
9012
can be built          : ${CAN_BUILD_LIBDVDCSS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9013 9014
will be built         : ${NEED_LIBDVDCSS}"
if test x${NEED_LIBDVDCSS} = x1
Sam Hocevar's avatar
 
Sam Hocevar committed
9015
then
Sam Hocevar's avatar
 
Sam Hocevar committed
9016
  echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
Sam Hocevar's avatar
 
Sam Hocevar committed
9017 9018 9019
  echo "link statically       : ${STATIC_LIBDVDCSS}"
else
  echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
9020 9021 9022
fi

echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
9023 9024 9025 9026 9027
You may now tune Makefile.opts at your convenience, for instance to choose
which modules get compiled as plugins.
"
if test x${HAVE_VLC} = x1
then
Sam Hocevar's avatar
 
Sam Hocevar committed
9028
  echo "To build vlc and its plugins, type \`make'."
Sam Hocevar's avatar
 
Sam Hocevar committed
9029
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9030
if test x${NEED_LIBDVDCSS} = x1
Sam Hocevar's avatar
 
Sam Hocevar committed
9031 9032 9033 9034
then
  echo "To build libdvdcss only, type \`make libdvdcss'."
fi
echo ""
9035