configure 277 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
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"
47 48 49 50
ac_help="$ac_help
  --enable-dvdplay        dvdplay input module (default disabled)"
ac_help="$ac_help
    --with-dvdplay=PATH   libdvdplay headers and libraries"
51 52 53 54
ac_help="$ac_help
  --enable-dvbpsi        dvbpsi ts demux module (default disabled)"
ac_help="$ac_help
    --with-dvbpsi=PATH    libdvbpsi headers and libraries"
55 56
ac_help="$ac_help
    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking"
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
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)"
73 74
ac_help="$ac_help
    --with-ffmpeg=PATH    path to ffmpeg installation"
75 76
ac_help="$ac_help
    --with-ffmpeg-tree=PATH ffmpeg tree for static linking"
77
ac_help="$ac_help
78
  --enable-mp4            MP4 demux module (default disabled)"
79 80 81 82
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 "
83 84
ac_help="$ac_help
  --enable-cinepak        Cinepak decoder (default enabled)"
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
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
100
    --with-directx=PATH   Win32 DirectX headers"
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
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)"
133 134 135 136
ac_help="$ac_help
  --enable-familiar       Familiar Gtk+ support (default disabled)"
ac_help="$ac_help
    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)"
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
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
154 155 156 157 158 159 160
  --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)"
161 162 163 164 165 166 167 168
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)"
169 170
ac_help="$ac_help
  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)"
171 172
ac_help="$ac_help
  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
173 174 175 176

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
177 178
build=NONE
cache_file=./config.cache
179
exec_prefix=NONE
180
host=NONE
181
no_create=
182
nonopt=NONE
183 184 185 186 187 188 189 190
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
191
target=NONE
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
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'

208 209 210 211 212 213 214
# 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

215 216 217
ac_prev=
for ac_option
do
218

219 220 221 222 223 224 225
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

226 227 228 229
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
230 231 232

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

233
  case "$ac_option" in
234 235 236 237

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
238
    bindir="$ac_optarg" ;;
239 240

  -build | --build | --buil | --bui | --bu)
241
    ac_prev=build ;;
242
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
243
    build="$ac_optarg" ;;
244 245 246 247 248 249

  -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=*)
250
    cache_file="$ac_optarg" ;;
251 252 253 254 255

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
256
    datadir="$ac_optarg" ;;
257 258

  -disable-* | --disable-*)
259
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
260
    # Reject names that are not valid shell variable names.
261 262 263 264 265
    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" ;;
266 267

  -enable-* | --enable-*)
268
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
269
    # Reject names that are not valid shell variable names.
270 271 272 273 274 275
    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
      *=*) ;;
276 277
      *) ac_optarg=yes ;;
    esac
278
    eval "enable_${ac_feature}='$ac_optarg'" ;;
279 280 281 282 283 284 285 286

  -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=*)
287
    exec_prefix="$ac_optarg" ;;
288 289 290 291 292

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

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 335 336 337 338 339 340 341 342 343 344 345 346
  -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 ;;
347 348

  -host | --host | --hos | --ho)
349
    ac_prev=host ;;
350
  -host=* | --host=* | --hos=* | --ho=*)
351
    host="$ac_optarg" ;;
352 353 354 355 356 357

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
358
    includedir="$ac_optarg" ;;
359 360 361 362

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
363
    infodir="$ac_optarg" ;;
364 365 366 367

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
368
    libdir="$ac_optarg" ;;
369 370 371 372 373 374

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
375
    libexecdir="$ac_optarg" ;;
376 377 378 379 380 381 382 383

  -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=*)
384
    localstatedir="$ac_optarg" ;;
385 386 387 388

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
389
    mandir="$ac_optarg" ;;
390 391 392 393 394 395

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

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
396
  | --no-cr | --no-c)
397 398 399 400 401 402 403 404 405 406 407 408 409
    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=*)
410
    oldincludedir="$ac_optarg" ;;
411 412 413 414

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
415
    prefix="$ac_optarg" ;;
416 417 418 419 420 421

  -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=*)
422
    program_prefix="$ac_optarg" ;;
423 424 425 426 427 428

  -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=*)
429
    program_suffix="$ac_optarg" ;;
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445

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

  -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=*)
456
    sbindir="$ac_optarg" ;;
457 458 459 460 461 462 463 464 465 466

  -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=*)
467
    sharedstatedir="$ac_optarg" ;;
468 469 470 471

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
472
    site="$ac_optarg" ;;
473 474 475 476

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
477
    srcdir="$ac_optarg" ;;
478 479 480 481 482 483

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
484
    sysconfdir="$ac_optarg" ;;
485 486

  -target | --target | --targe | --targ | --tar | --ta | --t)
487
    ac_prev=target ;;
488
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
489
    target="$ac_optarg" ;;
490 491 492 493

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

494 495 496
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
497 498

  -with-* | --with-*)
499
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
500
    # Reject names that are not valid shell variable names.
501 502 503
    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
504
    ac_package=`echo $ac_package| sed 's/-/_/g'`
505 506
    case "$ac_option" in
      *=*) ;;
507 508
      *) ac_optarg=yes ;;
    esac
509
    eval "with_${ac_package}='$ac_optarg'" ;;
510 511

  -without-* | --without-*)
512
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
513
    # Reject names that are not valid shell variable names.
514 515 516 517 518
    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" ;;
519 520 521 522 523 524 525 526 527 528

  --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=*)
529
    x_includes="$ac_optarg" ;;
530 531 532 533 534 535

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

538
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
539 540 541
    ;;

  *)
542 543 544 545 546 547 548
    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"
549 550 551 552 553 554
    ;;

  esac
done

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

558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578
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
579

580 581 582 583
# 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
584
do
585 586 587 588 589 590 591 592
  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" ;;
593 594 595
  esac
done

596 597 598 599 600 601 602 603 604
# 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
605

606 607 608 609
# 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
610

611 612 613
# 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
614 615 616 617 618

# 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.
619 620 621
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
622 623 624 625 626 627 628 629 630
  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
631
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
632
  else
633
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
634 635
  fi
fi
636
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
637 638 639 640 641 642 643 644 645 646 647

# 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
648
    echo "loading site script $ac_site_file"
649 650 651 652 653
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
654 655
  echo "loading cache $cache_file"
  . $cache_file
656
else
657 658
  echo "creating cache $cache_file"
  > $cache_file
659 660 661
fi

ac_ext=c
662
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
663
ac_cpp='$CPP $CPPFLAGS'
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680
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
681 682 683



684 685 686 687 688 689 690 691 692 693 694 695 696
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
697
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
698
fi
699 700 701
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
702

703

704 705 706 707 708 709 710 711 712 713 714 715
# 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.
716 717 718

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
719 720 721 722 723 724 725 726 727 728 729 730
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
731
echo "configure:732: checking host system type" >&5
732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751

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
752
echo "configure:753: checking target system type" >&5
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769

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
770
echo "configure:771: checking build system type" >&5
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787

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" &&
788 789 790 791
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

792

Sam Hocevar's avatar
Sam Hocevar committed
793 794
CONFIGURE_LINE="$0 $*"

Sam Hocevar's avatar
 
Sam Hocevar committed
795
PACKAGE="vlc"
Sam Hocevar's avatar
Sam Hocevar committed
796 797
VERSION="0.5.0-cvs"
CODENAME="Natalya"
Sam Hocevar's avatar
 
Sam Hocevar committed
798

799
save_CPPFLAGS="${CPPFLAGS}"
Sam Hocevar's avatar
Sam Hocevar committed
800
save_CFLAGS="${CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
801
save_LDFLAGS="${LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
802

803
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
804
echo "configure:805: checking whether ${MAKE-make} sets \${MAKE}" >&5
805 806 807
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
808
else
809
  cat > conftestmake <<\EOF
810 811
all:
	@echo 'ac_maketemp="${MAKE}"'
812
EOF
813
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
814
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
815 816 817 818 819
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
820
rm -f conftestmake
821 822
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
823
  echo "$ac_t""yes" 1>&6
824 825
  SET_MAKE=
else
826
  echo "$ac_t""no" 1>&6
827 828 829
  SET_MAKE="MAKE=${MAKE-make}"
fi

830 831 832
# 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
833
echo "configure:834: checking for $ac_word" >&5
834 835
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
836 837 838 839
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
840 841 842 843 844 845 846 847 848 849
  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"
850 851
fi
fi
852
CC="$ac_cv_prog_CC"
853
if test -n "$CC"; then
854
  echo "$ac_t""$CC" 1>&6
855
else
856
  echo "$ac_t""no" 1>&6
857 858 859 860 861
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
862
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
863
echo "configure:864: checking for $ac_word" >&5
864 865
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
866 867 868 869
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
870
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
871
  ac_prog_rejected=no
872 873 874 875 876 877 878 879 880 881 882 883 884
  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"
885 886 887 888
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
889
  if test $# -gt 0; then
890 891 892 893
    # 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
894
    set dummy "$ac_dir/$ac_word" "$@"
895 896 897 898 899 900
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
901
CC="$ac_cv_prog_CC"
902
if test -n "$CC"; then
903
  echo "$ac_t""$CC" 1>&6
904
else
905
  echo "$ac_t""no" 1>&6
906 907
fi

908 909 910 911 912 913
  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
914
echo "configure:915: checking for $ac_word" >&5
915 916
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
917 918 919 920
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
921 922 923 924 925 926 927 928 929 930
  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"
931 932
fi
fi
933
CC="$ac_cv_prog_CC"
934
if test -n "$CC"; then
935
  echo "$ac_t""$CC" 1>&6
936
else
937
  echo "$ac_t""no" 1>&6
938
fi
939 940
 ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
941
  fi
942
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
943
fi
944

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

948 949 950 951 952 953
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
954

955
cat > conftest.$ac_ext << EOF
956

957
#line 958 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
958 959
#include "confdefs.h"

960 961
main(){return(0);}
EOF
962
if { (eval echo configure:963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
963 964 965 966
  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
967
  else
968
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
969
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
970
else
971 972 973
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
974
fi
975 976 977 978 979 980 981
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
982

983 984 985 986 987
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
988
echo "configure:989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
989 990
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
Sam Hocevar's avatar
 
Sam Hocevar committed
991

992
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
993
echo "configure:994: checking whether we are using GNU C" >&5
994 995
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
996
else
997 998 999
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
Sam Hocevar's avatar
 
Sam Hocevar committed
1000
#endif
1001
EOF
1002
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1003
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
1004
else
1005
  ac_cv_prog_gcc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1006
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1007 1008
fi

1009
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1010

1011 1012 1013 1014 1015
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1016

1017 1018 1019 1020
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1021
echo "configure:1022: checking whether ${CC-cc} accepts -g" >&5
1022 1023 1024 1025 1026
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
1027 1028
  ac_cv_prog_cc_g=yes
else
1029
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1030
fi
1031 1032
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
1033
fi
1034 1035

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1036
if test "$ac_test_CFLAGS" = set; then
1037
  CFLAGS="$ac_save_CFLAGS"
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050
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
1051

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

1132

1133 1134 1135 1136 1137
if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi
1138

1139
# 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
1140
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1141
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1142
echo "configure:1143: checking for $ac_word" >&5
1143 1144
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
1145 1146 1147 1148
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158
  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
1159 1160
fi
fi
1161
RANLIB="$ac_cv_prog_RANLIB"
Gildas Bazin's avatar
 
Gildas Bazin committed
1162
if test -n "$RANLIB"; then
1163
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1164
else
1165
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1166 1167
fi

1168

Gildas Bazin's avatar
 
Gildas Bazin committed
1169
if test -z "$ac_cv_prog_RANLIB"; then
1170
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
1171 1172
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
1173
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1174
echo "configure:1175: checking for $ac_word" >&5
1175 1176
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
1177
else
1178 1179
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
1180
else
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191
  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
1192 1193
fi
fi
1194 1195 1196
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1197
else
1198
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1199 1200 1201
fi

else
1202 1203
  RANLIB=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
1204 1205
fi

1206
# 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
1207
set dummy ${ac_tool_prefix}strip; ac_word=$2
1208
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1209
echo "configure:1210: checking for $ac_word" >&5
1210 1211
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
1212 1213 1214 1215
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
1216 1217 1218 1219 1220 1221 1222 1223 1224 1225
  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
1226 1227
fi
fi
1228
STRIP="$ac_cv_prog_STRIP"
Sam Hocevar's avatar
 
Sam Hocevar committed
1229
if test -n "$STRIP"; then
1230
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1231
else
1232
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1233 1234
fi

1235

Sam Hocevar's avatar
 
Sam Hocevar committed
1236
if test -z "$ac_cv_prog_STRIP"; then
1237
if test -n "$ac_tool_prefix"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1238 1239
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
1240
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1241
echo "configure:1242: checking for $ac_word" >&5
1242 1243
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
1244
else
1245 1246
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
1247
else
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258
  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
1259 1260
fi
fi
1261 1262 1263
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1264
else
1265
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1266 1267 1268
fi

else
1269 1270
  STRIP=":"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1271 1272
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
1273

Christophe Massiot's avatar
Christophe Massiot committed
1274 1275
# Extract the first word of "gmake", so it can be a program name with args.
set dummy gmake; ac_word=$2
1276
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1277
echo "configure:1278: checking for $ac_word" >&5
1278 1279
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1280
else
1281 1282
  case "$GMAKE" in
  /*)
1283 1284
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
  ;;
1285 1286 1287
  ?:/*)			 
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
  ;;
1288
  *)
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298
  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
1299 1300 1301 1302
  test -z "$ac_cv_path_GMAKE" && ac_cv_path_GMAKE="no"
  ;;
esac
fi
1303
GMAKE="$ac_cv_path_GMAKE"
Christophe Massiot's avatar
Christophe Massiot committed
1304
if test -n "$GMAKE"; then
1305
  echo "$ac_t""$GMAKE" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1306
else
1307
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1308 1309
fi

1310
if test "x${GMAKE}" = "xno"; then
1311
  echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
1312
echo "configure:1313: checking whether GNU make is installed" >&5
1313 1314
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
1315 1316 1317 1318 1319 1320 1321 1322 1323
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
1324 1325

echo "$ac_t""$ac_cv_gmake" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1326 1327 1328 1329 1330
  VLC_MAKE="make"
else
  VLC_MAKE="gmake"
fi

1331
ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
Sam Hocevar's avatar
Sam Hocevar committed
1332

1333
cat >> confdefs.h <<EOF
1334
#define VLC_PACKAGE "${PACKAGE}"
1335
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1336

1337
cat >> confdefs.h <<EOF
1338
#define VLC_VERSION "${VERSION}"
1339
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1340

1341 1342 1343
# 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
1344
echo "configure:1345: checking for $ac_word" >&5
1345 1346
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
1347 1348 1349 1350
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361
  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
1362 1363
fi
fi
1364
RANLIB="$ac_cv_prog_RANLIB"
Sam Hocevar's avatar
 
Sam Hocevar committed
1365
if test -n "$RANLIB"; then
1366
  echo "$ac_t""$RANLIB" 1>&6
1367
else
1368
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1369
fi
1370 1371


1372
        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1373
echo "configure:1374: checking for strerror in -lcposix" >&5
1374 1375 1376
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
1377
else
1378
  ac_save_LIBS="$LIBS"
1379
LIBS="-lcposix  $LIBS"
1380
cat > conftest.$ac_ext <<EOF
1381
#line 1382 "configure"
1382 1383 1384
#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
1385 1386
    builtin and then its argument prototype would still apply.  */
char strerror();
Sam Hocevar's avatar
 
Sam Hocevar committed
1387

1388 1389 1390 1391
int main() {
strerror()
; return 0; }
EOF
1392
if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1393 1394 1395 1396 1397 1398 1399 1400 1401 1402
  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
1403

1404 1405 1406 1407 1408 1409 1410
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
1411

1412
  
1413

1414
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1415
echo "configure:1416: checking for ANSI C header files" >&5
1416 1417
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
1418
else
1419
  cat > conftest.$ac_ext <<EOF
1420
#line 1421 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1421 1422 1423 1424 1425
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
1426 1427
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1428
{ (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1429 1430 1431
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
1432 1433
  ac_cv_header_stdc=yes
else
1434 1435
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1436
  cat conftest.$ac_ext >&5
1437
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1438 1439
  ac_cv_header_stdc=no
fi
1440
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1441 1442 1443

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1507 1508
fi
fi
1509

1510 1511 1512
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
1513
#define STDC_HEADERS 1
1514
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1515 1516 1517

fi

1518
echo $ac_n "checking for working const""... $ac_c" 1>&6
1519
echo "configure:1520: checking for working const" >&5
1520 1521 1522 1523
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
1524
#line 1525 "configure"
1525 1526 1527 1528 1529
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
1530
typedef int charset[2]; const charset x;
1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550
/* 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
1551
}
1552 1553 1554 1555
{ /* 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
1556
}
1557 1558 1559 1560
{ /* 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
1561
}
1562 1563 1564 1565 1566 1567 1568
{ /* 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;
1569
}
1570 1571 1572

; return 0; }
EOF
1573
if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1574
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1575 1576
  ac_cv_c_const=yes
else
1577 1578 1579 1580
  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
1581
fi
1582
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1583
fi
1584

1585 1586 1587 1588 1589
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
1590 1591 1592

fi

1593
echo $ac_n "checking for inline""... $ac_c" 1>&6
1594
echo "configure:1595: checking for inline" >&5
1595 1596
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
1597 1598 1599
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
1600
  cat > conftest.$ac_ext <<EOF
1601
#line 1602 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1602 1603
#include "confdefs.h"

1604
int main() {
1605
} $ac_kw foo() {
1606 1607
; return 0; }
EOF
1608
if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1609
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1610 1611
  ac_cv_c_inline=$ac_kw; break
else
1612 1613
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1614
fi
1615
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1616 1617 1618
done

fi
1619 1620 1621

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
Sam Hocevar's avatar
 
Sam Hocevar committed
1622
  inline | yes) ;;
1623 1624 1625
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1626
 ;;
1627
  *)  cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1628
#define inline $ac_cv_c_inline
1629
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1630 1631 1632
 ;;
esac

1633
echo $ac_n "checking for off_t""... $ac_c" 1>&6
1634
echo "configure:1635: checking for off_t" >&5
1635 1636
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
1637
else
1638
  cat > conftest.$ac_ext <<EOF
1639
#line 1640 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1640
#include "confdefs.h"
1641 1642 1643 1644
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1645
#endif
1646 1647 1648 1649
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
1650 1651
  ac_cv_type_off_t=yes
else
1652 1653
  rm -rf conftest*
  ac_cv_type_off_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1654
fi
1655
rm -f conftest*
1656

1657 1658 1659 1660
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
1661
#define off_t long
1662
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1663 1664 1665

fi

1666
echo $ac_n "checking for size_t""... $ac_c" 1>&6
1667
echo "configure:1668: checking for size_t" >&5
1668 1669
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
1670
else
1671
  cat > conftest.$ac_ext <<EOF
1672
#line 1673 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1673
#include "confdefs.h"
1674 1675 1676 1677
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1678
#endif
1679 1680 1681 1682
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
1683 1684
  ac_cv_type_size_t=yes
else
1685 1686
  rm -rf conftest*
  ac_cv_type_size_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1687
fi
1688
rm -f conftest*
1689

1690 1691 1692 1693
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
1694
#define size_t unsigned
1695
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1696 1697 1698 1699 1700

fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
1701
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1702
echo "configure:1703: checking for working alloca.h" >&5
1703 1704
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
1705
else
1706
  cat > conftest.$ac_ext <<EOF
1707
#line 1708 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1708 1709
#include "confdefs.h"
#include <alloca.h>
1710
int main() {
1711
char *p = alloca(2 * sizeof(int));
1712 1713
; return 0; }
EOF
1714
if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728
  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
1729
#define HAVE_ALLOCA_H 1
1730
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1731 1732 1733

fi

1734
echo $ac_n "checking for alloca""... $ac_c" 1>&6
1735
echo "configure:1736: checking for alloca" >&5
1736 1737
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
1738
else
1739
  cat > conftest.$ac_ext <<EOF
1740
#line 1741 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1741
#include "confdefs.h"
1742

Sam Hocevar's avatar
 
Sam Hocevar committed
1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763
#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

1764 1765 1766 1767
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
1768
if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1769
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1770 1771
  ac_cv_func_alloca_works=yes
else
1772 1773 1774 1775
  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
1776
fi
1777
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1778 1779
fi

1780
echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1781
if test $ac_cv_func_alloca_works = yes; then
1782
  cat >> confdefs.h <<\EOF
1783
#define HAVE_ALLOCA 1
1784
EOF
1785

1786
fi
1787

1788 1789 1790 1791 1792 1793 1794
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
1795
#define C_ALLOCA 1
1796
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1797 1798


1799
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1800
echo "configure:1801: checking whether alloca needs Cray hooks" >&5
1801 1802
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
1803
else
1804
  cat > conftest.$ac_ext <<EOF
1805
#line 1806 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1806 1807 1808 1809 1810 1811 1812
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

1813
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1814 1815
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
1816
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1817 1818
  ac_cv_os_cray=yes
else
1819
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1820 1821 1822 1823 1824
  ac_cv_os_cray=no
fi
rm -f conftest*

fi
1825 1826

echo "$ac_t""$ac_cv_os_cray" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1827
if test $ac_cv_os_cray = yes; then
1828 1829
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1830
echo "configure:1831: checking for $ac_func" >&5
1831 1832
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
1833
else
1834
  cat > conftest.$ac_ext <<EOF
1835
#line 1836 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1836 1837
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1838
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1839 1840 1841
#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
1842 1843 1844 1845
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1846 1847 1848 1849 1850 1851 1852

/* 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
1853
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1854 1855
#endif

1856 1857
; return 0; }
EOF
1858
if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872
  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
1873
#define CRAY_STACKSEG_END $ac_func
1874
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1875

1876 1877 1878
  break
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1879 1880
fi

1881
done
Sam Hocevar's avatar
 
Sam Hocevar committed
1882 1883
fi

1884
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1885
echo "configure:1886: checking stack direction for C alloca" >&5
1886 1887
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
1888 1889 1890 1891
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
1892
  cat > conftest.$ac_ext <<EOF
1893
#line 1894 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908
#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 ()
{
1909
  exit (find_stack_direction() < 0);
Sam Hocevar's avatar
 
Sam Hocevar committed
1910
}
1911
EOF
1912
if { (eval echo configure:1913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1913
then
Sam Hocevar's avatar
 
Sam Hocevar committed
1914 1915
  ac_cv_c_stack_direction=1
else
1916 1917 1918 1919
  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
1920
fi
1921
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1922
fi
1923

Sam Hocevar's avatar
 
Sam Hocevar committed
1924 1925
fi

1926 1927
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1928
#define STACK_DIRECTION $ac_cv_c_stack_direction
1929
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1930 1931 1932

fi

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

for ac_func in getpagesize
do
1975
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1976
echo "configure:1977: checking for $ac_func" >&5
1977 1978
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
1979
else
1980
  cat > conftest.$ac_ext <<EOF
1981
#line 1982 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1982 1983
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1984
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1985 1986 1987
#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
1988 1989 1990 1991
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1992 1993 1994 1995 1996 1997 1998

/* 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
1999
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2000 2001
#endif

2002 2003
; return 0; }
EOF
2004
if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2005 2006 2007 2008 2009 2010 2011 2012 2013 2014
  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
2015

2016 2017 2018 2019 2020 2021 2022 2023 2024
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
2025 2026 2027
fi
done

2028
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2029
echo "configure:2030: checking for working mmap" >&5
2030 2031
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
2032 2033 2034 2035
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
2036
  cat > conftest.$ac_ext <<EOF
2037
#line 2038 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051
#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
2052
   VM page cache was not coherent with the filesystem buffer cache
Sam Hocevar's avatar
 
Sam Hocevar committed
2053 2054
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
2055
   propogated back to all the places they're supposed to be.
Sam Hocevar's avatar
 
Sam Hocevar committed
2056 2057 2058 2059 2060

   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)  */
2061
#include <sys/types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2062 2063 2064
#include <fcntl.h>
#include <sys/mman.h>

2065
/* This mess was copied from the GNU getpagesize.h.  */
2066
#ifndef HAVE_GETPAGESIZE
2067 2068 2069
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif
2070

Sam Hocevar's avatar
 
Sam Hocevar committed
2071
/* Assume that all systems that can run configure have sys/param.h.  */
2072
# ifndef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2073 2074 2075 2076 2077 2078
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
2079
#  ifdef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105
#   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 */

2106 2107 2108 2109 2110 2111
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2112
int
2113
main()
Sam Hocevar's avatar
 
Sam Hocevar committed
2114
{
2115 2116 2117 2118 2119 2120 2121 2122 2123
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
2124
	data = malloc(pagesize);
2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144
	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);
2145
	data2 = malloc(2 * pagesize);
2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162
	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;
2163
	data3 = malloc(pagesize);
2164 2165 2166 2167 2168 2169 2170 2171 2172 2173
	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
2174
}
2175 2176

EOF
2177
if { (eval echo configure:2178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2178
then
Sam Hocevar's avatar
 
Sam Hocevar committed
2179 2180
  ac_cv_func_mmap_fixed_mapped=yes
else
2181 2182 2183 2184
  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
2185
fi
2186
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2187
fi
2188

Sam Hocevar's avatar
 
Sam Hocevar committed
2189
fi
2190

2191 2192 2193
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
2194
#define HAVE_MMAP 1
2195
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2196 2197 2198 2199

fi


2200
    echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
2201
echo "configure:2202: checking whether we are using the GNU C Library 2.1 or newer" >&5
2202 2203
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
2204
else
2205
  cat > conftest.$ac_ext <<EOF
2206
#line 2207 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2207 2208 2209 2210 2211 2212 2213 2214
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif
2215 2216
	
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2217 2218
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Lucky GNU user" >/dev/null 2>&1; then
2219
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2220 2221
  ac_cv_gnu_library_2_1=yes
else
2222
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2223 2224 2225 2226
  ac_cv_gnu_library_2_1=no
fi
rm -f conftest*

2227 2228
      
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2229 2230
fi

2231 2232
echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2233
    GLIBC21="$ac_cv_gnu_library_2_1"
2234
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2235

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

2278
   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
Sam Hocevar's avatar
 
Sam Hocevar committed
2279 2280 2281
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
2282
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2283
echo "configure:2284: checking for $ac_func" >&5
2284 2285
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
2286
else
2287
  cat > conftest.$ac_ext <<EOF
2288
#line 2289 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2289 2290
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2291
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2292 2293 2294
#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
2295 2296 2297 2298
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2299 2300 2301 2302 2303 2304 2305

/* 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
2306
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2307 2308
#endif

2309 2310
; return 0; }
EOF
2311
if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2312 2313 2314 2315 2316 2317 2318 2319 2320 2321
  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
2322

2323 2324 2325 2326 2327 2328 2329 2330 2331
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
2332 2333 2334 2335
fi
done


2336 2337 2338
   
    
  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2339 2340
if test "${with_libiconv_prefix+set}" = set; then
  withval="$with_libiconv_prefix"
2341
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2342 2343 2344 2345
    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
2346 2347
   
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2348 2349


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

2405 2406 2407
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
2408
#define HAVE_ICONV 1
2409
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2410

2411
    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
2412
echo "configure:2413: checking for iconv declaration" >&5
2413 2414
    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
2415
else
2416 2417
  
      cat > conftest.$ac_ext <<EOF
2418
#line 2419 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432
#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

2433
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2434

2435 2436
; return 0; }
EOF
2437
if { (eval echo configure:2438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2438
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2439 2440
  am_cv_proto_iconv_arg1=""
else
2441 2442 2443 2444
  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
2445
fi
2446
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2447 2448 2449 2450
      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/( /(/'`
2451 2452 2453
    echo "$ac_t""${ac_t:-
         }$am_cv_proto_iconv" 1>&6
    cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2454
#define ICONV_CONST $am_cv_proto_iconv_arg1
2455
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2456 2457 2458 2459 2460 2461

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

2464 2465
   
  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
2466
echo "configure:2467: checking for nl_langinfo and CODESET" >&5
2467 2468
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
2469
else
2470
  cat > conftest.$ac_ext <<EOF
2471
#line 2472 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2472 2473
#include "confdefs.h"
#include <langinfo.h>
2474
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2475
char* cs = nl_langinfo(CODESET);
2476 2477
; return 0; }
EOF
2478
if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2479
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2480 2481
  am_cv_langinfo_codeset=yes
else
2482 2483 2484 2485
  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
2486
fi
2487 2488
rm -f conftest*
    
2489 2490
fi

2491 2492 2493
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
2494
#define HAVE_LANGINFO_CODESET 1
2495
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2496 2497 2498 2499

  fi

   if test $ac_cv_header_locale_h = yes; then
2500
    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2501
echo "configure:2502: checking for LC_MESSAGES" >&5
2502 2503
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
2504
else
2505
  cat > conftest.$ac_ext <<EOF
2506
#line 2507 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2507 2508
#include "confdefs.h"
#include <locale.h>
2509
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2510
return LC_MESSAGES
2511 2512
; return 0; }
EOF
2513
if { (eval echo configure:2514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2514
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2515 2516
  am_cv_val_LC_MESSAGES=yes
else
2517 2518 2519 2520
  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
2521
fi
2522
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2523
fi
2524

2525 2526 2527
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
2528
#define HAVE_LC_MESSAGES 1
2529
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2530 2531 2532

    fi
  fi
2533
   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2534
echo "configure:2535: checking whether NLS is requested" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2535 2536 2537 2538 2539 2540
        # 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
2541
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2542

2543 2544
    echo "$ac_t""$USE_NLS" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2545 2546 2547 2548 2549 2550

    BUILD_INCLUDED_LIBINTL=no
    USE_INCLUDED_LIBINTL=no
    INTLLIBS=

        if test "$USE_NLS" = "yes"; then
2551
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2552
#define ENABLE_NLS 1
2553
EOF
2554

2555
      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2556
echo "configure:2557: checking whether included gettext is requested" >&5
2557
      # Check whether --with-included-gettext or --without-included-gettext was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2558 2559 2560 2561 2562
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
2563 2564 2565
fi

      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2566 2567 2568 2569 2570

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

2571 2572
                
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2573

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

echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2630 2631

	   if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
2632
	     echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
2633
echo "configure:2634: checking for GNU gettext in libintl" >&5
2634 2635
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
2636 2637 2638
else
  gt_save_LIBS="$LIBS"
		LIBS="$LIBS -lintl $LIBICONV"
2639
		cat > conftest.$ac_ext <<EOF
2640
#line 2641 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2641 2642 2643
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2644
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2645 2646
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2647 2648
; return 0; }
EOF
2649
if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2650
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2651 2652
  gt_cv_func_gnugettext1_libintl=yes
else
2653 2654 2655 2656
  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
2657
fi
2658
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2659 2660
		LIBS="$gt_save_LIBS"
fi
2661 2662

echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2663 2664 2665 2666 2667
	   fi

	   	   	   	   	   if test "$gt_cv_func_gnugettext1_libc" = "yes" \
	      || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
		   && test "$PACKAGE" != gettext; }; then
2668
	     cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2669
#define HAVE_GETTEXT 1
2670
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2671 2672 2673 2674 2675 2676 2677 2678


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

	     gt_save_LIBS="$LIBS"
	     LIBS="$LIBS $INTLLIBS"
2679
	     for ac_func in dcgettext
Sam Hocevar's avatar
 
Sam Hocevar committed
2680
do
2681
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2682
echo "configure:2683: checking for $ac_func" >&5
2683 2684
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
2685
else
2686
  cat > conftest.$ac_ext <<EOF
2687
#line 2688 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2688 2689
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2690
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2691 2692 2693
#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
2694 2695 2696 2697 2698
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

Sam Hocevar's avatar
 
Sam Hocevar committed
2699 2700 2701 2702 2703 2704
/* 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
2705
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2706 2707
#endif

2708 2709
; return 0; }
EOF
2710
if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2711 2712 2713 2714 2715 2716 2717 2718 2719 2720
  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
2721

2722 2723 2724 2725 2726 2727 2728 2729 2730
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
2731 2732 2733 2734 2735 2736 2737
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
2738
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2739
echo "configure:2740: checking for $ac_word" >&5
2740 2741
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
2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764
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
2765
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2766
else
2767
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2768 2769 2770 2771
fi

	     # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
2772
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2773
echo "configure:2774: checking for $ac_word" >&5
2774 2775
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
2776
else
2777 2778
  case "$GMSGFMT" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
2779 2780
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
2781 2782 2783
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
2784
  *)
2785 2786 2787 2788 2789 2790 2791 2792 2793 2794
  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
2795 2796 2797 2798
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
2799
GMSGFMT="$ac_cv_path_GMSGFMT"
Sam Hocevar's avatar
 
Sam Hocevar committed
2800
if test -n "$GMSGFMT"; then
2801
  echo "$ac_t""$GMSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2802
else
2803
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2804 2805 2806 2807 2808
fi


	     	     # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2809
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2810
echo "configure:2811: checking for $ac_word" >&5
2811 2812
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
2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835
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
2836
  echo "$ac_t""$XGETTEXT" 1>&6
2837
else
2838
  echo "$ac_t""no" 1>&6
2839 2840
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2841 2842 2843

	     CATOBJEXT=.gmo
	   fi
2844 2845 2846
	
else
  echo "$ac_t""no" 1>&6
2847 2848
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2849 2850 2851 2852 2853 2854 2855 2856 2857 2858

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

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

        # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2929
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2930
echo "configure:2931: checking for $ac_word" >&5
2931 2932
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
2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955
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
2956
  echo "$ac_t""$XGETTEXT" 1>&6
2957
else
2958
  echo "$ac_t""no" 1>&6
2959 2960
fi

2961
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2962 2963 2964 2965 2966 2967
	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
2968

Sam Hocevar's avatar
 
Sam Hocevar committed
2969 2970 2971 2972
                  if test "$GMSGFMT" != ":"; then
			if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
	  : ;
	else
2973
	  echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2974 2975 2976 2977 2978 2979 2980 2981
	  GMSGFMT=":"
	fi
      fi

                  if test "$XGETTEXT" != ":"; then
			if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
	  : ;
	else
2982
	  echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2983 2984 2985 2986 2987 2988
	  XGETTEXT=":"
	fi
      fi

            POSUB=po
    fi
2989
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2990 2991 2992 2993 2994 2995 2996 2997


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

                                            for ac_prog in bison
do
2998
# Extract the first word of "$ac_prog", so it can be a program name with args.
Sam Hocevar's avatar
 
Sam Hocevar committed
2999
set dummy $ac_prog; ac_word=$2
3000
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3001
echo "configure:3002: checking for $ac_word" >&5
3002 3003
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
3004
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3005 3006
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
3007
else
3008 3009 3010 3011 3012 3013 3014 3015 3016 3017
  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
3018 3019
fi
fi
3020
INTLBISON="$ac_cv_prog_INTLBISON"
Sam Hocevar's avatar
 
Sam Hocevar committed
3021
if test -n "$INTLBISON"; then
3022
  echo "$ac_t""$INTLBISON" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3023
else
3024
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3025 3026
fi

3027
test -n "$INTLBISON" && break
Sam Hocevar's avatar
 
Sam Hocevar committed
3028 3029 3030 3031 3032
done

    if test -z "$INTLBISON"; then
      ac_verc_fail=yes
    else
3033
            echo $ac_n "checking version of bison""... $ac_c" 1>&6
3034
echo "configure:3035: checking version of bison" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3035 3036 3037 3038 3039 3040 3041
      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
3042
      echo "$ac_t""$ac_prog_version" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3043 3044 3045 3046 3047 3048 3049 3050 3051 3052
    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

3053 3054 3055 3056 3057 3058 3059 3060 3061
        
    
    
    
    
    
    
    
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3062 3063 3064 3065 3066

        nls_cv_header_intl=
    nls_cv_header_libgt=

        DATADIRNAME=share
3067
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3068 3069

        INSTOBJEXT=.mo
3070
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3071 3072

        GENCAT=gencat
3073 3074
    
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3075 3076 3077 3078 3079

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3117
      INTL_LIBTOOL_SUFFIX_PREFIX=
3118 3119
   
  
3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131

# 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.
3132
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3133
echo "configure:3134: checking for a BSD compatible install" >&5
3134
if test -z "$INSTALL"; then
3135 3136
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3137
else
3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157
    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
3158
      done
3159 3160 3161 3162
      ;;
    esac
  done
  IFS="$ac_save_IFS"
3163 3164 3165

fi
  if test "${ac_cv_path_install+set}" = set; then
3166
    INSTALL="$ac_cv_path_install"
3167 3168 3169 3170 3171
  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.
3172
    INSTALL="$ac_install_sh"
3173 3174
  fi
fi
3175
echo "$ac_t""$INSTALL" 1>&6
3176 3177 3178 3179 3180

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

3181
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3182 3183 3184

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3185

Sam Hocevar's avatar
Sam Hocevar committed
3186 3187
vlc_LDFLAGS="${LDFLAGS}"

3188
case "x${target_os}" in
Gildas Bazin's avatar
 
Gildas Bazin committed
3189 3190 3191 3192 3193 3194 3195 3196
  x)
    SYS=unknown
    ;;
  xlinux*)
    SYS=linux
    ;;
  xbsdi*)
    SYS=bsdi
3197
    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3198 3199 3200 3201 3202
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
    vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
    ;;
  x*bsd*)
    SYS="${target_os}"
3203
    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3204 3205 3206
    ;;
  xdarwin*)
    SYS=darwin
3207
    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"; CFLAGS="${save_CFLAGS}"
3208
    vlc_LDFLAGS="${vlc_LDFLAGS} -all_load"
Gildas Bazin's avatar
 
Gildas Bazin committed
3209 3210 3211
    ;;
  x*mingw32*)
    SYS=mingw32
3212
    # 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
3213
set dummy ${ac_tool_prefix}windres; ac_word=$2
3214
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3215
echo "configure:3216: checking for $ac_word" >&5
3216 3217
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
3218 3219 3220 3221
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
3222 3223 3224 3225 3226 3227 3228 3229 3230 3231
  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
3232 3233
fi
fi
3234
WINDRES="$ac_cv_prog_WINDRES"
Gildas Bazin's avatar
 
Gildas Bazin committed
3235
if test -n "$WINDRES"; then
3236
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3237
else
3238
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3239 3240
fi

3241

Gildas Bazin's avatar
 
Gildas Bazin committed
3242
if test -z "$ac_cv_prog_WINDRES"; then
3243
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
3244 3245
  # Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
3246
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3247
echo "configure:3248: checking for $ac_word" >&5
3248 3249
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
3250
else
3251 3252
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
3253
else
3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264
  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
3265 3266
fi
fi
3267 3268 3269
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3270
else
3271
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3272 3273 3274
fi

else
3275 3276
  WINDRES=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
3277 3278
fi

3279
    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3280
    vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
Sam Hocevar's avatar
 
Sam Hocevar committed
3281 3282
    vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3283
    ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
3284
    http_LDFLAGS="${http_LDFLAGS} -lws2_32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3285
    rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3286 3287 3288
    ;;
  x*nto*)
    SYS=nto
Sam Hocevar's avatar
 
Sam Hocevar committed
3289 3290
    x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
    xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
Gildas Bazin's avatar
 
Gildas Bazin committed
3291
    ;;
3292 3293 3294
  xsolaris*)
    SYS=solaris
    ;;
Gildas Bazin's avatar
 
Gildas Bazin committed
3295 3296
  xbeos)
    SYS=beos
3297
    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3298 3299 3300 3301
    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
3302 3303
    ;;
  x*)
Sam Hocevar's avatar
 
Sam Hocevar committed
3304
    SYS="${target_os}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3305 3306 3307
    ;;
esac

3308
if test "x${SYS}" = "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3309 3310 3311 3312
then
  plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
else
  plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
3313
  plugins_LDFLAGS="${plugins_LDFLAGS} -fPIC"
Sam Hocevar's avatar
 
Sam Hocevar committed
3314 3315
fi

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

3318
for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup
3319
do
3320
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3321
echo "configure:3322: checking for $ac_func" >&5
3322 3323
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3324
else
3325
  cat > conftest.$ac_ext <<EOF
3326
#line 3327 "configure"
3327 3328
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3329
    which can conflict with char $ac_func(); below.  */
3330 3331 3332
#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
3333 3334 3335 3336
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3337 3338 3339 3340 3341 3342 3343

/* 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
3344
$ac_func();
3345 3346
#endif

3347 3348
; return 0; }
EOF
3349
if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3350 3351 3352 3353 3354 3355 3356 3357 3358 3359
  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
3360

3361 3362 3363 3364 3365 3366 3367 3368 3369
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
3370 3371 3372
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3373

3374
echo $ac_n "checking for connect""... $ac_c" 1>&6
3375
echo "configure:3376: checking for connect" >&5
3376 3377
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3378
else
3379
  cat > conftest.$ac_ext <<EOF
3380
#line 3381 "configure"
3381 3382
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3383
    which can conflict with char connect(); below.  */
3384 3385 3386
#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
3387 3388 3389 3390
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
3391 3392 3393 3394 3395 3396 3397

/* 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
3398
connect();
3399 3400
#endif

3401 3402
; return 0; }
EOF
3403
if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416
  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
3417 3418
  :
else
3419
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3420

3421
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3422
echo "configure:3423: checking for connect in -lsocket" >&5
3423 3424 3425
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
3426
else
3427
  ac_save_LIBS="$LIBS"
3428
LIBS="-lsocket  $LIBS"
3429
cat > conftest.$ac_ext <<EOF
3430
#line 3431 "configure"
3431 3432 3433
#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
3434 3435 3436 3437 3438 3439 3440
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
3441
if { (eval echo configure:3442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455
  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
3456 3457
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
    vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
3458

3459 3460
else
  echo "$ac_t""no" 1>&6
3461 3462 3463 3464
fi

fi

Sam Hocevar's avatar
Sam Hocevar committed
3465
echo $ac_n "checking for send""... $ac_c" 1>&6
3466
echo "configure:3467: checking for send" >&5
Sam Hocevar's avatar
Sam Hocevar committed
3467 3468 3469 3470
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
3471
#line 3472 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493
#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
3494
if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
Sam Hocevar committed
3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512
  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
3513
echo "configure:3514: checking for send in -lsocket" >&5
Sam Hocevar's avatar
Sam Hocevar committed
3514 3515 3516 3517 3518 3519 3520
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
3521
#line 3522 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
3522 3523 3524 3525 3526 3527 3528 3529 3530 3531
#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
3532
if { (eval echo configure:3533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
Sam Hocevar committed
3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554
  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

3555
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3556
echo "configure:3557: checking for gethostbyname" >&5
3557 3558
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3559
else
3560
  cat > conftest.$ac_ext <<EOF
3561
#line 3562 "configure"
3562 3563
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3564
    which can conflict with char gethostbyname(); below.  */
3565 3566 3567
#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
3568 3569 3570 3571
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
3572 3573 3574 3575 3576 3577 3578

/* 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
3579
gethostbyname();
3580 3581
#endif

3582 3583
; return 0; }
EOF
3584
if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597
  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
3598 3599
  :
else
3600
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3601

3602
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3603
echo "configure:3604: checking for gethostbyname in -lnsl" >&5
3604 3605 3606
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
3607
else
3608
  ac_save_LIBS="$LIBS"
3609
LIBS="-lnsl  $LIBS"
3610
cat > conftest.$ac_ext <<EOF
3611
#line 3612 "configure"
3612 3613 3614
#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
3615 3616 3617 3618 3619 3620 3621
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
3622
if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636
  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
3637
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl"
3638 3639
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3640 3641 3642 3643 3644
fi


fi

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

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3662 3663 3664 3665 3666 3667 3668

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

3672 3673
; return 0; }
EOF
3674
if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687
  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
3688 3689
  :
else
3690
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3691

3692
  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
3693
echo "configure:3694: checking for gethostbyname in -lbind" >&5
3694 3695 3696
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
3697
else
3698
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3699
LIBS="-lbind  $LIBS"
3700
cat > conftest.$ac_ext <<EOF
3701
#line 3702 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3702 3703 3704
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
3705 3706 3707 3708 3709 3710 3711
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

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

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3732

3733 3734
fi

3735 3736
have_nanosleep=0
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
3737
echo "configure:3738: checking for nanosleep" >&5
3738
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
3739
  echo $ac_n "(cached) $ac_c" 1>&6
3740
else
3741
  cat > conftest.$ac_ext <<EOF
3742
#line 3743 "configure"
3743 3744
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3745
    which can conflict with char nanosleep(); below.  */
3746 3747 3748
#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
3749
    builtin and then its argument prototype would still apply.  */
3750
char nanosleep();
3751 3752

int main() {
3753 3754 3755 3756

/* 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.  */
3757
#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
3758 3759
choke me
#else
3760
nanosleep();
3761 3762
#endif

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

3777
if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
3778
  echo "$ac_t""yes" 1>&6
3779
  have_nanosleep=1
3780 3781
else
  echo "$ac_t""no" 1>&6
3782 3783

  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
3784
echo "configure:3785: checking for nanosleep in -lrt" >&5
3785 3786 3787 3788 3789
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"
3790
LIBS="-lrt  $LIBS"
3791
cat > conftest.$ac_ext <<EOF
3792
#line 3793 "configure"
3793
#include "confdefs.h"
3794 3795
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
3796 3797 3798 3799 3800 3801 3802
    builtin and then its argument prototype would still apply.  */
char nanosleep();

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

int main() {
nanosleep()
; return 0; }
EOF
3841
if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3842 3843 3844 3845 3846 3847 3848
  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"
3849
fi
3850 3851
rm -f conftest*
LIBS="$ac_save_LIBS"
3852

3853 3854 3855
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3856
  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1
3857 3858 3859
else
  echo "$ac_t""no" 1>&6
fi
3860

3861
  
3862 3863
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3864

3865 3866
fi

3867 3868 3869 3870 3871 3872
if test x$have_nanosleep = x1; then
  cat >> confdefs.h <<\EOF
#define HAVE_NANOSLEEP 1
EOF

fi
3873 3874
# HP/UX port
echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
3875
echo "configure:3876: checking for sem_init in -lrt" >&5
3876 3877 3878 3879 3880 3881 3882
ac_lib_var=`echo rt'_'sem_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="-lrt  $LIBS"
cat > conftest.$ac_ext <<EOF
3883
#line 3884 "configure"
3884 3885 3886 3887 3888 3889 3890 3891 3892 3893
#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 sem_init();

int main() {
sem_init()
; return 0; }
EOF
3894
if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914
  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
  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"
else
  echo "$ac_t""no" 1>&6
fi


3915
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3916
echo "configure:3917: checking for inet_aton" >&5
3917 3918
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3919
else
3920
  cat > conftest.$ac_ext <<EOF
3921
#line 3922 "configure"
3922 3923
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3924
    which can conflict with char inet_aton(); below.  */
3925 3926 3927
#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
3928 3929 3930 3931
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
3932 3933 3934 3935 3936 3937 3938

/* 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
3939
inet_aton();
3940 3941
#endif

3942 3943
; return 0; }
EOF
3944
if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957
  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
3958 3959
  :
else
3960
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3961

3962
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
3963
echo "configure:3964: checking for inet_aton in -lresolv" >&5
3964 3965 3966
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
3967
else
3968
  ac_save_LIBS="$LIBS"
3969
LIBS="-lresolv  $LIBS"
3970
cat > conftest.$ac_ext <<EOF
3971
#line 3972 "configure"
3972 3973 3974
#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
3975 3976 3977 3978 3979 3980 3981
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
3982
if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996
  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
3997
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv"
3998 3999
else
  echo "$ac_t""no" 1>&6
4000 4001 4002 4003 4004
fi


fi

4005
echo $ac_n "checking for textdomain""... $ac_c" 1>&6
4006
echo "configure:4007: checking for textdomain" >&5
4007 4008
if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4009
else
4010
  cat > conftest.$ac_ext <<EOF
4011
#line 4012 "configure"
4012 4013
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
4014
    which can conflict with char textdomain(); below.  */
4015 4016 4017
#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
4018 4019 4020 4021
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
4022 4023 4024 4025 4026 4027 4028

/* 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
4029
textdomain();
4030 4031
#endif

4032 4033
; return 0; }
EOF
4034
if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047
  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
4048 4049
  :
else
4050
  echo "$ac_t""no" 1>&6
4051

4052
  echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
4053
echo "configure:4054: checking for textdomain in -lintl" >&5
4054 4055 4056
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
4057
else
4058
  ac_save_LIBS="$LIBS"
4059
LIBS="-lintl  $LIBS"
4060
cat > conftest.$ac_ext <<EOF
4061
#line 4062 "configure"
4062 4063 4064
#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
4065 4066 4067 4068 4069 4070 4071
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
textdomain()
; return 0; }
EOF
4072
if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086
  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
4087
  vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
4088 4089
    plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
  
4090 4091
else
  echo "$ac_t""no" 1>&6
4092 4093
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4094

4095 4096
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4097

Sam Hocevar's avatar
 
Sam Hocevar committed
4098
NEED_GETOPT=0
4099
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
4100
echo "configure:4101: checking for getopt_long" >&5
4101 4102
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
4103
else
4104
  cat > conftest.$ac_ext <<EOF
4105
#line 4106 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4106 4107
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
4108
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4109 4110 4111
#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
4112 4113 4114 4115
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4116 4117 4118 4119 4120 4121 4122

/* 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
4123
getopt_long();
Sam Hocevar's avatar
 
Sam Hocevar committed
4124 4125
#endif

4126 4127
; return 0; }
EOF
4128
if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142
  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
4143
#define HAVE_GETOPT_LONG 1
4144
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4145 4146

else
4147 4148 4149
  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
4150
echo "configure:4151: checking for getopt_long in -lgnugetopt" >&5
4151 4152 4153
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
4154
else
4155
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4156
LIBS="-lgnugetopt  $LIBS"
4157
cat > conftest.$ac_ext <<EOF
4158
#line 4159 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4159 4160 4161
#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
4162 4163 4164 4165 4166 4167 4168
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
4169
if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184
  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
4185
#define HAVE_GETOPT_LONG 1
4186
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4187
 vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
4188
else
4189 4190
  echo "$ac_t""no" 1>&6
NEED_GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
4191
fi
4192 4193 4194

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4195

4196
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4197
echo "configure:4198: checking return type of signal handlers" >&5
4198 4199
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4200
else
4201
  cat > conftest.$ac_ext <<EOF
4202
#line 4203 "configure"
4203 4204 4205 4206
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
4207
#undef signal
4208 4209 4210 4211 4212 4213 4214
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

4215
int main() {
4216
int i;
4217 4218
; return 0; }
EOF
4219
if { (eval echo configure:4220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4220
  rm -rf conftest*
4221 4222
  ac_cv_type_signal=void
else
4223 4224 4225 4226
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
4227
fi
4228
rm -f conftest*
4229 4230
fi

4231 4232
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
4233
#define RETSIGTYPE $ac_cv_type_signal
4234
EOF
4235

Sam Hocevar's avatar
 
Sam Hocevar committed
4236

4237
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4238
echo "configure:4239: checking for dlopen in -ldl" >&5
4239 4240 4241
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
4242
else
4243
  ac_save_LIBS="$LIBS"
4244
LIBS="-ldl  $LIBS"
4245
cat > conftest.$ac_ext <<EOF
4246
#line 4247 "configure"
4247 4248 4249
#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
4250 4251 4252 4253 4254 4255 4256
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
4257
if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271
  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
4272
  vlc_LDFLAGS="${vlc_LDFLAGS} -ldl"
4273 4274
else
  echo "$ac_t""no" 1>&6
4275 4276
fi

4277
echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
4278
echo "configure:4279: checking for cos in -lm" >&5
4279 4280 4281
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
4282
else
4283
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4284
LIBS="-lm  $LIBS"
4285
cat > conftest.$ac_ext <<EOF
4286
#line 4287 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4287 4288 4289
#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
4290 4291 4292 4293 4294 4295 4296
    builtin and then its argument prototype would still apply.  */
char cos();

int main() {
cos()
; return 0; }
EOF
4297
if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311
  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
4312 4313
  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
  filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm"
4314 4315
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4316 4317
fi

4318
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
4319
echo "configure:4320: checking for pow in -lm" >&5
4320 4321 4322
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
4323
else
4324
  ac_save_LIBS="$LIBS"
4325
LIBS="-lm  $LIBS"
4326
cat > conftest.$ac_ext <<EOF
4327
#line 4328 "configure"
4328 4329 4330
#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
4331 4332 4333 4334 4335 4336 4337
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
4338
if { (eval echo configure:4339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352
  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
4353
  ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4354 4355 4356 4357
  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
4358

4359 4360
else
  echo "$ac_t""no" 1>&6
4361 4362
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4363

Sam Hocevar's avatar
 
Sam Hocevar committed
4364
THREAD_LIB=error
4365
if test "x${THREAD_LIB}" = "xerror"; then
4366
  echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
4367
echo "configure:4368: checking for main in -lpthread" >&5
4368
ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
4369 4370
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
4371
else
4372
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4373
LIBS="-lpthread  $LIBS"
4374
cat > conftest.$ac_ext <<EOF
4375
#line 4376 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4376
#include "confdefs.h"
4377 4378

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

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4402
fi
4403
if test "x${THREAD_LIB}" = "xerror"; then
4404
  echo $ac_n "checking for main in -lpthreads""... $ac_c" 1>&6
4405
echo "configure:4406: checking for main in -lpthreads" >&5
4406
ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
4407 4408
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4409
else
4410
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4411
LIBS="-lpthreads  $LIBS"
4412
cat > conftest.$ac_ext <<EOF
4413
#line 4414 "configure"
4414
#include "confdefs.h"
4415 4416

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4440
fi
4441
if test "x${THREAD_LIB}" = "xerror"; then
4442
  echo $ac_n "checking for main in -lc_r""... $ac_c" 1>&6
4443
echo "configure:4444: checking for main in -lc_r" >&5
4444
ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
4445 4446
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
4447
else
4448
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4449
LIBS="-lc_r  $LIBS"
4450
cat > conftest.$ac_ext <<EOF
4451
#line 4452 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4452
#include "confdefs.h"
4453 4454

int main() {
4455
main()
4456 4457
; return 0; }
EOF
4458
if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472
  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
4473
  THREAD_LIB="-lc_r"
4474 4475
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4476
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4477

Sam Hocevar's avatar
 
Sam Hocevar committed
4478
fi
4479
if test "x${THREAD_LIB}" = "xerror"; then
4480
  echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
4481
echo "configure:4482: checking for pthread_mutex_lock" >&5
4482
if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
4483
  echo $ac_n "(cached) $ac_c" 1>&6
4484
else
4485
  cat > conftest.$ac_ext <<EOF
4486
#line 4487 "configure"
4487
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4488
/* System header to define __stub macros and hopefully few prototypes,
4489
    which can conflict with char pthread_mutex_lock(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4490
#include <assert.h>
4491 4492
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
4493
    builtin and then its argument prototype would still apply.  */
4494
char pthread_mutex_lock();
4495 4496

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4497 4498 4499 4500

/* 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.  */
4501
#if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock)
Sam Hocevar's avatar
 
Sam Hocevar committed
4502 4503
choke me
#else
4504
pthread_mutex_lock();
Sam Hocevar's avatar
 
Sam Hocevar committed
4505 4506
#endif

4507 4508
; return 0; }
EOF
4509
if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510
  rm -rf conftest*
4511
  eval "ac_cv_func_pthread_mutex_lock=yes"
4512 4513 4514 4515
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
4516
  eval "ac_cv_func_pthread_mutex_lock=no"
4517 4518 4519 4520
fi
rm -f conftest*
fi

4521
if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then
4522 4523 4524 4525 4526
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi
4527

Sam Hocevar's avatar
 
Sam Hocevar committed
4528
  THREAD_LIB=""
Sam Hocevar's avatar
 
Sam Hocevar committed
4529
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4530

4531
echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
4532
echo "configure:4533: checking for cthread_fork in -lthreads" >&5
4533 4534 4535
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
4536
else
4537
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4538
LIBS="-lthreads  $LIBS"
4539
cat > conftest.$ac_ext <<EOF
4540
#line 4541 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4541 4542 4543
#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
4544 4545 4546 4547 4548 4549 4550
    builtin and then its argument prototype would still apply.  */
char cthread_fork();

int main() {
cthread_fork()
; return 0; }
EOF
4551
if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565
  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
4566
  THREAD_LIB="-lthreads"
4567 4568
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4569
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4570 4571


4572
cat > conftest.$ac_ext <<EOF
4573
#line 4574 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4574 4575
#include "confdefs.h"
#include <pthread.h>
4576
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4577 4578
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
4579 4580 4581
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4582
#define PTHREAD_COND_T_IN_PTHREAD_H 1
4583
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4584 4585 4586 4587

fi
rm -f conftest*

4588
cat > conftest.$ac_ext <<EOF
4589
#line 4590 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604
#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
4605
#line 4606 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4606 4607
#include "confdefs.h"
#include <strings.h>
4608
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4609 4610
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
4611 4612 4613
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4614
#define STRNCASECMP_IN_STRINGS_H 1
4615
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4616 4617 4618

fi
rm -f conftest*
4619

Sam Hocevar's avatar
 
Sam Hocevar committed
4620

Sam Hocevar's avatar
Sam Hocevar committed
4621
for ac_hdr in stdint.h getopt.h strings.h inttypes.h sys/int_types.h
Christophe Massiot's avatar
Christophe Massiot committed
4622
do
4623 4624
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4625
echo "configure:4626: checking for $ac_hdr" >&5
4626 4627
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4628
else
4629
  cat > conftest.$ac_ext <<EOF
4630
#line 4631 "configure"
4631 4632 4633 4634
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4635
{ (eval echo configure:4636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4636 4637 4638 4639 4640 4641 4642
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
4643
  cat conftest.$ac_ext >&5
4644 4645
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
4646
fi
4647
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4648
fi
4649 4650 4651 4652 4653 4654 4655 4656 4657
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
4658 4659 4660
fi
done

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

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

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

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

4821
for ac_hdr in linux/version.h
4822
do
4823 4824
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4825
echo "configure:4826: checking for $ac_hdr" >&5
4826 4827
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4828
else
4829
  cat > conftest.$ac_ext <<EOF
4830
#line 4831 "configure"
4831 4832 4833 4834
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4835
{ (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4836 4837 4838 4839 4840 4841 4842
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
4843
  cat conftest.$ac_ext >&5
4844 4845
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4846
fi
4847
rm -f conftest*
4848
fi
4849 4850 4851 4852 4853 4854 4855 4856 4857
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
4858 4859 4860
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4861

4862
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4863
echo "configure:4864: checking whether time.h and sys/time.h may both be included" >&5
4864 4865
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
4866
else
4867
  cat > conftest.$ac_ext <<EOF
4868
#line 4869 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4869 4870 4871 4872
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
4873 4874 4875 4876
int main() {
struct tm *tp;
; return 0; }
EOF
4877
if { (eval echo configure:4878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4878
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4879 4880
  ac_cv_header_time=yes
else
4881 4882 4883 4884
  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
4885
fi
4886
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4887
fi
4888

4889 4890 4891
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
4892
#define TIME_WITH_SYS_TIME 1
4893
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4894 4895 4896 4897

fi


4898
cat > conftest.$ac_ext <<EOF
4899
#line 4900 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4900
#include "confdefs.h"
4901 4902 4903 4904 4905 4906 4907
#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
4908
#define HAVE_DECL_NANOSLEEP 1
4909
EOF
4910 4911 4912


fi
4913
rm -f conftest*
4914 4915


4916
cat > conftest.$ac_ext <<EOF
4917
#line 4918 "configure"
4918
#include "confdefs.h"
4919 4920 4921 4922 4923 4924 4925
#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
4926
#define HAVE_STRUCT_TIMESPEC 1
4927
EOF
4928 4929 4930


fi
4931
rm -f conftest*
4932 4933


4934
for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
4935
do
4936 4937
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4938
echo "configure:4939: checking for $ac_hdr" >&5
4939 4940
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4941
else
4942
  cat > conftest.$ac_ext <<EOF
4943
#line 4944 "configure"
4944 4945 4946 4947
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4948
{ (eval echo configure:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4949 4950 4951 4952 4953 4954 4955
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
4956
  cat conftest.$ac_ext >&5
4957 4958
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4959
fi
4960
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4961
fi
4962 4963 4964 4965 4966 4967 4968 4969 4970
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
4971
fi
Christophe Massiot's avatar
Christophe Massiot committed
4972 4973
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4974

4975 4976 4977 4978 4979 4980 4981 4982
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
4983
then
4984
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
4985
  for ac_hdr in X11/extensions/dpms.h
Sam Hocevar's avatar
 
Sam Hocevar committed
4986
do
4987 4988
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4989
echo "configure:4990: checking for $ac_hdr" >&5
4990 4991
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4992
else
4993
  cat > conftest.$ac_ext <<EOF
4994
#line 4995 "configure"
4995 4996 4997 4998
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4999
{ (eval echo configure:5000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5000 5001 5002 5003 5004 5005 5006
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
5007
  cat conftest.$ac_ext >&5
5008 5009
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
5010
fi
5011
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5012
fi
5013 5014 5015 5016 5017 5018 5019 5020
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
5021
#line 5022 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5022 5023
#include "confdefs.h"
#include <X11/extensions/dpms.h>
5024
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5025 5026
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "DPMSInfo" >/dev/null 2>&1; then
5027 5028 5029
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5030
#define DPMSINFO_IN_DPMS_H 1
5031
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5032

5033
    
Sam Hocevar's avatar
 
Sam Hocevar committed
5034 5035 5036
fi
rm -f conftest*

5037 5038 5039
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5040 5041 5042
fi
done

5043
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5044 5045
fi

5046
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
5047
echo "configure:5048: checking for ntohl in sys/param.h" >&5
5048 5049
if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5050 5051
else
  CFLAGS="${save_CFLAGS} -Wall -Werror"
5052
     cat > conftest.$ac_ext <<EOF
5053
#line 5054 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
5054 5055
#include "confdefs.h"
#include <sys/param.h>
5056
int main() {
5057
void foo() { int meuh; ntohl(meuh); }
5058 5059
; return 0; }
EOF
5060
if { (eval echo configure:5061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5061
  rm -rf conftest*
5062
  ac_cv_c_ntohl_sys_param_h=yes
Christophe Massiot's avatar
Christophe Massiot committed
5063
else
5064 5065 5066 5067
  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
5068
fi
5069
rm -f conftest*
5070
fi
5071

5072
echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
5073
if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
5074
    cat >> confdefs.h <<\EOF
5075
#define NTOHL_IN_SYS_PARAM_H 1
5076
EOF
5077 5078

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5079

5080
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
5081
echo "configure:5082: checking if \$CC accepts -finline-limit" >&5
5082 5083
if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5084 5085
else
  CFLAGS="${save_CFLAGS} -finline-limit-30000"
5086
     cat > conftest.$ac_ext <<EOF
5087
#line 5088 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5088 5089
#include "confdefs.h"

5090
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5091

5092 5093
; return 0; }
EOF
5094
if { (eval echo configure:5095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5095
  rm -rf conftest*
5096
  ac_cv_c_inline_limit=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5097
else
5098 5099 5100 5101
  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
5102
fi
5103
rm -f conftest*
5104
fi
5105 5106

echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
5107 5108
if test "x${ac_cv_c_inline_limit}" != "xno"; then
    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}"
5109 5110
fi

5111
echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
5112
echo "configure:5113: checking if \$CC accepts -Wall -Winline" >&5
5113 5114
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
5115
else
Sam Hocevar's avatar
Sam Hocevar committed
5116
  CFLAGS="-Wall -Winline ${save_CFLAGS}"
5117
     cat > conftest.$ac_ext <<EOF
5118
#line 5119 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5119 5120
#include "confdefs.h"

5121
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5122

5123 5124
; return 0; }
EOF
5125
if { (eval echo configure:5126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5126
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5127 5128
  ac_cv_c_Wall_Winline=yes
else
5129 5130 5131 5132
  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
5133
fi
5134
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5135
fi
5136 5137

echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
5138 5139
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
5140
else
5141
    echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
5142
echo "configure:5143: checking if \$CC accepts -wall -winline" >&5
5143 5144
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
5145
else
Sam Hocevar's avatar
Sam Hocevar committed
5146
  CFLAGS="-wall -winline ${save_CFLAGS}"
5147
         cat > conftest.$ac_ext <<EOF
5148
#line 5149 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5149 5150
#include "confdefs.h"

5151
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5152

5153 5154
; return 0; }
EOF
5155
if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5156
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5157 5158
  ac_cv_c_wall_winline=yes
else
5159 5160 5161 5162
  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
5163
fi
5164
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5165
fi
5166 5167

echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
5168 5169
    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
5170 5171 5172
    fi
fi

5173
echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
5174
echo "configure:5175: checking if \$CC accepts -pipe" >&5
5175 5176
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
5177 5178
else
  CFLAGS="${save_CFLAGS} -pipe"
5179
     cat > conftest.$ac_ext <<EOF
5180
#line 5181 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5181 5182
#include "confdefs.h"

5183
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5184

5185 5186
; return 0; }
EOF
5187
if { (eval echo configure:5188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5188
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5189 5190
  ac_cv_c_pipe=yes
else
5191 5192 5193 5194
  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
5195
fi
5196
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5197
fi
5198 5199

echo "$ac_t""$ac_cv_c_pipe" 1>&6
5200 5201
if test "x${ac_cv_c_pipe}" != "xno"; then
    save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5202 5203
fi

5204
echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
5205
echo "configure:5206: checking if \$CC accepts -O3" >&5
5206 5207
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
5208 5209
else
  CFLAGS="${save_CFLAGS} -O3"
5210
     cat > conftest.$ac_ext <<EOF
5211
#line 5212 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5212 5213
#include "confdefs.h"

5214
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5215

5216 5217
; return 0; }
EOF
5218
if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5219
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5220 5221
  ac_cv_c_o3=yes
else
5222 5223 5224 5225
  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
5226
fi
5227
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5228
fi
5229 5230

echo "$ac_t""$ac_cv_c_o3" 1>&6
5231
if test "x${ac_cv_c_o3}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5232 5233
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
else
5234
    echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
5235
echo "configure:5236: checking if \$CC accepts -O2" >&5
5236 5237
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
5238 5239
else
  CFLAGS="${save_CFLAGS} -O2"
5240
         cat > conftest.$ac_ext <<EOF
5241
#line 5242 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5242 5243
#include "confdefs.h"

5244
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5245

5246 5247
; return 0; }
EOF
5248
if { (eval echo configure:5249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5249
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5250 5251
  ac_cv_c_o2=yes
else
5252 5253 5254 5255
  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
5256
fi
5257
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5258
fi
5259 5260

echo "$ac_t""$ac_cv_c_o2" 1>&6
5261
    if test "x${ac_cv_c_o2}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5262 5263
        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
    else
5264
        echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
5265
echo "configure:5266: checking if \$CC accepts -O" >&5
5266 5267
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
5268 5269
else
  CFLAGS="${save_CFLAGS} -O"
5270
             cat > conftest.$ac_ext <<EOF
5271
#line 5272 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5272 5273
#include "confdefs.h"

5274
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5275

5276 5277
; return 0; }
EOF
5278
if { (eval echo configure:5279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5279
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5280 5281
  ac_cv_c_o=yes
else
5282 5283 5284 5285
  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
5286
fi
5287
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5288
fi
5289 5290

echo "$ac_t""$ac_cv_c_o" 1>&6
5291
        if test "x${ac_cv_c_o}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5292 5293 5294 5295 5296
            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
        fi
    fi
fi

5297
echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
5298
echo "configure:5299: checking if \$CC accepts -ffast-math" >&5
5299 5300
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
5301 5302
else
  CFLAGS="${save_CFLAGS} -ffast-math"
5303
     cat > conftest.$ac_ext <<EOF
5304
#line 5305 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5305 5306
#include "confdefs.h"

5307
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5308

5309 5310
; return 0; }
EOF
5311
if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5312
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5313 5314
  ac_cv_c_fast_math=yes
else
5315 5316 5317 5318
  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
5319
fi
5320
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5321
fi
5322 5323

echo "$ac_t""$ac_cv_c_fast_math" 1>&6
5324
if test "x${ac_cv_c_fast_math}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5325 5326 5327
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
fi

5328
echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
5329
echo "configure:5330: checking if \$CC accepts -funroll-loops" >&5
5330 5331
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
5332 5333
else
  CFLAGS="${save_CFLAGS} -funroll-loops"
5334
     cat > conftest.$ac_ext <<EOF
5335
#line 5336 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5336 5337
#include "confdefs.h"

5338
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5339

5340 5341
; return 0; }
EOF
5342
if { (eval echo configure:5343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5343
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5344 5345
  ac_cv_c_unroll_loops=yes
else
5346 5347 5348 5349
  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
5350
fi
5351
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5352
fi
5353 5354

echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
5355
if test "x${ac_cv_c_unroll_loops}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5356 5357 5358
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
fi

5359
echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
5360
echo "configure:5361: checking if \$CC accepts -fomit-frame-pointer" >&5
5361 5362
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
5363 5364
else
  CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
5365
     cat > conftest.$ac_ext <<EOF
5366
#line 5367 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5367 5368
#include "confdefs.h"

5369
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5370

5371 5372
; return 0; }
EOF
5373
if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5374
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5375 5376
  ac_cv_c_omit_frame_pointer=yes
else
5377 5378 5379 5380
  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
5381
fi
5382
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5383
fi
5384 5385

echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
5386
if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5387
    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
Sam Hocevar's avatar
Sam Hocevar committed
5388
    # this plugin does not compile without -fomit-frame-pointer, damn gcc!
5389
    i420_yuy2_mmx_CFLAGS="${i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer"
Sam Hocevar's avatar
 
Sam Hocevar committed
5390 5391
fi

5392
echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
5393
echo "configure:5394: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
5394 5395
if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5396
else
Christophe Massiot's avatar
Christophe Massiot committed
5397
  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
5398
     cat > conftest.$ac_ext <<EOF
5399
#line 5400 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5400 5401
#include "confdefs.h"

5402
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5403

5404 5405
; return 0; }
EOF
5406
if { (eval echo configure:5407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5407
  rm -rf conftest*
5408
  ac_cv_ld_darwin=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5409
else
5410 5411 5412 5413
  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
5414
fi
5415
rm -f conftest*
5416
fi
5417 5418

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

5423
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
5424
echo "configure:5425: checking if \$CC accepts -shared" >&5
5425 5426
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5427 5428
else
  CFLAGS="${save_CFLAGS} -shared"
5429
     cat > conftest.$ac_ext <<EOF
5430
#line 5431 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5431 5432
#include "confdefs.h"

5433
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5434

5435 5436
; return 0; }
EOF
5437
if { (eval echo configure:5438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5438
  rm -rf conftest*
5439
  ac_cv_ld_plugins=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5440
else
5441 5442 5443 5444
  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
5445
fi
5446
rm -f conftest*
5447
fi
5448 5449

echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5450
if test "x${ac_cv_ld_plugins}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5451
    plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
5452
fi
5453 5454
        
echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
5455
echo "configure:5456: checking for variadic cpp macros" >&5
5456 5457
if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5458 5459
else
  CFLAGS="${save_CFLAGS}"
5460
     cat > conftest.$ac_ext <<EOF
5461
#line 5462 "configure"
5462 5463 5464
#include "confdefs.h"
#include <stdio.h>
          #define a(b,c...) printf(b,##c)
5465
int main() {
5466
a("foo");a("%s","bar");a("%s%s","baz","quux");
5467 5468
; return 0; }
EOF
5469
if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5470
  rm -rf conftest*
5471 5472
  ac_cv_cpp_variadic_macros=yes
else
5473 5474 5475 5476
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_variadic_macros=no
5477
fi
5478
rm -f conftest*
5479
fi
5480

5481
echo "$ac_t""$ac_cv_cpp_variadic_macros" 1>&6
5482
if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
5483
    cat >> confdefs.h <<\EOF
5484
#define HAVE_VARIADIC_MACROS 1
5485
EOF
5486 5487 5488

fi

5489
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
5490
echo "configure:5491: checking __attribute__ ((aligned ())) support" >&5
5491 5492
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5493 5494
else
  ac_cv_c_attribute_aligned=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5495
        CFLAGS="${save_CFLAGS} -Werror"
5496
    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5497
        cat > conftest.$ac_ext <<EOF
5498
#line 5499 "configure"
5499 5500
#include "confdefs.h"

5501
int main() {
5502
static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;
5503 5504
; return 0; }
EOF
5505
if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5506
  rm -rf conftest*
5507
  ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"
5508
else
5509 5510
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
5511
fi
5512
rm -f conftest*
5513
    done
5514
        CFLAGS="${save_CFLAGS}"
5515
fi
5516

5517
echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
5518
if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
5519
    cat >> confdefs.h <<EOF
5520
#define ATTRIBUTE_ALIGNED_MAX ${ac_cv_c_attribute_aligned}
5521
EOF
5522 5523 5524

fi

5525
case "x${target_cpu}" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5526 5527 5528 5529
  x)
    ARCH=unknown
    ;;
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
5530
    ARCH="${target_cpu}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5531 5532
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
5533

5534
BUILTINS="${BUILTINS}"
5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547
PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/ps demux/mpeg/ts"
PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/mpeg_video/mpeg_video codec/lpcm/lpcm codec/spdif/spdif codec/spudec/spudec"
PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
PLUGINS="${PLUGINS} visualization/scope/scope"
PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"

MMX_MODULES="misc/memcpy/memcpymmx codec/mpeg_video/idct/idctmmx codec/mpeg_video/motion/motionmmx video_chroma/i420_rgb_mmx video_chroma/i420_yuy2_mmx video_chroma/i422_yuy2_mmx video_chroma/i420_ymga_mmx"
MMXEXT_MODULES="misc/memcpy/memcpymmxext codec/mpeg_video/idct/idctmmxext codec/mpeg_video/motion/motionmmxext"
THREEDNOW_MODULES="misc/memcpy/memcpy3dn codec/a52old/imdct/imdct3dn codec/a52old/downmix/downmix3dn"
SSE_MODULES="codec/a52old/imdct/imdctsse codec/a52old/downmix/downmixsse"
ALTIVEC_MODULES="codec/mpeg_video/idct/idctaltivec codec/mpeg_video/motion/motionaltivec misc/memcpy/memcpyaltivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5548

5549
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
5550
echo "configure:5551: checking if \$CC groks MMX inline assembly" >&5
5551 5552
if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5553
else
Sam Hocevar's avatar
Sam Hocevar committed
5554 5555
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5556
#line 5557 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5557 5558
#include "confdefs.h"

5559
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5560
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5561 5562
; return 0; }
EOF
5563
if { (eval echo configure:5564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5564
  rm -rf conftest*
5565
  ac_cv_mmx_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5566
else
5567 5568 5569 5570
  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
5571
fi
5572
rm -f conftest*
5573
fi
5574 5575

echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5576
if test "x${ac_cv_mmx_inline}" != "xno"; then
5577 5578
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5579

5580
echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
5581
echo "configure:5582: checking if \$CC groks MMX EXT inline assembly" >&5
5582 5583
if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5584
else
Sam Hocevar's avatar
Sam Hocevar committed
5585 5586
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5587
#line 5588 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5588 5589
#include "confdefs.h"

5590
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5591
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5592 5593
; return 0; }
EOF
5594
if { (eval echo configure:5595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5595
  rm -rf conftest*
5596
  ac_cv_mmxext_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5597
else
5598 5599 5600 5601
  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
5602
fi
5603
rm -f conftest*
5604
fi
5605 5606

echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5607
if test "x${ac_cv_mmxext_inline}" != "xno"; then
5608 5609
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5610

5611
echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
5612
echo "configure:5613: checking if \$CC groks 3D Now! inline assembly" >&5
5613 5614
if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5615
else
Sam Hocevar's avatar
Sam Hocevar committed
5616 5617
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5618
#line 5619 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5619 5620
#include "confdefs.h"

5621
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5622
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5623 5624
; return 0; }
EOF
5625
if { (eval echo configure:5626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5626
  rm -rf conftest*
5627
  ac_cv_3dnow_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5628
else
5629 5630 5631 5632
  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
5633
fi
5634
rm -f conftest*
5635
fi
5636

5637
echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5638
if test "x${ac_cv_3dnow_inline}" != "xno"; then
5639
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5640
#define CAN_COMPILE_3DNOW 1
5641
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5642

5643 5644
  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5645

5646
echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
5647
echo "configure:5648: checking if \$CC groks SSE inline assembly" >&5
5648 5649
if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5650
else
Sam Hocevar's avatar
Sam Hocevar committed
5651 5652
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5653
#line 5654 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5654 5655
#include "confdefs.h"

5656
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5657
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5658 5659
; return 0; }
EOF
5660
if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5661
  rm -rf conftest*
5662
  ac_cv_sse_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5663
else
5664 5665 5666 5667
  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
5668
fi
5669
rm -f conftest*
5670
fi
5671

5672
echo "$ac_t""$ac_cv_sse_inline" 1>&6
5673
if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
5674
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5675
#define CAN_COMPILE_SSE 1
5676
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5677

5678 5679 5680
  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi

Sam Hocevar's avatar
Sam Hocevar committed
5681
# don't try to grok AltiVec with native mingw32 it doesn't work right now
Gildas Bazin's avatar
 
Gildas Bazin committed
5682
# we should be able to remove this test with future versions of mingw32
5683
if test "x${SYS}" != "xmingw32"; then
Sam Hocevar's avatar
Sam Hocevar committed
5684
echo $ac_n "checking if \$CC groks AltiVec inline assembly""... $ac_c" 1>&6
5685
echo "configure:5686: checking if \$CC groks AltiVec inline assembly" >&5
5686 5687
if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5688
else
Sam Hocevar's avatar
Sam Hocevar committed
5689 5690
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5691
#line 5692 "configure"
5692 5693
#include "confdefs.h"

5694
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5695
asm volatile("vperm 0,1,2,3");
5696 5697
; return 0; }
EOF
5698
if { (eval echo configure:5699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5699
  rm -rf conftest*
5700
  ac_cv_altivec_inline=yes
5701
else
5702 5703 5704
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5705
  CFLAGS="${save_CFLAGS} -Wa,-m7400"
5706
          cat > conftest.$ac_ext <<EOF
5707
#line 5708 "configure"
5708 5709
#include "confdefs.h"

5710
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5711
asm volatile("vperm 0,1,2,3");
5712 5713
; return 0; }
EOF
5714
if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5715
  rm -rf conftest*
5716
  ac_cv_altivec_inline="-Wa,-m7400"
5717
else
5718 5719 5720 5721
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_altivec_inline=no
5722
fi
5723 5724
rm -f conftest*
         
5725
fi
5726
rm -f conftest*
5727
fi
5728

5729
echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5730
if test "x${ac_cv_altivec_inline}" != "xno"; then
5731
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5732
#define CAN_COMPILE_ALTIVEC 1
5733
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5734

5735 5736 5737 5738 5739
  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}"
5740
  fi
5741 5742
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
5743

Sam Hocevar's avatar
Sam Hocevar committed
5744
echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6
5745
echo "configure:5746: checking if \$CC groks AltiVec C extensions" >&5
5746 5747
if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5748
else
5749
  CFLAGS="${save_CFLAGS} -faltivec"
5750
     # Darwin test
5751
     cat > conftest.$ac_ext <<EOF
5752
#line 5753 "configure"
5753
#include "confdefs.h"
5754

5755
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5756
vec_mtvscr((vector unsigned int)(0));
5757 5758
; return 0; }
EOF
5759
if { (eval echo configure:5760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5760
  rm -rf conftest*
5761 5762
  ac_cv_c_altivec=-faltivec
else
5763 5764 5765 5766
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
5767
        # Linux/PPC test
5768
        CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
5769
        cat > conftest.$ac_ext <<EOF
5770
#line 5771 "configure"
5771
#include "confdefs.h"
5772

5773
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5774
vec_mtvscr((vector unsigned int)(0));
5775 5776
; return 0; }
EOF
5777
if { (eval echo configure:5778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5778
  rm -rf conftest*
5779
  ac_cv_c_altivec="-fvec"
5780
else
5781 5782 5783 5784
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_altivec=no
5785
fi
5786 5787
rm -f conftest*
        
5788
fi
5789
rm -f conftest*
5790
     CFLAGS="${save_CFLAGS}"
5791 5792
fi

5793
echo "$ac_t""$ac_cv_c_altivec" 1>&6
5794
if test "x${ac_cv_c_altivec}" != "xno"; then
5795
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5796
#define CAN_COMPILE_C_ALTIVEC 1
5797
EOF
5798

5799 5800 5801 5802
  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}"
5803
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5804 5805
fi

5806
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5807
echo "configure:5808: checking if linker needs -framework vecLib" >&5
5808 5809
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5810
else
5811
  LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5812
     cat > conftest.$ac_ext <<EOF
5813
#line 5814 "configure"
5814 5815
#include "confdefs.h"

5816
int main() {
5817

5818 5819
; return 0; }
EOF
5820
if { (eval echo configure:5821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5821
  rm -rf conftest*
5822 5823
  ac_cv_ld_altivec=yes
else
5824 5825 5826 5827
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_altivec=no
5828
fi
5829
rm -f conftest*
5830
     LDFLAGS="${save_LDFLAGS}"
5831
    
5832
fi
5833 5834

echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5835
if test "x${ac_cv_ld_altivec}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5836 5837 5838 5839
  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5840
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
5841
fi # end if mingw32
Sam Hocevar's avatar
 
Sam Hocevar committed
5842

5843

Sam Hocevar's avatar
 
Sam Hocevar committed
5844 5845 5846
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5847 5848
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5849

Sam Hocevar's avatar
 
Sam Hocevar committed
5850 5851 5852
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5853 5854
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5855

Sam Hocevar's avatar
 
Sam Hocevar committed
5856 5857 5858 5859

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

5863 5864
if test "x${with_tuning}" != "x"; then
    TUNING="${with_tuning}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5865
else
5866
    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
5867
    else
5868
        if test "x${target_cpu}" = "xpowerpc"; then TUNING="750"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5869 5870 5871
    fi
fi

5872
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
5873 5874
then
    ARCH="${ARCH} mmx"
Sam Hocevar's avatar
Sam Hocevar committed
5875
    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5876 5877 5878 5879 5880
fi

# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
5881
   if test "x${enable_optimizations}" = "xno"; then OPTIMS=0; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5882
else
5883 5884 5885
   OPTIMS=1 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5886 5887 5888 5889

# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
5890
   if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
5891
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5892
else
5893
   if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
5894 5895 5896
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5897 5898 5899 5900 5901

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

Sam Hocevar's avatar
 
Sam Hocevar committed
5905

Sam Hocevar's avatar
 
Sam Hocevar committed
5906
RELEASE=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5907 5908 5909
# Check whether --enable-release or --disable-release was given.
if test "${enable_release+set}" = set; then
  enableval="$enable_release"
5910
   if test "x${enable_release}" = "xyes"; then RELEASE=1; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5911
else
5912 5913
   VERSION="${VERSION}_`date +%Y-%m-%d`" 
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5914 5915 5916 5917 5918 5919



# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5920 5921
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5922 5923 5924 5925 5926


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

5930
if test "x${enable_dvd}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
5931
then
5932
  # Check whether --with-dvdcss or --without-dvdcss was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5933 5934
if test "${with_dvdcss+set}" = set; then
  withval="$with_dvdcss"
5935 5936
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5937

5938
  # Check whether --with-dvdcss-tree or --without-dvdcss-tree was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5939 5940
if test "${with_dvdcss_tree+set}" = set; then
  withval="$with_dvdcss_tree"
5941 5942
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5943

5944
  case "x${with_dvdcss}" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5945
  x|xyes)
5946
    if test "x${with_dvdcss_tree}" = x
Sam Hocevar's avatar
 
Sam Hocevar committed
5947
    then
5948
      for ac_hdr in dvdcss/dvdcss.h
5949
do
5950 5951
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5952
echo "configure:5953: checking for $ac_hdr" >&5
5953 5954
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5955
else
5956
  cat > conftest.$ac_ext <<EOF
5957
#line 5958 "configure"
5958 5959 5960 5961
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5962
{ (eval echo configure:5963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5963 5964 5965 5966 5967 5968 5969
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
5970
  cat conftest.$ac_ext >&5
5971 5972
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
5973
fi
5974
rm -f conftest*
5975
fi
5976 5977 5978 5979 5980 5981
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
5982
  PLUGINS="${PLUGINS} access/dvd/dvd"
5983
          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
Sam Hocevar's avatar
 
Sam Hocevar committed
5984
else
5985 5986 5987
  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
5988 5989 5990
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
5991
    else
5992
      echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
5993
echo "configure:5994: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5994
      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
5995
      if test "x${real_dvdcss_tree}" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
5996
      then
5997 5998
                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
5999 6000 6001
      fi
      if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
      then
6002
                echo "$ac_t""${real_dvdcss_tree}/src/.libs/libdvdcss.a" 1>&6
6003
        BUILTINS="${BUILTINS} access/dvd/dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6004 6005
        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
6006
      else
6007 6008
                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
6009 6010
      fi
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6011 6012
  ;;
  xno)
6013
        PLUGINS="${PLUGINS} access/dvd/dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6014 6015
    dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
6016 6017
  ;;
  *)
6018
    echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
6019
echo "configure:6020: checking for dvdcss headers in ${with_dvdcss}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6020
    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
Sam Hocevar's avatar
 
Sam Hocevar committed
6021
    then
6022
            echo "$ac_t""yes" 1>&6
6023
      PLUGINS="${PLUGINS} access/dvd/dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6024 6025
      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
6026
    else
6027 6028
            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
6029 6030 6031 6032 6033 6034 6035 6036
    fi
  ;;
  esac
fi

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

6040
if test "x${enable_dvdread}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6041
then
6042
  # Check whether --with-dvdread or --without-dvdread was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6043 6044
if test "${with_dvdread+set}" = set; then
  withval="$with_dvdread"
6045 6046
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6047

6048
  if test "x${with_dvdread}" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6049 6050 6051 6052
  then
    test_LDFLAGS=""
    test_CFLAGS=""
  else
6053 6054
    test_LDFLAGS="-L${with_dvdread}/lib"
    test_CFLAGS="-I${with_dvdread}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
6055
  fi
6056
  CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
6057
  for ac_hdr in dvdread/dvd_reader.h
6058
do
6059 6060
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6061
echo "configure:6062: checking for $ac_hdr" >&5
6062 6063
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6064
else
6065
  cat > conftest.$ac_ext <<EOF
6066
#line 6067 "configure"
6067 6068 6069 6070
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6071
{ (eval echo configure:6072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6072 6073 6074 6075 6076 6077 6078
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
6079
  cat conftest.$ac_ext >&5
6080 6081
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6082
fi
6083
rm -f conftest*
6084
fi
6085 6086 6087 6088 6089 6090 6091 6092
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
6093
#line 6094 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6094 6095
#include "confdefs.h"
#include <dvdread/dvd_reader.h>
6096
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
6097
void foo() { int i=DVD_VIDEO_LB_LEN; }
6098 6099
; return 0; }
EOF
6100
if { (eval echo configure:6101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6101 6102
  rm -rf conftest*
  
6103
          PLUGINS="${PLUGINS} access/dvdread/dvdread"
Sam Hocevar's avatar
 
Sam Hocevar committed
6104 6105
          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
6106
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6107
else
6108 6109 6110 6111
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
6112
          if test "x${enable_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6113
          then
6114
            { 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
6115
          fi
6116
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6117
fi
6118 6119
rm -f conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6120
else
6121
  echo "$ac_t""no" 1>&6
6122
if test "x${enable_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6123
    then
6124
      if test "x${with_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6125
      then
6126
        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6127
      else
6128
        { echo "configure: error: Cannot find dvdread/dvd_reader.h" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6129 6130
      fi
    fi
6131
  
6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164
fi
done

  CPPFLAGS="$save_CPPFLAGS"
fi

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

if test "x$enable_dvdplay" != "xno"
then
  # Check whether --with-dvdplay or --without-dvdplay was given.
if test "${with_dvdplay+set}" = set; then
  withval="$with_dvdplay"
  :
fi

  if test "x$with_dvdplay" = x
  then
    test_LDFLAGS=""
    test_CFLAGS=""
  else
    test_LDFLAGS="-L${with_dvdplay}/lib"
    test_CFLAGS="-I${with_dvdplay}/include"
  fi
  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
  for ac_hdr in dvdplay/dvdplay.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6165
echo "configure:6166: checking for $ac_hdr" >&5
6166 6167 6168 6169
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
6170
#line 6171 "configure"
6171 6172 6173 6174
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6175
{ (eval echo configure:6176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
6196
      PLUGINS="${PLUGINS} access/dvdplay/dvdplay"
6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211
      dvdplay_LDFLAGS="${dvdplay_LDFLAGS} ${test_LDFLAGS} -ldvdplay -ldvdread"
      dvdplay_CFLAGS="${dvdplay_CFLAGS} ${test_CFLAGS}"
    
else
  echo "$ac_t""no" 1>&6
if test "x$enable_dvdplay" != x
    then
      if test "x$with_dvdplay" != x
      then
        { echo "configure: error: Cannot find dvdplay/dvdplay.h in ${with_dvdplay}/include" 1>&2; exit 1; }
      else
        { echo "configure: error: Cannot find dvdplay/dvdplay.h" 1>&2; exit 1; }
      fi
    fi
  
6212 6213 6214
fi
done

6215
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
6216 6217
fi

6218

6219 6220 6221
# Check whether --enable-dvbpsi or --disable-dvbpsi was given.
if test "${enable_dvbpsi+set}" = set; then
  enableval="$enable_dvbpsi"
6222 6223
  :
fi
6224

6225
if test "x${enable_dvbpsi}" != "xno"
6226
then
6227
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
6228 6229
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
6230 6231
  :
fi
6232

6233 6234 6235 6236 6237 6238
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
  :
fi

6239
  case "x${with_dvbpsi}" in
6240
  x|xyes)
6241
    if test "x${with_dvbpsi_tree}" = "x"
6242
    then
Sam Hocevar's avatar
Sam Hocevar committed
6243
      for ac_hdr in dvbpsi/dr.h
6244 6245 6246
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6247
echo "configure:6248: checking for $ac_hdr" >&5
6248 6249 6250 6251
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
6252
#line 6253 "configure"
6253
#include "confdefs.h"
6254
#include <$ac_hdr>
6255 6256
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6257
{ (eval echo configure:6258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6258 6259 6260 6261 6262 6263 6264
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
6265
  cat conftest.$ac_ext >&5
6266 6267
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6268
fi
6269
rm -f conftest*
6270
fi
6271 6272
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
6273 6274 6275 6276
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
6277 6278
  PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
          ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} -ldvbpsi" 
6279
else
6280
  echo "$ac_t""no" 1>&6
6281 6282
fi
done
6283

6284 6285
    else
      echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
6286
echo "configure:6287: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
6287
      real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
6288
      if test "x${real_dvbpsi_tree}" = "x"
6289 6290 6291 6292 6293 6294 6295
      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
6296 6297 6298
        BUILTINS="${BUILTINS} demux/mpeg/ts_dvbpsi"
        ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
        ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
6299 6300 6301 6302 6303 6304 6305 6306 6307 6308
      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
6309
echo "configure:6310: checking for dvbpsi headers in ${with_dvbpsi}" >&5
6310
    if test "x${with_dvbpsi}" = "x"
6311
    then
6312 6313 6314 6315 6316
      test_LDFLAGS=""
      test_CFLAGS=""
    else
      test_LDFLAGS="-L${with_dvbpsi}/lib"
      test_CFLAGS="-I${with_dvbpsi}/include"
6317
    fi
6318
    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
6319 6320
    ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
6321
echo "configure:6322: checking for dvbpsi/dr.h" >&5
6322 6323 6324 6325
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
6326
#line 6327 "configure"
6327 6328 6329 6330
#include "confdefs.h"
#include <dvbpsi/dr.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6331
{ (eval echo configure:6332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346
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
6347
  
6348 6349 6350
      PLUGINS="${PLUGINS} demux/mpeg/ts_dvbpsi"
      ts_dvbpsi_LDFLAGS="${ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
      ts_dvbpsi_CFLAGS="${ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
6351 6352 6353 6354
      
else
  echo "$ac_t""no" 1>&6

6355
      if test "x${enable_dvbpsi}" != "x"
6356 6357 6358 6359
      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
    
6360 6361
fi

6362
    CPPFLAGS="${save_CPPFLAGS}"
6363 6364
  ;;
  esac
6365
fi
6366

Sam Hocevar's avatar
 
Sam Hocevar committed
6367 6368 6369
# Check whether --enable-vcd or --disable-vcd was given.
if test "${enable_vcd+set}" = set; then
  enableval="$enable_vcd"
6370 6371
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6372

Sam Hocevar's avatar
 
Sam Hocevar committed
6373

6374
if test "x${enable_vcd}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6375
then
6376
  cat > conftest.$ac_ext <<EOF
6377
#line 6378 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6378 6379
#include "confdefs.h"
#include <linux/cdrom.h>
6380
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6381
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
6382
  egrep "cdrom_msf0" >/dev/null 2>&1; then
6383 6384
  rm -rf conftest*
  
6385
    PLUGINS="${PLUGINS} access/vcd/vcd"
6386
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6387 6388 6389
fi
rm -f conftest*

6390 6391
  
  cat > conftest.$ac_ext <<EOF
6392
#line 6393 "configure"
6393 6394
#include "confdefs.h"
#include <sys/cdio.h>
6395
EOF
6396 6397
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ioc_toc_header " >/dev/null 2>&1; then
6398 6399
  rm -rf conftest*
  
6400
    PLUGINS="${PLUGINS} access/vcd/vcd"
6401
    cat >> confdefs.h <<\EOF
6402
#define HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H 1
6403
EOF
6404

6405
  
6406 6407 6408
fi
rm -f conftest*

6409
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6410 6411
  if test "x${SYS}" = "xbsdi"
  then
6412
    PLUGINS="${PLUGINS} access/vcd/vcd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6413
  fi
6414

Sam Hocevar's avatar
 
Sam Hocevar committed
6415 6416
  if test "x${SYS}" = "xdarwin"
  then
6417
    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
6418
    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
Sam Hocevar's avatar
 
Sam Hocevar committed
6419
  fi
6420 6421
fi

Johan Bilien's avatar
Johan Bilien committed
6422 6423 6424
# Check whether --enable-satellite or --disable-satellite was given.
if test "${enable_satellite+set}" = set; then
  enableval="$enable_satellite"
6425
   if test "x${enable_satellite}" = "xyes"
Johan Bilien's avatar
Johan Bilien committed
6426
    then
6427
      PLUGINS="${PLUGINS} access/satellite/satellite"
Johan Bilien's avatar
Johan Bilien committed
6428
    fi
6429 6430
fi

Johan Bilien's avatar
Johan Bilien committed
6431

6432
if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
6433
then
6434
  have_ipv6=0
6435
  echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
6436
echo "configure:6437: checking for inet_pton" >&5
6437 6438
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6439
else
6440
  cat > conftest.$ac_ext <<EOF
6441
#line 6442 "configure"
6442
#include "confdefs.h"
6443
/* System header to define __stub macros and hopefully few prototypes,
6444
    which can conflict with char inet_pton(); below.  */
6445 6446 6447
#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
6448 6449 6450 6451
    builtin and then its argument prototype would still apply.  */
char inet_pton();

int main() {
6452 6453 6454 6455 6456 6457 6458

/* 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
6459
inet_pton();
6460 6461
#endif

6462 6463
; return 0; }
EOF
6464
if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477
  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
6478
  have_ipv6=1
6479 6480
else
  echo "$ac_t""no" 1>&6
6481 6482

    echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
6483
echo "configure:6484: checking for inet_pton in -lresolv" >&5
6484 6485 6486 6487 6488 6489 6490
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
6491
#line 6492 "configure"
6492 6493 6494 6495 6496 6497 6498 6499 6500 6501
#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
6502
if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516
  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
6517
  have_ipv6=1
6518 6519 6520 6521 6522 6523
       ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"
else
  echo "$ac_t""no" 1>&6
fi

  
6524
fi
6525

6526
  echo $ac_n "checking for sockaddr_in6 in netinet/in.h""... $ac_c" 1>&6
6527
echo "configure:6528: checking for sockaddr_in6 in netinet/in.h" >&5
6528
  cat > conftest.$ac_ext <<EOF
6529
#line 6530 "configure"
6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543
#include "confdefs.h"
#include <netinet/in.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "sockaddr_in6" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6; have_ipv6=0
fi
rm -f conftest*

  if test x$have_ipv6 = x1; then
6544
    PLUGINS="${PLUGINS} misc/network/ipv6"
6545
  fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6546
fi
6547
if test "x${SYS}" = "xmingw32"
Gildas Bazin's avatar
 
Gildas Bazin committed
6548 6549
then
  echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
6550
echo "configure:6551: checking for getaddrinfo in ws2tcpip.h" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6551
  cat > conftest.$ac_ext <<EOF
6552
#line 6553 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6553 6554 6555 6556 6557 6558 6559
#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
6560
    PLUGINS="${PLUGINS} misc/network/ipv6"
Gildas Bazin's avatar
 
Gildas Bazin committed
6561 6562 6563 6564 6565 6566
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

6567
fi
6568

6569 6570 6571
# Check whether --enable-avi or --disable-avi was given.
if test "${enable_avi+set}" = set; then
  enableval="$enable_avi"
6572 6573
  :
fi
6574

6575
if test "x${enable_avi}" != "xno"
6576
then
6577
  PLUGINS="${PLUGINS} demux/avi/avi"
6578 6579
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6580 6581 6582 6583

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

Sam Hocevar's avatar
 
Sam Hocevar committed
6587

Sam Hocevar's avatar
 
Sam Hocevar committed
6588 6589 6590
# Check whether --enable-mad or --disable-mad was given.
if test "${enable_mad+set}" = set; then
  enableval="$enable_mad"
6591 6592
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6593

6594
if test "x${enable_mad}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
6595
then
6596
  # Check whether --with-mad or --without-mad was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6597 6598
if test "${with_mad+set}" = set; then
  withval="$with_mad"
6599 6600
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6601

6602
  if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6603
  then
6604 6605
    mad_CFLAGS="${mad_CFLAGS} -I${with_mad}/include"
    mad_LDFLAGS="${mad_LDFLAGS} -L${with_mad}/lib"
Gildas Bazin's avatar
 
Gildas Bazin committed
6606 6607
  fi

6608
  # Check whether --with-mad-tree or --without-mad-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6609 6610
if test "${with_mad_tree+set}" = set; then
  withval="$with_mad_tree"
6611 6612
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6613

6614
  if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6615 6616
  then
    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
6617
    if test "x${real_mad_tree}" = "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6618
    then
6619 6620
            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
6621
    fi
6622
        echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
6623
echo "configure:6624: checking for mad.h in ${real_mad_tree}/libmad" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6624 6625
    if test -f ${real_mad_tree}/libmad/mad.h
    then
6626
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6627 6628
      mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
      mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
6629
      LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
6630
      echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6631
echo "configure:6632: checking for mad_bit_init in -lmad" >&5
6632 6633 6634
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
6635
else
6636
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6637
LIBS="-lmad  $LIBS"
6638
cat > conftest.$ac_ext <<EOF
6639
#line 6640 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6640 6641 6642
#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
6643 6644 6645 6646 6647 6648 6649
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
6650
if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651 6652 6653 6654 6655 6656 6657 6658 6659 6660
  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
6661

6662 6663 6664 6665
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
6666
        BUILTINS="${BUILTINS} codec/mad/mad"
Gildas Bazin's avatar
 
Gildas Bazin committed
6667
        mad_LDFLAGS="${mad_LDFLAGS} -lmad"
6668
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6669
else
6670 6671 6672
  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
6673 6674
fi

6675
      LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6676
    else
6677 6678
      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
6679 6680
    fi
  else
6681 6682
    CFLAGS="${save_CFLAGS} ${mad_CFLAGS}"
    LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
6683
    for ac_hdr in mad.h
6684
do
6685 6686
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6687
echo "configure:6688: checking for $ac_hdr" >&5
6688 6689
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6690
else
6691
  cat > conftest.$ac_ext <<EOF
6692
#line 6693 "configure"
6693 6694 6695 6696
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6697
{ (eval echo configure:6698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6698 6699 6700 6701 6702 6703 6704
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
6705
  cat conftest.$ac_ext >&5
6706 6707
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6708
fi
6709
rm -f conftest*
6710
fi
6711 6712 6713 6714 6715 6716 6717
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
 
6718
else
6719 6720
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find development headers for libmad..." 1>&2; exit 1; } 
6721 6722 6723
fi
done

6724
    echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6725
echo "configure:6726: checking for mad_bit_init in -lmad" >&5
6726 6727 6728
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
6729
else
6730
  ac_save_LIBS="$LIBS"
6731
LIBS="-lmad  $LIBS"
6732
cat > conftest.$ac_ext <<EOF
6733
#line 6734 "configure"
6734 6735 6736
#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
6737 6738 6739 6740 6741 6742 6743
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
6744
if { (eval echo configure:6745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758
  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
6759
  
6760
      PLUGINS="${PLUGINS} codec/mad/mad"
6761
      mad_LDFLAGS="${mad_LDFLAGS} -lmad" 
6762
else
6763 6764
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libmad library..." 1>&2; exit 1; } 
6765 6766
fi

6767 6768
    CFLAGS="${save_CFLAGS}"
    LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6769
  fi
6770 6771
fi

6772 6773 6774
# Check whether --enable-ffmpeg or --disable-ffmpeg was given.
if test "${enable_ffmpeg+set}" = set; then
  enableval="$enable_ffmpeg"
6775 6776
  :
fi
6777

6778
if test "x${enable_ffmpeg}" = "xyes"
6779
then
6780 6781 6782 6783 6784 6785
  # Check whether --with-ffmpeg or --without-ffmpeg was given.
if test "${with_ffmpeg+set}" = set; then
  withval="$with_ffmpeg"
  :
fi

6786
  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
6787
  then
6788 6789
    ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${with_ffmpeg}/include/libffmpeg"
    ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L${with_ffmpeg}/lib"
6790 6791
  fi

6792
  # Check whether --with-ffmpeg-tree or --without-ffmpeg-tree was given.
6793 6794
if test "${with_ffmpeg_tree+set}" = set; then
  withval="$with_ffmpeg_tree"
6795 6796
  :
fi
6797

6798
  if test "x${with_ffmpeg_tree}" != "x"
6799
  then
6800
    echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
6801
echo "configure:6802: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
6802
    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
6803
    if test "x${real_ffmpeg_tree}" = x
6804
    then
6805 6806
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot cd to ${with_ffmpeg_tree}" 1>&2; exit 1; }
6807 6808 6809
    fi
    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
    then
6810
            echo "$ac_t""${real_ffmpeg_tree}/libavcodec/libavcodec.a" 1>&6
6811
      BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
6812
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
6813 6814
      ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
    else
6815 6816
            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; }
6817
    fi
6818
  else
6819 6820
    CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
6821
    echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
6822
echo "configure:6823: checking for avcodec_init in -lavcodec" >&5
6823 6824 6825 6826 6827 6828 6829
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
6830
#line 6831 "configure"
6831 6832 6833 6834 6835 6836 6837 6838 6839 6840
#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
6841
if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855
  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
6856
  
6857
      BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
6858
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" 
6859 6860 6861 6862 6863
else
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libavcodec library..." 1>&2; exit 1; } 
fi

6864 6865
    LDFLAGS="${save_LDFLAGS}"
    CFLAGS="${save_CFLAGS}"
6866 6867 6868
  fi
fi

6869 6870 6871 6872 6873 6874 6875 6876 6877 6878
# Check whether --enable-mp4 or --disable-mp4 was given.
if test "${enable_mp4+set}" = set; then
  enableval="$enable_mp4"
  :
fi

if test "x${enable_mp4}" = "xyes"
then
    ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
6879
echo "configure:6880: checking for zlib.h" >&5
6880 6881 6882 6883
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
6884
#line 6885 "configure"
6885 6886 6887 6888
#include "confdefs.h"
#include <zlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6889
{ (eval echo configure:6890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for inflateEnd in -lz""... $ac_c" 1>&6
6906
echo "configure:6907: checking for inflateEnd in -lz" >&5
6907 6908 6909 6910 6911 6912 6913
ac_lib_var=`echo z'_'inflateEnd | 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="-lz  $LIBS"
cat > conftest.$ac_ext <<EOF
6914
#line 6915 "configure"
6915 6916 6917 6918 6919 6920 6921 6922 6923 6924
#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 inflateEnd();

int main() {
inflateEnd()
; return 0; }
EOF
6925
if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939
  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
6940
   PLUGINS="${PLUGINS} demux/mp4/mp4"
6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952
              mp4_LDFLAGS="${mp4_LDFLAGS} -lz" 
else
  echo "$ac_t""no" 1>&6
 { echo "configure: error: cannot find zlib library..." 1>&2; exit 1; } 
fi

else
  echo "$ac_t""no" 1>&6
  { echo "configure: error: cannot find zlib header..." 1>&2; exit 1; } 
fi

fi
6953

6954
if test "x${SYS}" = "xbeos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6955
then
6956
    PLUGINS="${PLUGINS} gui/beos/beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6957
fi
6958

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

6965
if test "x${enable_a52}" != "xno"
Gildas Bazin's avatar
 
Gildas Bazin committed
6966
then
6967
  # Check whether --with-a52-tree or --without-a52-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6968 6969
if test "${with_a52_tree+set}" = set; then
  withval="$with_a52_tree"
6970 6971
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6972

6973
  if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6974
  then
Gildas Bazin's avatar
 
Gildas Bazin committed
6975
    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
6976
    if test "x${real_a52_tree}" = "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6977
    then
6978 6979
            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
6980
    fi
6981
        echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
6982
echo "configure:6983: checking for a52.h in ${real_a52_tree}/include" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6983 6984
    if test -f ${real_a52_tree}/include/a52.h
    then
6985
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6986 6987
      a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
      a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
6988
      LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
6989
      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
6990
echo "configure:6991: checking for a52_free in -la52" >&5
6991 6992 6993
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
6994
else
6995
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6996
LIBS="-la52 -lm $LIBS"
6997
cat > conftest.$ac_ext <<EOF
6998
#line 6999 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6999 7000 7001
#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
7002 7003 7004 7005 7006 7007 7008
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
7009
if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010 7011 7012 7013 7014 7015 7016 7017 7018 7019
  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
7020

7021 7022 7023 7024
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
7025
        BUILTINS="${BUILTINS} codec/a52/a52"
Gildas Bazin's avatar
 
Gildas Bazin committed
7026 7027
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
7028
        
Gildas Bazin's avatar
 
Gildas Bazin committed
7029
else
7030
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7031 7032 7033

        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
        then
7034
          { echo "configure: error: make sure you have at least a52dec-0.7.3" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
7035
        else
7036
          { echo "configure: error: the specified tree hasn't been compiled" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
7037
        fi
7038
      
Gildas Bazin's avatar
 
Gildas Bazin committed
7039 7040
fi

7041
      LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
7042
    else
7043 7044
      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
7045
    fi
7046
  else     for ac_hdr in a52dec/a52.h
7047
do
7048 7049
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7050
echo "configure:7051: checking for $ac_hdr" >&5
7051 7052
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7053
else
7054
  cat > conftest.$ac_ext <<EOF
7055
#line 7056 "configure"
7056 7057 7058 7059
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7060
{ (eval echo configure:7061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7061 7062 7063 7064 7065 7066 7067
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
7068
  cat conftest.$ac_ext >&5
7069 7070
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7071
fi
7072
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7073
fi
7074 7075 7076 7077 7078 7079 7080 7081
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
7082
echo "configure:7083: checking for a52_free in -la52" >&5
7083 7084 7085 7086 7087
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
7088
LIBS="-la52 -lm $LIBS"
7089
cat > conftest.$ac_ext <<EOF
7090
#line 7091 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
7091 7092 7093
#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
7094 7095 7096 7097 7098 7099 7100
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
7101
if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7102 7103 7104 7105 7106 7107 7108 7109 7110 7111
  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
7112

7113 7114 7115 7116
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
7117
        BUILTINS="${BUILTINS} codec/a52/a52"
Gildas Bazin's avatar
 
Gildas Bazin committed
7118 7119
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS}"
7120 7121 7122
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7123 7124
fi

7125 7126 7127
    
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7128
fi
7129
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7130 7131

  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7132
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7133

7134 7135 7136 7137 7138 7139 7140 7141
# Check whether --enable-cinepak or --disable-cinepak was given.
if test "${enable_cinepak+set}" = set; then
  enableval="$enable_cinepak"
  :
fi

if test "x${enable_cinepak}" != "xno"
then
7142
  PLUGINS="${PLUGINS} codec/cinepak/cinepak"
7143 7144
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7145 7146 7147
# Check whether --enable-vorbis or --disable-vorbis was given.
if test "${enable_vorbis+set}" = set; then
  enableval="$enable_vorbis"
7148 7149
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7150

7151
if test "x${enable_vorbis}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7152
then
7153
  for ac_hdr in ogg/ogg.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7154
do
7155 7156
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7157
echo "configure:7158: checking for $ac_hdr" >&5
7158 7159
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7160
else
7161
  cat > conftest.$ac_ext <<EOF
7162
#line 7163 "configure"
7163 7164 7165 7166
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7167
{ (eval echo configure:7168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7168 7169 7170 7171 7172 7173 7174
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
7175
  cat conftest.$ac_ext >&5
7176 7177
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7178
fi
7179
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7180
fi
7181 7182 7183 7184 7185 7186 7187
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
 
7188
        #PLUGINS="${PLUGINS} demux/ogg/ogg codec/vorbis/vorbis"
Sam Hocevar's avatar
 
Sam Hocevar committed
7189
    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
7190 7191 7192
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7193 7194 7195 7196 7197
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7198

Sam Hocevar's avatar
 
Sam Hocevar committed
7199 7200 7201
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
7202 7203
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7204

Sam Hocevar's avatar
 
Sam Hocevar committed
7205

Sam Hocevar's avatar
 
Sam Hocevar committed
7206 7207 7208
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
7209 7210
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7211

7212 7213 7214
if test "x${enable_x11}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
7215
  for ac_hdr in X11/Xlib.h
7216
do
7217 7218
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7219
echo "configure:7220: checking for $ac_hdr" >&5
7220 7221
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
7222
else
7223
  cat > conftest.$ac_ext <<EOF
7224
#line 7225 "configure"
7225 7226 7227 7228
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7229
{ (eval echo configure:7230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7230 7231 7232 7233 7234 7235 7236
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
7237
  cat conftest.$ac_ext >&5
7238 7239
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7240
fi
7241
rm -f conftest*
7242
fi
7243 7244 7245 7246 7247 7248 7249
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
 
7250
    PLUGINS="${PLUGINS} video_output/x11/x11"
7251 7252
    x11_LDFLAGS="${x11_LDFLAGS} -L${x_libraries} -lX11 -lXext"
    x11_CFLAGS="${x11_CFLAGS} -I${x_includes}"
7253 7254 7255
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7256
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7257
done
Sam Hocevar's avatar
 
Sam Hocevar committed
7258

7259
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
7260 7261
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7262 7263 7264
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
7265 7266
  :
fi
7267

7268 7269 7270
if test "x${enable_xvideo}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
7271
  for ac_hdr in X11/extensions/Xv.h
7272
do
7273 7274
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7275
echo "configure:7276: checking for $ac_hdr" >&5
7276 7277
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7278
else
7279
  cat > conftest.$ac_ext <<EOF
7280
#line 7281 "configure"
7281 7282 7283 7284
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7285
{ (eval echo configure:7286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7286 7287 7288 7289 7290 7291 7292
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
7293
  cat conftest.$ac_ext >&5
7294 7295
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7296
fi
7297
rm -f conftest*
7298
fi
7299 7300 7301 7302 7303 7304 7305
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
 
7306
    CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
7307
    echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
7308
echo "configure:7309: checking for XvPutImage in -lXv_pic" >&5
7309
ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
7310 7311
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
7312
else
7313
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7314
LIBS="-lXv_pic  $LIBS"
7315
cat > conftest.$ac_ext <<EOF
7316
#line 7317 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
7317
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7318 7319
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
7320
    builtin and then its argument prototype would still apply.  */
7321
char XvPutImage();
7322 7323

int main() {
7324
XvPutImage()
7325 7326
; return 0; }
EOF
7327
if { (eval echo configure:7328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341
  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
7342
  # We have Xv_pic, that's good, we can build an xvideo.so plugin !
7343
      PLUGINS="${PLUGINS} video_output/x11/xvideo"
7344 7345
      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
7346
else
7347
  echo "$ac_t""no" 1>&6
7348
echo $ac_n "checking for XvPutImage in -lXv""... $ac_c" 1>&6
7349
echo "configure:7350: checking for XvPutImage in -lXv" >&5
7350 7351 7352 7353 7354 7355 7356
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
7357
#line 7358 "configure"
7358 7359 7360 7361 7362 7363 7364 7365 7366 7367
#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
7368
if { (eval echo configure:7369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383
  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
7384
        PLUGINS="${PLUGINS} video_output/x11/xvideo"
7385 7386
        xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv"
        xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
7387 7388 7389
else
  echo "$ac_t""no" 1>&6
# Otherwise... well, do nothing.
7390
        :
7391 7392 7393 7394
      
fi

    
Sam Hocevar's avatar
 
Sam Hocevar committed
7395 7396
fi

7397
    CFLAGS="${save_CFLAGS}"
7398
  
7399
  CPPFLAGS="${save_CPPFLAGS}"
7400 7401
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7402 7403 7404 7405 7406
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7407 7408 7409
# Check whether --enable-sdl or --disable-sdl was given.
if test "${enable_sdl+set}" = set; then
  enableval="$enable_sdl"
7410 7411
  :
fi
7412

7413
if test "x${enable_sdl}" != "xno"
7414
then
7415
  SDL_PATH="${PATH}"
7416
  # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7417 7418
if test "${with_sdl_config_path+set}" = set; then
  withval="$with_sdl_config_path"
7419
   if test "x${with_sdl_config_path}" != "xno"
7420
      then
7421
        SDL_PATH="${with_sdl_config_path}:${PATH}"
7422 7423 7424
      fi 
fi

7425 7426
  # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
7427
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7428
echo "configure:7429: checking for $ac_word" >&5
7429 7430
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
7431
else
7432 7433
  case "$SDL12_CONFIG" in
  /*)
7434
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7435
  ;;
7436 7437 7438
  ?:/*)			 
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
  ;;
7439
  *)
7440
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7441
  ac_dummy="${SDL_PATH}"
7442 7443 7444 7445 7446 7447 7448 7449
  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"
7450
  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7451 7452 7453
  ;;
esac
fi
7454
SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7455
if test -n "$SDL12_CONFIG"; then
7456
  echo "$ac_t""$SDL12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7457
else
7458
  echo "$ac_t""no" 1>&6
7459
fi
7460

7461
  SDL_CONFIG="${SDL12_CONFIG}"
7462
  SDL_HEADER="SDL12/SDL.h"
7463
  if test "x${SDL_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7464
  then
7465 7466
    # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
7467
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7468
echo "configure:7469: checking for $ac_word" >&5
7469 7470
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7471
else
7472 7473
  case "$SDL11_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7474
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7475
  ;;
7476 7477 7478
  ?:/*)			 
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
  ;;
7479
  *)
7480
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7481
  ac_dummy="${SDL_PATH}"
7482 7483 7484 7485 7486 7487 7488 7489
  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
7490
  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7491 7492
  ;;
esac
7493
fi
7494
SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7495
if test -n "$SDL11_CONFIG"; then
7496
  echo "$ac_t""$SDL11_CONFIG" 1>&6
7497
else
7498
  echo "$ac_t""no" 1>&6
7499 7500
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7501
    SDL_CONFIG=${SDL11_CONFIG}
7502 7503
    SDL_HEADER="SDL11/SDL.h"
  fi
7504
  if test "x${SDL_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7505
  then
7506 7507
    # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
7508
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7509
echo "configure:7510: checking for $ac_word" >&5
7510 7511
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7512
else
7513 7514
  case "$SDL_CONFIG" in
  /*)
7515
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7516
  ;;
7517 7518 7519
  ?:/*)			 
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
  ;;
7520
  *)
7521
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7522
  ac_dummy="${SDL_PATH}"
7523 7524 7525 7526 7527 7528 7529 7530
  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"
7531
  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7532 7533 7534
  ;;
esac
fi
7535
SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7536
if test -n "$SDL_CONFIG"; then
7537
  echo "$ac_t""$SDL_CONFIG" 1>&6
7538
else
7539
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7540 7541
fi

7542
    SDL_HEADER="SDL/SDL.h"
7543
  fi
7544
  if test "x${SDL_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7545
  then
7546
    PLUGINS="${PLUGINS} video_output/sdl/sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7547 7548
    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
7549
    CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
7550
    for ac_hdr in ${SDL_HEADER}
7551
do
7552 7553
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7554
echo "configure:7555: checking for $ac_hdr" >&5
7555 7556
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
7557
else
7558
  cat > conftest.$ac_ext <<EOF
7559
#line 7560 "configure"
7560 7561 7562 7563
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7564
{ (eval echo configure:7565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7565 7566 7567 7568 7569 7570 7571
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
7572
  cat conftest.$ac_ext >&5
7573 7574
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7575
fi
7576
rm -f conftest*
7577
fi
7578 7579 7580 7581 7582 7583 7584
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
7585
#define SDL_INCLUDE_FILE <${SDL_HEADER}>
7586
EOF
7587

Sam Hocevar's avatar
 
Sam Hocevar committed
7588
else
7589 7590 7591 7592 7593
  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; }
      
7594 7595 7596
fi
done

7597 7598
    CPPFLAGS="${save_CPPFLAGS}"
    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
7599
    then
7600
      { echo "configure: error: The development package for SDL is not installed.
7601
Please install it and try again. Alternatively you can also configure with
7602
--disable-sdl." 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7603
    fi
7604
  elif test "x${enable_sdl}" =  "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7605
  then
7606
    { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7607
from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7608
    " 1>&2; exit 1; }
7609 7610
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7611

7612 7613 7614
# Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval="$enable_directx"
7615 7616
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7617

7618
if test "x${enable_directx}" != "xno"
7619
then
7620
  if test "x${SYS}" = "xmingw32"
7621
  then
7622
    # Check whether --with-directx or --without-directx was given.
Xavier Marchesini's avatar
 
Xavier Marchesini committed
7623 7624
if test "${with_directx+set}" = set; then
  withval="$with_directx"
7625 7626
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7627

7628
    if test "x${with_directx}" = "x"
7629
    then
7630
      for ac_hdr in ddraw.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7631
do
7632 7633
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7634
echo "configure:7635: checking for $ac_hdr" >&5
7635 7636
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7637
else
7638
  cat > conftest.$ac_ext <<EOF
7639
#line 7640 "configure"
7640 7641 7642 7643
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7644
{ (eval echo configure:7645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7645 7646 7647 7648 7649 7650 7651
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
7652
  cat conftest.$ac_ext >&5
7653 7654
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7655
fi
7656
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7657
fi
7658 7659 7660 7661 7662 7663
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
7664
  PLUGINS="${PLUGINS} video_output/directx/directx"
7665 7666 7667
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7668 7669 7670
fi
done

7671
    else
7672
      echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
7673
echo "configure:7674: checking for directX headers in ${with_directx}" >&5
7674
      if test -f ${with_directx}/ddraw.h
7675
      then
7676
        PLUGINS="${PLUGINS} video_output/directx/directx"
Gildas Bazin's avatar
 
Gildas Bazin committed
7677
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
7678
        directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
7679
        echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7680
      else
7681 7682
        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
7683
      fi
7684 7685
    fi
  fi
7686 7687
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7688 7689 7690
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
7691 7692
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7693

7694
    if test "x${enable_fb}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7695
    then
7696
      for ac_hdr in linux/fb.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7697
do
7698 7699
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7700
echo "configure:7701: checking for $ac_hdr" >&5
7701 7702
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7703
else
7704
  cat > conftest.$ac_ext <<EOF
7705
#line 7706 "configure"
7706 7707 7708 7709
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7710
{ (eval echo configure:7711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7711 7712 7713 7714 7715 7716 7717
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
7718
  cat conftest.$ac_ext >&5
7719 7720
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7721
fi
7722
rm -f conftest*
Gildas Bazin's avatar
 
Gildas Bazin committed
7723
fi
7724 7725 7726 7727 7728 7729 7730
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
 
7731
        PLUGINS="${PLUGINS} video_output/fb/fb"
7732 7733 7734
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7735 7736
fi
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7737

Sam Hocevar's avatar
 
Sam Hocevar committed
7738 7739 7740 7741 7742
    fi

# Check whether --enable-mga or --disable-mga was given.
if test "${enable_mga+set}" = set; then
  enableval="$enable_mga"
7743
   if test "x${enable_mga}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7744
    then
7745
      PLUGINS="${PLUGINS} video_output/mga/mga video_output/mga/xmga"
7746 7747 7748
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7749

Sam Hocevar's avatar
 
Sam Hocevar committed
7750 7751 7752
# Check whether --enable-ggi or --disable-ggi was given.
if test "${enable_ggi+set}" = set; then
  enableval="$enable_ggi"
7753 7754
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7755

7756
if test "x${enable_ggi}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7757
then
7758
  PLUGINS="${PLUGINS} video_output/ggi/ggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
7759
  ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
7760
  # Check whether --with-ggi or --without-ggi was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
7761 7762
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
7763
   if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7764
      then
7765 7766
        CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
        ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
7767 7768 7769
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7770 7771 7772 7773 7774
fi

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

7778
if test "x${enable_glide}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7779
then
7780
  PLUGINS="${PLUGINS} video_output/glide/glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
7781 7782
  glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
  glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
7783
  # Check whether --with-glide or --without-glide was given.
Christophe Massiot's avatar
Christophe Massiot committed
7784 7785
if test "${with_glide+set}" = set; then
  withval="$with_glide"
7786
   if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7787
      then
7788 7789
        glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
        glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
7790 7791 7792
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7793
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7794

Sam Hocevar's avatar
 
Sam Hocevar committed
7795 7796 7797
# Check whether --enable-aa or --disable-aa was given.
if test "${enable_aa+set}" = set; then
  enableval="$enable_aa"
7798 7799
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7800

7801
if test "x${enable_aa}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7802
then
7803 7804
  ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
7805
echo "configure:7806: checking for aalib.h" >&5
7806 7807 7808 7809
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
7810
#line 7811 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7811 7812
#include "confdefs.h"
#include <aalib.h>
7813 7814
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7815
{ (eval echo configure:7816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7816 7817 7818 7819 7820 7821 7822
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
7823
  cat conftest.$ac_ext >&5
7824 7825
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7826
fi
7827
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7828
fi
7829 7830
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7831 7832
  have_aa="true"
else
7833 7834
  echo "$ac_t""no" 1>&6
have_aa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7835 7836
fi

7837
  if test "x${have_aa}" = "xtrue"
Sam Hocevar's avatar
 
Sam Hocevar committed
7838
  then
7839
    PLUGINS="${PLUGINS} video_output/aa/aa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7840
    aa_LDFLAGS="${aa_LDFLAGS} -laa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7841 7842 7843
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7844 7845 7846 7847

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

Sam Hocevar's avatar
 
Sam Hocevar committed
7851

Sam Hocevar's avatar
 
Sam Hocevar committed
7852 7853 7854
# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
7855 7856
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7857

Sam Hocevar's avatar
 
Sam Hocevar committed
7858

7859 7860
if test "x${enable_dsp}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_dsp}" = "xyes")
Sam Hocevar's avatar
 
Sam Hocevar committed
7861
then
7862
  for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7863
do
7864 7865
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7866
echo "configure:7867: checking for $ac_hdr" >&5
7867 7868
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7869
else
7870
  cat > conftest.$ac_ext <<EOF
7871
#line 7872 "configure"
7872 7873 7874 7875
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7876
{ (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7877 7878 7879 7880 7881 7882 7883
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
7884
  cat conftest.$ac_ext >&5
7885 7886
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7887
fi
7888
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7889
fi
7890 7891 7892 7893 7894 7895 7896
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
 
7897
    PLUGINS="${PLUGINS} audio_output/dsp/dsp"
7898
    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
7899
echo "configure:7900: checking for main in -lossaudio" >&5
7900 7901 7902
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
7903
else
7904
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7905
LIBS="-lossaudio  $LIBS"
7906
cat > conftest.$ac_ext <<EOF
7907
#line 7908 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7908 7909
#include "confdefs.h"

7910 7911 7912 7913
int main() {
main()
; return 0; }
EOF
7914
if { (eval echo configure:7915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7915 7916 7917 7918 7919 7920 7921 7922 7923 7924
  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
7925

7926 7927 7928
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
7929
  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
7930 7931
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7932 7933
fi

7934 7935 7936
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7937 7938 7939 7940 7941 7942 7943 7944
fi
done

fi

# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
7945
  if test "x${enable_esd}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7946 7947 7948
   then
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
7949
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7950
echo "configure:7951: checking for $ac_word" >&5
7951 7952
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
7953
else
7954 7955
  case "$ESD_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7956 7957
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
7958 7959 7960
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7961
  *)
7962 7963 7964 7965 7966 7967 7968 7969 7970 7971
  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
7972 7973 7974 7975
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
7976
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7977
if test -n "$ESD_CONFIG"; then
7978
  echo "$ac_t""$ESD_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7979
else
7980
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7981 7982
fi

7983
     if test "x${ESD_CONFIG}" != "xno"
7984
     then
7985
       PLUGINS="${PLUGINS} audio_output/esd/esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
7986 7987
       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
7988
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7989
   fi
7990 7991
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7992

Sam Hocevar's avatar
 
Sam Hocevar committed
7993 7994 7995
# Check whether --enable-arts or --disable-arts was given.
if test "${enable_arts+set}" = set; then
  enableval="$enable_arts"
7996
  if test "x${enable_arts}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7997 7998 7999
   then
     # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
8000
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8001
echo "configure:8002: checking for $ac_word" >&5
8002 8003
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8004
else
8005 8006
  case "$ARTS_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8007
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
8008
  ;;
8009 8010 8011
  ?:/*)			 
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
  ;;
8012
  *)
8013 8014 8015 8016 8017 8018 8019 8020 8021 8022
  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
8023
  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
8024 8025 8026
  ;;
esac
fi
8027
ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8028
if test -n "$ARTS_CONFIG"; then
8029
  echo "$ac_t""$ARTS_CONFIG" 1>&6
8030
else
8031
  echo "$ac_t""no" 1>&6
8032 8033
fi

8034
     if test "x${ARTS_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8035
     then
8036
       PLUGINS="${PLUGINS} audio_output/arts/arts"
Sam Hocevar's avatar
 
Sam Hocevar committed
8037 8038
       arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
       arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
Sam Hocevar's avatar
 
Sam Hocevar committed
8039 8040
     fi
   fi
8041 8042
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8043 8044 8045 8046

# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
8047
  if test "x${enable_alsa}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8048
   then
8049 8050
     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
8051
echo "configure:8052: checking for alsa/asoundlib.h" >&5
8052 8053 8054 8055
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
8056
#line 8057 "configure"
8057
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8058
#include <alsa/asoundlib.h>
8059 8060
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8061
{ (eval echo configure:8062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8062 8063 8064 8065 8066 8067 8068
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
8069
  cat conftest.$ac_ext >&5
8070 8071
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8072
fi
8073
rm -f conftest*
8074
fi
8075 8076 8077
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
8078
echo "configure:8079: checking for main in -lasound" >&5
8079 8080 8081
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
8082
else
8083
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8084
LIBS="-lasound  $LIBS"
8085
cat > conftest.$ac_ext <<EOF
8086
#line 8087 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8087 8088
#include "confdefs.h"

8089 8090 8091 8092
int main() {
main()
; return 0; }
EOF
8093
if { (eval echo configure:8094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8094 8095 8096 8097 8098 8099 8100 8101 8102 8103
  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
8104

8105 8106 8107
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
8108 8109
  have_alsa="true"
else
8110 8111
  echo "$ac_t""no" 1>&6
have_alsa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
8112 8113
fi

8114
else
8115 8116
  echo "$ac_t""no" 1>&6
have_alsa="false"
8117 8118
fi

8119
     if test "x${have_alsa}" = "xtrue"
Sam Hocevar's avatar
 
Sam Hocevar committed
8120
     then
8121
       PLUGINS="${PLUGINS} audio_output/alsa/alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
8122
       alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
8123 8124
     fi
   fi
8125 8126
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8127 8128 8129 8130

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

8134
if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
8135
  then
8136
    PLUGINS="${PLUGINS} audio_output/waveout/waveout"
Sam Hocevar's avatar
 
Sam Hocevar committed
8137
    waveout_LDFLAGS="-lwinmm"
Sam Hocevar's avatar
 
Sam Hocevar committed
8138 8139 8140 8141 8142 8143
fi


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

Sam Hocevar's avatar
 
Sam Hocevar committed
8147

Sam Hocevar's avatar
 
Sam Hocevar committed
8148 8149 8150
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
8151 8152
  :
fi
8153

8154
if test "x${enable_gtk}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8155
then
8156
  GTK_PATH="${PATH}"
8157
  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
8158 8159
if test "${with_gtk_config_path+set}" = set; then
  withval="$with_gtk_config_path"
8160
   if test "x${with_gtk_config_path}" != "xno"
8161
      then
8162
        GTK_PATH="${with_gtk_config_path}:${PATH}"
8163 8164 8165
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8166
  # look for gtk-config
Sam Hocevar's avatar
 
Sam Hocevar committed
8167 8168
  # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
8169
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8170
echo "configure:8171: checking for $ac_word" >&5
8171 8172
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
8173
else
8174 8175
  case "$GTK12_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8176 8177
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
8178 8179 8180
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8181
  *)
8182
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
8183
  ac_dummy="${GTK_PATH}"
8184 8185 8186 8187 8188 8189 8190 8191
  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
8192 8193 8194 8195
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
8196
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8197
if test -n "$GTK12_CONFIG"; then
8198
  echo "$ac_t""$GTK12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8199
else
8200
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8201 8202 8203
fi

  GTK_CONFIG=${GTK12_CONFIG}
8204
  if test "x${GTK_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8205 8206 8207
  then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
8208
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8209
echo "configure:8210: checking for $ac_word" >&5
8210 8211
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
8212
else
8213 8214
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8215 8216
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
8217 8218 8219
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8220
  *)
8221
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
8222
  ac_dummy="${GTK_PATH}"
8223 8224 8225 8226 8227 8228 8229 8230
  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
8231 8232 8233 8234
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
8235
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8236
if test -n "$GTK_CONFIG"; then
8237
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8238
else
8239
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8240 8241
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8242
  fi
8243
  if test "x${GTK_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8244
  then
8245
    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
8246
    then
8247
      { 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
8248
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8249 8250
    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
8251
    # now look for the gtk.h header
8252
    CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8253
    ac_cv_gtk_headers=yes
8254
    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8255
do
8256 8257
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8258
echo "configure:8259: checking for $ac_hdr" >&5
8259 8260
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8261
else
8262
  cat > conftest.$ac_ext <<EOF
8263
#line 8264 "configure"
8264 8265 8266 8267
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8268
{ (eval echo configure:8269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8269 8270 8271 8272 8273 8274 8275
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
8276
  cat conftest.$ac_ext >&5
8277 8278
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8279
fi
8280
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8281
fi
8282 8283 8284 8285 8286 8287 8288
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
8289
else
8290 8291
  echo "$ac_t""no" 1>&6
ac_cv_gtk_headers=no
Sam Hocevar's avatar
 
Sam Hocevar committed
8292
      echo "Cannot find gtk development headers."
8293
    
Sam Hocevar's avatar
 
Sam Hocevar committed
8294 8295 8296
fi
done

8297
    if test "x${ac_cv_gtk_headers}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8298
    then
8299
      PLUGINS="${PLUGINS} gui/gtk/gtk"
Sam Hocevar's avatar
 
Sam Hocevar committed
8300 8301
      ALIASES="${ALIASES} gvlc"
    fi
8302
    CPPFLAGS="${save_CPPFLAGS}"
8303
  fi
8304
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8305

8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327
# Check whether --enable-familiar or --disable-familiar was given.
if test "${enable_familiar+set}" = set; then
  enableval="$enable_familiar"
  :
fi

if test "x${enable_familiar}" = "xyes"
then
  GTK_PATH="${PATH}"
  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
if test "${with_gtk_config_path+set}" = set; then
  withval="$with_gtk_config_path"
   if test "x${with_gtk_config_path}" != "xno"
      then
        GTK_PATH="${with_gtk_config_path}:${PATH}"
      fi 
fi

  # look for gtk-config
  # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8328
echo "configure:8329: checking for $ac_word" >&5
8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK12_CONFIG" in
  /*)
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="${GTK_PATH}"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
if test -n "$GTK12_CONFIG"; then
  echo "$ac_t""$GTK12_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  GTK_CONFIG=${GTK12_CONFIG}
  if test "x${GTK_CONFIG}" = "xno"
  then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8367
echo "configure:8368: checking for $ac_word" >&5
8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK_CONFIG" in
  /*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="${GTK_PATH}"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
if test -n "$GTK_CONFIG"; then
  echo "$ac_t""$GTK_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  fi
  if test "x${GTK_CONFIG}" != "xno"
  then
    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
    then
      { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar." 1>&2; exit 1; }
    fi
    familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
    familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
    # now look for the gtk.h header
    CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
    ac_cv_gtk_headers=yes
    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8416
echo "configure:8417: checking for $ac_hdr" >&5
8417 8418 8419 8420
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
8421
#line 8422 "configure"
8422 8423 8424 8425
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8426
{ (eval echo configure:8427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
ac_cv_gtk_headers=no
      echo "Cannot find gtk development headers."
    
fi
done

    if test "x${ac_cv_gtk_headers}" = "xyes"
    then
8457
      PLUGINS="${PLUGINS} gui/familiar/familiar"
8458 8459 8460 8461 8462
    fi
    CPPFLAGS="${save_CPPFLAGS}"
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8463 8464 8465
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
8466
  if test "x${enable_gnome}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8467 8468 8469
    # 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
8470
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8471
echo "configure:8472: checking for $ac_word" >&5
8472 8473
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
8474
else
8475 8476
  case "$GNOME_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8477 8478
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
  ;;
8479 8480 8481
  ?:/*)			 
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8482
  *)
8483 8484 8485 8486 8487 8488 8489 8490 8491 8492
  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
8493 8494 8495 8496
  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
  ;;
esac
fi
8497
GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8498
if test -n "$GNOME_CONFIG"; then
8499
  echo "$ac_t""$GNOME_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8500
else
8501
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8502
fi
Henri Fallon's avatar
 
Henri Fallon committed
8503

Sam Hocevar's avatar
 
Sam Hocevar committed
8504 8505
    if test -x ${GNOME_CONFIG}
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
8506 8507
       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
8508 8509
    fi
    # now look for the gnome.h header
8510
    CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
8511
    for ac_hdr in gnome.h
8512
do
8513 8514
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8515
echo "configure:8516: checking for $ac_hdr" >&5
8516 8517
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
8518
else
8519
  cat > conftest.$ac_ext <<EOF
8520
#line 8521 "configure"
8521 8522 8523 8524
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8525
{ (eval echo configure:8526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8526 8527 8528 8529 8530 8531 8532
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
8533
  cat conftest.$ac_ext >&5
8534 8535
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8536
fi
8537
rm -f conftest*
8538
fi
8539 8540 8541 8542 8543 8544 8545
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
 
8546
      PLUGINS="${PLUGINS} gui/gtk/gnome"
Sam Hocevar's avatar
 
Sam Hocevar committed
8547
      ALIASES="${ALIASES} gnome-vlc"
8548
     
Sam Hocevar's avatar
 
Sam Hocevar committed
8549
else
8550 8551 8552 8553
  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; }
     
8554 8555 8556
fi
done

8557
    CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8558
  fi
8559 8560
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8561 8562 8563 8564

# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
8565
  if test "x${enable_qt}" = "xyes"; then
8566
     PLUGINS="${PLUGINS} gui/qt/qt"
Sam Hocevar's avatar
 
Sam Hocevar committed
8567
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8568 8569
     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
8570 8571 8572 8573 8574 8575 8576
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8577 8578
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8579 8580 8581 8582

# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
8583
  if test "x${enable_kde}" = "xyes"; then
8584
     PLUGINS="${PLUGINS} gui/kde/kde"
Sam Hocevar's avatar
 
Sam Hocevar committed
8585
     ALIASES="${ALIASES} kvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8586 8587 8588
     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
8589 8590 8591 8592 8593 8594 8595
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8596 8597
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8598 8599 8600 8601

# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
8602
  if test "x${enable_macosx}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8603
   then
8604
     BUILTINS="${BUILTINS} gui/macosx/macosx"
Jon Lech Johansen's avatar
Jon Lech Johansen committed
8605
     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
8606 8607
   fi
else
8608
  for ac_hdr in Cocoa/Cocoa.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8609
do
8610 8611
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8612
echo "configure:8613: checking for $ac_hdr" >&5
8613 8614
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8615
else
8616
  cat > conftest.$ac_ext <<EOF
8617
#line 8618 "configure"
8618 8619 8620 8621
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8622
{ (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8623 8624 8625 8626 8627 8628 8629
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
8630
  cat conftest.$ac_ext >&5
8631 8632
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8633
fi
8634
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8635
fi
8636 8637 8638 8639 8640 8641
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
8642
 BUILTINS="${BUILTINS} gui/macosx/macosx"
Jon Lech Johansen's avatar
Jon Lech Johansen committed
8643
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
8644 8645 8646
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8647
fi
8648 8649
done

8650 8651
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8652 8653 8654 8655

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

8659
    if test "x${enable_qnx}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8660
    then
8661
      for ac_hdr in Ph.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8662
do
8663 8664
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8665
echo "configure:8666: checking for $ac_hdr" >&5
8666 8667
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8668
else
8669
  cat > conftest.$ac_ext <<EOF
8670
#line 8671 "configure"
8671 8672 8673 8674
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8675
{ (eval echo configure:8676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8676 8677 8678 8679 8680 8681 8682
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
8683
  cat conftest.$ac_ext >&5
8684 8685
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8686
fi
8687
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8688
fi
8689 8690 8691 8692 8693 8694 8695
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
 
8696
        PLUGINS="${PLUGINS} gui/qnx/qnx"
Sam Hocevar's avatar
 
Sam Hocevar committed
8697
        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
8698 8699 8700
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8701
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8702
done
Sam Hocevar's avatar
 
Sam Hocevar committed
8703

Sam Hocevar's avatar
 
Sam Hocevar committed
8704 8705
    fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8706 8707 8708
# Check whether --enable-intfwin or --disable-intfwin was given.
if test "${enable_intfwin+set}" = set; then
  enableval="$enable_intfwin"
8709
   if test "x${enable_intfwin}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8710
  then
8711
    # Check whether --with-bcbuilder or --without-bcbuilder was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
8712 8713
if test "${with_bcbuilder+set}" = set; then
  withval="$with_bcbuilder"
8714 8715
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8716

8717
    if test "x${with_bcbuilder}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
8718
    then
8719
      BCBUILDER="${with_bcbuilder}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8720
    fi
8721
    PLUGINS="${PLUGINS} gui/win32/win32"
8722 8723 8724
  fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8725 8726 8727 8728

# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
8729
  if test "x${enable_ncurses}" = "xyes"; then
8730
     PLUGINS="${PLUGINS} gui/ncurses/ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8731
     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8732
   fi
8733 8734
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8735

8736 8737 8738
# Check whether --enable-xosd or --disable-xosd was given.
if test "${enable_xosd+set}" = set; then
  enableval="$enable_xosd"
8739 8740 8741
  :
fi

8742
if test "x${enable_xosd}" = "xyes"
8743 8744 8745
then
  ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
8746
echo "configure:8747: checking for xosd.h" >&5
8747 8748 8749 8750
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
8751
#line 8752 "configure"
8752 8753 8754 8755
#include "confdefs.h"
#include <xosd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8756
{ (eval echo configure:8757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770
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
8771 8772
  echo "$ac_t""yes" 1>&6
  have_xosd="true"
8773 8774 8775 8776 8777
else
  echo "$ac_t""no" 1>&6
have_xosd="false"
fi

8778
  if test "x${have_xosd}" = "xtrue"
8779
  then
8780
    PLUGINS="${PLUGINS} visualization/xosd/xosd"
8781 8782 8783 8784
    xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd"
  fi
fi

8785 8786 8787
# Check whether --enable-lirc or --disable-lirc was given.
if test "${enable_lirc+set}" = set; then
  enableval="$enable_lirc"
8788 8789
  :
fi
8790

8791
if test "x${enable_lirc}" = "xyes"
8792
then
8793 8794
  ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
8795
echo "configure:8796: checking for lirc/lirc_client.h" >&5
8796 8797 8798 8799
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
8800
#line 8801 "configure"
8801 8802
#include "confdefs.h"
#include <lirc/lirc_client.h>
8803 8804
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8805
{ (eval echo configure:8806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8806 8807 8808 8809 8810 8811 8812
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
8813
  cat conftest.$ac_ext >&5
8814 8815
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8816
fi
8817
rm -f conftest*
8818
fi
8819 8820 8821
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
8822
echo "configure:8823: checking for lirc_init in -llirc_client" >&5
8823 8824 8825
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
8826
else
8827
  ac_save_LIBS="$LIBS"
8828
LIBS="-llirc_client  $LIBS"
8829
cat > conftest.$ac_ext <<EOF
8830
#line 8831 "configure"
8831 8832 8833
#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
8834 8835 8836 8837 8838 8839 8840
    builtin and then its argument prototype would still apply.  */
char lirc_init();

int main() {
lirc_init()
; return 0; }
EOF
8841
if { (eval echo configure:8842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8842 8843
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
8844
else
8845 8846 8847 8848
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
8849
fi
8850 8851
rm -f conftest*
LIBS="$ac_save_LIBS"
8852

8853 8854 8855 8856
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_lirc="true"
8857
else
8858 8859
  echo "$ac_t""no" 1>&6
have_lirc="false"
8860 8861
fi

8862 8863 8864 8865
else
  echo "$ac_t""no" 1>&6
have_lirc="false"
fi
8866

8867
  if test "x${have_lirc}" = "xtrue"
8868
  then
8869
    PLUGINS="${PLUGINS} control/lirc/lirc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8870
    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
8871 8872 8873
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8874 8875 8876
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
8877 8878
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8879 8880 8881 8882 8883


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

8887
  case "x${with_words}" in
8888
    xbig)
Sam Hocevar's avatar
 
Sam Hocevar committed
8889 8890 8891 8892 8893 8894
      ac_cv_c_bigendian=yes
      ;;
    xlittle)
      ac_cv_c_bigendian=no
      ;;
    *)
8895
                  echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
8896
echo "configure:8897: checking whether the byte order is big-endian" >&5
8897 8898
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
8899
else
8900
  ac_cv_c_bigendian="unknown"
Sam Hocevar's avatar
 
Sam Hocevar committed
8901 8902 8903 8904 8905 8906 8907 8908 8909
        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
8910
        
Sam Hocevar's avatar
 
Sam Hocevar committed
8911
        if test -f conftest.c
8912
        then 
Sam Hocevar's avatar
 
Sam Hocevar committed
8913
          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
Sam Hocevar's avatar
 
Sam Hocevar committed
8914 8915 8916 8917
              && test -f conftest.o
          then
            if test "`strings conftest.o | grep BIGenDianSyS`"
            then
8918
              ac_cv_c_bigendian="yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8919 8920 8921
            fi
            if test "`strings conftest.o | grep LiTTleEnDian`"
            then
8922
              ac_cv_c_bigendian="no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8923 8924 8925
            fi
          fi
        fi
8926
      
8927
fi
8928 8929

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8930
      if test "x${ac_cv_c_bigendian}" = "xunknown"
Sam Hocevar's avatar
 
Sam Hocevar committed
8931
      then
8932
        { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
8933 8934 8935
      fi
      ;;
  esac
8936
if test "${ac_cv_c_bigendian}" = "yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8937
then
8938
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8939
#define WORDS_BIGENDIAN 1
8940
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8941 8942 8943

fi

Sam Hocevar's avatar
Sam Hocevar committed
8944 8945
PROFILING=0

Sam Hocevar's avatar
 
Sam Hocevar committed
8946 8947 8948 8949
GPROF=0
# Check whether --enable-gprof or --disable-gprof was given.
if test "${enable_gprof+set}" = set; then
  enableval="$enable_gprof"
8950
   if test "x${enable_gprof}" = "xyes"
Sam Hocevar's avatar
Sam Hocevar committed
8951 8952 8953 8954 8955
  then
    GPROF=1
    PROFILING="gprof"
  fi

8956 8957
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8958 8959 8960 8961 8962

CPROF=0
# Check whether --enable-cprof or --disable-cprof was given.
if test "${enable_cprof+set}" = set; then
  enableval="$enable_cprof"
8963
   if test "x${enable_cprof}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8964
  then
8965
    save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8966
    CPROF=1
Sam Hocevar's avatar
Sam Hocevar committed
8967
    PROFILING="cprof"
Sam Hocevar's avatar
 
Sam Hocevar committed
8968 8969
  fi

8970 8971
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8972 8973 8974 8975

# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
8976
   if test "x${enable_pth}" = "xyes"; then
8977
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
8978
echo "configure:8979: checking for pth_init in -lpth" >&5
8979 8980 8981
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
8982
else
8983
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8984
LIBS="-lpth  $LIBS"
8985
cat > conftest.$ac_ext <<EOF
8986
#line 8987 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8987
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8988 8989
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8990 8991 8992 8993 8994 8995 8996
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
8997
if { (eval echo configure:8998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016
  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
9017 9018 9019

  LIBS="-lpth $LIBS"

9020 9021
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
9022 9023
fi

9024
    cat > conftest.$ac_ext <<EOF
9025
#line 9026 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
9026 9027
#include "confdefs.h"
#include <pth.h>
9028
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9029 9030
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
9031 9032 9033
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9034
#define PTH_INIT_IN_PTH_H 1
9035
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9036 9037 9038 9039 9040 9041 9042

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


9043 9044
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
9045 9046 9047 9048

# Check whether --enable-st or --disable-st was given.
if test "${enable_st+set}" = set; then
  enableval="$enable_st"
9049
   if test "x${enable_st}" = "xyes"; then
9050
    echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
9051
echo "configure:9052: checking for st_init in -lst" >&5
9052 9053 9054
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
9055
else
9056
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
9057
LIBS="-lst  $LIBS"
9058
cat > conftest.$ac_ext <<EOF
9059
#line 9060 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
9060
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
9061 9062
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
9063 9064 9065 9066 9067 9068 9069
    builtin and then its argument prototype would still apply.  */
char st_init();

int main() {
st_init()
; return 0; }
EOF
9070
if { (eval echo configure:9071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089
  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
9090 9091

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

9093 9094
else
  echo "$ac_t""no" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
9095
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9096

9097
    cat > conftest.$ac_ext <<EOF
9098
#line 9099 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
9099 9100
#include "confdefs.h"
#include <st.h>
9101
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9102 9103
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "st_init" >/dev/null 2>&1; then
9104 9105 9106
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9107
#define ST_INIT_IN_ST_H 1
9108
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9109 9110 9111

    THREAD_LIB="-lst"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9112
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9113
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
9114

Sam Hocevar's avatar
 
Sam Hocevar committed
9115

9116 9117
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
9118

Sam Hocevar's avatar
Sam Hocevar committed
9119 9120
vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}"
plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}"
Sam Hocevar's avatar
 
Sam Hocevar committed
9121

9122 9123 9124 9125 9126 9127 9128
MOZILLA=0
# Check whether --enable-mozilla or --disable-mozilla was given.
if test "${enable_mozilla+set}" = set; then
  enableval="$enable_mozilla"
  :
fi

9129
if test "x${enable_mozilla}" = "xyes"
9130 9131 9132 9133
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
9134
echo "configure:9135: checking for $ac_word" >&5
9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166
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

9167
  if test "x${MOZILLA_CONFIG}" != "xno"
9168
  then
9169 9170 9171
    if test "x${SYS}" != "xmingw32"; then
      LDFLAGS="${save_LDFLAGS} -L${x_libraries}"
      echo $ac_n "checking for XtStrings in -lXt""... $ac_c" 1>&6
9172
echo "configure:9173: checking for XtStrings in -lXt" >&5
9173 9174 9175 9176 9177 9178 9179
ac_lib_var=`echo Xt'_'XtStrings | 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="-lXt  $LIBS"
cat > conftest.$ac_ext <<EOF
9180
#line 9181 "configure"
9181 9182 9183 9184 9185 9186 9187 9188 9189 9190
#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 XtStrings();

int main() {
XtStrings()
; return 0; }
EOF
9191
if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214
  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
  
        mozilla_LDFLAGS="${mozilla_LDFLAGS} -L${x_libraries} -lXt"
      
else
  echo "$ac_t""no" 1>&6
fi

      LDFLAGS="${save_LDFLAGS}"
    fi
9215 9216
    MOZILLA=1
    mozilla_CFLAGS="${mozilla_CFLAGS} `${MOZILLA_CONFIG} --cflags plugin java --defines | xargs`"
9217
        mozilla_LDFLAGS="${mozilla_LDFLAGS} `${MOZILLA_CONFIG} --libs | sed 's#-I\(.*\)/mozilla/\([^ ]*\)#-I\1/\2 -I\1/mozilla/\2#g'`"
9218 9219 9220
  fi
fi

9221 9222 9223
# Check whether --enable-plugins or --disable-plugins was given.
if test "${enable_plugins+set}" = set; then
  enableval="$enable_plugins"
9224
  if test "x${enable_plugins}" = "xno"
9225 9226 9227 9228
   then
     BUILTINS="${BUILTINS} ${PLUGINS}"
     PLUGINS=
   fi
9229 9230
fi

9231

9232
if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
9233 9234 9235 9236 9237 9238 9239
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

9240
cat >> confdefs.h <<EOF
9241
#define VERSION_MESSAGE "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN"
9242
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9243

9244
cat >> confdefs.h <<EOF
9245
#define COPYRIGHT_MESSAGE "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN"
9246
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9247

Sam Hocevar's avatar
Sam Hocevar committed
9248
cat >> confdefs.h <<EOF
9249
#define CONFIGURE_LINE "${CONFIGURE_LINE}"
Sam Hocevar's avatar
Sam Hocevar committed
9250 9251
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
9252

Sam Hocevar's avatar
 
Sam Hocevar committed
9253
VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
9254
cat >> confdefs.h <<EOF
9255
#define MODULE_SUFFIX "__${VLC_SYMBOL}"
9256
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9257

9258
cat >> confdefs.h <<EOF
9259
#define MODULE_SYMBOL ${VLC_SYMBOL}
9260
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9261 9262 9263 9264 9265 9266 9267


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

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


Sam Hocevar's avatar
Sam Hocevar committed
9268 9269 9270 9271
CPPFLAGS="${save_CPPFLAGS}"
CFLAGS="${save_CFLAGS}"
LDFLAGS="${save_LDFLAGS}"

9272
libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
9273
for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} ${libdir}/vlc/${i}.a `eval echo '$'{${i}_LDFLAGS}`" ; done
9274 9275


9276 9277


Sam Hocevar's avatar
Sam Hocevar committed
9278

9279

9280 9281 9282 9283 9284





Henri Fallon's avatar
 
Henri Fallon committed
9285 9286 9287



Christophe Massiot's avatar
Christophe Massiot committed
9288 9289 9290



Sam Hocevar's avatar
 
Sam Hocevar committed
9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304














Sam Hocevar's avatar
 
Sam Hocevar committed
9305

Sam Hocevar's avatar
 
Sam Hocevar committed
9306

Sam Hocevar's avatar
 
Sam Hocevar committed
9307 9308 9309 9310




Sam Hocevar's avatar
 
Sam Hocevar committed
9311

Sam Hocevar's avatar
 
Sam Hocevar committed
9312 9313


9314

Sam Hocevar's avatar
 
Sam Hocevar committed
9315

Sam Hocevar's avatar
 
Sam Hocevar committed
9316

Sam Hocevar's avatar
 
Sam Hocevar committed
9317

Sam Hocevar's avatar
 
Sam Hocevar committed
9318

Sam Hocevar's avatar
 
Sam Hocevar committed
9319

Sam Hocevar's avatar
 
Sam Hocevar committed
9320 9321 9322



Sam Hocevar's avatar
 
Sam Hocevar committed
9323

Sam Hocevar's avatar
 
Sam Hocevar committed
9324

Sam Hocevar's avatar
 
Sam Hocevar committed
9325

Sam Hocevar's avatar
 
Sam Hocevar committed
9326

Sam Hocevar's avatar
 
Sam Hocevar committed
9327

Sam Hocevar's avatar
 
Sam Hocevar committed
9328 9329


9330

Sam Hocevar's avatar
 
Sam Hocevar committed
9331

Sam Hocevar's avatar
 
Sam Hocevar committed
9332 9333 9334



9335 9336


Sam Hocevar's avatar
 
Sam Hocevar committed
9337 9338 9339



Stéphane Borel's avatar
Stéphane Borel committed
9340 9341 9342



9343

9344

9345

Sam Hocevar's avatar
 
Sam Hocevar committed
9346 9347 9348 9349 9350 9351 9352 9353 9354









9355

Sam Hocevar's avatar
 
Sam Hocevar committed
9356 9357


Sam Hocevar's avatar
 
Sam Hocevar committed
9358

Sam Hocevar's avatar
 
Sam Hocevar committed
9359

9360 9361


Sam Hocevar's avatar
 
Sam Hocevar committed
9362 9363


9364 9365


9366 9367


Sam Hocevar's avatar
 
Sam Hocevar committed
9368

Gildas Bazin's avatar
 
Gildas Bazin committed
9369

Gildas Bazin's avatar
 
Gildas Bazin committed
9370

9371 9372 9373



9374

9375

9376 9377


9378

9379

Sam Hocevar's avatar
 
Sam Hocevar committed
9380

9381 9382
trap '' 1 2 15
cat > confcache <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9383 9384
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
9385 9386
# 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
9387
#
9388 9389 9390 9391 9392 9393 9394 9395
# 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
9396
#
9397
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9398 9399 9400 9401 9402
# 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.
9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419
(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
9420
  if test -w $cache_file; then
9421 9422
    echo "updating cache $cache_file"
    cat confcache > $cache_file
Sam Hocevar's avatar
 
Sam Hocevar committed
9423 9424 9425
  else
    echo "not updating unwritable cache $cache_file"
  fi
9426
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9427
rm -f confcache
9428

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

Sam Hocevar's avatar
 
Sam Hocevar committed
9431 9432 9433
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9434

9435 9436 9437
# 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
9438
if test "x$srcdir" = x.; then
9439
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Sam Hocevar's avatar
 
Sam Hocevar committed
9440 9441
fi

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

9444
DEFS=-DHAVE_CONFIG_H
9445

9446
# Without the "./", some shells look in PATH for config.status.
9447 9448
: ${CONFIG_STATUS=./config.status}

9449 9450 9451 9452 9453 9454 9455 9456
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`:
9457
#
9458
# $0 $ac_configure_args
9459
#
9460 9461
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
9462

9463 9464
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
9465
do
9466 9467 9468 9469 9470 9471 9472 9473 9474 9475
  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 ;;
9476 9477 9478
  esac
done

9479 9480
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
9481

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

9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568
# 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
9569
s%@MOZILLA_CONFIG@%$MOZILLA_CONFIG%g
9570 9571
s%@DATA_PATH@%$DATA_PATH%g
s%@PLUGIN_PATH@%$PLUGIN_PATH%g
9572
s%@libvlc_LDFLAGS@%$libvlc_LDFLAGS%g
9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589
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
9590
s%@MOZILLA@%$MOZILLA%g
9591 9592 9593 9594 9595
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
9596
s%@mozilla_CFLAGS@%$mozilla_CFLAGS%g
9597 9598
s%@a52_CFLAGS@%$a52_CFLAGS%g
s%@arts_CFLAGS@%$arts_CFLAGS%g
9599
s%@i420_yuy2_mmx_CFLAGS@%$i420_yuy2_mmx_CFLAGS%g
9600 9601
s%@dvd_CFLAGS@%$dvd_CFLAGS%g
s%@dvdread_CFLAGS@%$dvdread_CFLAGS%g
9602
s%@dvdplay_CFLAGS@%$dvdplay_CFLAGS%g
9603
s%@ts_dvbpsi_CFLAGS@%$ts_dvbpsi_CFLAGS%g
9604 9605
s%@directx_CFLAGS@%$directx_CFLAGS%g
s%@esd_CFLAGS@%$esd_CFLAGS%g
9606
s%@familiar_CFLAGS@%$familiar_CFLAGS%g
9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623
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
9624
s%@mozilla_LDFLAGS@%$mozilla_LDFLAGS%g
9625 9626 9627 9628 9629
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
9630
s%@i420_rgb_LDFLAGS@%$i420_rgb_LDFLAGS%g
9631 9632 9633 9634
s%@directx_LDFLAGS@%$directx_LDFLAGS%g
s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
9635
s%@dvdplay_LDFLAGS@%$dvdplay_LDFLAGS%g
9636
s%@ts_dvbpsi_LDFLAGS@%$ts_dvbpsi_LDFLAGS%g
9637
s%@esd_LDFLAGS@%$esd_LDFLAGS%g
9638
s%@familiar_LDFLAGS@%$familiar_LDFLAGS%g
9639
s%@distort_LDFLAGS@%$distort_LDFLAGS%g
9640
s%@ffmpeg_LDFLAGS@%$ffmpeg_LDFLAGS%g
9641
s%@mp4_LDFLAGS@%$mp4_LDFLAGS%g
9642 9643 9644 9645
s%@ggi_LDFLAGS@%$ggi_LDFLAGS%g
s%@glide_LDFLAGS@%$glide_LDFLAGS%g
s%@gnome_LDFLAGS@%$gnome_LDFLAGS%g
s%@gtk_LDFLAGS@%$gtk_LDFLAGS%g
9646
s%@http_LDFLAGS@%$http_LDFLAGS%g
9647 9648 9649 9650 9651
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
9652
s%@ipv6_LDFLAGS@%$ipv6_LDFLAGS%g
9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668
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
9669
s%@xosd_LDFLAGS@%$xosd_LDFLAGS%g
9670 9671

CEOF
9672
EOF
9673

9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695
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"
9696
    else
9697
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9698
    fi
9699 9700 9701
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
9702
  fi
9703 9704 9705 9706 9707
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
9708

9709
cat >> $CONFIG_STATUS <<EOF
9710

9711
CONFIG_FILES=\${CONFIG_FILES-"Makefile.config Makefile.opts po/Makefile.in vlc-config"}
9712 9713 9714 9715 9716 9717 9718 9719
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" ;;
9720 9721
  esac

9722
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9723

9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734
  # 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
9735

9736 9737 9738 9739 9740
  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" ;;
9741
  *) # Relative path.
9742 9743
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
9744
  esac
9745

9746 9747 9748 9749
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac
9750

9751 9752 9753 9754 9755 9756 9757 9758
  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
9759

9760 9761 9762 9763 9764 9765 9766 9767 9768
  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*
9769 9770 9771 9772 9773

# 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.
9774 9775 9776 9777 9778 9779 9780
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'
9781
ac_uC=' '
9782 9783 9784 9785 9786 9787 9788 9789 9790 9791 9792 9793 9794 9795 9796
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
9797
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9798 9799 9800 9801
  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" ;;
9802 9803
  esac

9804 9805 9806 9807 9808 9809 9810 9811 9812 9813 9814 9815 9816 9817 9818 9819 9820 9821 9822 9823 9824 9825
  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
9826 9827 9828 9829

# 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.
9830 9831 9832 9833 9834 9835
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.
9836 9837

rm -f conftest.tail
9838
while :
9839
do
9840 9841 9842 9843 9844 9845
  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
9846
  echo 'CEOF
9847 9848 9849 9850 9851 9852 9853
  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
9854
done
9855 9856 9857 9858 9859 9860 9861 9862 9863 9864
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
9865
  else
9866 9867 9868 9869 9870
    # 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"
9871
    fi
9872 9873
    rm -f $ac_file
    mv conftest.h $ac_file
9874
  fi
9875
fi; done
Sam Hocevar's avatar
 
Sam Hocevar committed
9876

9877 9878 9879 9880 9881 9882 9883
EOF
cat >> $CONFIG_STATUS <<EOF


EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in $CONFIG_FILES; do
Sam Hocevar's avatar
 
Sam Hocevar committed
9884 9885 9886 9887 9888 9889 9890 9891 9892 9893 9894 9895 9896 9897 9898 9899 9900 9901 9902 9903 9904 9905 9906 9907 9908 9909 9910
        # 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
9911
      done
9912

9913 9914
exit 0
EOF
9915
chmod +x $CONFIG_STATUS
9916 9917
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
9918

9919
chmod a+x vlc-config
9920

9921
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
9922
vlc configuration
Sam Hocevar's avatar
 
Sam Hocevar committed
9923
--------------------
Sam Hocevar's avatar
 
Sam Hocevar committed
9924
vlc version           : ${VERSION}
Sam Hocevar's avatar
 
Sam Hocevar committed
9925 9926
system                : ${SYS}
architecture          : ${ARCH}
9927
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9928
tuning                : ${TUNING}
9929
debug mode            : ${DEBUG}
Sam Hocevar's avatar
 
Sam Hocevar committed
9930
release               : ${RELEASE}
Sam Hocevar's avatar
Sam Hocevar committed
9931
profiling             : ${PROFILING}
Sam Hocevar's avatar
 
Sam Hocevar committed
9932
need builtin getopt   : ${NEED_GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
9933
built-in modules      :${BUILTINS}
9934
plug-in modules       :${PLUGINS}
9935
mozilla plugin        : ${MOZILLA}
Sam Hocevar's avatar
 
Sam Hocevar committed
9936
vlc aliases           :${ALIASES}
Sam Hocevar's avatar
 
Sam Hocevar committed
9937

Sam Hocevar's avatar
 
Sam Hocevar committed
9938 9939
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
9940

9941
To build vlc and its plugins, type \`${VLC_MAKE}'.
Sam Hocevar's avatar
 
Sam Hocevar committed
9942
"
9943