configure 116.7 KB
Newer Older
1 2 3
#! /bin/sh

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

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
14
ac_default_prefix=/usr/local/pgsql
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
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'

# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
53 54
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

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

  case "$ac_option" in

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

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -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=*)
    cache_file="$ac_optarg" ;;

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

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    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" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    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
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -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=*)
    exec_prefix="$ac_optarg" ;;

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

  -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 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -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=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -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=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -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=*)
    program_prefix="$ac_optarg" ;;

  -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=*)
    program_suffix="$ac_optarg" ;;

  -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=*)
    program_transform_name="$ac_optarg" ;;

  -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=*)
    sbindir="$ac_optarg" ;;

  -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=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

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

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

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

  -version | --version | --versio | --versi | --vers)
336
    echo "configure generated by autoconf version 2.12"
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    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'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    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" ;;

  --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=*)
    x_includes="$ac_optarg" ;;

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

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

  *)
    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"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { 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
fi
exec 5>./config.log

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

# 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
do
  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" ;;
  esac
done

# NLS nuisances.
438 439 440 441
# 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.
M
Marc G. Fournier 已提交
442
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
443 444 445
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
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506

# 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

# 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=backend/access/common/heaptuple.c

# 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
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  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
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# 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
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
507
cross_compiling=$ac_cv_prog_cc_cross
508 509 510 511 512 513 514 515 516 517 518 519 520 521

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


522 523


524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549
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
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
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.


# Make sure we can run config.sub.
if $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
550
echo "configure:551: checking host system type" >&5
551 552 553 554 555 556 557 558 559 560 561 562 563 564

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`$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=`$ac_config_sub $host_alias`
565 566 567
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
568 569 570
echo "$ac_t""$host" 1>&6

case "$host_os" in
571 572 573 574 575
 solaris*)
        case "$host_cpu" in
          sparc) PORTNAME='sparc_solaris' ;;
           i386) PORTNAME='i386_solaris' ;;
        esac ;;
576
   sunos*) PORTNAME='sunos4' ;;
577 578
   linux*) PORTNAME='linux' ;;
    bsdi*) PORTNAME='bsdi' ;;
579
 freebsd*|netbsd*) PORTNAME='BSD44_derived';;
580 581 582
    dgux*) PORTNAME='dgux';;
     aix*) PORTNAME='aix';;
nextstep*) PORTNAME='nextstep';;
583
  ultrix*) PORTNAME='ultrix4';;
584
    irix*) PORTNAME='irix5';;
M
Marc G. Fournier 已提交
585
    hpux*) PORTNAME='hpux';;
586
     osf*) PORTNAME='alpha';;
587
     sco*) PORTNAME='sco';;
588
   sysv4*) PORTNAME='svr4';;
589 590 591 592 593
 sysv4.2*) 
       case "$host_vendor" in
               univel) PORTNAME='univel';;
                    *) PORTNAME='unknown';;
       esac ;;
594 595 596 597
*) echo ""
   echo "*************************************************************"
   echo "configure does not currently recognize your operating system,"
   echo "therefore you must do a manual configuration of:"
598
   echo "$host_os"
599 600 601 602 603 604 605
   echo "Please contact scrappy@hub.org to see about rectifying this, "
   echo "including the above 'checking host system type...' line "
   echo "*************************************************************"
   echo ""
   exit;;
esac

606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
echo "checking echo setting..."
if echo '\c' | grep -s c >/dev/null 2>&1
then
	ECHO_N="echo -n"
	ECHO_C=""
else
	ECHO_N="echo"
	ECHO_C='\c'
fi

cat <<EOT
**************************************************************
	PostreSQL v6.1 Installation Program

Welcome to the new improved PostgreSQL installation program.
This configuration program is for version 6.1alpha of the
PostgreSQL software.

EOT


if test "X$with_template" != "X"
then
	TEMPLATE=template/$with_template
else
	TEMPLATE=DO_NOT_CHANGE_THIS_INVALID_FILENAME
fi

if test ! -f $TEMPLATE
then
	cat <<EOT
Please select a template from the ones listed below.  If no
template is available, then select the 'generic' one and
consider emailling scrappy@hub.org with the above line which
starts 'checking host system type...'
**************************************************************
EOT
	TEMPLATE=generic
	GUESS=`grep $host_os template/.similar 2>/dev/null`
	if test $GUESS
	then
		TEMPLATE=`echo $GUESS | sed 's/.*=//'`
	fi
	export TEMPLATE
	ls template
	echo "**************************************************************"
	$ECHO_N "Appropriate template file { $TEMPLATE }: $ECHO_C"
	read a
	if test "$a." != "."
	then
		TEMPLATE=$a
	fi
	if test ! -f template/$TEMPLATE
	then
		echo "You must choose an appropriate template file."
		exit
	fi
663
	TEMPLATE=template/$TEMPLATE 
664
fi
665 666
export TEMPLATE
echo ""
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686

AROPT=`grep AROPT $TEMPLATE | awk -F: '{print $2}'`
SHARED_LIB=`grep SHARED_LIB $TEMPLATE | awk -F: '{print $2}'`
CFLAGS=`grep CFLAGS $TEMPLATE | awk -F: '{print $2}'`
SRCH_INC=`grep SRCH_INC $TEMPLATE | awk -F: '{print $2}'`
SRCH_LIB=`grep SRCH_LIB $TEMPLATE | awk -F: '{print $2}'`
USE_LOCALE=`grep USE_LOCALE $TEMPLATE | awk -F: '{print $2}'`
DLSUFFIX=`grep DLSUFFIX $TEMPLATE | awk -F: '{print $2}'`
DL_LIB=`grep DL_LIB $TEMPLATE | awk -F: '{print $2}'`
YACC=`grep YACC $TEMPLATE | awk -F: '{print $2}'`
YFLAGS=`grep YFLAGS $TEMPLATE | awk -F: '{print $2}'`


echo "**************************************************************"
echo "We now need to know if your compiler needs to search any
echo "additional directories for include or library files.  If
echo "you don't know the answers to these questions, then just
echo "hit enter and we will try and figure it out.  If things
echo "don't compile because of missing libraries or include
echo "files, then you probably need to enter something here.
687
echo "enter 'none' or new directories to override default"
688
echo ""
689
$ECHO_N "Additional directories to search for include files { $SRCH_INC }: $ECHO_C"
690
read a
691
if test "$a." = "none." 
692 693 694
then
	SRCH_INC=
	CPPFLAGS=
695 696 697 698 699 700 701
else
	if test "$a." = "."
	then
		a=$SRCH_INC
	fi
	CPPFLAGS=`echo "$a" | sed 's@  *@ @g; s@^\([^ ]\)@-I\1@; s@ \([^ ]\)@ -I\1@g'`

702
fi
703
export CPPFLAGS
704
echo "- setting CPPFLAGS=$CPPFLAGS"
705

706
$ECHO_N "Additional directories to search for library files { $SRCH_LIB }: $ECHO_C"
707
read a
708
if test "$a." = "none."
709 710 711
then
	SRCH_LIB=
	LDFLAGS=
712 713 714 715 716 717 718
else
	if test "$a." = "."
	then
		a=$SRCH_LIB
	fi
	LDFLAGS=`echo "$a" | sed 's@  *@ @g; s@^\([^ ]\)@-L\1@; s@ \([^ ]\)@ -L\1@g'`

719
fi
720
export LDFLAGS
721
echo "- setting LDFLAGS=$LDFLAGS"
722 723 724 725 726

if test "$enable_locale" = "yes" -o "$enable_locale" = "no"
then
	USE_LOCALE=$enable_locale
else
727
	USE_LOCALE=no
728 729 730 731 732 733 734
fi
export USE_LOCALE

if test "X$with_pgport" != "X"
then
	DEF_PGPORT=$with_pgport
else
735
	DEF_PGPORT=5432
736 737 738 739 740 741 742 743 744 745
fi
export DEF_PGPORT

if test "$enable_hba" = "yes" 
then
	NOHBA=no
elif test "$enable_hba" = "no"
then
	NOHBA=yes
else
746
	NOHBA=no
747 748 749
fi
export NOHBA

750
echo ""
751

752 753
if test "$enable_cassert" = "no"
then
754
	echo "-ASSERT CHECKING disabled"
755 756 757 758 759 760
        cat >> confdefs.h <<\EOF
#define NO_ASSERT_CHECKING 1
EOF

elif test "$enable_cassert" = "yes"
then
761 762 763 764
	echo "-ASSERT CHECKING enabled"
else
	echo "-ASSERT CHECKING disabled"
	cat >> confdefs.h <<\EOF
765 766 767 768 769
#define NO_ASSERT_CHECKING 1
EOF

fi

770 771 772 773 774
if test "X$with_compiler" != "X"
then
        CC=$with_compiler
else
        # Extract the first word of "gcc", so it can be a program name with args.
775 776
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
777
echo "configure:778: checking for $ac_word" >&5
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
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
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
806
echo "configure:807: checking for $ac_word" >&5
807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  ac_prog_rejected=no
  for ac_dir in $PATH; 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"
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
  if test $# -gt 0; then
    # 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
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

853
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
854
echo "configure:855: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
855 856 857 858 859 860 861 862 863

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 $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext <<EOF
864
#line 865 "configure"
865 866 867
#include "confdefs.h"
main(){return(0);}
EOF
868
if { (eval echo configure:869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887
  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
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
rm -fr conftest*

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
888
echo "configure:889: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
889 890 891
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

892
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
893
echo "configure:894: checking whether we are using GNU C" >&5
894 895 896 897 898 899 900 901
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
902
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
903 904 905 906 907 908 909
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6
910

911 912
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
913 914 915 916
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
917
echo "configure:918: checking whether ${CC-cc} accepts -g" >&5
918
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
919 920 921 922
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
923
  ac_cv_prog_cc_g=yes
924
else
925
  ac_cv_prog_cc_g=no
926 927 928 929 930
fi
rm -f conftest*

fi

931 932 933 934 935 936 937
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  if test "$ac_test_CFLAGS" = set; then
    CFLAGS="$ac_save_CFLAGS"
  elif test $ac_cv_prog_cc_g = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-O2"
938 939 940 941 942 943
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

944 945 946 947 948
fi




949
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
950
echo "configure:951: checking how to run the C preprocessor" >&5
951 952 953 954 955 956 957 958 959 960 961 962 963 964
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
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"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
965
#line 966 "configure"
966 967 968 969 970
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
971
{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
972 973 974 975 976
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
977 978
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
979 980 981
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
982
#line 983 "configure"
983 984 985 986 987
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
988
{ (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
989 990 991 992 993
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
994 995
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6


M
Marc G. Fournier 已提交
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021











1022 1023
HAVECXX='HAVE_Cplusplus=false'

1024
for ac_prog in ginstall installbsd bsdinst scoinst install
1025 1026 1027
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
1028
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1029
echo "configure:1030: checking for $ac_word" >&5
1030 1031 1032 1033 1034 1035 1036 1037 1038
if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$INSTALL" in
  /*)
  ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1039
  for ac_dir in /usr/ucb:$PATH$ac_dummy; do
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_INSTALL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
INSTALL="$ac_cv_path_INSTALL"
if test -n "$INSTALL"; then
  echo "$ac_t""$INSTALL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

1057 1058
test -n "$INSTALL" && break
done
1059
test -n "$INSTALL" || INSTALL="NONE"
1060

1061 1062 1063 1064
if test $INSTALL = "NONE"
then
   echo "- No Install Script found - aborting."
   exit 0;
1065 1066
fi

1067 1068 1069 1070
INSTLOPTS="-m 444"
INSTL_EXE_OPTS="-m 555"
INSTL_LIB_OPTS="-m 664"

1071
case "`basename $INSTALL`" in
1072
 install|installbsd|scoinst)
1073 1074
	INSTLOPTS="-c $INSTLOPTS"
	INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
1075 1076
	INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS";;
esac
1077

1078
echo "- Using $INSTALL"
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091





ECHO_N_OUT=`echo -n "" | wc -c`
ECHO_C_OUT=`echo "\c" | wc -c`
if test "$ECHO_N_OUT" -eq 0; then
  DASH_N='-n'
  BACKSLASH_C=
else
  if test "ECHO_C_OUT" -eq 0; then
    DASH_N=
1092
    BACKSLASH_C='\\\\c'
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102
  else
    { echo "configure: error: "echo behaviour undetermined"" 1>&2; exit 1; }
  fi
fi



# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103
echo "configure:1104: checking for $ac_word" >&5
1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$LEX"; then
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_LEX="flex"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
fi
fi
LEX="$ac_cv_prog_LEX"
if test -n "$LEX"; then
  echo "$ac_t""$LEX" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -z "$LEXLIB"
then
  case "$LEX" in
  flex*) ac_lib=fl ;;
  *) ac_lib=l ;;
  esac
1135
  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1136
echo "configure:1137: checking for yywrap in -l$ac_lib" >&5
1137
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1138 1139 1140 1141 1142 1143
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="-l$ac_lib  $LIBS"
cat > conftest.$ac_ext <<EOF
1144
#line 1145 "configure"
1145 1146 1147 1148 1149 1150
#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 yywrap();

1151
int main() {
1152 1153 1154
yywrap()
; return 0; }
EOF
1155
if { (eval echo configure:1156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1156 1157 1158
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1159 1160
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177
  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
  LEXLIB="-l$ac_lib"
else
  echo "$ac_t""no" 1>&6
fi

fi

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1178
echo "configure:1179: checking whether ln -s works" >&5
1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
  ac_cv_prog_LN_S="ln -s"
else
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1199
echo "configure:1200: checking whether ${MAKE-make} sets \${MAKE}" >&5
1200
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
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
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

# 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
1228
echo "configure:1229: checking for $ac_word" >&5
1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "find", so it can be a program name with args.
set dummy find; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1257
echo "configure:1258: checking for $ac_word" >&5
1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287
if eval "test \"`echo '$''{'ac_cv_path_find'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$find" in
  /*)
  ac_cv_path_find="$find" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_find="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
find="$ac_cv_path_find"
if test -n "$find"; then
  echo "$ac_t""$find" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "tar", so it can be a program name with args.
set dummy tar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1288
echo "configure:1289: checking for $ac_word" >&5
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318
if eval "test \"`echo '$''{'ac_cv_path_tar'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$tar" in
  /*)
  ac_cv_path_tar="$tar" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_tar="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
tar="$ac_cv_path_tar"
if test -n "$tar"; then
  echo "$ac_t""$tar" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "split", so it can be a program name with args.
set dummy split; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1319
echo "configure:1320: checking for $ac_word" >&5
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349
if eval "test \"`echo '$''{'ac_cv_path_split'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$split" in
  /*)
  ac_cv_path_split="$split" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_split="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
split="$ac_cv_path_split"
if test -n "$split"; then
  echo "$ac_t""$split" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "etags", so it can be a program name with args.
set dummy etags; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1350
echo "configure:1351: checking for $ac_word" >&5
1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380
if eval "test \"`echo '$''{'ac_cv_path_etags'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$etags" in
  /*)
  ac_cv_path_etags="$etags" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_etags="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
etags="$ac_cv_path_etags"
if test -n "$etags"; then
  echo "$ac_t""$etags" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "xargs", so it can be a program name with args.
set dummy xargs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1381
echo "configure:1382: checking for $ac_word" >&5
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408
if eval "test \"`echo '$''{'ac_cv_path_xargs'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$xargs" in
  /*)
  ac_cv_path_xargs="$xargs" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_xargs="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
xargs="$ac_cv_path_xargs"
if test -n "$xargs"; then
  echo "$ac_t""$xargs" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

1409 1410
# Extract the first word of "ipcs", so it can be a program name with args.
set dummy ipcs; ac_word=$2
1411
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1412
echo "configure:1413: checking for $ac_word" >&5
1413
if eval "test \"`echo '$''{'ac_cv_path_ipcs'+set}'`\" = set"; then
1414 1415
  echo $ac_n "(cached) $ac_c" 1>&6
else
1416
  case "$ipcs" in
1417
  /*)
1418
  ac_cv_path_ipcs="$ipcs" # Let the user override the test with a path.
1419 1420 1421 1422 1423 1424
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
1425
      ac_cv_path_ipcs="$ac_dir/$ac_word"
1426 1427 1428 1429 1430 1431 1432
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
1433 1434 1435
ipcs="$ac_cv_path_ipcs"
if test -n "$ipcs"; then
  echo "$ac_t""$ipcs" 1>&6
1436 1437 1438 1439
else
  echo "$ac_t""no" 1>&6
fi

1440 1441
# Extract the first word of "ipcrm", so it can be a program name with args.
set dummy ipcrm; ac_word=$2
1442
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1443
echo "configure:1444: checking for $ac_word" >&5
1444
if eval "test \"`echo '$''{'ac_cv_path_ipcrm'+set}'`\" = set"; then
1445 1446
  echo $ac_n "(cached) $ac_c" 1>&6
else
1447
  case "$ipcrm" in
1448
  /*)
1449
  ac_cv_path_ipcrm="$ipcrm" # Let the user override the test with a path.
1450 1451 1452 1453 1454 1455
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
1456
      ac_cv_path_ipcrm="$ac_dir/$ac_word"
1457 1458 1459 1460 1461 1462 1463
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
1464 1465 1466
ipcrm="$ac_cv_path_ipcrm"
if test -n "$ipcrm"; then
  echo "$ac_t""$ipcrm" 1>&6
1467 1468 1469 1470
else
  echo "$ac_t""no" 1>&6
fi

1471
for ac_prog in trbsd tr
1472 1473 1474
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
1475
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1476
echo "configure:1477: checking for $ac_word" >&5
1477
if eval "test \"`echo '$''{'ac_cv_path_TR'+set}'`\" = set"; then
1478 1479
  echo $ac_n "(cached) $ac_c" 1>&6
else
1480
  case "$TR" in
1481
  /*)
1482
  ac_cv_path_TR="$TR" # Let the user override the test with a path.
1483 1484 1485 1486 1487 1488
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
1489
      ac_cv_path_TR="$ac_dir/$ac_word"
1490 1491 1492 1493 1494 1495 1496
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
1497 1498 1499
TR="$ac_cv_path_TR"
if test -n "$TR"; then
  echo "$ac_t""$TR" 1>&6
1500 1501 1502 1503
else
  echo "$ac_t""no" 1>&6
fi

1504 1505 1506 1507
test -n "$TR" && break
done
test -n "$TR" || TR="NOT_FOUND"

1508

1509 1510
TRSTRINGS=`echo ABCdef | $TR 'a-z' 'A-Z' 2>/dev/null | grep ABCDEF`
TRCLASS=`echo ABCdef | $TR ':lower:' ':upper:' 2>/dev/null | grep ABCDEF`
1511 1512 1513 1514 1515 1516 1517 1518 1519 1520

if test "$TRSTRINGS" = "ABCDEF"; then
  TRARGS="'[a-z]' '[A-Z]'"
elif test "$TRCLASS" = "ABCDEF"; then
  TRARGS="\"[:lower:]\" \"[:upper:]\""
else
  { echo "configure: error: "Can\'t find method to covert from upper to lower case with tr"" 1>&2; exit 1; }
fi


1521 1522 1523 1524 1525 1526



# Extract the first word of "yacc", so it can be a program name with args.
set dummy yacc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1527
echo "configure:1528: checking for $ac_word" >&5
1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557
if eval "test \"`echo '$''{'ac_cv_path_yacc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$yacc" in
  /*)
  ac_cv_path_yacc="$yacc" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_yacc="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
yacc="$ac_cv_path_yacc"
if test -n "$yacc"; then
  echo "$ac_t""$yacc" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1558
echo "configure:1559: checking for $ac_word" >&5
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600
if eval "test \"`echo '$''{'ac_cv_path_bison'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$bison" in
  /*)
  ac_cv_path_bison="$bison" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_bison="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
bison="$ac_cv_path_bison"
if test -n "$bison"; then
  echo "$ac_t""$bison" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -f "$YACC" 
then
	echo "- Using $YACC $YFLAGS"
elif test -f "$bison"
then
	echo "- Using $bison -y $YFLAGS"
	YACC="$bison"
	YFLAGS="-y $YFLAGS"
	export YACC YFLAGS
else
	echo "- Using $yacc $YFLAGS"
	YACC="$yacc"
	export YACC
fi

1601
echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
1602
echo "configure:1603: checking for main in -lcurses" >&5
1603
ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
1604 1605 1606 1607
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"
M
Marc G. Fournier 已提交
1608
LIBS="-lcurses  $LIBS"
1609
cat > conftest.$ac_ext <<EOF
1610
#line 1611 "configure"
1611 1612
#include "confdefs.h"

1613
int main() {
1614 1615 1616
main()
; return 0; }
EOF
1617
if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1618 1619 1620
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1621 1622
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1623 1624 1625 1626 1627 1628 1629 1630 1631
  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
1632 1633
    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1634 1635 1636 1637
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

M
Marc G. Fournier 已提交
1638
  LIBS="-lcurses $LIBS"
1639 1640 1641 1642 1643

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

1644
echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
1645
echo "configure:1646: checking for main in -ltermcap" >&5
1646
ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
1647 1648 1649 1650
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"
M
Marc G. Fournier 已提交
1651
LIBS="-ltermcap  $LIBS"
1652
cat > conftest.$ac_ext <<EOF
1653
#line 1654 "configure"
1654 1655
#include "confdefs.h"

1656
int main() {
M
Marc G. Fournier 已提交
1657
main()
1658 1659
; return 0; }
EOF
1660
if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1661 1662 1663
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1664 1665
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1666 1667 1668 1669 1670 1671 1672 1673 1674
  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
1675 1676
    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
M
Marc G. Fournier 已提交
1677 1678
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
1679 1680
EOF

M
Marc G. Fournier 已提交
1681 1682
  LIBS="-ltermcap $LIBS"

1683 1684 1685 1686
else
  echo "$ac_t""no" 1>&6
fi

1687
echo $ac_n "checking for main in -lhistory""... $ac_c" 1>&6
1688
echo "configure:1689: checking for main in -lhistory" >&5
1689
ac_lib_var=`echo history'_'main | sed 'y%./+-%__p_%'`
1690 1691 1692 1693 1694 1695
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="-lhistory  $LIBS"
cat > conftest.$ac_ext <<EOF
1696
#line 1697 "configure"
1697 1698
#include "confdefs.h"

1699
int main() {
1700 1701 1702
main()
; return 0; }
EOF
1703
if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1704 1705 1706
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1707 1708
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1709 1710 1711 1712 1713 1714 1715 1716 1717
  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
1718 1719
    ac_tr_lib=HAVE_LIB`echo history | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1720 1721 1722 1723 1724 1725 1726 1727 1728 1729
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lhistory $LIBS"

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

1730
echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
1731
echo "configure:1732: checking for main in -lreadline" >&5
1732
ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
1733 1734 1735 1736
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"
M
Marc G. Fournier 已提交
1737
LIBS="-lreadline  $LIBS"
1738
cat > conftest.$ac_ext <<EOF
1739
#line 1740 "configure"
1740 1741
#include "confdefs.h"

1742
int main() {
1743 1744 1745
main()
; return 0; }
EOF
1746
if { (eval echo configure:1747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1747 1748 1749
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1750 1751
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1752 1753 1754 1755 1756 1757 1758 1759 1760
  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
1761 1762
    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1763 1764 1765 1766
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

M
Marc G. Fournier 已提交
1767
  LIBS="-lreadline $LIBS"
1768 1769 1770 1771 1772

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

1773
echo $ac_n "checking for write_history in -lreadline""... $ac_c" 1>&6
1774
echo "configure:1775: checking for write_history in -lreadline" >&5
1775
ac_lib_var=`echo readline'_'write_history | sed 'y%./+-%__p_%'`
1776 1777 1778 1779
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"
M
Marc G. Fournier 已提交
1780
LIBS="-lreadline  $LIBS"
1781
cat > conftest.$ac_ext <<EOF
1782
#line 1783 "configure"
1783
#include "confdefs.h"
M
Marc G. Fournier 已提交
1784 1785 1786 1787
/* 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 write_history();
1788

1789
int main() {
M
Marc G. Fournier 已提交
1790
write_history()
1791 1792
; return 0; }
EOF
1793
if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1794 1795 1796
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1797 1798
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1799 1800 1801 1802 1803 1804 1805 1806 1807
  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
M
Marc G. Fournier 已提交
1808 1809
  cat >> confdefs.h <<\EOF
#define HAVE_HISTORY 1
1810 1811 1812 1813 1814 1815
EOF

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

1816
echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
1817
echo "configure:1818: checking for main in -lbsd" >&5
1818
ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
1819 1820 1821 1822
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"
1823
LIBS="-lbsd  $LIBS"
1824
cat > conftest.$ac_ext <<EOF
1825
#line 1826 "configure"
1826 1827
#include "confdefs.h"

1828
int main() {
1829 1830 1831
main()
; return 0; }
EOF
1832
if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1833 1834 1835
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1836 1837
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1838 1839 1840 1841 1842 1843 1844 1845 1846
  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
1847
    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1848
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1849 1850 1851 1852
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

1853
  LIBS="-lbsd $LIBS"
1854 1855 1856 1857 1858

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

1859
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
1860
echo "configure:1861: checking for main in -lm" >&5
1861
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
1862 1863 1864 1865
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"
1866
LIBS="-lm  $LIBS"
1867
cat > conftest.$ac_ext <<EOF
1868
#line 1869 "configure"
1869 1870
#include "confdefs.h"

1871
int main() {
1872 1873 1874
main()
; return 0; }
EOF
1875
if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1876 1877 1878
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1879 1880
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1881 1882 1883 1884 1885 1886 1887 1888 1889
  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
1890
    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1891
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1892 1893 1894 1895
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

1896
  LIBS="-lm $LIBS"
1897 1898 1899 1900 1901

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

1902
echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
1903
echo "configure:1904: checking for main in -ldl" >&5
1904
ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
1905 1906 1907 1908
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"
1909
LIBS="-ldl  $LIBS"
1910
cat > conftest.$ac_ext <<EOF
1911
#line 1912 "configure"
1912 1913
#include "confdefs.h"

1914
int main() {
1915 1916 1917
main()
; return 0; }
EOF
1918
if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1919 1920 1921
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1922 1923
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1924 1925 1926 1927 1928 1929 1930 1931 1932
  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
1933
    ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1934
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1935 1936 1937 1938
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

1939
  LIBS="-ldl $LIBS"
1940 1941 1942 1943 1944

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

1945
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1946
echo "configure:1947: checking for main in -lsocket" >&5
1947
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1948 1949 1950 1951
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"
1952
LIBS="-lsocket  $LIBS"
1953
cat > conftest.$ac_ext <<EOF
1954
#line 1955 "configure"
1955 1956
#include "confdefs.h"

1957
int main() {
1958 1959 1960
main()
; return 0; }
EOF
1961
if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1962 1963 1964
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1965 1966
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1967 1968 1969 1970 1971 1972 1973 1974 1975
  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
1976
    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1977
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1978 1979 1980 1981
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

1982
  LIBS="-lsocket $LIBS"
1983 1984 1985 1986 1987

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

1988
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1989
echo "configure:1990: checking for main in -lnsl" >&5
1990
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1991 1992 1993 1994
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"
1995
LIBS="-lnsl  $LIBS"
1996
cat > conftest.$ac_ext <<EOF
1997
#line 1998 "configure"
1998 1999
#include "confdefs.h"

2000
int main() {
2001 2002 2003
main()
; return 0; }
EOF
2004
if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2005 2006 2007
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2008 2009
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2010 2011 2012 2013 2014 2015 2016 2017 2018
  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
2019
    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2020
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2021 2022 2023 2024
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

2025
  LIBS="-lnsl $LIBS"
2026 2027 2028 2029 2030

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

2031
echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
2032
echo "configure:2033: checking for main in -lipc" >&5
2033
ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
2034 2035 2036 2037
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"
2038
LIBS="-lipc  $LIBS"
2039
cat > conftest.$ac_ext <<EOF
2040
#line 2041 "configure"
2041 2042
#include "confdefs.h"

2043
int main() {
2044 2045 2046
main()
; return 0; }
EOF
2047
if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2048 2049 2050
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2051 2052
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2053 2054 2055 2056 2057 2058 2059 2060 2061
  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
2062
    ac_tr_lib=HAVE_LIB`echo ipc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2063
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2064 2065 2066 2067
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

2068
  LIBS="-lipc $LIBS"
2069 2070 2071 2072 2073

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

2074
echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
2075
echo "configure:2076: checking for main in -lIPC" >&5
2076
ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
2077 2078 2079 2080
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"
2081
LIBS="-lIPC  $LIBS"
2082
cat > conftest.$ac_ext <<EOF
2083
#line 2084 "configure"
2084 2085
#include "confdefs.h"

2086
int main() {
2087 2088 2089
main()
; return 0; }
EOF
2090
if { (eval echo configure:2091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2091 2092 2093
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2094 2095
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2096 2097 2098 2099 2100 2101 2102 2103 2104
  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
2105
    ac_tr_lib=HAVE_LIB`echo IPC | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2106
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2107 2108 2109 2110
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

2111
  LIBS="-lIPC $LIBS"
2112 2113 2114 2115 2116

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

2117
echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
2118
echo "configure:2119: checking for main in -llc" >&5
2119
ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
2120 2121 2122 2123
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"
2124
LIBS="-llc  $LIBS"
2125
cat > conftest.$ac_ext <<EOF
2126
#line 2127 "configure"
2127 2128
#include "confdefs.h"

2129
int main() {
2130 2131 2132
main()
; return 0; }
EOF
2133
if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2134 2135 2136
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2137 2138
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2139 2140 2141 2142 2143 2144 2145 2146 2147
  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
2148
    ac_tr_lib=HAVE_LIB`echo lc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2149
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2150 2151 2152 2153
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

2154
  LIBS="-llc $LIBS"
2155 2156 2157 2158 2159

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

2160
echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
2161
echo "configure:2162: checking for main in -ldld" >&5
2162
ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
2163 2164 2165 2166
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"
2167
LIBS="-ldld  $LIBS"
2168
cat > conftest.$ac_ext <<EOF
2169
#line 2170 "configure"
2170 2171
#include "confdefs.h"

2172
int main() {
2173 2174 2175
main()
; return 0; }
EOF
2176
if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2177 2178 2179
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2180 2181
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2182 2183 2184 2185 2186 2187 2188 2189 2190
  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
2191
    ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2192
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2193 2194 2195 2196
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

2197
  LIBS="-ldld $LIBS"
2198 2199 2200 2201 2202

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

2203
echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
2204
echo "configure:2205: checking for main in -lln" >&5
2205
ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
2206 2207 2208 2209
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"
2210
LIBS="-lln  $LIBS"
2211
cat > conftest.$ac_ext <<EOF
2212
#line 2213 "configure"
2213 2214
#include "confdefs.h"

2215
int main() {
2216 2217 2218
main()
; return 0; }
EOF
2219
if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2220 2221 2222
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2223 2224
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2225 2226 2227 2228 2229 2230 2231 2232 2233
  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
2234
    ac_tr_lib=HAVE_LIB`echo ln | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2235
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2236 2237 2238 2239
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

2240
  LIBS="-lln $LIBS"
2241 2242 2243 2244 2245

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

2246
echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
2247
echo "configure:2248: checking for main in -lld" >&5
2248
ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
2249 2250 2251 2252 2253 2254
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="-lld  $LIBS"
cat > conftest.$ac_ext <<EOF
2255
#line 2256 "configure"
2256 2257
#include "confdefs.h"

2258
int main() {
2259 2260 2261
main()
; return 0; }
EOF
2262
if { (eval echo configure:2263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2263 2264 2265
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2266 2267
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2268 2269 2270 2271 2272 2273 2274 2275 2276
  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
2277 2278
    ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2279 2280 2281 2282 2283 2284 2285 2286 2287 2288
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lld $LIBS"

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

2289
echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
2290
echo "configure:2291: checking for main in -lcompat" >&5
2291
ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
2292 2293 2294 2295 2296 2297
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="-lcompat  $LIBS"
cat > conftest.$ac_ext <<EOF
2298
#line 2299 "configure"
2299 2300
#include "confdefs.h"

2301
int main() {
2302 2303 2304
main()
; return 0; }
EOF
2305
if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2306 2307 2308
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2309 2310
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2311 2312 2313 2314 2315 2316 2317 2318 2319
  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
2320 2321
    ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2322 2323 2324 2325 2326 2327 2328 2329 2330 2331
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcompat $LIBS"

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

2332
echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
2333
echo "configure:2334: checking for main in -lBSD" >&5
2334
ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
2335 2336 2337 2338 2339 2340
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="-lBSD  $LIBS"
cat > conftest.$ac_ext <<EOF
2341
#line 2342 "configure"
2342 2343
#include "confdefs.h"

2344
int main() {
2345 2346 2347
main()
; return 0; }
EOF
2348
if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2349 2350 2351
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2352 2353
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2354 2355 2356 2357 2358 2359 2360 2361 2362
  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
2363 2364
    ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2365 2366 2367 2368 2369 2370 2371 2372 2373 2374
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lBSD $LIBS"

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

2375
echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
2376
echo "configure:2377: checking for main in -lcrypt" >&5
2377
ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
M
Marc G. Fournier 已提交
2378 2379 2380 2381 2382 2383
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="-lcrypt  $LIBS"
cat > conftest.$ac_ext <<EOF
2384
#line 2385 "configure"
M
Marc G. Fournier 已提交
2385 2386
#include "confdefs.h"

2387
int main() {
M
Marc G. Fournier 已提交
2388 2389 2390
main()
; return 0; }
EOF
2391
if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
M
Marc G. Fournier 已提交
2392 2393 2394
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2395 2396
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
M
Marc G. Fournier 已提交
2397 2398 2399 2400 2401 2402 2403 2404 2405
  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
2406 2407
    ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
M
Marc G. Fournier 已提交
2408 2409 2410 2411 2412 2413 2414 2415 2416 2417
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcrypt $LIBS"

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

2418
echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2419
echo "configure:2420: checking for main in -lgen" >&5
2420 2421 2422 2423 2424 2425 2426
ac_lib_var=`echo gen'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lgen  $LIBS"
cat > conftest.$ac_ext <<EOF
2427
#line 2428 "configure"
2428 2429 2430 2431 2432 2433
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
2434
if { (eval echo configure:2435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

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

  LIBS="-lgen $LIBS"

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

2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503
echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
echo "configure:2463: checking for main in -lPW" >&5
ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lPW  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2471 "configure"
#include "confdefs.h"

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

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

  LIBS="-lPW $LIBS"

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

M
Marc G. Fournier 已提交
2504

2505
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2506
echo "configure:2507: checking for ANSI C header files" >&5
2507 2508 2509 2510
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2511
#line 2512 "configure"
2512 2513 2514 2515 2516 2517 2518
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2519
{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2520 2521 2522 2523 2524 2525
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
2526 2527
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2528 2529 2530 2531 2532 2533 2534 2535
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
2536
#line 2537 "configure"
2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
2554
#line 2555 "configure"
2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  :
else
2574
  cat > conftest.$ac_ext <<EOF
2575
#line 2576 "configure"
2576 2577 2578 2579 2580 2581 2582 2583 2584 2585
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
2586
if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2587
then
2588 2589
  :
else
2590 2591 2592
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
2593 2594
  ac_cv_header_stdc=no
fi
M
Marc G. Fournier 已提交
2595
rm -fr conftest*
2596 2597
fi

2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609
fi
fi

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

fi

echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2610
echo "configure:2611: checking for sys/wait.h that is POSIX.1 compatible" >&5
2611 2612 2613 2614
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2615
#line 2616 "configure"
2616 2617 2618 2619 2620 2621 2622 2623 2624
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
#ifndef WEXITSTATUS
#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
#endif
2625
int main() {
2626 2627 2628 2629 2630
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
2631
if { (eval echo configure:2632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2632 2633 2634
  rm -rf conftest*
  ac_cv_header_sys_wait_h=yes
else
2635 2636
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652
  rm -rf conftest*
  ac_cv_header_sys_wait_h=no
fi
rm -f conftest*
fi

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

fi

for ac_hdr in limits.h unistd.h termios.h values.h sys/select.h
do
2653
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2654
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2655
echo "configure:2656: checking for $ac_hdr" >&5
2656 2657 2658 2659
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
2660
#line 2661 "configure"
2661 2662 2663 2664
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2665
{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

2691
for ac_hdr in sys/resource.h netdb.h
2692 2693 2694
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2695
echo "configure:2696: checking for $ac_hdr" >&5
2696 2697 2698 2699
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
2700
#line 2701 "configure"
2701 2702 2703 2704
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2705
{ (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2706 2707 2708 2709 2710 2711
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
2712 2713
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2714 2715 2716 2717 2718 2719 2720
  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
2721
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2722 2723 2724 2725 2726 2727 2728 2729 2730
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done

M
Marc G. Fournier 已提交
2731
for ac_hdr in readline.h history.h dld.h crypt.h endian.h float.h
2732
do
2733
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2734
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2735
echo "configure:2736: checking for $ac_hdr" >&5
2736 2737 2738 2739
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
2740
#line 2741 "configure"
2741 2742 2743 2744
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2745
{ (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2746 2747 2748 2749 2750 2751
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
2752 2753
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2754 2755 2756 2757 2758 2759 2760
  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
2761
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for working const""... $ac_c" 1>&6
2773
echo "configure:2774: checking for working const" >&5
2774 2775 2776 2777
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2778
#line 2779 "configure"
2779 2780
#include "confdefs.h"

2781
int main() {
2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826

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

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

; return 0; }
EOF
2827
if { (eval echo configure:2828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2828 2829 2830
  rm -rf conftest*
  ac_cv_c_const=yes
else
2831 2832
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

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

fi

echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2848
echo "configure:2849: checking for uid_t in sys/types.h" >&5
2849 2850 2851 2852
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2853
#line 2854 "configure"
2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881
#include "confdefs.h"
#include <sys/types.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "uid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_uid_t=yes
else
  rm -rf conftest*
  ac_cv_type_uid_t=no
fi
rm -f conftest*

fi

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

  cat >> confdefs.h <<\EOF
#define gid_t int
EOF

fi

echo $ac_n "checking for inline""... $ac_c" 1>&6
2882
echo "configure:2883: checking for inline" >&5
2883 2884 2885 2886 2887 2888
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
  cat > conftest.$ac_ext <<EOF
2889
#line 2890 "configure"
2890 2891
#include "confdefs.h"

2892
int main() {
2893 2894 2895
} $ac_kw foo() {
; return 0; }
EOF
2896
if { (eval echo configure:2897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2897 2898
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
2899 2900 2901
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921
fi
rm -f conftest*
done

fi

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

echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2922
echo "configure:2923: checking for mode_t" >&5
2923 2924 2925 2926
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2927
#line 2928 "configure"
2928 2929 2930 2931
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2932
#include <stddef.h>
2933 2934 2935
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2936
  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954
  rm -rf conftest*
  ac_cv_type_mode_t=yes
else
  rm -rf conftest*
  ac_cv_type_mode_t=no
fi
rm -f conftest*

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

fi

echo $ac_n "checking for off_t""... $ac_c" 1>&6
2955
echo "configure:2956: checking for off_t" >&5
2956 2957 2958 2959
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2960
#line 2961 "configure"
2961 2962 2963 2964
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2965
#include <stddef.h>
2966 2967 2968
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2969
  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987
  rm -rf conftest*
  ac_cv_type_off_t=yes
else
  rm -rf conftest*
  ac_cv_type_off_t=no
fi
rm -f conftest*

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

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
2988
echo "configure:2989: checking for size_t" >&5
2989 2990 2991 2992
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2993
#line 2994 "configure"
2994 2995 2996 2997
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2998
#include <stddef.h>
2999 3000 3001
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3002
  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020
  rm -rf conftest*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

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

fi

echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3021
echo "configure:3022: checking whether time.h and sys/time.h may both be included" >&5
3022 3023 3024 3025
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3026
#line 3027 "configure"
3027 3028 3029 3030
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
3031
int main() {
3032 3033 3034
struct tm *tp;
; return 0; }
EOF
3035
if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036 3037 3038
  rm -rf conftest*
  ac_cv_header_time=yes
else
3039 3040
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

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

fi

echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3056
echo "configure:3057: checking whether struct tm is in sys/time.h or time.h" >&5
3057 3058 3059 3060
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3061
#line 3062 "configure"
3062 3063 3064
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
3065
int main() {
3066 3067 3068
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
3069
if { (eval echo configure:3070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3070 3071 3072
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
3073 3074
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089
  rm -rf conftest*
  ac_cv_struct_tm=sys/time.h
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_struct_tm" 1>&6
if test $ac_cv_struct_tm = sys/time.h; then
  cat >> confdefs.h <<\EOF
#define TM_IN_SYS_TIME 1
EOF

fi


3090
echo $ac_n "checking for int timezone""... $ac_c" 1>&6
3091
echo "configure:3092: checking for int timezone" >&5
3092
cat > conftest.$ac_ext <<EOF
3093
#line 3094 "configure"
3094 3095
#include "confdefs.h"
#include <time.h>
3096
int main() {
3097 3098 3099
int res = timezone / 60; 
; return 0; }
EOF
3100
if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3101 3102 3103 3104
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_INT_TIMEZONE 1
EOF
3105
 echo "$ac_t""yes" 1>&6
3106
else
3107 3108
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3109 3110 3111 3112
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
3113

3114
echo $ac_n "checking for union semun""... $ac_c" 1>&6
3115
echo "configure:3116: checking for union semun" >&5
3116
cat > conftest.$ac_ext <<EOF
3117
#line 3118 "configure"
3118 3119
#include "confdefs.h"
#include <sys/types.h>
3120
#include <sys/ipc.h>
3121
#include <sys/sem.h>
3122
int main() {
3123 3124 3125
union semun semun;
; return 0; }
EOF
3126
if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3127 3128 3129 3130 3131
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_UNION_SEMUN 1
EOF
 echo "$ac_t""yes" 1>&6
3132
else
3133 3134
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3135 3136
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
3137 3138 3139 3140 3141
fi
rm -f conftest*

if test $ac_cv_prog_gcc = yes; then
    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3142
echo "configure:3143: checking whether ${CC-cc} needs -traditional" >&5
3143 3144 3145 3146 3147
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    ac_pattern="Autoconf.*'x'"
  cat > conftest.$ac_ext <<EOF
3148
#line 3149 "configure"
3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=yes
else
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=no
fi
rm -f conftest*


  if test $ac_cv_prog_gcc_traditional = no; then
    cat > conftest.$ac_ext <<EOF
3166
#line 3167 "configure"
3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "$ac_pattern" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_prog_gcc_traditional=yes
fi
rm -f conftest*

  fi
fi

echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  if test $ac_cv_prog_gcc_traditional = yes; then
    CC="$CC -traditional"
  fi
fi

echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3188
echo "configure:3189: checking for 8-bit clean memcmp" >&5
3189
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3190 3191 3192
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
3193
  ac_cv_func_memcmp_clean=no
3194
else
3195
  cat > conftest.$ac_ext <<EOF
3196
#line 3197 "configure"
3197 3198 3199 3200 3201 3202 3203 3204 3205
#include "confdefs.h"

main()
{
  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}

EOF
3206
if { (eval echo configure:3207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3207 3208
then
  ac_cv_func_memcmp_clean=yes
3209
else
3210 3211 3212 3213
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_memcmp_clean=no
3214
fi
M
Marc G. Fournier 已提交
3215
rm -fr conftest*
3216 3217
fi

3218 3219 3220 3221
fi

echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
3222 3223

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3224
echo "configure:3225: checking return type of signal handlers" >&5
3225 3226 3227 3228
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3229
#line 3230 "configure"
3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
#undef signal
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

3242
int main() {
3243 3244 3245
int i;
; return 0; }
EOF
3246
if { (eval echo configure:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3247 3248 3249
  rm -rf conftest*
  ac_cv_type_signal=void
else
3250 3251
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264
  rm -rf conftest*
  ac_cv_type_signal=int
fi
rm -f conftest*
fi

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


echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3265
echo "configure:3266: checking for vprintf" >&5
3266 3267 3268 3269
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3270
#line 3271 "configure"
3271 3272 3273 3274 3275 3276 3277 3278 3279
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char vprintf(); 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 vprintf();

3280
int main() {
3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292

/* 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_vprintf) || defined (__stub___vprintf)
choke me
#else
vprintf();
#endif

; return 0; }
EOF
3293
if { (eval echo configure:3294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3294 3295 3296
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
3297 3298
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3299 3300 3301 3302
  rm -rf conftest*
  eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3303
fi
3304

3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316
if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_VPRINTF 1
EOF

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

if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3317
echo "configure:3318: checking for _doprnt" >&5
3318 3319 3320 3321
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3322
#line 3323 "configure"
3323 3324 3325 3326 3327 3328 3329 3330 3331
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char _doprnt(); 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 _doprnt();

3332
int main() {
3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344

/* 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__doprnt) || defined (__stub____doprnt)
choke me
#else
_doprnt();
#endif

; return 0; }
EOF
3345
if { (eval echo configure:3346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3346 3347 3348
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
3349 3350
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3351 3352 3353 3354
  rm -rf conftest*
  eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3355
fi
3356

3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371
if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_DOPRNT 1
EOF

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

fi

for ac_func in isinf tzset getrusage vfork memmove sigsetjmp kill sysconf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3372
echo "configure:3373: checking for $ac_func" >&5
3373 3374 3375 3376
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
3377
#line 3378 "configure"
3378 3379 3380 3381 3382 3383 3384 3385 3386
#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();

3387
int main() {
3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399

/* 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
3400
if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3401 3402 3403
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
3404 3405
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3406 3407 3408 3409
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3410
fi
3411

3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423
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

3424
for ac_func in sigprocmask waitpid setsid random fcvt
3425 3426
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3427
echo "configure:3428: checking for $ac_func" >&5
3428 3429 3430 3431
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
3432
#line 3433 "configure"
3433 3434 3435 3436 3437 3438 3439 3440 3441
#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();

3442
int main() {
3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454

/* 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
3455
if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3456 3457 3458
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
3459 3460
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3461 3462 3463 3464
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3465
fi
3466

3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478
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

3479
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3480
echo "configure:3481: checking for inet_aton" >&5
3481 3482 3483 3484
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3485
#line 3486 "configure"
3486 3487 3488 3489 3490 3491 3492 3493 3494
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char inet_aton(); 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 inet_aton();

3495
int main() {
3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507

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

; return 0; }
EOF
3508
if { (eval echo configure:3509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3509 3510 3511
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=yes"
else
3512 3513
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3514 3515 3516 3517
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3518
fi
3519

3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530
if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_INET_ATON 1
EOF

else
  echo "$ac_t""no" 1>&6
INET_ATON='inet_aton.o'
fi

3531
echo $ac_n "checking for strerror""... $ac_c" 1>&6
3532
echo "configure:3533: checking for strerror" >&5
3533 3534 3535 3536
if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3537
#line 3538 "configure"
3538 3539 3540 3541 3542 3543 3544 3545 3546
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strerror(); 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 strerror();

3547
int main() {
3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559

/* 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_strerror) || defined (__stub___strerror)
choke me
#else
strerror();
#endif

; return 0; }
EOF
3560
if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3561 3562 3563
  rm -rf conftest*
  eval "ac_cv_func_strerror=yes"
else
3564 3565
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3566 3567 3568 3569 3570
  rm -rf conftest*
  eval "ac_cv_func_strerror=no"
fi
rm -f conftest*
fi
3571

3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582
if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_STRERROR 1
EOF

else
  echo "$ac_t""no" 1>&6
STRERROR='strerror.o'
fi

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
echo $ac_n "checking for strerror""... $ac_c" 1>&6
echo "configure:3585: checking for strerror" >&5
if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 3590 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strerror(); 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 strerror();

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_strerror) || defined (__stub___strerror)
choke me
#else
strerror();
#endif

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

if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
3627 3628
#define HAVE_STRERROR 1
EOF
3629 3630 3631 3632 3633 3634

else
  echo "$ac_t""no" 1>&6
STRERROR2='../../backend/port/strerror.o'
fi

3635
echo $ac_n "checking for strdup""... $ac_c" 1>&6
3636
echo "configure:3637: checking for strdup" >&5
3637 3638 3639 3640
if eval "test \"`echo '$''{'ac_cv_func_strdup'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3641
#line 3642 "configure"
3642 3643 3644 3645 3646 3647 3648 3649 3650
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char strdup(); 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 strdup();

3651
int main() {
3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663

/* 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_strdup) || defined (__stub___strdup)
choke me
#else
strdup();
#endif

; return 0; }
EOF
3664
if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3665 3666 3667
  rm -rf conftest*
  eval "ac_cv_func_strdup=yes"
else
3668 3669
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3670 3671 3672 3673
  rm -rf conftest*
  eval "ac_cv_func_strdup=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3674
fi
3675

3676 3677
if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3678
  cat >> confdefs.h <<\EOF
3679 3680 3681
#define HAVE_STRDUP 1
EOF

3682 3683
else
  echo "$ac_t""no" 1>&6
3684
STRDUP='../../utils/strdup.o'
3685 3686 3687
fi


3688

3689

3690

3691
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
3692
echo "configure:3693: checking for cbrt" >&5
3693 3694 3695 3696
if eval "test \"`echo '$''{'ac_cv_func_cbrt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3697
#line 3698 "configure"
3698 3699 3700 3701 3702 3703 3704 3705 3706
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char cbrt(); 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 cbrt();

3707
int main() {
3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719

/* 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_cbrt) || defined (__stub___cbrt)
choke me
#else
cbrt();
#endif

; return 0; }
EOF
3720
if { (eval echo configure:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3721 3722 3723
  rm -rf conftest*
  eval "ac_cv_func_cbrt=yes"
else
3724 3725
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3726 3727 3728 3729
  rm -rf conftest*
  eval "ac_cv_func_cbrt=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3730
fi
3731

3732 3733 3734 3735 3736 3737 3738 3739
if eval "test \"`echo '$ac_cv_func_'cbrt`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_CBRT 1
EOF

else
  echo "$ac_t""no" 1>&6
3740
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
3741
echo "configure:3742: checking for cbrt in -lm" >&5
3742
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
3743 3744 3745 3746 3747 3748
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
3749
#line 3750 "configure"
3750 3751 3752 3753 3754 3755
#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 cbrt();

3756
int main() {
3757 3758 3759
cbrt()
; return 0; }
EOF
3760
if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3761 3762 3763
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
3764 3765
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785
  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
#define HAVE_CBRT 1
EOF

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

fi

echo $ac_n "checking for rint""... $ac_c" 1>&6
3786
echo "configure:3787: checking for rint" >&5
3787 3788 3789 3790
if eval "test \"`echo '$''{'ac_cv_func_rint'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3791
#line 3792 "configure"
3792 3793 3794 3795 3796 3797 3798 3799 3800
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char rint(); 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 rint();

3801
int main() {
3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813

/* 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_rint) || defined (__stub___rint)
choke me
#else
rint();
#endif

; return 0; }
EOF
3814
if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3815 3816 3817
  rm -rf conftest*
  eval "ac_cv_func_rint=yes"
else
3818 3819
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3820 3821 3822 3823
  rm -rf conftest*
  eval "ac_cv_func_rint=no"
fi
rm -f conftest*
M
Marc G. Fournier 已提交
3824
fi
3825

3826 3827 3828 3829 3830 3831 3832 3833
if eval "test \"`echo '$ac_cv_func_'rint`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_RINT 1
EOF

else
  echo "$ac_t""no" 1>&6
3834
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
3835
echo "configure:3836: checking for rint in -lm" >&5
3836
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
3837 3838 3839 3840 3841 3842
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
3843
#line 3844 "configure"
3844 3845 3846 3847 3848 3849
#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 rint();

3850
int main() {
3851 3852 3853
rint()
; return 0; }
EOF
3854
if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3855 3856 3857
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
3858 3859
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879
  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
#define HAVE_RINT 1
EOF

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

fi


3880
echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
3881
echo "configure:3882: checking setting USE_LOCALE" >&5
3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892
if test "$USE_LOCALE" = "yes"
then
	echo "$ac_t""enabled" 1>&6
	cat >> confdefs.h <<\EOF
#define USE_LOCALE 1
EOF

else
	echo "$ac_t""disabled" 1>&6
fi
echo $ac_n "checking setting DEF_PGPORT""... $ac_c" 1>&6
3893
echo "configure:3894: checking setting DEF_PGPORT" >&5
3894 3895 3896 3897 3898 3899
cat >> confdefs.h <<EOF
#define DEF_PGPORT "${DEF_PGPORT}"
EOF

echo "$ac_t""$DEF_PGPORT" 1>&6
echo $ac_n "checking setting HBA""... $ac_c" 1>&6
3900
echo "configure:3901: checking setting HBA" >&5
3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912
if test "$NOHBA" = "no"
then
        echo "$ac_t""enabled" 1>&6
        cat >> confdefs.h <<\EOF
#define HBA 1
EOF

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


3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929
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
3930 3931 3932
# 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.
3933 3934 3935
# 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 |
3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948
  case `(ac_space=' '; set) 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
3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002
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
fi
rm -f confcache

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

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# 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

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

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`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

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)
4003
    echo "$CONFIG_STATUS generated by autoconf version 2.12"
4004 4005 4006 4007 4008 4009 4010 4011 4012
    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

M
Marc G. Fournier 已提交
4013
trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049
EOF
cat >> $CONFIG_STATUS <<EOF

# 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%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%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%@CC@%$CC%g
s%@CPP@%$CPP%g
M
Marc G. Fournier 已提交
4050 4051
s%@PORTNAME@%$PORTNAME%g
s%@AROPT@%$AROPT%g
4052 4053 4054
s%@SHARED_LIB@%$SHARED_LIB%g
s%@DLSUFFIX@%$DLSUFFIX%g
s%@DL_LIB@%$DL_LIB%g
4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073
s%@HAVECXX@%$HAVECXX%g
s%@INSTALL@%$INSTALL%g
s%@INSTLOPTS@%$INSTLOPTS%g
s%@INSTL_LIB_OPTS@%$INSTL_LIB_OPTS%g
s%@INSTL_EXE_OPTS@%$INSTL_EXE_OPTS%g
s%@DASH_N@%$DASH_N%g
s%@BACKSLASH_C@%$BACKSLASH_C%g
s%@LEX@%$LEX%g
s%@LEXLIB@%$LEXLIB%g
s%@LN_S@%$LN_S%g
s%@SET_MAKE@%$SET_MAKE%g
s%@RANLIB@%$RANLIB%g
s%@find@%$find%g
s%@tar@%$tar%g
s%@split@%$split%g
s%@etags@%$etags%g
s%@xargs@%$xargs%g
s%@ipcs@%$ipcs%g
s%@ipcrm@%$ipcrm%g
4074
s%@TR@%$TR%g
4075
s%@TRARGS@%$TRARGS%g
4076 4077 4078 4079
s%@YACC@%$YACC%g
s%@YFLAGS@%$YFLAGS%g
s%@yacc@%$yacc%g
s%@bison@%$bison%g
4080
s%@LIBOBJS@%$LIBOBJS%g
4081
s%@STRDUP@%$STRDUP%g
4082
s%@INET_ATON@%$INET_ATON%g
4083
s%@STRERROR@%$STRERROR%g
4084
s%@STRERROR2@%$STRERROR2%g
4085 4086 4087

CEOF
EOF
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 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123

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"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

4124 4125
cat >> $CONFIG_STATUS <<EOF

M
Marc G. Fournier 已提交
4126
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh"}
4127 4128 4129
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4130
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4131
  case "$ac_file" in
4132
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4133 4134 4135 4136
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

4137
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160

  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  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" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

4161

4162 4163 4164 4165 4166 4167 4168 4169
  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
4170 4171

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4172 4173 4174 4175
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
4176
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4177
fi; done
4178
rm -f conftest.s*
4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198

# 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.
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'
ac_uC=' '
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'

4199 4200 4201 4202 4203 4204 4205
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
4206
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4207
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4208
  case "$ac_file" in
4209
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4210 4211 4212 4213 4214 4215 4216
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
4217 4218
  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
4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286

EOF

# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

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

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

rm -f conftest.tail
while :
do
  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
  echo 'CEOF
  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
done
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
  else
    # 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"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

4287 4288 4289
EOF

cat >> $CONFIG_STATUS <<EOF
4290 4291
ac_sources="include/port/${PORTNAME}.h makefiles/Makefile.${PORTNAME}"
ac_dests="include/os.h Makefile.port"
4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331
EOF

cat >> $CONFIG_STATUS <<\EOF
srcdir=$ac_given_srcdir
while test -n "$ac_sources"; do
  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
  set $ac_sources; ac_source=$1; shift; ac_sources=$*

  echo "linking $srcdir/$ac_source to $ac_dest"

  if test ! -r $srcdir/$ac_source; then
    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
  fi
  rm -f $ac_dest

  # Make relative symlinks.
  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
    # The dest file is in a subdirectory.
    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
    # A "../" for each directory in $ac_dest_dir_suffix.
    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dest_dir_suffix= ac_dots=
  fi

  case "$srcdir" in
  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  esac

  # Make a symlink if possible; otherwise try a hard link.
  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
    ln $srcdir/$ac_source $ac_dest; then :
  else
    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
  fi
done
4332 4333
EOF
cat >> $CONFIG_STATUS <<EOF
4334

4335 4336
EOF
cat >> $CONFIG_STATUS <<\EOF
4337 4338 4339 4340 4341 4342

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4343