#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12 
# 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:
ac_help="$ac_help
  --without-gcc           use CC to compile"
ac_help="$ac_help
  --with-purify           configure to postprocess with purify"
ac_help="$ac_help
  --with-x                use the X Window System"
ac_help="$ac_help
  --with-includes=DIR     search include DIR for optional packages below"
ac_help="$ac_help
  --with-libraries=DIR    search library DIR for optional packages below"
ac_help="$ac_help
  --without-motif         disable Motif (for xmlock)"
ac_help="$ac_help
  --without-athena        disable Athena (for xalock)"
ac_help="$ac_help
  --without-sx            disable sx (for xalock)"
ac_help="$ac_help
  --without-editres       disable debugger (for x?lock)"
ac_help="$ac_help
  --without-xpm           enable color pixmap XPM mode(s)"
ac_help="$ac_help
  --without-opengl        disable 3D OpenGL (for GL modes)"
ac_help="$ac_help
  --without-mesagl        disable 3D MesaGL (for GL modes)"
ac_help="$ac_help
  --without-dtsaver       disable -dtsaver option"
ac_help="$ac_help
  --without-dpms          disable DPMS"
ac_help="$ac_help
  --without-rplay         disable RPLAY sounds"
ac_help="$ac_help
  --without-nas           disable NAS sounds"
ac_help="$ac_help
  --without-crypt         disable CRYPT"
ac_help="$ac_help
  --without-gtk           disable GTK (no xglock build)"
ac_help="$ac_help
  --with-gtk-prefix=DIR   Prefix where GTK is installed (optional)"
ac_help="$ac_help
  --with-gtk-exec-prefix=DIR 
                          Exec prefix where GTK is installed (optional)"
ac_help="$ac_help
  --disable-gtktest       Do not try to compile and run a test GTK program"
ac_help="$ac_help
  --without-gtkfontsel    disable gtkfontsel widget (for xglock)"
ac_help="$ac_help
  --enable-bitmapdir=DIR  set directory for bitmaps, default is ./bitmaps"
ac_help="$ac_help
  --enable-bitmaptype=name
                          set name for bitmap type"
ac_help="$ac_help
  --enable-pixmapdir=DIR  set directory for pixmaps, default is ./pixmaps"
ac_help="$ac_help
  --enable-pixmaptype=name
                          set name for pixmap type"
ac_help="$ac_help
  --enable-mapdir=DIR     set directory for bitmaps and pixmaps"
ac_help="$ac_help
  --enable-maptype=name   set name for bitmap and pixmap type"
ac_help="$ac_help
  --enable-def-play=program
                          set def-play to program that plays sounds"
ac_help="$ac_help
  --disable-vroot         disables xlock from being able to run in root window
                          (some window managers have problems)"
ac_help="$ac_help
  --disable-allow-root    allows users to turn off allowroot (default is to
                          always allow root to be able to unlock xlock)"
ac_help="$ac_help
  --enable-vtlock         allows to turn on VT switch lock (default is to be
                          able to switch to another VT)"
ac_help="$ac_help
  --enable-syslog         enable syslog logging"
ac_help="$ac_help
  --enable-multiple-user  enable multiple users"
ac_help="$ac_help
  --enable-multiple-root  enable multiple root users"
ac_help="$ac_help
  --enable-window-visibility
                          allow a window to be displayed over xlock"
ac_help="$ac_help
  --enable-old-event-loop some machines may still need this
                          (fd_set errors may be a sign)"
ac_help="$ac_help
  --enable-xlockrc        for unknown shadow passwd algorithm"
ac_help="$ac_help
  --enable-auto-logout=time
                          enable auto-logout code for lab use (time in minutes)"
ac_help="$ac_help
  --enable-default-auto-logout=time
                          set default-auto-logout (time in minutes)"
ac_help="$ac_help
  --enable-button-logout=time
                          enable button logout for lab use (time in minutes)"
ac_help="$ac_help
  --enable-default-button-logout=time
                          set default-button-logout (time in minutes)"
ac_help="$ac_help
  --disable-bomb          disable automatic logout mode"
ac_help="$ac_help
  --enable-unstable       enables starfish and bubble3d GL mode"
ac_help="$ac_help
  --enable-closedown-logout
                          define this one or next, with enable-auto-logout,"
ac_help="$ac_help
  --enable-session-logout enable-button-logout, and/or enable-bomb, for xdm"
ac_help="$ac_help
  --enable-staff-file=filename
                          set file of staff who are exempt from auto-logout"
ac_help="$ac_help
  --enable-staff-netgroup=netgroup
                          set netgroup of staff who are exempt from auto-logout"
ac_help="$ac_help
  --enable-kerberos4      enable Kerberos 4"
ac_help="$ac_help
  --enable-kerberos5      enable Kerberos 5"
ac_help="$ac_help
  --enable-dce-passwd     enable DCE passwording"
ac_help="$ac_help
  --enable-pam            enable PAM"
ac_help="$ac_help
  --enable-afs            enable AIX AFS"
ac_help="$ac_help
  --enable-sunos-adjunct-passwd
                          enable SUNOS Adjunct passwording"
ac_help="$ac_help
  --enable-use-mb         enable Xmb function series (new)"
ac_help="$ac_help
  --enable-customization  enable customization of XResource"
ac_help="$ac_help
  --enable-modules        enable modules (new and experimental)"
ac_help="$ac_help
  --enable-check          enable check (new and experimental)"
ac_help="$ac_help
  --with-lang=lang        use a foreign language (nl/fr/de)"
ac_help="$ac_help
  --enable-orig-xpm-patch use the original pixmap patch for mail icon
                          (have colormap problems in 8 bits depth visuals)"
ac_help="$ac_help
  --disable-setuid        disables setuid installation if automatically chosen"

# 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=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12

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)
    echo "configure generated by autoconf version 2.12"
    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.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi

# 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=config.h.in

# 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'
cross_compiling=$ac_cv_prog_cc_cross

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



PACKAGE=xlockmore

cat >> confdefs.h <<EOF
#define PACKAGE "$PACKAGE"
EOF

VERSION=4.12

cat >> confdefs.h <<EOF
#define VERSION "$VERSION"
EOF


# Check whether --with-gcc or --without-gcc was given.
if test "${with_gcc+set}" = set; then
  withval="$with_gcc"
  :
fi


test -n "$CC" && cc_specified=yes
case ${with_gcc} in
  yes ) CC=gcc ;;
  no  ) CC=cc ;;
  *   ) # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:690: checking for $ac_word" >&5
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
echo "configure:719: checking for $ac_word" >&5
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

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

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
#line 777 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  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
echo "configure:801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:806: checking whether we are using GNU C" >&5
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
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

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

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  ac_test_CFLAGS="${CFLAGS+set}"
  ac_save_CFLAGS="$CFLAGS"
  CFLAGS=
  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

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"
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
;;
esac

if test "${CC}" = "gcc" ; then
  CFLAGS="${CFLAGS} -Wall"
fi

opt_purify=no
# Check whether --with-purify or --without-purify was given.
if test "${with_purify+set}" = set; then
  withval="$with_purify"
  opt_purify=$withval
fi

if test "$opt_purify" = yes; then
  echo "$ac_t""enabling purify" 1>&6
  PURIFY="purify"
else
  PURIFY=
fi

echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:878: checking whether ln -s works" >&5
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 how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:899: checking how to run the C preprocessor" >&5
# 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
#line 914 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 931 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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

echo $ac_n "checking for AIX""... $ac_c" 1>&6
echo "configure:960: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
#line 962 "configure"
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
#define _ALL_SOURCE 1
EOF

else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*


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.

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1013: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      for ac_prog in ginstall installbsd scoinst install; do
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    # OSF/1 installbsd also uses dspmsg, but is usable.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

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

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

echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1063: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
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

ac_link_test="-L"
# test test
echo $ac_n "checking test -h""... $ac_c" 1>&6
echo "configure:1092: checking test -h" >&5
if (test \! -h /) >/dev/null 2>/dev/null ; then
  ac_link_test="-h"
  echo "$ac_t""$ac_link_test" 1>&6
else
  echo "$ac_t""$ac_link_test" 1>&6
fi


echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
echo "configure:1102: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
  echo "$ac_t""yes" 1>&6
  ISC=yes # If later tests want to check for ISC.
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

  if test "$GCC" = yes; then
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
else
  echo "$ac_t""no" 1>&6
  ISC=
fi

for ac_hdr in fcntl.h limits.h sys/select.h sys/time.h syslog.h unistd.h memory.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1126: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1131 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1164: checking for working const" >&5
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
#line 1169 "configure"
#include "confdefs.h"

int main() {

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

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

; return 0; }
EOF
if { (eval echo configure:1218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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 ANSI C header files""... $ac_c" 1>&6
echo "configure:1239: checking for ANSI C header files" >&5
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
#line 1244 "configure"
#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"
{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
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
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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
#line 1269 "configure"
#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
#line 1287 "configure"
#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
  cat > conftest.$ac_ext <<EOF
#line 1308 "configure"
#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
if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

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 mode_t""... $ac_c" 1>&6
echo "configure:1343: checking for mode_t" >&5
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
#line 1348 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  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 uid_t in sys/types.h""... $ac_c" 1>&6
echo "configure:1376: checking for uid_t in sys/types.h" >&5
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
#line 1381 "configure"
#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 pid_t""... $ac_c" 1>&6
echo "configure:1410: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1415 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

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

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:1443: checking for size_t" >&5
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
#line 1448 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  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
echo "configure:1476: checking whether time.h and sys/time.h may both be included" >&5
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
#line 1481 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:1490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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
echo "configure:1511: checking whether struct tm is in sys/time.h or time.h" >&5
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
#line 1516 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:1524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_struct_tm=time.h
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  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


for ac_func in gethostname select strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1548: checking for $ac_func" >&5
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
#line 1553 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

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

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

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


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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_VFORK 1
EOF

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

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'seteuid`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SETEUID 1
EOF

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'setreuid`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SETREUID 1
EOF

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

fi



# 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
echo "configure:1762: checking host system type" >&5

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`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

canonical=$host

# Configure paths for GTK+
# Owen Taylor     97-11-3



# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
echo "configure:1794: checking for X" >&5

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

# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
  # The user explicitly disabled X.
  have_x=disabled
else
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
    # Both variables are already set.
    have_x=yes
  else
if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of the vars are not set, and there is no cached value.
ac_x_includes=NO ac_x_libraries=NO
rm -fr conftestdir
if mkdir conftestdir; then
  cd conftestdir
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  cat > Imakefile <<'EOF'
acfindx:
	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
    for ac_extension in a so sl; do
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
        test -f $ac_im_libdir/libX11.$ac_extension; then
        ac_im_usrlibdir=$ac_im_libdir; break
      fi
    done
    # Screen out bogus values from the imake configuration.  They are
    # bogus both because they are the default anyway, and because
    # using them would break gcc on systems where it needs fixed includes.
    case "$ac_im_incroot" in
	/usr/include) ;;
	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
    esac
    case "$ac_im_usrlibdir" in
	/usr/lib | /lib) ;;
	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
    esac
  fi
  cd ..
  rm -fr conftestdir
fi

if test "$ac_x_includes" = NO; then
  # Guess where to find include files, by looking for this one X11 .h file.
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h

  # First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
#line 1856 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  # We can compile using X headers with no special include directory.
ac_x_includes=
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  # Look for the header file in a standard set of common directories.
# Check X11 before X11Rn because it is often a symlink to the current release.
  for ac_dir in               \
    /usr/X11/include          \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/include              \
    /usr/local/include        \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    ; \
  do
    if test -r "$ac_dir/$x_direct_test_include"; then
      ac_x_includes=$ac_dir
      break
    fi
  done
fi
rm -f conftest*
fi # $ac_x_includes = NO

if test "$ac_x_libraries" = NO; then
  # Check for the libraries.

  test -z "$x_direct_test_library" && x_direct_test_library=Xt
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc

  # See if we find them without any special options.
  # Don't add to $LIBS permanently.
  ac_save_LIBS="$LIBS"
  LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1930 "configure"
#include "confdefs.h"

int main() {
${x_direct_test_function}()
; return 0; }
EOF
if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
ac_x_libraries=
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  LIBS="$ac_save_LIBS"
# First see if replacing the include by lib works.
# Check X11 before X11Rn because it is often a symlink to the current release.
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11	  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
      ac_x_libraries=$ac_dir
      break 2
    fi
  done
done
fi
rm -f conftest*
fi # $ac_x_libraries = NO

if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  # Didn't find X anywhere.  Cache the known absence of X.
  ac_cv_have_x="have_x=no"
else
  # Record where we found X for the cache.
  ac_cv_have_x="have_x=yes \
	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi
fi
  fi
  eval "$ac_cv_have_x"
fi # $with_x != no

if test "$have_x" != yes; then
  echo "$ac_t""$have_x" 1>&6
  no_x=yes
else
  # If each of the values was on the command line, it overrides each guess.
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  # Update the cache value to reflect the command line values.
  ac_cv_have_x="have_x=yes \
		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
fi

if test "$no_x" = yes; then
  # Not all programs may use this symbol, but it does not hurt to define it.
  cat >> confdefs.h <<\EOF
#define X_DISPLAY_MISSING 1
EOF

  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else
  if test -n "$x_includes"; then
    X_CFLAGS="$X_CFLAGS -I$x_includes"
  fi

  # It would also be nice to do this for all -L options, not just this one.
  if test -n "$x_libraries"; then
    X_LIBS="$X_LIBS -L$x_libraries"
    # For Solaris; some versions of Sun CC require a space after -R and
    # others require no space.  Words are not sufficient . . . .
    case "`(uname -sr) 2>/dev/null`" in
    "SunOS 5"*)
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
echo "configure:2043: checking whether -R must be followed by a space" >&5
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
      cat > conftest.$ac_ext <<EOF
#line 2046 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_R_nospace=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_nospace=no
fi
rm -f conftest*
      if test $ac_R_nospace = yes; then
	echo "$ac_t""no" 1>&6
	X_LIBS="$X_LIBS -R$x_libraries"
      else
	LIBS="$ac_xsave_LIBS -R $x_libraries"
	cat > conftest.$ac_ext <<EOF
#line 2069 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
  ac_R_space=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_R_space=no
fi
rm -f conftest*
	if test $ac_R_space = yes; then
	  echo "$ac_t""yes" 1>&6
	  X_LIBS="$X_LIBS -R $x_libraries"
	else
	  echo "$ac_t""neither works" 1>&6
	fi
      fi
      LIBS="$ac_xsave_LIBS"
    esac
  fi

  # Check for system-dependent libraries X programs must link with.
  # Do this before checking for the system-independent R6 libraries
  # (-lICE), since we may need -lsocket or whatever for X linking.

  if test "$ISC" = yes; then
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  else
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
    # the Alpha needs dnet_stub (dnet does not exist).
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
echo "configure:2108: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | 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="-ldnet  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2116 "configure"
#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 dnet_ntoa();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
echo "configure:2149: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | 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="-ldnet_stub  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2157 "configure"
#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 dnet_ntoa();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
    # to get the SysV transport functions.
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
    # needs -lnsl.
    # The nsl library prevents programs from opening the X display
    # on Irix 5.2, according to dickey@clark.net.
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
echo "configure:2197: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2202 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); 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 gethostbyname();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_gethostbyname = no; then
      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:2246: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2254 "configure"
#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 gethostbyname();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # lieder@skyler.mavd.honeywell.com says without -lsocket,
    # socket/setsockopt and other routines are undefined under SCO ODT
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
    # on later versions), says simon@lia.di.epfl.ch: it contains
    # gethostby* variants that don't use the nameserver (or something).
    # -lsocket must be given before -lnsl if both are needed.
    # We assume that if connect needs -lnsl, so does gethostbyname.
    echo $ac_n "checking for connect""... $ac_c" 1>&6
echo "configure:2295: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2300 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); 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 connect();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_connect = no; then
      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
echo "configure:2344: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2352 "configure"
#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 connect();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
else
  echo "$ac_t""no" 1>&6
fi

    fi

    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
    echo $ac_n "checking for remove""... $ac_c" 1>&6
echo "configure:2387: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2392 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char remove(); 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 remove();

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_remove = no; then
      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
echo "configure:2436: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | 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="-lposix  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2444 "configure"
#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 remove();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
else
  echo "$ac_t""no" 1>&6
fi

    fi

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi

    if test $ac_cv_func_shmat = no; then
      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
echo "configure:2528: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | 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="-lipc  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2536 "configure"
#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 shmat();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
else
  echo "$ac_t""no" 1>&6
fi

    fi
  fi

  # Check for libraries that X11R6 Xt/Xaw programs need.
  ac_save_LDFLAGS="$LDFLAGS"
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  # check for ICE first), but we must link in the order -lSM -lICE or
  # we get undefined symbols.  So assume we have SM if we have ICE.
  # These have to be linked with before -lX11, unlike the other
  # libraries we check for below, so use a different variable.
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
echo "configure:2580: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | 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="-lICE  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2588 "configure"
#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 IceConnectionNumber();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
else
  echo "$ac_t""no" 1>&6
fi

  LDFLAGS="$ac_save_LDFLAGS"

fi

if test "$no_x" = yes; then
  XLIBS=NONE
else
  if test -n "${x_includes}"; then
    XLOCKINC="-I${x_includes} ${XLOCKINC}"
    XMLOCKINC="-I${x_includes} ${XMLOCKINC}"
    XALOCKINC="-I${x_includes} ${XALOCKINC}"
  fi
  XLIBS="${x_libraries}"
  if test -n "${x_libraries}"; then
    XLOCK_LDFLAGS="/usr/lib:${x_libraries}"
    XMLOCK_LDFLAGS="/usr/lib:${x_libraries}"
    XALOCK_LDFLAGS="/usr/lib:${x_libraries}"
    XLOCKLIBPATHS="-L${x_libraries} ${XLOCKLIBPATHS}"
    XMLOCKLIBPATHS="-L${x_libraries} ${XMLOCKLIBPATHS}"
    XALOCKLIBPATHS="-L${x_libraries} ${XALOCKLIBPATHS}"
  fi
  XLOCKLIBS="${X_PRE_LIBS} ${X_EXTRA_LIBS} ${XLOCKLIBS}"
  XMLOCKLIBS="-lXt ${XMLOCKLIBS}"
  XALOCKLIBS="-lXt ${XALOCKLIBS}"
fi

# Try and find the app-defaults directory.








    echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
echo "configure:2655: checking for X app-defaults directory" >&5
if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  rm -fr conftestdir
  if mkdir conftestdir; then
    cd conftestdir
    # Make sure to not put "make" in the Imakefile rules, since we grep it out.
    cat > Imakefile <<'EOF'
acfindx:
  @echo 'ac_x_app_defaults="${XAPPLOADDIR}"'
EOF
    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
      # GNU make sometimes prints "make[1]: Entering...", which'd confuse us.
      eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
    fi
    cd ..
    rm -fr conftestdir
  fi
        # Look for the directory under a standard set of common directories.
  # Check X11 before X11Rn because it's often a symlink to the current release.
  for ac_dir in         \
    ${prefix}/lib/X11/app-defaults \
    ${prefix}/lib/app-defaults \
    ${prefix}/lib/X11R6/app-defaults \
    ${prefix}/lib/X11R6/X11/app-defaults \
    ${prefix}/lib/X11R5/app-defaults \
    ${prefix}/lib/X11R5/X11/app-defaults \
    ${prefix}/lib/X11R4/app-defaults \
    ${prefix}/lib/X11R4/X11/app-defaults \
            \
    /usr/X11/lib/app-defaults     \
    /usr/X11R6/lib/app-defaults     \
    /usr/X11R6/lib/X11/app-defaults   \
    /usr/X11R5/lib/app-defaults     \
    /usr/X11R5/lib/X11/app-defaults   \
    /usr/X11R4/lib/app-defaults     \
    /usr/X11R4/lib/X11/app-defaults   \
            \
    /usr/lib/X11/app-defaults     \
    /usr/lib/X11R6/app-defaults     \
    /usr/lib/X11R5/app-defaults     \
    /usr/lib/X11R4/app-defaults     \
            \
    /usr/local/X11/lib/app-defaults   \
    /usr/remote/X11/lib/app-defaults   \
    /usr/local/X11R6/lib/app-defaults   \
    /usr/local/X11R6/lib/X11/app-defaults   \
    /usr/local/X11R5/lib/app-defaults   \
    /usr/local/X11R5/lib/X11/app-defaults   \
    /usr/local/X11R4/lib/app-defaults   \
    /usr/local/X11R4/lib/X11/app-defaults   \
            \
    /usr/local/lib/X11/app-defaults   \
    /usr/remote/lib/X11/app-defaults   \
    /usr/local/lib/X11R6/app-defaults   \
    /usr/local/lib/X11R6/X11/app-defaults \
    /usr/local/lib/X11R5/app-defaults   \
    /usr/local/lib/X11R5/X11/app-defaults \
    /usr/local/lib/X11R4/app-defaults   \
    /usr/local/lib/X11R4/X11/app-defaults \
            \
    /usr/X386/lib/X11/app-defaults    \
    /usr/x386/lib/X11/app-defaults    \
    /usr/XFree86/lib/X11/app-defaults   \
            \
    /usr/lib/X11/app-defaults     \
    /usr/unsupported/lib/X11/app-defaults \
    /usr/athena/lib/X11/app-defaults    \
    /usr/local/x11r5/lib/X11/app-defaults \
    /usr/lpp/Xamples/lib/X11/app-defaults \
    /lib/usr/lib/X11/app-defaults   \
    /usr/local/lib/app-defaults   \
    /usr/remote/lib/app-defaults   \
            \
    /usr/openwin/lib/app-defaults   \
    /usr/openwin/lib/X11/app-defaults   \
    /usr/openwin/share/lib/app-defaults   \
    /usr/openwin/share/lib/X11/app-defaults \
            \
    /X11R6/lib/app-defaults     \
    /X11R5/lib/app-defaults     \
    /X11R4/lib/app-defaults     \
    ; \
  do
    if test -d "$ac_dir"; then
      ac_x_app_defaults=$ac_dir
      break
    fi
  done

      if test x"$ac_x_app_defaults" = x; then
        ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
      else
        # Record where we found app-defaults for the cache.
        ac_cv_x_app_defaults="$ac_x_app_defaults"
      fi
fi

echo "$ac_t""$ac_cv_x_app_defaults" 1>&6
    eval ac_x_app_defaults="$ac_cv_x_app_defaults"

APPDEFAULTS=$ac_x_app_defaults

# Check whether --with-includes or --without-includes was given.
if test "${with_includes+set}" = set; then
  withval="$with_includes"
  :
fi

case "x$withval" in
x/*|x.*)
  extra_include=$withval
  echo "$ac_t""adding $extra_include to include search path for following packages" 1>&6
  if test ! -d $extra_include; then
    echo "$ac_t""Warning: Directory $extra_include does not exist" 1>&6
  fi
  ;;
*)
  extra_include=""
  ;;
esac

# Check whether --with-libraries or --without-libraries was given.
if test "${with_libraries+set}" = set; then
  withval="$with_libraries"
  :
fi

case "x$withval" in
x/*|x.*)
  extra_lib=$withval
  echo "$ac_t""adding $extra_lib to library search path for following packages" 1>&6
  if test ! -d $extra_lib; then
    echo "$ac_t""Warning: Directory $extra_lib does not exist" 1>&6
  fi
  ;;
*)
  extra_lib=""
  ;;
esac






motif_includes=NONE
motif_libraries=NONE

echo $ac_n "checking for Motif""... $ac_c" 1>&6
echo "configure:2807: checking for Motif" >&5
# Check whether --with-motif or --without-motif was given.
if test "${with_motif+set}" = set; then
  withval="$with_motif"
  :
fi

if test "x$with_motif" = xno; then
  no_motif=yes
else
  if test "x$motif_includes" != xNONE && test "x$motif_libraries" != xNONE; then
    no_motif=
  else
if eval "test \"`echo '$''{'ac_cv_path_motif'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_motif=yes
test -z "$motif_direct_test_library" && motif_direct_test_library=Xm
test -z "$motif_direct_test_function" && motif_direct_test_function=XmCreatePushButton
test -z "$motif_direct_test_include" && motif_direct_test_include=Xm/Xm.h
  for ac_dir in               \
    /usr/include/Motif1.2     \
    /usr/Motif1.2/include     \
                              \
    /usr/motif/include        \
                              \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X11/include          \
    /usr/include/X11          \
    /usr/local/X11/include    \
    /usr/local/include/X11    \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/dt/include           \
                              \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$motif_direct_test_include"; then
      no_motif= ac_motif_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$motif_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_motif_includes" | sed s/include/lib/` \
    /usr/lib/Motif1.2     \
    /usr/Motif1.2/lib     \
                          \
    /usr/motif/lib        \
                          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X11/lib          \
    /usr/lib/X11          \
    /usr/local/X11/lib    \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${motif_direct_test_library}.$ac_extension; then
      no_motif= ac_motif_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_motif" = yes; then
  ac_cv_path_motif="no_motif=yes"
else
  ac_cv_path_motif="no_motif= ac_motif_includes=$ac_motif_includes ac_motif_libraries=$ac_motif_libraries"
fi
fi
  fi
  eval "$ac_cv_path_motif"
fi # with_motif != no

if test "$no_motif" = yes; then
  echo "$ac_t""no" 1>&6
  XMLOCK=""
  INSTALL_XMLOCK=""
  UNINSTALL_XMLOCK=""
else
  XMLOCKLIBS="-lXm ${XMLOCKLIBS}"
  XMLOCK="xmlock"
  INSTALL_XMLOCK="install_xmlock"
  UNINSTALL_XMLOCK="uninstall_xmlock"
  test "x$motif_includes" = xNONE && motif_includes=$ac_motif_includes
  test "x$motif_libraries" = xNONE && motif_libraries=$ac_motif_libraries
  ac_cv_path_motif="no_motif= ac_motif_includes=$motif_includes ac_motif_libraries=$motif_libraries"
  echo "$ac_t""libraries $motif_libraries, headers $motif_includes" 1>&6
fi


if test "x$motif_libraries" != x && test "x$motif_libraries" != xNONE ; then
  XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$motif_libraries"
  XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$motif_libraries"
fi
if test "x$motif_includes" != x && test "x$motif_includes" != xNONE ; then
  XMLOCKINC="${XMLOCKINC} -I$motif_includes"
fi






athena_includes=NONE
athena_libraries=NONE

echo $ac_n "checking for Athena""... $ac_c" 1>&6
echo "configure:2976: checking for Athena" >&5
# Check whether --with-athena or --without-athena was given.
if test "${with_athena+set}" = set; then
  withval="$with_athena"
  :
fi

if test "x$with_athena" = xno; then
  no_athena=yes
else
  if test "x$athena_includes" != xNONE && test "x$athena_libraries" != xNONE; then
    no_athena=
  else
if eval "test \"`echo '$''{'ac_cv_path_athena'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_athena=yes
test -z "$athena_direct_test_library" && athena_direct_test_library=Xaw
test -z "$athena_direct_test_function" && athena_direct_test_function=XawInitializeWidgetSet
test -z "$athena_direct_test_include" && athena_direct_test_include=X11/Xaw/XawInit.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X11/include          \
    /usr/include/X11          \
    /usr/local/X11/include    \
    /usr/local/include/X11    \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/dt/include           \
                              \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$athena_direct_test_include"; then
      no_athena= ac_athena_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$athena_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_athena_includes" | sed s/include/lib/` \
                          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X11/lib          \
    /usr/lib/X11          \
    /usr/local/X11/lib    \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${athena_direct_test_library}.$ac_extension; then
      no_athena= ac_athena_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_athena" = yes; then
  ac_cv_path_athena="no_athena=yes"
else
  ac_cv_path_athena="no_athena= ac_athena_includes=$ac_athena_includes ac_athena_libraries=$ac_athena_libraries"
fi
fi
  fi
  eval "$ac_cv_path_athena"
fi # with_athena != no

if test "$no_athena" = yes; then
  echo "$ac_t""no" 1>&6
  XALOCK=""
  INSTALL_XALOCK=""
  UNINSTALL_XALOCK=""
else
  XALOCKLIBS="-lXaw ${XALOCKLIBS}"
  XALOCK="xalock"
  INSTALL_XALOCK="install_xalock"
  UNINSTALL_XALOCK="uninstall_xalock"
  test "x$athena_includes" = xNONE && athena_includes=$ac_athena_includes
  test "x$athena_libraries" = xNONE && athena_libraries=$ac_athena_libraries
  ac_cv_path_athena="no_athena= ac_athena_includes=$athena_includes ac_athena_libraries=$athena_libraries"
  echo "$ac_t""libraries $athena_libraries, headers $athena_includes" 1>&6
fi


if test "x$athena_libraries" != x && test "x$athena_libraries" != xNONE ; then
  XALOCK_LDFLAGS="${XALOCK_LDFLAGS}:$athena_libraries"
  XALOCKLIBPATHS="${XALOCKLIBPATHS} -L$athena_libraries"
fi
if test "x$athena_includes" != x && test "x$athena_includes" != xNONE ; then
  XALOCKINC="${XALOCKINC} -I$athena_includes"
fi






sx_includes=NONE
sx_libraries=NONE

echo $ac_n "checking for sx""... $ac_c" 1>&6
echo "configure:3142: checking for sx" >&5
# Check whether --with-sx or --without-sx was given.
if test "${with_sx+set}" = set; then
  withval="$with_sx"
  :
fi

if test "x$with_sx" = xno; then
  no_sx=yes
else
  if test "x$sx_includes" != xNONE && test "x$sx_libraries" != xNONE; then
    no_sx=
  else
if eval "test \"`echo '$''{'ac_cv_path_sx'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_sx=yes
test -z "$sx_direct_test_library" && sx_direct_test_library=sx
test -z "$sx_direct_test_function" && sx_direct_test_function=OpenWindow
test -z "$sx_direct_test_include" && sx_direct_test_include=X11/libsx.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X11/include          \
    /usr/include/X11          \
    /usr/local/X11/include    \
    /usr/local/include/X11    \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/dt/include           \
                              \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$sx_direct_test_include"; then
      no_sx= ac_sx_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$sx_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_sx_includes" | sed s/include/lib/` \
                          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X11/lib          \
    /usr/lib/X11          \
    /usr/local/X11/lib    \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${sx_direct_test_library}.$ac_extension; then
      no_sx= ac_sx_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_sx" = yes; then
  ac_cv_path_sx="no_sx=yes"
else
  ac_cv_path_sx="no_sx= ac_sx_includes=$ac_sx_includes ac_sx_libraries=$ac_sx_libraries"
fi
fi
  fi
  eval "$ac_cv_path_sx"
fi # with_sx != no

if test "$no_sx" = yes; then
  echo "$ac_t""no" 1>&6
  XALOCK=""
  INSTALL_XALOCK=""
  UNINSTALL_XALOCK=""
else
  XALOCKLIBS="-lsx ${XALOCKLIBS}"
  XALOCK="xalock"
  INSTALL_XALOCK="install_xalock"
  UNINSTALL_XALOCK="uninstall_xalock"
  test "x$sx_includes" = xNONE && sx_includes=$ac_sx_includes
  test "x$sx_libraries" = xNONE && sx_libraries=$ac_sx_libraries
  ac_cv_path_sx="no_sx= ac_sx_includes=$sx_includes ac_sx_libraries=$sx_libraries"
  echo "$ac_t""libraries $sx_libraries, headers $sx_includes" 1>&6
fi


if test "x$sx_libraries" != x && test "x$sx_libraries" != xNONE ; then
  XALOCK_LDFLAGS="$sx_libraries:${XALOCK_LDFLAGS}"
  XALOCKLIBPATHS="-L$sx_libraries ${XALOCKLIBPATHS}"
fi
if test "x$sx_includes" != x && test "x$sx_includes" != xNONE ; then
  XALOCKINC="${XALOCKINC} -I$sx_includes"
fi






editres_includes=NONE
editres_libraries=NONE

echo $ac_n "checking for Editres""... $ac_c" 1>&6
echo "configure:3302: checking for Editres" >&5
# Check whether --with-editres or --without-editres was given.
if test "${with_editres+set}" = set; then
  withval="$with_editres"
  :
fi

if test "x$with_editres" = xno; then
  no_editres=yes
else
  if test "x$editres_includes" != xNONE && test "x$editres_libraries" != xNONE; then
    no_editres=
  else
if eval "test \"`echo '$''{'ac_cv_path_editres'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_editres=yes
test -z "$editres_direct_test_library" && editres_direct_test_library=Xmu
test -z "$editres_direct_test_function" && editres_direct_test_function=_XEditResCheckMessages
test -z "$editres_direct_test_include" && editres_direct_test_include=X11/Xmu/Editres.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
    /usr/X11/include          \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include      \
                              \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    /usr/unsupported/include  \
    /usr/athena/include       \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$editres_direct_test_include"; then
      no_editres= ac_editres_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$editres_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_editres_includes" | sed s/include/lib/` \
                          \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11      \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${editres_direct_test_library}.$ac_extension; then
      no_editres= ac_editres_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_editres" = yes; then
  ac_cv_path_editres="no_editres=yes"
else
  ac_cv_path_editres="no_editres= ac_editres_includes=$ac_editres_includes ac_editres_libraries=$ac_editres_libraries"
fi
fi
  fi
  eval "$ac_cv_path_editres"
fi # with_editres != no

if test "$no_editres" = yes; then
  echo "$ac_t""no" 1>&6
else
  cat >> confdefs.h <<\EOF
#define USE_XMU 1
EOF

  XMLOCKLIBS="-lXmu ${XMLOCKLIBS}"
  XALOCKLIBS="-lXmu ${XALOCKLIBS}"
  test "x$editres_includes" = xNONE && editres_includes=$ac_editres_includes
  test "x$editres_libraries" = xNONE && editres_libraries=$ac_editres_libraries
  ac_cv_path_editres="no_editres= ac_editres_includes=$editres_includes ac_editres_libraries=$editres_libraries"
  echo "$ac_t""libraries $editres_libraries, headers $editres_includes" 1>&6
fi


if test "x$editres_libraries" != x && test "x$editres_libraries" != xNONE ; then
  XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$editres_libraries"
  XALOCK_LDFLAGS="${XALOCK_LDFLAGS}:$editres_libraries"
  XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$editres_libraries"
  XALOCKLIBPATHS="${XALOCKLIBPATHS} -L$editres_libraries"
fi
if test "x$editres_includes" != x && test "x$editres_includes" != xNONE ; then
  XMLOCKINC="${XMLOCKINC} -I$editres_includes"
  XALOCKINC="${XALOCKINC} -I$editres_includes"
fi

xpm=no





xpm_includes=NONE
xpm_libraries=NONE

echo $ac_n "checking for XPM""... $ac_c" 1>&6
echo "configure:3469: checking for XPM" >&5
# Check whether --with-xpm or --without-xpm was given.
if test "${with_xpm+set}" = set; then
  withval="$with_xpm"
  :
fi

if test "x$with_xpm" = xno; then
  no_xpm=yes
else
  if test "x$xpm_includes" != xNONE && test "x$xpm_libraries" != xNONE; then
    no_xpm=
  else
if eval "test \"`echo '$''{'ac_cv_path_xpm'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_xpm=yes
test -z "$xpm_direct_test_library" && xpm_direct_test_library=Xpm
test -z "$xpm_direct_test_function" && xpm_direct_test_function=XpmCreateImageFromData
test -z "$xpm_direct_test_include" && xpm_direct_test_include=xpm.h
  for ac_dir in                   \
    /usr/X11R6/include/X11        \
    /usr/X11R5/include/X11        \
    /usr/X11R4/include/X11        \
    /usr/X11/include/X11          \
                                  \
    /usr/include/X11/X11          \
    /usr/include/X11R6/X11        \
    /usr/include/X11R5/X11        \
    /usr/include/X11R4/X11        \
                                  \
    /usr/local/X11/include/X11    \
    /usr/local/X11R6/include/X11  \
    /usr/local/X11R5/include/X11  \
    /usr/local/X11R4/include/X11  \
                                  \
    /usr/local/include/X11/X11    \
    /usr/local/include/X11R6/X11  \
    /usr/local/include/X11R5/X11  \
    /usr/local/include/X11R4/X11  \
                                  \
    /usr/X386/include/X11         \
    /usr/x386/include/X11         \
    /usr/XFree86/include/X11/X11  \
                                  \
    /usr/local/include/X11        \
    /usr/remote/include/X11       \
    /usr/include/X11              \
    /usr/unsupported/include/X11  \
    /usr/athena/include/X11       \
    /usr/local/x11r5/include/X11  \
    /usr/lpp/Xamples/include/X11  \
                                  \
    /usr/openwin/include/X11      \
    /usr/openwin/share/include/X11 \
    /usr/openwin/include          \
                                  \
    /usr/include/Vk               \
    $extra_include                \
    $extra_include/X11            \
    ; \
  do
    if test -r "$ac_dir/$xpm_direct_test_include"; then
      no_xpm= ac_xpm_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$xpm_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_xpm_includes" | sed s%/X11$%% | sed s/include/lib/` \
                          \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11      \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${xpm_direct_test_library}.$ac_extension; then
      no_xpm= ac_xpm_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_xpm" = yes; then
  ac_cv_path_xpm="no_xpm=yes"
else
  ac_cv_path_xpm="no_xpm= ac_xpm_includes=$ac_xpm_includes ac_xpm_libraries=$ac_xpm_libraries"
fi
fi
  fi
  eval "$ac_cv_path_xpm"
fi # with_xpm != no

if test "$no_xpm" = yes; then
  echo "$ac_t""no" 1>&6
  XPM="#"
else
  xpm=yes
  cat >> confdefs.h <<\EOF
#define USE_XPMINC 1
EOF

  XLOCKLIBS="${XLOCKLIBS} -lXpm"
  XMLOCKLIBS="-lXpm ${XMLOCKLIBS}"
  test "x$xpm_includes" = xNONE && xpm_includes=$ac_xpm_includes
  test "x$xpm_libraries" = xNONE && xpm_libraries=$ac_xpm_libraries
  ac_cv_path_xpm="no_xpm= ac_xpm_includes=$xpm_includes ac_xpm_libraries=$xpm_libraries"
  echo "$ac_t""libraries $xpm_libraries, headers $xpm_includes" 1>&6
  XPM=""
fi


if test "x$xpm_libraries" != x && test "x$xpm_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$xpm_libraries"
  XMLOCK_LDFLAGS="${XMLOCK_LDFLAGS}:$xpm_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$xpm_libraries"
  XMLOCKLIBPATHS="${XMLOCKLIBPATHS} -L$xpm_libraries"
fi
if test "x$xpm_includes" != x && test "x$xpm_includes" != xNONE ; then
  XLOCKINC="${XLOCKINC} -I$xpm_includes"
fi

gl=no





opengl_includes=NONE
opengl_libraries=NONE

echo $ac_n "checking for OpenGL""... $ac_c" 1>&6
echo "configure:3642: checking for OpenGL" >&5
# Check whether --with-opengl or --without-opengl was given.
if test "${with_opengl+set}" = set; then
  withval="$with_opengl"
  :
fi

if test "x$with_opengl" = xno; then
  no_opengl=yes
else
  if test "x$opengl_includes" != xNONE && test "x$opengl_libraries" != xNONE; then
    no_opengl=
  else
if eval "test \"`echo '$''{'ac_cv_path_opengl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_opengl=yes
test -z "$opengl_direct_test_library" && opengl_direct_test_library=GL
test -z "$opengl_direct_test_library" && opengl_direct_test_library=GLU
test -z "$opengl_direct_test_function" && opengl_direct_test_function=glXCreateContext
test -z "$opengl_direct_test_include" && opengl_direct_test_include=GL/gl.h
  for ac_dir in               \
    /usr/include              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    $extra_include            \
    ; \
  do
# Make sure this is not MesaGL
    if test -r "$ac_dir/$opengl_direct_test_include" && test ! -r "$ac_dir/GL/xmesa.h"; then
      no_opengl= ac_opengl_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$opengl_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_opengl_includes" | sed s/include/lib/` \
                          \
    /usr/lib              \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
# Make sure its not a symbolic link to MesaGL library

    if test -r $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! $ac_link_test $ac_dir/lib${opengl_direct_test_library}.$ac_extension && test ! -r $ac_dir/libMesa${opengl_direct_test_library}.$ac_extension; then
      no_opengl= ac_opengl_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_opengl" = yes; then
  ac_cv_path_opengl="no_opengl=yes"
else
  ac_cv_path_opengl="no_opengl= ac_opengl_includes=$ac_opengl_includes ac_opengl_libraries=$ac_opengl_libraries"

fi
fi
  fi
  eval "$ac_cv_path_opengl"
fi # with_opengl != no

if test "$no_opengl" = yes; then
  echo "$ac_t""no" 1>&6
else
  gl=yes
  cat >> confdefs.h <<\EOF
#define USE_GL 1
EOF

  XLOCKLIBS="${XLOCKLIBS} -lGL -lGLU"
  test "x$opengl_includes" = xNONE && opengl_includes=$ac_opengl_includes
  test "x$opengl_libraries" = xNONE && opengl_libraries=$ac_opengl_libraries
  case "${canonical}" in
    *-*-solaris2* )
      cat >> confdefs.h <<\EOF
#define SUN_OGL_NO_VERTEX_MACROS 1
EOF

      if test "x$opengl_includes" = "x/usr/include"; then
        opengl_includes=""
      fi
    ;;
    *-*-irix5* | *-*-irix6* )
      XLOCKLIBS="${XLOCKLIBS} -lgl"
    ;;
  esac
  ac_cv_path_opengl="no_opengl= ac_opengl_includes=$opengl_includes ac_opengl_libraries=$opengl_libraries"
  echo "$ac_t""libraries $opengl_libraries, headers $opengl_includes" 1>&6
  # Check for OpenGL 1.1 features.
  #  Assuming glBindTexture
  cat >> confdefs.h <<\EOF
#define HAVE_GLBINDTEXTURE 1
EOF

  GL=""
fi


if test "x$opengl_libraries" != x && test "x$opengl_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$opengl_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$opengl_libraries"
fi
if test "x$opengl_includes" != x && test "x$opengl_includes" != xNONE ; then
  XLOCKINC="${XLOCKINC} -I$opengl_includes"
fi






mesagl_includes=NONE
mesagl_libraries=NONE

echo $ac_n "checking for MesaGL""... $ac_c" 1>&6
echo "configure:3768: checking for MesaGL" >&5
# Check whether --with-mesagl or --without-mesagl was given.
if test "${with_mesagl+set}" = set; then
  withval="$with_mesagl"
  :
fi

if test "x$with_mesagl" = xno; then
  no_mesagl=yes
else
  if test "x$mesagl_includes" != xNONE && test "x$mesagl_libraries" != xNONE; then
    no_mesagl=
  else
if eval "test \"`echo '$''{'ac_cv_path_mesagl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_mesagl=yes
test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGL
test -z "$mesagl_direct_test_library" && mesagl_direct_test_library=MesaGLU
test -z "$mesagl_direct_test_function" && mesagl_direct_test_function=glXCreateContext
test -z "$mesagl_direct_test_include" && mesagl_direct_test_include=GL/gl.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11/include          \
                              \
    /usr/include/X11          \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
                              \
    /usr/local/X11/include    \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
                              \
    /usr/local/include/X11    \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    /usr/unsupported/include  \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$mesagl_direct_test_include"; then
      no_mesagl= ac_mesagl_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$mesagl_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_mesagl_includes" | sed s/include/lib/` \
                          \
    /usr/X11/lib          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
                          \
    /usr/lib/X11          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
                          \
    /usr/local/X11/lib    \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
                          \
    /usr/local/lib/X11    \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/athena/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
    /lib/usr/lib/X11      \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${mesagl_direct_test_library}.$ac_extension; then
      no_mesagl= ac_mesagl_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_mesagl" = yes; then
  ac_cv_path_mesagl="no_mesagl=yes"
else
  ac_cv_path_mesagl="no_mesagl= ac_mesagl_includes=$ac_mesagl_includes ac_mesagl_libraries=$ac_mesagl_libraries"
fi
fi
  fi
  eval "$ac_cv_path_mesagl"
fi # with_mesagl != no

if test "$no_mesagl" = yes; then
  echo "$ac_t""no" 1>&6
  GL="#"
else
  if test "$gl" = no; then
    gl=yes
    cat >> confdefs.h <<\EOF
#define USE_GL 1
EOF

    XLOCKLIBS="${XLOCKLIBS} -lMesaGL -lMesaGLU"
    test "x$mesagl_includes" = xNONE && mesagl_includes=$ac_mesagl_includes
    test "x$mesagl_libraries" = xNONE && mesagl_libraries=$ac_mesagl_libraries
    case "${canonical}" in
      *-*-solaris2* )
        if test "x$mesagl_includes" = "x/usr/include"; then
          mesagl_includes=""
        fi
      ;;
    esac
    ac_cv_path_mesagl="no_mesagl= ac_mesagl_includes=$mesagl_includes ac_mesagl_libraries=$mesagl_libraries"
    echo "$ac_t""libraries $mesagl_libraries, headers $mesagl_includes" 1>&6
    echo "$ac_t""!!!WARNING!!! Known security hole with MesaGL <= 2.6 if setuid root" 1>&6
    case "${canonical}" in
      *-*-linux* )
        # Testing if MesaGL was compiled against VGA
        if test -f $mesagl_libraries/libMesaGL.so; then
          have_mesagl_svga=`nm $mesagl_libraries/libMesaGL.so | grep SVGAMesa | wc -l`
        else
          have_mesagl_svga=0
        fi
        if eval "test $have_mesagl_svga -ge 1"; then
          echo "$ac_t""MesaGL library is linked against SVGA: adding -lvga" 1>&6
          XLOCKLIBS="${XLOCKLIBS} -lvga"
        fi
        # Testing if MesaGL was compiled against glide
        if test -f $mesagl_libraries/libglide.so; then
          have_mesagl_glide=`nm $mesagl_libraries/libglide.so | grep grGlideInit | wc -l`
        else
          have_mesagl_glide=0
        fi
        if eval "test $have_mesagl_glide -ge 1"; then
          echo "$ac_t""MesaGL library is linked against GLIDE: adding -lglide2x" 1>&6
          XLOCKLIBS="${XLOCKLIBS} -lglide2x"
        fi
#  Causes major errors for maintainer.  xlock refuses to run.
#        # Testing if MesaGL was compiled against pthread
#        if test -f $mesagl_libraries/libpthread.so; then
#          have_mesagl_pthread=`nm $mesagl_libraries/libpthread.so | grep pthread_once | wc -l`
#        else
#          have_mesagl_pthread=0
#        fi
#        if eval "test $have_mesagl_pthread -ge 1"; then
#          AC_MSG_RESULT([MesaGL library is linked against GLIDE: adding -lpthread])
#          XLOCKLIBS="${XLOCKLIBS} -lpthread"
#        fi
        # Check for OpenGL 1.1 features.
        #  Assuming glBindTexture
        cat >> confdefs.h <<\EOF
#define HAVE_GLBINDTEXTURE 1
EOF

	
        ;;
    esac
    GL=""
  else  
    echo "$ac_t""ignored - using OpenGL" 1>&6
  fi

fi


if test "x$mesagl_libraries" != x && test "x$mesagl_libraries" != xNONE ; then
  XLOCK_LDFLAGS="$mesagl_libraries:${XLOCK_LDFLAGS}"
  XLOCKLIBPATHS="-L$mesagl_libraries ${XLOCKLIBPATHS}"
fi
if test "x$mesagl_includes" != x && test "x$mesagl_includes" != xNONE ; then
  XLOCKINC="-I$mesagl_includes ${XLOCKINC}"
fi






dtsaver_includes=NONE
dtsaver_libraries=NONE

echo $ac_n "checking for DtSaver""... $ac_c" 1>&6
echo "configure:3980: checking for DtSaver" >&5
# Check whether --with-dtsaver or --without-dtsaver was given.
if test "${with_dtsaver+set}" = set; then
  withval="$with_dtsaver"
  :
fi

if test "x$with_dtsaver" = xno; then
  no_dtsaver=yes
else
  if test "x$dtsaver_includes" != xNONE && test "x$dtsaver_libraries" != xNONE; then
    no_dtsaver=
  else
if eval "test \"`echo '$''{'ac_cv_path_dtsaver'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_dtsaver=yes
test -z "$dtsaver_direct_test_library" && dtsaver_direct_test_library=DtSvc
test -z "$dtsaver_direct_test_function" && dtsaver_direct_test_function=DtSaverGetWindows
test -z "$dtsaver_direct_test_include" && dtsaver_direct_test_include=Dt/Saver.h
  for ac_dir in            \
    /usr/dt/include        \
    $extra_include         \
    ; \
  do
    if test -r "$ac_dir/$dtsaver_direct_test_include"; then
      no_dtsaver= ac_dtsaver_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$dtsaver_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_dtsaver_includes" | sed s/include/lib/` \
    $extra_lib         \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${dtsaver_direct_test_library}.$ac_extension; then
      no_dtsaver= ac_dtsaver_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_dtsaver" = yes; then
  ac_cv_path_dtsaver="no_dtsaver=yes"
else
  ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$ac_dtsaver_includes ac_dtsaver_libraries=$ac_dtsaver_libraries"
fi
fi
  fi
  eval "$ac_cv_path_dtsaver"
fi # with_dtsaver != no

if test "$no_dtsaver" = yes; then
  echo "$ac_t""no" 1>&6
else
  cat >> confdefs.h <<\EOF
#define USE_DTSAVER 1
EOF

  XLOCKLIBS="${XLOCKLIBS} -lDtSvc"
  test "x$dtsaver_includes" = xNONE && dtsaver_includes=$ac_dtsaver_includes
  test "x$dtsaver_libraries" = xNONE && dtsaver_libraries=$ac_dtsaver_libraries
  ac_cv_path_dtsaver="no_dtsaver= ac_dtsaver_includes=$dtsaver_includes ac_dtsaver_libraries=$dtsaver_libraries"
  echo "$ac_t""libraries $dtsaver_libraries, headers $dtsaver_includes" 1>&6
fi


if test "x$dtsaver_libraries" != x && test "x$dtsaver_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dtsaver_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dtsaver_libraries"
fi
if test "x$dtsaver_includes" != x && test "x$dtsaver_includes" != xNONE ; then
  XLOCKINC="${XLOCKINC} -I$dtsaver_includes"
fi






dpms_includes=NONE
dpms_libraries=NONE

echo $ac_n "checking for DPMS""... $ac_c" 1>&6
echo "configure:4073: checking for DPMS" >&5
# Check whether --with-dpms or --without-dpms was given.
if test "${with_dpms+set}" = set; then
  withval="$with_dpms"
  :
fi

dpmslib=no
if test "x$with_dpms" = xno; then
  no_dpms=yes
else
  if test "x$dpms_includes" != xNONE && test "x$dpms_libraries" != xNONE; then
    no_dpms=
  else
if eval "test \"`echo '$''{'ac_cv_path_dpms'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_dpms=yes
test -z "$dpms_direct_test_library" && dpms_direct_test_library=Xdpms
test -z "$dpms_direct_test_function" && dpms_direct_test_function=DPMSSetTimeouts
test -z "$dpms_direct_test_include" && dpms_direct_test_include=X11/extensions/dpms.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11R4/include        \
                              \
    /usr/include/X11R6        \
    /usr/include/X11R5        \
    /usr/include/X11R4        \
                              \
    /usr/local/X11R6/include  \
    /usr/local/X11R5/include  \
    /usr/local/X11R4/include  \
                              \
    /usr/local/include/X11R6  \
    /usr/local/include/X11R5  \
    /usr/local/include/X11R4  \
                              \
    /usr/X11/include          \
    /usr/include/X11          \
    /usr/local/X11/include    \
    /usr/local/include/X11    \
                              \
    /usr/X386/include         \
    /usr/x386/include         \
    /usr/XFree86/include/X11  \
                              \
    /usr/dt/include           \
                              \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    /usr/unsupported/include  \
    /usr/dpms/include         \
    /usr/local/x11r5/include  \
    /usr/lpp/Xamples/include  \
                              \
    /usr/openwin/include      \
    /usr/openwin/share/include \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$dpms_direct_test_include"; then
      no_dpms= ac_dpms_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$dpms_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_dpms_includes" | sed s/include/lib/` \
                          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11R4/lib        \
                          \
    /usr/lib/X11R6        \
    /usr/lib/X11R5        \
    /usr/lib/X11R4        \
                          \
    /usr/local/X11R6/lib  \
    /usr/local/X11R5/lib  \
    /usr/local/X11R4/lib  \
                          \
    /usr/local/lib/X11R6  \
    /usr/local/lib/X11R5  \
    /usr/local/lib/X11R4  \
                          \
    /usr/X11/lib          \
    /usr/lib/X11          \
    /usr/local/X11/lib    \
                          \
    /usr/X386/lib         \
    /usr/x386/lib         \
    /usr/XFree86/lib/X11  \
                          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    /usr/unsupported/lib  \
    /usr/dpms/lib       \
    /usr/local/x11r5/lib  \
    /usr/lpp/Xamples/lib  \
                          \
    /usr/openwin/lib      \
    /usr/openwin/share/lib \
    /shlib                \
    /usr/shlib            \
    /usr/shlib/X11        \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${dpms_direct_test_library}.$ac_extension; then
      no_dpms= ac_dpms_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_dpms" = yes; then
  ac_cv_path_dpms="no_dpms=yes"
else
  ac_cv_path_dpms="no_dpms= ac_dpms_includes=$ac_dpms_includes ac_dpms_libraries=$ac_dpms_libraries"
fi
fi
  fi
  eval "$ac_cv_path_dpms"
fi # with_dpms != no

if test "$no_dpms" = yes; then
  echo "$ac_t""no" 1>&6
else
  cat >> confdefs.h <<\EOF
#define USE_DPMS 1
EOF

  if test "x$ac_dpms_libraries" != xNONE; then
    XLOCKLIBS="${XLOCKLIBS} -lXdpms"
  fi
  test "x$dpms_includes" = xNONE && dpms_includes=$ac_dpms_includes
  test "x$dpms_libraries" = xNONE && dpms_libraries=$ac_dpms_libraries
  ac_cv_path_dpms="no_dpms= ac_dpms_includes=$dpms_includes ac_dpms_libraries=$dpms_libraries"
  echo "$ac_t""libraries $dpms_libraries, headers $dpms_includes" 1>&6
fi


if test "x$dpms_libraries" != x && test "x$dpms_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$dpms_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$dpms_libraries"
fi
if test "x$dpms_includes" != x && test "x$dpms_includes" != xNONE ; then
  XLOCKINC="${XLOCKINC} -I$dpms_includes"
fi

sound=no





rplay_includes=NONE
rplay_libraries=NONE

echo $ac_n "checking for RPLAY""... $ac_c" 1>&6
echo "configure:4244: checking for RPLAY" >&5
# Check whether --with-rplay or --without-rplay was given.
if test "${with_rplay+set}" = set; then
  withval="$with_rplay"
  :
fi

if test "x$with_rplay" = xno; then
  no_rplay=yes
else
  if test "x$rplay_includes" != xNONE && test "x$rplay_libraries" != xNONE; then
    no_rplay=
  else
if eval "test \"`echo '$''{'ac_cv_path_rplay'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_rplay=yes
test -z "$rplay_direct_test_library" && rplay_direct_test_library=rplay
test -z "$rplay_direct_test_function" && rplay_direct_test_function=rplay_open_default
test -z "$rplay_direct_test_include" && rplay_direct_test_include=rplay.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11/include          \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$rplay_direct_test_include"; then
      no_rplay= ac_rplay_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$rplay_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_rplay_includes" | sed s/include/lib/` \
                          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11/lib          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${rplay_direct_test_library}.$ac_extension; then
      no_rplay= ac_rplay_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_rplay" = yes; then
  ac_cv_path_rplay="no_rplay=yes"
else
  ac_cv_path_rplay="no_rplay= ac_rplay_includes=$ac_rplay_includes ac_rplay_libraries=$ac_rplay_libraries"
fi
fi
  fi
  eval "$ac_cv_path_rplay"
fi # with_rplay != no

if test "$no_rplay" = yes; then
  echo "$ac_t""no" 1>&6
else
    sound=yes
    cat >> confdefs.h <<\EOF
#define USE_RPLAY 1
EOF

    XLOCKLIBS="${XLOCKLIBS} -lrplay"
    test "x$rplay_includes" = xNONE && rplay_includes=$ac_rplay_includes
    test "x$rplay_libraries" = xNONE && rplay_libraries=$ac_rplay_libraries
    ac_cv_path_rplay="no_rplay= ac_rplay_includes=$rplay_includes ac_rplay_libraries=$rplay_libraries"
    echo "$ac_t""libraries $rplay_libraries, headers $rplay_includes" 1>&6
fi


if test "x$rplay_libraries" != x && test "x$rplay_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$rplay_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$rplay_libraries"
fi
if test "x$rplay_includes" != x && test "x$rplay_includes" != xNONE ; then
  XLOCKINC="${XLOCKINC} -I$rplay_includes"
fi






nas_includes=NONE
nas_libraries=NONE

echo $ac_n "checking for NAS""... $ac_c" 1>&6
echo "configure:4350: checking for NAS" >&5
# Check whether --with-nas or --without-nas was given.
if test "${with_nas+set}" = set; then
  withval="$with_nas"
  :
fi

if test "x$with_nas" = xno; then
  no_nas=yes
else
  if test "x$nas_includes" != xNONE && test "x$nas_libraries" != xNONE; then
    no_nas=
  else
if eval "test \"`echo '$''{'ac_cv_path_nas'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_nas=yes
test -z "$nas_direct_test_library" && nas_direct_test_library=audio
test -z "$nas_direct_test_function" && nas_direct_test_function=AuOpenServer
test -z "$nas_direct_test_include" && nas_direct_test_include=audio/audio.h
  for ac_dir in               \
    /usr/X11R6/include        \
    /usr/X11R5/include        \
    /usr/X11/include          \
    /usr/local/include        \
    /usr/remote/include       \
    /usr/include              \
    $extra_include            \
    ; \
  do
    if test -r "$ac_dir/$nas_direct_test_include"; then
      no_nas= ac_nas_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$nas_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_nas_includes" | sed s/include/lib/` \
                          \
    /usr/X11R6/lib        \
    /usr/X11R5/lib        \
    /usr/X11/lib          \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${nas_direct_test_library}.$ac_extension; then
      no_nas= ac_nas_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_nas" = yes; then
  ac_cv_path_nas="no_nas=yes"
else
  ac_cv_path_nas="no_nas= ac_nas_includes=$ac_nas_includes ac_nas_libraries=$ac_nas_libraries"
fi
fi
  fi
  eval "$ac_cv_path_nas"
fi # with_nas != no

if test "$no_nas" = yes; then
  echo "$ac_t""no" 1>&6
else
  if test "$sound" = no; then
    sgi=no
    case "${canonical}" in
      *-*-irix5* | *-*-irix6* )
        sgi=yes
      ;;
    esac
    if test "$sgi" = yes; then
      echo "$ac_t""ignored - problems here with audio and nas" 1>&6
    else
      sound=yes
      cat >> confdefs.h <<\EOF
#define USE_NAS 1
EOF

      XLOCKLIBS="${XLOCKLIBS} -laudio"
      test "x$nas_includes" = xNONE && nas_includes=$ac_nas_includes
      test "x$nas_libraries" = xNONE && nas_libraries=$ac_nas_libraries
      ac_cv_path_nas="no_nas= ac_nas_includes=$nas_includes ac_nas_libraries=$nas_libraries"
      echo "$ac_t""libraries $nas_libraries, headers $nas_includes" 1>&6
    fi
  else
      echo "$ac_t""ignored - using rplay" 1>&6
  fi
fi


if test "x$nas_libraries" != x && test "x$nas_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$nas_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$nas_libraries"
fi
if test "x$nas_includes" != x && test "x$nas_includes" != xNONE ; then
  XLOCKINC="${XLOCKINC} -I$nas_includes"
fi






crypt_libraries=NONE

echo $ac_n "checking for CRYPT""... $ac_c" 1>&6
echo "configure:4469: checking for CRYPT" >&5
# Check whether --with-crypt or --without-crypt was given.
if test "${with_crypt+set}" = set; then
  withval="$with_crypt"
  :
fi

if test "x$with_crypt" = xno; then
  no_crypt=yes
else
  if test "x$crypt_libraries" != xNONE; then
    no_crypt=
  else
if eval "test \"`echo '$''{'ac_cv_path_crypt'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  # One or both of these vars are not set, and there is no cached value.
no_crypt=yes
test -z "$crypt_direct_test_library" && crypt_direct_test_library=crypt

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$crypt_direct_test_library $LIBS"
for ac_dir in \
    /usr/lib              \
    /usr/local/lib        \
    /usr/remote/lib       \
    $extra_lib            \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${crypt_direct_test_library}.$ac_extension; then
      no_crypt= ac_crypt_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"

if test "$no_crypt" = yes; then
  ac_cv_path_crypt="no_crypt=yes"
else
  ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$ac_crypt_libraries"
fi
fi
  fi
  eval "$ac_cv_path_crypt"
fi # with_crypt != no

if test "$no_crypt" = yes; then
  echo "$ac_t""no" 1>&6
else
  XLOCKLIBS="${XLOCKLIBS} -lcrypt"
  test "x$crypt_libraries" = xNONE && crypt_libraries=$ac_crypt_libraries
  ac_cv_path_crypt="no_crypt= ac_crypt_libraries=$crypt_libraries"
  echo "$ac_t""libraries $crypt_libraries" 1>&6
fi


if test "x$crypt_libraries" != x && test "x$crypt_libraries" != xNONE ; then
  XLOCK_LDFLAGS="${XLOCK_LDFLAGS}:$crypt_libraries"
  XLOCKLIBPATHS="${XLOCKLIBPATHS} -L$crypt_libraries"
fi


XGLOCK=""
XGLOCKDIR=""
INSTALL_XGLOCK=""
UNINSTALL_XGLOCK=""
XGLOCK_MAKEFILE=""
# Check whether --with-gtk or --without-gtk was given.
if test "${with_gtk+set}" = set; then
  withval="$with_gtk"
  :
fi

if test "x$with_gtk" != "xno" ; then
   # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
if test "${with_gtk_prefix+set}" = set; then
  withval="$with_gtk_prefix"
  gtk_config_prefix="$withval"
else
  gtk_config_prefix=""
fi

# Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
if test "${with_gtk_exec_prefix+set}" = set; then
  withval="$with_gtk_exec_prefix"
  gtk_config_exec_prefix="$withval"
else
  gtk_config_exec_prefix=""
fi

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


  if test x$gtk_config_exec_prefix != x ; then
     gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
     fi
  fi
  if test x$gtk_config_prefix != x ; then
     gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
     if test x${GTK_CONFIG+set} != xset ; then
        GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
     fi
  fi

  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4589: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK_CONFIG" in
  /*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  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_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
if test -n "$GTK_CONFIG"; then
  echo "$ac_t""$GTK_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  min_gtk_version=1.0.4
  echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
echo "configure:4620: checking for GTK - version >= $min_gtk_version" >&5
  no_gtk=""
  if test "$GTK_CONFIG" = "no" ; then
    no_gtk=yes
  else
    GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
    GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
    gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
    gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
    gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
    if test "x$enable_gtktest" = "xyes" ; then
      ac_save_CFLAGS="$CFLAGS"
      ac_save_LIBS="$LIBS"
      CFLAGS="$CFLAGS $GTK_CFLAGS"
      LIBS="$LIBS $GTK_LIBS"
      rm -f conf.gtktest
      if test "$cross_compiling" = yes; then
  echo $ac_n "cross compiling; assumed OK... $ac_c"
else
  cat > conftest.$ac_ext <<EOF
#line 4643 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int 
main ()
{
  int major, minor, micro;
  char *tmp_version;

  system ("touch conf.gtktest");

  /* HP/UX 9 (%@#!) writes to sscanf strings */
  tmp_version = g_strdup("$min_gtk_version");
  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
     printf("%s, bad version string\n", "$min_gtk_version");
     exit(1);
   }

  if ((gtk_major_version != $gtk_config_major_version) ||
      (gtk_minor_version != $gtk_config_minor_version) ||
      (gtk_micro_version != $gtk_config_micro_version))
    {
      printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
             gtk_major_version, gtk_minor_version, gtk_micro_version);
      printf ("*** was found! If gtk-config was correct, then it is best\n");
      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
      printf("*** required on your system.\n");
      printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
      printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
      printf("*** before re-running configure\n");
    } 
  else
    {
      if ((gtk_major_version > major) ||
        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
      {
        return 0;
       }
     else
      {
        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
               gtk_major_version, gtk_minor_version, gtk_micro_version);
        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
	       major, minor, micro);
        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
        printf("***\n");
        printf("*** If you have already installed a sufficiently new version, this error\n");
        printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
        printf("*** being found. The easiest way to fix this is to remove the old version\n");
        printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
        printf("*** correct copy of gtk-config. (In this case, you will have to\n");
        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
        printf("*** so that the correct libraries are found at run-time))\n");
      }
    }
  return 1;
}

EOF
if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  no_gtk=yes
fi
rm -fr conftest*
fi

       CFLAGS="$ac_save_CFLAGS"
       LIBS="$ac_save_LIBS"
     fi
  fi
  if test "x$no_gtk" = x ; then
     echo "$ac_t""yes" 1>&6
     have_gtk="yes"     
  else
     echo "$ac_t""no" 1>&6
     if test "$GTK_CONFIG" = "no" ; then
       echo "*** The gtk-config script installed by GTK could not be found"
       echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
       echo "*** your path, or set the GTK_CONFIG environment variable to the"
       echo "*** full path to gtk-config."
     else
       if test -f conf.gtktest ; then
        :
       else
          echo "*** Could not run GTK test program, checking why..."
          CFLAGS="$CFLAGS $GTK_CFLAGS"
          LIBS="$LIBS $GTK_LIBS"
          cat > conftest.$ac_ext <<EOF
#line 4743 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>

int main() {
 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); 
; return 0; }
EOF
if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  rm -rf conftest*
   echo "*** The test program compiled, but did not run. This usually means"
          echo "*** that the run-time linker is not finding GTK or finding the wrong"
          echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
          echo "*** is required on your system"
	  echo "***"
          echo "*** If you have an old version installed, it is best to remove it, although"
          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
          echo "***"
          echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
          echo "*** came with the system with the command"
          echo "***"
          echo "***    rpm --erase --nodeps gtk gtk-devel" 
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
   echo "*** The test program failed to compile or link. See the file config.log for the"
          echo "*** exact error that occured. This usually means GTK was incorrectly installed"
          echo "*** or that you have moved GTK since it was installed. In the latter case, you"
          echo "*** may want to edit the gtk-config script: $GTK_CONFIG" 
fi
rm -f conftest*
          CFLAGS="$ac_save_CFLAGS"
          LIBS="$ac_save_LIBS"
       fi
     fi
     GTK_CFLAGS=""
     GTK_LIBS=""
     have_gtk="no"
  fi
  
  
  rm -f conf.gtktest

fi






if test "x$have_gtk" = "xyes"; then

  
gtkfontsel_includes=NONE
gtkfontsel_libraries=NONE

echo $ac_n "checking for GTK FontSelection widget""... $ac_c" 1>&6
echo "configure:4805: checking for GTK FontSelection widget" >&5
# Check whether --with-gtkfontsel or --without-gtkfontsel was given.
if test "${with_gtkfontsel+set}" = set; then
  withval="$with_gtkfontsel"
  :
fi

if test "x$with_gtkfontsel" = xno; then
  no_gtkfontsel=yes
else
  if test "x$gtkfontsel_includes" != xNONE && test "x$gtkfontsel_libraries" != xNONE; then
    no_gtkfontsel=
  else
    test -z "$gtkfontsel_direct_test_library" && gtkfontsel_direct_test_library="gtkfontsel"
test -z "$gtkfontsel_direct_test_function" && gtkfontsel_direct_test_function="gtk_font_selection_new"
test -z "$gtkfontsel_direct_test_include" && gtkfontsel_direct_test_include="gtkfontsel.h"
  for ac_dir in                      \
    /usr/include                     \
    /usr/include/fontsel             \
    /usr/include/gtkfontsel          \
    /usr/gtk/include                 \
    /usr/gtk/fontsel                 \
    /usr/gtk/gtkfontsel              \
    /usr/gtk/fontsel/include         \
    /usr/gtk/gtkfontsel/include      \
    /usr/local/include               \
    /usr/local/include/fontsel       \
    /usr/local/include/gtkfontsel    \
    /usr/local/gtk/include           \
    /usr/X11R6/include               \
    /usr/X11R6/include/gtk           \
    /usr/X11R5/include               \
    /usr/X11R5/include/gtk           \
    /usr/X11R4/include               \
    /usr/X11R4/include/gtk           \
    /usr/X11/include                 \
    /usr/X11/include/gtk             \
    /usr/X386/include                \
    /usr/X386/include/gtk            \
    /usr/x386/include                \
    /usr/x386/include/gtk            \
    /usr/XFree86/include             \
    /usr/XFree86/include/gtk         \
    /usr/local/X11R6/include         \
    /usr/local/X11R6/include/gtk     \
    /usr/local/X11R5/include         \
    /usr/local/X11R5/include/gtk     \
    /usr/local/X11R4/include         \
    /usr/local/X11R4/include/gtk     \
    /usr/local/X11/include           \
    /usr/local/X11/include/gtk       \
    /usr/local/X386/include          \
    /usr/local/X386/include/gtk      \
    /usr/local/x386/include          \
    /usr/local/x386/include/gtk      \
    /usr/local/XFree86/include       \
    /usr/local/XFree86/include/gtk   \
    /usr/local/include/X11R6         \
    /usr/local/include/X11R6/gtk     \
    /usr/local/include/X11R5         \
    /usr/local/include/X11R5/gtk     \
    /usr/local/include/X11R4         \
    /usr/local/include/X11R4/gtk     \
    /usr/local/include/X11           \
    /usr/local/include/X11/gtk       \
    /usr/local/include/X386          \
    /usr/local/include/X386/gtk      \
    /usr/local/include/x386          \
    /usr/local/include/x386/gtk      \
    /usr/local/include/XFree86       \
    /usr/local/include/XFree86/gtk   \
    /usr/local/dt/include            \
    /usr/local/dt/include/gtk        \
    /usr/dt/include                  \
    /usr/dt/include/gtk              \
    /usr/unsupported/include         \
    /usr/unsupported/include/gtk     \
    /usr/athena/include              \
    /usr/athena/include/gtk          \
    /usr/local/x11r5/include         \
    /usr/local/x11r5/include/gtk     \
    /usr/lpp/Xamples/include         \
    /usr/lpp/Xamples/include/gtk     \
    $extra_include                   \
    ; \
  do
    if test -r "$ac_dir/$gtkfontsel_direct_test_include"; then
      no_gtkfontsel= ac_gtkfontsel_includes=$ac_dir
      break
    fi
  done

# Check for the libraries.
# See if we find them without any special options.
# Do not add to $LIBS permanently.
ac_save_LIBS="$LIBS"
LIBS="-l$gtkfontsel_direct_test_library $LIBS"
# First see if replacing the include by lib works.
for ac_dir in `echo "$ac_gtkfontsel_includes" | sed s/include/lib/` \
                                     \
    /usr/X11R6/lib                   \
    /usr/lib/X11                     \
    /usr/lib/X11/gtk                 \
    /usr/gtk/lib                     \
    /usr/X11/gtk/lib                 \
    /usr/local/lib                   \
    /usr/local/lib/X11               \
    /usr/X11/local/lib               \
    /usr/X11/local/lib/X11           \
    /usr/X11/local/X11/lib           \
    /usr/local/lib/gtk               \
    /usr/local/lib/X11/gtk           \
    /usr/X11/local/lib/gtk           \
    /usr/X11/local/lib/X11/gtk       \
    /usr/X11/local/X11/lib/gtk       \
    /usr/local/gtk/lib               \
    /usr/local/X11/gtk/lib           \
    $extra_lib                       \
    ; \
do
  for ac_extension in a so sl; do
    if test -r $ac_dir/lib${gtkfontsel_direct_test_library}.$ac_extension; then
      no_gtkfontsel= ac_gtkfontsel_libraries=$ac_dir
      break 2
    fi
  done
done
LIBS="$ac_save_LIBS"
  fi
fi # with_gtkfontsel != no

if test "$no_gtkfontsel" = yes; then
  echo "$ac_t""no" 1>&6
else
  XGLOCKLIBS="-lgtkfontsel ${XGLOCKLIBS}"
  test "x$gtkfontsel_includes" = xNONE && gtkfontsel_includes=$ac_gtkfontsel_includes
  test "x$gtkfontsel_libraries" = xNONE && gtkfontsel_libraries=$ac_gtkfontsel_libraries
  echo "$ac_t""libraries $gtkfontsel_libraries, headers $gtkfontsel_includes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_GTK_FONTSEL_WIDGET 1
EOF

fi


  if test "x$gtkfontsel_libraries" != x && test "x$gtkfontsel_libraries" != xNONE ; then
    XGLOCK_LDFLAGS="${XGLOCK_LDFLAGS}:$gtkfontsel_libraries"
    XGLOCKLIBPATHS="${XGLOCKLIBPATHS} -L$gtkfontsel_libraries"
  fi
  if test "x$gtkfontsel_includes" != x && test "x$gtkfontsel_includes" != xNONE ; then
    XGLOCKINC="${XGLOCKINC} -I$gtkfontsel_includes"
  fi

  if test -n "${x_includes}"; then
    XGLOCKINC="-I${x_includes} ${XGLOCKINC}"
    XGLOCK="xglock"
    XGLOCKDIR="xglock"
    INSTALL_XGLOCK="install_xglock"
    UNINSTALL_XGLOCK="uninstall_xglock"
    XGLOCK_MAKEFILE="xglock/Makefile"
  fi
  if test -n "${x_libraries}"; then
    XGLOCK_LDFLAGS="${XGLOCK_LDFLAGS}:/usr/lib:${x_libraries}"
    XGLOCKLIBPATHS="${XGLOCKLIBPATHS} -L${x_libraries}"
    XGLOCKLIBS="${XGLOCKLIBS} -lXt"
  fi
fi



aixv3=no
dirent=yes

case "${canonical}" in

  *-*-aix* )
    BITMAPTYPE="ibm"
    PIXMAPTYPE="ibm"
    cat >> confdefs.h <<\EOF
#define AIXV3 1
EOF

    aixv3=yes
    case "${canonical}" in
      *-*-aix2* | *-*-aix3.0* | *-*-aix3.1* )
        cat >> confdefs.h <<\EOF
#define LESS_THAN_AIX3_2 1
EOF

      ;;
    esac
  ;;

  *-*-freebsd* | *-*-openbsd* | *-*-netbsd*  )
    BITMAPTYPE="bsd"
    PIXMAPTYPE="bsd"
    INSTPGMFLAGS="-s -o root -m 4111"
  ;;

  *-*-dgux5* )
    BITMAPTYPE="x11"
    PIXMAPTYPE="x11"
  ;;

  *-*-hpux* )
    if test "${CC}" = "cc" ; then
      CFLAGS="${CFLAGS} -O -Aa -z -D_HPUX_SOURCE"
      GPROF_CFLAGS="${GPROF_CFLAGS} -Aa -z -D_HPUX_SOURCE"
    fi
    XLOCKLIBS="-lXhp11 ${XLOCKLIBS}"
    cat >> confdefs.h <<\EOF
#define SYSV 1
EOF

    cat >> confdefs.h <<\EOF
#define SVR4 1
EOF

    BITMAPTYPE="hp"
    PIXMAPTYPE="hp"
  ;;

  *-*-irix5* | *-*-irix6* )
    if test "${CC}" = "cc" ; then
      CFLAGS="${CFLAGS} -fullwarn"
    fi
    BITMAPTYPE="sgi"
    PIXMAPTYPE="sgi"
  ;;

  *-*-linux* )
    ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for elf.h""... $ac_c" 1>&6
echo "configure:5038: checking for elf.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5043 "configure"
#include "confdefs.h"
#include <elf.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_SHADOW 1
EOF

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

    cat >> confdefs.h <<\EOF
#define linux 1
EOF

    cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF

    cat >> confdefs.h <<\EOF
#define _BSD_SOURCE 1
EOF

    cat >> confdefs.h <<\EOF
#define _GNU_SOURCE 1
EOF

    if test -e /etc/shadow ; then
      INSTPGMFLAGS="-g shadow -m 2111"
      case `ls -l /etc/shadow` in
        -???r?????\ *\ shadow\ *\ /etc/shadow)  # group shadow can read it
          INSTPGMFLAGS="-g shadow -m 2111"
          ;;
        *)
          INSTPGMFLAGS="-o root -m 4111"
          ;;
      esac
    fi
    INSTPGMFLAGS="-s $INSTPGMFLAGS"
    BITMAPTYPE="linux"
    PIXMAPTYPE="linux"
  ;;

  *-*-osf* )
    BITMAPTYPE="dec"
    PIXMAPTYPE="dec"
    echo $ac_n "checking for Digital Unix Enhanced Security""... $ac_c" 1>&6
echo "configure:5108: checking for Digital Unix Enhanced Security" >&5
    if test -f /usr/sbin/rcmgr && test -f /etc/rc.config ; then
      if test X`/usr/sbin/rcmgr get SECURITY` = XENHANCED ; then
        echo "$ac_t""yes" 1>&6
        cat >> confdefs.h <<\EOF
#define OSF1_ENH_SEC 1
EOF

        
        XLOCKLIBS="${XLOCKLIBS} -lsecurity"
        INSTPGMFLAGS="-s -g auth -m 2111"
      else
        echo "$ac_t""no" 1>&6
      fi
    fi
  ;;

  *-*-sco* )
    BITMAPTYPE="sco"
    PIXMAPTYPE="sco"
    cat >> confdefs.h <<\EOF
#define HAVE_SHADOW 1
EOF

    cat >> confdefs.h <<\EOF
#define SYSV 1
EOF

  ;;

  *-*-solaris2* )
    cat >> confdefs.h <<\EOF
#define SOLARIS2 1
EOF

    case "${canonical}" in
      *-*-solaris2.0* | *-*-solaris2.1* | *-*-solaris2.2* | *-*-solaris2.3* | *-*-solaris2.4* )
        cat >> confdefs.h <<\EOF
#define LESS_THAN_SOLARIS2_5 1
EOF

      ;;
    esac
    INSTPGMFLAGS="-s -o root -m 4111"
    cat >> confdefs.h <<\EOF
#define HAVE_SHADOW 1
EOF

    cat >> confdefs.h <<\EOF
#define SYSV 1
EOF

    cat >> confdefs.h <<\EOF
#define SVR4 1
EOF

    BITMAPTYPE="sun"
    PIXMAPTYPE="sol"
    XLOCKLIBS="${XLOCKLIBS} -lposix4"
    LIBS="${LIBS} -lsocket -lnsl -lposix4"
    XLOCKLDFLAGS="-R${XLOCK_LDFLAGS}"
    XMLOCKLDFLAGS="-R${XMLOCK_LDFLAGS}"
    XALOCKLDFLAGS="-R${XALOCK_LDFLAGS}"
  ;;

  *-*-sunos4* )
    cat >> confdefs.h <<\EOF
#define SUNOS4 1
EOF

    BITMAPTYPE="sun"
    PIXMAPTYPE="sun"
  ;;

  *-*-sysv5* )
    BITMAPTYPE="x11"
    PIXMAPTYPE="x11"
  ;;

  *)
    BITMAPTYPE="x11"
    PIXMAPTYPE="x11"
  ;;
esac


if test "$dirent" = yes; then
  ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:5200: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5205 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_dirent_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_dirent_'$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
 ac_header_dirent=$ac_hdr; break
else
  echo "$ac_t""no" 1>&6
fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:5238: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | 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="-ldir  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5246 "configure"
#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 opendir();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -ldir"
else
  echo "$ac_t""no" 1>&6
fi

else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:5279: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | 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="-lx  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5287 "configure"
#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 opendir();

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

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lx"
else
  echo "$ac_t""no" 1>&6
fi

fi

fi

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_NANOSLEEP 1
EOF

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_USLEEP 1
EOF

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

fi


echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
echo "configure:5426: checking how to call gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 5431 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
int main() {
struct timeval tv; struct timezone tzp;
      gettimeofday(&tv, &tzp);
; return 0; }
EOF
if { (eval echo configure:5440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_gettimeofday_args=2
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  cat > conftest.$ac_ext <<EOF
#line 5448 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
int main() {
struct timeval tv; gettimeofday(&tv);
; return 0; }
EOF
if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_gettimeofday_args=1
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_gettimeofday_args=0
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_gettimeofday_args=$ac_gettimeofday_args
fi

ac_gettimeofday_args=$ac_cv_gettimeofday_args
if test $ac_gettimeofday_args = 2 ; then
  cat >> confdefs.h <<\EOF
#define HAVE_GETTIMEOFDAY 1
EOF

  cat >> confdefs.h <<\EOF
#define GETTIMEOFDAY_TWO_ARGS 1
EOF

  echo "$ac_t""two arguments" 1>&6
elif test $ac_gettimeofday_args = 1 ; then
  cat >> confdefs.h <<\EOF
#define HAVE_GETTIMEOFDAY 1
EOF

  echo "$ac_t""one argument" 1>&6
else
  echo "$ac_t""unknown" 1>&6
fi
 
echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:5493: checking for inline" >&5
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
#line 5500 "configure"
#include "confdefs.h"

int main() {
} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_c_inline=$ac_kw; break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
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


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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'srand48`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define SRAND srand48
EOF
 cat >> confdefs.h <<\EOF
#define LRAND lrand48
EOF

  cat >> confdefs.h <<\EOF
#define MAXRAND 2147483648.0
EOF

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'srandom`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define SRAND srandom
EOF
 cat >> confdefs.h <<\EOF
#define LRAND random
EOF

  cat >> confdefs.h <<\EOF
#define MAXRAND 2147483648.0
EOF

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

int main() {

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

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

if eval "test \"`echo '$ac_cv_func_'srand`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
#define SRAND srand
EOF
 cat >> confdefs.h <<\EOF
#define LRAND rand
EOF
 srand=yes
else
  echo "$ac_t""no" 1>&6
fi

fi

fi


if test "$srand" = yes; then
  if test "$aixv3" = yes; then
    cat >> confdefs.h <<\EOF
#define MAXRAND 2147483648.0
EOF

  else
    cat >> confdefs.h <<\EOF
#define MAXRAND 32768.0
EOF

  fi
fi

echo $ac_n "checking matherr support""... $ac_c" 1>&6
echo "configure:5720: checking matherr support" >&5
if eval "test \"`echo '$''{'ac_cv_c_matherr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
     
cat > conftest.$ac_ext <<EOF
#line 5726 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE 1
#include <math.h>
int main() {

struct exception x;
x.type = DOMAIN;  
x.type = SING; 

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

if test x"$ac_cv_c_matherr" = xyes; then    
    cat >> confdefs.h <<\EOF
#define USE_MATHERR 1
EOF

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

echo $ac_n "checking struct sigset_t""... $ac_c" 1>&6
echo "configure:5761: checking struct sigset_t" >&5
if eval "test \"`echo '$''{'ac_cv_c_sigset_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
     
cat > conftest.$ac_ext <<EOF
#line 5767 "configure"
#include "confdefs.h"
/*#define _XOPEN_SOURCE 1*/
#include <signal.h>
int main() {

typedef struct {unsigned long __sigbits[4];} sigset_t;
sigset_t sigmask;

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

if test x"$ac_cv_c_sigset_t" = xyes; then    
  cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_SIGSET_T 1
EOF

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

# Check whether --enable-bitmapdir or --disable-bitmapdir was given.
if test "${enable_bitmapdir+set}" = set; then
  enableval="$enable_bitmapdir"
  bitmap_dir=$enableval
else
  bitmap_dir=no
fi

case "x$bitmap_dir" in
x/*|x.*)
  echo "$ac_t""setting BITMAPDIR = $enableval" 1>&6
  BITMAPDIR=$enableval
  if test ! -d $bitmap_dir; then
    echo "$ac_t""Warning: Directory $enableval does not exist" 1>&6
  fi
  ;;
*)
  BITMAPDIR='$(top_srcdir)/bitmaps'
  bitmap_dir='$top_srcdir/bitmaps'
  ;;
esac

# Check whether --enable-bitmaptype or --disable-bitmaptype was given.
if test "${enable_bitmaptype+set}" = set; then
  enableval="$enable_bitmaptype"
  bitmap_type=$enableval
else
  bitmap_type=no
fi

case "x$bitmap_type" in
xyes*|xno*)
  ;;
*)
  echo "$ac_t""setting BITMAPTYPE = $enableval" 1>&6
  BITMAPTYPE=$enableval
  if test ! -f $bitmap_dir/l-$BITMAPTYPE.xbm; then
    echo "$ac_t""Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist" 1>&6
  fi
  ;;
esac

# Check whether --enable-pixmapdir or --disable-pixmapdir was given.
if test "${enable_pixmapdir+set}" = set; then
  enableval="$enable_pixmapdir"
  pixmap_dir=$enableval
else
  pixmap_dir=no
fi

case "x$pixmap_dir" in
x/*|x.*)
  echo "$ac_t""setting PIXMAPDIR = $enableval" 1>&6
  PIXMAPDIR=$enableval
  if test ! -d $pixmap_dir; then
    echo "$ac_t""Warning: Directory $enableval does not exist" 1>&6
  fi
  ;;
*)
  PIXMAPDIR='$(top_srcdir)/pixmaps'
  pixmap_dir='$top_srcdir/pixmaps'
  ;;
esac

# Check whether --enable-pixmaptype or --disable-pixmaptype was given.
if test "${enable_pixmaptype+set}" = set; then
  enableval="$enable_pixmaptype"
  pixmap_type=$enableval
else
  pixmap_type=no
fi

case "x$pixmap_type" in
xyes*|xno*)
  ;;
*)
  echo "$ac_t""setting PIXMAPTYPE = $enableval" 1>&6
  PIXMAPTYPE=$enableval
  if test ! -f $pixmap_dir/m-$PIXMAPTYPE.xpm; then
    echo "$ac_t""Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist" 1>&6
  fi
  ;;
esac

# Check whether --enable-mapdir or --disable-mapdir was given.
if test "${enable_mapdir+set}" = set; then
  enableval="$enable_mapdir"
  map_dir=$enableval
else
  map_dir=no
fi

case "x$map_dir" in
x/*|x.*)
  echo "$ac_t""setting BITMAPDIR = $enableval" 1>&6
  BITMAPDIR=$enableval
  echo "$ac_t""setting PIXMAPDIR = $enableval" 1>&6
  PIXMAPDIR=$enableval
  if test ! -d $map_dir; then
    echo "$ac_t""Warning: Directory $enableval does not exist" 1>&6
  fi
  ;;
*)
  BITMAPDIR='$(top_srcdir)/bitmaps'
  bitmap_dir='$top_srcdir/bitmaps'
  PIXMAPDIR='$(top_srcdir)/pixmaps'
  pixmap_dir='$top_srcdir/pixmaps'
  ;;
esac

# Check whether --enable-maptype or --disable-maptype was given.
if test "${enable_maptype+set}" = set; then
  enableval="$enable_maptype"
  map_type=$enableval
else
  map_type=no
fi

case "x$map_type" in
xyes*|xno*)
  ;;
*)
  echo "$ac_t""setting BITMAPTYPE = $enableval" 1>&6
  BITMAPTYPE=$enableval
  if test ! -f $map_dir/l-$BITMAPTYPE.xbm; then
    echo "$ac_t""Warning: Bitmap $BITMAPDIR/l-$BITMAPTYPE.xbm does not exist" 1>&6
  fi
  echo "$ac_t""setting PIXMAPTYPE = $enableval" 1>&6
  PIXMAPTYPE=$enableval
  if test ! -f $map_dir/m-$PIXMAPTYPE.xpm; then
    echo "$ac_t""Warning: Pixmap $PIXMAPDIR/m-$PIXMAPTYPE.xpm does not exist" 1>&6
  fi
  ;;
esac

if test "$sound" = no; then
  # Check whether --enable-def_play or --disable-def_play was given.
if test "${enable_def_play+set}" = set; then
  enableval="$enable_def_play"
  def_play=$enableval
else
  def_play=no
fi

  if test "$def_play" != no; then
    echo "$ac_t""defining option DEF_PLAY = "$enableval"" 1>&6
    cat >> confdefs.h <<EOF
#define DEF_PLAY "$enableval"
EOF

  fi
fi

# Check whether --enable-vroot or --disable-vroot was given.
if test "${enable_vroot+set}" = set; then
  enableval="$enable_vroot"
  use_vroot=$enableval
else
  use_vroot=yes
fi

if test "$use_vroot" = yes; then
  echo "$ac_t""defining option USE_VROOT" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_VROOT 1
EOF

fi

# Check whether --enable-allow-root or --disable-allow-root was given.
if test "${enable_allow_root+set}" = set; then
  enableval="$enable_allow_root"
  allow_root=$enableval
else
  allow_root=yes
fi

if test "$allow_root" = yes; then
  echo "$ac_t""defining option ALWAYS_ALLOW_ROOT" 1>&6
  cat >> confdefs.h <<\EOF
#define ALWAYS_ALLOW_ROOT 1
EOF

fi

case ${canonical} in
    *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd*  )
      # Check whether --enable-vtlock or --disable-vtlock was given.
if test "${enable_vtlock+set}" = set; then
  enableval="$enable_vtlock"
  vtlock=$enableval
else
  vtlock=no
fi

      if test "$vtlock" = yes; then
        echo "$ac_t""defining option USE_VTLOCK" 1>&6
        cat >> confdefs.h <<\EOF
#define USE_VTLOCK 1
EOF

      fi
      ;;
    *)
      ;;
esac

# Check whether --enable-syslog or --disable-syslog was given.
if test "${enable_syslog+set}" = set; then
  enableval="$enable_syslog"
  use_syslog=$enableval
else
  use_syslog=no
fi

if test "$use_syslog" = yes; then
  echo "$ac_t""defining option USE_SYSLOG" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_SYSLOG 1
EOF

fi
 
# Check whether --enable-multiple-user or --disable-multiple-user was given.
if test "${enable_multiple_user+set}" = set; then
  enableval="$enable_multiple_user"
  use_multiple_user=$enableval
else
  use_multiple_user=no
fi

if test "$use_multiple_user" = yes; then
  echo "$ac_t""defining option USE_MULTIPLE_USER" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_MULTIPLE_USER 1
EOF

fi
 
# Check whether --enable-multiple-root or --disable-multiple-root was given.
if test "${enable_multiple_root+set}" = set; then
  enableval="$enable_multiple_root"
  use_multiple_root=$enableval
else
  use_multiple_root=no
fi

if test "$use_multiple_root" = yes; then
  echo "$ac_t""defining option USE_MULTIPLE_ROOT" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_MULTIPLE_ROOT 1
EOF

fi
 
# Check whether --enable-window-visibility or --disable-window-visibility was given.
if test "${enable_window_visibility+set}" = set; then
  enableval="$enable_window_visibility"
  use_window_visiblity=$enableval
else
  use_window_visibility=no
fi

if test "$use_window_visibility" = yes; then
  echo "$ac_t""defining option USE_WINDOW_VISIBILITY" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_WINDOW_VISIBLITY 1
EOF

fi
 
# Check whether --enable-old-event-loop or --disable-old-event-loop was given.
if test "${enable_old_event_loop+set}" = set; then
  enableval="$enable_old_event_loop"
  use_old_event_loop=$enableval
else
  use_old_event_loop=no
fi

if test "$use_old_event_loop" = yes; then
  echo "$ac_t""defining option USE_OLD_EVENT_LOOP" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_OLD_EVENT_LOOP 1
EOF

fi

 
# Check whether --enable-xlockrc or --disable-xlockrc was given.
if test "${enable_xlockrc+set}" = set; then
  enableval="$enable_xlockrc"
  use_xlockrc=$enableval
else
  use_xlockrc=no
fi

if test "$use_xlockrc" = yes; then
  echo "$ac_t""defining option USE_XLOCKRC" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_XLOCKRC 1
EOF

fi
 
# Check whether --enable-auto-logout or --disable-auto-logout was given.
if test "${enable_auto_logout+set}" = set; then
  enableval="$enable_auto_logout"
  use_auto_logout=$enableval
else
  use_auto_logout=no
fi

case "x$use_auto_logout" in
x|xyes*)
  echo "$ac_t""defining option USE_AUTO_LOGOUT = 240 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_AUTO_LOGOUT 240
EOF

  ;;
x[0-9]*)
  echo "$ac_t""defining option USE_AUTO_LOGOUT = $enableval minutes" 1>&6
  cat >> confdefs.h <<EOF
#define USE_AUTO_LOGOUT $enableval
EOF

  ;;
xno*)
  ;;
*)
  echo "$ac_t""Warning: Illegal time value "$use_auto_logout" given" 1>&6
  echo "$ac_t""defining option USE_AUTO_LOGOUT = 240 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_AUTO_LOGOUT 240
EOF

  ;;
esac
 
# Check whether --enable-default-auto-logout or --disable-default-auto-logout was given.
if test "${enable_default_auto_logout+set}" = set; then
  enableval="$enable_default_auto_logout"
  def_auto_logout=$enableval
else
  def_auto_logout=no
fi

case "x$def_auto_logout" in
x|xyes*)
  echo "$ac_t""defining option DEF_AUTO_LOGOUT = 120 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define DEF_AUTO_LOGOUT "120"
EOF

  ;;
x[0-9]*)
  echo "$ac_t""defining option DEF_AUTO_LOGOUT = $enableval minutes" 1>&6
  cat >> confdefs.h <<EOF
#define DEF_AUTO_LOGOUT "$enableval"
EOF

  ;;
xno*)
  ;;
*)
  echo "$ac_t""Warning: Illegal time value "$def_auto_logout" given" 1>&6
  echo "$ac_t""defining option DEF_AUTO_LOGOUT = 120 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define DEF_AUTO_LOGOUT "120"
EOF

  ;;
esac
 
# Check whether --enable-button-logout or --disable-button-logout was given.
if test "${enable_button_logout+set}" = set; then
  enableval="$enable_button_logout"
  use_button_logout=$enableval
else
  use_button_logout=no
fi

case "x$use_button_logout" in
x|xyes*)
  echo "$ac_t""defining option USE_BUTTON_LOGOUT = 10 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_BUTTON_LOGOUT 10
EOF

  ;;
x[0-9]*)
  echo "$ac_t""defining option USE_BUTTON_LOGOUT = $enableval minutes" 1>&6
  cat >> confdefs.h <<EOF
#define USE_BUTTON_LOGOUT $enableval
EOF

  ;;
xno*)
  ;;
*)
  echo "$ac_t""Warning: Illegal time value "$use_button_logout" given" 1>&6
  echo "$ac_t""defining option USE_BUTTON_LOGOUT = 10 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_BUTTON_LOGOUT 10
EOF

  ;;
esac
 
# Check whether --enable-default-button-logout or --disable-default-button-logout was given.
if test "${enable_default_button_logout+set}" = set; then
  enableval="$enable_default_button_logout"
  def_button_logout=$enableval
else
  def_button_logout=no
fi

case "x$def_button_logout" in
x|xyes*)
  echo "$ac_t""defining option DEF_BUTTON_LOGOUT = 5 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define DEF_BUTTON_LOGOUT "5"
EOF

  ;;
x[0-9]*)
  echo "$ac_t""defining option DEF_BUTTON_LOGOUT = $enableval minutes" 1>&6
  cat >> confdefs.h <<EOF
#define DEF_BUTTON_LOGOUT "$enableval"
EOF

  ;;
xno*)
  ;;
*)
  echo "$ac_t""Warning: Illegal time value "$def_button_logout" given" 1>&6
  echo "$ac_t""defining option DEF_BUTTON_LOGOUT = 5 minutes" 1>&6
  cat >> confdefs.h <<\EOF
#define DEF_BUTTON_LOGOUT "5"
EOF

  ;;
esac

# Check whether --enable-bomb or --disable-bomb was given.
if test "${enable_bomb+set}" = set; then
  enableval="$enable_bomb"
  use_bomb=$enableval
else
  use_bomb=yes
fi

if test "$use_bomb" = yes; then
  echo "$ac_t""defining option USE_BOMB" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_BOMB 1
EOF

  BOMB=""
else
  BOMB="#"
fi

# Check whether --enable-unstable or --disable-unstable was given.
if test "${enable_unstable+set}" = set; then
  enableval="$enable_unstable"
  use_unstable=$enableval
else
  use_unstable=no
fi

if test "$use_unstable" = yes; then
  echo "$ac_t""defining option USE_UNSTABLE" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_UNSTABLE 1
EOF

  UNSTABLE=""
else
  UNSTABLE="#"
fi

# Check whether --enable-closedown-logout or --disable-closedown-logout was given.
if test "${enable_closedown_logout+set}" = set; then
  enableval="$enable_closedown_logout"
  closedown_logout=$enableval
else
  closedown_logout=no
fi

if test "$closedown_logout" = yes; then
  echo "$ac_t""defining option CLOSEDOWN_LOGOUT" 1>&6
  cat >> confdefs.h <<\EOF
#define CLOSEDOWN_LOGOUT 1
EOF

fi
 
# Check whether --enable-session-logout or --disable-session-logout was given.
if test "${enable_session_logout+set}" = set; then
  enableval="$enable_session_logout"
  session_logout=$enableval
else
  session_logout=no
fi

if test "$session_logout" = yes; then
  echo "$ac_t""defining option SESSION_LOGOUT" 1>&6
  cat >> confdefs.h <<\EOF
#define SESSION_LOGOUT 1
EOF

fi
 
# Check whether --enable-staff-file or --disable-staff-file was given.
if test "${enable_staff_file+set}" = set; then
  enableval="$enable_staff_file"
  use_staff_file=$enableval
else
  use_staff_file=no
fi

case "x$use_staff_file" in
x|xyes*)
  echo "$ac_t""defining option STAFF_FILE = "/usr/remote/etc/xlock.staff"" 1>&6
  cat >> confdefs.h <<EOF
#define STAFF_FILE "/usr/remote/etc/xlock.staff"
EOF

  if test ! -f /usr/remote/etc/xlock.staff; then
    echo "$ac_t""Warning: File /usr/remote/etc/xlock.staff does not exist" 1>&6
  fi
  ;;
x/*)
  echo "$ac_t""defining option STAFF_FILE = "$enableval"" 1>&6
  cat >> confdefs.h <<EOF
#define STAFF_FILE "$enableval"
EOF

  if test ! -f $use_staff_file; then
    echo "$ac_t""Warning: File $enableval does not exist" 1>&6
  fi
  ;;
esac
 
# Check whether --enable-staff-netgroup or --disable-staff-netgroup was given.
if test "${enable_staff_netgroup+set}" = set; then
  enableval="$enable_staff_netgroup"
  use_staff_netgroup=$enableval
else
  use_staff_netgroup=no
fi

if test "$use_staff_netgroup" != no; then
  echo "$ac_t""defining option STAFF_NETGROUP = "$enableval"" 1>&6
  cat >> confdefs.h <<EOF
#define STAFF_NETGROUP "$enableval"
EOF

fi
 
# Check whether --enable-kerberos4 or --disable-kerberos4 was given.
if test "${enable_kerberos4+set}" = set; then
  enableval="$enable_kerberos4"
  kerberos4=$enableval
else
  kerberos4=no
fi

if test "$kerberos4" = yes; then
  echo "$ac_t""defining option HAVE_KRB4" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_KRB4 1
EOF

  XLOCKINC="${XLOCKINC} -I/usr/athena/include"
  XLOCKLIBS="${XLOCKLIBS} -L/usr/athena/lib -lkrb -ldes"
fi

# Check whether --enable-kerberos5 or --disable-kerberos5 was given.
if test "${enable_kerberos5+set}" = set; then
  enableval="$enable_kerberos5"
  kerberos5=$enableval
else
  kerberos5=no
fi

if test "$kerberos5" = yes; then
  echo "$ac_t""defining option HAVE_KRB5" 1>&6
  cat >> confdefs.h <<\EOF
#define HAVE_KRB5 1
EOF

  XLOCKINC="${XLOCKINC} -I/opt/krb5/include"
  XLOCKLIBS="${XLOCKLIBS} -L/opt/krb5/lib -lkrb5 -lcrypto -lcom_err"
fi

# Check whether --enable-dce_passwd or --disable-dce_passwd was given.
if test "${enable_dce_passwd+set}" = set; then
  enableval="$enable_dce_passwd"
  dce_passwd=$enableval
else
  dce_passwd=no
fi

if test "$dce_passwd" = yes; then
  echo "$ac_t""defining option DCE_PASSWD" 1>&6
  cat >> confdefs.h <<\EOF
#define DCE_PASSWD 1
EOF

  XLOCKINC="${XLOCKINC} -I/usr/include/reentrant"
  XLOCKLIBS="${XLOCKLIBS} -ldce -lc_r"
fi

# Check whether --enable-pam or --disable-pam was given.
if test "${enable_pam+set}" = set; then
  enableval="$enable_pam"
  pam=$enableval
else
  pam=no
fi

if test "$pam" = yes; then
  echo "$ac_t""defining option PAM" 1>&6
  cat >> confdefs.h <<\EOF
#define PAM 1
EOF

  XLOCKLIBS="${XLOCKLIBS} -lpam -ldl"
fi

# Check whether --enable-afs or --disable-afs was given.
if test "${enable_afs+set}" = set; then
  enableval="$enable_afs"
  afs=$enableval
else
  afs=no
fi

if test "$afs" = yes; then
  echo "$ac_t""defining option AFS" 1>&6
  cat >> confdefs.h <<\EOF
#define AFS 1
EOF

  XLOCKINC="${XLOCKINC} -I/usr/afsws/include"
  XLOCKLIBS="${XLOCKLIBS} -L/usr/afsws/lib -L/usr/afsws/lib/afs -lkauth -lubik -lprot -lrxkad -lrx -llwp -lauth -lsys -ldes -lcmd -lcom_err /usr/afsws/lib/afs/util.a -laudit"
fi

# Check whether --enable-sunos_adjunct_passwd or --disable-sunos_adjunct_passwd was given.
if test "${enable_sunos_adjunct_passwd+set}" = set; then
  enableval="$enable_sunos_adjunct_passwd"
  sunos_adjunct_passwd=$enableval
else
  sunos_adjunct_passwd=no
fi

if test "$sunos_adjunct_passwd" = yes; then
  echo "$ac_t""defining option SUNOS_ADJUNCT_PASSWD" 1>&6
  cat >> confdefs.h <<\EOF
#define SUNOS_ADJUNCT_PASSWD 1
EOF

fi

# Check whether --enable-use_mb or --disable-use_mb was given.
if test "${enable_use_mb+set}" = set; then
  enableval="$enable_use_mb"
  use_mb=$enableval
else
  use_mb=no
fi

if test "$use_mb" = yes; then
  echo "$ac_t""defining option USE_MB" 1>&6
  cat >> confdefs.h <<\EOF
#define USE_MB 1
EOF

fi

# Check whether --enable-customization or --disable-customization was given.
if test "${enable_customization+set}" = set; then
  enableval="$enable_customization"
  customization=$enableval
else
  customization=no
fi

if test "$customization" = yes; then
  echo "$ac_t""defining option CUSTOMIZATION" 1>&6
  cat >> confdefs.h <<\EOF
#define CUSTOMIZATION 1
EOF

fi

# Check whether --enable-modules or --disable-modules was given.
if test "${enable_modules+set}" = set; then
  enableval="$enable_modules"
  modules=$enableval
else
  modules=no
fi

if test "$modules" = yes; then
  echo "$ac_t""enabling xlk modules" 1>&6
  MODULES=""
else
  MODULES="#"
fi

# Check whether --enable-check or --disable-check was given.
if test "${enable_check+set}" = set; then
  enableval="$enable_check"
  check=$enableval
else
  check=no
fi

if test "$check" = yes; then
  echo "$ac_t""enabling memory debug checking" 1>&6
  CHECK=""
else
  CHECK="#"
fi

# Check whether --with-lang or --without-lang was given.
if test "${with_lang+set}" = set; then
  withval="$with_lang"
  lang=$withval
else
  lang=none
fi

case "$lang" in
  nl|NL|Nl)
    echo "$ac_t""enabling some reporting in Dutch" 1>&6
    cat >> confdefs.h <<\EOF
#define NL 1
EOF

    ;;
  fr|FR|Fr)
    echo "$ac_t""enabling some reporting in French" 1>&6
    cat >> confdefs.h <<\EOF
#define FR 1
EOF

    ;;
  de|DE|De)
    echo "$ac_t""enabling some reporting in German" 1>&6
    cat >> confdefs.h <<\EOF
#define DE 1
EOF

    ;;
  none)
    echo "$ac_t""using default language (English)" 1>&6
    ;;
  *)
    echo "$ac_t""unknown language $lang. using default language (English)" 1>&6
    ;;
esac

# Check whether --enable-orig_xpm_patch or --disable-orig_xpm_patch was given.
if test "${enable_orig_xpm_patch+set}" = set; then
  enableval="$enable_orig_xpm_patch"
  orig_xpm_patch=$enableval
else
  orig_xpm_patch=no
fi

if test "$orig_xpm_patch" = "yes"; then
  echo "$ac_t""enabling original mail icon xpm patch" 1>&6
  cat >> confdefs.h <<\EOF
#define ORIGINAL_XPM_PATCH 1
EOF

fi

if test "x$INSTPGMFLAGS" != x; then
# Check whether --enable-setuid or --disable-setuid was given.
if test "${enable_setuid+set}" = set; then
  enableval="$enable_setuid"
  setuid=$enableval
else
  setuid=yes
fi

case "x$setuid" in
xno*)
  case ${canonical} in
  *-*-linux*)
    if test "$vtlock" = "yes"; then
      INSTPGMFLAGS="-s -o root -g bin -m 4111"
      echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock" 1>&6
    else
  INSTPGMFLAGS=""
  echo "$ac_t""no setuid/setgid install" 1>&6
    fi
    ;;
  *)
  INSTPGMFLAGS=""
  echo "$ac_t""no setuid/setgid install" 1>&6
  ;;
  esac
  ;;
x|xyes*)
  case ${canonical} in
  *-*-linux*)
    if test "$vtlock" = "yes"; then
      INSTPGMFLAGS="-s -o root -g bin -m 4111"
      echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS" for vtlock" 1>&6
    else
  echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS"" 1>&6
    fi
    ;;
  *)
  echo "$ac_t""defining install options (setuid/setgid) = "$INSTPGMFLAGS"" 1>&6
  ;;
  esac
  ;;
x*)
  INSTPGMFLAGS=$enableval
  echo "$ac_t""defining install options (setuid/setgid) = "$enableval"" 1>&6
  ;;
esac
else
  echo "$ac_t""no setuid/setgid install" 1>&6
fi

DEPEND=makedepend
DEPEND_FLAGS=
DEPEND_DEFINES=

XLOCKLIBS="${XLOCKLIBPATHS} ${XLOCKLIBS} -lX11 -lXext -lm"
XMLOCKLIBS="${XMLOCKLIBPATHS} ${XMLOCKLIBS} -lX11"
XALOCKLIBS="${XALOCKLIBPATHS} ${XALOCKLIBS} -lX11"
XGLOCKLIBS="${XGLOCKLIBPATHS} ${XGLOCKLIBS} ${GTK_LIBS}"












































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

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"

trap 'rm -fr `echo "Makefile
    xlock/Makefile
    modes/Makefile
    modes/glx/Makefile
    xmlock/Makefile
    xalock/Makefile
    xglock/Makefile
   config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
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%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@CPP@%$CPP%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@SET_MAKE@%$SET_MAKE%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%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GTK_CFLAGS@%$GTK_CFLAGS%g
s%@GTK_LIBS@%$GTK_LIBS%g
s%@OSF1_ENH_SEC@%$OSF1_ENH_SEC%g
s%@XLOCKLDFLAGS@%$XLOCKLDFLAGS%g
s%@XMLOCKLDFLAGS@%$XMLOCKLDFLAGS%g
s%@XALOCKLDFLAGS@%$XALOCKLDFLAGS%g
s%@XGLOCKLDFLAGS@%$XGLOCKLDFLAGS%g
s%@INSTPGMFLAGS@%$INSTPGMFLAGS%g
s%@XLOCKINC@%$XLOCKINC%g
s%@XMLOCKINC@%$XMLOCKINC%g
s%@XALOCKINC@%$XALOCKINC%g
s%@XGLOCKINC@%$XGLOCKINC%g
s%@XLIBS@%$XLIBS%g
s%@BITMAPTYPE@%$BITMAPTYPE%g
s%@PIXMAPTYPE@%$PIXMAPTYPE%g
s%@BITMAPDIR@%$BITMAPDIR%g
s%@PIXMAPDIR@%$PIXMAPDIR%g
s%@XLOCKLIBS@%$XLOCKLIBS%g
s%@XMLOCKLIBS@%$XMLOCKLIBS%g
s%@XALOCKLIBS@%$XALOCKLIBS%g
s%@XGLOCKLIBS@%$XGLOCKLIBS%g
s%@XMLOCK@%$XMLOCK%g
s%@XALOCK@%$XALOCK%g
s%@XGLOCK@%$XGLOCK%g
s%@XGLOCKDIR@%$XGLOCKDIR%g
s%@INSTALL_XMLOCK@%$INSTALL_XMLOCK%g
s%@INSTALL_XALOCK@%$INSTALL_XALOCK%g
s%@INSTALL_XGLOCK@%$INSTALL_XGLOCK%g
s%@UNINSTALL_XMLOCK@%$UNINSTALL_XMLOCK%g
s%@UNINSTALL_XALOCK@%$UNINSTALL_XALOCK%g
s%@UNINSTALL_XGLOCK@%$UNINSTALL_XGLOCK%g
s%@APPDEFAULTS@%$APPDEFAULTS%g
s%@LINT@%$LINT%g
s%@CHECK@%$CHECK%g
s%@PURIFY@%$PURIFY%g
s%@XPM@%$XPM%g
s%@GL@%$GL%g
s%@BOMB@%$BOMB%g
s%@UNSTABLE@%$UNSTABLE%g
s%@DEPEND@%$DEPEND%g
s%@DEPEND_FLAGS@%$DEPEND_FLAGS%g
s%@DEPEND_DEFINES@%$DEPEND_DEFINES%g

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
    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

cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile
    xlock/Makefile
    modes/Makefile
    modes/glx/Makefile
    xmlock/Makefile
    xalock/Makefile
    xglock/Makefile
  "}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

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

  # 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

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  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

  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*

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

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
  esac

  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in

EOF

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

# 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

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

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

