configure 263 KB
Newer Older
1
#! /bin/sh
2

3
# Guess values for system-dependent variables and create Makefiles.
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.

10 11
# Defaults:
ac_help=
12
ac_default_prefix=/usr/local
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# Any additions from configure.in:
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"
ac_help="$ac_help
"
ac_help="$ac_help
Optimization options:"
ac_help="$ac_help
  --with-tuning=ARCH      enable special tuning for an architecture
                          (default i686 on IA-32 and 750 on PPC)"
ac_help="$ac_help
  --disable-optimizations disable compiler optimizations (default enabled)"
ac_help="$ac_help
Sam Hocevar's avatar
Sam Hocevar committed
30
  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)"
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
ac_help="$ac_help
  --enable-debug          debug mode (default disabled)"
ac_help="$ac_help
  --enable-release        activate extra optimizations (default disabled)"
ac_help="$ac_help
Input plugins:"
ac_help="$ac_help
  --enable-dvd            DVD input module (default enabled)"
ac_help="$ac_help
    --with-dvdcss=PATH    libdvdcss headers and libraries"
ac_help="$ac_help
    --with-dvdcss-tree=PATH libdvdcss tree for static linking"
ac_help="$ac_help
  --enable-dvdread        dvdread input module (default disabled)"
ac_help="$ac_help
    --with-dvdread=PATH   libdvdread headers and libraries"
ac_help="$ac_help
  --enable-dvbpsi        dvbpsi ts demux module (default disabled)"
ac_help="$ac_help
    --with-dvbpsi=PATH    libdvbpsi headers and libraries"
51 52
ac_help="$ac_help
    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking"
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
ac_help="$ac_help
  --enable-vcd            VCD support for Linux, FreeBSD and MacOS X (default enabled)"
ac_help="$ac_help
  --enable-satellite      satellite card support (default disabled)"
ac_help="$ac_help
  --enable-avi            AVI demux module (default enabled)"
ac_help="$ac_help
Codec plugins:"
ac_help="$ac_help
  --enable-mad            libmad module (default disabled)"
ac_help="$ac_help
    --with-mad=PATH       path to libmad"
ac_help="$ac_help
    --with-mad-tree=PATH  mad tree for static linking"
ac_help="$ac_help
  --enable-ffmpeg         ffmpeg codec (default disabled)"
69 70
ac_help="$ac_help
    --with-ffmpeg=PATH    path to ffmpeg installation"
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
ac_help="$ac_help
    --with-ffmpeg-tree=PATH ffmpeg tree for static linking"
ac_help="$ac_help
  --enable-a52            AC3 support with liba52 (default enabled)"
ac_help="$ac_help
    --with-a52-tree=PATH  a52dec tree for static linking "
ac_help="$ac_help
  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)"
ac_help="$ac_help
Video plugins:"
ac_help="$ac_help
  --enable-x11            X11 support (default enabled)"
ac_help="$ac_help
  --enable-xvideo         XVideo support (default enabled)"
ac_help="$ac_help
  --enable-sdl            SDL support (default enabled)"
ac_help="$ac_help
    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)"
ac_help="$ac_help
  --enable-directx        Win32 DirectX support (default enabled on Win32)"
ac_help="$ac_help
Gildas Bazin's avatar
 
Gildas Bazin committed
92
    --with-directx=PATH   Win32 DirectX headers"
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
ac_help="$ac_help
  --enable-fb             Linux framebuffer support (default enabled on Linux)"
ac_help="$ac_help
  --enable-mga            Linux kernel Matrox support (default disabled)"
ac_help="$ac_help
  --enable-ggi            GGI support (default disabled)"
ac_help="$ac_help
    --with-ggi=PATH       path to libggi"
ac_help="$ac_help
  --enable-glide          Glide (3dfx) support (default disabled)"
ac_help="$ac_help
    --with-glide=PATH     path to libglide"
ac_help="$ac_help
  --enable-aa             aalib output (default disabled)"
ac_help="$ac_help
Audio plugins:"
ac_help="$ac_help
  --enable-dsp            Linux /dev/dsp support (enabled on Linux)"
ac_help="$ac_help
  --enable-esd            Esound library support (default disabled)"
ac_help="$ac_help
  --enable-arts           aRts sound server (default disabled)"
ac_help="$ac_help
  --enable-alsa           ALSA sound support for Linux (default disabled)"
ac_help="$ac_help
  --enable-waveout        Win32 waveOut module (default enabled on Win32)"
ac_help="$ac_help
Interface plugins:"
ac_help="$ac_help
  --enable-gtk            Gtk+ support (default enabled)"
ac_help="$ac_help
    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)"
ac_help="$ac_help
  --enable-gnome          Gnome interface support (default disabled)"
ac_help="$ac_help
  --enable-qt             Qt interface support (default disabled)"
ac_help="$ac_help
  --enable-kde            KDE interface support (default disabled)"
ac_help="$ac_help
  --enable-macosx         MacOS X support (default enabled on MacOS X)"
ac_help="$ac_help
  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)"
ac_help="$ac_help
  --enable-intfwin        Win32 interface support (default disabled)"
ac_help="$ac_help
    --with-bcbuilder=PATH Borland C++ Builder installation path"
ac_help="$ac_help
  --enable-ncurses        ncurses interface support (default disabled)"
ac_help="$ac_help
142 143 144 145 146 147 148
  --enable-xosd           xosd interface support (default disabled)"
ac_help="$ac_help
  --enable-lirc           lirc support (default disabled)"
ac_help="$ac_help
Misc options:"
ac_help="$ac_help
  --with-words=endianness set endianness (big or little)"
149 150 151 152 153 154 155 156
ac_help="$ac_help
  --enable-gprof          gprof profiling (default disabled)"
ac_help="$ac_help
  --enable-cprof          cprof profiling (default disabled)"
ac_help="$ac_help
  --enable-pth            GNU Pth support (default disabled)"
ac_help="$ac_help
  --enable-st             State Threads (default disabled)"
157 158
ac_help="$ac_help
  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)"
159 160
ac_help="$ac_help
  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
161 162 163 164

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
165 166
build=NONE
cache_file=./config.cache
167
exec_prefix=NONE
168
host=NONE
169
no_create=
170
nonopt=NONE
171 172 173 174 175 176 177 178
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
179
target=NONE
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
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'

196 197 198 199 200 201 202
# 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

203 204 205
ac_prev=
for ac_option
do
206

207 208 209 210 211 212 213
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

214 215 216 217
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
218 219 220

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

221
  case "$ac_option" in
222 223 224 225

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
226
    bindir="$ac_optarg" ;;
227 228

  -build | --build | --buil | --bui | --bu)
229
    ac_prev=build ;;
230
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
231
    build="$ac_optarg" ;;
232 233 234 235 236 237

  -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=*)
238
    cache_file="$ac_optarg" ;;
239 240 241 242 243

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
244
    datadir="$ac_optarg" ;;
245 246

  -disable-* | --disable-*)
247
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
248
    # Reject names that are not valid shell variable names.
249 250 251 252 253
    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" ;;
254 255

  -enable-* | --enable-*)
256
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
257
    # Reject names that are not valid shell variable names.
258 259 260 261 262 263
    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
      *=*) ;;
264 265
      *) ac_optarg=yes ;;
    esac
266
    eval "enable_${ac_feature}='$ac_optarg'" ;;
267 268 269 270 271 272 273 274

  -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=*)
275
    exec_prefix="$ac_optarg" ;;
276 277 278 279 280

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

281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334
  -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 ;;
335 336

  -host | --host | --hos | --ho)
337
    ac_prev=host ;;
338
  -host=* | --host=* | --hos=* | --ho=*)
339
    host="$ac_optarg" ;;
340 341 342 343 344 345

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
346
    includedir="$ac_optarg" ;;
347 348 349 350

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
351
    infodir="$ac_optarg" ;;
352 353 354 355

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
356
    libdir="$ac_optarg" ;;
357 358 359 360 361 362

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
363
    libexecdir="$ac_optarg" ;;
364 365 366 367 368 369 370 371

  -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=*)
372
    localstatedir="$ac_optarg" ;;
373 374 375 376

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
377
    mandir="$ac_optarg" ;;
378 379 380 381 382 383

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

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
384
  | --no-cr | --no-c)
385 386 387 388 389 390 391 392 393 394 395 396 397
    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=*)
398
    oldincludedir="$ac_optarg" ;;
399 400 401 402

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
403
    prefix="$ac_optarg" ;;
404 405 406 407 408 409

  -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=*)
410
    program_prefix="$ac_optarg" ;;
411 412 413 414 415 416

  -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=*)
417
    program_suffix="$ac_optarg" ;;
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433

  -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=*)
434
    program_transform_name="$ac_optarg" ;;
435 436 437 438 439 440 441 442 443

  -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=*)
444
    sbindir="$ac_optarg" ;;
445 446 447 448 449 450 451 452 453 454

  -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=*)
455
    sharedstatedir="$ac_optarg" ;;
456 457 458 459

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
460
    site="$ac_optarg" ;;
461 462 463 464

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
465
    srcdir="$ac_optarg" ;;
466 467 468 469 470 471

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
472
    sysconfdir="$ac_optarg" ;;
473 474

  -target | --target | --targe | --targ | --tar | --ta | --t)
475
    ac_prev=target ;;
476
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
477
    target="$ac_optarg" ;;
478 479 480 481

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

482 483 484
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
485 486

  -with-* | --with-*)
487
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
488
    # Reject names that are not valid shell variable names.
489 490 491
    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
492
    ac_package=`echo $ac_package| sed 's/-/_/g'`
493 494
    case "$ac_option" in
      *=*) ;;
495 496
      *) ac_optarg=yes ;;
    esac
497
    eval "with_${ac_package}='$ac_optarg'" ;;
498 499

  -without-* | --without-*)
500
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
501
    # Reject names that are not valid shell variable names.
502 503 504 505 506
    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" ;;
507 508 509 510 511 512 513 514 515 516

  --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=*)
517
    x_includes="$ac_optarg" ;;
518 519 520 521 522 523

  -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=*)
524
    x_libraries="$ac_optarg" ;;
525

526
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
527 528 529
    ;;

  *)
530 531 532 533 534 535 536
    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"
537 538 539 540 541 542
    ;;

  esac
done

if test -n "$ac_prev"; then
543
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
544
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
545

546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566
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
fi
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
567

568 569 570 571
# 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
572
do
573 574 575 576 577 578 579 580
  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" ;;
581 582 583
  esac
done

584 585 586 587 588 589 590 591 592
# 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
593

594 595 596 597
# 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
598

599 600 601
# 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.
ac_unique_file=include/main.h
602 603 604 605 606

# 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.
607 608 609
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
610 611 612 613 614 615 616 617 618
  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
619
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
620
  else
621
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
622 623
  fi
fi
624
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
625 626 627 628 629 630 631 632 633 634 635

# 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
636
    echo "loading site script $ac_site_file"
637 638 639 640 641
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
642 643
  echo "loading cache $cache_file"
  . $cache_file
644
else
645 646
  echo "creating cache $cache_file"
  > $cache_file
647 648 649
fi

ac_ext=c
650
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
651
ac_cpp='$CPP $CPPFLAGS'
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668
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
else
  ac_n= ac_c='\c' ac_t=
fi
669 670 671



672 673 674 675 676 677 678 679 680 681 682 683 684
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
685
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
686
fi
687 688 689
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.
Sam Hocevar's avatar
 
Sam Hocevar committed
690

691

692 693 694 695 696 697 698 699 700 701 702 703
# 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.
704 705 706

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
707 708 709 710 711 712 713 714 715 716 717 718
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


# Make sure we can run config.sub.
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
719
echo "configure:720: checking host system type" >&5
720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739

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

echo $ac_n "checking target system type""... $ac_c" 1>&6
740
echo "configure:741: checking target system type" >&5
741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757

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
758
echo "configure:759: checking build system type" >&5
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775

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" &&
776 777 778 779
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

780

Sam Hocevar's avatar
Sam Hocevar committed
781 782
CONFIGURE_LINE="$0 $*"

Sam Hocevar's avatar
 
Sam Hocevar committed
783
PACKAGE="vlc"
Sam Hocevar's avatar
Sam Hocevar committed
784 785
VERSION="0.5.0-cvs"
CODENAME="Natalya"
Sam Hocevar's avatar
 
Sam Hocevar committed
786

787
save_CPPFLAGS="${CPPFLAGS}"
Sam Hocevar's avatar
Sam Hocevar committed
788
save_CFLAGS="${CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
789
save_LDFLAGS="${LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
790

791
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
792
echo "configure:793: checking whether ${MAKE-make} sets \${MAKE}" >&5
793 794 795
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
796
else
797
  cat > conftestmake <<\EOF
798 799
all:
	@echo 'ac_maketemp="${MAKE}"'
800
EOF
801
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
802
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
803 804 805 806 807
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
808
rm -f conftestmake
809 810
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
811
  echo "$ac_t""yes" 1>&6
812 813
  SET_MAKE=
else
814
  echo "$ac_t""no" 1>&6
815 816 817
  SET_MAKE="MAKE=${MAKE-make}"
fi

818 819 820
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
821
echo "configure:822: checking for $ac_word" >&5
822 823
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
824 825 826 827
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
828 829 830 831 832 833 834 835 836 837
  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"
838 839
fi
fi
840
CC="$ac_cv_prog_CC"
841
if test -n "$CC"; then
842
  echo "$ac_t""$CC" 1>&6
843
else
844
  echo "$ac_t""no" 1>&6
845 846 847 848 849
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
850
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
851
echo "configure:852: checking for $ac_word" >&5
852 853
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
854 855 856 857
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
858
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
859
  ac_prog_rejected=no
860 861 862 863 864 865 866 867 868 869 870 871 872
  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"
873 874 875 876
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
877
  if test $# -gt 0; then
878 879 880 881
    # 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
882
    set dummy "$ac_dir/$ac_word" "$@"
883 884 885 886 887 888
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
889
CC="$ac_cv_prog_CC"
890
if test -n "$CC"; then
891
  echo "$ac_t""$CC" 1>&6
892
else
893
  echo "$ac_t""no" 1>&6
894 895
fi

896 897 898 899 900 901
  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
902
echo "configure:903: checking for $ac_word" >&5
903 904
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
905 906 907 908
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
909 910 911 912 913 914 915 916 917 918
  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"
919 920
fi
fi
921
CC="$ac_cv_prog_CC"
922
if test -n "$CC"; then
923
  echo "$ac_t""$CC" 1>&6
924
else
925
  echo "$ac_t""no" 1>&6
926
fi
927 928
 ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
929
  fi
930
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
931
fi
932

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

936 937 938 939 940 941
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
942

943
cat > conftest.$ac_ext << EOF
944

945
#line 946 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
946 947
#include "confdefs.h"

948 949
main(){return(0);}
EOF
950
if { (eval echo configure:951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
951 952 953 954
  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
955
  else
956
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
957
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
958
else
959 960 961
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
962
fi
963 964 965 966 967 968 969
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
Sam Hocevar's avatar
 
Sam Hocevar committed
970

971 972 973 974 975
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
976
echo "configure:977: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
977 978
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
Sam Hocevar's avatar
 
Sam Hocevar committed
979

980
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
981
echo "configure:982: checking whether we are using GNU C" >&5
982 983
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
984
else
985 986 987
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
Sam Hocevar's avatar
 
Sam Hocevar committed
988
#endif
989
EOF
990
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
991
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
992
else
993
  ac_cv_prog_gcc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
994
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
995 996
fi

997
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
998

999 1000 1001 1002 1003
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1004

1005 1006 1007 1008
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1009
echo "configure:1010: checking whether ${CC-cc} accepts -g" >&5
1010 1011 1012 1013 1014
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1015 1016
  ac_cv_prog_cc_g=yes
else
1017
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1018
fi
1019 1020
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
1021
fi
1022 1023

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1024
if test "$ac_test_CFLAGS" = set; then
1025
  CFLAGS="$ac_save_CFLAGS"
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038
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
1039

1040
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1041
echo "configure:1042: checking how to run the C preprocessor" >&5
1042 1043 1044 1045 1046
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
1047 1048 1049 1050 1051 1052
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"
1053
  # On the NeXT, cc -E runs the code through the compiler's parser,
1054 1055
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
1056
#line 1057 "configure"
1057 1058
#include "confdefs.h"
#include <assert.h>
1059 1060 1061
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1062
{ (eval echo configure:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1063 1064
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
1065 1066
  :
else
1067 1068
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1069
  cat conftest.$ac_ext >&5
1070 1071 1072
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
1073
#line 1074 "configure"
1074 1075 1076 1077 1078
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1079
{ (eval echo configure:1080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1080 1081 1082
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
1083
else
1084 1085
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1086
  cat conftest.$ac_ext >&5
1087 1088 1089
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
1090
#line 1091 "configure"
1091 1092
#include "confdefs.h"
#include <assert.h>
1093 1094 1095
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1096
{ (eval echo configure:1097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1097 1098
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
1099 1100
  :
else
1101 1102
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1103
  cat conftest.$ac_ext >&5
1104 1105
  rm -rf conftest*
  CPP=/lib/cpp
Sam Hocevar's avatar
 
Sam Hocevar committed
1106
fi
1107
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1108
fi
1109 1110 1111 1112 1113 1114
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
Gildas Bazin's avatar
 
Gildas Bazin committed
1115
else
1116
  ac_cv_prog_CPP="$CPP"
Gildas Bazin's avatar
 
Gildas Bazin committed
1117
fi
1118
echo "$ac_t""$CPP" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1119

1120

1121 1122 1123 1124 1125
if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi
1126

1127
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
Gildas Bazin's avatar
 
Gildas Bazin committed
1128
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1129
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1130
echo "configure:1131: checking for $ac_word" >&5
1131 1132
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1133 1134 1135 1136
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1137 1138 1139 1140 1141 1142 1143 1144 1145 1146
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
1147 1148
fi
fi
1149
RANLIB="$ac_cv_prog_RANLIB"
Gildas Bazin's avatar
 
Gildas Bazin committed
1150
if test -n "$RANLIB"; then
1151
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1152
else
1153
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1154 1155
fi

1156

Gildas Bazin's avatar
 
Gildas Bazin committed
1157
if test -z "$ac_cv_prog_RANLIB"; then
1158
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
1159 1160
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
1161
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1162
echo "configure:1163: checking for $ac_word" >&5
1163 1164
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1165
else
1166 1167
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
1168
else
1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179
  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=":"
Gildas Bazin's avatar
 
Gildas Bazin committed
1180 1181
fi
fi
1182 1183 1184
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1185
else
1186
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1187 1188 1189
fi

else
1190 1191
  RANLIB=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
1192 1193
fi

1194
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
Sam Hocevar's avatar
 
Sam Hocevar committed
1195
set dummy ${ac_tool_prefix}strip; ac_word=$2
1196
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1197
echo "configure:1198: checking for $ac_word" >&5
1198 1199
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1200 1201 1202 1203
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
  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_STRIP="${ac_tool_prefix}strip"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
1214 1215
fi
fi
1216
STRIP="$ac_cv_prog_STRIP"
Sam Hocevar's avatar
 
Sam Hocevar committed
1217
if test -n "$STRIP"; then
1218
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1219
else
1220
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1221 1222
fi

1223

Sam Hocevar's avatar
 
Sam Hocevar committed
1224
if test -z "$ac_cv_prog_STRIP"; then
1225
if test -n "$ac_tool_prefix"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1226 1227
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
1228
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1229
echo "configure:1230: checking for $ac_word" >&5
1230 1231
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1232
else
1233 1234
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
1235
else
1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246
  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_STRIP="strip"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
Sam Hocevar's avatar
 
Sam Hocevar committed
1247 1248
fi
fi
1249 1250 1251
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1252
else
1253
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1254 1255 1256
fi

else
1257 1258
  STRIP=":"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1259 1260
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
1261

Christophe Massiot's avatar
Christophe Massiot committed
1262 1263
# Extract the first word of "gmake", so it can be a program name with args.
set dummy gmake; ac_word=$2
1264
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1265
echo "configure:1266: checking for $ac_word" >&5
1266 1267
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1268
else
1269 1270
  case "$GMAKE" in
  /*)
1271 1272
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
  ;;
1273 1274 1275
  ?:/*)			 
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
  ;;
1276
  *)
1277 1278 1279 1280 1281 1282 1283 1284 1285 1286
  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_GMAKE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Christophe Massiot's avatar
Christophe Massiot committed
1287 1288 1289 1290
  test -z "$ac_cv_path_GMAKE" && ac_cv_path_GMAKE="no"
  ;;
esac
fi
1291
GMAKE="$ac_cv_path_GMAKE"
Christophe Massiot's avatar
Christophe Massiot committed
1292
if test -n "$GMAKE"; then
1293
  echo "$ac_t""$GMAKE" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1294
else
1295
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1296 1297
fi

1298
if test "x${GMAKE}" = "xno"; then
1299
  echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
1300
echo "configure:1301: checking whether GNU make is installed" >&5
1301 1302
if eval "test \"`echo '$''{'ac_cv_gmake'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1303 1304 1305 1306 1307 1308 1309 1310 1311
else
  if make --version | grep -q -i gnu; then
         ac_cv_gmake="yes"
       else
         echo "This software needs you to install GNU make to compile properly."
         echo "You can get it from http://www.gnu.org/."
         exit
       fi
fi
1312 1313

echo "$ac_t""$ac_cv_gmake" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1314 1315 1316 1317 1318
  VLC_MAKE="make"
else
  VLC_MAKE="gmake"
fi

1319
ALL_LINGUAS="de en_GB fr ja no ru nl pl"
Sam Hocevar's avatar
Sam Hocevar committed
1320

1321
cat >> confdefs.h <<EOF
1322
#define VLC_PACKAGE "${PACKAGE}"
1323
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1324

1325
cat >> confdefs.h <<EOF
1326
#define VLC_VERSION "${VERSION}"
1327
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1328

1329 1330 1331
# 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
1332
echo "configure:1333: checking for $ac_word" >&5
1333 1334
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1335 1336 1337 1338
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349
  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=":"
Sam Hocevar's avatar
 
Sam Hocevar committed
1350 1351
fi
fi
1352
RANLIB="$ac_cv_prog_RANLIB"
Sam Hocevar's avatar
 
Sam Hocevar committed
1353
if test -n "$RANLIB"; then
1354
  echo "$ac_t""$RANLIB" 1>&6
1355
else
1356
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1357
fi
1358 1359


1360
        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1361
echo "configure:1362: checking for strerror in -lcposix" >&5
1362 1363 1364
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1365
else
1366
  ac_save_LIBS="$LIBS"
1367
LIBS="-lcposix  $LIBS"
1368
cat > conftest.$ac_ext <<EOF
1369
#line 1370 "configure"
1370 1371 1372
#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
1373 1374
    builtin and then its argument prototype would still apply.  */
char strerror();
Sam Hocevar's avatar
 
Sam Hocevar committed
1375

1376 1377 1378 1379
int main() {
strerror()
; return 0; }
EOF
1380
if { (eval echo configure:1381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
1391

1392 1393 1394 1395 1396 1397 1398
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
1399

1400
  
1401

1402
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1403
echo "configure:1404: checking for ANSI C header files" >&5
1404 1405
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1406
else
1407
  cat > conftest.$ac_ext <<EOF
1408
#line 1409 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1409 1410 1411 1412 1413
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
1414 1415
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1416
{ (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1417 1418 1419
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1420 1421
  ac_cv_header_stdc=yes
else
1422 1423
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1424
  cat conftest.$ac_ext >&5
1425
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1426 1427
  ac_cv_header_stdc=no
fi
1428
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1429 1430 1431

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1432
cat > conftest.$ac_ext <<EOF
1433
#line 1434 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1434 1435
#include "confdefs.h"
#include <string.h>
1436
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1437 1438 1439 1440
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
1441
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1442 1443 1444 1445 1446 1447 1448 1449
  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.
1450
cat > conftest.$ac_ext <<EOF
1451
#line 1452 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1452 1453
#include "confdefs.h"
#include <stdlib.h>
1454
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1455 1456 1457 1458
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
1459
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1460 1461 1462 1463 1464 1465 1466 1467
  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.
1468
if test "$cross_compiling" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1469 1470
  :
else
1471
  cat > conftest.$ac_ext <<EOF
1472
#line 1473 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1473 1474
#include "confdefs.h"
#include <ctype.h>
1475 1476
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1477
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1478 1479 1480 1481 1482
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
1483
if { (eval echo configure:1484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1484
then
Sam Hocevar's avatar
 
Sam Hocevar committed
1485 1486
  :
else
1487 1488 1489 1490
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1491
fi
1492
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1493
fi
1494

Sam Hocevar's avatar
 
Sam Hocevar committed
1495 1496
fi
fi
1497

1498 1499 1500
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1501
#define STDC_HEADERS 1
1502
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1503 1504 1505

fi

1506
echo $ac_n "checking for working const""... $ac_c" 1>&6
1507
echo "configure:1508: checking for working const" >&5
1508 1509 1510 1511
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
1512
#line 1513 "configure"
1513 1514 1515 1516 1517
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
1518
typedef int charset[2]; const charset x = {0,0};
1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538
/* 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;
Sam Hocevar's avatar
 
Sam Hocevar committed
1539
}
1540 1541 1542 1543
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
Sam Hocevar's avatar
 
Sam Hocevar committed
1544
}
1545 1546 1547 1548
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
Sam Hocevar's avatar
 
Sam Hocevar committed
1549
}
1550 1551 1552 1553 1554 1555 1556
{ /* 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;
1557
}
1558 1559 1560

; return 0; }
EOF
1561
if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1562
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1563 1564
  ac_cv_c_const=yes
else
1565 1566 1567 1568
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1569
fi
1570
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1571
fi
1572

1573 1574 1575 1576 1577
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1578 1579 1580

fi

1581
echo $ac_n "checking for inline""... $ac_c" 1>&6
1582
echo "configure:1583: checking for inline" >&5
1583 1584
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1585 1586 1587
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
1588
  cat > conftest.$ac_ext <<EOF
1589
#line 1590 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1590 1591
#include "confdefs.h"

1592
int main() {
1593
} int $ac_kw foo() {
1594 1595
; return 0; }
EOF
1596
if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1597
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1598 1599
  ac_cv_c_inline=$ac_kw; break
else
1600 1601
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1602
fi
1603
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1604 1605 1606
done

fi
1607 1608 1609

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
Sam Hocevar's avatar
 
Sam Hocevar committed
1610
  inline | yes) ;;
1611 1612 1613
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1614
 ;;
1615
  *)  cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1616
#define inline $ac_cv_c_inline
1617
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1618 1619 1620
 ;;
esac

1621
echo $ac_n "checking for off_t""... $ac_c" 1>&6
1622
echo "configure:1623: checking for off_t" >&5
1623 1624
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1625
else
1626
  cat > conftest.$ac_ext <<EOF
1627
#line 1628 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1628
#include "confdefs.h"
1629 1630 1631 1632
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1633
#endif
1634 1635 1636 1637
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*
Sam Hocevar's avatar
 
Sam Hocevar committed
1638 1639
  ac_cv_type_off_t=yes
else
1640 1641
  rm -rf conftest*
  ac_cv_type_off_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1642
fi
1643
rm -f conftest*
1644

1645 1646 1647 1648
fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1649
#define off_t long
1650
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1651 1652 1653

fi

1654
echo $ac_n "checking for size_t""... $ac_c" 1>&6
1655
echo "configure:1656: checking for size_t" >&5
1656 1657
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1658
else
1659
  cat > conftest.$ac_ext <<EOF
1660
#line 1661 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1661
#include "confdefs.h"
1662 1663 1664 1665
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1666
#endif
1667 1668 1669 1670
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*
Sam Hocevar's avatar
 
Sam Hocevar committed
1671 1672
  ac_cv_type_size_t=yes
else
1673 1674
  rm -rf conftest*
  ac_cv_type_size_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1675
fi
1676
rm -f conftest*
1677

1678 1679 1680 1681
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1682
#define size_t unsigned
1683
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1684 1685 1686 1687 1688

fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
1689
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1690
echo "configure:1691: checking for working alloca.h" >&5
1691 1692
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1693
else
1694
  cat > conftest.$ac_ext <<EOF
1695
#line 1696 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1696 1697
#include "confdefs.h"
#include <alloca.h>
1698
int main() {
1699
void *p = alloca(2 * sizeof(int));
1700 1701
; return 0; }
EOF
1702
if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716
  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
Sam Hocevar's avatar
 
Sam Hocevar committed
1717
#define HAVE_ALLOCA_H 1
1718
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1719 1720 1721

fi

1722
echo $ac_n "checking for alloca""... $ac_c" 1>&6
1723
echo "configure:1724: checking for alloca" >&5
1724 1725
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1726
else
1727
  cat > conftest.$ac_ext <<EOF
1728
#line 1729 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1729
#include "confdefs.h"
1730

Sam Hocevar's avatar
 
Sam Hocevar committed
1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751
#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

1752 1753 1754 1755
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
1756
if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1757
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1758 1759
  ac_cv_func_alloca_works=yes
else
1760 1761 1762 1763
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_alloca_works=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1764
fi
1765
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1766 1767
fi

1768
echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1769
if test $ac_cv_func_alloca_works = yes; then
1770
  cat >> confdefs.h <<\EOF
1771
#define HAVE_ALLOCA 1
1772
EOF
1773

1774
fi
1775

1776 1777 1778 1779 1780 1781 1782
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1783
#define C_ALLOCA 1
1784
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1785 1786


1787
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1788
echo "configure:1789: checking whether alloca needs Cray hooks" >&5
1789 1790
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1791
else
1792
  cat > conftest.$ac_ext <<EOF
1793
#line 1794 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1794 1795 1796 1797 1798 1799 1800
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

1801
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1802 1803
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
1804
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1805 1806
  ac_cv_os_cray=yes
else
1807
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1808 1809 1810 1811 1812
  ac_cv_os_cray=no
fi
rm -f conftest*

fi
1813 1814

echo "$ac_t""$ac_cv_os_cray" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1815
if test $ac_cv_os_cray = yes; then
1816 1817
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1818
echo "configure:1819: checking for $ac_func" >&5
1819 1820
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1821
else
1822
  cat > conftest.$ac_ext <<EOF
1823
#line 1824 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1824 1825
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1826
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1827 1828 1829
#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
1830 1831 1832 1833
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1834 1835 1836 1837 1838 1839 1840

/* 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
1841
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1842 1843
#endif

1844 1845
; return 0; }
EOF
1846
if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860
  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
Sam Hocevar's avatar
 
Sam Hocevar committed
1861
#define CRAY_STACKSEG_END $ac_func
1862
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1863

1864 1865 1866
  break
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1867 1868
fi

1869
done
Sam Hocevar's avatar
 
Sam Hocevar committed
1870 1871
fi

1872
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1873
echo "configure:1874: checking stack direction for C alloca" >&5
1874 1875
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1876 1877 1878 1879
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
1880
  cat > conftest.$ac_ext <<EOF
1881
#line 1882 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896
#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 ()
{
1897
  exit (find_stack_direction() < 0);
Sam Hocevar's avatar
 
Sam Hocevar committed
1898
}
1899
EOF
1900
if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1901
then
Sam Hocevar's avatar
 
Sam Hocevar committed
1902 1903
  ac_cv_c_stack_direction=1
else
1904 1905 1906 1907
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
Sam Hocevar's avatar
 
Sam Hocevar committed
1908
fi
1909
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1910
fi
1911

Sam Hocevar's avatar
 
Sam Hocevar committed
1912 1913
fi

1914 1915
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1916
#define STACK_DIRECTION $ac_cv_c_stack_direction
1917
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1918 1919 1920

fi

1921
for ac_hdr in unistd.h
Sam Hocevar's avatar
 
Sam Hocevar committed
1922
do
1923 1924
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1925
echo "configure:1926: checking for $ac_hdr" >&5
1926 1927
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1928
else
1929
  cat > conftest.$ac_ext <<EOF
1930
#line 1931 "configure"
1931 1932 1933 1934
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1935
{ (eval echo configure:1936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1936 1937 1938 1939 1940 1941 1942
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
1943
  cat conftest.$ac_ext >&5
1944 1945
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
1946
fi
1947
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1948
fi
1949 1950 1951 1952 1953 1954 1955 1956 1957
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
1958 1959 1960 1961 1962
fi
done

for ac_func in getpagesize
do
1963
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1964
echo "configure:1965: checking for $ac_func" >&5
1965 1966
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1967
else
1968
  cat > conftest.$ac_ext <<EOF
1969
#line 1970 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1970 1971
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1972
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1973 1974 1975
#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
1976 1977 1978 1979
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1980 1981 1982 1983 1984 1985 1986

/* 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
1987
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1988 1989
#endif

1990 1991
; return 0; }
EOF
1992
if { (eval echo configure:1993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1993 1994 1995 1996 1997 1998 1999 2000 2001 2002
  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
2003

2004 2005 2006 2007 2008 2009 2010 2011 2012
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
2013 2014 2015
fi
done

2016
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2017
echo "configure:2018: checking for working mmap" >&5
2018 2019
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2020 2021 2022 2023
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
2024
  cat > conftest.$ac_ext <<EOF
2025
#line 2026 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039
#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
2040
   VM page cache was not coherent with the filesystem buffer cache
Sam Hocevar's avatar
 
Sam Hocevar committed
2041 2042
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
2043
   propogated back to all the places they're supposed to be.
Sam Hocevar's avatar
 
Sam Hocevar committed
2044 2045 2046 2047 2048

   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)  */
2049
#include <sys/types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2050 2051
#include <fcntl.h>
#include <sys/mman.h>
2052 2053 2054 2055 2056 2057
#include <stdlib.h>
#include <sys/stat.h>

#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
Sam Hocevar's avatar
 
Sam Hocevar committed
2058

2059
/* This mess was copied from the GNU getpagesize.h.  */
2060 2061
#ifndef HAVE_GETPAGESIZE

Sam Hocevar's avatar
 
Sam Hocevar committed
2062
/* Assume that all systems that can run configure have sys/param.h.  */
2063
# ifndef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2064 2065 2066 2067 2068 2069
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
2070
#  ifdef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096
#   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 */

2097 2098 2099 2100 2101 2102
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2103
int
2104
main()
Sam Hocevar's avatar
 
Sam Hocevar committed
2105
{
2106 2107 2108 2109 2110 2111 2112 2113 2114
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
2115
	data = (char*)malloc(pagesize);
2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135
	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);
2136
	data2 = (char*)malloc(2 * pagesize);
2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153
	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;
2154
	data3 = (char*)malloc(pagesize);
2155 2156 2157 2158 2159 2160 2161 2162 2163 2164
	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);
Sam Hocevar's avatar
 
Sam Hocevar committed
2165
}
2166 2167

EOF
2168
if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2169
then
Sam Hocevar's avatar
 
Sam Hocevar committed
2170 2171
  ac_cv_func_mmap_fixed_mapped=yes
else
2172 2173 2174 2175
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2176
fi
2177
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2178
fi
2179

Sam Hocevar's avatar
 
Sam Hocevar committed
2180
fi
2181

2182 2183 2184
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
Sam Hocevar's avatar
 
Sam Hocevar committed
2185
#define HAVE_MMAP 1
2186
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2187 2188 2189 2190

fi


2191
    echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
2192
echo "configure:2193: checking whether we are using the GNU C Library 2.1 or newer" >&5
2193 2194
if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2195
else
2196
  cat > conftest.$ac_ext <<EOF
2197
#line 2198 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2198 2199 2200 2201 2202 2203 2204 2205
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif
2206 2207
	
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2208 2209
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Lucky GNU user" >/dev/null 2>&1; then
2210
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2211 2212
  ac_cv_gnu_library_2_1=yes
else
2213
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2214 2215 2216 2217
  ac_cv_gnu_library_2_1=no
fi
rm -f conftest*

2218 2219
      
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2220 2221
fi

2222 2223
echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2224
    GLIBC21="$ac_cv_gnu_library_2_1"
2225
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2226

2227 2228
                                    
   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
Sam Hocevar's avatar
 
Sam Hocevar committed
2229 2230
stdlib.h string.h unistd.h sys/param.h
do
2231 2232
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2233
echo "configure:2234: checking for $ac_hdr" >&5
2234 2235
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2236
else
2237
  cat > conftest.$ac_ext <<EOF
2238
#line 2239 "configure"
2239 2240 2241 2242
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2243
{ (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2244 2245 2246 2247 2248 2249 2250
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
2251
  cat conftest.$ac_ext >&5
2252 2253
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
2254
fi
2255
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2256
fi
2257 2258 2259 2260 2261 2262 2263 2264 2265
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
2266 2267 2268
fi
done

2269
   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
Sam Hocevar's avatar
 
Sam Hocevar committed
2270 2271 2272
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
2273
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2274
echo "configure:2275: checking for $ac_func" >&5
2275 2276
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2277
else
2278
  cat > conftest.$ac_ext <<EOF
2279
#line 2280 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2280 2281
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2282
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2283 2284 2285
#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
2286 2287 2288 2289
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2290 2291 2292 2293 2294 2295 2296

/* 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
2297
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2298 2299
#endif

2300 2301
; return 0; }
EOF
2302
if { (eval echo configure:2303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2303 2304 2305 2306 2307 2308 2309 2310 2311 2312
  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
2313

2314 2315 2316 2317 2318 2319 2320 2321 2322
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
2323 2324 2325 2326
fi
done


2327 2328 2329
   
    
  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2330 2331
if test "${with_libiconv_prefix+set}" = set; then
  withval="$with_libiconv_prefix"
2332
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2333 2334 2335 2336
    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
2337 2338
   
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2339 2340


2341
  echo $ac_n "checking for iconv""... $ac_c" 1>&6
2342
echo "configure:2343: checking for iconv" >&5
2343 2344
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2345
else
2346
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2347 2348
    am_cv_func_iconv="no, consider installing GNU libiconv"
    am_cv_lib_iconv=no
2349
    cat > conftest.$ac_ext <<EOF
2350
#line 2351 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2351 2352 2353
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
2354
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2355 2356 2357
iconv_t cd = iconv_open("","");
       iconv(cd,NULL,NULL,NULL,NULL);
       iconv_close(cd);
2358 2359
; return 0; }
EOF
2360
if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2361
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2362 2363
  am_cv_func_iconv=yes
else
2364 2365
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2366
fi
2367
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2368 2369 2370
    if test "$am_cv_func_iconv" != yes; then
      am_save_LIBS="$LIBS"
      LIBS="$LIBS -liconv"
2371
      cat > conftest.$ac_ext <<EOF
2372
#line 2373 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2373 2374 2375
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
2376
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2377 2378 2379
iconv_t cd = iconv_open("","");
         iconv(cd,NULL,NULL,NULL,NULL);
         iconv_close(cd);
2380 2381
; return 0; }
EOF
2382
if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2383
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2384 2385 2386
  am_cv_lib_iconv=yes
        am_cv_func_iconv=yes
else
2387 2388
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2389
fi
2390
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2391 2392
      LIBS="$am_save_LIBS"
    fi
2393
  
2394 2395
fi

2396 2397 2398
echo "$ac_t""$am_cv_func_iconv" 1>&6
  if test "$am_cv_func_iconv" = yes; then
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2399
#define HAVE_ICONV 1
2400
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2401

2402
    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
2403
echo "configure:2404: checking for iconv declaration" >&5
2404 2405
    if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2406
else
2407 2408
  
      cat > conftest.$ac_ext <<EOF
2409
#line 2410 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423
#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

2424
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2425

2426 2427
; return 0; }
EOF
2428
if { (eval echo configure:2429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2429
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2430 2431
  am_cv_proto_iconv_arg1=""
else
2432 2433 2434 2435
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_proto_iconv_arg1="const"
Sam Hocevar's avatar
 
Sam Hocevar committed
2436
fi
2437
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2438 2439 2440 2441
      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/( /(/'`
2442 2443 2444
    echo "$ac_t""${ac_t:-
         }$am_cv_proto_iconv" 1>&6
    cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2445
#define ICONV_CONST $am_cv_proto_iconv_arg1
2446
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2447 2448 2449 2450 2451 2452

  fi
  LIBICONV=
  if test "$am_cv_lib_iconv" = yes; then
    LIBICONV="-liconv"
  fi
2453
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2454

2455 2456
   
  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
2457
echo "configure:2458: checking for nl_langinfo and CODESET" >&5
2458 2459
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2460
else
2461
  cat > conftest.$ac_ext <<EOF
2462
#line 2463 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2463 2464
#include "confdefs.h"
#include <langinfo.h>
2465
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2466
char* cs = nl_langinfo(CODESET);
2467 2468
; return 0; }
EOF
2469
if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2470
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2471 2472
  am_cv_langinfo_codeset=yes
else
2473 2474 2475 2476
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_langinfo_codeset=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2477
fi
2478 2479
rm -f conftest*
    
2480 2481
fi

2482 2483 2484
echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
  if test $am_cv_langinfo_codeset = yes; then
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2485
#define HAVE_LANGINFO_CODESET 1
2486
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2487 2488 2489 2490

  fi

   if test $ac_cv_header_locale_h = yes; then
2491
    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2492
echo "configure:2493: checking for LC_MESSAGES" >&5
2493 2494
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2495
else
2496
  cat > conftest.$ac_ext <<EOF
2497
#line 2498 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2498 2499
#include "confdefs.h"
#include <locale.h>
2500
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2501
return LC_MESSAGES
2502 2503
; return 0; }
EOF
2504
if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2505
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2506 2507
  am_cv_val_LC_MESSAGES=yes
else
2508 2509 2510 2511
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_val_LC_MESSAGES=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2512
fi
2513
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2514
fi
2515

2516 2517 2518
echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
    if test $am_cv_val_LC_MESSAGES = yes; then
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2519
#define HAVE_LC_MESSAGES 1
2520
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2521 2522 2523

    fi
  fi
2524
   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2525
echo "configure:2526: checking whether NLS is requested" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2526 2527 2528 2529 2530 2531
        # 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
2532
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2533

2534 2535
    echo "$ac_t""$USE_NLS" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2536 2537 2538 2539 2540 2541

    BUILD_INCLUDED_LIBINTL=no
    USE_INCLUDED_LIBINTL=no
    INTLLIBS=

        if test "$USE_NLS" = "yes"; then
2542
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2543
#define ENABLE_NLS 1
2544
EOF
2545

2546
      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2547
echo "configure:2548: checking whether included gettext is requested" >&5
2548
      # Check whether --with-included-gettext or --without-included-gettext was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2549 2550 2551 2552 2553
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
2554 2555 2556
fi

      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2557 2558 2559 2560 2561

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

2562 2563
                
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2564

2565 2566
	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2567
echo "configure:2568: checking for libintl.h" >&5
2568 2569
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2570
else
2571
  cat > conftest.$ac_ext <<EOF
2572
#line 2573 "configure"
2573 2574
#include "confdefs.h"
#include <libintl.h>
2575 2576
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2577
{ (eval echo configure:2578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2578 2579 2580 2581 2582 2583 2584
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
2585
  cat conftest.$ac_ext >&5
2586 2587
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
2588
fi
2589
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2590
fi
2591 2592 2593
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
2594
echo "configure:2595: checking for GNU gettext in libc" >&5
2595 2596
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2597
else
2598
  cat > conftest.$ac_ext <<EOF
2599
#line 2600 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2600 2601 2602
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2603
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2604 2605
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2606 2607
; return 0; }
EOF
2608
if { (eval echo configure:2609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2609
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2610 2611
  gt_cv_func_gnugettext1_libc=yes
else
2612 2613 2614 2615
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gnugettext1_libc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2616
fi
2617
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2618
fi
2619 2620

echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2621 2622

	   if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
2623
	     echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
2624
echo "configure:2625: checking for GNU gettext in libintl" >&5
2625 2626
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2627 2628 2629
else
  gt_save_LIBS="$LIBS"
		LIBS="$LIBS -lintl $LIBICONV"
2630
		cat > conftest.$ac_ext <<EOF
2631
#line 2632 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2632 2633 2634
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2635
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2636 2637
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2638 2639
; return 0; }
EOF
2640
if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2641
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2642 2643
  gt_cv_func_gnugettext1_libintl=yes
else
2644 2645 2646 2647
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gnugettext1_libintl=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2648
fi
2649
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2650 2651
		LIBS="$gt_save_LIBS"
fi
2652 2653

echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2654 2655 2656 2657 2658
	   fi

	   	   	   	   	   if test "$gt_cv_func_gnugettext1_libc" = "yes" \
	      || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
		   && test "$PACKAGE" != gettext; }; then
2659
	     cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2660
#define HAVE_GETTEXT 1
2661
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2662 2663 2664 2665 2666 2667 2668 2669


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

	     gt_save_LIBS="$LIBS"
	     LIBS="$LIBS $INTLLIBS"
2670
	     for ac_func in dcgettext
Sam Hocevar's avatar
 
Sam Hocevar committed
2671
do
2672
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2673
echo "configure:2674: checking for $ac_func" >&5
2674 2675
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2676
else
2677
  cat > conftest.$ac_ext <<EOF
2678
#line 2679 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2679 2680
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2681
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2682 2683 2684
#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
2685 2686 2687 2688 2689
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

Sam Hocevar's avatar
 
Sam Hocevar committed
2690 2691 2692 2693 2694 2695
/* 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
2696
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2697 2698
#endif

2699 2700
; return 0; }
EOF
2701
if { (eval echo configure:2702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2702 2703 2704 2705 2706 2707 2708 2709 2710 2711
  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
2712

2713 2714 2715 2716 2717 2718 2719 2720 2721
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
2722 2723 2724 2725 2726 2727 2728
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
2729
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2730
echo "configure:2731: checking for $ac_word" >&5
2731 2732
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755
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
2756
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2757
else
2758
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2759 2760 2761 2762
fi

	     # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
2763
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2764
echo "configure:2765: checking for $ac_word" >&5
2765 2766
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2767
else
2768 2769
  case "$GMSGFMT" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
2770 2771
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
2772 2773 2774
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
2775
  *)
2776 2777 2778 2779 2780 2781 2782 2783 2784 2785
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
2786 2787 2788 2789
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
2790
GMSGFMT="$ac_cv_path_GMSGFMT"
Sam Hocevar's avatar
 
Sam Hocevar committed
2791
if test -n "$GMSGFMT"; then
2792
  echo "$ac_t""$GMSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2793
else
2794
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2795 2796 2797 2798 2799
fi


	     	     # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2800
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2801
echo "configure:2802: checking for $ac_word" >&5
2802 2803
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826
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
2827
  echo "$ac_t""$XGETTEXT" 1>&6
2828
else
2829
  echo "$ac_t""no" 1>&6
2830 2831
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2832 2833 2834

	     CATOBJEXT=.gmo
	   fi
2835 2836 2837
	
else
  echo "$ac_t""no" 1>&6
2838 2839
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2840 2841 2842 2843 2844 2845 2846 2847 2848 2849

        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
2850
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2851
echo "configure:2852: checking for $ac_word" >&5
2852 2853
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2854
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876
  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
2877
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2878
else
2879
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2880 2881 2882 2883
fi

        # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
2884
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2885
echo "configure:2886: checking for $ac_word" >&5
2886 2887
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2888
else
2889 2890
  case "$GMSGFMT" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
2891 2892
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
2893 2894 2895
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
2896
  *)
2897 2898 2899 2900 2901 2902 2903 2904 2905 2906
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
2907 2908 2909
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
2910
fi
2911
GMSGFMT="$ac_cv_path_GMSGFMT"
Sam Hocevar's avatar
 
Sam Hocevar committed
2912
if test -n "$GMSGFMT"; then
2913
  echo "$ac_t""$GMSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2914
else
2915
  echo "$ac_t""no" 1>&6
2916
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2917 2918 2919

        # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2920
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2921
echo "configure:2922: checking for $ac_word" >&5
2922 2923
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946
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
2947
  echo "$ac_t""$XGETTEXT" 1>&6
2948
else
2949
  echo "$ac_t""no" 1>&6
2950 2951
fi

2952
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2953 2954 2955 2956 2957 2958
	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
2959

Sam Hocevar's avatar
 
Sam Hocevar committed
2960 2961 2962 2963
                  if test "$GMSGFMT" != ":"; then
			if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
	  : ;
	else
2964
	  echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2965 2966 2967 2968 2969 2970 2971 2972
	  GMSGFMT=":"
	fi
      fi

                  if test "$XGETTEXT" != ":"; then
			if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
	  : ;
	else
2973
	  echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2974 2975 2976 2977 2978 2979
	  XGETTEXT=":"
	fi
      fi

            POSUB=po
    fi
2980
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2981 2982 2983 2984 2985 2986 2987 2988


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

                                            for ac_prog in bison
do
2989
# Extract the first word of "$ac_prog", so it can be a program name with args.
Sam Hocevar's avatar
 
Sam Hocevar committed
2990
set dummy $ac_prog; ac_word=$2
2991
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2992
echo "configure:2993: checking for $ac_word" >&5
2993 2994
if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2995
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2996 2997
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
2998
else
2999 3000 3001 3002 3003 3004 3005 3006 3007 3008
  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_INTLBISON="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
3009 3010
fi
fi
3011
INTLBISON="$ac_cv_prog_INTLBISON"
Sam Hocevar's avatar
 
Sam Hocevar committed
3012
if test -n "$INTLBISON"; then
3013
  echo "$ac_t""$INTLBISON" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3014
else
3015
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3016 3017
fi

3018
test -n "$INTLBISON" && break
Sam Hocevar's avatar
 
Sam Hocevar committed
3019 3020 3021 3022 3023
done

    if test -z "$INTLBISON"; then
      ac_verc_fail=yes
    else
3024
            echo $ac_n "checking version of bison""... $ac_c" 1>&6
3025
echo "configure:3026: checking version of bison" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3026 3027 3028 3029 3030 3031 3032
      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
3033
      echo "$ac_t""$ac_prog_version" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3034 3035 3036 3037 3038 3039 3040 3041 3042 3043
    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

3044 3045 3046 3047 3048 3049 3050 3051 3052
        
    
    
    
    
    
    
    
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3053 3054 3055 3056 3057

        nls_cv_header_intl=
    nls_cv_header_libgt=

        DATADIRNAME=share
3058
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3059 3060

        INSTOBJEXT=.mo
3061
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3062 3063

        GENCAT=gencat
3064 3065
    
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3066 3067 3068 3069 3070

   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
3071
       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3072
echo "configure:3073: checking for catalogs to be installed" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090
       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
3091
       echo "$ac_t""$LINGUAS" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105
     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
3106
   
3107

Sam Hocevar's avatar
 
Sam Hocevar committed
3108
      INTL_LIBTOOL_SUFFIX_PREFIX=
3109 3110
   
  
3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122

# 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.
3123
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3124
echo "configure:3125: checking for a BSD compatible install" >&5
3125
if test -z "$INSTALL"; then
3126 3127
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3128
else
3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # 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
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
3149
      done
3150 3151 3152 3153
      ;;
    esac
  done
  IFS="$ac_save_IFS"
3154 3155 3156

fi
  if test "${ac_cv_path_install+set}" = set; then
3157
    INSTALL="$ac_cv_path_install"
3158 3159 3160 3161 3162
  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.
3163
    INSTALL="$ac_install_sh"
3164 3165
  fi
fi
3166
echo "$ac_t""$INSTALL" 1>&6
3167 3168 3169 3170 3171

# 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}'

3172
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3173 3174 3175

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3176

Sam Hocevar's avatar
Sam Hocevar committed
3177 3178
vlc_LDFLAGS="${LDFLAGS}"

3179
case "x${target_os}" in
Gildas Bazin's avatar
 
Gildas Bazin committed
3180 3181 3182 3183 3184 3185 3186 3187
  x)
    SYS=unknown
    ;;
  xlinux*)
    SYS=linux
    ;;
  xbsdi*)
    SYS=bsdi
3188
    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3189 3190 3191 3192 3193
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
    vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
    ;;
  x*bsd*)
    SYS="${target_os}"
3194
    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3195 3196 3197
    ;;
  xdarwin*)
    SYS=darwin
3198
    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"; CFLAGS="${save_CFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3199 3200 3201
    ;;
  x*mingw32*)
    SYS=mingw32
3202
    # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
Gildas Bazin's avatar
 
Gildas Bazin committed
3203
set dummy ${ac_tool_prefix}windres; ac_word=$2
3204
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3205
echo "configure:3206: checking for $ac_word" >&5
3206 3207
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3208 3209 3210 3211
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
3212 3213 3214 3215 3216 3217 3218 3219 3220 3221
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
3222 3223
fi
fi
3224
WINDRES="$ac_cv_prog_WINDRES"
Gildas Bazin's avatar
 
Gildas Bazin committed
3225
if test -n "$WINDRES"; then
3226
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3227
else
3228
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3229 3230
fi

3231

Gildas Bazin's avatar
 
Gildas Bazin committed
3232
if test -z "$ac_cv_prog_WINDRES"; then
3233
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
3234 3235
  # Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
3236
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3237
echo "configure:3238: checking for $ac_word" >&5
3238 3239
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3240
else
3241 3242
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
3243
else
3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254
  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=":"
Gildas Bazin's avatar
 
Gildas Bazin committed
3255 3256
fi
fi
3257 3258 3259
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3260
else
3261
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3262 3263 3264
fi

else
3265 3266
  WINDRES=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
3267 3268
fi

3269
    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3270
    vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
Sam Hocevar's avatar
 
Sam Hocevar committed
3271 3272
    vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3273
    ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
3274
    http_LDFLAGS="${http_LDFLAGS} -lws2_32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3275
    rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3276 3277 3278
    ;;
  x*nto*)
    SYS=nto
Sam Hocevar's avatar
 
Sam Hocevar committed
3279 3280
    x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
    xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
Gildas Bazin's avatar
 
Gildas Bazin committed
3281 3282 3283
    ;;
  xbeos)
    SYS=beos
3284
    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3285 3286 3287 3288
    vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
    plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
    beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
Gildas Bazin's avatar
 
Gildas Bazin committed
3289 3290
    ;;
  x*)
Sam Hocevar's avatar
 
Sam Hocevar committed
3291
    SYS="${target_os}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3292 3293 3294
    ;;
esac

3295
if test "x${SYS}" = "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3296 3297 3298 3299 3300 3301
then
  plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
else
  plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
fi

3302
save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3303

3304
for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup
3305
do
3306
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3307
echo "configure:3308: checking for $ac_func" >&5
3308 3309
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3310
else
3311
  cat > conftest.$ac_ext <<EOF
3312
#line 3313 "configure"
3313 3314
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3315
    which can conflict with char $ac_func(); below.  */
3316 3317 3318
#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
3319 3320 3321 3322
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3323 3324 3325 3326 3327 3328 3329

/* 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
3330
$ac_func();
3331 3332
#endif

3333 3334
; return 0; }
EOF
3335
if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3336 3337 3338 3339 3340 3341 3342 3343 3344 3345
  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
3346

3347 3348 3349 3350 3351 3352 3353 3354 3355
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
3356 3357 3358
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3359

3360
echo $ac_n "checking for connect""... $ac_c" 1>&6
3361
echo "configure:3362: checking for connect" >&5
3362 3363
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3364
else
3365
  cat > conftest.$ac_ext <<EOF
3366
#line 3367 "configure"
3367 3368
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3369
    which can conflict with char connect(); below.  */
3370 3371 3372
#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
3373 3374 3375 3376
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
3377 3378 3379 3380 3381 3382 3383

/* 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
3384
connect();
3385 3386
#endif

3387 3388
; return 0; }
EOF
3389
if { (eval echo configure:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402
  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
3403 3404
  :
else
3405
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3406

3407
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3408
echo "configure:3409: checking for connect in -lsocket" >&5
3409 3410 3411
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
3412
else
3413
  ac_save_LIBS="$LIBS"
3414
LIBS="-lsocket  $LIBS"
3415
cat > conftest.$ac_ext <<EOF
3416
#line 3417 "configure"
3417 3418 3419
#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
3420 3421 3422 3423 3424 3425 3426
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
3427
if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441
  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
3442 3443
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
    vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
3444

3445 3446
else
  echo "$ac_t""no" 1>&6
3447 3448 3449 3450
fi

fi

Sam Hocevar's avatar
Sam Hocevar committed
3451
echo $ac_n "checking for send""... $ac_c" 1>&6
3452
echo "configure:3453: checking for send" >&5
Sam Hocevar's avatar
Sam Hocevar committed
3453 3454 3455 3456
if eval "test \"`echo '$''{'ac_cv_func_send'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3457
#line 3458 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char send(); 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 send();

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_send) || defined (__stub___send)
choke me
#else
send();
#endif

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

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

  echo $ac_n "checking for send in -lsocket""... $ac_c" 1>&6
3499
echo "configure:3500: checking for send in -lsocket" >&5
Sam Hocevar's avatar
Sam Hocevar committed
3500 3501 3502 3503 3504 3505 3506
ac_lib_var=`echo socket'_'send | 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="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
3507
#line 3508 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
3508 3509 3510 3511 3512 3513 3514 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
    builtin and then its argument prototype would still apply.  */
char send();

int main() {
send()
; return 0; }
EOF
3518
if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
Sam Hocevar committed
3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540
  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
  http_LDFLAGS="${http_LDFLAGS} -lsocket"

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

fi

3541
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3542
echo "configure:3543: checking for gethostbyname" >&5
3543 3544
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3545
else
3546
  cat > conftest.$ac_ext <<EOF
3547
#line 3548 "configure"
3548 3549
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3550
    which can conflict with char gethostbyname(); below.  */
3551 3552 3553
#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
3554 3555 3556 3557
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
3558 3559 3560 3561 3562 3563 3564

/* 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
3565
gethostbyname();
3566 3567
#endif

3568 3569
; return 0; }
EOF
3570
if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583
  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
3584 3585
  :
else
3586
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3587

3588
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3589
echo "configure:3590: checking for gethostbyname in -lnsl" >&5
3590 3591 3592
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
3593
else
3594
  ac_save_LIBS="$LIBS"
3595
LIBS="-lnsl  $LIBS"
3596
cat > conftest.$ac_ext <<EOF
3597
#line 3598 "configure"
3598 3599 3600
#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
3601 3602 3603 3604 3605 3606 3607
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
3608
if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622
  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
3623
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl"
3624 3625
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3626 3627 3628 3629 3630
fi


fi

3631
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3632
echo "configure:3633: checking for gethostbyname" >&5
3633 3634
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3635
else
3636
  cat > conftest.$ac_ext <<EOF
3637
#line 3638 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3638 3639
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3640
    which can conflict with char gethostbyname(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3641 3642 3643
#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
3644 3645 3646 3647
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3648 3649 3650 3651 3652 3653 3654

/* 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
3655
gethostbyname();
Sam Hocevar's avatar
 
Sam Hocevar committed
3656 3657
#endif

3658 3659
; return 0; }
EOF
3660
if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673
  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
Sam Hocevar's avatar
 
Sam Hocevar committed
3674 3675
  :
else
3676
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3677

3678
  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
3679
echo "configure:3680: checking for gethostbyname in -lbind" >&5
3680 3681 3682
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
Sam Hocevar's avatar
 
Sam Hocevar committed
3683
else
3684
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3685
LIBS="-lbind  $LIBS"
3686
cat > conftest.$ac_ext <<EOF
3687
#line 3688 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3688 3689 3690
#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
3691 3692 3693 3694 3695 3696 3697
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
3698
if { (eval echo configure:3699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712
  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
3713
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
3714 3715
else
  echo "$ac_t""no" 1>&6
3716 3717
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3718

3719 3720
fi

3721 3722
for ac_func in nanosleep
do
3723
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3724
echo "configure:3725: checking for $ac_func" >&5
3725 3726
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3727
else
3728
  cat > conftest.$ac_ext <<EOF
3729
#line 3730 "configure"
3730 3731
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3732
    which can conflict with char $ac_func(); below.  */
3733 3734 3735
#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
3736 3737 3738 3739
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3740 3741 3742 3743

/* 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.  */
3744
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3745 3746
choke me
#else
3747
$ac_func();
3748 3749
#endif

3750 3751
; return 0; }
EOF
3752
if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773
  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
echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
3774
echo "configure:3775: checking for nanosleep in -lrt" >&5
3775 3776 3777 3778 3779
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
else
  ac_save_LIBS="$LIBS"
3780
LIBS="-lrt  $LIBS"
3781
cat > conftest.$ac_ext <<EOF
3782
#line 3783 "configure"
3783
#include "confdefs.h"
3784 3785
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
3786 3787 3788 3789 3790 3791 3792
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
3793
if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807
  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
3808
  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"
3809
else
3810 3811
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
3812
echo "configure:3813: checking for nanosleep in -lposix4" >&5
3813 3814 3815
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
3816
else
3817
  ac_save_LIBS="$LIBS"
3818
LIBS="-lposix4  $LIBS"
3819
cat > conftest.$ac_ext <<EOF
3820
#line 3821 "configure"
3821 3822 3823
#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
3824 3825 3826 3827 3828 3829 3830
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
3831
if { (eval echo configure:3832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3832 3833 3834 3835 3836 3837 3838
  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"
3839
fi
3840 3841
rm -f conftest*
LIBS="$ac_save_LIBS"
3842

3843 3844 3845 3846 3847 3848 3849
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"
else
  echo "$ac_t""no" 1>&6
fi
3850

3851
  
3852 3853
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3854

3855
fi
3856
done
3857

3858
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3859
echo "configure:3860: checking for inet_aton" >&5
3860 3861
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3862
else
3863
  cat > conftest.$ac_ext <<EOF
3864
#line 3865 "configure"
3865 3866
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3867
    which can conflict with char inet_aton(); below.  */
3868 3869 3870
#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
3871 3872 3873 3874
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
3875 3876 3877 3878 3879 3880 3881

/* 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
3882
inet_aton();
3883 3884
#endif

3885 3886
; return 0; }
EOF
3887
if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900
  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
3901 3902
  :
else
3903
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3904

3905
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
3906
echo "configure:3907: checking for inet_aton in -lresolv" >&5
3907 3908 3909
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
3910
else
3911
  ac_save_LIBS="$LIBS"
3912
LIBS="-lresolv  $LIBS"
3913
cat > conftest.$ac_ext <<EOF
3914
#line 3915 "configure"
3915 3916 3917
#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
3918 3919 3920 3921 3922 3923 3924
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
3925
if { (eval echo configure:3926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939
  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
3940
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv"
3941 3942
else
  echo "$ac_t""no" 1>&6
3943 3944 3945 3946 3947
fi


fi

3948
echo $ac_n "checking for textdomain""... $ac_c" 1>&6
3949
echo "configure:3950: checking for textdomain" >&5
3950 3951
if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3952
else
3953
  cat > conftest.$ac_ext <<EOF
3954
#line 3955 "configure"
3955 3956
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3957
    which can conflict with char textdomain(); below.  */
3958 3959 3960
#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
3961 3962 3963 3964
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
3965 3966 3967 3968 3969 3970 3971

/* 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_textdomain) || defined (__stub___textdomain)
choke me
#else
3972
textdomain();
3973 3974
#endif

3975 3976
; return 0; }
EOF
3977
if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990
  rm -rf conftest*
  eval "ac_cv_func_textdomain=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_textdomain=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'textdomain`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3991 3992
  :
else
3993
  echo "$ac_t""no" 1>&6
3994

3995
  echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
3996
echo "configure:3997: checking for textdomain in -lintl" >&5
3997 3998 3999
ac_lib_var=`echo intl'_'textdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4000
else
4001
  ac_save_LIBS="$LIBS"
4002
LIBS="-lintl  $LIBS"
4003
cat > conftest.$ac_ext <<EOF
4004
#line 4005 "configure"
4005 4006 4007
#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
4008 4009 4010 4011 4012 4013 4014
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
textdomain()
; return 0; }
EOF
4015
if { (eval echo configure:4016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029
  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
4030
  vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
4031 4032
    plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
  
4033 4034
else
  echo "$ac_t""no" 1>&6
4035 4036
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4037

4038 4039
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4040

Sam Hocevar's avatar
 
Sam Hocevar committed
4041
NEED_GETOPT=0
4042
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
4043
echo "configure:4044: checking for getopt_long" >&5
4044 4045
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
4046
else
4047
  cat > conftest.$ac_ext <<EOF
4048
#line 4049 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4049 4050
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
4051
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4052 4053 4054
#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
4055 4056 4057 4058
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4059 4060 4061 4062 4063 4064 4065

/* 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
4066
getopt_long();
Sam Hocevar's avatar
 
Sam Hocevar committed
4067 4068
#endif

4069 4070
; return 0; }
EOF
4071
if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085
  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
4086
#define HAVE_GETOPT_LONG 1
4087
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4088 4089

else
4090 4091 4092
  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
4093
echo "configure:4094: checking for getopt_long in -lgnugetopt" >&5
4094 4095 4096
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
4097
else
4098
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4099
LIBS="-lgnugetopt  $LIBS"
4100
cat > conftest.$ac_ext <<EOF
4101
#line 4102 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4102 4103 4104
#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
4105 4106 4107 4108 4109 4110 4111
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
4112
if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127
  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
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4128
#define HAVE_GETOPT_LONG 1
4129
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4130
 vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
4131
else
4132 4133
  echo "$ac_t""no" 1>&6
NEED_GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
4134
fi
4135 4136 4137

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4138

4139
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4140
echo "configure:4141: checking return type of signal handlers" >&5
4141 4142
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4143
else
4144
  cat > conftest.$ac_ext <<EOF
4145
#line 4146 "configure"
4146 4147 4148 4149
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
4150
#undef signal
4151 4152 4153 4154 4155 4156 4157
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

4158
int main() {
4159
int i;
4160 4161
; return 0; }
EOF
4162
if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4163
  rm -rf conftest*
4164 4165
  ac_cv_type_signal=void
else
4166 4167 4168 4169
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
4170
fi
4171
rm -f conftest*
4172 4173
fi

4174 4175
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
4176
#define RETSIGTYPE $ac_cv_type_signal
4177
EOF
4178

Sam Hocevar's avatar
 
Sam Hocevar committed
4179

4180
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4181
echo "configure:4182: checking for dlopen in -ldl" >&5
4182 4183 4184
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
4185
else
4186
  ac_save_LIBS="$LIBS"
4187
LIBS="-ldl  $LIBS"
4188
cat > conftest.$ac_ext <<EOF
4189
#line 4190 "configure"
4190 4191 4192
#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
4193 4194 4195 4196 4197 4198 4199
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
4200
if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214
  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
4215
  vlc_LDFLAGS="${vlc_LDFLAGS} -ldl"
4216 4217
else
  echo "$ac_t""no" 1>&6
4218 4219
fi

4220
echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
4221
echo "configure:4222: checking for cos in -lm" >&5
4222 4223 4224
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
Sam Hocevar's avatar
 
Sam Hocevar committed
4225
else
4226
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4227
LIBS="-lm  $LIBS"
4228
cat > conftest.$ac_ext <<EOF
4229
#line 4230 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4230 4231 4232
#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
4233 4234 4235 4236 4237 4238 4239
    builtin and then its argument prototype would still apply.  */
char cos();

int main() {
cos()
; return 0; }
EOF
4240
if { (eval echo configure:4241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254
  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
4255 4256
  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
  filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm"
4257 4258
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4259 4260
fi

4261
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
4262
echo "configure:4263: checking for pow in -lm" >&5
4263 4264 4265
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
4266
else
4267
  ac_save_LIBS="$LIBS"
4268
LIBS="-lm  $LIBS"
4269
cat > conftest.$ac_ext <<EOF
4270
#line 4271 "configure"
4271 4272 4273
#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
4274 4275 4276 4277 4278 4279 4280
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
4281
if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295
  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
4296
  ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4297 4298 4299 4300
  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
  imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
  imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
  chroma_i420_rgb_LDFLAGS="${chroma_i420_rgb_LDFLAGS} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4301

4302 4303
else
  echo "$ac_t""no" 1>&6
4304 4305
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4306

Sam Hocevar's avatar
 
Sam Hocevar committed
4307
THREAD_LIB=error
4308
if test "x${THREAD_LIB}" = "xerror"; then
4309
  echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
4310
echo "configure:4311: checking for pthread_attr_init in -lpthread" >&5
4311 4312 4313
ac_lib_var=`echo pthread'_'pthread_attr_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
Sam Hocevar's avatar
 
Sam Hocevar committed
4314
else
4315
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4316
LIBS="-lpthread  $LIBS"
4317
cat > conftest.$ac_ext <<EOF
4318
#line 4319 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4319 4320 4321
#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
4322 4323 4324 4325 4326 4327 4328
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
4329
if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343
  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
4344
  THREAD_LIB="-lpthread"
4345 4346
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4347
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4348

Sam Hocevar's avatar
 
Sam Hocevar committed
4349
fi
4350
if test "x${THREAD_LIB}" = "xerror"; then
4351
  echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
4352
echo "configure:4353: checking for pthread_attr_init in -lpthreads" >&5
4353 4354 4355
ac_lib_var=`echo pthreads'_'pthread_attr_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
4356
else
4357
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4358
LIBS="-lpthreads  $LIBS"
4359
cat > conftest.$ac_ext <<EOF
4360
#line 4361 "configure"
4361 4362 4363
#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
4364 4365 4366 4367 4368 4369 4370
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
4371
if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385
  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
4386
  THREAD_LIB="-lpthreads"
4387 4388
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4389 4390
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4391
fi
4392
if test "x${THREAD_LIB}" = "xerror"; then
4393
  echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
4394
echo "configure:4395: checking for pthread_attr_init in -lc_r" >&5
4395 4396 4397
ac_lib_var=`echo c_r'_'pthread_attr_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
Sam Hocevar's avatar
 
Sam Hocevar committed
4398
else
4399
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4400
LIBS="-lc_r  $LIBS"
4401
cat > conftest.$ac_ext <<EOF
4402
#line 4403 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4403
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4404 4405
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
4406 4407 4408 4409 4410 4411 4412
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
4413
if { (eval echo configure:4414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427
  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
4428
  THREAD_LIB="-lc_r"
4429 4430
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4431
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4432

Sam Hocevar's avatar
 
Sam Hocevar committed
4433
fi
4434
if test "x${THREAD_LIB}" = "xerror"; then
4435
  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
4436
echo "configure:4437: checking for pthread_attr_init" >&5
4437 4438
if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4439
else
4440
  cat > conftest.$ac_ext <<EOF
4441
#line 4442 "configure"
4442
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4443
/* System header to define __stub macros and hopefully few prototypes,
4444
    which can conflict with char pthread_attr_init(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4445
#include <assert.h>
4446 4447
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
4448 4449 4450 4451
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4452 4453 4454 4455 4456 4457 4458

/* 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
4459
pthread_attr_init();
Sam Hocevar's avatar
 
Sam Hocevar committed
4460 4461
#endif

4462 4463
; return 0; }
EOF
4464
if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=no"
fi
rm -f conftest*
fi

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4483
  THREAD_LIB=""
Sam Hocevar's avatar
 
Sam Hocevar committed
4484
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4485

4486
echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
4487
echo "configure:4488: checking for cthread_fork in -lthreads" >&5
4488 4489 4490
ac_lib_var=`echo threads'_'cthread_fork | 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
4491
else
4492
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4493
LIBS="-lthreads  $LIBS"
4494
cat > conftest.$ac_ext <<EOF
4495
#line 4496 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4496 4497 4498
#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
4499 4500 4501 4502 4503 4504 4505
    builtin and then its argument prototype would still apply.  */
char cthread_fork();

int main() {
cthread_fork()
; return 0; }
EOF
4506
if { (eval echo configure:4507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520
  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
4521
  THREAD_LIB="-lthreads"
4522 4523
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4524
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4525 4526


4527
cat > conftest.$ac_ext <<EOF
4528
#line 4529 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4529 4530
#include "confdefs.h"
#include <pthread.h>
4531
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4532 4533
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
4534 4535 4536
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4537
#define PTHREAD_COND_T_IN_PTHREAD_H 1
4538
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4539 4540 4541 4542

fi
rm -f conftest*

4543
cat > conftest.$ac_ext <<EOF
4544
#line 4545 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559
#include "confdefs.h"
#include <pthread.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_once" >/dev/null 2>&1; then
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
#define PTHREAD_ONCE_IN_PTHREAD_H 1
EOF

fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
4560
#line 4561 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4561 4562
#include "confdefs.h"
#include <strings.h>
4563
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4564 4565
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
4566 4567 4568
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4569
#define STRNCASECMP_IN_STRINGS_H 1
4570
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4571 4572 4573

fi
rm -f conftest*
4574

Sam Hocevar's avatar
 
Sam Hocevar committed
4575

Sam Hocevar's avatar
Sam Hocevar committed
4576
for ac_hdr in stdint.h getopt.h strings.h inttypes.h sys/int_types.h
Christophe Massiot's avatar
Christophe Massiot committed
4577
do
4578 4579
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4580
echo "configure:4581: checking for $ac_hdr" >&5
4581 4582
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4583
else
4584
  cat > conftest.$ac_ext <<EOF
4585
#line 4586 "configure"
4586 4587 4588 4589
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4590
{ (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4591 4592 4593 4594 4595 4596 4597
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
4598
  cat conftest.$ac_ext >&5
4599 4600
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
4601
fi
4602
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4603
fi
4604 4605 4606 4607 4608 4609 4610 4611 4612
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
Christophe Massiot's avatar
Christophe Massiot committed
4613 4614 4615
fi
done

4616
for ac_hdr in sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h
4617
do
4618 4619
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4620
echo "configure:4621: checking for $ac_hdr" >&5
4621 4622
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4623
else
4624
  cat > conftest.$ac_ext <<EOF
4625
#line 4626 "configure"
4626 4627 4628 4629
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4630
{ (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4631 4632 4633 4634 4635 4636 4637
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
4638
  cat conftest.$ac_ext >&5
4639 4640
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4641
fi
4642
rm -f conftest*
4643
fi
4644 4645 4646 4647 4648 4649 4650 4651 4652
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
4653 4654 4655
fi
done

4656
for ac_hdr in dlfcn.h image.h
4657
do
4658 4659
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4660
echo "configure:4661: checking for $ac_hdr" >&5
4661 4662
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4663
else
4664
  cat > conftest.$ac_ext <<EOF
4665
#line 4666 "configure"
4666 4667 4668 4669
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4670
{ (eval echo configure:4671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4671 4672 4673 4674 4675 4676 4677
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
4678
  cat conftest.$ac_ext >&5
4679 4680
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4681
fi
4682
rm -f conftest*
4683
fi
4684 4685 4686 4687 4688 4689 4690 4691 4692
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
4693 4694 4695
fi
done

4696
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4697
do
4698 4699
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4700
echo "configure:4701: checking for $ac_hdr" >&5
4701 4702
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4703
else
4704
  cat > conftest.$ac_ext <<EOF
4705
#line 4706 "configure"
4706 4707 4708 4709
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4710
{ (eval echo configure:4711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4711 4712 4713 4714 4715 4716 4717
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
4718
  cat conftest.$ac_ext >&5
4719 4720
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4721
fi
4722
rm -f conftest*
4723
fi
4724 4725 4726 4727 4728 4729 4730 4731 4732
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
4733 4734 4735
fi
done

4736
for ac_hdr in machine/param.h sys/shm.h
4737
do
4738 4739
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4740
echo "configure:4741: checking for $ac_hdr" >&5
4741 4742
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4743
else
4744
  cat > conftest.$ac_ext <<EOF
4745
#line 4746 "configure"
4746 4747 4748 4749
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4750
{ (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4751 4752 4753 4754 4755 4756 4757
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
4758
  cat conftest.$ac_ext >&5
4759 4760
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4761
fi
4762
rm -f conftest*
4763
fi
4764 4765 4766 4767 4768 4769 4770 4771 4772
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
4773 4774 4775
fi
done

4776
for ac_hdr in linux/version.h
4777
do
4778 4779
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4780
echo "configure:4781: checking for $ac_hdr" >&5
4781 4782
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4783
else
4784
  cat > conftest.$ac_ext <<EOF
4785
#line 4786 "configure"
4786 4787 4788 4789
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4790
{ (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4791 4792 4793 4794 4795 4796 4797
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
4798
  cat conftest.$ac_ext >&5
4799 4800
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4801
fi
4802
rm -f conftest*
4803
fi
4804 4805 4806 4807 4808 4809 4810 4811 4812
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
4813 4814 4815
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4816

4817
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4818
echo "configure:4819: checking whether time.h and sys/time.h may both be included" >&5
4819 4820
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4821
else
4822
  cat > conftest.$ac_ext <<EOF
4823
#line 4824 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4824 4825 4826 4827
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
4828 4829 4830 4831
int main() {
struct tm *tp;
; return 0; }
EOF
4832
if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4833
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4834 4835
  ac_cv_header_time=yes
else
4836 4837 4838 4839
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
Sam Hocevar's avatar
 
Sam Hocevar committed
4840
fi
4841
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4842
fi
4843

4844 4845 4846
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4847
#define TIME_WITH_SYS_TIME 1
4848
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4849 4850 4851 4852

fi


4853
cat > conftest.$ac_ext <<EOF
4854
#line 4855 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4855
#include "confdefs.h"
4856 4857 4858 4859 4860 4861 4862
#include <time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "nanosleep" >/dev/null 2>&1; then
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
4863
#define HAVE_DECL_NANOSLEEP 1
4864
EOF
4865 4866 4867


fi
4868
rm -f conftest*
4869 4870


4871
cat > conftest.$ac_ext <<EOF
4872
#line 4873 "configure"
4873
#include "confdefs.h"
4874 4875 4876 4877 4878 4879 4880
#include <sys/time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "timespec" >/dev/null 2>&1; then
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
4881
#define HAVE_STRUCT_TIMESPEC 1
4882
EOF
4883 4884 4885


fi
4886
rm -f conftest*
4887 4888


4889
for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
4890
do
4891 4892
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4893
echo "configure:4894: checking for $ac_hdr" >&5
4894 4895
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4896
else
4897
  cat > conftest.$ac_ext <<EOF
4898
#line 4899 "configure"
4899 4900 4901 4902
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4903
{ (eval echo configure:4904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4904 4905 4906 4907 4908 4909 4910
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
4911
  cat conftest.$ac_ext >&5
4912 4913
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4914
fi
4915
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4916
fi
4917 4918 4919 4920 4921 4922 4923 4924 4925
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
4926
fi
Christophe Massiot's avatar
Christophe Massiot committed
4927 4928
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4929

4930 4931 4932 4933 4934 4935 4936 4937
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

if test "x${SYS}" != "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
4938
then
4939
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
4940
  for ac_hdr in X11/extensions/dpms.h
Sam Hocevar's avatar
 
Sam Hocevar committed
4941
do
4942 4943
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4944
echo "configure:4945: checking for $ac_hdr" >&5
4945 4946
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4947
else
4948
  cat > conftest.$ac_ext <<EOF
4949
#line 4950 "configure"
4950 4951 4952 4953
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4954
{ (eval echo configure:4955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4955 4956 4957 4958 4959 4960 4961
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
4962
  cat conftest.$ac_ext >&5
4963 4964
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4965
fi
4966
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4967
fi
4968 4969 4970 4971 4972 4973 4974 4975
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
4976
#line 4977 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4977 4978
#include "confdefs.h"
#include <X11/extensions/dpms.h>
4979
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4980 4981
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "DPMSInfo" >/dev/null 2>&1; then
4982 4983 4984
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4985
#define DPMSINFO_IN_DPMS_H 1
4986
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4987

4988
    
Sam Hocevar's avatar
 
Sam Hocevar committed
4989 4990 4991
fi
rm -f conftest*

4992 4993 4994
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4995 4996 4997
fi
done

4998
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
4999 5000
fi

5001
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
5002
echo "configure:5003: checking for ntohl in sys/param.h" >&5
5003 5004
if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5005 5006
else
  CFLAGS="${save_CFLAGS} -Wall -Werror"
5007
     cat > conftest.$ac_ext <<EOF
5008
#line 5009 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
5009 5010
#include "confdefs.h"
#include <sys/param.h>
5011
int main() {
5012
void foo() { int meuh; ntohl(meuh); }
5013 5014
; return 0; }
EOF
5015
if { (eval echo configure:5016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5016
  rm -rf conftest*
5017
  ac_cv_c_ntohl_sys_param_h=yes
Christophe Massiot's avatar
Christophe Massiot committed
5018
else
5019 5020 5021 5022
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_ntohl_sys_param_h=no
Christophe Massiot's avatar
Christophe Massiot committed
5023
fi
5024
rm -f conftest*
5025
fi
5026

5027
echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
5028
if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
5029
    cat >> confdefs.h <<\EOF
5030
#define NTOHL_IN_SYS_PARAM_H 1
5031
EOF
5032 5033

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5034

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

5045
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5046

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

echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
5062 5063
if test "x${ac_cv_c_inline_limit}" != "xno"; then
    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}"
5064 5065
fi

5066
echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
5067
echo "configure:5068: checking if \$CC accepts -Wall -Winline" >&5
5068 5069
if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5070
else
Sam Hocevar's avatar
Sam Hocevar committed
5071
  CFLAGS="-Wall -Winline ${save_CFLAGS}"
5072
     cat > conftest.$ac_ext <<EOF
5073
#line 5074 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5074 5075
#include "confdefs.h"

5076
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5077

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

echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
5093 5094
if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
    save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5095
else
5096
    echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
5097
echo "configure:5098: checking if \$CC accepts -wall -winline" >&5
5098 5099
if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5100
else
Sam Hocevar's avatar
Sam Hocevar committed
5101
  CFLAGS="-wall -winline ${save_CFLAGS}"
5102
         cat > conftest.$ac_ext <<EOF
5103
#line 5104 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5104 5105
#include "confdefs.h"

5106
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5107

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

echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
5123 5124
    if test "x${ac_cv_c_wall_winline}" != "xno"; then
        save_CFLAGS="-wall -winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5125 5126 5127
    fi
fi

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

5138
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5139

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

echo "$ac_t""$ac_cv_c_pipe" 1>&6
5155 5156
if test "x${ac_cv_c_pipe}" != "xno"; then
    save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5157 5158
fi

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

5169
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5170

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

echo "$ac_t""$ac_cv_c_o3" 1>&6
5186
if test "x${ac_cv_c_o3}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5187 5188
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
else
5189
    echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
5190
echo "configure:5191: checking if \$CC accepts -O2" >&5
5191 5192
if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5193 5194
else
  CFLAGS="${save_CFLAGS} -O2"
5195
         cat > conftest.$ac_ext <<EOF
5196
#line 5197 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5197 5198
#include "confdefs.h"

5199
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5200

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

echo "$ac_t""$ac_cv_c_o2" 1>&6
5216
    if test "x${ac_cv_c_o2}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5217 5218
        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
    else
5219
        echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
5220
echo "configure:5221: checking if \$CC accepts -O" >&5
5221 5222
if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5223 5224
else
  CFLAGS="${save_CFLAGS} -O"
5225
             cat > conftest.$ac_ext <<EOF
5226
#line 5227 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5227 5228
#include "confdefs.h"

5229
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5230

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

echo "$ac_t""$ac_cv_c_o" 1>&6
5246
        if test "x${ac_cv_c_o}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5247 5248 5249 5250 5251
            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
        fi
    fi
fi

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

5262
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5263

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

echo "$ac_t""$ac_cv_c_fast_math" 1>&6
5279
if test "x${ac_cv_c_fast_math}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5280 5281 5282
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
fi

5283
echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
5284
echo "configure:5285: checking if \$CC accepts -funroll-loops" >&5
5285 5286
if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5287 5288
else
  CFLAGS="${save_CFLAGS} -funroll-loops"
5289
     cat > conftest.$ac_ext <<EOF
5290
#line 5291 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5291 5292
#include "confdefs.h"

5293
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5294

5295 5296
; return 0; }
EOF
5297
if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5298
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5299 5300
  ac_cv_c_unroll_loops=yes
else
5301 5302 5303 5304
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_unroll_loops=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5305
fi
5306
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5307
fi
5308 5309

echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
5310
if test "x${ac_cv_c_unroll_loops}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5311 5312 5313
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
fi

5314
echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
5315
echo "configure:5316: checking if \$CC accepts -fomit-frame-pointer" >&5
5316 5317
if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5318 5319
else
  CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
5320
     cat > conftest.$ac_ext <<EOF
5321
#line 5322 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5322 5323
#include "confdefs.h"

5324
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5325

5326 5327
; return 0; }
EOF
5328
if { (eval echo configure:5329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5329
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5330 5331
  ac_cv_c_omit_frame_pointer=yes
else
5332 5333 5334 5335
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_omit_frame_pointer=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5336
fi
5337
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5338
fi
5339 5340

echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
5341
if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5342
    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
Sam Hocevar's avatar
Sam Hocevar committed
5343 5344
    # this plugin does not compile without -fomit-frame-pointer, damn gcc!
    chroma_i420_yuy2_mmx_CFLAGS="${chroma_i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer"
Sam Hocevar's avatar
 
Sam Hocevar committed
5345 5346
fi

5347
echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
5348
echo "configure:5349: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
5349 5350
if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5351
else
Christophe Massiot's avatar
Christophe Massiot committed
5352
  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
5353
     cat > conftest.$ac_ext <<EOF
5354
#line 5355 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5355 5356
#include "confdefs.h"

5357
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5358

5359 5360
; return 0; }
EOF
5361
if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5362
  rm -rf conftest*
5363
  ac_cv_ld_darwin=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5364
else
5365 5366 5367 5368
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_darwin=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5369
fi
5370
rm -f conftest*
5371
fi
5372 5373

echo "$ac_t""$ac_cv_ld_darwin" 1>&6
5374
if test "x${ac_cv_ld_darwin}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5375
    plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
5376
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5377

5378
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
5379
echo "configure:5380: checking if \$CC accepts -shared" >&5
5380 5381
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5382 5383
else
  CFLAGS="${save_CFLAGS} -shared"
5384
     cat > conftest.$ac_ext <<EOF
5385
#line 5386 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5386 5387
#include "confdefs.h"

5388
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5389

5390 5391
; return 0; }
EOF
5392
if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5393
  rm -rf conftest*
5394
  ac_cv_ld_plugins=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5395
else
5396 5397 5398 5399
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_plugins=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5400
fi
5401
rm -f conftest*
5402
fi
5403 5404

echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5405
if test "x${ac_cv_ld_plugins}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5406
    plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
5407
fi
5408 5409
        
echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
5410
echo "configure:5411: checking for variadic cpp macros" >&5
5411 5412
if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5413 5414
else
  CFLAGS="${save_CFLAGS}"
5415
     cat > conftest.$ac_ext <<EOF
5416
#line 5417 "configure"
5417 5418 5419
#include "confdefs.h"
#include <stdio.h>
          #define a(b,c...) printf(b,##c)
5420
int main() {
5421
a("foo");a("%s","bar");a("%s%s","baz","quux");
5422 5423
; return 0; }
EOF
5424
if { (eval echo configure:5425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5425
  rm -rf conftest*
5426 5427
  ac_cv_cpp_variadic_macros=yes
else
5428 5429 5430 5431
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_variadic_macros=no
5432
fi
5433
rm -f conftest*
5434
fi
5435

5436
echo "$ac_t""$ac_cv_cpp_variadic_macros" 1>&6
5437
if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
5438
    cat >> confdefs.h <<\EOF
5439
#define HAVE_VARIADIC_MACROS 1
5440
EOF
5441 5442 5443

fi

5444
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
5445
echo "configure:5446: checking __attribute__ ((aligned ())) support" >&5
5446 5447
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5448 5449
else
  ac_cv_c_attribute_aligned=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5450
        CFLAGS="${save_CFLAGS} -Werror"
5451
    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5452
        cat > conftest.$ac_ext <<EOF
5453
#line 5454 "configure"
5454 5455
#include "confdefs.h"

5456
int main() {
5457
static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;
5458 5459
; return 0; }
EOF
5460
if { (eval echo configure:5461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5461
  rm -rf conftest*
5462
  ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"
5463
else
5464 5465
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
5466
fi
5467
rm -f conftest*
5468
    done
5469
        CFLAGS="${save_CFLAGS}"
5470
fi
5471

5472
echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
5473
if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
5474
    cat >> confdefs.h <<EOF
5475
#define ATTRIBUTE_ALIGNED_MAX ${ac_cv_c_attribute_aligned}
5476
EOF
5477 5478 5479

fi

5480
case "x${target_cpu}" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5481 5482 5483 5484
  x)
    ARCH=unknown
    ;;
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
5485
    ARCH="${target_cpu}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5486 5487
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
5488

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

Sam Hocevar's avatar
 
Sam Hocevar committed
5492
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
5493 5494
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
Gildas Bazin's avatar
 
Gildas Bazin committed
5495
SSE_MODULES="imdctsse downmixsse"
5496
ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5497

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

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

echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5525
if test "x${ac_cv_mmx_inline}" != "xno"; then
5526 5527
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5528

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

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

echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5556
if test "x${ac_cv_mmxext_inline}" != "xno"; then
5557 5558
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5559

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

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

5586
echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5587
if test "x${ac_cv_3dnow_inline}" != "xno"; then
5588
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5589
#define CAN_COMPILE_3DNOW 1
5590
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5591

5592 5593
  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5594

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

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

5621
echo "$ac_t""$ac_cv_sse_inline" 1>&6
5622
if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
5623
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5624
#define CAN_COMPILE_SSE 1
5625
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5626

5627 5628 5629
  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi

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

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

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

5678
echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5679
if test "x${ac_cv_altivec_inline}" != "xno"; then
5680
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5681
#define CAN_COMPILE_ALTIVEC 1
5682
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5683

5684 5685 5686 5687 5688
  if test "x${ac_cv_altivec_inline}" != "xyes"; then
    idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_altivec_inline}"
    motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_altivec_inline}"
    memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_altivec_inline}"
    vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_altivec_inline}"
5689
  fi
5690 5691
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
5692

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

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

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

5742
echo "$ac_t""$ac_cv_c_altivec" 1>&6
5743
if test "x${ac_cv_c_altivec}" != "xno"; then
5744
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5745
#define CAN_COMPILE_C_ALTIVEC 1
5746
EOF
5747

5748 5749 5750 5751
  idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_c_altivec}"
  motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_c_altivec}"
  memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_c_altivec}"
  vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_c_altivec}"
5752
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5753 5754
fi

5755
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5756
echo "configure:5757: checking if linker needs -framework vecLib" >&5
5757 5758
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5759
else
5760
  LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5761
     cat > conftest.$ac_ext <<EOF
5762
#line 5763 "configure"
5763 5764
#include "confdefs.h"

5765
int main() {
5766

5767 5768
; return 0; }
EOF
5769
if { (eval echo configure:5770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5770
  rm -rf conftest*
5771 5772
  ac_cv_ld_altivec=yes
else
5773 5774 5775 5776
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_altivec=no
5777
fi
5778
rm -f conftest*
5779
     LDFLAGS="${save_LDFLAGS}"
5780
    
5781
fi
5782 5783

echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5784
if test "x${ac_cv_ld_altivec}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5785 5786 5787 5788
  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5789
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
5790
fi # end if mingw32
Sam Hocevar's avatar
 
Sam Hocevar committed
5791

5792

Sam Hocevar's avatar
 
Sam Hocevar committed
5793 5794 5795
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5796 5797
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5798

Sam Hocevar's avatar
 
Sam Hocevar committed
5799 5800 5801
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5802 5803
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5804

Sam Hocevar's avatar
 
Sam Hocevar committed
5805 5806 5807 5808

# Check whether --with-tuning or --without-tuning was given.
if test "${with_tuning+set}" = set; then
  withval="$with_tuning"
5809 5810
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5811

5812 5813
if test "x${with_tuning}" != "x"; then
    TUNING="${with_tuning}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5814
else
5815
    if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then TUNING="pentiumpro"
Sam Hocevar's avatar
 
Sam Hocevar committed
5816
    else
5817
        if test "x${target_cpu}" = "xpowerpc"; then TUNING="750"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5818 5819 5820
    fi
fi

5821
if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
Sam Hocevar's avatar
 
Sam Hocevar committed
5822 5823
then
    ARCH="${ARCH} mmx"
Sam Hocevar's avatar
Sam Hocevar committed
5824
    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5825 5826 5827 5828 5829
fi

# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
5830
   if test "x${enable_optimizations}" = "xno"; then OPTIMS=0; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5831
else
5832 5833 5834
   OPTIMS=1 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5835 5836 5837 5838

# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
5839
   if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
5840
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5841
else
5842
   if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
5843 5844 5845
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5846 5847 5848 5849 5850

DEBUG=0
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
5851
   if test "x${enable_debug}" = "xyes"; then DEBUG=1; fi 
5852 5853
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5854

Sam Hocevar's avatar
 
Sam Hocevar committed
5855
RELEASE=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5856 5857 5858
# Check whether --enable-release or --disable-release was given.
if test "${enable_release+set}" = set; then
  enableval="$enable_release"
5859
   if test "x${enable_release}" = "xyes"; then RELEASE=1; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5860
else
5861 5862
   VERSION="${VERSION}_`date +%Y-%m-%d`" 
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5863 5864 5865 5866 5867 5868



# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5869 5870
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5871 5872 5873 5874 5875


# Check whether --enable-dvd or --disable-dvd was given.
if test "${enable_dvd+set}" = set; then
  enableval="$enable_dvd"
5876 5877
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5878

5879
if test "x${enable_dvd}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
5880
then
5881
  # Check whether --with-dvdcss or --without-dvdcss was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5882 5883
if test "${with_dvdcss+set}" = set; then
  withval="$with_dvdcss"
5884 5885
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5886

5887
  # Check whether --with-dvdcss-tree or --without-dvdcss-tree was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5888 5889
if test "${with_dvdcss_tree+set}" = set; then
  withval="$with_dvdcss_tree"
5890 5891
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5892

5893
  case "x${with_dvdcss}" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5894
  x|xyes)
5895
    if test "x${with_dvdcss_tree}" = x
Sam Hocevar's avatar
 
Sam Hocevar committed
5896
    then
5897
      for ac_hdr in dvdcss/dvdcss.h
5898
do
5899 5900
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5901
echo "configure:5902: checking for $ac_hdr" >&5
5902 5903
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5904
else
5905
  cat > conftest.$ac_ext <<EOF
5906
#line 5907 "configure"
5907 5908 5909 5910
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5911
{ (eval echo configure:5912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5912 5913 5914 5915 5916 5917 5918
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
5919
  cat conftest.$ac_ext >&5
5920 5921
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
5922
fi
5923
rm -f conftest*
5924
fi
5925 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
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5931
  PLUGINS="${PLUGINS} dvd"
5932
          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
Sam Hocevar's avatar
 
Sam Hocevar committed
5933
else
5934 5935 5936
  echo "$ac_t""no" 1>&6
echo "configure: warning: libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin." 1>&2
          { echo "configure: error: cannot find libdvdcss headers" 1>&2; exit 1; } 
Sam Hocevar's avatar
 
Sam Hocevar committed
5937 5938 5939
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
5940
    else
5941
      echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
5942
echo "configure:5943: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5943
      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
5944
      if test "x${real_dvdcss_tree}" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
5945
      then
5946 5947
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot cd to ${with_dvdcss_tree}" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5948 5949 5950
      fi
      if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
      then
5951
                echo "$ac_t""${real_dvdcss_tree}/src/.libs/libdvdcss.a" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5952
        BUILTINS="${BUILTINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5953 5954
        dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
        dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
Sam Hocevar's avatar
 
Sam Hocevar committed
5955
      else
5956 5957
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5958 5959
      fi
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5960 5961
  ;;
  xno)
Sam Hocevar's avatar
 
Sam Hocevar committed
5962
        PLUGINS="${PLUGINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5963 5964
    dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
5965 5966
  ;;
  *)
5967
    echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
5968
echo "configure:5969: checking for dvdcss headers in ${with_dvdcss}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5969
    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
Sam Hocevar's avatar
 
Sam Hocevar committed
5970
    then
5971
            echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5972
      PLUGINS="${PLUGINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5973 5974
      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
5975
    else
5976 5977
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5978 5979 5980 5981 5982 5983 5984 5985
    fi
  ;;
  esac
fi

# Check whether --enable-dvdread or --disable-dvdread was given.
if test "${enable_dvdread+set}" = set; then
  enableval="$enable_dvdread"
5986 5987
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5988

5989
if test "x${enable_dvdread}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
5990
then
5991
  # Check whether --with-dvdread or --without-dvdread was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5992 5993
if test "${with_dvdread+set}" = set; then
  withval="$with_dvdread"
5994 5995
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5996

5997
  if test "x${with_dvdread}" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
5998 5999 6000 6001
  then
    test_LDFLAGS=""
    test_CFLAGS=""
  else
6002 6003
    test_LDFLAGS="-L${with_dvdread}/lib"
    test_CFLAGS="-I${with_dvdread}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
6004
  fi
6005
  CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
6006
  for ac_hdr in dvdread/dvd_reader.h
6007
do
6008 6009
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6010
echo "configure:6011: checking for $ac_hdr" >&5
6011 6012
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6013
else
6014
  cat > conftest.$ac_ext <<EOF
6015
#line 6016 "configure"
6016 6017 6018 6019
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6020
{ (eval echo configure:6021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6021 6022 6023 6024 6025 6026 6027
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
6028
  cat conftest.$ac_ext >&5
6029 6030
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6031
fi
6032
rm -f conftest*
6033
fi
6034 6035 6036 6037 6038 6039 6040 6041
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
6042
#line 6043 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6043 6044
#include "confdefs.h"
#include <dvdread/dvd_reader.h>
6045
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
6046
void foo() { int i=DVD_VIDEO_LB_LEN; }
6047 6048
; return 0; }
EOF
6049
if { (eval echo configure:6050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6050 6051
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6052 6053 6054
          PLUGINS="${PLUGINS} dvdread"
          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
6055
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6056
else
6057 6058 6059 6060
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
6061
          if test "x${enable_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6062
          then
6063
            { echo "configure: error: Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6064
          fi
6065
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6066
fi
6067 6068
rm -f conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6069
else
6070
  echo "$ac_t""no" 1>&6
6071
if test "x${enable_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6072
    then
6073
      if test "x${with_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6074
      then
6075
        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6076
      else
6077
        { echo "configure: error: Cannot find dvdread/dvd_reader.h" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6078 6079
      fi
    fi
6080
  
6081 6082 6083
fi
done

6084
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
6085 6086
fi

6087 6088 6089
# Check whether --enable-dvbpsi or --disable-dvbpsi was given.
if test "${enable_dvbpsi+set}" = set; then
  enableval="$enable_dvbpsi"
6090 6091
  :
fi
6092

6093
if test "x${enable_dvbpsi}" != "xno"
6094
then
6095
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
6096 6097
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
6098 6099
  :
fi
6100

6101 6102 6103 6104 6105 6106
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
  :
fi

6107
  case "x${with_dvbpsi}" in
6108
  x|xyes)
6109
    if test "x${with_dvbpsi_tree}" = "x"
6110
    then
Sam Hocevar's avatar
Sam Hocevar committed
6111
      for ac_hdr in dvbpsi/dr.h
6112 6113 6114
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6115
echo "configure:6116: checking for $ac_hdr" >&5
6116 6117 6118 6119
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
6120
#line 6121 "configure"
6121
#include "confdefs.h"
6122
#include <$ac_hdr>
6123 6124
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6125
{ (eval echo configure:6126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6126 6127 6128 6129 6130 6131 6132
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
6133
  cat conftest.$ac_ext >&5
6134 6135
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6136
fi
6137
rm -f conftest*
6138
fi
6139 6140
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
6141 6142 6143 6144
    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
6145
  PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
6146
          mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} -ldvbpsi" 
6147
else
6148
  echo "$ac_t""no" 1>&6
6149 6150
fi
done
6151

6152 6153
    else
      echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
6154
echo "configure:6155: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
6155
      real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
6156
      if test "x${real_dvbpsi_tree}" = "x"
6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176
      then
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot cd to ${with_dvbpsi_tree}" 1>&2; exit 1; }
      fi
      if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
      then
                echo "$ac_t""${real_dvbpsi_tree}/src/.libs/libdvbpsi.a" 1>&6
        BUILTINS="${BUILTINS} mpeg_ts_dvbpsi"
        mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
        mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
      else
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}" 1>&2; exit 1; }
      fi
    fi
  ;;
  xno)
      ;;
  *)
    echo $ac_n "checking for dvbpsi headers in ${with_dvbpsi}""... $ac_c" 1>&6
6177 6178
echo "configure:6178: checking for dvbpsi headers in ${with_dvbpsi}" >&5
    if test "x${with_dvbpsi}" = "x"
6179
    then
6180 6181 6182 6183 6184
      test_LDFLAGS=""
      test_CFLAGS=""
    else
      test_LDFLAGS="-L${with_dvbpsi}/lib"
      test_CFLAGS="-I${with_dvbpsi}/include"
6185
    fi
6186
    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
6187 6188
    ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
6189
echo "configure:6190: checking for dvbpsi/dr.h" >&5
6190 6191 6192 6193
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
6194
#line 6195 "configure"
6195 6196 6197 6198
#include "confdefs.h"
#include <dvbpsi/dr.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6199
{ (eval echo configure:6200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214
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
6215
  
6216 6217 6218 6219 6220 6221 6222
      PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
      mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
      mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
      
else
  echo "$ac_t""no" 1>&6

6223
      if test "x${enable_dvbpsi}" != "x"
6224 6225 6226 6227
      then
        { echo "configure: error: Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1" 1>&2; exit 1; }
      fi
    
6228 6229
fi

6230
    CPPFLAGS="${save_CPPFLAGS}"
6231 6232
  ;;
  esac
6233
fi
6234

Sam Hocevar's avatar
 
Sam Hocevar committed
6235 6236 6237
# Check whether --enable-vcd or --disable-vcd was given.
if test "${enable_vcd+set}" = set; then
  enableval="$enable_vcd"
6238 6239
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6240

Sam Hocevar's avatar
 
Sam Hocevar committed
6241

6242
if test "x${enable_vcd}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6243
then
6244
  cat > conftest.$ac_ext <<EOF
6245
#line 6246 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6246 6247
#include "confdefs.h"
#include <linux/cdrom.h>
6248
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6249
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
6250
  egrep "cdrom_msf0" >/dev/null 2>&1; then
6251 6252
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6253
    PLUGINS="${PLUGINS} vcd"
6254
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6255 6256 6257
fi
rm -f conftest*

6258 6259
  
  cat > conftest.$ac_ext <<EOF
6260
#line 6261 "configure"
6261 6262
#include "confdefs.h"
#include <sys/cdio.h>
6263
EOF
6264 6265
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ioc_toc_header " >/dev/null 2>&1; then
6266 6267
  rm -rf conftest*
  
6268
    PLUGINS="${PLUGINS} vcd"
6269
    cat >> confdefs.h <<\EOF
6270
#define HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H 1
6271
EOF
6272

6273
  
6274 6275 6276
fi
rm -f conftest*

6277
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6278 6279 6280 6281
  if test "x${SYS}" = "xbsdi"
  then
    PLUGINS="${PLUGINS} vcd"
  fi
6282

Sam Hocevar's avatar
 
Sam Hocevar committed
6283 6284
  if test "x${SYS}" = "xdarwin"
  then
6285
    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
6286
    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
Sam Hocevar's avatar
 
Sam Hocevar committed
6287
  fi
6288 6289
fi

Johan Bilien's avatar
Johan Bilien committed
6290 6291 6292
# Check whether --enable-satellite or --disable-satellite was given.
if test "${enable_satellite+set}" = set; then
  enableval="$enable_satellite"
6293
   if test "x${enable_satellite}" = "xyes"
Johan Bilien's avatar
Johan Bilien committed
6294
    then
6295
      PLUGINS="${PLUGINS} satellite"
Johan Bilien's avatar
Johan Bilien committed
6296
    fi
6297 6298
fi

Johan Bilien's avatar
Johan Bilien committed
6299

6300
if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
6301
then
6302
  echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
6303
echo "configure:6304: checking for inet_pton" >&5
6304 6305
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6306
else
6307
  cat > conftest.$ac_ext <<EOF
6308
#line 6309 "configure"
6309
#include "confdefs.h"
6310
/* System header to define __stub macros and hopefully few prototypes,
6311
    which can conflict with char inet_pton(); below.  */
6312 6313 6314
#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
6315 6316 6317 6318
    builtin and then its argument prototype would still apply.  */
char inet_pton();

int main() {
6319 6320 6321 6322 6323 6324 6325

/* 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_pton) || defined (__stub___inet_pton)
choke me
#else
6326
inet_pton();
6327 6328
#endif

6329 6330
; return 0; }
EOF
6331
if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344
  rm -rf conftest*
  eval "ac_cv_func_inet_pton=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_inet_pton=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
6345
  PLUGINS="${PLUGINS} ipv6"
6346 6347
else
  echo "$ac_t""no" 1>&6
6348 6349

    echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
6350
echo "configure:6351: checking for inet_pton in -lresolv" >&5
6351 6352 6353 6354 6355 6356 6357
ac_lib_var=`echo resolv'_'inet_pton | 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="-lresolv  $LIBS"
cat > conftest.$ac_ext <<EOF
6358
#line 6359 "configure"
6359 6360 6361 6362 6363 6364 6365 6366 6367 6368
#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 inet_pton();

int main() {
inet_pton()
; return 0; }
EOF
6369
if { (eval echo configure:6370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390
  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
  PLUGINS="${PLUGINS} ipv6"
       ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"
else
  echo "$ac_t""no" 1>&6
fi

  
6391
fi
6392

Gildas Bazin's avatar
 
Gildas Bazin committed
6393
fi
6394
if test "x${SYS}" = "xmingw32"
Gildas Bazin's avatar
 
Gildas Bazin committed
6395 6396
then
  echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
6397
echo "configure:6398: checking for getaddrinfo in ws2tcpip.h" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6398
  cat > conftest.$ac_ext <<EOF
6399
#line 6400 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413
#include "confdefs.h"
#include <ws2tcpip.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "addrinfo" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
    PLUGINS="${PLUGINS} ipv6"
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

6414
fi
6415

6416 6417 6418
# Check whether --enable-avi or --disable-avi was given.
if test "${enable_avi+set}" = set; then
  enableval="$enable_avi"
6419 6420
  :
fi
6421

6422
if test "x${enable_avi}" != "xno"
6423 6424 6425 6426
then
  PLUGINS="${PLUGINS} avi"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6427 6428 6429 6430

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

Sam Hocevar's avatar
 
Sam Hocevar committed
6434

Sam Hocevar's avatar
 
Sam Hocevar committed
6435 6436 6437
# Check whether --enable-mad or --disable-mad was given.
if test "${enable_mad+set}" = set; then
  enableval="$enable_mad"
6438 6439
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6440

6441
if test "x${enable_mad}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
6442
then
6443
  # Check whether --with-mad or --without-mad was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6444 6445
if test "${with_mad+set}" = set; then
  withval="$with_mad"
6446 6447
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6448

6449
  if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6450
  then
6451 6452
    mad_CFLAGS="${mad_CFLAGS} -I${with_mad}/include"
    mad_LDFLAGS="${mad_LDFLAGS} -L${with_mad}/lib"
Gildas Bazin's avatar
 
Gildas Bazin committed
6453 6454
  fi

6455
  # Check whether --with-mad-tree or --without-mad-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6456 6457
if test "${with_mad_tree+set}" = set; then
  withval="$with_mad_tree"
6458 6459
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6460

6461
  if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6462 6463
  then
    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
6464
    if test "x${real_mad_tree}" = "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6465
    then
6466 6467
            echo "$ac_t""no" 1>&6
      { echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6468
    fi
6469
        echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
6470
echo "configure:6471: checking for mad.h in ${real_mad_tree}/libmad" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6471 6472
    if test -f ${real_mad_tree}/libmad/mad.h
    then
6473
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6474 6475
      mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
      mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
6476
      LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
6477
      echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6478
echo "configure:6479: checking for mad_bit_init in -lmad" >&5
6479 6480 6481
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
Gildas Bazin's avatar
 
Gildas Bazin committed
6482
else
6483
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6484
LIBS="-lmad  $LIBS"
6485
cat > conftest.$ac_ext <<EOF
6486
#line 6487 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6487 6488 6489
#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
6490 6491 6492 6493 6494 6495 6496
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
6497
if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498 6499 6500 6501 6502 6503 6504 6505 6506 6507
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6508

6509 6510 6511 6512
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
Gildas Bazin's avatar
 
Gildas Bazin committed
6513 6514
        BUILTINS="${BUILTINS} mad"
        mad_LDFLAGS="${mad_LDFLAGS} -lmad"
6515
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6516
else
6517 6518 6519
  echo "$ac_t""no" 1>&6
 { echo "configure: error: the specified tree hasn't been compiled " 1>&2; exit 1; }
      
Gildas Bazin's avatar
 
Gildas Bazin committed
6520 6521
fi

6522
      LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6523
    else
6524 6525
      echo "$ac_t""no" 1>&6
      { echo "configure: error: the specified tree doesn't have mad.h" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6526 6527
    fi
  else
6528 6529
    CFLAGS="${save_CFLAGS} ${mad_CFLAGS}"
    LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
6530
    for ac_hdr in mad.h
6531
do
6532 6533
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6534
echo "configure:6535: checking for $ac_hdr" >&5
6535 6536
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6537
else
6538
  cat > conftest.$ac_ext <<EOF
6539
#line 6540 "configure"
6540 6541 6542 6543
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6544
{ (eval echo configure:6545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6545 6546 6547 6548 6549 6550 6551
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
6552
  cat conftest.$ac_ext >&5
6553 6554
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6555
fi
6556
rm -f conftest*
6557
fi
6558 6559 6560 6561 6562 6563 6564
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
 
6565
else
6566 6567
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find development headers for libmad..." 1>&2; exit 1; } 
6568 6569 6570
fi
done

6571
    echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6572
echo "configure:6573: checking for mad_bit_init in -lmad" >&5
6573 6574 6575
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
6576
else
6577
  ac_save_LIBS="$LIBS"
6578
LIBS="-lmad  $LIBS"
6579
cat > conftest.$ac_ext <<EOF
6580
#line 6581 "configure"
6581 6582 6583
#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
6584 6585 6586 6587 6588 6589 6590
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
6591
if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605
  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
6606 6607 6608
  
      PLUGINS="${PLUGINS} mad"
      mad_LDFLAGS="${mad_LDFLAGS} -lmad" 
6609
else
6610 6611
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libmad library..." 1>&2; exit 1; } 
6612 6613
fi

6614 6615
    CFLAGS="${save_CFLAGS}"
    LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6616
  fi
6617 6618
fi

6619 6620 6621
# Check whether --enable-ffmpeg or --disable-ffmpeg was given.
if test "${enable_ffmpeg+set}" = set; then
  enableval="$enable_ffmpeg"
6622 6623
  :
fi
6624

6625
if test "x${enable_ffmpeg}" = "xyes"
6626
then
6627 6628 6629 6630 6631 6632
  # Check whether --with-ffmpeg or --without-ffmpeg was given.
if test "${with_ffmpeg+set}" = set; then
  withval="$with_ffmpeg"
  :
fi

6633
  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
6634
  then
6635 6636
    ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${with_ffmpeg}/include/libffmpeg"
    ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L${with_ffmpeg}/lib"
6637 6638
  fi

6639
  # Check whether --with-ffmpeg-tree or --without-ffmpeg-tree was given.
6640 6641
if test "${with_ffmpeg_tree+set}" = set; then
  withval="$with_ffmpeg_tree"
6642 6643
  :
fi
6644

6645
  if test "x${with_ffmpeg_tree}" != "x"
6646
  then
6647
    echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
6648
echo "configure:6649: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
6649
    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
6650
    if test "x${real_ffmpeg_tree}" = x
6651
    then
6652 6653
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot cd to ${with_ffmpeg_tree}" 1>&2; exit 1; }
6654 6655 6656
    fi
    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
    then
6657
            echo "$ac_t""${real_ffmpeg_tree}/libavcodec/libavcodec.a" 1>&6
6658
      BUILTINS="${BUILTINS} ffmpeg"
6659
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
6660 6661
      ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
    else
6662 6663
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}" 1>&2; exit 1; }
6664
    fi
6665
  else
6666 6667
    CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
6668
    echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
6669
echo "configure:6670: checking for avcodec_init in -lavcodec" >&5
6670 6671 6672 6673 6674 6675 6676
ac_lib_var=`echo avcodec'_'avcodec_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="-lavcodec  $LIBS"
cat > conftest.$ac_ext <<EOF
6677
#line 6678 "configure"
6678 6679 6680 6681 6682 6683 6684 6685 6686 6687
#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 avcodec_init();

int main() {
avcodec_init()
; return 0; }
EOF
6688
if { (eval echo configure:6689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702
  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
6703 6704
  
      BUILTINS="${BUILTINS} ffmpeg"
6705
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" 
6706 6707 6708 6709 6710
else
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libavcodec library..." 1>&2; exit 1; } 
fi

6711 6712
    LDFLAGS="${save_LDFLAGS}"
    CFLAGS="${save_CFLAGS}"
6713 6714 6715 6716
  fi
fi


6717
if test "x${SYS}" = "xbeos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6718
then
Sam Hocevar's avatar
 
Sam Hocevar committed
6719
    PLUGINS="${PLUGINS} beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6720
fi
6721

Sam Hocevar's avatar
 
Sam Hocevar committed
6722 6723 6724
# Check whether --enable-a52 or --disable-a52 was given.
if test "${enable_a52+set}" = set; then
  enableval="$enable_a52"
6725 6726
  :
fi
6727

6728
if test "x${enable_a52}" != "xno"
Gildas Bazin's avatar
 
Gildas Bazin committed
6729
then
6730
  # Check whether --with-a52-tree or --without-a52-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6731 6732
if test "${with_a52_tree+set}" = set; then
  withval="$with_a52_tree"
6733 6734
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6735

6736
  if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6737
  then
Gildas Bazin's avatar
 
Gildas Bazin committed
6738
    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
6739
    if test "x${real_a52_tree}" = "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6740
    then
6741 6742
            echo "$ac_t""no" 1>&6
      { echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6743
    fi
6744
        echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
6745
echo "configure:6746: checking for a52.h in ${real_a52_tree}/include" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6746 6747
    if test -f ${real_a52_tree}/include/a52.h
    then
6748
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6749 6750
      a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
      a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
6751
      LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
6752
      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
6753
echo "configure:6754: checking for a52_free in -la52" >&5
6754 6755 6756
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6757
else
6758
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6759
LIBS="-la52 -lm $LIBS"
6760
cat > conftest.$ac_ext <<EOF
6761
#line 6762 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6762 6763 6764
#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
6765 6766 6767 6768 6769 6770 6771
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
6772
if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773 6774 6775 6776 6777 6778 6779 6780 6781 6782
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6783

6784 6785 6786 6787
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
Gildas Bazin's avatar
 
Gildas Bazin committed
6788 6789 6790
        BUILTINS="${BUILTINS} a52"
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
6791
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6792
else
6793
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6794 6795 6796

        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
        then
6797
          { echo "configure: error: make sure you have at least a52dec-0.7.3" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6798
        else
6799
          { echo "configure: error: the specified tree hasn't been compiled" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6800
        fi
6801
      
Gildas Bazin's avatar
 
Gildas Bazin committed
6802 6803
fi

6804
      LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6805
    else
6806 6807
      echo "$ac_t""no" 1>&6
      { echo "configure: error: the specified tree doesn't have a52.h" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6808
    fi
6809
  else     for ac_hdr in a52dec/a52.h
6810
do
6811 6812
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6813
echo "configure:6814: checking for $ac_hdr" >&5
6814 6815
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6816
else
6817
  cat > conftest.$ac_ext <<EOF
6818
#line 6819 "configure"
6819 6820 6821 6822
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6823
{ (eval echo configure:6824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6824 6825 6826 6827 6828 6829 6830
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
6831
  cat conftest.$ac_ext >&5
6832 6833
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
6834
fi
6835
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6836
fi
6837 6838 6839 6840 6841 6842 6843 6844
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
 
      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
6845
echo "configure:6846: checking for a52_free in -la52" >&5
6846 6847 6848 6849 6850
ac_lib_var=`echo a52'_'a52_free | 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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6851
LIBS="-la52 -lm $LIBS"
6852
cat > conftest.$ac_ext <<EOF
6853
#line 6854 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6854 6855 6856
#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
6857 6858 6859 6860 6861 6862 6863
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
6864
if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6865 6866 6867 6868 6869 6870 6871 6872 6873 6874
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6875

6876 6877 6878 6879
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
Gildas Bazin's avatar
 
Gildas Bazin committed
6880 6881 6882
        BUILTINS="${BUILTINS} a52"
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS}"
6883 6884 6885
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6886 6887
fi

6888 6889 6890
    
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6891
fi
6892
done
Gildas Bazin's avatar
 
Gildas Bazin committed
6893 6894

  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6895
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6896

Sam Hocevar's avatar
 
Sam Hocevar committed
6897 6898 6899
# Check whether --enable-vorbis or --disable-vorbis was given.
if test "${enable_vorbis+set}" = set; then
  enableval="$enable_vorbis"
6900 6901
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6902

6903
if test "x${enable_vorbis}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6904
then
6905
  for ac_hdr in ogg/ogg.h
Sam Hocevar's avatar
 
Sam Hocevar committed
6906
do
6907 6908
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6909
echo "configure:6910: checking for $ac_hdr" >&5
6910 6911
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6912
else
6913
  cat > conftest.$ac_ext <<EOF
6914
#line 6915 "configure"
6915 6916 6917 6918
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6919
{ (eval echo configure:6920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6920 6921 6922 6923 6924 6925 6926
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
6927
  cat conftest.$ac_ext >&5
6928 6929
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
6930
fi
6931
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6932
fi
6933 6934 6935 6936 6937 6938 6939
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
 
6940
        #PLUGINS="${PLUGINS} vorbis"
Sam Hocevar's avatar
 
Sam Hocevar committed
6941
    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
6942 6943 6944
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6945 6946 6947 6948 6949
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6950

Sam Hocevar's avatar
 
Sam Hocevar committed
6951 6952 6953
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
6954 6955
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6956

Sam Hocevar's avatar
 
Sam Hocevar committed
6957

Sam Hocevar's avatar
 
Sam Hocevar committed
6958 6959 6960
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
6961 6962
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6963

6964 6965 6966
if test "x${enable_x11}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
6967
  for ac_hdr in X11/Xlib.h
6968
do
6969 6970
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6971
echo "configure:6972: checking for $ac_hdr" >&5
6972 6973
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6974
else
6975
  cat > conftest.$ac_ext <<EOF
6976
#line 6977 "configure"
6977 6978 6979 6980
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6981
{ (eval echo configure:6982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6982 6983 6984 6985 6986 6987 6988
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
6989
  cat conftest.$ac_ext >&5
6990 6991
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6992
fi
6993
rm -f conftest*
6994
fi
6995 6996 6997 6998 6999 7000 7001
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
7002
    PLUGINS="${PLUGINS} x11"
7003 7004
    x11_LDFLAGS="${x11_LDFLAGS} -L${x_libraries} -lX11 -lXext"
    x11_CFLAGS="${x11_CFLAGS} -I${x_includes}"
7005 7006 7007
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7008
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7009
done
Sam Hocevar's avatar
 
Sam Hocevar committed
7010

7011
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
7012 7013
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7014 7015 7016
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
7017 7018
  :
fi
7019

7020 7021 7022
if test "x${enable_xvideo}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
7023
  for ac_hdr in X11/extensions/Xv.h
7024
do
7025 7026
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7027
echo "configure:7028: checking for $ac_hdr" >&5
7028 7029
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7030
else
7031
  cat > conftest.$ac_ext <<EOF
7032
#line 7033 "configure"
7033 7034 7035 7036
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7037
{ (eval echo configure:7038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7038 7039 7040 7041 7042 7043 7044
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
7045
  cat conftest.$ac_ext >&5
7046 7047
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7048
fi
7049
rm -f conftest*
7050
fi
7051 7052 7053 7054 7055 7056 7057
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
 
7058
    CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
7059
    echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
7060
echo "configure:7061: checking for XvPutImage in -lXv_pic" >&5
7061
ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
7062 7063
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7064
else
7065
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7066
LIBS="-lXv_pic  $LIBS"
7067
cat > conftest.$ac_ext <<EOF
7068
#line 7069 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
7069
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7070 7071
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
7072
    builtin and then its argument prototype would still apply.  */
7073
char XvPutImage();
7074 7075

int main() {
7076
XvPutImage()
7077 7078
; return 0; }
EOF
7079
if { (eval echo configure:7080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093
  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
7094 7095
  # We have Xv_pic, that's good, we can build an xvideo.so plugin !
      PLUGINS="${PLUGINS} xvideo"
7096 7097
      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv_pic"
      xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
Sam Hocevar's avatar
 
Sam Hocevar committed
7098
else
7099
  echo "$ac_t""no" 1>&6
7100
echo $ac_n "checking for XvPutImage in -lXv""... $ac_c" 1>&6
7101
echo "configure:7102: checking for XvPutImage in -lXv" >&5
7102 7103 7104 7105 7106 7107 7108
ac_lib_var=`echo Xv'_'XvPutImage | 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="-lXv  $LIBS"
cat > conftest.$ac_ext <<EOF
7109
#line 7110 "configure"
7110 7111 7112 7113 7114 7115 7116 7117 7118 7119
#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 XvPutImage();

int main() {
XvPutImage()
; return 0; }
EOF
7120
if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136
  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
  # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
        PLUGINS="${PLUGINS} xvideo"
7137 7138
        xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv"
        xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
7139 7140 7141 7142 7143 7144 7145
else
  echo "$ac_t""no" 1>&6
# Otherwise... well, do nothing.
      
fi

    
Sam Hocevar's avatar
 
Sam Hocevar committed
7146 7147
fi

7148
    CFLAGS="${save_CFLAGS}"
7149
  
7150
  CPPFLAGS="${save_CPPFLAGS}"
7151 7152
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7153 7154 7155 7156 7157
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7158 7159 7160
# Check whether --enable-sdl or --disable-sdl was given.
if test "${enable_sdl+set}" = set; then
  enableval="$enable_sdl"
7161 7162
  :
fi
7163

7164
if test "x${enable_sdl}" != "xno"
7165
then
7166
  SDL_PATH="${PATH}"
7167
  # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7168 7169
if test "${with_sdl_config_path+set}" = set; then
  withval="$with_sdl_config_path"
7170
   if test "x${with_sdl_config_path}" != "xno"
7171
      then
7172
        SDL_PATH="${with_sdl_config_path}:${PATH}"
7173 7174 7175
      fi 
fi

7176 7177
  # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
7178
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7179
echo "configure:7180: checking for $ac_word" >&5
7180 7181
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7182
else
7183 7184
  case "$SDL12_CONFIG" in
  /*)
7185
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7186
  ;;
7187 7188 7189
  ?:/*)			 
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
  ;;
7190
  *)
7191
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7192
  ac_dummy="${SDL_PATH}"
7193 7194 7195 7196 7197 7198 7199 7200
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
7201
  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7202 7203 7204
  ;;
esac
fi
7205
SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7206
if test -n "$SDL12_CONFIG"; then
7207
  echo "$ac_t""$SDL12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7208
else
7209
  echo "$ac_t""no" 1>&6
7210
fi
7211

7212
  SDL_CONFIG="${SDL12_CONFIG}"
7213
  SDL_HEADER="SDL12/SDL.h"
7214
  if test "x${SDL_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7215
  then
7216 7217
    # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
7218
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7219
echo "configure:7220: checking for $ac_word" >&5
7220 7221
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7222
else
7223 7224
  case "$SDL11_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7225
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7226
  ;;
7227 7228 7229
  ?:/*)			 
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
  ;;
7230
  *)
7231
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7232
  ac_dummy="${SDL_PATH}"
7233 7234 7235 7236 7237 7238 7239 7240
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7241
  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7242 7243
  ;;
esac
7244
fi
7245
SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7246
if test -n "$SDL11_CONFIG"; then
7247
  echo "$ac_t""$SDL11_CONFIG" 1>&6
7248
else
7249
  echo "$ac_t""no" 1>&6
7250 7251
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7252
    SDL_CONFIG=${SDL11_CONFIG}
7253 7254
    SDL_HEADER="SDL11/SDL.h"
  fi
7255
  if test "x${SDL_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7256
  then
7257 7258
    # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
7259
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7260
echo "configure:7261: checking for $ac_word" >&5
7261 7262
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7263
else
7264 7265
  case "$SDL_CONFIG" in
  /*)
7266
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7267
  ;;
7268 7269 7270
  ?:/*)			 
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
  ;;
7271
  *)
7272
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7273
  ac_dummy="${SDL_PATH}"
7274 7275 7276 7277 7278 7279 7280 7281
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
7282
  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7283 7284 7285
  ;;
esac
fi
7286
SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7287
if test -n "$SDL_CONFIG"; then
7288
  echo "$ac_t""$SDL_CONFIG" 1>&6
7289
else
7290
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7291 7292
fi

7293
    SDL_HEADER="SDL/SDL.h"
7294
  fi
7295
  if test "x${SDL_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7296
  then
7297
    PLUGINS="${PLUGINS} sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7298 7299
    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
7300
    CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
7301
    for ac_hdr in ${SDL_HEADER}
7302
do
7303 7304
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7305
echo "configure:7306: checking for $ac_hdr" >&5
7306 7307
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7308
else
7309
  cat > conftest.$ac_ext <<EOF
7310
#line 7311 "configure"
7311 7312 7313 7314
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7315
{ (eval echo configure:7316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7316 7317 7318 7319 7320 7321 7322
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
7323
  cat conftest.$ac_ext >&5
7324 7325
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7326
fi
7327
rm -f conftest*
7328
fi
7329 7330 7331 7332 7333 7334 7335
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 >> confdefs.h <<EOF
7336
#define SDL_INCLUDE_FILE <${SDL_HEADER}>
7337
EOF
7338

Sam Hocevar's avatar
 
Sam Hocevar committed
7339
else
7340 7341 7342 7343 7344
  echo "$ac_t""no" 1>&6
{ 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; }
      
7345 7346 7347
fi
done

7348 7349
    CPPFLAGS="${save_CPPFLAGS}"
    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
7350
    then
7351
      { echo "configure: error: The development package for SDL is not installed.
7352
Please install it and try again. Alternatively you can also configure with
7353
--disable-sdl." 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7354
    fi
7355
  elif test "x${enable_sdl}" =  "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7356
  then
7357
    { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7358
from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7359
    " 1>&2; exit 1; }
7360 7361
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7362

7363 7364 7365
# Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval="$enable_directx"
7366 7367
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7368

7369
if test "x${enable_directx}" != "xno"
7370
then
7371
  if test "x${SYS}" = "xmingw32"
7372
  then
7373
    # Check whether --with-directx or --without-directx was given.
Xavier Marchesini's avatar
 
Xavier Marchesini committed
7374 7375
if test "${with_directx+set}" = set; then
  withval="$with_directx"
7376 7377
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7378

7379
    if test "x${with_directx}" = "x"
7380
    then
7381
      for ac_hdr in ddraw.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7382
do
7383 7384
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7385
echo "configure:7386: checking for $ac_hdr" >&5
7386 7387
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7388
else
7389
  cat > conftest.$ac_ext <<EOF
7390
#line 7391 "configure"
7391 7392 7393 7394
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7395
{ (eval echo configure:7396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7396 7397 7398 7399 7400 7401 7402
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
7403
  cat conftest.$ac_ext >&5
7404 7405
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7406
fi
7407
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7408
fi
7409 7410 7411 7412 7413 7414
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
7415
  PLUGINS="${PLUGINS} directx"
7416 7417 7418
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7419 7420 7421
fi
done

7422
    else
7423
      echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
7424
echo "configure:7425: checking for directX headers in ${with_directx}" >&5
7425
      if test -f ${with_directx}/ddraw.h
7426 7427
      then
        PLUGINS="${PLUGINS} directx"
Gildas Bazin's avatar
 
Gildas Bazin committed
7428
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
7429
        directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
7430
        echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7431
      else
7432 7433
        echo "$ac_t""no" 1>&6
        { echo "configure: error: Cannot find ${with_directx}/ddraw.h!" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
7434
      fi
7435 7436
    fi
  fi
7437 7438
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7439 7440 7441
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
7442 7443
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7444

7445
    if test "x${enable_fb}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7446
    then
7447
      for ac_hdr in linux/fb.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7448
do
7449 7450
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7451
echo "configure:7452: checking for $ac_hdr" >&5
7452 7453
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7454
else
7455
  cat > conftest.$ac_ext <<EOF
7456
#line 7457 "configure"
7457 7458 7459 7460
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7461
{ (eval echo configure:7462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7462 7463 7464 7465 7466 7467 7468
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
7469
  cat conftest.$ac_ext >&5
7470 7471
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7472
fi
7473
rm -f conftest*
Gildas Bazin's avatar
 
Gildas Bazin committed
7474
fi
7475 7476 7477 7478 7479 7480 7481
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
7482
        PLUGINS="${PLUGINS} fb"
7483 7484 7485
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7486 7487
fi
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7488

Sam Hocevar's avatar
 
Sam Hocevar committed
7489 7490 7491 7492 7493
    fi

# Check whether --enable-mga or --disable-mga was given.
if test "${enable_mga+set}" = set; then
  enableval="$enable_mga"
7494
   if test "x${enable_mga}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7495
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
7496
      PLUGINS="${PLUGINS} mga xmga"
7497 7498 7499
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7500

Sam Hocevar's avatar
 
Sam Hocevar committed
7501 7502 7503
# Check whether --enable-ggi or --disable-ggi was given.
if test "${enable_ggi+set}" = set; then
  enableval="$enable_ggi"
7504 7505
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7506

7507
if test "x${enable_ggi}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7508 7509
then
  PLUGINS="${PLUGINS} ggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
7510
  ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
7511
  # Check whether --with-ggi or --without-ggi was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
7512 7513
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
7514
   if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7515
      then
7516 7517
        CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
        ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
7518 7519 7520
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7521 7522 7523 7524 7525
fi

# Check whether --enable-glide or --disable-glide was given.
if test "${enable_glide+set}" = set; then
  enableval="$enable_glide"
7526 7527
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7528

7529
if test "x${enable_glide}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7530 7531
then
  PLUGINS="${PLUGINS} glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
7532 7533
  glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
  glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
7534
  # Check whether --with-glide or --without-glide was given.
Christophe Massiot's avatar
Christophe Massiot committed
7535 7536
if test "${with_glide+set}" = set; then
  withval="$with_glide"
7537
   if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7538
      then
7539 7540
        glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
        glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
7541 7542 7543
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7544
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7545

Sam Hocevar's avatar
 
Sam Hocevar committed
7546 7547 7548
# Check whether --enable-aa or --disable-aa was given.
if test "${enable_aa+set}" = set; then
  enableval="$enable_aa"
7549 7550
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7551

7552
if test "x${enable_aa}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7553
then
7554 7555
  ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
7556
echo "configure:7557: checking for aalib.h" >&5
7557 7558 7559 7560
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
7561
#line 7562 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7562 7563
#include "confdefs.h"
#include <aalib.h>
7564 7565
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7566
{ (eval echo configure:7567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7567 7568 7569 7570 7571 7572 7573
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
7574
  cat conftest.$ac_ext >&5
7575 7576
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7577
fi
7578
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7579
fi
7580 7581
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7582 7583
  have_aa="true"
else
7584 7585
  echo "$ac_t""no" 1>&6
have_aa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7586 7587
fi

7588
  if test "x${have_aa}" = "xtrue"
Sam Hocevar's avatar
 
Sam Hocevar committed
7589 7590
  then
    PLUGINS="${PLUGINS} aa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7591
    aa_LDFLAGS="${aa_LDFLAGS} -laa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7592 7593 7594
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7595 7596 7597 7598

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

Sam Hocevar's avatar
 
Sam Hocevar committed
7602

Sam Hocevar's avatar
 
Sam Hocevar committed
7603 7604 7605
# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
7606 7607
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7608

Sam Hocevar's avatar
 
Sam Hocevar committed
7609

7610 7611
if test "x${enable_dsp}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_dsp}" = "xyes")
Sam Hocevar's avatar
 
Sam Hocevar committed
7612
then
7613
  for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7614
do
7615 7616
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7617
echo "configure:7618: checking for $ac_hdr" >&5
7618 7619
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7620
else
7621
  cat > conftest.$ac_ext <<EOF
7622
#line 7623 "configure"
7623 7624 7625 7626
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7627
{ (eval echo configure:7628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7628 7629 7630 7631 7632 7633 7634
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
7635
  cat conftest.$ac_ext >&5
7636 7637
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7638
fi
7639
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7640
fi
7641 7642 7643 7644 7645 7646 7647
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
7648
    PLUGINS="${PLUGINS} dsp"
7649
    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
7650
echo "configure:7651: checking for main in -lossaudio" >&5
7651 7652 7653
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
Sam Hocevar's avatar
 
Sam Hocevar committed
7654
else
7655
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7656
LIBS="-lossaudio  $LIBS"
7657
cat > conftest.$ac_ext <<EOF
7658
#line 7659 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7659 7660
#include "confdefs.h"

7661 7662 7663 7664
int main() {
main()
; return 0; }
EOF
7665
if { (eval echo configure:7666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7666 7667 7668 7669 7670 7671 7672 7673 7674 7675
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
7676

7677 7678 7679
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
7680
  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
7681 7682
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7683 7684
fi

7685 7686 7687
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7688 7689 7690 7691 7692 7693 7694 7695
fi
done

fi

# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
7696
  if test "x${enable_esd}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7697 7698 7699
   then
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
7700
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7701
echo "configure:7702: checking for $ac_word" >&5
7702 7703
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7704
else
7705 7706
  case "$ESD_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7707 7708
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
7709 7710 7711
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7712
  *)
7713 7714 7715 7716 7717 7718 7719 7720 7721 7722
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
7723 7724 7725 7726
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
7727
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7728
if test -n "$ESD_CONFIG"; then
7729
  echo "$ac_t""$ESD_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7730
else
7731
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7732 7733
fi

7734
     if test "x${ESD_CONFIG}" != "xno"
7735
     then
Sam Hocevar's avatar
 
Sam Hocevar committed
7736
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
7737 7738
       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
7739
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7740
   fi
7741 7742
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7743

Sam Hocevar's avatar
 
Sam Hocevar committed
7744 7745 7746
# Check whether --enable-arts or --disable-arts was given.
if test "${enable_arts+set}" = set; then
  enableval="$enable_arts"
7747
  if test "x${enable_arts}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7748 7749 7750
   then
     # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
7751
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7752
echo "configure:7753: checking for $ac_word" >&5
7753 7754
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7755
else
7756 7757
  case "$ARTS_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7758
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
7759
  ;;
7760 7761 7762
  ?:/*)			 
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
  ;;
7763
  *)
7764 7765 7766 7767 7768 7769 7770 7771 7772 7773
  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_ARTS_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7774
  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
7775 7776 7777
  ;;
esac
fi
7778
ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7779
if test -n "$ARTS_CONFIG"; then
7780
  echo "$ac_t""$ARTS_CONFIG" 1>&6
7781
else
7782
  echo "$ac_t""no" 1>&6
7783 7784
fi

7785
     if test "x${ARTS_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7786 7787
     then
       PLUGINS="${PLUGINS} arts"
Sam Hocevar's avatar
 
Sam Hocevar committed
7788 7789
       arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
       arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
Sam Hocevar's avatar
 
Sam Hocevar committed
7790 7791
     fi
   fi
7792 7793
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7794 7795 7796 7797

# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
7798
  if test "x${enable_alsa}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7799
   then
7800 7801
     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
7802
echo "configure:7803: checking for alsa/asoundlib.h" >&5
7803 7804 7805 7806
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
7807
#line 7808 "configure"
7808
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7809
#include <alsa/asoundlib.h>
7810 7811
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7812
{ (eval echo configure:7813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7813 7814 7815 7816 7817 7818 7819
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
7820
  cat conftest.$ac_ext >&5
7821 7822
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7823
fi
7824
rm -f conftest*
7825
fi
7826 7827 7828
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
7829
echo "configure:7830: checking for main in -lasound" >&5
7830 7831 7832
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
Sam Hocevar's avatar
 
Sam Hocevar committed
7833
else
7834
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7835
LIBS="-lasound  $LIBS"
7836
cat > conftest.$ac_ext <<EOF
7837
#line 7838 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7838 7839
#include "confdefs.h"

7840 7841 7842 7843
int main() {
main()
; return 0; }
EOF
7844
if { (eval echo configure:7845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7845 7846 7847 7848 7849 7850 7851 7852 7853 7854
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
7855

7856 7857 7858
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
7859 7860
  have_alsa="true"
else
7861 7862
  echo "$ac_t""no" 1>&6
have_alsa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7863 7864
fi

7865
else
7866 7867
  echo "$ac_t""no" 1>&6
have_alsa="false"
7868 7869
fi

7870
     if test "x${have_alsa}" = "xtrue"
Sam Hocevar's avatar
 
Sam Hocevar committed
7871 7872
     then
       PLUGINS="${PLUGINS} alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7873
       alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7874 7875
     fi
   fi
7876 7877
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7878 7879 7880 7881

# Check whether --enable-waveout or --disable-waveout was given.
if test "${enable_waveout+set}" = set; then
  enableval="$enable_waveout"
7882 7883
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7884

7885
if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
7886 7887
  then
    PLUGINS="${PLUGINS} waveout"
Sam Hocevar's avatar
 
Sam Hocevar committed
7888
    waveout_LDFLAGS="-lwinmm"
Sam Hocevar's avatar
 
Sam Hocevar committed
7889 7890 7891 7892 7893 7894
fi


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

Sam Hocevar's avatar
 
Sam Hocevar committed
7898

Sam Hocevar's avatar
 
Sam Hocevar committed
7899 7900 7901
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
7902 7903
  :
fi
7904

7905
if test "x${enable_gtk}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7906
then
7907
  GTK_PATH="${PATH}"
7908
  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
7909 7910
if test "${with_gtk_config_path+set}" = set; then
  withval="$with_gtk_config_path"
7911
   if test "x${with_gtk_config_path}" != "xno"
7912
      then
7913
        GTK_PATH="${with_gtk_config_path}:${PATH}"
7914 7915 7916
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7917
  # look for gtk-config
Sam Hocevar's avatar
 
Sam Hocevar committed
7918 7919
  # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
7920
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7921
echo "configure:7922: checking for $ac_word" >&5
7922 7923
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7924
else
7925 7926
  case "$GTK12_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7927 7928
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
7929 7930 7931
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7932
  *)
7933
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7934
  ac_dummy="${GTK_PATH}"
7935 7936 7937 7938 7939 7940 7941 7942
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
7943 7944 7945 7946
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
7947
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7948
if test -n "$GTK12_CONFIG"; then
7949
  echo "$ac_t""$GTK12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7950
else
7951
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7952 7953 7954
fi

  GTK_CONFIG=${GTK12_CONFIG}
7955
  if test "x${GTK_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7956 7957 7958
  then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
7959
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7960
echo "configure:7961: checking for $ac_word" >&5
7961 7962
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
7963
else
7964 7965
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7966 7967
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
7968 7969 7970
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7971
  *)
7972
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7973
  ac_dummy="${GTK_PATH}"
7974 7975 7976 7977 7978 7979 7980 7981
  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
7982 7983 7984 7985
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
7986
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7987
if test -n "$GTK_CONFIG"; then
7988
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7989
else
7990
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7991 7992
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7993
  fi
7994
  if test "x${GTK_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7995
  then
7996
    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
7997
    then
7998
      { 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; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7999
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8000 8001
    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
    gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
Sam Hocevar's avatar
 
Sam Hocevar committed
8002
    # now look for the gtk.h header
8003
    CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8004
    ac_cv_gtk_headers=yes
8005
    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8006
do
8007 8008
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8009
echo "configure:8010: checking for $ac_hdr" >&5
8010 8011
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8012
else
8013
  cat > conftest.$ac_ext <<EOF
8014
#line 8015 "configure"
8015 8016 8017 8018
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8019
{ (eval echo configure:8020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8020 8021 8022 8023 8024 8025 8026
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
8027
  cat conftest.$ac_ext >&5
8028 8029
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8030
fi
8031
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8032
fi
8033 8034 8035 8036 8037 8038 8039
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
8040
else
8041 8042
  echo "$ac_t""no" 1>&6
ac_cv_gtk_headers=no
Sam Hocevar's avatar
 
Sam Hocevar committed
8043
      echo "Cannot find gtk development headers."
8044
    
Sam Hocevar's avatar
 
Sam Hocevar committed
8045 8046 8047
fi
done

8048
    if test "x${ac_cv_gtk_headers}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8049 8050 8051 8052
    then
      PLUGINS="${PLUGINS} gtk"
      ALIASES="${ALIASES} gvlc"
    fi
8053
    CPPFLAGS="${save_CPPFLAGS}"
8054
  fi
8055
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8056

Sam Hocevar's avatar
 
Sam Hocevar committed
8057 8058 8059
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
8060
  if test "x${enable_gnome}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8061 8062 8063
    # 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
8064
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8065
echo "configure:8066: checking for $ac_word" >&5
8066 8067
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8068
else
8069 8070
  case "$GNOME_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8071 8072
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
  ;;
8073 8074 8075
  ?:/*)			 
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8076
  *)
8077 8078 8079 8080 8081 8082 8083 8084 8085 8086
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
8087 8088 8089 8090
  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
  ;;
esac
fi
8091
GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8092
if test -n "$GNOME_CONFIG"; then
8093
  echo "$ac_t""$GNOME_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8094
else
8095
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8096
fi
Henri Fallon's avatar
 
Henri Fallon committed
8097

Sam Hocevar's avatar
 
Sam Hocevar committed
8098 8099
    if test -x ${GNOME_CONFIG}
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
8100 8101
       gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
       gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
Sam Hocevar's avatar
 
Sam Hocevar committed
8102 8103
    fi
    # now look for the gnome.h header
8104
    CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
8105
    for ac_hdr in gnome.h
8106
do
8107 8108
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8109
echo "configure:8110: checking for $ac_hdr" >&5
8110 8111
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8112
else
8113
  cat > conftest.$ac_ext <<EOF
8114
#line 8115 "configure"
8115 8116 8117 8118
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8119
{ (eval echo configure:8120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8120 8121 8122 8123 8124 8125 8126
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
8127
  cat conftest.$ac_ext >&5
8128 8129
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8130
fi
8131
rm -f conftest*
8132
fi
8133 8134 8135 8136 8137 8138 8139
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
8140 8141
      PLUGINS="${PLUGINS} gnome"
      ALIASES="${ALIASES} gnome-vlc"
8142
     
Sam Hocevar's avatar
 
Sam Hocevar committed
8143
else
8144 8145 8146 8147
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Can't find gnome headers. Please install the gnome
developement tools or remove the --enable-gnome option" 1>&2; exit 1; }
     
8148 8149 8150
fi
done

8151
    CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8152
  fi
8153 8154
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8155 8156 8157 8158

# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
8159
  if test "x${enable_qt}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8160 8161
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8162 8163
     qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
     qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
8164 8165 8166 8167 8168 8169 8170
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8171 8172
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8173 8174 8175 8176

# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
8177
  if test "x${enable_kde}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8178 8179
     PLUGINS="${PLUGINS} kde"
     ALIASES="${ALIASES} kvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8180 8181 8182
     kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
     kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
     kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
8183 8184 8185 8186 8187 8188 8189
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8190 8191
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8192 8193 8194 8195

# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
8196
  if test "x${enable_macosx}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8197 8198
   then
     BUILTINS="${BUILTINS} macosx"
Jon Lech Johansen's avatar
Jon Lech Johansen committed
8199
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
Sam Hocevar's avatar
 
Sam Hocevar committed
8200 8201
   fi
else
8202
  for ac_hdr in Cocoa/Cocoa.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8203
do
8204 8205
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8206
echo "configure:8207: checking for $ac_hdr" >&5
8207 8208
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8209
else
8210
  cat > conftest.$ac_ext <<EOF
8211
#line 8212 "configure"
8212 8213 8214 8215
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8216
{ (eval echo configure:8217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8217 8218 8219 8220 8221 8222 8223
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
8224
  cat conftest.$ac_ext >&5
8225 8226
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8227
fi
8228
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8229
fi
8230 8231 8232 8233 8234 8235
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
8236
 BUILTINS="${BUILTINS} macosx"
Jon Lech Johansen's avatar
Jon Lech Johansen committed
8237
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
8238 8239 8240
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8241
fi
8242 8243
done

8244 8245
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8246 8247 8248 8249

# Check whether --enable-qnx or --disable-qnx was given.
if test "${enable_qnx+set}" = set; then
  enableval="$enable_qnx"
8250 8251
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8252

8253
    if test "x${enable_qnx}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8254
    then
8255
      for ac_hdr in Ph.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8256
do
8257 8258
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8259
echo "configure:8260: checking for $ac_hdr" >&5
8260 8261
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8262
else
8263
  cat > conftest.$ac_ext <<EOF
8264
#line 8265 "configure"
8265 8266 8267 8268
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8269
{ (eval echo configure:8270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8270 8271 8272 8273 8274 8275 8276
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
8277
  cat conftest.$ac_ext >&5
8278 8279
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8280
fi
8281
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8282
fi
8283 8284 8285 8286 8287 8288 8289
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
8290
        PLUGINS="${PLUGINS} qnx"
Sam Hocevar's avatar
 
Sam Hocevar committed
8291
        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
8292 8293 8294
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8295
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8296
done
Sam Hocevar's avatar
 
Sam Hocevar committed
8297

Sam Hocevar's avatar
 
Sam Hocevar committed
8298 8299
    fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8300 8301 8302
# Check whether --enable-intfwin or --disable-intfwin was given.
if test "${enable_intfwin+set}" = set; then
  enableval="$enable_intfwin"
8303
   if test "x${enable_intfwin}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8304
  then
8305
    # Check whether --with-bcbuilder or --without-bcbuilder was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
8306 8307
if test "${with_bcbuilder+set}" = set; then
  withval="$with_bcbuilder"
8308 8309
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8310

8311
    if test "x${with_bcbuilder}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
8312
    then
8313
      BCBUILDER="${with_bcbuilder}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8314 8315
    fi
    PLUGINS="${PLUGINS} intfwin"
8316 8317 8318
  fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8319 8320 8321 8322

# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
8323
  if test "x${enable_ncurses}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8324
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8325
     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8326
   fi
8327 8328
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8329

8330 8331 8332
# Check whether --enable-xosd or --disable-xosd was given.
if test "${enable_xosd+set}" = set; then
  enableval="$enable_xosd"
8333 8334 8335
  :
fi

8336
if test "x${enable_xosd}" = "xyes"
8337 8338 8339
then
  ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
8340
echo "configure:8341: checking for xosd.h" >&5
8341 8342 8343 8344
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
8345
#line 8346 "configure"
8346 8347 8348 8349
#include "confdefs.h"
#include <xosd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8350
{ (eval echo configure:8351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364
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
8365 8366
  echo "$ac_t""yes" 1>&6
  have_xosd="true"
8367 8368 8369 8370 8371
else
  echo "$ac_t""no" 1>&6
have_xosd="false"
fi

8372
  if test "x${have_xosd}" = "xtrue"
8373 8374 8375 8376 8377 8378
  then
    PLUGINS="${PLUGINS} xosd"
    xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd"
  fi
fi

8379 8380 8381
# Check whether --enable-lirc or --disable-lirc was given.
if test "${enable_lirc+set}" = set; then
  enableval="$enable_lirc"
8382 8383
  :
fi
8384

8385
if test "x${enable_lirc}" = "xyes"
8386
then
8387 8388
  ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
8389
echo "configure:8390: checking for lirc/lirc_client.h" >&5
8390 8391 8392 8393
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
8394
#line 8395 "configure"
8395 8396
#include "confdefs.h"
#include <lirc/lirc_client.h>
8397 8398
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8399
{ (eval echo configure:8400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8400 8401 8402 8403 8404 8405 8406
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
8407
  cat conftest.$ac_ext >&5
8408 8409
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8410
fi
8411
rm -f conftest*
8412
fi
8413 8414 8415
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
8416
echo "configure:8417: checking for lirc_init in -llirc_client" >&5
8417 8418 8419
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
8420
else
8421
  ac_save_LIBS="$LIBS"
8422
LIBS="-llirc_client  $LIBS"
8423
cat > conftest.$ac_ext <<EOF
8424
#line 8425 "configure"
8425 8426 8427
#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
8428 8429 8430 8431 8432 8433 8434
    builtin and then its argument prototype would still apply.  */
char lirc_init();

int main() {
lirc_init()
; return 0; }
EOF
8435
if { (eval echo configure:8436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8436 8437
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
8438
else
8439 8440 8441 8442
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
8443
fi
8444 8445
rm -f conftest*
LIBS="$ac_save_LIBS"
8446

8447 8448 8449 8450
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_lirc="true"
8451
else
8452 8453
  echo "$ac_t""no" 1>&6
have_lirc="false"
8454 8455
fi

8456 8457 8458 8459
else
  echo "$ac_t""no" 1>&6
have_lirc="false"
fi
8460

8461
  if test "x${have_lirc}" = "xtrue"
8462 8463
  then
    PLUGINS="${PLUGINS} lirc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8464
    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
8465 8466 8467
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8468 8469 8470
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
8471 8472
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8473 8474 8475 8476 8477


# Check whether --with-words or --without-words was given.
if test "${with_words+set}" = set; then
  withval="$with_words"
8478 8479
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8480

8481
  case "x${with_words}" in
8482
    xbig)
Sam Hocevar's avatar
 
Sam Hocevar committed
8483 8484 8485 8486 8487 8488
      ac_cv_c_bigendian=yes
      ;;
    xlittle)
      ac_cv_c_bigendian=no
      ;;
    *)
8489
                  echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
8490
echo "configure:8491: checking whether the byte order is big-endian" >&5
8491 8492
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8493
else
8494
  ac_cv_c_bigendian="unknown"
Sam Hocevar's avatar
 
Sam Hocevar committed
8495 8496 8497 8498 8499 8500 8501 8502 8503
        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
8504
        
Sam Hocevar's avatar
 
Sam Hocevar committed
8505
        if test -f conftest.c
8506
        then 
Sam Hocevar's avatar
 
Sam Hocevar committed
8507
          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
Sam Hocevar's avatar
 
Sam Hocevar committed
8508 8509 8510 8511
              && test -f conftest.o
          then
            if test "`strings conftest.o | grep BIGenDianSyS`"
            then
8512
              ac_cv_c_bigendian="yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8513 8514 8515
            fi
            if test "`strings conftest.o | grep LiTTleEnDian`"
            then
8516
              ac_cv_c_bigendian="no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8517 8518 8519
            fi
          fi
        fi
8520
      
8521
fi
8522 8523

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8524
      if test "x${ac_cv_c_bigendian}" = "xunknown"
Sam Hocevar's avatar
 
Sam Hocevar committed
8525
      then
8526
        { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
8527 8528 8529
      fi
      ;;
  esac
8530
if test "${ac_cv_c_bigendian}" = "yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8531
then
8532
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8533
#define WORDS_BIGENDIAN 1
8534
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8535 8536 8537

fi

Sam Hocevar's avatar
Sam Hocevar committed
8538 8539
PROFILING=0

Sam Hocevar's avatar
 
Sam Hocevar committed
8540 8541 8542 8543
GPROF=0
# Check whether --enable-gprof or --disable-gprof was given.
if test "${enable_gprof+set}" = set; then
  enableval="$enable_gprof"
8544
   if test "x${enable_gprof}" = "xyes"
Sam Hocevar's avatar
Sam Hocevar committed
8545 8546 8547 8548 8549
  then
    GPROF=1
    PROFILING="gprof"
  fi

8550 8551
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8552 8553 8554 8555 8556

CPROF=0
# Check whether --enable-cprof or --disable-cprof was given.
if test "${enable_cprof+set}" = set; then
  enableval="$enable_cprof"
8557
   if test "x${enable_cprof}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8558
  then
8559
    save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8560
    CPROF=1
Sam Hocevar's avatar
Sam Hocevar committed
8561
    PROFILING="cprof"
Sam Hocevar's avatar
 
Sam Hocevar committed
8562 8563
  fi

8564 8565
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8566 8567 8568 8569

# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
8570
   if test "x${enable_pth}" = "xyes"; then
8571
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
8572
echo "configure:8573: checking for pth_init in -lpth" >&5
8573 8574 8575
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
Sam Hocevar's avatar
 
Sam Hocevar committed
8576
else
8577
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8578
LIBS="-lpth  $LIBS"
8579
cat > conftest.$ac_ext <<EOF
8580
#line 8581 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8581
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8582 8583
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8584 8585 8586 8587 8588 8589 8590
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
8591
if { (eval echo configure:8592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610
  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 pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8611 8612 8613

  LIBS="-lpth $LIBS"

8614 8615
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8616 8617
fi

8618
    cat > conftest.$ac_ext <<EOF
8619
#line 8620 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8620 8621
#include "confdefs.h"
#include <pth.h>
8622
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8623 8624
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
8625 8626 8627
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8628
#define PTH_INIT_IN_PTH_H 1
8629
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8630 8631 8632 8633 8634 8635 8636

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


8637 8638
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8639 8640 8641 8642

# Check whether --enable-st or --disable-st was given.
if test "${enable_st+set}" = set; then
  enableval="$enable_st"
8643
   if test "x${enable_st}" = "xyes"; then
8644
    echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
8645
echo "configure:8646: checking for st_init in -lst" >&5
8646 8647 8648
ac_lib_var=`echo st'_'st_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
Henri Fallon's avatar
 
Henri Fallon committed
8649
else
8650
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8651
LIBS="-lst  $LIBS"
8652
cat > conftest.$ac_ext <<EOF
8653
#line 8654 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8654
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8655 8656
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8657 8658 8659 8660 8661 8662 8663
    builtin and then its argument prototype would still apply.  */
char st_init();

int main() {
st_init()
; return 0; }
EOF
8664
if { (eval echo configure:8665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683
  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 st | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8684 8685

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

8687 8688
else
  echo "$ac_t""no" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
8689
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8690

8691
    cat > conftest.$ac_ext <<EOF
8692
#line 8693 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8693 8694
#include "confdefs.h"
#include <st.h>
8695
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8696 8697
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "st_init" >/dev/null 2>&1; then
8698 8699 8700
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8701
#define ST_INIT_IN_ST_H 1
8702
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8703 8704 8705

    THREAD_LIB="-lst"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8706
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8707
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8708

Sam Hocevar's avatar
 
Sam Hocevar committed
8709

8710 8711
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8712

Sam Hocevar's avatar
Sam Hocevar committed
8713 8714
vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}"
plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8715

8716 8717 8718 8719 8720 8721 8722
MOZILLA=0
# Check whether --enable-mozilla or --disable-mozilla was given.
if test "${enable_mozilla+set}" = set; then
  enableval="$enable_mozilla"
  :
fi

8723
if test "x${enable_mozilla}" = "xyes"
8724 8725 8726 8727
then
  # Extract the first word of "mozilla-config", so it can be a program name with args.
set dummy mozilla-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8728
echo "configure:8729: checking for $ac_word" >&5
8729 8730 8731 8732 8733 8734 8735 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
if eval "test \"`echo '$''{'ac_cv_path_MOZILLA_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MOZILLA_CONFIG" in
  /*)
  ac_cv_path_MOZILLA_CONFIG="$MOZILLA_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MOZILLA_CONFIG="$MOZILLA_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_MOZILLA_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MOZILLA_CONFIG" && ac_cv_path_MOZILLA_CONFIG="no"
  ;;
esac
fi
MOZILLA_CONFIG="$ac_cv_path_MOZILLA_CONFIG"
if test -n "$MOZILLA_CONFIG"; then
  echo "$ac_t""$MOZILLA_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

8761
  if test "x${MOZILLA_CONFIG}" != "xno"
8762 8763 8764 8765 8766 8767 8768
  then
    MOZILLA=1
    mozilla_CFLAGS="${mozilla_CFLAGS} `${MOZILLA_CONFIG} --cflags plugin java --defines | xargs`"
    mozilla_LDFLAGS="${mozilla_LDFLAGS} `${MOZILLA_CONFIG} --libs `"
  fi
fi

8769 8770 8771
# Check whether --enable-plugins or --disable-plugins was given.
if test "${enable_plugins+set}" = set; then
  enableval="$enable_plugins"
8772
  if test "x${enable_plugins}" = "xno"
8773 8774 8775 8776
   then
     BUILTINS="${BUILTINS} ${PLUGINS}"
     PLUGINS=
   fi
8777 8778
fi

8779

8780
if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
8781 8782 8783 8784 8785 8786 8787
then
  echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
  echo "as built-in"
  BUILTINS="${BUILTINS} ${PLUGINS}"
  PLUGINS=
fi

8788
cat >> confdefs.h <<EOF
8789
#define VERSION_MESSAGE "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN"
8790
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8791

8792
cat >> confdefs.h <<EOF
8793
#define COPYRIGHT_MESSAGE "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN"
8794
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8795

Sam Hocevar's avatar
Sam Hocevar committed
8796
cat >> confdefs.h <<EOF
8797
#define CONFIGURE_LINE "${CONFIGURE_LINE}"
Sam Hocevar's avatar
Sam Hocevar committed
8798 8799
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
8800

Sam Hocevar's avatar
 
Sam Hocevar committed
8801
VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
8802
cat >> confdefs.h <<EOF
8803
#define MODULE_SUFFIX "__MODULE_${VLC_SYMBOL}"
8804
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8805

8806
cat >> confdefs.h <<EOF
8807
#define MODULE_SYMBOL ${VLC_SYMBOL}
8808
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8809 8810 8811 8812 8813 8814 8815


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

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


Sam Hocevar's avatar
Sam Hocevar committed
8816 8817 8818 8819 8820
CPPFLAGS="${save_CPPFLAGS}"
CFLAGS="${save_CFLAGS}"
LDFLAGS="${save_LDFLAGS}"


8821

8822 8823 8824 8825 8826





Henri Fallon's avatar
 
Henri Fallon committed
8827 8828 8829



Christophe Massiot's avatar
Christophe Massiot committed
8830 8831 8832



Sam Hocevar's avatar
 
Sam Hocevar committed
8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846














Sam Hocevar's avatar
 
Sam Hocevar committed
8847

Sam Hocevar's avatar
 
Sam Hocevar committed
8848

Sam Hocevar's avatar
 
Sam Hocevar committed
8849 8850 8851 8852




Sam Hocevar's avatar
 
Sam Hocevar committed
8853

Sam Hocevar's avatar
 
Sam Hocevar committed
8854 8855


8856

Sam Hocevar's avatar
 
Sam Hocevar committed
8857

Sam Hocevar's avatar
 
Sam Hocevar committed
8858

Sam Hocevar's avatar
 
Sam Hocevar committed
8859

Sam Hocevar's avatar
 
Sam Hocevar committed
8860

Sam Hocevar's avatar
 
Sam Hocevar committed
8861

Sam Hocevar's avatar
 
Sam Hocevar committed
8862 8863 8864



Sam Hocevar's avatar
 
Sam Hocevar committed
8865

Sam Hocevar's avatar
 
Sam Hocevar committed
8866

Sam Hocevar's avatar
 
Sam Hocevar committed
8867

Sam Hocevar's avatar
 
Sam Hocevar committed
8868

Sam Hocevar's avatar
 
Sam Hocevar committed
8869

Sam Hocevar's avatar
 
Sam Hocevar committed
8870 8871


8872

Sam Hocevar's avatar
 
Sam Hocevar committed
8873

Sam Hocevar's avatar
 
Sam Hocevar committed
8874 8875 8876



8877 8878


Sam Hocevar's avatar
 
Sam Hocevar committed
8879 8880 8881



Stéphane Borel's avatar
Stéphane Borel committed
8882 8883 8884



8885

8886

8887

Sam Hocevar's avatar
 
Sam Hocevar committed
8888 8889 8890 8891 8892 8893 8894 8895 8896









8897

Sam Hocevar's avatar
 
Sam Hocevar committed
8898 8899


Sam Hocevar's avatar
 
Sam Hocevar committed
8900

Sam Hocevar's avatar
 
Sam Hocevar committed
8901

8902 8903


Sam Hocevar's avatar
 
Sam Hocevar committed
8904 8905


8906 8907


8908 8909


Sam Hocevar's avatar
 
Sam Hocevar committed
8910

Gildas Bazin's avatar
 
Gildas Bazin committed
8911

Gildas Bazin's avatar
 
Gildas Bazin committed
8912

8913 8914 8915



8916

8917

8918

Sam Hocevar's avatar
 
Sam Hocevar committed
8919

8920 8921
trap '' 1 2 15
cat > confcache <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8922 8923
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
8924 8925
# 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.
Sam Hocevar's avatar
 
Sam Hocevar committed
8926
#
8927 8928 8929 8930 8931 8932 8933 8934
# 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.
Sam Hocevar's avatar
 
Sam Hocevar committed
8935
#
8936
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8937 8938 8939 8940 8941
# 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.
8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958
(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
Sam Hocevar's avatar
 
Sam Hocevar committed
8959
  if test -w $cache_file; then
8960 8961
    echo "updating cache $cache_file"
    cat confcache > $cache_file
Sam Hocevar's avatar
 
Sam Hocevar committed
8962 8963 8964
  else
    echo "not updating unwritable cache $cache_file"
  fi
8965
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8966
rm -f confcache
8967

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

Sam Hocevar's avatar
 
Sam Hocevar committed
8970 8971 8972
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8973

8974 8975 8976
# 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.
Sam Hocevar's avatar
 
Sam Hocevar committed
8977
if test "x$srcdir" = x.; then
8978
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Sam Hocevar's avatar
 
Sam Hocevar committed
8979 8980
fi

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

8983
DEFS=-DHAVE_CONFIG_H
8984

8985
# Without the "./", some shells look in PATH for config.status.
8986 8987
: ${CONFIG_STATUS=./config.status}

8988 8989 8990 8991 8992 8993 8994 8995
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`:
8996
#
8997
# $0 $ac_configure_args
8998
#
8999 9000
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
9001

9002 9003
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
9004
do
9005 9006 9007 9008 9009 9010 9011 9012 9013 9014
  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 ;;
9015 9016 9017
  esac
done

9018 9019
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
9020

9021
trap 'rm -fr `echo "Makefile.config Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9022 9023
EOF
cat >> $CONFIG_STATUS <<EOF
9024

9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107
# 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
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
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@GMAKE@%$GMAKE%g
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
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@WINDRES@%$WINDRES%g
s%@SDL12_CONFIG@%$SDL12_CONFIG%g
s%@SDL11_CONFIG@%$SDL11_CONFIG%g
s%@SDL_CONFIG@%$SDL_CONFIG%g
s%@ESD_CONFIG@%$ESD_CONFIG%g
s%@ARTS_CONFIG@%$ARTS_CONFIG%g
s%@GTK12_CONFIG@%$GTK12_CONFIG%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9108
s%@MOZILLA_CONFIG@%$MOZILLA_CONFIG%g
9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127
s%@DATA_PATH@%$DATA_PATH%g
s%@PLUGIN_PATH@%$PLUGIN_PATH%g
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
s%@BUILTINS@%$BUILTINS%g
s%@ALIASES@%$ALIASES%g
s%@DEBUG@%$DEBUG%g
s%@ASM@%$ASM%g
s%@CPROF@%$CPROF%g
s%@GPROF@%$GPROF%g
s%@OPTIMS@%$OPTIMS%g
s%@TUNING@%$TUNING%g
s%@RELEASE@%$RELEASE%g
s%@MOC@%$MOC%g
s%@BCBUILDER@%$BCBUILDER%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@NEED_GETOPT@%$NEED_GETOPT%g
9128
s%@MOZILLA@%$MOZILLA%g
9129 9130 9131 9132 9133
s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
s%@vlc_CFLAGS@%$vlc_CFLAGS%g
s%@plugins_CFLAGS@%$plugins_CFLAGS%g
s%@builtins_CFLAGS@%$builtins_CFLAGS%g
9134
s%@mozilla_CFLAGS@%$mozilla_CFLAGS%g
9135 9136
s%@a52_CFLAGS@%$a52_CFLAGS%g
s%@arts_CFLAGS@%$arts_CFLAGS%g
Sam Hocevar's avatar
Sam Hocevar committed
9137
s%@chroma_i420_yuy2_mmx_CFLAGS@%$chroma_i420_yuy2_mmx_CFLAGS%g
9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159
s%@dvd_CFLAGS@%$dvd_CFLAGS%g
s%@dvdread_CFLAGS@%$dvdread_CFLAGS%g
s%@mpeg_ts_dvbpsi_CFLAGS@%$mpeg_ts_dvbpsi_CFLAGS%g
s%@directx_CFLAGS@%$directx_CFLAGS%g
s%@esd_CFLAGS@%$esd_CFLAGS%g
s%@ffmpeg_CFLAGS@%$ffmpeg_CFLAGS%g
s%@glide_CFLAGS@%$glide_CFLAGS%g
s%@gnome_CFLAGS@%$gnome_CFLAGS%g
s%@gtk_CFLAGS@%$gtk_CFLAGS%g
s%@kde_CFLAGS@%$kde_CFLAGS%g
s%@idctaltivec_CFLAGS@%$idctaltivec_CFLAGS%g
s%@macosx_CFLAGS@%$macosx_CFLAGS%g
s%@mad_CFLAGS@%$mad_CFLAGS%g
s%@memcpyaltivec_CFLAGS@%$memcpyaltivec_CFLAGS%g
s%@motionaltivec_CFLAGS@%$motionaltivec_CFLAGS%g
s%@qt_CFLAGS@%$qt_CFLAGS%g
s%@sdl_CFLAGS@%$sdl_CFLAGS%g
s%@x11_CFLAGS@%$x11_CFLAGS%g
s%@xvideo_CFLAGS@%$xvideo_CFLAGS%g
s%@vlc_LDFLAGS@%$vlc_LDFLAGS%g
s%@plugins_LDFLAGS@%$plugins_LDFLAGS%g
s%@builtins_LDFLAGS@%$builtins_LDFLAGS%g
9160
s%@mozilla_LDFLAGS@%$mozilla_LDFLAGS%g
9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178
s%@a52_LDFLAGS@%$a52_LDFLAGS%g
s%@aa_LDFLAGS@%$aa_LDFLAGS%g
s%@alsa_LDFLAGS@%$alsa_LDFLAGS%g
s%@arts_LDFLAGS@%$arts_LDFLAGS%g
s%@beos_LDFLAGS@%$beos_LDFLAGS%g
s%@chroma_i420_rgb_LDFLAGS@%$chroma_i420_rgb_LDFLAGS%g
s%@directx_LDFLAGS@%$directx_LDFLAGS%g
s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
s%@mpeg_ts_dvbpsi_LDFLAGS@%$mpeg_ts_dvbpsi_LDFLAGS%g
s%@esd_LDFLAGS@%$esd_LDFLAGS%g
s%@filter_distort_LDFLAGS@%$filter_distort_LDFLAGS%g
s%@ffmpeg_LDFLAGS@%$ffmpeg_LDFLAGS%g
s%@ggi_LDFLAGS@%$ggi_LDFLAGS%g
s%@glide_LDFLAGS@%$glide_LDFLAGS%g
s%@gnome_LDFLAGS@%$gnome_LDFLAGS%g
s%@gtk_LDFLAGS@%$gtk_LDFLAGS%g
9179
s%@http_LDFLAGS@%$http_LDFLAGS%g
9180 9181 9182 9183 9184
s%@idctaltivec_LDFLAGS@%$idctaltivec_LDFLAGS%g
s%@imdct_LDFLAGS@%$imdct_LDFLAGS%g
s%@imdct3dn_LDFLAGS@%$imdct3dn_LDFLAGS%g
s%@imdctsse_LDFLAGS@%$imdctsse_LDFLAGS%g
s%@ipv4_LDFLAGS@%$ipv4_LDFLAGS%g
Gildas Bazin's avatar
 
Gildas Bazin committed
9185
s%@ipv6_LDFLAGS@%$ipv6_LDFLAGS%g
9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201
s%@kde_LDFLAGS@%$kde_LDFLAGS%g
s%@lirc_LDFLAGS@%$lirc_LDFLAGS%g
s%@macosx_LDFLAGS@%$macosx_LDFLAGS%g
s%@mad_LDFLAGS@%$mad_LDFLAGS%g
s%@memcpyaltivec_LDFLAGS@%$memcpyaltivec_LDFLAGS%g
s%@motionaltivec_LDFLAGS@%$motionaltivec_LDFLAGS%g
s%@ncurses_LDFLAGS@%$ncurses_LDFLAGS%g
s%@qnx_LDFLAGS@%$qnx_LDFLAGS%g
s%@qt_LDFLAGS@%$qt_LDFLAGS%g
s%@rc_LDFLAGS@%$rc_LDFLAGS%g
s%@sdl_LDFLAGS@%$sdl_LDFLAGS%g
s%@vcd_LDFLAGS@%$vcd_LDFLAGS%g
s%@vorbis_LDFLAGS@%$vorbis_LDFLAGS%g
s%@waveout_LDFLAGS@%$waveout_LDFLAGS%g
s%@x11_LDFLAGS@%$x11_LDFLAGS%g
s%@xvideo_LDFLAGS@%$xvideo_LDFLAGS%g
9202
s%@xosd_LDFLAGS@%$xosd_LDFLAGS%g
9203 9204

CEOF
9205
EOF
9206

9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228
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"
9229
    else
9230
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9231
    fi
9232 9233 9234
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
9235
  fi
9236 9237 9238 9239 9240
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
9241

9242
cat >> $CONFIG_STATUS <<EOF
9243

9244
CONFIG_FILES=\${CONFIG_FILES-"Makefile.config Makefile.opts po/Makefile.in"}
9245 9246 9247 9248 9249 9250 9251 9252
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  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" ;;
9253 9254
  esac

9255
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9256

9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267
  # 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%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi
9268

9269 9270 9271 9272 9273
  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" ;;
9274
  *) # Relative path.
9275 9276
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
9277
  esac
9278

9279 9280 9281 9282
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac
9283

9284 9285 9286 9287 9288 9289 9290 9291
  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
9292

9293 9294 9295 9296 9297 9298 9299 9300 9301
  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*
9302 9303 9304 9305 9306

# 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.
9307 9308 9309 9310 9311 9312 9313
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'
9314
ac_uC=' '
9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329
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
9330
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9331 9332 9333 9334
  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" ;;
9335 9336
  esac

9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358
  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

EOF

# 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
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
9359 9360 9361 9362

# 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.
9363 9364 9365 9366 9367 9368
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
9369 9370

rm -f conftest.tail
9371
while :
9372
do
9373 9374 9375 9376 9377 9378
  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
9379
  echo 'CEOF
9380 9381 9382 9383 9384 9385 9386
  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
9387
done
9388 9389 9390 9391 9392 9393 9394 9395 9396 9397
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
9398
  else
9399 9400 9401 9402 9403
    # 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"
9404
    fi
9405 9406
    rm -f $ac_file
    mv conftest.h $ac_file
9407
  fi
9408
fi; done
Sam Hocevar's avatar
 
Sam Hocevar committed
9409

9410 9411 9412 9413 9414 9415 9416
EOF
cat >> $CONFIG_STATUS <<EOF


EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in $CONFIG_FILES; do
Sam Hocevar's avatar
 
Sam Hocevar committed
9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443
        # 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
9444
      done
9445

9446 9447
exit 0
EOF
9448
chmod +x $CONFIG_STATUS
9449 9450
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Sam Hocevar's avatar
 
Sam Hocevar committed
9451

9452

9453
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
9454
vlc configuration
Sam Hocevar's avatar
 
Sam Hocevar committed
9455
--------------------
Sam Hocevar's avatar
 
Sam Hocevar committed
9456
vlc version           : ${VERSION}
Sam Hocevar's avatar
 
Sam Hocevar committed
9457 9458
system                : ${SYS}
architecture          : ${ARCH}
9459
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9460
tuning                : ${TUNING}
9461
debug mode            : ${DEBUG}
Sam Hocevar's avatar
 
Sam Hocevar committed
9462
release               : ${RELEASE}
Sam Hocevar's avatar
Sam Hocevar committed
9463
profiling             : ${PROFILING}
Sam Hocevar's avatar
 
Sam Hocevar committed
9464
need builtin getopt   : ${NEED_GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
9465
built-in modules      :${BUILTINS}
9466
plug-in modules       :${PLUGINS}
9467
mozilla plugin        : ${MOZILLA}
Sam Hocevar's avatar
 
Sam Hocevar committed
9468
vlc aliases           :${ALIASES}
Sam Hocevar's avatar
 
Sam Hocevar committed
9469

Sam Hocevar's avatar
 
Sam Hocevar committed
9470 9471
You may now tune Makefile.opts at your convenience, for instance to choose
which modules get compiled as plugins.
Sam Hocevar's avatar
 
Sam Hocevar committed
9472

9473
To build vlc and its plugins, type \`${VLC_MAKE}'.
Sam Hocevar's avatar
 
Sam Hocevar committed
9474
"
9475