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

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

Sam Hocevar's avatar
 
Sam Hocevar committed
10 11
# Defaults:
ac_help=
12
ac_default_prefix=/usr/local
Sam Hocevar's avatar
 
Sam Hocevar committed
13 14 15 16 17 18 19 20 21 22 23 24 25
# Any additions from configure.in:
ac_help="$ac_help
  --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)"
ac_help="$ac_help
  --disable-mmx           Disable MMX optimizations (default enabled for x86)"
ac_help="$ac_help
  --enable-altivec        Enable altivec optimizations (default disabled since it is broken)"
ac_help="$ac_help
  --enable-debug          Enable debug mode (default disabled)"
ac_help="$ac_help
  --enable-stats          Enable printing of statistics (default disabled)"
ac_help="$ac_help
  --enable-trace          Enable trace mode (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
26 27
ac_help="$ac_help
  --enable-profiling      Enable gprof profiling (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
28 29
ac_help="$ac_help
  --disable-optimizations Disable compiler optimizations (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
30 31 32 33
ac_help="$ac_help
  --enable-pth            Enable GNU Pth support (default disabled)"
ac_help="$ac_help
  --disable-css           Disable DVD CSS decryption (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
34 35 36 37 38 39
ac_help="$ac_help
  --disable-dummy         dummy module (default enabled)"
ac_help="$ac_help
  --disable-null          Null module (default enabled)"
ac_help="$ac_help
  --disable-rc            rc module (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53
ac_help="$ac_help
  --disable-dsp           Linux /dev/dsp support (default enabled)"
ac_help="$ac_help
  --enable-esd            Esound library support (default disabled)"
ac_help="$ac_help
  --enable-darwin         Darwin sound support (default disabled)"
ac_help="$ac_help
  --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)"
ac_help="$ac_help
  --enable-fb             Linux framebuffer support (default disabled)"
ac_help="$ac_help
  --with-ggi[=name]       GGI support (default disabled)"
ac_help="$ac_help
  --with-sdl[=name]       SDL support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
54 55
ac_help="$ac_help
  --with-directx[=name]   Windows DirectX support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
ac_help="$ac_help
  --with-glide[=name]     Glide (3dfx) support (default disabled)"
ac_help="$ac_help
  --enable-ncurses        ncurses 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-gnome          Gnome interface support (default disabled)"
ac_help="$ac_help
  --disable-gtk           Gtk+ support (default enabled)"
ac_help="$ac_help
  --disable-x11           X11 support (default enabled)"
ac_help="$ac_help
  --disable-xvideo        XVideo support (default enabled)"
ac_help="$ac_help
  --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)"
74 75 76 77

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
Sam Hocevar's avatar
 
Sam Hocevar committed
78 79
build=NONE
cache_file=./config.cache
80
exec_prefix=NONE
Sam Hocevar's avatar
 
Sam Hocevar committed
81
host=NONE
82
no_create=
Sam Hocevar's avatar
 
Sam Hocevar committed
83
nonopt=NONE
84 85 86 87 88 89 90 91
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
Sam Hocevar's avatar
 
Sam Hocevar committed
92
target=NONE
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

Sam Hocevar's avatar
 
Sam Hocevar committed
109 110 111 112 113 114
# 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
115 116 117 118

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

120 121 122 123 124 125 126
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
127 128 129 130
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
131 132 133

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

Sam Hocevar's avatar
 
Sam Hocevar committed
134
  case "$ac_option" in
135 136 137 138

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
139
    bindir="$ac_optarg" ;;
140 141

  -build | --build | --buil | --bui | --bu)
Sam Hocevar's avatar
 
Sam Hocevar committed
142
    ac_prev=build ;;
143
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
144
    build="$ac_optarg" ;;
145 146 147 148 149 150

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
151
    cache_file="$ac_optarg" ;;
152 153 154 155 156

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
157
    datadir="$ac_optarg" ;;
158 159

  -disable-* | --disable-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
160
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
161
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
162 163 164 165 166
    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" ;;
167 168

  -enable-* | --enable-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
169
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
170
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
171 172 173 174 175 176
    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
      *=*) ;;
177 178
      *) ac_optarg=yes ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
179
    eval "enable_${ac_feature}='$ac_optarg'" ;;
180 181 182 183 184 185 186 187

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
188
    exec_prefix="$ac_optarg" ;;
189 190 191 192 193

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

Sam Hocevar's avatar
 
Sam Hocevar committed
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
  -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 ;;
248 249

  -host | --host | --hos | --ho)
Sam Hocevar's avatar
 
Sam Hocevar committed
250
    ac_prev=host ;;
251
  -host=* | --host=* | --hos=* | --ho=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
252
    host="$ac_optarg" ;;
253 254 255 256 257 258

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
259
    includedir="$ac_optarg" ;;
260 261 262 263

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
264
    infodir="$ac_optarg" ;;
265 266 267 268

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
269
    libdir="$ac_optarg" ;;
270 271 272 273 274 275

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
276
    libexecdir="$ac_optarg" ;;
277 278 279 280 281 282 283 284

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
285
    localstatedir="$ac_optarg" ;;
286 287 288 289

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
290
    mandir="$ac_optarg" ;;
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310

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

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

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

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
311
    oldincludedir="$ac_optarg" ;;
312 313 314 315

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
316
    prefix="$ac_optarg" ;;
317 318 319 320 321 322

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
323
    program_prefix="$ac_optarg" ;;
324 325 326 327 328 329

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
330
    program_suffix="$ac_optarg" ;;
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
347
    program_transform_name="$ac_optarg" ;;
348 349 350 351 352 353 354 355 356

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

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
357
    sbindir="$ac_optarg" ;;
358 359 360 361 362 363 364 365 366 367

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
368
    sharedstatedir="$ac_optarg" ;;
369 370 371 372

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
373
    site="$ac_optarg" ;;
374 375 376 377

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
378
    srcdir="$ac_optarg" ;;
379 380 381 382 383 384

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

  -target | --target | --targe | --targ | --tar | --ta | --t)
Sam Hocevar's avatar
 
Sam Hocevar committed
388
    ac_prev=target ;;
389
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
390
    target="$ac_optarg" ;;
391 392 393 394

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

Sam Hocevar's avatar
 
Sam Hocevar committed
395 396 397
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
398 399

  -with-* | --with-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
400
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
401
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
402 403 404
    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
405
    ac_package=`echo $ac_package| sed 's/-/_/g'`
Sam Hocevar's avatar
 
Sam Hocevar committed
406 407
    case "$ac_option" in
      *=*) ;;
408 409
      *) ac_optarg=yes ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
410
    eval "with_${ac_package}='$ac_optarg'" ;;
411 412

  -without-* | --without-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
413
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
414
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
415 416 417 418 419
    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" ;;
420 421 422 423 424 425 426 427 428 429

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

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
430
    x_includes="$ac_optarg" ;;
431 432 433 434 435 436

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

Sam Hocevar's avatar
 
Sam Hocevar committed
439
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
440 441 442
    ;;

  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
443 444 445 446 447 448 449
    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"
450 451 452 453 454 455
    ;;

  esac
done

if test -n "$ac_prev"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

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

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
473
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
474 475 476 477 478 479
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
480

Sam Hocevar's avatar
 
Sam Hocevar committed
481 482 483 484
# 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
485
do
Sam Hocevar's avatar
 
Sam Hocevar committed
486 487 488 489 490 491 492 493
  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" ;;
494 495 496
  esac
done

Sam Hocevar's avatar
 
Sam Hocevar committed
497 498 499 500 501 502 503 504 505
# 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
506

Sam Hocevar's avatar
 
Sam Hocevar committed
507 508 509 510
# 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
511

Sam Hocevar's avatar
 
Sam Hocevar committed
512 513 514
# 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=src/interface/main.c
515 516 517 518 519 520

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
Sam Hocevar's avatar
 
Sam Hocevar committed
521
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
522 523 524 525 526 527 528 529 530 531
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
532
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
533
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
534
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
535 536
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
537
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
538 539 540 541 542 543 544 545 546 547 548

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
549
    echo "loading site script $ac_site_file"
550 551 552 553 554
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
555 556
  echo "loading cache $cache_file"
  . $cache_file
557
else
Sam Hocevar's avatar
 
Sam Hocevar committed
558 559
  echo "creating cache $cache_file"
  > $cache_file
560 561 562
fi

ac_ext=c
Sam Hocevar's avatar
 
Sam Hocevar committed
563
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
564
ac_cpp='$CPP $CPPFLAGS'
Sam Hocevar's avatar
 
Sam Hocevar committed
565 566 567 568 569 570 571 572 573 574 575 576 577 578
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
579
else
Sam Hocevar's avatar
 
Sam Hocevar committed
580
  ac_n= ac_c='\c' ac_t=
581 582
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
583 584


585

586 587 588 589 590 591 592 593 594 595 596 597 598
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
599
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
600
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
601 602 603 604
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.

605 606

# Make sure we can run config.sub.
Sam Hocevar's avatar
 
Sam Hocevar committed
607 608 609 610 611
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
612
echo "configure:613: checking host system type" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631

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

632

Sam Hocevar's avatar
 
Sam Hocevar committed
633
VLC_VERSION=0.2.80
634

Sam Hocevar's avatar
 
Sam Hocevar committed
635
VLC_CODENAME=Ourumov
636

Sam Hocevar's avatar
 
Sam Hocevar committed
637

Sam Hocevar's avatar
 
Sam Hocevar committed
638 639
save_CFLAGS="${CFLAGS}"

Sam Hocevar's avatar
 
Sam Hocevar committed
640
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
641
echo "configure:642: checking whether ${MAKE-make} sets \${MAKE}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
642 643 644
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
645
else
Sam Hocevar's avatar
 
Sam Hocevar committed
646
  cat > conftestmake <<\EOF
647 648 649 650
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Sam Hocevar's avatar
 
Sam Hocevar committed
651
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
652 653 654 655 656
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
657
rm -f conftestmake
658 659
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
660
  echo "$ac_t""yes" 1>&6
661 662
  SET_MAKE=
else
Sam Hocevar's avatar
 
Sam Hocevar committed
663
  echo "$ac_t""no" 1>&6
664 665 666
  SET_MAKE="MAKE=${MAKE-make}"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
667
# Extract the first word of "gcc", so it can be a program name with args.
668
set dummy gcc; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
669
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
670
echo "configure:671: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
671 672
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
673 674 675 676
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
677 678 679 680 681 682 683 684 685 686
  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"
687 688
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
689
CC="$ac_cv_prog_CC"
690
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
691
  echo "$ac_t""$CC" 1>&6
692
else
Sam Hocevar's avatar
 
Sam Hocevar committed
693
  echo "$ac_t""no" 1>&6
694 695 696 697 698
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
699
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
700
echo "configure:701: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
701 702
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
703 704 705 706
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
707
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
708
  ac_prog_rejected=no
Sam Hocevar's avatar
 
Sam Hocevar committed
709 710 711 712 713 714 715 716 717 718 719 720 721
  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"
722 723 724 725
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
Sam Hocevar's avatar
 
Sam Hocevar committed
726
  if test $# -gt 0; then
727 728 729 730
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
Sam Hocevar's avatar
 
Sam Hocevar committed
731
    set dummy "$ac_dir/$ac_word" "$@"
732 733 734 735 736 737
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
738
CC="$ac_cv_prog_CC"
739
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
740
  echo "$ac_t""$CC" 1>&6
741
else
Sam Hocevar's avatar
 
Sam Hocevar committed
742
  echo "$ac_t""no" 1>&6
743 744
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
745 746 747 748 749 750
  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
751
echo "configure:752: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
752 753
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
754 755 756 757
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
758 759 760 761 762 763 764 765 766 767
  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"
768 769
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
770
CC="$ac_cv_prog_CC"
771
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
772
  echo "$ac_t""$CC" 1>&6
773
else
Sam Hocevar's avatar
 
Sam Hocevar committed
774
  echo "$ac_t""no" 1>&6
775
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
776 777 778 779
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
780 781
fi

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

Sam Hocevar's avatar
 
Sam Hocevar committed
785 786 787 788 789 790
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
791

Sam Hocevar's avatar
 
Sam Hocevar committed
792
cat > conftest.$ac_ext << EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
793

Sam Hocevar's avatar
 
Sam Hocevar committed
794
#line 795 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
795 796
#include "confdefs.h"

Sam Hocevar's avatar
 
Sam Hocevar committed
797 798
main(){return(0);}
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
799
if { (eval echo configure:800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
800 801 802 803
  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
804
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
805
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
806
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
807 808 809 810
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
811
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
812 813 814 815 816 817 818 819 820 821 822 823 824
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

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

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
830
echo "configure:831: checking whether we are using GNU C" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
831 832 833 834 835 836 837 838
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
839
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
840
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
841
else
Sam Hocevar's avatar
 
Sam Hocevar committed
842 843
  ac_cv_prog_gcc=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
844 845
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
846
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
847

Sam Hocevar's avatar
 
Sam Hocevar committed
848 849
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
850
else
Sam Hocevar's avatar
 
Sam Hocevar committed
851
  GCC=
Sam Hocevar's avatar
 
Sam Hocevar committed
852 853
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
854 855 856 857
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
858
echo "configure:859: checking whether ${CC-cc} accepts -g" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
859 860
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
861
else
Sam Hocevar's avatar
 
Sam Hocevar committed
862 863
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
864 865
  ac_cv_prog_cc_g=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
866
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
867
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
868 869
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
870
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
871 872

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
873
if test "$ac_test_CFLAGS" = set; then
Sam Hocevar's avatar
 
Sam Hocevar committed
874
  CFLAGS="$ac_save_CFLAGS"
875 876 877 878 879 880 881 882 883 884 885 886 887
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
888

Sam Hocevar's avatar
 
Sam Hocevar committed
889
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
890
echo "configure:891: checking how to run the C preprocessor" >&5
891 892 893 894 895
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
896 897 898 899 900 901
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"
902
  # On the NeXT, cc -E runs the code through the compiler's parser,
Sam Hocevar's avatar
 
Sam Hocevar committed
903 904
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
905
#line 906 "configure"
906 907
#include "confdefs.h"
#include <assert.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
908 909 910
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
911
{ (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
912 913
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
914 915
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
916 917
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
918
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
919 920 921
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
922
#line 923 "configure"
923
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
924 925 926 927
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
928
{ (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
929 930 931
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
932
else
Sam Hocevar's avatar
 
Sam Hocevar committed
933 934
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
935
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
936 937 938
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
939
#line 940 "configure"
940 941
#include "confdefs.h"
#include <assert.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
942 943 944
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
945
{ (eval echo configure:946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
946 947
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
948 949
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
950 951
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
952
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
953 954
  rm -rf conftest*
  CPP=/lib/cpp
955
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
956
rm -f conftest*
957
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
958
rm -f conftest*
959
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
960 961 962 963
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
964
else
Sam Hocevar's avatar
 
Sam Hocevar committed
965
  ac_cv_prog_CPP="$CPP"
966
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
967
echo "$ac_t""$CPP" 1>&6
968

Sam Hocevar's avatar
 
Sam Hocevar committed
969 970 971
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
972
echo "configure:973: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
973 974
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
975 976 977 978
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
979 980 981 982 983 984 985 986 987 988 989
  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
990 991
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
992
RANLIB="$ac_cv_prog_RANLIB"
Sam Hocevar's avatar
 
Sam Hocevar committed
993
if test -n "$RANLIB"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
994
  echo "$ac_t""$RANLIB" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
995
else
Sam Hocevar's avatar
 
Sam Hocevar committed
996
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
997 998
fi

999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
Sam Hocevar's avatar
 
Sam Hocevar committed
1011
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1012
echo "configure:1013: checking for a BSD compatible install" >&5
1013
if test -z "$INSTALL"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1014 1015
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1016
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1017
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
1018 1019
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
Sam Hocevar's avatar
 
Sam Hocevar committed
1020 1021
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1022 1023 1024 1025 1026
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
Sam Hocevar's avatar
 
Sam Hocevar committed
1027
        if test -f $ac_dir/$ac_prog; then
1028
	  if test $ac_prog = install &&
Sam Hocevar's avatar
 
Sam Hocevar committed
1029
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
Sam Hocevar's avatar
 
Sam Hocevar committed
1041
  IFS="$ac_save_IFS"
1042 1043 1044

fi
  if test "${ac_cv_path_install+set}" = set; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1045
    INSTALL="$ac_cv_path_install"
1046 1047 1048 1049 1050
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
Sam Hocevar's avatar
 
Sam Hocevar committed
1051
    INSTALL="$ac_install_sh"
1052 1053
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1054
echo "$ac_t""$INSTALL" 1>&6
1055 1056 1057 1058 1059

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1060
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1061 1062 1063

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1064 1065

echo $ac_n "checking for working const""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1066
echo "configure:1067: checking for working const" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1067 1068
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1069
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1070
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1071
#line 1072 "configure"
1072
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097

int main() {

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

  *t++ = 0;
1098
}
Sam Hocevar's avatar
 
Sam Hocevar committed
1099 1100 1101 1102
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
1103
}
Sam Hocevar's avatar
 
Sam Hocevar committed
1104 1105 1106 1107
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
1108
}
Sam Hocevar's avatar
 
Sam Hocevar committed
1109 1110 1111 1112
{ /* 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;
Sam Hocevar's avatar
 
Sam Hocevar committed
1113
}
Sam Hocevar's avatar
 
Sam Hocevar committed
1114 1115 1116 1117 1118 1119
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1120
if { (eval echo configure:1121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1121
  rm -rf conftest*
1122 1123
  ac_cv_c_const=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1124 1125 1126 1127
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
1128
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1129
rm -f conftest*
1130
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1131

Sam Hocevar's avatar
 
Sam Hocevar committed
1132 1133 1134 1135
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
1136 1137 1138 1139
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1140

Sam Hocevar's avatar
 
Sam Hocevar committed
1141
if test x${cross_compiling} != xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1142
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1143
echo "configure:1144: checking whether byte ordering is bigendian" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1144 1145
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1146 1147 1148
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
Sam Hocevar's avatar
 
Sam Hocevar committed
1149
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1150
#line 1151 "configure"
1151 1152 1153
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1154
int main() {
1155 1156 1157 1158

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
Sam Hocevar's avatar
 
Sam Hocevar committed
1159 1160
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1161
if { (eval echo configure:1162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1162
  rm -rf conftest*
1163
  # It does; now see whether it defined to BIG_ENDIAN or not.
Sam Hocevar's avatar
 
Sam Hocevar committed
1164
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1165
#line 1166 "configure"
1166 1167 1168
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1169
int main() {
1170 1171 1172 1173

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
Sam Hocevar's avatar
 
Sam Hocevar committed
1174 1175
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1176
if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1177
  rm -rf conftest*
1178 1179
  ac_cv_c_bigendian=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1180 1181 1182 1183
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
1184
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1185
rm -f conftest*
1186
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1187 1188
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1189
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1190
rm -f conftest*
1191 1192
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1193
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1194
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1195
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1196
#line 1197 "configure"
1197
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
1198
main () {
1199 1200 1201 1202 1203 1204 1205 1206 1207
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
Sam Hocevar's avatar
 
Sam Hocevar committed
1208
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1209
if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
1210
then
1211 1212
  ac_cv_c_bigendian=no
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1213 1214 1215 1216
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
1217
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1218
rm -fr conftest*
1219
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1220

1221 1222
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1223

Sam Hocevar's avatar
 
Sam Hocevar committed
1224 1225 1226
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = yes; then
  cat >> confdefs.h <<\EOF
1227 1228 1229 1230 1231
#define WORDS_BIGENDIAN 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1232
fi
1233 1234 1235

for ac_func in gettimeofday select strerror strtod strtol
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1236
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1237
echo "configure:1238: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1238 1239 1240 1241
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1242
#line 1243 "configure"
1243 1244
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1245
    which can conflict with char $ac_func(); below.  */
1246 1247 1248
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1249 1250 1251 1252
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
1253 1254 1255 1256 1257 1258 1259

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1263
; return 0; }
1264
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1265
if { (eval echo configure:1266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1266 1267 1268 1269 1270 1271 1272 1273 1274 1275
  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
1276

Sam Hocevar's avatar
 
Sam Hocevar committed
1277 1278 1279 1280 1281 1282 1283 1284 1285
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
1286 1287 1288 1289 1290
fi
done

for ac_func in setenv putenv
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1291
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1292
echo "configure:1293: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1293 1294
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1295
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1296
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1297
#line 1298 "configure"
1298 1299
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1300
    which can conflict with char $ac_func(); below.  */
1301 1302 1303
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1304 1305 1306 1307
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
1308 1309 1310 1311 1312 1313 1314

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1318
; return 0; }
1319
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1320
if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1321 1322 1323 1324 1325 1326 1327 1328 1329 1330
  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
1331

Sam Hocevar's avatar
 
Sam Hocevar committed
1332 1333 1334 1335 1336 1337 1338 1339 1340
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
1341 1342 1343
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1344
echo $ac_n "checking for connect""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1345
echo "configure:1346: checking for connect" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1346 1347
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1348
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1349
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1350
#line 1351 "configure"
1351 1352
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1353
    which can conflict with char connect(); below.  */
1354 1355 1356
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1357 1358 1359 1360
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
1361 1362 1363 1364 1365 1366 1367

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

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1391
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1392
echo "configure:1393: checking for connect in -lsocket" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1393 1394 1395
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
1396
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1397
  ac_save_LIBS="$LIBS"
1398
LIBS="-lsocket  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1399
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1400
#line 1401 "configure"
1401 1402 1403
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1404 1405 1406 1407 1408 1409 1410
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1411
if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425
  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
1426
  LIB="${LIB} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
1427 1428
else
  echo "$ac_t""no" 1>&6
1429 1430
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1431

1432 1433
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1434
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1435
echo "configure:1436: checking for gethostbyname" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1436 1437
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1438
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1439
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1440
#line 1441 "configure"
1441 1442
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1443
    which can conflict with char gethostbyname(); below.  */
1444 1445 1446
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1447 1448 1449 1450
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
1451 1452 1453 1454 1455 1456 1457

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1461 1462
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1463
if { (eval echo configure:1464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476
  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
1477 1478
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1479
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1480

Sam Hocevar's avatar
 
Sam Hocevar committed
1481
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1482
echo "configure:1483: checking for gethostbyname in -lnsl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1483 1484 1485
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
1486
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1487
  ac_save_LIBS="$LIBS"
1488
LIBS="-lnsl  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1489
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1490
#line 1491 "configure"
1491 1492 1493
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1494 1495 1496 1497 1498 1499 1500
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1501
if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515
  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
1516
  LIB="${LIB} -lnsl"
Sam Hocevar's avatar
 
Sam Hocevar committed
1517 1518
else
  echo "$ac_t""no" 1>&6
1519 1520
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1521

1522 1523
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1524
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1525
echo "configure:1526: checking for nanosleep" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1526 1527
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1528
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1529
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1530
#line 1531 "configure"
1531 1532
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1533
    which can conflict with char nanosleep(); below.  */
1534 1535 1536
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1537 1538 1539 1540
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
1541 1542 1543 1544 1545 1546 1547

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1551 1552
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1553
if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566
  rm -rf conftest*
  eval "ac_cv_func_nanosleep=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_nanosleep=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
  echo "$ac_t""yes" 1>&6
1567 1568
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1569
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1570

Sam Hocevar's avatar
 
Sam Hocevar committed
1571
  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1572
echo "configure:1573: checking for nanosleep in -lrt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1573 1574 1575
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
1576
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1577
  ac_save_LIBS="$LIBS"
1578
LIBS="-lrt  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1579
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1580
#line 1581 "configure"
1581 1582 1583
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1584 1585 1586 1587 1588 1589 1590
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1591
if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605
  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
1606
  LIB="${LIB} -lrt"
1607
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1608
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1609

Sam Hocevar's avatar
 
Sam Hocevar committed
1610
    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1611
echo "configure:1612: checking for nanosleep in -lposix4" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1612 1613 1614
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
1615
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1616
  ac_save_LIBS="$LIBS"
1617
LIBS="-lposix4  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1618
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1619
#line 1620 "configure"
1620 1621 1622
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1623 1624 1625 1626 1627 1628 1629
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1630
if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644
  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
1645
  LIB="${LIB} -lposix4"
Sam Hocevar's avatar
 
Sam Hocevar committed
1646 1647
else
  echo "$ac_t""no" 1>&6
1648 1649
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1650
  
1651 1652
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1653

1654 1655 1656 1657
fi

for ac_func in usleep
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1658
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1659
echo "configure:1660: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1660 1661 1662 1663
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1664
#line 1665 "configure"
1665 1666
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1667
    which can conflict with char $ac_func(); below.  */
1668 1669 1670
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1671 1672 1673 1674
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
1675 1676 1677 1678 1679

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1685
; return 0; }
1686
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1687
if { (eval echo configure:1688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1688 1689 1690 1691 1692 1693 1694 1695 1696 1697
  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
1698

Sam Hocevar's avatar
 
Sam Hocevar committed
1699 1700 1701 1702 1703 1704 1705 1706 1707
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
1708 1709 1710
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1711
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1712
echo "configure:1713: checking for inet_aton" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1713 1714
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1715
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1716
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1717
#line 1718 "configure"
1718 1719
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1720
    which can conflict with char inet_aton(); below.  */
1721 1722 1723
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1724 1725 1726 1727
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
1728 1729 1730 1731 1732 1733 1734

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1738 1739
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1740
if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753
  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
1754 1755
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1756
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1757

Sam Hocevar's avatar
 
Sam Hocevar committed
1758
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1759
echo "configure:1760: checking for inet_aton in -lresolv" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1760 1761 1762
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
1763
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1764
  ac_save_LIBS="$LIBS"
1765
LIBS="-lresolv  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1766
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1767
#line 1768 "configure"
1768 1769 1770
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1771 1772 1773 1774 1775 1776 1777
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1778
if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792
  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
1793
  LIB="${LIB} -lresolv"
Sam Hocevar's avatar
 
Sam Hocevar committed
1794 1795
else
  echo "$ac_t""no" 1>&6
1796 1797
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1798

1799 1800
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1801 1802
for ac_func in vasprintf
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1803
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1804
echo "configure:1805: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1805 1806 1807 1808
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1809
#line 1810 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1810 1811
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1812
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1813 1814 1815
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1816 1817 1818 1819
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1820 1821 1822 1823 1824 1825 1826

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1830
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1831
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1832
if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1833 1834 1835 1836 1837 1838 1839 1840 1841 1842
  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
1843

Sam Hocevar's avatar
 
Sam Hocevar committed
1844 1845 1846 1847 1848 1849 1850 1851 1852
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
1853 1854 1855
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1856 1857
for ac_func in swab
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1858
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1859
echo "configure:1860: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1860 1861 1862 1863
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1864
#line 1865 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1887
if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

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


for ac_func in sigrelse
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1915
echo "configure:1916: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1916 1917 1918 1919
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1920
#line 1921 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1921 1922
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1923
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1924 1925 1926
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1927 1928 1929 1930
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1931 1932 1933 1934 1935 1936 1937

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1941
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1942
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1943
if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1944 1945 1946 1947 1948 1949 1950 1951 1952 1953
  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
1954

Sam Hocevar's avatar
 
Sam Hocevar committed
1955 1956 1957 1958 1959 1960 1961 1962 1963
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
1964 1965 1966
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1967 1968

echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1969
echo "configure:1970: checking for getopt_long" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1970 1971
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
1972
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1973
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1974
#line 1975 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1975 1976
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1977
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1978 1979 1980
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1981 1982 1983 1984
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1985 1986 1987 1988 1989 1990 1991

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1995 1996
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1997
if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
  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
2012 2013 2014 2015
#define HAVE_GETOPT_LONG 1
EOF

else
Sam Hocevar's avatar
 
Sam Hocevar committed
2016 2017 2018
  echo "$ac_t""no" 1>&6
 # FreeBSD has a gnugetopt library for this:
  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2019
echo "configure:2020: checking for getopt_long in -lgnugetopt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2020 2021 2022
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
2023
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2024
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2025
LIBS="-lgnugetopt  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2026
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2027
#line 2028 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2028 2029 2030
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2031 2032 2033 2034 2035 2036 2037
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2038
if { (eval echo configure:2039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053
  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
2054 2055
#define HAVE_GETOPT_LONG 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2056
 LIB="${LIB} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
2057
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2058 2059
  echo "$ac_t""no" 1>&6
GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
2060 2061 2062 2063
fi

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2064 2065 2066


for ac_hdr in unistd.h
2067
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2068 2069
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2070
echo "configure:2071: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2071 2072 2073 2074
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2075
#line 2076 "configure"
2076
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2077 2078 2079
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2080
{ (eval echo configure:2081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2081 2082 2083 2084 2085 2086 2087
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
2088
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2089 2090
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2091
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2092
rm -f conftest*
2093
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2094 2095 2096 2097 2098
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
2099
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2100 2101 2102
 
else
  echo "$ac_t""no" 1>&6
2103 2104 2105 2106 2107
fi
done

for ac_func in getpagesize
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2108
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2109
echo "configure:2110: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2110 2111 2112 2113
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2114
#line 2115 "configure"
2115 2116
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
2117
    which can conflict with char $ac_func(); below.  */
2118 2119 2120
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2121 2122 2123 2124
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
2125 2126 2127 2128 2129 2130 2131

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

Sam Hocevar's avatar
 
Sam Hocevar committed
2135
; return 0; }
2136
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2137
if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2138 2139 2140 2141 2142 2143 2144 2145 2146 2147
  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
2148

Sam Hocevar's avatar
 
Sam Hocevar committed
2149 2150 2151 2152 2153 2154 2155 2156 2157
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
2158 2159 2160
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2161
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2162
echo "configure:2163: checking for working mmap" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2163 2164
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2165 2166 2167 2168
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2169
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2170
#line 2171 "configure"
2171
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2172

2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184
/* 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
Sam Hocevar's avatar
 
Sam Hocevar committed
2185
   VM page cache was not coherent with the filesystem buffer cache
2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

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

Sam Hocevar's avatar
 
Sam Hocevar committed
2198
/* This mess was copied from the GNU getpagesize.h.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2199 2200 2201 2202 2203
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

2204
/* Assume that all systems that can run configure have sys/param.h.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2205
# ifndef HAVE_SYS_PARAM_H
2206 2207 2208 2209 2210 2211
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
Sam Hocevar's avatar
 
Sam Hocevar committed
2212
#  ifdef HAVE_SYS_PARAM_H
2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238
#   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 */

Sam Hocevar's avatar
 
Sam Hocevar committed
2239 2240 2241 2242 2243 2244
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

2245
int
Sam Hocevar's avatar
 
Sam Hocevar committed
2246
main()
2247
{
Sam Hocevar's avatar
 
Sam Hocevar committed
2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

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

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

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

EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2310
if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
2311
then
2312 2313
  ac_cv_func_mmap_fixed_mapped=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2314 2315 2316 2317
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
2318
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2319
rm -fr conftest*
2320
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2321

2322
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2323

Sam Hocevar's avatar
 
Sam Hocevar committed
2324 2325 2326
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
2327 2328 2329 2330 2331
#define HAVE_MMAP 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2332
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2333
echo "configure:2334: checking return type of signal handlers" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2334 2335
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2336
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2337
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2338
#line 2339 "configure"
2339 2340 2341 2342
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
Sam Hocevar's avatar
 
Sam Hocevar committed
2343
#undef signal
2344 2345 2346 2347 2348 2349 2350
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2351
int main() {
2352
int i;
Sam Hocevar's avatar
 
Sam Hocevar committed
2353 2354
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2355
if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2356
  rm -rf conftest*
2357 2358
  ac_cv_type_signal=void
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2359 2360 2361 2362
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
2363
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2364
rm -f conftest*
2365 2366
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2367 2368
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
2369 2370 2371
#define RETSIGTYPE $ac_cv_type_signal
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
2372 2373

echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2374
echo "configure:2375: checking for dlopen in -ldl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2375 2376 2377
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
2378
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2379
  ac_save_LIBS="$LIBS"
2380
LIBS="-ldl  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2381
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2382
#line 2383 "configure"
2383 2384 2385
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2386 2387 2388 2389 2390 2391 2392
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2393
if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407
  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
2408
  LIB="${LIB} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
2409 2410
else
  echo "$ac_t""no" 1>&6
2411 2412
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2413
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2414
echo "configure:2415: checking for pow in -lm" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2415 2416 2417
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
2418
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2419
  ac_save_LIBS="$LIBS"
2420
LIBS="-lm  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2421
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2422
#line 2423 "configure"
2423 2424 2425
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2426 2427 2428 2429 2430 2431 2432
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2433
if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447
  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
2448
  LIB_YUV="${LIB_YUV} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
2449 2450
else
  echo "$ac_t""no" 1>&6
2451 2452
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2453

Sam Hocevar's avatar
 
Sam Hocevar committed
2454 2455 2456 2457
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
CFLAGS="${CFLAGS} -I/usr/local/include"

PTHREAD_LIBS=error
Sam Hocevar's avatar
 
Sam Hocevar committed
2458
echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2459
echo "configure:2460: checking for pthread_attr_init in -lpthread" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2460 2461 2462
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2463
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2464
  ac_save_LIBS="$LIBS"
2465
LIBS="-lpthread  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2466
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2467
#line 2468 "configure"
2468 2469 2470
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2471 2472 2473 2474 2475 2476 2477
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2478
if { (eval echo configure:2479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492
  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
2493
  THREAD_LIB="-lpthread"
Sam Hocevar's avatar
 
Sam Hocevar committed
2494 2495
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2496 2497
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2498
if test "x${THREAD_LIB}" = xerror; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2499
  echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2500
echo "configure:2501: checking for pthread_attr_init in -lpthreads" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2501 2502 2503
ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2504
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2505
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2506
LIBS="-lpthreads  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2507
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2508
#line 2509 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2509
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2510 2511
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2512 2513 2514 2515 2516 2517 2518
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2519
if { (eval echo configure:2520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533
  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
2534
  THREAD_LIB="-lpthreads"
Sam Hocevar's avatar
 
Sam Hocevar committed
2535 2536
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2537
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2538

Sam Hocevar's avatar
 
Sam Hocevar committed
2539
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2540
if test "x${THREAD_LIB}" = xerror; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2541
  echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2542
echo "configure:2543: checking for pthread_attr_init in -lc_r" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2543 2544 2545
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2546
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2547
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2548
LIBS="-lc_r  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2549
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2550
#line 2551 "configure"
2551 2552 2553
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2554 2555 2556 2557 2558 2559 2560
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2561
if { (eval echo configure:2562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575
  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
2576
  THREAD_LIB="-lc_r"
Sam Hocevar's avatar
 
Sam Hocevar committed
2577 2578
else
  echo "$ac_t""no" 1>&6
2579 2580
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2581
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2582 2583
if test "x${THREAD_LIB}" = xerror; then
  THREAD_LIBS=""
Sam Hocevar's avatar
 
Sam Hocevar committed
2584
  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2585
echo "configure:2586: checking for pthread_attr_init" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2586 2587
if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2588
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2589
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2590
#line 2591 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2591 2592
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
2593
    which can conflict with char pthread_attr_init(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2594 2595 2596
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2597 2598 2599 2600
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2601 2602 2603 2604 2605 2606 2607

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

Sam Hocevar's avatar
 
Sam Hocevar committed
2611 2612
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2613
if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2631 2632 2633

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2634
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2635
#line 2636 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2636 2637
#include "confdefs.h"
#include <pthread.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2638
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2639 2640
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2641 2642 2643
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2644 2645 2646 2647 2648 2649
#define PTHREAD_COND_T_IN_PTHREAD_H 1
EOF

fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
2650
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2651
#line 2652 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2652 2653
#include "confdefs.h"
#include <strings.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2654
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2655 2656
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2657 2658 2659
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2660 2661 2662 2663 2664
#define STRNCASECMP_IN_STRINGS_H 1
EOF

fi
rm -f conftest*
2665

Sam Hocevar's avatar
 
Sam Hocevar committed
2666 2667

for ac_hdr in stddef.h getopt.h strings.h
Christophe Massiot's avatar
Christophe Massiot committed
2668
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2669 2670
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2671
echo "configure:2672: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2672 2673 2674 2675
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2676
#line 2677 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2677
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2678 2679 2680
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2681
{ (eval echo configure:2682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2682 2683 2684 2685 2686 2687 2688
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
2689
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2690 2691
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
2692
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2693
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
2694
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2695 2696 2697 2698 2699
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Christophe Massiot's avatar
Christophe Massiot committed
2700
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2701 2702 2703
 
else
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2704 2705 2706
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2707
for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
2708
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2709 2710
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2711
echo "configure:2712: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2712 2713 2714 2715
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2716
#line 2717 "configure"
2717
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2718 2719 2720
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2721
{ (eval echo configure:2722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2722 2723 2724 2725 2726 2727 2728
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
2729
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2730 2731
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2732
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2733
rm -f conftest*
2734
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2735 2736 2737 2738 2739
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
2740
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2741 2742 2743
 
else
  echo "$ac_t""no" 1>&6
2744 2745 2746
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2747
for ac_hdr in sys/soundcard.h machine/soundcard.h
2748
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2749 2750
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2751
echo "configure:2752: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2752 2753 2754 2755
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2756
#line 2757 "configure"
2757
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2758 2759 2760
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2761
{ (eval echo configure:2762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2762 2763 2764 2765 2766 2767 2768
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
2769
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2770 2771
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2772
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2773
rm -f conftest*
2774
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2775 2776 2777 2778 2779
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
2780
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2781 2782 2783
 
else
  echo "$ac_t""no" 1>&6
2784 2785 2786
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2787
for ac_hdr in dlfcn.h image.h
2788
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2789 2790
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2791
echo "configure:2792: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2792 2793 2794 2795
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2796
#line 2797 "configure"
2797
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2798 2799 2800
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2801
{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2802 2803 2804 2805 2806 2807 2808
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
2809
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2810 2811
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2812
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2813
rm -f conftest*
2814
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2815 2816 2817 2818 2819
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
2820
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2821 2822 2823
 
else
  echo "$ac_t""no" 1>&6
2824 2825 2826
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2827
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2828
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2829 2830
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2831
echo "configure:2832: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2832 2833 2834 2835
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2836
#line 2837 "configure"
2837
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2838 2839 2840
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2841
{ (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2842 2843 2844 2845 2846 2847 2848
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
2849
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2850 2851
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2852
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2853
rm -f conftest*
2854
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2855 2856 2857 2858 2859
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
2860
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2861 2862 2863
 
else
  echo "$ac_t""no" 1>&6
2864 2865 2866
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2867
for ac_hdr in machine/param.h
Benoit Steiner's avatar
 
Benoit Steiner committed
2868
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2869 2870
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2871
echo "configure:2872: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2872 2873 2874 2875
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2876
#line 2877 "configure"
Benoit Steiner's avatar
 
Benoit Steiner committed
2877
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2878 2879 2880
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2881
{ (eval echo configure:2882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2882 2883 2884 2885 2886 2887 2888
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
Benoit Steiner's avatar
 
Benoit Steiner committed
2889
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2890 2891
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Benoit Steiner's avatar
 
Benoit Steiner committed
2892
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2893
rm -f conftest*
Benoit Steiner's avatar
 
Benoit Steiner committed
2894
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2895 2896 2897 2898 2899
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
Benoit Steiner's avatar
 
Benoit Steiner committed
2900
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2901 2902 2903
 
else
  echo "$ac_t""no" 1>&6
Benoit Steiner's avatar
 
Benoit Steiner committed
2904 2905 2906
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2907 2908

for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
Benoit Steiner's avatar
 
Benoit Steiner committed
2909
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2910 2911
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2912
echo "configure:2913: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2913 2914 2915 2916
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2917
#line 2918 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2918
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2919 2920 2921
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2922
{ (eval echo configure:2923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2923 2924 2925 2926 2927 2928 2929
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
2930
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2931 2932
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
2933
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2934
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
2935
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2936 2937 2938 2939 2940
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Christophe Massiot's avatar
Christophe Massiot committed
2941
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2942 2943 2944
 
else
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2945 2946 2947
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2948

Sam Hocevar's avatar
 
Sam Hocevar committed
2949
CFLAGS="${save_CFLAGS} -Wall -Werror"
Sam Hocevar's avatar
 
Sam Hocevar committed
2950
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2951
echo "configure:2952: checking for ntohl in sys/param.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2952
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2953
#line 2954 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2954 2955 2956
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
Sam Hocevar's avatar
 
Sam Hocevar committed
2957
int main() {
Christophe Massiot's avatar
Christophe Massiot committed
2958

Sam Hocevar's avatar
 
Sam Hocevar committed
2959 2960
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2961
if { (eval echo configure:2962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2962 2963
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
Christophe Massiot's avatar
Christophe Massiot committed
2964 2965 2966
#define NTOHL_IN_SYS_PARAM_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
2967
 echo "$ac_t""yes" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2968
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2969 2970 2971 2972
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2973
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2974
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2975

Sam Hocevar's avatar
 
Sam Hocevar committed
2976 2977
CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
echo $ac_n "checking if \$CC compiles plugins with -bundle -undefined suppress""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2978
echo "configure:2979: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2979
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2980
#line 2981 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2981 2982 2983 2984 2985 2986
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2987
if { (eval echo configure:2988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999
  rm -rf conftest*
  PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

CFLAGS="${save_CFLAGS} -shared"
echo $ac_n "checking if \$CC compiles plugins with -shared""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3000
echo "configure:3001: checking if \$CC compiles plugins with -shared" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3001
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3002
#line 3003 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3003 3004 3005 3006 3007 3008
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3009
if { (eval echo configure:3010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3010 3011 3012 3013 3014 3015 3016 3017 3018 3019
  rm -rf conftest*
  PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3020
CFLAGS="${save_CFLAGS}"
Christophe Massiot's avatar
Christophe Massiot committed
3021

Sam Hocevar's avatar
 
Sam Hocevar committed
3022
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3023
echo "configure:3024: checking for boolean_t in sys/types.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3024
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3025
#line 3026 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3026 3027 3028
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3029
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3030

Sam Hocevar's avatar
 
Sam Hocevar committed
3031 3032
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3033
if { (eval echo configure:3034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3034 3035
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3036 3037 3038
#define BOOLEAN_T_IN_SYS_TYPES_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3039
 echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3040
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3041 3042 3043 3044
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3045
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3046 3047
rm -f conftest*
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3048
echo "configure:3049: checking for boolean_t in pthread.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3049
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3050
#line 3051 "configure"
3051 3052 3053
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3054
int main() {
3055

Sam Hocevar's avatar
 
Sam Hocevar committed
3056 3057
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3058
if { (eval echo configure:3059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3059 3060
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
3061 3062 3063
#define BOOLEAN_T_IN_PTHREAD_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3064
 echo "$ac_t""yes" 1>&6
3065
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3066 3067 3068 3069
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
3070
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3071
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3072

Sam Hocevar's avatar
 
Sam Hocevar committed
3073
echo $ac_n "checking for working const""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3074
echo "configure:3075: checking for working const" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3075 3076
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3077
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3078
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3079
#line 3080 "configure"
3080 3081
#include "confdefs.h"

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 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120
int main() {

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

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

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3128
if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3129
  rm -rf conftest*
3130 3131
  ac_cv_c_const=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3132 3133 3134 3135
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
3136
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3137
rm -f conftest*
3138
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3139

Sam Hocevar's avatar
 
Sam Hocevar committed
3140 3141 3142 3143
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
3144 3145 3146 3147
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3148
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3149
echo "configure:3150: checking for ANSI C header files" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3150 3151
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3152
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3153
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3154
#line 3155 "configure"
3155 3156 3157 3158 3159
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3160 3161
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3162
{ (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3163 3164 3165
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
3166 3167
  ac_cv_header_stdc=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3168 3169
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
3170
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3171
  rm -rf conftest*
3172 3173
  ac_cv_header_stdc=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3174
rm -f conftest*
3175 3176 3177

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Sam Hocevar's avatar
 
Sam Hocevar committed
3178
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3179
#line 3180 "configure"
3180 3181
#include "confdefs.h"
#include <string.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3182
EOF
3183 3184 3185 3186
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3187
  rm -rf conftest*
3188 3189 3190 3191 3192 3193 3194 3195
  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.
Sam Hocevar's avatar
 
Sam Hocevar committed
3196
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3197
#line 3198 "configure"
3198 3199
#include "confdefs.h"
#include <stdlib.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3200
EOF
3201 3202 3203 3204
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3205
  rm -rf conftest*
3206 3207 3208 3209 3210 3211 3212 3213
  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.
Sam Hocevar's avatar
 
Sam Hocevar committed
3214
if test "$cross_compiling" = yes; then
3215 3216
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3217
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3218
#line 3219 "configure"
3219 3220
#include "confdefs.h"
#include <ctype.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3221 3222
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Sam Hocevar's avatar
 
Sam Hocevar committed
3223
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Sam Hocevar's avatar
 
Sam Hocevar committed
3224 3225 3226 3227 3228
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3229
if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
3230
then
3231 3232
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3233 3234 3235 3236
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
3237
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3238
rm -fr conftest*
3239
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3240

3241 3242
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3243

Sam Hocevar's avatar
 
Sam Hocevar committed
3244 3245 3246
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
3247 3248 3249 3250 3251
#define STDC_HEADERS 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3252
echo $ac_n "checking for size_t""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3253
echo "configure:3254: checking for size_t" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3254 3255
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
3256
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3257
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3258
#line 3259 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3259
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3260 3261 3262 3263 3264 3265 3266 3267 3268
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
3269 3270
  ac_cv_type_size_t=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3271 3272
  rm -rf conftest*
  ac_cv_type_size_t=no
3273
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3274
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3275

Sam Hocevar's avatar
 
Sam Hocevar committed
3276 3277 3278 3279
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
3280 3281 3282 3283 3284
#define size_t unsigned
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3285
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3286
echo "configure:3287: checking whether time.h and sys/time.h may both be included" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3287 3288
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3289
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3290
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3291
#line 3292 "configure"
3292 3293 3294 3295
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3296
int main() {
3297
struct tm *tp;
Sam Hocevar's avatar
 
Sam Hocevar committed
3298 3299
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3300
if { (eval echo configure:3301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3301
  rm -rf conftest*
3302 3303
  ac_cv_header_time=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3304 3305 3306 3307
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
3308
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3309
rm -f conftest*
3310
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3311

Sam Hocevar's avatar
 
Sam Hocevar committed
3312 3313 3314
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
3315 3316 3317 3318 3319
#define TIME_WITH_SYS_TIME 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3320

Sam Hocevar's avatar
 
Sam Hocevar committed
3321 3322
ARCH=${host_cpu}

Sam Hocevar's avatar
 
Sam Hocevar committed
3323 3324
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
PLUGINS="${PLUGINS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3325

Sam Hocevar's avatar
 
Sam Hocevar committed
3326 3327
case x$host_os in
  xmingw32msvc)
Sam Hocevar's avatar
 
Sam Hocevar committed
3328 3329
    MMX_MODULES="idctmmx motionmmx"
    MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn"
Sam Hocevar's avatar
 
Sam Hocevar committed
3330 3331
    ;;
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
3332 3333
    MMX_MODULES="yuvmmx idctmmx motionmmx"
    MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
Sam Hocevar's avatar
 
Sam Hocevar committed
3334 3335
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
3336

Sam Hocevar's avatar
 
Sam Hocevar committed
3337
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3338
echo "configure:3339: checking if \$CC groks MMX inline assembly" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3339
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3340
#line 3341 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3341 3342
#include "confdefs.h"
void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
Sam Hocevar's avatar
 
Sam Hocevar committed
3343
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3344

Sam Hocevar's avatar
 
Sam Hocevar committed
3345 3346
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3347
if { (eval echo configure:3348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3348
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3349
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3350
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3351
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3352 3353 3354 3355
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3356
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3357
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3358

Sam Hocevar's avatar
 
Sam Hocevar committed
3359
echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3360
echo "configure:3361: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3361
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3362
#line 3363 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3363 3364
#include "confdefs.h"
void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
Sam Hocevar's avatar
 
Sam Hocevar committed
3365
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3366

Sam Hocevar's avatar
 
Sam Hocevar committed
3367 3368
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3369
if { (eval echo configure:3370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3370
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3371
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3372
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3373
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3374 3375 3376 3377
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3378
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3379
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3380

Sam Hocevar's avatar
 
Sam Hocevar committed
3381 3382 3383 3384 3385

for ac_hdr in winioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3386
echo "configure:3387: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3387 3388 3389 3390
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3391
#line 3392 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3392 3393 3394 3395
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3396
{ (eval echo configure:3397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424
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
 
  LIBDVDCSS=1

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


Sam Hocevar's avatar
 
Sam Hocevar committed
3425
for ac_hdr in sys/ioctl.h
3426
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3427 3428
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3429
echo "configure:3430: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3430 3431 3432 3433
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3434
#line 3435 "configure"
3435
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3436 3437 3438
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3439
{ (eval echo configure:3440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3440 3441 3442 3443 3444 3445 3446
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
3447
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3448 3449
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3450
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3451
rm -f conftest*
3452
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3453 3454 3455 3456 3457
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
3458
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3459
 
Sam Hocevar's avatar
 
Sam Hocevar committed
3460
  LIBDVDCSS=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3461
  for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h
3462
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3463 3464
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3465
echo "configure:3466: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3466 3467 3468 3469
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3470
#line 3471 "configure"
3471
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3472 3473 3474
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3475
{ (eval echo configure:3476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3476 3477 3478 3479 3480 3481 3482
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
3483
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3484 3485
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3486
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3487
rm -f conftest*
3488
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3489 3490 3491 3492 3493
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
3494
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3495 3496 3497
 
else
  echo "$ac_t""no" 1>&6
3498 3499 3500
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3501
  BSD_DVD_STRUCT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3502
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3503
#line 3504 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3504 3505
#include "confdefs.h"
#include <sys/dvdio.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3506
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3507 3508
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3509 3510 3511
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3512 3513 3514 3515
#define DVD_STRUCT_IN_SYS_DVDIO_H 1
EOF

    BSD_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3516
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3517 3518 3519
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3520
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3521
#line 3522 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3522 3523
#include "confdefs.h"
#include <sys/cdio.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3524
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3525 3526
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3527 3528 3529
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3530 3531 3532 3533
#define DVD_STRUCT_IN_SYS_CDIO_H 1
EOF

    BSD_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3534
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3535 3536 3537 3538
fi
rm -f conftest*

  if test x$BSD_DVD_STRUCT = x1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3539
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3540 3541 3542 3543
#define HAVE_BSD_DVD_STRUCT 1
EOF

  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3544
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3545
#line 3546 "configure"
3546 3547
#include "confdefs.h"
#include <linux/cdrom.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3548
EOF
3549
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
3550
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3551 3552 3553
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3554
#define DVD_STRUCT_IN_LINUX_CDROM_H 1
3555 3556
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3557
  
3558 3559 3560
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3561 3562 3563

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3567

Sam Hocevar's avatar
 
Sam Hocevar committed
3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
  enableval="$enable_ppro"
   if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
else
   if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
fi


# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
  enableval="$enable_mmx"
   if test x$enableval = xyes; then ARCH="${ARCH} mmx";
  BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
else
   if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
  BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
fi


# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
   if test x$enableval = xyes; then ARCH="${ARCH} altivec";
    BUILTINS="${BUILTINS} idctaltivec"
    LIB_IDCTALTIVEC="-framework vecLib"
  fi 
fi

#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])

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


# Check whether --enable-stats or --disable-stats was given.
if test "${enable_stats+set}" = set; then
  enableval="$enable_stats"
   if test x$enableval = xyes; then STATS=1; fi 
fi


# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
  enableval="$enable_trace"
   if test x$enableval = xyes; then TRACE=1; fi 
fi


# Check whether --enable-profiling or --disable-profiling was given.
if test "${enable_profiling+set}" = set; then
  enableval="$enable_profiling"
   if test x$enableval = xyes; then PROFILING=1; fi 
fi


# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
   if test x$enableval = xno; then OPTIMS=0; fi 
else
   OPTIMS=1 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
3636 3637 3638 3639 3640
# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
   if test x$enableval = xyes; then
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3641
echo "configure:3642: checking for pth_init in -lpth" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3642 3643 3644 3645 3646 3647 3648
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpth  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3649
#line 3650 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3650 3651 3652 3653 3654 3655 3656 3657 3658 3659
#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 pth_init();

int main() {
pth_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3660
if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3661 3662 3663 3664 3665 3666 3667
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
3668
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3669 3670
rm -f conftest*
LIBS="$ac_save_LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3671

Sam Hocevar's avatar
 
Sam Hocevar committed
3672 3673 3674 3675 3676 3677 3678 3679
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
3680

Sam Hocevar's avatar
 
Sam Hocevar committed
3681 3682 3683 3684
  LIBS="-lpth $LIBS"

else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3685
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3686

Sam Hocevar's avatar
 
Sam Hocevar committed
3687
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3688
#line 3689 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3689 3690 3691 3692 3693 3694 3695 3696 3697 3698
#include "confdefs.h"
#include <pth.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
#define PTH_INIT_IN_PTH_H 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3699

Sam Hocevar's avatar
 
Sam Hocevar committed
3700 3701
    THREAD_LIB="-lpth"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3702
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3703
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3704

Sam Hocevar's avatar
 
Sam Hocevar committed
3705 3706 3707 3708 3709

fi


LIB="${LIB} ${THREAD_LIB}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3710

Sam Hocevar's avatar
 
Sam Hocevar committed
3711 3712 3713
# Check whether --enable-css or --disable-css was given.
if test "${enable_css+set}" = set; then
  enableval="$enable_css"
Sam Hocevar's avatar
 
Sam Hocevar committed
3714
   if test x$enableval = xyes; then CSS=1; else CSS=0; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
3715
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3716 3717 3718 3719
   CSS=1; 
fi

if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3720 3721 3722
#define HAVE_CSS 1
EOF
 fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3723

Sam Hocevar's avatar
 
Sam Hocevar committed
3724 3725 3726 3727
for ac_hdr in videolan/dvdcss.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3728
echo "configure:3729: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3729 3730 3731 3732
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3733
#line 3734 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3734 3735 3736 3737
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3738
{ (eval echo configure:3739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800
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
 
  # installed libdvdcss
  BUILTINS="${BUILTINS} dvd"
  LIB_DVD="${LIB_DVD} -ldvdcss"
else
  echo "$ac_t""no" 1>&6
if test x${LIBDVDCSS} = x1; then
    # local libdvdcss
    LOCAL_LIBDVDCSS=1
    BUILTINS="${BUILTINS} dvd"
    CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
  fi
fi
done


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

if test x$enable_dummy != xno; then
  BUILTINS="${BUILTINS} dummy"; fi

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

if test x$enable_null != xno; then
  BUILTINS="${BUILTINS} null"; fi

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

if test x$enable_rc != xno; then
  BUILTINS="${BUILTINS} rc"; fi

3801 3802 3803
SYS=${host_os}

if test x$host_os = xbeos; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3804
    BUILTINS="${BUILTINS} beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
3805
    LIB_BEOS="-lbe -lgame -lroot -ltracker"
Sam Hocevar's avatar
 
Sam Hocevar committed
3806
    PLCFLAGS="${PLCFLAGS} -nostart"
3807 3808 3809 3810 3811 3812

else

# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
Sam Hocevar's avatar
 
Sam Hocevar committed
3813 3814
  :
fi
3815

3816
if test x$enable_dsp != xno; then
3817
  if test -c /dev/dsp; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3818
    PLUGINS="${PLUGINS} dsp"
3819 3820
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3821

3822 3823 3824
# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
3825
  if test x$enable_esd = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3826 3827
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
3828
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3829
echo "configure:3830: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3830 3831
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
3832
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3833 3834
  case "$ESD_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
3835 3836
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
3837 3838 3839
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
3840
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
3841 3842 3843 3844 3845 3846 3847 3848 3849 3850
  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
3851 3852 3853 3854
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3855
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
3856
if test -n "$ESD_CONFIG"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3857
  echo "$ac_t""$ESD_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3858
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3859
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3860 3861 3862
fi

     if test x${ESD_CONFIG} != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3863
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
3864 3865
       LIB_ESD="`${ESD_CONFIG} --libs`"
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3866
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3867 3868
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3869

Sam Hocevar's avatar
 
Sam Hocevar committed
3870 3871 3872
# Check whether --enable-darwin or --disable-darwin was given.
if test "${enable_darwin+set}" = set; then
  enableval="$enable_darwin"
Sam Hocevar's avatar
 
Sam Hocevar committed
3873
  if test x$enable_darwin = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3874
     PLUGINS="${PLUGINS} darwin"
Sam Hocevar's avatar
 
Sam Hocevar committed
3875 3876
     LIB_DARWIN="-framework CoreAudio"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3877 3878
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3879

3880 3881 3882
# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3883
  if test x$enable_macosx = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3884
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3885
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3886 3887
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
 
Sam Hocevar committed
3888
   fi
3889
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3890
  for ac_hdr in Carbon/Carbon.h
3891
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3892 3893
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3894
echo "configure:3895: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3895 3896 3897 3898
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3899
#line 3900 "configure"
3900
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3901 3902 3903
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3904
{ (eval echo configure:3905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3905 3906 3907 3908 3909 3910 3911
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
3912
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3913 3914
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3915
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3916
rm -f conftest*
3917
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3918 3919 3920 3921 3922
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
3923
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3924
 BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3925
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3926 3927
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
 
Sam Hocevar committed
3928 3929 3930
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3931
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3932
done
Sam Hocevar's avatar
 
Sam Hocevar committed
3933

Sam Hocevar's avatar
 
Sam Hocevar committed
3934 3935
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3936

3937 3938 3939
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
Sam Hocevar's avatar
 
Sam Hocevar committed
3940
  if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3941 3942
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3943

Christophe Massiot's avatar
Christophe Massiot committed
3944 3945 3946
# Check whether --with-ggi or --without-ggi was given.
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
3947
   if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
3948
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
3949
      PLUGINS="${PLUGINS} ggi";
Sam Hocevar's avatar
 
Sam Hocevar committed
3950 3951 3952 3953 3954
      if test "x$withval" != "xyes";
      then
        LIB_GGI="-l"$withval
      else
        LIB_GGI="-lggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
3955
      fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3956 3957 3958
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3959

Christophe Massiot's avatar
Christophe Massiot committed
3960 3961 3962
# Check whether --with-sdl or --without-sdl was given.
if test "${with_sdl+set}" = set; then
  withval="$with_sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
3963
   if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
3964
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
3965
      PLUGINS="${PLUGINS} sdl";
Sam Hocevar's avatar
 
Sam Hocevar committed
3966 3967
      if test "x$withval" != "xyes";
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
3968
        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3969
        CFLAGS_SDL="-I"$withval"/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
3970
      else
Sam Hocevar's avatar
 
Sam Hocevar committed
3971
        for ac_hdr in SDL/SDL.h
3972
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3973 3974
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3975
echo "configure:3976: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3976 3977 3978 3979
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3980
#line 3981 "configure"
3981
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3982 3983 3984
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3985
{ (eval echo configure:3986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3986 3987 3988 3989 3990 3991 3992
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
3993
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3994 3995
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3996
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3997
rm -f conftest*
3998
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3999 4000 4001 4002 4003
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
4004
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4005
 
4006
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4007 4008
  echo "$ac_t""no" 1>&6
echo "Cannot find SDL headers !"; exit
4009 4010 4011
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4012
        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
Sam Hocevar's avatar
 
Sam Hocevar committed
4013
      fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4014 4015 4016
    fi 
fi

4017
    if test "x$withval" = "x";
Sam Hocevar's avatar
 
Sam Hocevar committed
4018
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
4019
      for ac_hdr in SDL/SDL.h
4020
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4021 4022
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4023
echo "configure:4024: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4024 4025 4026 4027
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4028
#line 4029 "configure"
4029
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4030 4031 4032
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4033
{ (eval echo configure:4034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4034 4035 4036 4037 4038 4039 4040
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
4041
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4042 4043
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4044
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4045
rm -f conftest*
4046
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4047 4048 4049 4050 4051
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
4052
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4053 4054
 PLUGINS="${PLUGINS} sdl"
       LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
Sam Hocevar's avatar
 
Sam Hocevar committed
4055 4056
else
  echo "$ac_t""no" 1>&6
4057 4058 4059
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4060
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4061

Sam Hocevar's avatar
 
Sam Hocevar committed
4062 4063 4064 4065 4066 4067 4068 4069
# Check whether --with-directx or --without-directx was given.
if test "${with_directx+set}" = set; then
  withval="$with_directx"
   if test "x$withval" != "xno";
    then
      PLUGINS="${PLUGINS} directx";
      if test "x$withval" != "xyes";
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
4070
        LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
 
Sam Hocevar committed
4071 4072 4073 4074 4075 4076
        INCLUDE="${INCLUDE} -I"$withval"/include"
      else
        for ac_hdr in directx.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4077
echo "configure:4078: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4078 4079 4080 4081
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4082
#line 4083 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4083 4084 4085 4086
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4087
{ (eval echo configure:4088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
echo "Cannot find DirectX headers !"; exit
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4114
        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
 
Sam Hocevar committed
4115 4116 4117 4118 4119 4120 4121 4122 4123 4124
      fi
    fi 
fi

    if test "x$withval" = "x";
    then
      for ac_hdr in directx.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4125
echo "configure:4126: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4126 4127 4128 4129
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4130
#line 4131 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4131 4132 4133 4134
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4135
{ (eval echo configure:4136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 PLUGINS="${PLUGINS} directx"
Sam Hocevar's avatar
 
Sam Hocevar committed
4156
       LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
 
Sam Hocevar committed
4157 4158 4159 4160 4161 4162 4163
else
  echo "$ac_t""no" 1>&6
fi
done

    fi

Christophe Massiot's avatar
Christophe Massiot committed
4164 4165 4166
# Check whether --with-glide or --without-glide was given.
if test "${with_glide+set}" = set; then
  withval="$with_glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
4167
   if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
4168
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
4169
      PLUGINS="${PLUGINS} glide";
Sam Hocevar's avatar
 
Sam Hocevar committed
4170 4171
      if test "x$withval" != "xyes";
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
4172
        LIB_GLIDE="-l"$withval" -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4173
      else
Sam Hocevar's avatar
 
Sam Hocevar committed
4174
        LIB_GLIDE="-lglide2x -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4175
      fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4176 4177 4178
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4179

Sam Hocevar's avatar
 
Sam Hocevar committed
4180 4181 4182
# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
4183
  if test x$enable_ncurses = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4184
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
4185 4186
     LIB_NCURSES="-lncurses"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4187 4188
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4189

Sam Hocevar's avatar
 
Sam Hocevar committed
4190 4191 4192
# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
Sam Hocevar's avatar
 
Sam Hocevar committed
4193
  if test x$enable_qt = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4194 4195
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
4196
     LIB_QT="-lqt -L${QTDIR}/lib"
Sam Hocevar's avatar
 
Sam Hocevar committed
4197 4198 4199 4200 4201 4202
     if test -x ${QTDIR}/bin/moc ;
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4203
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4204 4205
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4206

4207 4208 4209
# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
Sam Hocevar's avatar
 
Sam Hocevar committed
4210
  if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4211 4212
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4213

4214 4215 4216
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
Sam Hocevar's avatar
 
Sam Hocevar committed
4217
  if test x$enable_gnome = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4218 4219
     PLUGINS="${PLUGINS} gnome"
     ALIASES="${ALIASES} gnome-vlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
4220 4221
     LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4222 4223
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4224

Sam Hocevar's avatar
 
Sam Hocevar committed
4225 4226 4227
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
Sam Hocevar's avatar
 
Sam Hocevar committed
4228 4229
  :
fi
4230

4231
if test x$enable_gtk != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4232 4233
  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
4234
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4235
echo "configure:4236: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4236 4237
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
4238
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4239 4240
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
4241 4242
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
4243 4244 4245
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
4246
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
4247 4248 4249 4250 4251 4252 4253 4254 4255 4256
  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_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
4257 4258 4259 4260
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4261
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
4262
if test -n "$GTK_CONFIG"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4263
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4264
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4265
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4266 4267 4268
fi

  if test x${GTK_CONFIG} != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4269 4270
    PLUGINS="${PLUGINS} gtk"
    ALIASES="${ALIASES} gvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
4271 4272
    CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
    LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4273 4274
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4275

4276 4277 4278
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
Sam Hocevar's avatar
 
Sam Hocevar committed
4279 4280
  :
fi
Henri Fallon's avatar
 
Henri Fallon committed
4281

4282
if test x$enable_x11 != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4283 4284 4285 4286 4287 4288 4289 4290
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4291
  for ac_hdr in X11/Xlib.h
4292
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4293 4294
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4295
echo "configure:4296: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4296 4297 4298 4299
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4300
#line 4301 "configure"
4301
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4302 4303 4304
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4305
{ (eval echo configure:4306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4306 4307 4308 4309 4310 4311 4312
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
4313
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4314 4315
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4316
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4317
rm -f conftest*
4318
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4319 4320 4321 4322 4323
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
4324
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4325
 
Sam Hocevar's avatar
 
Sam Hocevar committed
4326
    PLUGINS="${PLUGINS} x11"
Sam Hocevar's avatar
 
Sam Hocevar committed
4327 4328
    LIB_X11="-L$x_libraries -lX11 -lXext"
    CFLAGS_X11="-I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4329
  
Sam Hocevar's avatar
 
Sam Hocevar committed
4330
  CPPFLAGS=$saved_CPPFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
4331 4332
else
  echo "$ac_t""no" 1>&6
4333 4334 4335 4336
fi
done

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4337

Sam Hocevar's avatar
 
Sam Hocevar committed
4338 4339 4340
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
Sam Hocevar's avatar
 
Sam Hocevar committed
4341 4342
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4343 4344 4345 4346 4347 4348 4349 4350 4351 4352

if test x$enable_xvideo != xno; then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4353
  for ac_hdr in X11/extensions/Xv.h
Sam Hocevar's avatar
 
Sam Hocevar committed
4354
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4355 4356
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4357
echo "configure:4358: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4358 4359 4360 4361
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4362
#line 4363 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4363
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4364 4365 4366
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4367
{ (eval echo configure:4368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4368 4369 4370 4371 4372 4373 4374
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
4375
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4376 4377
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4378
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4379
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4380
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4381 4382 4383 4384 4385
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Sam Hocevar's avatar
 
Sam Hocevar committed
4386
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4387
 
Sam Hocevar's avatar
 
Sam Hocevar committed
4388 4389 4390
    PLUGINS="${PLUGINS} xvideo"
    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
    CFLAGS_X11="-I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4391
  
Sam Hocevar's avatar
 
Sam Hocevar committed
4392
  CPPFLAGS=$saved_CPPFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
4393 4394
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4395 4396
fi
done
Sam Hocevar's avatar
 
Sam Hocevar committed
4397

Sam Hocevar's avatar
 
Sam Hocevar committed
4398
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4399

Henri Fallon's avatar
 
Henri Fallon committed
4400 4401 4402
# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
4403 4404
  if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4405
echo "configure:4406: checking for sys/asoundlib.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4406 4407 4408 4409
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4410
#line 4411 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
4411 4412
#include "confdefs.h"
#include <sys/asoundlib.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
4413 4414
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4415
{ (eval echo configure:4416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4416 4417 4418 4419 4420 4421 4422
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
Henri Fallon's avatar
 
Henri Fallon committed
4423
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4424 4425
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Henri Fallon's avatar
 
Henri Fallon committed
4426
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4427
rm -f conftest*
Henri Fallon's avatar
 
Henri Fallon committed
4428
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4429 4430 4431
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
Sam Hocevar's avatar
 
Sam Hocevar committed
4432
echo "configure:4433: checking for main in -lasound" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4433 4434 4435
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
Henri Fallon's avatar
 
Henri Fallon committed
4436
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4437
  ac_save_LIBS="$LIBS"
Henri Fallon's avatar
 
Henri Fallon committed
4438
LIBS="-lasound  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4439
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4440
#line 4441 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
4441 4442
#include "confdefs.h"

Sam Hocevar's avatar
 
Sam Hocevar committed
4443 4444 4445 4446
int main() {
main()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4447
if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461
  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
Henri Fallon's avatar
 
Henri Fallon committed
4462 4463
  have_alsa="true"
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4464 4465
  echo "$ac_t""no" 1>&6
have_alsa="false"
Henri Fallon's avatar
 
Henri Fallon committed
4466 4467 4468
fi

else
Sam Hocevar's avatar
 
Sam Hocevar committed
4469 4470
  echo "$ac_t""no" 1>&6
have_alsa="false"
Henri Fallon's avatar
 
Henri Fallon committed
4471
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4472 4473
 if test x$have_alsa = xtrue; then
     PLUGINS="${PLUGINS} alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
4474 4475
     LIB_ALSA="-lasound"
   fi; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4476 4477
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4478

4479 4480 4481 4482 4483 4484 4485
fi






Henri Fallon's avatar
 
Henri Fallon committed
4486 4487 4488



Christophe Massiot's avatar
Christophe Massiot committed
4489 4490 4491



Sam Hocevar's avatar
 
Sam Hocevar committed
4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505














Sam Hocevar's avatar
 
Sam Hocevar committed
4506

Sam Hocevar's avatar
 
Sam Hocevar committed
4507

Sam Hocevar's avatar
 
Sam Hocevar committed
4508 4509 4510 4511




Sam Hocevar's avatar
 
Sam Hocevar committed
4512

Sam Hocevar's avatar
 
Sam Hocevar committed
4513 4514


4515

Sam Hocevar's avatar
 
Sam Hocevar committed
4516

Sam Hocevar's avatar
 
Sam Hocevar committed
4517

Sam Hocevar's avatar
 
Sam Hocevar committed
4518

Sam Hocevar's avatar
 
Sam Hocevar committed
4519

Sam Hocevar's avatar
 
Sam Hocevar committed
4520

Sam Hocevar's avatar
 
Sam Hocevar committed
4521 4522 4523



Sam Hocevar's avatar
 
Sam Hocevar committed
4524

Sam Hocevar's avatar
 
Sam Hocevar committed
4525

Sam Hocevar's avatar
 
Sam Hocevar committed
4526

4527

Sam Hocevar's avatar
 
Sam Hocevar committed
4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573

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

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4579 4580 4581
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4582

Sam Hocevar's avatar
 
Sam Hocevar committed
4583 4584 4585 4586 4587 4588 4589 4590 4591 4592
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

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

DEFS=-DHAVE_CONFIG_H
4593

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4597 4598 4599 4600 4601 4602 4603 4604
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`:
4605
#
Sam Hocevar's avatar
 
Sam Hocevar committed
4606
# $0 $ac_configure_args
4607
#
Sam Hocevar's avatar
 
Sam Hocevar committed
4608 4609
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
4610

Sam Hocevar's avatar
 
Sam Hocevar committed
4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4630
trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4631
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4632
cat >> $CONFIG_STATUS <<EOF
4633

Sam Hocevar's avatar
 
Sam Hocevar committed
4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687
# 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%@VLC_VERSION@%$VLC_VERSION%g
s%@VLC_CODENAME@%$VLC_CODENAME%g
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@GETOPT@%$GETOPT%g
s%@ESD_CONFIG@%$ESD_CONFIG%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
s%@BUILTINS@%$BUILTINS%g
s%@ALIASES@%$ALIASES%g
s%@DEFINE@%$DEFINE%g
s%@INCLUDE@%$INCLUDE%g
s%@DEBUG@%$DEBUG%g
s%@STATS@%$STATS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4688
s%@ASM@%$ASM%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4689
s%@TRACE@%$TRACE%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4690
s%@PROFILING@%$PROFILING%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4691 4692 4693 4694
s%@OPTIMS@%$OPTIMS%g
s%@CSS@%$CSS%g
s%@MOC@%$MOC%g
s%@LCFLAGS@%$LCFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4695
s%@PLCFLAGS@%$PLCFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4696 4697 4698 4699
s%@LIB@%$LIB%g
s%@LIB_ALSA@%$LIB_ALSA%g
s%@LIB_BEOS@%$LIB_BEOS%g
s%@LIB_DARWIN@%$LIB_DARWIN%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4700
s%@LIB_DVD@%$LIB_DVD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711
s%@LIB_ESD@%$LIB_ESD%g
s%@LIB_GGI@%$LIB_GGI%g
s%@LIB_GLIDE@%$LIB_GLIDE%g
s%@LIB_GNOME@%$LIB_GNOME%g
s%@LIB_GTK@%$LIB_GTK%g
s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
s%@LIB_MACOSX@%$LIB_MACOSX%g
s%@LIB_NCURSES@%$LIB_NCURSES%g
s%@LIB_QT@%$LIB_QT%g
s%@LIB_TS@%$LIB_TS%g
s%@LIB_SDL@%$LIB_SDL%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4712
s%@LIB_DIRECTX@%$LIB_DIRECTX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4713 4714 4715 4716
s%@LIB_X11@%$LIB_X11%g
s%@LIB_XVIDEO@%$LIB_XVIDEO%g
s%@LIB_YUV@%$LIB_YUV%g
s%@CFLAGS_VLC@%$CFLAGS_VLC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4717
s%@CFLAGS_DVD@%$CFLAGS_DVD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4718
s%@CFLAGS_GTK@%$CFLAGS_GTK%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4719
s%@CFLAGS_SDL@%$CFLAGS_SDL%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4720
s%@CFLAGS_X11@%$CFLAGS_X11%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4721
s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
Sam Hocevar's avatar
 
Sam Hocevar committed
4748
    else
Sam Hocevar's avatar
 
Sam Hocevar committed
4749
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4750
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4751 4752 4753
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
4754
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4755 4756 4757 4758 4759
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
4760

Sam Hocevar's avatar
 
Sam Hocevar committed
4761 4762 4763
cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4764
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4765 4766
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4767
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Sam Hocevar's avatar
 
Sam Hocevar committed
4768 4769 4770 4771
  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" ;;
4772 4773
  esac

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4776 4777 4778 4779 4780 4781
  # 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%^\./%%'`"
4782
    # A "../" for each directory in $ac_dir_suffix.
Sam Hocevar's avatar
 
Sam Hocevar committed
4783
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4784 4785 4786 4787
  else
    ac_dir_suffix= ac_dots=
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4788 4789 4790 4791 4792
  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" ;;
4793
  *) # Relative path.
Sam Hocevar's avatar
 
Sam Hocevar committed
4794 4795
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
4796 4797
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
4798 4799 4800
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4801 4802
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
4803 4804 4805 4806 4807 4808 4809 4810
  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
4811

Sam Hocevar's avatar
 
Sam Hocevar committed
4812 4813 4814 4815 4816 4817 4818 4819 4820
  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*
4821 4822 4823 4824 4825

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
Sam Hocevar's avatar
 
Sam Hocevar committed
4826 4827 4828 4829 4830 4831 4832
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'
4833
ac_uC=' '
Sam Hocevar's avatar
 
Sam Hocevar committed
4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848
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
4849
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Sam Hocevar's avatar
 
Sam Hocevar committed
4850 4851 4852 4853
  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" ;;
4854 4855
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
4856 4857 4858 4859 4860
  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
4861 4862 4863

EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874
# 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
4875
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4876 4877
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
4878 4879 4880 4881

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4886 4887
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
4888 4889

rm -f conftest.tail
Sam Hocevar's avatar
 
Sam Hocevar committed
4890
while :
4891
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4892 4893 4894 4895 4896 4897
  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
4898
  echo 'CEOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4899 4900 4901 4902 4903 4904 4905
  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
4906
done
Sam Hocevar's avatar
 
Sam Hocevar committed
4907 4908 4909 4910 4911 4912 4913 4914 4915 4916
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
4917
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
4918 4919
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4920
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4921 4922
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
4923
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4924 4925
    rm -f $ac_file
    mv conftest.h $ac_file
4926
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4927 4928
fi; done

4929
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4930
cat >> $CONFIG_STATUS <<EOF
4931

Sam Hocevar's avatar
 
Sam Hocevar committed
4932 4933
EOF
cat >> $CONFIG_STATUS <<\EOF
4934

Sam Hocevar's avatar
 
Sam Hocevar committed
4935
exit 0
4936 4937
EOF
chmod +x $CONFIG_STATUS
Sam Hocevar's avatar
 
Sam Hocevar committed
4938 4939 4940
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

4941

4942
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
4943 4944 4945 4946 4947
global configuration
--------------------
system                : ${SYS}
architecture          : ${ARCH}
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4948
inline assembly       : ${ASM}
Sam Hocevar's avatar
 
Sam Hocevar committed
4949

4950 4951 4952
vlc configuration
-----------------
vlc version           : ${VLC_VERSION}
4953 4954
debug mode            : ${DEBUG}
statistics            : ${STATS}
4955
trace mode            : ${TRACE}
Sam Hocevar's avatar
 
Sam Hocevar committed
4956
profiling             : ${PROFILING}
Sam Hocevar's avatar
 
Sam Hocevar committed
4957
need builtin getopt   : ${GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
4958
built-in modules      :${BUILTINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4959
plugin modules        :${PLUGINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4960
vlc aliases           :${ALIASES}
Sam Hocevar's avatar
 
Sam Hocevar committed
4961

Sam Hocevar's avatar
 
Sam Hocevar committed
4962 4963 4964 4965 4966 4967
libdvdcss configuration
-----------------------
CSS decryption        : ${CSS}

You may now tune Makefile.opts at your convenience. To build vlc, type
\`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
4968