configure 117 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.
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';;
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
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
644
	GUESS=`grep "$host_os" template/.similar 2>/dev/null`
Bruce Momjian's avatar
Bruce Momjian committed
645
	if test ! "$GUESS"
646
	then	host_os_no_ver=`echo "$host_os" | sed 's/0-9.*$//'`
647 648
		GUESS=`grep "$host_os_no_ver" template/.similar 2>/dev/null`
	fi
Bruce Momjian's avatar
Bruce Momjian committed
649
	if test "$GUESS"
650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666
	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
667
	TEMPLATE=template/$TEMPLATE 
668
fi
669 670
export TEMPLATE
echo ""
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690

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.
691
echo "enter 'none' or new directories to override default"
692
echo ""
693
$ECHO_N "Additional directories to search for include files { $SRCH_INC }: $ECHO_C"
694
read a
695
if test "$a." = "none." 
696 697 698
then
	SRCH_INC=
	CPPFLAGS=
699 700 701 702 703 704 705
else
	if test "$a." = "."
	then
		a=$SRCH_INC
	fi
	CPPFLAGS=`echo "$a" | sed 's@  *@ @g; s@^\([^ ]\)@-I\1@; s@ \([^ ]\)@ -I\1@g'`

706
fi
707
export CPPFLAGS
708
echo "- setting CPPFLAGS=$CPPFLAGS"
709

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

723
fi
724
export LDFLAGS
725
echo "- setting LDFLAGS=$LDFLAGS"
726 727 728 729 730

if test "$enable_locale" = "yes" -o "$enable_locale" = "no"
then
	USE_LOCALE=$enable_locale
else
731
	USE_LOCALE=no
732 733 734 735 736 737 738
fi
export USE_LOCALE

if test "X$with_pgport" != "X"
then
	DEF_PGPORT=$with_pgport
else
739
	DEF_PGPORT=5432
740 741 742 743 744 745 746 747 748 749
fi
export DEF_PGPORT

if test "$enable_hba" = "yes" 
then
	NOHBA=no
elif test "$enable_hba" = "no"
then
	NOHBA=yes
else
750
	NOHBA=no
751 752 753
fi
export NOHBA

754
echo ""
755

756 757
if test "$enable_cassert" = "no"
then
758
	echo "-ASSERT CHECKING disabled"
759 760 761 762 763 764
        cat >> confdefs.h <<\EOF
#define NO_ASSERT_CHECKING 1
EOF

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

fi

774 775 776 777 778
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.
779 780
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
781
echo "configure:782: checking for $ac_word" >&5
782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809
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
810
echo "configure:811: checking for $ac_word" >&5
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 853 854 855 856
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

857
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
858
echo "configure:859: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
859 860 861 862 863 864 865 866 867

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
868
#line 869 "configure"
869 870 871
#include "confdefs.h"
main(){return(0);}
EOF
872
if { (eval echo configure:873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891
  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
892
echo "configure:893: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
893 894 895
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

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

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

915 916
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
917 918 919 920
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
921
echo "configure:922: checking whether ${CC-cc} accepts -g" >&5
922
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
923 924 925 926
  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
927
  ac_cv_prog_cc_g=yes
928
else
929
  ac_cv_prog_cc_g=no
930 931 932 933 934
fi
rm -f conftest*

fi

935 936 937 938 939 940 941
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"
942 943 944 945 946 947
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

948 949 950 951 952
fi




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


Marc G. Fournier's avatar
Marc G. Fournier committed
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025











1026 1027
HAVECXX='HAVE_Cplusplus=false'

1028
INSTALLPATH="/usr/ucb:$PATH"
1029
for ac_prog in ginstall installbsd bsdinst scoinst install
1030 1031 1032
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
1033
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1034
echo "configure:1035: checking for $ac_word" >&5
1035 1036 1037 1038 1039 1040 1041 1042 1043
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}:"
1044
  for ac_dir in $INSTALLPATH$ac_dummy; do
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
    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

1062 1063
test -n "$INSTALL" && break
done
1064
test -n "$INSTALL" || INSTALL="NONE"
1065

1066 1067 1068 1069
if test $INSTALL = "NONE"
then
   echo "- No Install Script found - aborting."
   exit 0;
1070 1071
fi

1072 1073 1074 1075
INSTLOPTS="-m 444"
INSTL_EXE_OPTS="-m 555"
INSTL_LIB_OPTS="-m 664"

1076
case "`basename $INSTALL`" in
1077
 install|installbsd|scoinst)
1078 1079
	INSTLOPTS="-c $INSTLOPTS"
	INSTL_EXE_OPTS="-c $INSTL_EXE_OPTS"
1080 1081
	INSTL_LIB_OPTS="-c $INSTL_LIB_OPTS";;
esac
1082

1083
echo "- Using $INSTALL"
1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096





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=
1097
    BACKSLASH_C='\\\\c'
1098 1099 1100 1101 1102 1103 1104 1105 1106 1107
  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
1108
echo "configure:1109: checking for $ac_word" >&5
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 1135 1136 1137 1138 1139
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
1140
  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1141
echo "configure:1142: checking for yywrap in -l$ac_lib" >&5
1142
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1143 1144 1145 1146 1147 1148
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
1149
#line 1150 "configure"
1150 1151 1152 1153 1154 1155
#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();

1156
int main() {
1157 1158 1159
yywrap()
; return 0; }
EOF
1160
if { (eval echo configure:1161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1161 1162 1163
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1164 1165
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182
  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
1183
echo "configure:1184: checking whether ln -s works" >&5
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203
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
1204
echo "configure:1205: checking whether ${MAKE-make} sets \${MAKE}" >&5
1205
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232
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
1233
echo "configure:1234: checking for $ac_word" >&5
1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261
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
1262
echo "configure:1263: checking for $ac_word" >&5
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 1288 1289 1290 1291 1292
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
1293
echo "configure:1294: checking for $ac_word" >&5
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 1319 1320 1321 1322 1323
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
1324
echo "configure:1325: checking for $ac_word" >&5
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 1350 1351 1352 1353 1354
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
1355
echo "configure:1356: checking for $ac_word" >&5
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 1381 1382 1383 1384 1385
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
1386
echo "configure:1387: checking for $ac_word" >&5
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413
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

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

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

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

1509 1510 1511 1512
test -n "$TR" && break
done
test -n "$TR" || TR="NOT_FOUND"

1513

1514 1515
TRSTRINGS=`echo ABCdef | $TR 'a-z' 'A-Z' 2>/dev/null | grep ABCDEF`
TRCLASS=`echo ABCdef | $TR ':lower:' ':upper:' 2>/dev/null | grep ABCDEF`
1516 1517 1518 1519 1520 1521 1522 1523 1524 1525

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


1526 1527 1528 1529 1530 1531



# 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
1532
echo "configure:1533: checking for $ac_word" >&5
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 1558 1559 1560 1561 1562
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
1563
echo "configure:1564: checking for $ac_word" >&5
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 1601 1602 1603 1604 1605
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

1606
echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
1607
echo "configure:1608: checking for main in -lcurses" >&5
1608
ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
1609 1610 1611 1612
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"
1613
LIBS="-lcurses  $LIBS"
1614
cat > conftest.$ac_ext <<EOF
1615
#line 1616 "configure"
1616 1617
#include "confdefs.h"

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

1643
  LIBS="-lcurses $LIBS"
1644 1645 1646 1647 1648

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

1649
echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
1650
echo "configure:1651: checking for main in -ltermcap" >&5
1651
ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
1652 1653 1654 1655
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"
1656
LIBS="-ltermcap  $LIBS"
1657
cat > conftest.$ac_ext <<EOF
1658
#line 1659 "configure"
1659 1660
#include "confdefs.h"

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

1686 1687
  LIBS="-ltermcap $LIBS"

1688 1689 1690 1691
else
  echo "$ac_t""no" 1>&6
fi

1692
echo $ac_n "checking for main in -lhistory""... $ac_c" 1>&6
1693
echo "configure:1694: checking for main in -lhistory" >&5
1694
ac_lib_var=`echo history'_'main | sed 'y%./+-%__p_%'`
1695 1696 1697 1698 1699 1700
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
1701
#line 1702 "configure"
1702 1703
#include "confdefs.h"

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

  LIBS="-lhistory $LIBS"

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

1735
echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
1736
echo "configure:1737: checking for main in -lreadline" >&5
1737
ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
1738 1739 1740 1741
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"
1742
LIBS="-lreadline  $LIBS"
1743
cat > conftest.$ac_ext <<EOF
1744
#line 1745 "configure"
1745 1746
#include "confdefs.h"

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

1772
  LIBS="-lreadline $LIBS"
1773 1774 1775 1776 1777

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

1778
echo $ac_n "checking for write_history in -lreadline""... $ac_c" 1>&6
1779
echo "configure:1780: checking for write_history in -lreadline" >&5
1780
ac_lib_var=`echo readline'_'write_history | sed 'y%./+-%__p_%'`
1781 1782 1783 1784
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"
1785
LIBS="-lreadline  $LIBS"
1786
cat > conftest.$ac_ext <<EOF
1787
#line 1788 "configure"
1788
#include "confdefs.h"
1789 1790 1791 1792
/* 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();
1793

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

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

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

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

1858
  LIBS="-lbsd $LIBS"
1859 1860 1861 1862 1863

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

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

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

1901
  LIBS="-lm $LIBS"
1902 1903 1904 1905 1906

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

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

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

1944
  LIBS="-ldl $LIBS"
1945 1946 1947 1948 1949

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

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

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

1987
  LIBS="-lsocket $LIBS"
1988 1989 1990 1991 1992

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

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

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

2030
  LIBS="-lnsl $LIBS"
2031 2032 2033 2034 2035

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

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

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

2073
  LIBS="-lipc $LIBS"
2074 2075 2076 2077 2078

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

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

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

2116
  LIBS="-lIPC $LIBS"
2117 2118 2119 2120 2121

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

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

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

2159
  LIBS="-llc $LIBS"
2160 2161 2162 2163 2164

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

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

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

2202
  LIBS="-ldld $LIBS"
2203 2204 2205 2206 2207

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

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

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

2245
  LIBS="-lln $LIBS"
2246 2247 2248 2249 2250

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

2251
echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
2252
echo "configure:2253: checking for main in -lld" >&5
2253
ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
2254 2255 2256 2257 2258 2259
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
2260
#line 2261 "configure"
2261 2262
#include "confdefs.h"

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

  LIBS="-lld $LIBS"

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

2294
echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
2295
echo "configure:2296: checking for main in -lcompat" >&5
2296
ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
2297 2298 2299 2300 2301 2302
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
2303
#line 2304 "configure"
2304 2305
#include "confdefs.h"

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

  LIBS="-lcompat $LIBS"

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

2337
echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
2338
echo "configure:2339: checking for main in -lBSD" >&5
2339
ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
2340 2341 2342 2343 2344 2345
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
2346
#line 2347 "configure"
2347 2348
#include "confdefs.h"

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

  LIBS="-lBSD $LIBS"

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

2380
echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
2381
echo "configure:2382: checking for main in -lcrypt" >&5
2382
ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
2383 2384 2385 2386 2387 2388
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
2389
#line 2390 "configure"
2390 2391
#include "confdefs.h"

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

  LIBS="-lcrypt $LIBS"

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

2423
echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2424
echo "configure:2425: checking for main in -lgen" >&5
2425 2426 2427 2428 2429 2430 2431
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
2432
#line 2433 "configure"
2433 2434 2435 2436 2437 2438
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
2439
if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465
  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

2466
echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
2467
echo "configure:2468: checking for main in -lPW" >&5
2468 2469 2470 2471 2472 2473 2474
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
2475
#line 2476 "configure"
2476 2477 2478 2479 2480 2481
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
2482
if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508
  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

2509

2510
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2511
echo "configure:2512: checking for ANSI C header files" >&5
2512 2513 2514 2515
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
2516
#line 2517 "configure"
2517 2518 2519 2520 2521 2522 2523
#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"
2524
{ (eval echo configure:2525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2525 2526 2527 2528 2529 2530
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
2531 2532
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2533 2534 2535 2536 2537 2538 2539 2540
  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
2541
#line 2542 "configure"
2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558
#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
2559
#line 2560 "configure"
2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578
#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
2579
  cat > conftest.$ac_ext <<EOF
2580
#line 2581 "configure"
2581 2582 2583 2584 2585 2586 2587 2588 2589 2590
#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
2591
if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2592
then
2593 2594
  :
else
2595 2596 2597
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
2598 2599
  ac_cv_header_stdc=no
fi
2600
rm -fr conftest*
2601 2602
fi

2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614
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
2615
echo "configure:2616: checking for sys/wait.h that is POSIX.1 compatible" >&5
2616 2617 2618 2619
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
2620
#line 2621 "configure"
2621 2622 2623 2624 2625 2626 2627 2628 2629
#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
2630
int main() {
2631 2632 2633 2634 2635
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
2636
if { (eval echo configure:2637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2637 2638 2639
  rm -rf conftest*
  ac_cv_header_sys_wait_h=yes
else
2640 2641
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657
  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
2658
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2659
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2660
echo "configure:2661: checking for $ac_hdr" >&5
2661 2662 2663 2664
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
2665
#line 2666 "configure"
2666 2667 2668 2669
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2670
{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695
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

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

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

2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815
for ac_hdr in readline/history.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2781: checking for $ac_hdr" >&5
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
#line 2786 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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

2816 2817

echo $ac_n "checking for working const""... $ac_c" 1>&6
2818
echo "configure:2819: checking for working const" >&5
2819 2820 2821 2822
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
2823
#line 2824 "configure"
2824 2825
#include "confdefs.h"

2826
int main() {
2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871

/* 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
2872
if { (eval echo configure:2873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2873 2874 2875
  rm -rf conftest*
  ac_cv_c_const=yes
else
2876 2877
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892
  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
2893
echo "configure:2894: checking for uid_t in sys/types.h" >&5
2894 2895 2896 2897
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
2898
#line 2899 "configure"
2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926
#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
2927
echo "configure:2928: checking for inline" >&5
2928 2929 2930 2931 2932 2933
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
2934
#line 2935 "configure"
2935 2936
#include "confdefs.h"

2937
int main() {
2938 2939 2940
} $ac_kw foo() {
; return 0; }
EOF
2941
if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2942 2943
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
2944 2945 2946
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966
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
2967
echo "configure:2968: checking for mode_t" >&5
2968 2969 2970 2971
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
2972
#line 2973 "configure"
2973 2974 2975 2976
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2977
#include <stddef.h>
2978 2979 2980
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2981
  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999
  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
3000
echo "configure:3001: checking for off_t" >&5
3001 3002 3003 3004
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
3005
#line 3006 "configure"
3006 3007 3008 3009
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
3010
#include <stddef.h>
3011 3012 3013
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3014
  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032
  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
3033
echo "configure:3034: checking for size_t" >&5
3034 3035 3036 3037
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
3038
#line 3039 "configure"
3039 3040 3041 3042
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
3043
#include <stddef.h>
3044 3045 3046
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3047
  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065
  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
3066
echo "configure:3067: checking whether time.h and sys/time.h may both be included" >&5
3067 3068 3069 3070
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
3071
#line 3072 "configure"
3072 3073 3074 3075
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
3076
int main() {
3077 3078 3079
struct tm *tp;
; return 0; }
EOF
3080
if { (eval echo configure:3081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3081 3082 3083
  rm -rf conftest*
  ac_cv_header_time=yes
else
3084 3085
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100
  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
3101
echo "configure:3102: checking whether struct tm is in sys/time.h or time.h" >&5
3102 3103 3104 3105
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
3106
#line 3107 "configure"
3107 3108 3109
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
3110
int main() {
3111 3112 3113
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
3114
if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3115 3116 3117
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
3118 3119
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134
  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


3135
echo $ac_n "checking for int timezone""... $ac_c" 1>&6
3136
echo "configure:3137: checking for int timezone" >&5
3137
cat > conftest.$ac_ext <<EOF
3138
#line 3139 "configure"
3139 3140
#include "confdefs.h"
#include <time.h>
3141
int main() {
3142 3143 3144
int res = timezone / 60; 
; return 0; }
EOF
3145
if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3146 3147 3148 3149
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_INT_TIMEZONE 1
EOF
3150
 echo "$ac_t""yes" 1>&6
3151
else
3152 3153
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3154 3155 3156 3157
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
3158

3159
echo $ac_n "checking for union semun""... $ac_c" 1>&6
3160
echo "configure:3161: checking for union semun" >&5
3161
cat > conftest.$ac_ext <<EOF
3162
#line 3163 "configure"
3163 3164
#include "confdefs.h"
#include <sys/types.h>
3165
#include <sys/ipc.h>
3166
#include <sys/sem.h>
3167
int main() {
3168 3169 3170
union semun semun;
; return 0; }
EOF
3171
if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3172 3173 3174 3175 3176
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_UNION_SEMUN 1
EOF
 echo "$ac_t""yes" 1>&6
3177
else
3178 3179
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3180 3181
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
3182 3183 3184 3185 3186
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
3187
echo "configure:3188: checking whether ${CC-cc} needs -traditional" >&5
3188 3189 3190 3191 3192
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
3193
#line 3194 "configure"
3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210
#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
3211
#line 3212 "configure"
3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232
#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
3233
echo "configure:3234: checking for 8-bit clean memcmp" >&5
3234
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3235 3236 3237
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
3238
  ac_cv_func_memcmp_clean=no
3239
else
3240
  cat > conftest.$ac_ext <<EOF
3241
#line 3242 "configure"
3242 3243 3244 3245 3246 3247 3248 3249 3250
#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
3251
if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3252 3253
then
  ac_cv_func_memcmp_clean=yes
3254
else
3255 3256 3257 3258
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_memcmp_clean=no
3259
fi
3260
rm -fr conftest*
3261 3262
fi

3263 3264 3265 3266
fi

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

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3269
echo "configure:3270: checking return type of signal handlers" >&5
3270 3271 3272 3273
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
3274
#line 3275 "configure"
3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286
#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

3287
int main() {
3288 3289 3290
int i;
; return 0; }
EOF
3291
if { (eval echo configure:3292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3292 3293 3294
  rm -rf conftest*
  ac_cv_type_signal=void
else
3295 3296
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309
  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
3310
echo "configure:3311: checking for vprintf" >&5
3311 3312 3313 3314
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
3315
#line 3316 "configure"
3316 3317 3318 3319 3320 3321 3322 3323 3324
#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();

3325
int main() {
3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337

/* 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
3338
if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3339 3340 3341
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
3342 3343
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3344 3345 3346 3347
  rm -rf conftest*
  eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
3348
fi
3349

3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361
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
3362
echo "configure:3363: checking for _doprnt" >&5
3363 3364 3365 3366
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
3367
#line 3368 "configure"
3368 3369 3370 3371 3372 3373 3374 3375 3376
#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();

3377
int main() {
3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389

/* 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
3390
if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3391 3392 3393
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
3394 3395
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3396 3397 3398 3399
  rm -rf conftest*
  eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
3400
fi
3401

3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416
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
3417
echo "configure:3418: checking for $ac_func" >&5
3418 3419 3420 3421
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
3422
#line 3423 "configure"
3423 3424 3425 3426 3427 3428 3429 3430 3431
#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();

3432
int main() {
3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444

/* 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
3445
if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3446 3447 3448
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
3449 3450
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3451 3452 3453 3454
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
3455
fi
3456

3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468
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

3469
for ac_func in sigprocmask waitpid setsid random fcvt
3470 3471
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3472
echo "configure:3473: checking for $ac_func" >&5
3473 3474 3475 3476
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
3477
#line 3478 "configure"
3478 3479 3480 3481 3482 3483 3484 3485 3486
#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();

3487
int main() {
3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499

/* 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
3500
if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3501 3502 3503
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
3504 3505
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3506 3507 3508 3509
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
3510
fi
3511

3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523
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

3524
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3525
echo "configure:3526: checking for inet_aton" >&5
3526 3527 3528 3529
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
3530
#line 3531 "configure"
3531 3532 3533 3534 3535 3536 3537 3538 3539
#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();

3540
int main() {
3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552

/* 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
3553
if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3554 3555 3556
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=yes"
else
3557 3558
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3559 3560 3561 3562
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=no"
fi
rm -f conftest*
3563
fi
3564

3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575
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

3576
echo $ac_n "checking for strerror""... $ac_c" 1>&6
3577
echo "configure:3578: checking for strerror" >&5
3578 3579 3580 3581
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
3582
#line 3583 "configure"
3583 3584 3585 3586 3587 3588 3589 3590 3591
#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();

3592
int main() {
3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604

/* 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
3605
if { (eval echo configure:3606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3606 3607 3608
  rm -rf conftest*
  eval "ac_cv_func_strerror=yes"
else
3609 3610
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3611 3612 3613 3614 3615
  rm -rf conftest*
  eval "ac_cv_func_strerror=no"
fi
rm -f conftest*
fi
3616

3617 3618 3619 3620 3621 3622 3623 3624
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
3625
STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'
3626 3627
fi

3628
echo $ac_n "checking for strdup""... $ac_c" 1>&6
3629
echo "configure:3630: checking for strdup" >&5
3630 3631 3632 3633
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
3634
#line 3635 "configure"
3635 3636 3637 3638 3639 3640 3641 3642 3643
#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();

3644
int main() {
3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656

/* 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
3657
if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3658 3659 3660
  rm -rf conftest*
  eval "ac_cv_func_strdup=yes"
else
3661 3662
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3663 3664 3665 3666
  rm -rf conftest*
  eval "ac_cv_func_strdup=no"
fi
rm -f conftest*
3667
fi
3668

3669 3670
if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3671
  cat >> confdefs.h <<\EOF
3672 3673 3674
#define HAVE_STRDUP 1
EOF

3675 3676
else
  echo "$ac_t""no" 1>&6
3677
STRDUP='../../utils/strdup.o'
3678 3679 3680
fi


3681

3682

3683

3684
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
3685
echo "configure:3686: checking for cbrt" >&5
3686 3687 3688 3689
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
3690
#line 3691 "configure"
3691 3692 3693 3694 3695 3696 3697 3698 3699
#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();

3700
int main() {
3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712

/* 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
3713
if { (eval echo configure:3714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3714 3715 3716
  rm -rf conftest*
  eval "ac_cv_func_cbrt=yes"
else
3717 3718
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3719 3720 3721 3722
  rm -rf conftest*
  eval "ac_cv_func_cbrt=no"
fi
rm -f conftest*
3723
fi
3724

3725 3726 3727 3728 3729 3730 3731 3732
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
3733
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
3734
echo "configure:3735: checking for cbrt in -lm" >&5
3735
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
3736 3737 3738 3739 3740 3741
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
3742
#line 3743 "configure"
3743 3744 3745 3746 3747 3748
#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();

3749
int main() {
3750 3751 3752
cbrt()
; return 0; }
EOF
3753
if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3754 3755 3756
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
3757 3758
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778
  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
3779
echo "configure:3780: checking for rint" >&5
3780 3781 3782 3783
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
3784
#line 3785 "configure"
3785 3786 3787 3788 3789 3790 3791 3792 3793
#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();

3794
int main() {
3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806

/* 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
3807
if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3808 3809 3810
  rm -rf conftest*
  eval "ac_cv_func_rint=yes"
else
3811 3812
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3813 3814 3815 3816
  rm -rf conftest*
  eval "ac_cv_func_rint=no"
fi
rm -f conftest*
3817
fi
3818

3819 3820 3821 3822 3823 3824 3825 3826
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
3827
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
3828
echo "configure:3829: checking for rint in -lm" >&5
3829
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
3830 3831 3832 3833 3834 3835
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
3836
#line 3837 "configure"
3837 3838 3839 3840 3841 3842
#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();

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


3873
echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
3874
echo "configure:3875: checking setting USE_LOCALE" >&5
3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885
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
3886
echo "configure:3887: checking setting DEF_PGPORT" >&5
3887 3888 3889 3890 3891 3892
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
3893
echo "configure:3894: checking setting HBA" >&5
3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905
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 


3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922
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
3923 3924 3925
# 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.
3926 3927 3928
# 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 |
3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941
  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
3942 3943 3944 3945 3946 3947 3948 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
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)
3996
    echo "$CONFIG_STATUS generated by autoconf version 2.12"
3997 3998 3999 4000 4001 4002 4003 4004 4005
    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

Bruce Momjian's avatar
Bruce Momjian committed
4006
trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/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
4007 4008 4009 4010 4011 4012 4013 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
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
Marc G. Fournier's avatar
Marc G. Fournier committed
4043 4044
s%@PORTNAME@%$PORTNAME%g
s%@AROPT@%$AROPT%g
4045 4046 4047
s%@SHARED_LIB@%$SHARED_LIB%g
s%@DLSUFFIX@%$DLSUFFIX%g
s%@DL_LIB@%$DL_LIB%g
4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066
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
4067
s%@TR@%$TR%g
4068
s%@TRARGS@%$TRARGS%g
4069 4070 4071 4072
s%@YACC@%$YACC%g
s%@YFLAGS@%$YFLAGS%g
s%@yacc@%$yacc%g
s%@bison@%$bison%g
4073
s%@LIBOBJS@%$LIBOBJS%g
4074
s%@STRDUP@%$STRDUP%g
4075
s%@INET_ATON@%$INET_ATON%g
4076
s%@STRERROR@%$STRERROR%g
4077
s%@STRERROR2@%$STRERROR2%g
4078 4079 4080

CEOF
EOF
4081 4082 4083 4084 4085 4086 4087 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

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

4117 4118
cat >> $CONFIG_STATUS <<EOF

Bruce Momjian's avatar
Bruce Momjian committed
4119
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/pg_version/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh"}
4120 4121 4122
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4123
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4124
  case "$ac_file" in
4125
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4126 4127 4128 4129
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

4130
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153

  # 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

4154

4155 4156 4157 4158 4159 4160 4161 4162
  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
4163 4164

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

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

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

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

4280 4281 4282
EOF

cat >> $CONFIG_STATUS <<EOF
4283 4284
ac_sources="include/port/${PORTNAME}.h makefiles/Makefile.${PORTNAME}"
ac_dests="include/os.h Makefile.port"
4285 4286 4287 4288 4289 4290 4291 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
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
4325 4326
EOF
cat >> $CONFIG_STATUS <<EOF
4327

4328 4329
EOF
cat >> $CONFIG_STATUS <<\EOF
4330 4331 4332 4333 4334 4335

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
4336