configure 114 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 588 589 590 591
 sysv4.2*) 
       case "$host_vendor" in
               univel) PORTNAME='univel';;
                    *) PORTNAME='unknown';;
       esac ;;
592 593 594 595
*) echo ""
   echo "*************************************************************"
   echo "configure does not currently recognize your operating system,"
   echo "therefore you must do a manual configuration of:"
596
   echo "$host_os"
597 598 599 600 601 602 603
   echo "Please contact scrappy@hub.org to see about rectifying this, "
   echo "including the above 'checking host system type...' line "
   echo "*************************************************************"
   echo ""
   exit;;
esac

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

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

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

EOT


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

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

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

700
fi
701
export CPPFLAGS
702
echo "- setting CPPFLAGS=$CPPFLAGS"
703

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

717
fi
718
export LDFLAGS
719
echo "- setting LDFLAGS=$LDFLAGS"
720 721 722 723 724

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

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

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

748
echo ""
749

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

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

fi

768 769 770 771 772
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.
773 774
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
775
echo "configure:776: checking for $ac_word" >&5
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803
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
804
echo "configure:805: checking for $ac_word" >&5
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850
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

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

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

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

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

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

fi

929 930 931 932 933 934 935
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"
936 937 938 939 940 941
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi

942 943 944 945 946
fi




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











1020 1021 1022
HAVECXX='HAVE_Cplusplus=false'


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

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

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

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

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

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





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=
1091
    BACKSLASH_C='\\\\c'
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101
  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
1102
echo "configure:1103: checking for $ac_word" >&5
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133
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
1134
  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1135
echo "configure:1136: checking for yywrap in -l$ac_lib" >&5
1136
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1137 1138 1139 1140 1141 1142
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
1143
#line 1144 "configure"
1144 1145 1146 1147 1148 1149
#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();

1150
int main() {
1151 1152 1153
yywrap()
; return 0; }
EOF
1154
if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1155 1156 1157
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1158 1159
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176
  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
1177
echo "configure:1178: checking whether ln -s works" >&5
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197
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
1198
echo "configure:1199: checking whether ${MAKE-make} sets \${MAKE}" >&5
1199
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226
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
1227
echo "configure:1228: checking for $ac_word" >&5
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255
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
1256
echo "configure:1257: checking for $ac_word" >&5
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286
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
1287
echo "configure:1288: checking for $ac_word" >&5
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317
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
1318
echo "configure:1319: checking for $ac_word" >&5
1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348
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
1349
echo "configure:1350: checking for $ac_word" >&5
1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
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
1380
echo "configure:1381: checking for $ac_word" >&5
1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407
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

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

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

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

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

1507

1508 1509 1510 1511 1512 1513



# 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
1514
echo "configure:1515: checking for $ac_word" >&5
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544
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
1545
echo "configure:1546: checking for $ac_word" >&5
1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587
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

1588
echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6
1589
echo "configure:1590: checking for main in -lcurses" >&5
1590
ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'`
1591 1592 1593 1594
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"
1595
LIBS="-lcurses  $LIBS"
1596
cat > conftest.$ac_ext <<EOF
1597
#line 1598 "configure"
1598 1599
#include "confdefs.h"

1600
int main() {
1601 1602 1603
main()
; return 0; }
EOF
1604
if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1605 1606 1607
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1608 1609
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1610 1611 1612 1613 1614 1615 1616 1617 1618
  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
1619 1620
    ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1621 1622 1623 1624
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

1625
  LIBS="-lcurses $LIBS"
1626 1627 1628 1629 1630

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

1631
echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
1632
echo "configure:1633: checking for main in -ltermcap" >&5
1633
ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'`
1634 1635 1636 1637
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"
1638
LIBS="-ltermcap  $LIBS"
1639
cat > conftest.$ac_ext <<EOF
1640
#line 1641 "configure"
1641 1642
#include "confdefs.h"

1643
int main() {
1644
main()
1645 1646
; return 0; }
EOF
1647
if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1648 1649 1650
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1651 1652
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1653 1654 1655 1656 1657 1658 1659 1660 1661
  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
1662 1663
    ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1664 1665
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
1666 1667
EOF

1668 1669
  LIBS="-ltermcap $LIBS"

1670 1671 1672 1673
else
  echo "$ac_t""no" 1>&6
fi

1674
echo $ac_n "checking for main in -lhistory""... $ac_c" 1>&6
1675
echo "configure:1676: checking for main in -lhistory" >&5
1676
ac_lib_var=`echo history'_'main | sed 'y%./+-%__p_%'`
1677 1678 1679 1680 1681 1682
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
1683
#line 1684 "configure"
1684 1685
#include "confdefs.h"

1686
int main() {
1687 1688 1689
main()
; return 0; }
EOF
1690
if { (eval echo configure:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1691 1692 1693
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1694 1695
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1696 1697 1698 1699 1700 1701 1702 1703 1704
  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
1705 1706
    ac_tr_lib=HAVE_LIB`echo history | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1707 1708 1709 1710 1711 1712 1713 1714 1715 1716
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lhistory $LIBS"

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

1717
echo $ac_n "checking for main in -lreadline""... $ac_c" 1>&6
1718
echo "configure:1719: checking for main in -lreadline" >&5
1719
ac_lib_var=`echo readline'_'main | sed 'y%./+-%__p_%'`
1720 1721 1722 1723
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"
1724
LIBS="-lreadline  $LIBS"
1725
cat > conftest.$ac_ext <<EOF
1726
#line 1727 "configure"
1727 1728
#include "confdefs.h"

1729
int main() {
1730 1731 1732
main()
; return 0; }
EOF
1733
if { (eval echo configure:1734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1734 1735 1736
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1737 1738
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1739 1740 1741 1742 1743 1744 1745 1746 1747
  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
1748 1749
    ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1750 1751 1752 1753
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

1754
  LIBS="-lreadline $LIBS"
1755 1756 1757 1758 1759

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

1760
echo $ac_n "checking for write_history in -lreadline""... $ac_c" 1>&6
1761
echo "configure:1762: checking for write_history in -lreadline" >&5
1762
ac_lib_var=`echo readline'_'write_history | sed 'y%./+-%__p_%'`
1763 1764 1765 1766
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"
1767
LIBS="-lreadline  $LIBS"
1768
cat > conftest.$ac_ext <<EOF
1769
#line 1770 "configure"
1770
#include "confdefs.h"
1771 1772 1773 1774
/* 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();
1775

1776
int main() {
1777
write_history()
1778 1779
; return 0; }
EOF
1780
if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1781 1782 1783
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
1784 1785
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1786 1787 1788 1789 1790 1791 1792 1793 1794
  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
1795 1796
  cat >> confdefs.h <<\EOF
#define HAVE_HISTORY 1
1797 1798 1799 1800 1801 1802
EOF

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

1803
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
1804
echo "configure:1805: checking for main in -lm" >&5
1805
ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
1806 1807 1808 1809 1810 1811
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
1812
#line 1813 "configure"
1813 1814
#include "confdefs.h"

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

  LIBS="-lm $LIBS"

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

1846
echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
1847
echo "configure:1848: checking for main in -ldl" >&5
1848
ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
1849 1850 1851 1852 1853 1854
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="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
1855
#line 1856 "configure"
1856 1857
#include "confdefs.h"

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

  LIBS="-ldl $LIBS"

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

1889
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1890
echo "configure:1891: checking for main in -lsocket" >&5
1891
ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1892 1893 1894 1895 1896 1897
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
1898
#line 1899 "configure"
1899 1900
#include "confdefs.h"

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

  LIBS="-lsocket $LIBS"

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

1932
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1933
echo "configure:1934: checking for main in -lnsl" >&5
1934
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1935 1936 1937 1938 1939 1940
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="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
1941
#line 1942 "configure"
1942 1943
#include "confdefs.h"

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

  LIBS="-lnsl $LIBS"

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

1975
echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
1976
echo "configure:1977: checking for main in -lipc" >&5
1977
ac_lib_var=`echo ipc'_'main | sed 'y%./+-%__p_%'`
1978 1979 1980 1981 1982 1983
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="-lipc  $LIBS"
cat > conftest.$ac_ext <<EOF
1984
#line 1985 "configure"
1985 1986
#include "confdefs.h"

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

  LIBS="-lipc $LIBS"

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

2018
echo $ac_n "checking for main in -lIPC""... $ac_c" 1>&6
2019
echo "configure:2020: checking for main in -lIPC" >&5
2020
ac_lib_var=`echo IPC'_'main | sed 'y%./+-%__p_%'`
2021 2022 2023 2024 2025 2026
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="-lIPC  $LIBS"
cat > conftest.$ac_ext <<EOF
2027
#line 2028 "configure"
2028 2029
#include "confdefs.h"

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

  LIBS="-lIPC $LIBS"

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

2061
echo $ac_n "checking for main in -llc""... $ac_c" 1>&6
2062
echo "configure:2063: checking for main in -llc" >&5
2063
ac_lib_var=`echo lc'_'main | sed 'y%./+-%__p_%'`
2064 2065 2066 2067 2068 2069
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="-llc  $LIBS"
cat > conftest.$ac_ext <<EOF
2070
#line 2071 "configure"
2071 2072
#include "confdefs.h"

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

  LIBS="-llc $LIBS"

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

2104
echo $ac_n "checking for main in -ldld""... $ac_c" 1>&6
2105
echo "configure:2106: checking for main in -ldld" >&5
2106
ac_lib_var=`echo dld'_'main | sed 'y%./+-%__p_%'`
2107 2108 2109 2110 2111 2112
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="-ldld  $LIBS"
cat > conftest.$ac_ext <<EOF
2113
#line 2114 "configure"
2114 2115
#include "confdefs.h"

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

  LIBS="-ldld $LIBS"

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

2147
echo $ac_n "checking for main in -lln""... $ac_c" 1>&6
2148
echo "configure:2149: checking for main in -lln" >&5
2149
ac_lib_var=`echo ln'_'main | sed 'y%./+-%__p_%'`
2150 2151 2152 2153 2154 2155
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="-lln  $LIBS"
cat > conftest.$ac_ext <<EOF
2156
#line 2157 "configure"
2157 2158
#include "confdefs.h"

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

  LIBS="-lln $LIBS"

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

2190
echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
2191
echo "configure:2192: checking for main in -lbsd" >&5
2192
ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
2193 2194 2195 2196 2197 2198
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
2199
#line 2200 "configure"
2200 2201
#include "confdefs.h"

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

  LIBS="-lbsd $LIBS"

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

2233
echo $ac_n "checking for main in -lld""... $ac_c" 1>&6
2234
echo "configure:2235: checking for main in -lld" >&5
2235
ac_lib_var=`echo ld'_'main | sed 'y%./+-%__p_%'`
2236 2237 2238 2239 2240 2241
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
2242
#line 2243 "configure"
2243 2244
#include "confdefs.h"

2245
int main() {
2246 2247 2248
main()
; return 0; }
EOF
2249
if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2250 2251 2252
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2253 2254
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2255 2256 2257 2258 2259 2260 2261 2262 2263
  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
2264 2265
    ac_tr_lib=HAVE_LIB`echo ld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2266 2267 2268 2269 2270 2271 2272 2273 2274 2275
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lld $LIBS"

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

2276
echo $ac_n "checking for main in -lcompat""... $ac_c" 1>&6
2277
echo "configure:2278: checking for main in -lcompat" >&5
2278
ac_lib_var=`echo compat'_'main | sed 'y%./+-%__p_%'`
2279 2280 2281 2282 2283 2284
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
2285
#line 2286 "configure"
2286 2287
#include "confdefs.h"

2288
int main() {
2289 2290 2291
main()
; return 0; }
EOF
2292
if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2293 2294 2295
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2296 2297
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2298 2299 2300 2301 2302 2303 2304 2305 2306
  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
2307 2308
    ac_tr_lib=HAVE_LIB`echo compat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2309 2310 2311 2312 2313 2314 2315 2316 2317 2318
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcompat $LIBS"

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

2319
echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
2320
echo "configure:2321: checking for main in -lBSD" >&5
2321
ac_lib_var=`echo BSD'_'main | sed 'y%./+-%__p_%'`
2322 2323 2324 2325 2326 2327
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
2328
#line 2329 "configure"
2329 2330
#include "confdefs.h"

2331
int main() {
2332 2333 2334
main()
; return 0; }
EOF
2335
if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2336 2337 2338
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2339 2340
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2341 2342 2343 2344 2345 2346 2347 2348 2349
  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
2350 2351
    ac_tr_lib=HAVE_LIB`echo BSD | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2352 2353 2354 2355 2356 2357 2358 2359 2360 2361
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lBSD $LIBS"

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

2362
echo $ac_n "checking for main in -lcrypt""... $ac_c" 1>&6
2363
echo "configure:2364: checking for main in -lcrypt" >&5
2364
ac_lib_var=`echo crypt'_'main | sed 'y%./+-%__p_%'`
2365 2366 2367 2368 2369 2370
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
2371
#line 2372 "configure"
2372 2373
#include "confdefs.h"

2374
int main() {
2375 2376 2377
main()
; return 0; }
EOF
2378
if { (eval echo configure:2379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2379 2380 2381
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
2382 2383
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2384 2385 2386 2387 2388 2389 2390 2391 2392
  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
2393 2394
    ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2395 2396 2397 2398 2399 2400 2401 2402 2403 2404
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF

  LIBS="-lcrypt $LIBS"

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

2405
echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
2406
echo "configure:2407: checking for main in -lgen" >&5
2407 2408 2409 2410 2411 2412 2413
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
2414
#line 2415 "configure"
2415 2416 2417 2418 2419 2420
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
2421
if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    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

2448

2449
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2450
echo "configure:2451: checking for ANSI C header files" >&5
2451 2452 2453 2454
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
2455
#line 2456 "configure"
2456 2457 2458 2459 2460 2461 2462
#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"
2463
{ (eval echo configure:2464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2464 2465 2466 2467 2468 2469
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
2470 2471
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2472 2473 2474 2475 2476 2477 2478 2479
  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
2480
#line 2481 "configure"
2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497
#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
2498
#line 2499 "configure"
2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517
#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
2518
  cat > conftest.$ac_ext <<EOF
2519
#line 2520 "configure"
2520 2521 2522 2523 2524 2525 2526 2527 2528 2529
#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
2530
if { (eval echo configure:2531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2531
then
2532 2533
  :
else
2534 2535 2536
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
2537 2538
  ac_cv_header_stdc=no
fi
2539
rm -fr conftest*
2540 2541
fi

2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553
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
2554
echo "configure:2555: checking for sys/wait.h that is POSIX.1 compatible" >&5
2555 2556 2557 2558
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
2559
#line 2560 "configure"
2560 2561 2562 2563 2564 2565 2566 2567 2568
#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
2569
int main() {
2570 2571 2572 2573 2574
int s;
wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
2575
if { (eval echo configure:2576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2576 2577 2578
  rm -rf conftest*
  ac_cv_header_sys_wait_h=yes
else
2579 2580
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596
  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
2597
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2598
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2599
echo "configure:2600: checking for $ac_hdr" >&5
2600 2601 2602 2603
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
2604
#line 2605 "configure"
2605 2606 2607 2608
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2609
{ (eval echo configure:2610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638
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

for ac_hdr in sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2639
echo "configure:2640: checking for $ac_hdr" >&5
2640 2641 2642 2643
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
2644
#line 2645 "configure"
2645 2646 2647 2648
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2649
{ (eval echo configure:2650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2650 2651 2652 2653 2654 2655
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
2656 2657
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2658 2659 2660 2661 2662 2663 2664
  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
2665
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2666 2667 2668 2669 2670 2671 2672 2673 2674
  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
2675
for ac_hdr in readline.h history.h dld.h crypt.h endian.h float.h
2676
do
2677
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2678
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2679
echo "configure:2680: checking for $ac_hdr" >&5
2680 2681 2682 2683
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
2684
#line 2685 "configure"
2685 2686 2687 2688
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2689
{ (eval echo configure:2690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
2696 2697
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2698 2699 2700 2701 2702 2703 2704
  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
2705
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for working const""... $ac_c" 1>&6
2717
echo "configure:2718: checking for working const" >&5
2718 2719 2720 2721
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
2722
#line 2723 "configure"
2723 2724
#include "confdefs.h"

2725
int main() {
2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770

/* 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
2771
if { (eval echo configure:2772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2772 2773 2774
  rm -rf conftest*
  ac_cv_c_const=yes
else
2775 2776
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791
  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
2792
echo "configure:2793: checking for uid_t in sys/types.h" >&5
2793 2794 2795 2796
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
2797
#line 2798 "configure"
2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825
#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
2826
echo "configure:2827: checking for inline" >&5
2827 2828 2829 2830 2831 2832
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
2833
#line 2834 "configure"
2834 2835
#include "confdefs.h"

2836
int main() {
2837 2838 2839
} $ac_kw foo() {
; return 0; }
EOF
2840
if { (eval echo configure:2841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2841 2842
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
2843 2844 2845
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865
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
2866
echo "configure:2867: checking for mode_t" >&5
2867 2868 2869 2870
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
2871
#line 2872 "configure"
2872 2873 2874 2875
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2876
#include <stddef.h>
2877 2878 2879
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2880
  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898
  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
2899
echo "configure:2900: checking for off_t" >&5
2900 2901 2902 2903
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
2904
#line 2905 "configure"
2905 2906 2907 2908
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2909
#include <stddef.h>
2910 2911 2912
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2913
  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931
  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
2932
echo "configure:2933: checking for size_t" >&5
2933 2934 2935 2936
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
2937
#line 2938 "configure"
2938 2939 2940 2941
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
2942
#include <stddef.h>
2943 2944 2945
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2946
  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964
  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
2965
echo "configure:2966: checking whether time.h and sys/time.h may both be included" >&5
2966 2967 2968 2969
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
2970
#line 2971 "configure"
2971 2972 2973 2974
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
2975
int main() {
2976 2977 2978
struct tm *tp;
; return 0; }
EOF
2979
if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2980 2981 2982
  rm -rf conftest*
  ac_cv_header_time=yes
else
2983 2984
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999
  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
3000
echo "configure:3001: checking whether struct tm is in sys/time.h or time.h" >&5
3001 3002 3003 3004
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
3005
#line 3006 "configure"
3006 3007 3008
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
3009
int main() {
3010 3011 3012
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
3013
if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3014 3015 3016
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
3017 3018
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033
  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


3034
echo $ac_n "checking for int timezone""... $ac_c" 1>&6
3035
echo "configure:3036: checking for int timezone" >&5
3036
cat > conftest.$ac_ext <<EOF
3037
#line 3038 "configure"
3038 3039
#include "confdefs.h"
#include <time.h>
3040
int main() {
3041 3042 3043
int res = timezone / 60; 
; return 0; }
EOF
3044
if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3045 3046 3047 3048
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_INT_TIMEZONE 1
EOF
3049
 echo "$ac_t""yes" 1>&6
3050
else
3051 3052
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3053 3054 3055 3056
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
3057

3058
echo $ac_n "checking for union semun""... $ac_c" 1>&6
3059
echo "configure:3060: checking for union semun" >&5
3060
cat > conftest.$ac_ext <<EOF
3061
#line 3062 "configure"
3062 3063
#include "confdefs.h"
#include <sys/types.h>
3064
#include <sys/ipc.h>
3065
#include <sys/sem.h>
3066
int main() {
3067 3068 3069
union semun semun;
; return 0; }
EOF
3070
if { (eval echo configure:3071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3071 3072 3073 3074 3075
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define HAVE_UNION_SEMUN 1
EOF
 echo "$ac_t""yes" 1>&6
3076
else
3077 3078
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3079 3080
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
3081 3082 3083 3084 3085
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
3086
echo "configure:3087: checking whether ${CC-cc} needs -traditional" >&5
3087 3088 3089 3090 3091
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
3092
#line 3093 "configure"
3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109
#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
3110
#line 3111 "configure"
3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131
#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
3132
echo "configure:3133: checking for 8-bit clean memcmp" >&5
3133
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3134 3135 3136
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
3137
  ac_cv_func_memcmp_clean=no
3138
else
3139
  cat > conftest.$ac_ext <<EOF
3140
#line 3141 "configure"
3141 3142 3143 3144 3145 3146 3147 3148 3149
#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
3150
if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3151 3152
then
  ac_cv_func_memcmp_clean=yes
3153
else
3154 3155 3156 3157
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_memcmp_clean=no
3158
fi
3159
rm -fr conftest*
3160 3161
fi

3162 3163 3164 3165
fi

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

echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3168
echo "configure:3169: checking return type of signal handlers" >&5
3169 3170 3171 3172
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
3173
#line 3174 "configure"
3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185
#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

3186
int main() {
3187 3188 3189
int i;
; return 0; }
EOF
3190
if { (eval echo configure:3191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3191 3192 3193
  rm -rf conftest*
  ac_cv_type_signal=void
else
3194 3195
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208
  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
3209
echo "configure:3210: checking for vprintf" >&5
3210 3211 3212 3213
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
3214
#line 3215 "configure"
3215 3216 3217 3218 3219 3220 3221 3222 3223
#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();

3224
int main() {
3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236

/* 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
3237
if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3238 3239 3240
  rm -rf conftest*
  eval "ac_cv_func_vprintf=yes"
else
3241 3242
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3243 3244 3245 3246
  rm -rf conftest*
  eval "ac_cv_func_vprintf=no"
fi
rm -f conftest*
3247
fi
3248

3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260
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
3261
echo "configure:3262: checking for _doprnt" >&5
3262 3263 3264 3265
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
3266
#line 3267 "configure"
3267 3268 3269 3270 3271 3272 3273 3274 3275
#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();

3276
int main() {
3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288

/* 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
3289
if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3290 3291 3292
  rm -rf conftest*
  eval "ac_cv_func__doprnt=yes"
else
3293 3294
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3295 3296 3297 3298
  rm -rf conftest*
  eval "ac_cv_func__doprnt=no"
fi
rm -f conftest*
3299
fi
3300

3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315
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
3316
echo "configure:3317: checking for $ac_func" >&5
3317 3318 3319 3320
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
3321
#line 3322 "configure"
3322 3323 3324 3325 3326 3327 3328 3329 3330
#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();

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

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

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

3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367
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

3368
for ac_func in sigprocmask waitpid setsid random fcvt
3369 3370
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3371
echo "configure:3372: checking for $ac_func" >&5
3372 3373 3374 3375
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
3376
#line 3377 "configure"
3377 3378 3379 3380 3381 3382 3383 3384 3385
#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();

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

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

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

3423
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3424
echo "configure:3425: checking for inet_aton" >&5
3425 3426 3427 3428
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
3429
#line 3430 "configure"
3430 3431 3432 3433 3434 3435 3436 3437 3438
#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();

3439
int main() {
3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451

/* 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
3452
if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3453 3454 3455
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=yes"
else
3456 3457
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3458 3459 3460 3461
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=no"
fi
rm -f conftest*
3462
fi
3463

3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474
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

3475
echo $ac_n "checking for strerror""... $ac_c" 1>&6
3476
echo "configure:3477: checking for strerror" >&5
3477 3478 3479 3480
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
3481
#line 3482 "configure"
3482 3483 3484 3485 3486 3487 3488 3489 3490
#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();

3491
int main() {
3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503

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

3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526
if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_STRERROR 1
EOF

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

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

3543
int main() {
3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555

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

3568 3569
if eval "test \"`echo '$ac_cv_func_'strdup`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3570
  cat >> confdefs.h <<\EOF
3571 3572 3573
#define HAVE_STRDUP 1
EOF

3574 3575
else
  echo "$ac_t""no" 1>&6
3576
STRDUP='../../utils/strdup.o'
3577 3578 3579
fi


3580

3581

3582
echo $ac_n "checking for cbrt""... $ac_c" 1>&6
3583
echo "configure:3584: checking for cbrt" >&5
3584 3585 3586 3587
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
3588
#line 3589 "configure"
3589 3590 3591 3592 3593 3594 3595 3596 3597
#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();

3598
int main() {
3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610

/* 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
3611
if { (eval echo configure:3612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3612 3613 3614
  rm -rf conftest*
  eval "ac_cv_func_cbrt=yes"
else
3615 3616
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3617 3618 3619 3620
  rm -rf conftest*
  eval "ac_cv_func_cbrt=no"
fi
rm -f conftest*
3621
fi
3622

3623 3624 3625 3626 3627 3628 3629 3630
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
3631
echo $ac_n "checking for cbrt in -lm""... $ac_c" 1>&6
3632
echo "configure:3633: checking for cbrt in -lm" >&5
3633
ac_lib_var=`echo m'_'cbrt | sed 'y%./+-%__p_%'`
3634 3635 3636 3637 3638 3639
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
3640
#line 3641 "configure"
3641 3642 3643 3644 3645 3646
#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();

3647
int main() {
3648 3649 3650
cbrt()
; return 0; }
EOF
3651
if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3652 3653 3654
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
3655 3656
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676
  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
3677
echo "configure:3678: checking for rint" >&5
3678 3679 3680 3681
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
3682
#line 3683 "configure"
3683 3684 3685 3686 3687 3688 3689 3690 3691
#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();

3692
int main() {
3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704

/* 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
3705
if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3706 3707 3708
  rm -rf conftest*
  eval "ac_cv_func_rint=yes"
else
3709 3710
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3711 3712 3713 3714
  rm -rf conftest*
  eval "ac_cv_func_rint=no"
fi
rm -f conftest*
3715
fi
3716

3717 3718 3719 3720 3721 3722 3723 3724
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
3725
echo $ac_n "checking for rint in -lm""... $ac_c" 1>&6
3726
echo "configure:3727: checking for rint in -lm" >&5
3727
ac_lib_var=`echo m'_'rint | sed 'y%./+-%__p_%'`
3728 3729 3730 3731 3732 3733
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
3734
#line 3735 "configure"
3735 3736 3737 3738 3739 3740
#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();

3741
int main() {
3742 3743 3744
rint()
; return 0; }
EOF
3745
if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3746 3747 3748
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
3749 3750
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770
  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


3771
echo $ac_n "checking setting USE_LOCALE""... $ac_c" 1>&6
3772
echo "configure:3773: checking setting USE_LOCALE" >&5
3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783
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
3784
echo "configure:3785: checking setting DEF_PGPORT" >&5
3785 3786 3787 3788 3789 3790
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
3791
echo "configure:3792: checking setting HBA" >&5
3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803
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 


3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820
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
3821 3822 3823
# 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.
3824 3825 3826
# 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 |
3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839
  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
3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893
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)
3894
    echo "$CONFIG_STATUS generated by autoconf version 2.12"
3895 3896 3897 3898 3899 3900 3901 3902 3903
    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

Marc G. Fournier's avatar
Marc G. Fournier committed
3904
trap 'rm -fr `echo "GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940
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
3941 3942
s%@PORTNAME@%$PORTNAME%g
s%@AROPT@%$AROPT%g
3943 3944 3945
s%@SHARED_LIB@%$SHARED_LIB%g
s%@DLSUFFIX@%$DLSUFFIX%g
s%@DL_LIB@%$DL_LIB%g
3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964
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
3965
s%@TR@%$TR%g
3966 3967 3968 3969
s%@YACC@%$YACC%g
s%@YFLAGS@%$YFLAGS%g
s%@yacc@%$yacc%g
s%@bison@%$bison%g
3970
s%@LIBOBJS@%$LIBOBJS%g
3971
s%@STRDUP@%$STRDUP%g
3972
s%@INET_ATON@%$INET_ATON%g
3973
s%@STRERROR@%$STRERROR%g
3974 3975 3976

CEOF
EOF
3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012

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

4013 4014
cat >> $CONFIG_STATUS <<EOF

Marc G. Fournier's avatar
Marc G. Fournier committed
4015
CONFIG_FILES=\${CONFIG_FILES-"GNUmakefile Makefile.global backend/port/Makefile bin/psql/Makefile bin/pg_dump/Makefile backend/utils/Gen_fmgrtab.sh"}
4016 4017 4018
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4019
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4020
  case "$ac_file" in
4021
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4022 4023 4024 4025
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

4026
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049

  # 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

4050

4051 4052 4053 4054 4055 4056 4057 4058
  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
4059 4060

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4061 4062 4063 4064
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
4065
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4066
fi; done
4067
rm -f conftest.s*
4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087

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

4088 4089 4090 4091 4092 4093 4094
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
4095
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4096
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4097
  case "$ac_file" in
4098
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4099 4100 4101 4102 4103 4104 4105
       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
4106 4107
  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
4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175

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

4176 4177 4178
EOF

cat >> $CONFIG_STATUS <<EOF
4179 4180
ac_sources="include/port/${PORTNAME}.h makefiles/Makefile.${PORTNAME}"
ac_dests="include/os.h Makefile.port"
4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220
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
4221 4222
EOF
cat >> $CONFIG_STATUS <<EOF
4223

4224 4225
EOF
cat >> $CONFIG_STATUS <<\EOF
4226 4227 4228 4229 4230 4231

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
4232