+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for XF86MiscSetGrabKeysState in -lXxf86misc" >&5
+echo $ECHO_N "checking for XF86MiscSetGrabKeysState in -lXxf86misc... $ECHO_C" >&6
+if test "${ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXxf86misc -lXext -lX11 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XF86MiscSetGrabKeysState ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+XF86MiscSetGrabKeysState ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&5
+echo "${ECHO_T}$ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState" >&6
+if test $ac_cv_lib_Xxf86misc_XF86MiscSetGrabKeysState = yes; then
+ have_xf86miscsetgrabkeysstate=yes
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ if test "$have_xf86miscsetgrabkeysstate" = yes ; then
+ SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_XF86MISCSETGRABKEYSSTATE 1
+_ACEOF
+
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for HP XHPDisableReset and XHPEnableReset.
+#
+###############################################################################
+
+echo "$as_me:$LINENO: checking for XHPDisableReset in X11/XHPlib.h" >&5
+echo $ECHO_N "checking for XHPDisableReset in X11/XHPlib.h... $ECHO_C" >&6
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <X11/XHPlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "XHPDisableReset" >/dev/null 2>&1; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_XHPDISABLERESET 1
+_ACEOF
+
+ SAVER_LIBS="-lXhp11 $SAVER_LIBS"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest*
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+
+###############################################################################
+#
+# Check for /proc/interrupts.
+#
+###############################################################################
+
+have_proc_interrupts=no
+with_proc_interrupts_req=unspecified
+
+# Check whether --with-proc-interrupts or --without-proc-interrupts was given.
+if test "${with_proc_interrupts+set}" = set; then
+ withval="$with_proc_interrupts"
+ with_proc_interrupts="$withval"; with_proc_interrupts_req="$withval"
+else
+ with_proc_interrupts=yes
+fi;
+
+if test "$with_proc_interrupts" = yes; then
+
+ echo "$as_me:$LINENO: checking whether /proc/interrupts contains keyboard data" >&5
+echo $ECHO_N "checking whether /proc/interrupts contains keyboard data... $ECHO_C" >&6
+if test "${ac_cv_have_proc_interrupts+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_have_proc_interrupts=no
+ if grep keyboard /proc/interrupts >/dev/null 2>&1 ; then
+ ac_cv_have_proc_interrupts=yes
+ fi
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_proc_interrupts" >&5
+echo "${ECHO_T}$ac_cv_have_proc_interrupts" >&6
+ have_proc_interrupts=$ac_cv_have_proc_interrupts
+
+ if test "$have_proc_interrupts" = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PROC_INTERRUPTS 1
+_ACEOF
+
+ fi
+
+elif test "$with_proc_interrupts" != no; then
+ echo "error: must be yes or no: --with-proc-interrupts=$with_proc_interrupts"
+ exit 1
+fi
+
+
+###############################################################################
+#
+# The --enable-locking option
+#
+###############################################################################
+
+# Check whether --enable-locking or --disable-locking was given.
+if test "${enable_locking+set}" = set; then
+ enableval="$enable_locking"
+ enable_locking="$enableval"
+else
+ enable_locking=yes
+fi;
+if test "$enable_locking" = yes; then
+ true
+elif test "$enable_locking" = no; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_LOCKING 1
+_ACEOF
+
+else
+ echo "error: must be yes or no: --enable-locking=$enable_locking"
+ exit 1
+fi
+
+
+
+###############################################################################
+#
+# The --enable-vt-locking option
+#
+###############################################################################
+
+#ac_vt_lockswitch=no
+#AC_ARG_ENABLE(vt-locking,[
+# --enable-vt-locking Compile in support for locking Virtual Terminals.
+# This is the default if the system supports it, and
+# if locking support is included (--enable-locking.)
+# --disable-vt-locking Do not allow locking of VTs, even if locking is
+# enabled.],
+# [enable_vt_locking="$enableval"],[enable_vt_locking=yes])
+#if test "$enable_vt_locking" = yes; then
+#
+# AC_CACHE_CHECK([for the VT_LOCKSWITCH ioctl], ac_cv_vt_lockswitch,
+# [AC_TRY_COMPILE([#include <fcntl.h>
+# #include <sys/ioctl.h>
+# #include <sys/vt.h>],
+# [int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;],
+# [ac_cv_vt_lockswitch=yes],
+# [ac_cv_vt_lockswitch=no])])
+# ac_vt_lockswitch=$ac_cv_vt_lockswitch
+#
+#elif test "$enable_vt_locking" = no; then
+# true
+#else
+# echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
+# exit 1
+#fi
+#
+#if test "$ac_vt_lockswitch" = yes; then
+# AC_DEFINE(HAVE_VT_LOCKSWITCH)
+# # the VT_LOCKSWITCH ioctl can only be used when running as root.
+# # #### but it doesn't work yet, so don't worry about that for now.
+## need_setuid=yes
+#fi
+
+
+###############################################################################
+#
+# Check for PAM.
+#
+###############################################################################
+
+case "$host" in
+ *-solaris*)
+ # Solaris systems tend to come with PAM misconfigured.
+ # Don't build it by default, even if the headers exist.
+ with_pam_default=no
+ ;;
+ *)
+ # Default to building PAM support on all other systems, if it exists.
+ with_pam_default=yes
+ ;;
+esac
+
+have_pam=no
+with_pam_req=unspecified
+
+
+# Check whether --with-pam or --without-pam was given.
+if test "${with_pam+set}" = set; then
+ withval="$with_pam"
+ with_pam="$withval"; with_pam_req="$withval"
+else
+ with_pam=$with_pam_default
+fi;
+
+
+ case "$with_pam" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for PAM headers" >&5
+echo $ECHO_N "checking for PAM headers... $ECHO_C" >&6
+ d=$with_pam/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for PAM libs" >&5
+echo $ECHO_N "checking for PAM libs... $ECHO_C" >&6
+ d=$with_pam/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_pam_req="yes"
+ with_pam=$with_pam_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-pam must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$enable_locking" = yes -a "$with_pam" = yes; then
+ echo "$as_me:$LINENO: checking for PAM" >&5
+echo $ECHO_N "checking for PAM... $ECHO_C" >&6
+if test "${ac_cv_pam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <security/pam_appl.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_pam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_pam=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_pam" >&5
+echo "${ECHO_T}$ac_cv_pam" >&6
+ if test "$ac_cv_pam" = yes ; then
+ have_pam=yes
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_PAM 1
+_ACEOF
+
+ PASSWD_LIBS="${PASSWD_LIBS} -lpam"
+
+ # libpam typically requires dlopen and dlsym. On FreeBSD,
+ # those are in libc. On Linux and Solaris, they're in libdl.
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ PASSWD_LIBS="${PASSWD_LIBS} -ldl"
+fi
+
+
+ echo "$as_me:$LINENO: checking how to call pam_strerror" >&5
+echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6
+ if test "${ac_cv_pam_strerror_args+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdio.h>
+ #include <stdlib.h>
+ #include <security/pam_appl.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+pam_handle_t *pamh = 0;
+ char *s = pam_strerror(pamh, PAM_SUCCESS);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_pam_strerror_args=2
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdio.h>
+ #include <stdlib.h>
+ #include <security/pam_appl.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+char *s =
+ pam_strerror(PAM_SUCCESS);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_pam_strerror_args=1
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_pam_strerror_args=0
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ ac_cv_pam_strerror_args=$ac_pam_strerror_args
+fi
+
+ ac_pam_strerror_args=$ac_cv_pam_strerror_args
+ if test "$ac_pam_strerror_args" = 1 ; then
+ echo "$as_me:$LINENO: result: one argument" >&5
+echo "${ECHO_T}one argument" >&6
+ elif test "$ac_pam_strerror_args" = 2 ; then
+ cat >>confdefs.h <<\_ACEOF
+#define PAM_STRERROR_TWO_ARGS 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: two arguments" >&5
+echo "${ECHO_T}two arguments" >&6
+ else
+ echo "$as_me:$LINENO: result: unknown" >&5
+echo "${ECHO_T}unknown" >&6
+ fi
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for Kerberos.
+#
+###############################################################################
+
+have_kerberos=no
+have_kerberos5=no
+with_kerberos_req=unspecified
+
+
+# Check whether --with-kerberos or --without-kerberos was given.
+if test "${with_kerberos+set}" = set; then
+ withval="$with_kerberos"
+ with_kerberos="$withval"; with_kerberos_req="$withval"
+else
+ with_kerberos=yes
+fi;
+
+
+ case "$with_kerberos" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for Kerberos headers" >&5
+echo $ECHO_N "checking for Kerberos headers... $ECHO_C" >&6
+ d=$with_kerberos/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for Kerberos libs" >&5
+echo $ECHO_N "checking for Kerberos libs... $ECHO_C" >&6
+ d=$with_kerberos/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_kerberos_req="yes"
+ with_kerberos=$with_kerberos_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-kerberos must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
+ echo "$as_me:$LINENO: checking for Kerberos 4" >&5
+echo $ECHO_N "checking for Kerberos 4... $ECHO_C" >&6
+if test "${ac_cv_kerberos+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <krb.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_kerberos=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_kerberos=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_kerberos" >&5
+echo "${ECHO_T}$ac_cv_kerberos" >&6
+ echo "$as_me:$LINENO: checking for Kerberos 5" >&5
+echo $ECHO_N "checking for Kerberos 5... $ECHO_C" >&6
+if test "${ac_cv_kerberos5+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <kerberosIV/krb.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_kerberos5=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_kerberos5=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_kerberos5" >&5
+echo "${ECHO_T}$ac_cv_kerberos5" >&6
+
+ if test "$ac_cv_kerberos" = yes ; then
+ have_kerberos=yes
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERBEROS 1
+_ACEOF
+
+ fi
+
+ if test "$ac_cv_kerberos5" = yes ; then
+
+ # Andrew Snare <ajs@pigpond.com> wrote:
+ #
+ # You were assuming that if kerberosV (krb5) was found, then kerberosIV
+ # (krb4) was also available. This turns out not to be the case with
+ # mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
+ # is optional.
+ #
+ # So, disable kerberosV support if libkrb4 can't be found.
+ # This is not the best solution, but it makes the compile not fail.
+ #
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for krb_get_tf_realm in -lkrb4" >&5
+echo $ECHO_N "checking for krb_get_tf_realm in -lkrb4... $ECHO_C" >&6
+if test "${ac_cv_lib_krb4_krb_get_tf_realm+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lkrb4 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb_get_tf_realm ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+krb_get_tf_realm ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_krb4_krb_get_tf_realm=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_krb4_krb_get_tf_realm=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_tf_realm" >&5
+echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_tf_realm" >&6
+if test $ac_cv_lib_krb4_krb_get_tf_realm = yes; then
+ have_kerberos=yes
+else
+ have_kerberos=no
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ if test "$have_kerberos" = yes ; then
+ have_kerberos5=yes
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERBEROS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERBEROS5 1
+_ACEOF
+
+ else
+ have_kerberos5=no
+ { echo "$as_me:$LINENO: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&5
+echo "$as_me: WARNING: Cannot find compat lib (libkrb4) needed to use Kerberos 5" >&2;}
+ fi
+
+ fi
+
+ if test "$have_kerberos5" = yes ; then
+ # from Matt Knopp <mhat@infocalypse.netlag.com>
+ # (who got it from amu@mit.edu)
+
+ PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
+
+ # jwz: MacOS X uses -lkrb5, but not -lcrypt
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+ PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+
+ elif test "$have_kerberos" = yes ; then
+ # from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
+ PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
+ fi
+
+ if test "$have_kerberos" = yes ; then
+ echo "$as_me:$LINENO: checking for res_search" >&5
+echo $ECHO_N "checking for res_search... $ECHO_C" >&6
+if test "${ac_cv_func_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char res_search (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+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_res_search) || defined (__stub___res_search)
+choke me
+#else
+f = res_search;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_res_search=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5
+echo "${ECHO_T}$ac_cv_func_res_search" >&6
+if test $ac_cv_func_res_search = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5
+echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6
+if test "${ac_cv_lib_resolv_res_search+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lresolv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char res_search ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+res_search ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_resolv_res_search=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_resolv_res_search=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5
+echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6
+if test $ac_cv_lib_resolv_res_search = yes; then
+ PASSWD_LIBS="${PASSWD_LIBS} -lresolv"
+else
+ { echo "$as_me:$LINENO: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&5
+echo "$as_me: WARNING: Can't find DNS resolver libraries needed for Kerberos" >&2;}
+
+fi
+
+fi
+
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for the nine billion variants of shadow passwords...
+#
+###############################################################################
+
+need_setuid=no
+
+have_shadow=no
+with_shadow_req=unspecified
+
+
+# Check whether --with-shadow or --without-shadow was given.
+if test "${with_shadow+set}" = set; then
+ withval="$with_shadow"
+ with_shadow="$withval"; with_shadow_req="$withval"
+else
+ with_shadow=yes
+fi;
+
+
+ case "$with_shadow" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for shadow password headers" >&5
+echo $ECHO_N "checking for shadow password headers... $ECHO_C" >&6
+ d=$with_shadow/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for shadow password libs" >&5
+echo $ECHO_N "checking for shadow password libs... $ECHO_C" >&6
+ d=$with_shadow/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_shadow_req="yes"
+ with_shadow=$with_shadow_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-shadow must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$enable_locking" = no ; then
+ with_shadow_req=no
+ with_shadow=no
+fi
+
+
+###############################################################################
+#
+# Check for Sun "adjunct" passwords.
+#
+###############################################################################
+
+if test "$with_shadow" = yes ; then
+ echo "$as_me:$LINENO: checking for Sun-style shadow passwords" >&5
+echo $ECHO_N "checking for Sun-style shadow passwords... $ECHO_C" >&6
+if test "${ac_cv_sun_adjunct+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/label.h>
+ #include <sys/audit.h>
+ #include <pwdadj.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+struct passwd_adjunct *p = getpwanam("nobody");
+ const char *pw = p->pwa_passwd;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sun_adjunct=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_sun_adjunct=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sun_adjunct" >&5
+echo "${ECHO_T}$ac_cv_sun_adjunct" >&6
+ if test "$ac_cv_sun_adjunct" = yes; then
+ have_shadow_adjunct=yes
+ have_shadow=yes
+ need_setuid=yes
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for DEC and SCO so-called "enhanced" security.
+#
+###############################################################################
+
+if test "$with_shadow" = yes ; then
+ echo "$as_me:$LINENO: checking for DEC-style shadow passwords" >&5
+echo $ECHO_N "checking for DEC-style shadow passwords... $ECHO_C" >&6
+if test "${ac_cv_enhanced_passwd+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <sys/security.h>
+ #include <prot.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+struct pr_passwd *p;
+ const char *pw;
+ set_auth_parameters(0, 0);
+ check_auth_parameters();
+ p = getprpwnam("nobody");
+ pw = p->ufld.fd_encrypt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_enhanced_passwd=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_enhanced_passwd=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_enhanced_passwd" >&5
+echo "${ECHO_T}$ac_cv_enhanced_passwd" >&6
+ if test $ac_cv_enhanced_passwd = yes; then
+ have_shadow_enhanced=yes
+ have_shadow=yes
+ need_setuid=yes
+
+ # On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
+ # (I'm told it needs -lcurses too, but I don't understand why.)
+ # But on DEC, it's in -lsecurity.
+ #
+ echo "$as_me:$LINENO: checking for getprpwnam in -lprot" >&5
+echo $ECHO_N "checking for getprpwnam in -lprot... $ECHO_C" >&6
+if test "${ac_cv_lib_prot_getprpwnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lprot -lx $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getprpwnam ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getprpwnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_prot_getprpwnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_prot_getprpwnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getprpwnam" >&5
+echo "${ECHO_T}$ac_cv_lib_prot_getprpwnam" >&6
+if test $ac_cv_lib_prot_getprpwnam = yes; then
+ PASSWD_LIBS="$PASSWD_LIBS -lprot -lcurses -lx"
+else
+ echo "$as_me:$LINENO: checking for getprpwnam in -lsecurity" >&5
+echo $ECHO_N "checking for getprpwnam in -lsecurity... $ECHO_C" >&6
+if test "${ac_cv_lib_security_getprpwnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsecurity $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getprpwnam ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getprpwnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_security_getprpwnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_security_getprpwnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_security_getprpwnam" >&5
+echo "${ECHO_T}$ac_cv_lib_security_getprpwnam" >&6
+if test $ac_cv_lib_security_getprpwnam = yes; then
+ PASSWD_LIBS="$PASSWD_LIBS -lsecurity"
+fi
+
+fi
+
+ fi
+fi
+
+###############################################################################
+#
+# Check for HP's entry in the "Not Invented Here" Sweepstakes.
+#
+###############################################################################
+
+if test "$with_shadow" = yes ; then
+ echo "$as_me:$LINENO: checking for HP-style shadow passwords" >&5
+echo $ECHO_N "checking for HP-style shadow passwords... $ECHO_C" >&6
+if test "${ac_cv_hpux_passwd+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <hpsecurity.h>
+ #include <prot.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+struct s_passwd *p = getspwnam("nobody");
+ const char *pw = p->pw_passwd;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_hpux_passwd=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_hpux_passwd=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_hpux_passwd" >&5
+echo "${ECHO_T}$ac_cv_hpux_passwd" >&6
+ if test "$ac_cv_hpux_passwd" = yes; then
+ have_shadow_hpux=yes
+ have_shadow=yes
+ need_setuid=yes
+
+ # on HPUX, bigcrypt is in -lsec
+ echo "$as_me:$LINENO: checking for bigcrypt in -lsec" >&5
+echo $ECHO_N "checking for bigcrypt in -lsec... $ECHO_C" >&6
+if test "${ac_cv_lib_sec_bigcrypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsec $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char bigcrypt ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+bigcrypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_sec_bigcrypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_sec_bigcrypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sec_bigcrypt" >&5
+echo "${ECHO_T}$ac_cv_lib_sec_bigcrypt" >&6
+if test $ac_cv_lib_sec_bigcrypt = yes; then
+ PASSWD_LIBS="$PASSWD_LIBS -lsec"
+fi
+
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for FreeBSD-style shadow passwords.
+#
+# On FreeBSD, getpwnam() and friends work just like on non-shadow-
+# password systems -- except you only get stuff in the pw_passwd field
+# if the running program is setuid. So, guess that we've got this
+# lossage to contend with if /etc/master.passwd exists, and default to
+# a setuid installation.
+#
+###############################################################################
+
+if test "$with_shadow" = yes ; then
+ echo "$as_me:$LINENO: checking for FreeBSD-style shadow passwords" >&5
+echo $ECHO_N "checking for FreeBSD-style shadow passwords... $ECHO_C" >&6
+if test "${ac_cv_master_passwd+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -f /etc/master.passwd ; then
+ ac_cv_master_passwd=yes
+ else
+ ac_cv_master_passwd=no
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_master_passwd" >&5
+echo "${ECHO_T}$ac_cv_master_passwd" >&6
+ if test "$ac_cv_master_passwd" = yes; then
+ need_setuid=yes
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for traditional (ha!) shadow passwords.
+#
+###############################################################################
+
+if test "$with_shadow" = yes ; then
+ echo "$as_me:$LINENO: checking for generic shadow passwords" >&5
+echo $ECHO_N "checking for generic shadow passwords... $ECHO_C" >&6
+if test "${ac_cv_shadow+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <pwd.h>
+ #include <shadow.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+struct spwd *p = getspnam("nobody");
+ const char *pw = p->sp_pwdp;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_shadow=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_shadow=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_shadow" >&5
+echo "${ECHO_T}$ac_cv_shadow" >&6
+ if test "$ac_cv_shadow" = yes; then
+ have_shadow=yes
+ need_setuid=yes
+
+ # On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
+ have_getspnam=no
+ echo "$as_me:$LINENO: checking for getspnam in -lc" >&5
+echo $ECHO_N "checking for getspnam in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_getspnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getspnam ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getspnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_getspnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_c_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_c_getspnam" >&6
+if test $ac_cv_lib_c_getspnam = yes; then
+ have_getspnam=yes
+fi
+
+ if test "$have_getspnam" = no ; then
+ echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5
+echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6
+if test "${ac_cv_lib_gen_getspnam+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgen $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getspnam ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+getspnam ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gen_getspnam=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gen_getspnam=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5
+echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6
+if test $ac_cv_lib_gen_getspnam = yes; then
+ have_getspnam=yes; PASSWD_LIBS="$PASSWD_LIBS -lgen"
+fi
+
+ fi
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for other libraries needed for non-shadow passwords.
+#
+###############################################################################
+
+if test "$enable_locking" = yes ; then
+
+ # On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
+ have_crypt=no
+ echo "$as_me:$LINENO: checking for crypt in -lc" >&5
+echo $ECHO_N "checking for crypt in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_c_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_c_crypt" >&6
+if test $ac_cv_lib_c_crypt = yes; then
+ have_crypt=yes
+fi
+
+ if test "$have_crypt" = no ; then
+ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+ have_crypt=yes; PASSWD_LIBS="$PASSWD_LIBS -lcrypt"
+fi
+
+ fi
+fi
+
+
+# Most of the above shadow mechanisms will have set need_setuid to yes,
+# if they were found. But, on some systems, we need setuid even when
+# using plain old vanilla passwords.
+#
+if test "$enable_locking" = yes ; then
+ case "$host" in
+ *-hpux* | *-aix* | *-netbsd* | *-freebsd* | *-openbsd* )
+ need_setuid=yes
+ ;;
+ esac
+fi
+
+
+if test "$have_shadow_adjunct" = yes ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ADJUNCT_PASSWD 1
+_ACEOF
+
+elif test "$have_shadow_enhanced" = yes ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ENHANCED_PASSWD 1
+_ACEOF
+
+elif test "$have_shadow_hpux" = yes ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_HPUX_PASSWD 1
+_ACEOF
+
+elif test "$have_shadow" = yes ; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHADOW_PASSWD 1
+_ACEOF
+
+fi
+
+
+###############################################################################
+#
+# Check for -lXm.
+#
+###############################################################################
+
+have_motif=no
+with_motif_req=unspecified
+
+# Check whether --with-motif or --without-motif was given.
+if test "${with_motif+set}" = set; then
+ withval="$with_motif"
+ with_motif="$withval"; with_motif_req="$withval"
+else
+ with_motif=yes
+fi;
+
+
+ case "$with_motif" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for Motif headers" >&5
+echo $ECHO_N "checking for Motif headers... $ECHO_C" >&6
+ d=$with_motif/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for Motif libs" >&5
+echo $ECHO_N "checking for Motif libs... $ECHO_C" >&6
+ d=$with_motif/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_motif_req="yes"
+ with_motif=$with_motif_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-motif must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_motif" != yes -a "$with_motif" != no ; then
+ echo "error: must be yes or no: --with-motif=$with_motif"
+ exit 1
+fi
+
+if test "$with_motif" = yes; then
+ have_motif=no
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ echo "$as_me:$LINENO: checking for Xm/Xm.h" >&5
+echo $ECHO_N "checking for Xm/Xm.h... $ECHO_C" >&6
+if test "${ac_cv_header_Xm_Xm_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <X11/Intrinsic.h>
+
+#include <Xm/Xm.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_Xm_Xm_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_Xm_Xm_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_Xm_Xm_h" >&5
+echo "${ECHO_T}$ac_cv_header_Xm_Xm_h" >&6
+if test $ac_cv_header_Xm_Xm_h = yes; then
+ have_motif=yes
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MOTIF 1
+_ACEOF
+
+ MOTIF_LIBS="$MOTIF_LIBS -lXm"
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
+
+if test "$have_motif" = yes; then
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ echo "$as_me:$LINENO: checking for Xm/ComboBox.h" >&5
+echo $ECHO_N "checking for Xm/ComboBox.h... $ECHO_C" >&6
+if test "${ac_cv_header_Xm_ComboBox_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <X11/Intrinsic.h>
+
+#include <Xm/ComboBox.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_Xm_ComboBox_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_Xm_ComboBox_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_Xm_ComboBox_h" >&5
+echo "${ECHO_T}$ac_cv_header_Xm_ComboBox_h" >&6
+if test $ac_cv_header_Xm_ComboBox_h = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_XMCOMBOBOX 1
+_ACEOF
+
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
+
+###############################################################################
+#
+# Check for -lgtk (and Gnome stuff)
+#
+###############################################################################
+
+have_gtk=no
+have_gtk2=no
+with_gtk_req=unspecified
+
+# Check whether --with-gtk or --without-gtk was given.
+if test "${with_gtk+set}" = set; then
+ withval="$with_gtk"
+ with_gtk="$withval"; with_gtk_req="$withval"
+else
+ with_gtk=yes
+fi;
+
+# if --with-gtk=/directory/ was specified, remember that directory so that
+# we can also look for the `gtk-config' program in that directory.
+case "$with_gtk" in
+ /*)
+ gtk_dir="$with_gtk"
+ ;;
+ *)
+ gtk_dir=""
+ ;;
+esac
+
+
+ case "$with_gtk" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for Gtk headers" >&5
+echo $ECHO_N "checking for Gtk headers... $ECHO_C" >&6
+ d=$with_gtk/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for Gtk libs" >&5
+echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
+ d=$with_gtk/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_gtk_req="yes"
+ with_gtk=$with_gtk_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-gtk must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_gtk" != yes -a "$with_gtk" != no ; then
+ echo "error: must be yes or no: --with-gtk=$with_gtk"
+ exit 1
+fi
+
+have_gnome=no
+with_gnome_req=unspecified
+
+# Check whether --with-gnome or --without-gnome was given.
+if test "${with_gnome+set}" = set; then
+ withval="$with_gnome"
+ with_gnome="$withval"; with_gnome_req="$withval"
+else
+ with_gnome=yes
+fi;
+
+# if --with-gnome=/directory/ was specified, remember that directory so that
+# we can also look for the `gnome-config' program in that directory.
+case "$with_gnome" in
+ /*)
+ gnome_dir="$with_gnome"
+ ;;
+ *)
+ gnome_dir=""
+ ;;
+esac
+
+
+ case "$with_gnome" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for Gnome headers" >&5
+echo $ECHO_N "checking for Gnome headers... $ECHO_C" >&6
+ d=$with_gnome/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for Gnome libs" >&5
+echo $ECHO_N "checking for Gnome libs... $ECHO_C" >&6
+ d=$with_gnome/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_gnome_req="yes"
+ with_gnome=$with_gnome_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-gnome must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_gnome" != yes -a "$with_gnome" != no ; then
+ echo "error: must be yes or no: --with-gnome=$with_gnome"
+ exit 1
+fi
+
+parse_gtk_version_string() {
+ # M4 sucks!!
+
+ maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
+ min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
+
+ ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
+ if test -z "$ac_gtk_version"; then
+ ac_gtk_version=unknown
+ ac_gtk_version_string=unknown
+ fi
+}
+
+
+jurassic_gtk=no
+gtk2_halfassed=no
+
+if test "$with_gtk" = yes; then
+ have_gtk=no
+
+ # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
+ # look in /foo/bin/ for glib-config, gtk-config, and gnome-config.
+ #
+ gtk_path="$PATH"
+
+ if test ! -z "$gtk_dir"; then
+ # canonicalize slashes.
+ foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
+ gtk_path="$foo:$gtk_path"
+ fi
+
+ if test ! -z "$gnome_dir"; then
+ # canonicalize slashes.
+ foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
+ gtk_path="$foo:$gtk_path"
+ fi
+
+ for ac_prog in pkg-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_pkg_config+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $pkg_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_pkg_config="$pkg_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gtk_path
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_pkg_config="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+pkg_config=$ac_cv_path_pkg_config
+
+if test -n "$pkg_config"; then
+ echo "$as_me:$LINENO: result: $pkg_config" >&5
+echo "${ECHO_T}$pkg_config" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$pkg_config" && break
+done
+
+
+ if test -n "$pkg_config" ; then
+ #
+ # the new way...
+ # run pkg-config based tests.
+ #
+ pkgs=''
+ pkg_check_version() {
+ if test "$ok" = yes ; then
+ req="$1"
+ min="$2"
+ echo "$as_me:$LINENO: checking for $req" >&5
+echo $ECHO_N "checking for $req... $ECHO_C" >&6
+ if $pkg_config --exists "$req" ; then
+ vers=`$pkg_config --modversion "$req"`
+ if $pkg_config --exists "$req >= $min" ; then
+ echo "$as_me:$LINENO: result: $vers" >&5
+echo "${ECHO_T}$vers" >&6
+ pkgs="$pkgs $req"
+ return 1
+ else
+ echo "$as_me:$LINENO: result: $vers (wanted >= $min)" >&5
+echo "${ECHO_T}$vers (wanted >= $min)" >&6
+ ok=no
+ return 0
+ fi
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ok=no
+ return 0
+ fi
+ fi
+ }
+
+ echo "$as_me:$LINENO: result: checking for GTK 2.x with pkg-config based tests..." >&5
+echo "${ECHO_T}checking for GTK 2.x with pkg-config based tests..." >&6
+
+ ok="yes"
+ pkg_check_version gtk+-2.0 2.0.1 ; ac_gtk_version_string="$vers"
+ pkg_check_version gmodule-2.0 2.0.0
+ pkg_check_version libxml-2.0 2.4.6
+ pkg_check_version libglade-2.0 1.99.0
+# pkg_check_version gdk_pixbuf 0.1
+ have_gtk="$ok"
+
+ if test "$have_gtk" = yes; then
+ have_gtk2=yes
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GTK2 1
+_ACEOF
+
+ else
+ if test -n "$ac_gtk_version_string" ; then
+ gtk2_halfassed="$ac_gtk_version_string"
+ gtk2_halfassed_lib="$req"
+ fi
+ fi
+
+ if test "$have_gtk" = no; then
+ #
+ # we don't have GTK 2. Let's look for GTK 1.
+ #
+ echo "$as_me:$LINENO: result: checking for GTK 1.x with pkg-config based tests..." >&5
+echo "${ECHO_T}checking for GTK 1.x with pkg-config based tests..." >&6
+
+ pkgs=''
+ ok="yes"
+ pkg_check_version gtk+ 1.2 ; ac_gtk_version_string="$vers"
+ pkg_check_version glib 1.0
+ pkg_check_version gdk_pixbuf 0.1
+ have_gtk="$ok"
+
+ # Now check for Gnome...
+ #
+ if test "$have_gtk" = yes -a "$with_gnome" = yes; then
+ old_pkgs="$pkgs"
+ ok=yes
+ pkg_check_version capplet 1.0
+ pkg_check_version gnomeui 1.0
+ pkg_check_version gdk_pixbuf 0.1
+ have_gnome="$ok"
+
+ if test "$have_gnome" = no; then
+ pkgs="$old_pkgs"
+ else
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRAPPLET 1
+_ACEOF
+
+ fi
+ fi
+ fi
+
+ if test "$have_gtk" = yes; then
+ parse_gtk_version_string
+ jurassic_gtk=no
+ else
+ have_gnome=no
+ fi
+
+ if test "$have_gtk" = yes; then
+ echo "$as_me:$LINENO: checking for Gtk includes" >&5
+echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
+if test "${ac_cv_gtk_config_cflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
+echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
+ echo "$as_me:$LINENO: checking for Gtk libs" >&5
+echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
+if test "${ac_cv_gtk_config_libs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
+echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
+ fi
+ ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
+ ac_gtk_config_libs=$ac_cv_gtk_config_libs
+
+ ac_gnome_config_cflags=$ac_gtk_config_cflags
+ ac_gnome_config_libs=$ac_gtk_config_libs
+
+ else
+ #
+ # the old way...
+ # run {gnome,gtk}-config based tests.
+ #
+ echo "$as_me:$LINENO: result: checking for GTK 1.x with gtk-config based tests..." >&5
+echo "${ECHO_T}checking for GTK 1.x with gtk-config based tests..." >&6
+
+ for ac_prog in glib12-config glib-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_glib_config+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $glib_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_glib_config="$glib_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gtk_path
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_glib_config="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+glib_config=$ac_cv_path_glib_config
+
+if test -n "$glib_config"; then
+ echo "$as_me:$LINENO: result: $glib_config" >&5
+echo "${ECHO_T}$glib_config" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$glib_config" && break
+done
+
+ for ac_prog in gtk12-config gtk-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_gtk_config+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $gtk_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_gtk_config="$gtk_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gtk_path
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_gtk_config="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+gtk_config=$ac_cv_path_gtk_config
+
+if test -n "$gtk_config"; then
+ echo "$as_me:$LINENO: result: $gtk_config" >&5
+echo "${ECHO_T}$gtk_config" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$gtk_config" && break
+done
+
+
+ if test "$with_gnome" = yes; then
+ for ac_prog in gnome-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_gnome_config+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $gnome_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_gnome_config="$gnome_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gtk_path
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_gnome_config="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+gnome_config=$ac_cv_path_gnome_config
+
+if test -n "$gnome_config"; then
+ echo "$as_me:$LINENO: result: $gnome_config" >&5
+echo "${ECHO_T}$gnome_config" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$gnome_config" && break
+done
+
+ fi
+
+ if test -n "$glib_config" -a -n "$gtk_config" ; then
+ have_gtk=yes
+ if test "$with_gnome" = yes -a -n "$gnome_config" ; then
+ have_gnome=yes
+ fi
+ fi
+
+ if test "$have_gtk" = yes; then
+ echo "$as_me:$LINENO: checking Gtk version number" >&5
+echo $ECHO_N "checking Gtk version number... $ECHO_C" >&6
+if test "${ac_cv_gtk_version_string+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_gtk_version_string=`$gtk_config --version`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_gtk_version_string" >&5
+echo "${ECHO_T}$ac_cv_gtk_version_string" >&6
+ ac_gtk_version_string=$ac_cv_gtk_version_string
+ parse_gtk_version_string
+ fi
+
+ if test "$have_gtk" = yes; then
+ if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
+ then
+ have_gtk=no
+ have_gnome=no
+ jurassic_gtk=yes
+ fi
+ fi
+
+ if test "$have_gtk" = yes; then
+ echo "$as_me:$LINENO: checking for Gtk includes" >&5
+echo $ECHO_N "checking for Gtk includes... $ECHO_C" >&6
+if test "${ac_cv_gtk_config_cflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_gtk_config_cflags=`$gtk_config --cflags`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_gtk_config_cflags" >&5
+echo "${ECHO_T}$ac_cv_gtk_config_cflags" >&6
+ echo "$as_me:$LINENO: checking for Gtk libs" >&5
+echo $ECHO_N "checking for Gtk libs... $ECHO_C" >&6
+if test "${ac_cv_gtk_config_libs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_gtk_config_libs=`$gtk_config --libs`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_gtk_config_libs" >&5
+echo "${ECHO_T}$ac_cv_gtk_config_libs" >&6
+ fi
+ ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
+ ac_gtk_config_libs=$ac_cv_gtk_config_libs
+
+ # Check for Gnome Capplet support.
+ # Note that this is only needed with Gnome 1.x, not Gnome 2.x.
+ # In a Gnome 2.x world, libcapplet will not exist.
+ # (In fact, this likely won't even be checked, since in a Gnome 2.x
+ # world, we will probably be up in the "$pkg_config" branch instead
+ # of here in the "$gnome_config" branch.)
+ #
+ if test "$have_gnome" = yes -a "$have_gtk" = yes; then
+ gnome_config_libs="gtk capplet gnomeui gdk_pixbuf"
+ echo "$as_me:$LINENO: checking for Gnome capplet includes" >&5
+echo $ECHO_N "checking for Gnome capplet includes... $ECHO_C" >&6
+ if test "${ac_cv_gnome_config_cflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if ( $gnome_config --cflags $gnome_config_libs 2>&1 | \
+ grep Unknown >/dev/null ) ; then
+ ac_cv_gnome_config_cflags=''
+ else
+ ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
+ fi
+fi
+
+ ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
+ if test "$ac_gnome_config_cflags" = "" ; then
+ have_gnome=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: $ac_gnome_config_cflags" >&5
+echo "${ECHO_T}$ac_gnome_config_cflags" >&6
+ fi
+ fi
+
+ if test "$have_gnome" = yes -a "$have_gtk" = yes; then
+ echo "$as_me:$LINENO: checking for Gnome capplet libs" >&5
+echo $ECHO_N "checking for Gnome capplet libs... $ECHO_C" >&6
+ if test "${ac_cv_gnome_config_libs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if ( $gnome_config --libs $gnome_config_libs 2>&1 |
+ grep Unknown >/dev/null ) ; then
+ ac_cv_gnome_config_libs=''
+ else
+ ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
+ fi
+fi
+
+ ac_gnome_config_libs=$ac_cv_gnome_config_libs
+ if test "$ac_gnome_config_libs" = "" ; then
+ have_gnome=no
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ echo "$as_me:$LINENO: result: $ac_gnome_config_libs" >&5
+echo "${ECHO_T}$ac_gnome_config_libs" >&6
+ fi
+ fi
+
+ # If we have Gnome, then override the gtk-config values with
+ # the gnome-config values.
+ #
+ if test "$have_gnome" = yes -a "$have_gtk" = yes; then
+ ac_gtk_config_cflags=$ac_gnome_config_cflags
+ ac_gtk_config_libs=$ac_gnome_config_libs
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRAPPLET 1
+_ACEOF
+
+ fi
+
+ fi # end of {gnome,gtk}-config based tests
+
+ if test "$have_gtk" = yes -a "$have_gtk2" = no; then
+ # check for this function that was not in libcapplet 1.2.
+ # (only needed in Gnome/Gtk 1.x, not Gnome/Gtk 2.x)
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for capplet_widget_changes_are_immediate in -lcapplet" >&5
+echo $ECHO_N "checking for capplet_widget_changes_are_immediate in -lcapplet... $ECHO_C" >&6
+if test "${ac_cv_lib_capplet_capplet_widget_changes_are_immediate+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcapplet $ac_gnome_config_libs $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char capplet_widget_changes_are_immediate ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+capplet_widget_changes_are_immediate ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_capplet_capplet_widget_changes_are_immediate=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_capplet_capplet_widget_changes_are_immediate=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&5
+echo "${ECHO_T}$ac_cv_lib_capplet_capplet_widget_changes_are_immediate" >&6
+if test $ac_cv_lib_capplet_capplet_widget_changes_are_immediate = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRAPPLET_IMMEDIATE 1
+_ACEOF
+
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
+
+
+ GNOME_DATADIR=""
+ if test "$have_gtk" = yes; then
+ if test -n "$pkg_config"; then
+ if test "$have_gtk2" = yes; then
+ GNOME_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
+ else
+ GNOME_DATADIR=`$pkg_config --variable=prefix gtk+`
+ fi
+ else
+ GNOME_DATADIR=`$gtk_config --prefix`
+ fi
+ GNOME_DATADIR="$GNOME_DATADIR/share"
+ fi
+
+ # .desktop files go in different places in Gnome 1.x and Gnome 2.x...
+ if test "$have_gtk2" = yes; then
+ GNOME_PANELDIR='$(GNOME_PANELDIR2)'
+ else
+ GNOME_PANELDIR='$(GNOME_PANELDIR1)'
+ fi
+
+
+ if test "$have_gtk" = yes; then
+ INCLUDES="$INCLUDES $ac_gtk_config_cflags"
+ GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GTK 1
+_ACEOF
+
+
+ if test "$have_gtk2" = yes; then
+ GTK_EXTRA_OBJS=""
+ else
+ GTK_EXTRA_OBJS="\$(GTK_EXTRA_OBJS)"
+ fi
+ fi
+
+fi
+
+
+# Check for the Gnome Help Browser.
+#
+if test "$have_gtk" = yes; then
+ for ac_prog in yelp gnome-help-browser
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_have_gnome_help+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$have_gnome_help"; then
+ ac_cv_prog_have_gnome_help="$have_gnome_help" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_have_gnome_help="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+have_gnome_help=$ac_cv_prog_have_gnome_help
+if test -n "$have_gnome_help"; then
+ echo "$as_me:$LINENO: result: $have_gnome_help" >&5
+echo "${ECHO_T}$have_gnome_help" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$have_gnome_help" && break
+done
+test -n "$have_gnome_help" || have_gnome_help="no"
+
+ if test "$have_gnome_help" != no; then
+ have_gnome_help=yes
+ fi
+fi
+
+
+###############################################################################
+#
+# Check for -lxml
+#
+###############################################################################
+
+have_xml=no
+with_xml_req=unspecified
+xml_halfassed=no
+
+# Check whether --with-xml or --without-xml was given.
+if test "${with_xml+set}" = set; then
+ withval="$with_xml"
+ with_xml="$withval"; with_xml_req="$withval"
+else
+ with_xml=yes
+fi;
+
+# if --with-xml=/directory/ was specified, remember that directory so that
+# we can also look for the `xml-config' program in that directory.
+case "$with_xml" in
+ /*)
+ xml_dir="$with_xml"
+ ;;
+ *)
+ xml_dir=""
+ ;;
+esac
+
+
+ case "$with_xml" in
+ yes) ;;
+ no) ;;
+
+ /*)
+ echo "$as_me:$LINENO: checking for XML headers" >&5
+echo $ECHO_N "checking for XML headers... $ECHO_C" >&6
+ d=$with_xml/include
+ if test -d $d; then
+ X_CFLAGS="-I$d $X_CFLAGS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ echo "$as_me:$LINENO: checking for XML libs" >&5
+echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
+ d=$with_xml/lib
+ if test -d $d; then
+ X_LIBS="-L$d $X_LIBS"
+ echo "$as_me:$LINENO: result: $d" >&5
+echo "${ECHO_T}$d" >&6
+ else
+ echo "$as_me:$LINENO: result: not found ($d: no such directory)" >&5
+echo "${ECHO_T}not found ($d: no such directory)" >&6
+ fi
+
+ # replace the directory string with "yes".
+ with_xml_req="yes"
+ with_xml=$with_xml_req
+ ;;
+
+ *)
+ echo ""
+ echo "error: argument to --with-xml must be \"yes\", \"no\", or a directory."
+ echo " If it is a directory, then \`DIR/include' will be added to"
+ echo " the -I list, and \`DIR/lib' will be added to the -L list."
+ exit 1
+ ;;
+ esac
+
+
+if test "$with_xml" != yes -a "$with_xml" != no ; then
+ echo "error: must be yes or no: --with-xml=$with_xml"
+ exit 1
+fi
+
+if test "$with_xml" = yes; then
+ have_xml=no
+ have_old_xml=no
+
+ # if the user specified --with-gtk=/foo/ or --with-gnome=/foo/ then
+ # look in /foo/bin/ for for xml-config.
+ #
+ xml_path="$PATH"
+
+ if test ! -z "$gtk_dir"; then
+ # canonicalize slashes.
+ foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
+ xml_path="$foo:$xml_path"
+ fi
+
+ if test ! -z "$gnome_dir"; then
+ # canonicalize slashes.
+ foo=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
+ xml_path="$foo:$xml_path"
+ fi
+
+ if test -n "$pkg_config" ; then
+ #
+ # the new way...
+ # run pkg-config based tests.
+ #
+ pkgs=""
+ ok="yes"
+
+ # If we have Gtk 2.x, then *only* XML 2.x will work.
+ # If we have Gtk 1.x, or don't have Gtk at all, then
+ # either XML 1.x or 2.x will work.
+
+ # First check for XML 2.x.
+ #
+ pkg_check_version libxml-2.0 2.4.6
+
+ # If that didn't work (we don't have XML 2.x) and we *don't* have
+ # Gtk 2.x, then check to see if we have XML 1.x
+ #
+ if test "$ok" = no -a "$have_gtk2" = no; then
+ ok=yes
+ pkg_check_version libxml 1.0
+ fi
+
+ have_xml="$ok"
+
+ if test "$have_xml" = yes; then
+ echo "$as_me:$LINENO: checking for XML includes" >&5
+echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
+if test "${ac_cv_xml_config_cflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_xml_config_cflags=`$pkg_config --cflags $pkgs`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
+echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
+ echo "$as_me:$LINENO: checking for XML libs" >&5
+echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
+if test "${ac_cv_xml_config_libs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_xml_config_libs=`$pkg_config --libs $pkgs`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
+echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
+ ac_xml_config_cflags=$ac_cv_xml_config_cflags
+ ac_xml_config_libs=$ac_cv_xml_config_libs
+ fi
+
+ else
+ #
+ # the old way...
+ # run {xml2,xml}-config based tests.
+ #
+
+ for ac_prog in xml2-config xml-config
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_xml_config+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $xml_config in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_xml_config="$xml_config" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $xml_path
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_xml_config="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+xml_config=$ac_cv_path_xml_config
+
+if test -n "$xml_config"; then
+ echo "$as_me:$LINENO: result: $xml_config" >&5
+echo "${ECHO_T}$xml_config" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$xml_config" && break
+done
+
+
+ # If we found the xml-config program, run it to get flags.
+ #
+ if test -n "$xml_config" ; then
+ echo "$as_me:$LINENO: checking for XML includes" >&5
+echo $ECHO_N "checking for XML includes... $ECHO_C" >&6
+if test "${ac_cv_xml_config_cflags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_xml_config_cflags=`$xml_config --cflags`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_xml_config_cflags" >&5
+echo "${ECHO_T}$ac_cv_xml_config_cflags" >&6
+ echo "$as_me:$LINENO: checking for XML libs" >&5
+echo $ECHO_N "checking for XML libs... $ECHO_C" >&6
+if test "${ac_cv_xml_config_libs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_xml_config_libs=`$xml_config --libs`
+fi
+echo "$as_me:$LINENO: result: $ac_cv_xml_config_libs" >&5
+echo "${ECHO_T}$ac_cv_xml_config_libs" >&6
+ ac_xml_config_cflags=$ac_cv_xml_config_cflags
+ ac_xml_config_libs=$ac_cv_xml_config_libs
+ fi
+
+ ac_save_xml_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $ac_xml_config_cflags"
+
+ # first try <libxml/parser.h> which is the new way...
+ #
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ echo "$as_me:$LINENO: checking for libxml/xmlIO.h" >&5
+echo $ECHO_N "checking for libxml/xmlIO.h... $ECHO_C" >&6
+if test "${ac_cv_header_libxml_xmlIO_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <libxml/parser.h>
+
+#include <libxml/xmlIO.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_libxml_xmlIO_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_libxml_xmlIO_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_libxml_xmlIO_h" >&5
+echo "${ECHO_T}$ac_cv_header_libxml_xmlIO_h" >&6
+if test $ac_cv_header_libxml_xmlIO_h = yes; then
+ have_xml=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+
+ # if that didn't work, then try just <parser.h> which is the old way...
+ #
+ if test "$have_xml" = no; then
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ echo "$as_me:$LINENO: checking for xmlIO.h" >&5
+echo $ECHO_N "checking for xmlIO.h... $ECHO_C" >&6
+if test "${ac_cv_header_xmlIO_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <parser.h>
+
+#include <xmlIO.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_xmlIO_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_header_xmlIO_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_xmlIO_h" >&5
+echo "${ECHO_T}$ac_cv_header_xmlIO_h" >&6
+if test $ac_cv_header_xmlIO_h = yes; then
+ have_xml=yes; have_old_xml=yes
+fi
+
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ fi
+
+ CPPFLAGS="$ac_save_xml_CPPFLAGS"
+ fi
+
+
+ have_zlib=no
+ if test "$have_xml" = yes; then
+ # we have the XML headers; now make sure zlib is around.
+ # yes, it's stupid we have to do this too, but there is
+ # dependency screwage in Gnome.
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for zlibVersion in -lz" >&5
+echo $ECHO_N "checking for zlibVersion in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_zlibVersion+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char zlibVersion ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+zlibVersion ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_z_zlibVersion=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_z_zlibVersion=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_zlibVersion" >&5
+echo "${ECHO_T}$ac_cv_lib_z_zlibVersion" >&6
+if test $ac_cv_lib_z_zlibVersion = yes; then
+ have_zlib=yes
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ if test "$have_zlib" = no; then
+ xml_halfassed=yes
+ have_xml=no
+ fi
+ fi
+
+ if test "$have_xml" = yes; then
+ # we have the header, now check for the library
+ have_xml=no
+ xml_halfassed=yes
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for xmlParseChunk in -lc" >&5
+echo $ECHO_N "checking for xmlParseChunk in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_xmlParseChunk+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $ac_xml_config_libs $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char xmlParseChunk ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+xmlParseChunk ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_xmlParseChunk=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_c_xmlParseChunk=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_xmlParseChunk" >&5
+echo "${ECHO_T}$ac_cv_lib_c_xmlParseChunk" >&6
+if test $ac_cv_lib_c_xmlParseChunk = yes; then
+ have_xml=yes
+ xml_halfassed=no
+ XML_LIBS="$ac_xml_config_libs"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_XML 1
+_ACEOF
+
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+ fi
+
+ if test "$have_xml" = yes; then
+ INCLUDES="$INCLUDES $ac_xml_config_cflags"
+ GTK_LIBS="$GTK_LIBS $ac_xml_config_libs"
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_XML 1
+_ACEOF
+
+ if test "$have_old_xml" = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_OLD_XML_HEADERS 1
+_ACEOF
+
+ fi
+ fi
+
+fi
+
+
+###############################################################################
+#
+# Checking whether Motif is really Lesstif.
+#
+###############################################################################
+
+have_lesstif=no
+if test "$have_motif" = yes ; then
+ echo "$as_me:$LINENO: checking whether Motif is really LessTif" >&5
+echo $ECHO_N "checking whether Motif is really LessTif... $ECHO_C" >&6
+if test "${ac_cv_have_lesstif+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+long vers = LesstifVersion;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_have_lesstif=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_have_lesstif=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_have_lesstif" >&5
+echo "${ECHO_T}$ac_cv_have_lesstif" >&6
+ have_lesstif=$ac_cv_have_lesstif
+fi
+
+
+lesstif_version=unknown
+lesstif_version_string=unknown
+
+if test "$have_lesstif" = yes ; then
+ ltv=unknown
+ echo unknown > conftest-lt
+ echo "$as_me:$LINENO: checking LessTif version number" >&5
+echo $ECHO_N "checking LessTif version number... $ECHO_C" >&6
+if test "${ac_cv_lesstif_version_string+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ if test "$cross_compiling" = yes; then
+ ac_cv_lesstif_version=unknown
+ ac_cv_lesstif_version_string=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdio.h>
+ #include <Xm/Xm.h>
+ int main() {
+ FILE *f = fopen("conftest-lt", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d %d.%d\n", LesstifVersion,
+ LESSTIF_VERSION, LESSTIF_REVISION);
+ fclose(f);
+ exit(0);
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ltv=`cat conftest-lt`
+ ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
+ ac_cv_lesstif_version_string=`echo $ltv | sed 's/.* //'`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_lesstif_version=unknown
+ ac_cv_lesstif_version_string=unknown
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
+echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6
+ rm -f conftest-lt
+ lesstif_version=$ac_cv_lesstif_version
+ lesstif_version_string=$ac_cv_lesstif_version_string
+
+fi
+
+
+if test "$have_motif" = yes ; then
+ mtv=unknown
+ echo unknown > conftest-mt
+ echo "$as_me:$LINENO: checking Motif version number" >&5
+echo $ECHO_N "checking Motif version number... $ECHO_C" >&6
+if test "${ac_cv_motif_version_string+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ if test "$cross_compiling" = yes; then
+ ac_cv_motif_version=unknown
+ ac_cv_motif_version_string=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdio.h>
+ #include <Xm/Xm.h>
+ int main() {
+ FILE *f = fopen("conftest-mt", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d %d.%d\n", XmVersion,
+ XmVERSION, XmREVISION);
+ fclose(f);
+ exit(0);
+ }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ mtv=`cat conftest-mt`
+ ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
+ ac_cv_motif_version_string=`echo $mtv | sed 's/.* //'`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_motif_version=unknown
+ ac_cv_motif_version_string=unknown
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
+echo "${ECHO_T}$ac_cv_motif_version_string" >&6
+ rm -f conftest-mt
+ motif_version=$ac_cv_motif_version
+ motif_version_string=$ac_cv_motif_version_string
+
+fi
+
+
+###############################################################################
+#
+# Checking whether Motif requires -lXpm.
+#
+# If this is Motif 2.x, and we have XPM, then link against XPM as well.
+# The deal is, Motif 2.x requires XPM -- but it's a compilation option
+# of the library whether to build the XPM code into libXm, or whether
+# to rely on an external libXm. So the only way to tell whether XPM is
+# a link-time requirement is to examine libXm.a, which is very
+# difficult to do in an autoconf script. So... if it's Motif 2.x, we
+# always link against XPM if the XPM lib exists (and this will be a
+# no-op if libXm happens to already have the XPM code in it.)
+#
+###############################################################################
+
+motif_requires_xpm=no
+if test "$have_motif" = yes ; then
+ echo "$as_me:$LINENO: checking whether Motif requires XPM" >&5
+echo $ECHO_N "checking whether Motif requires XPM... $ECHO_C" >&6
+ if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
+ then
+ motif_requires_xpm=yes
+ echo "$as_me:$LINENO: result: maybe" >&5
+echo "${ECHO_T}maybe" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+fi
+
+
+###############################################################################
+#
+# Checking whether Motif requires -lXp.
+#
+# Some versions of Motif (2.1.0, at least) require -lXp, the "X Printing
+# Extension". Why this extension isn't in -lXext with all the others,
+# I have no idea.
+#
+###############################################################################
+
+have_xp_ext=no
+if test "$have_motif" = yes ; then
+ have_xp_ext=no
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for XpQueryExtension in -lXp" >&5
+echo $ECHO_N "checking for XpQueryExtension in -lXp... $ECHO_C" >&6
+if test "${ac_cv_lib_Xp_XpQueryExtension+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXp -lX11 -lXext -lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XpQueryExtension ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+XpQueryExtension ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_Xp_XpQueryExtension=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_Xp_XpQueryExtension=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpQueryExtension" >&5
+echo "${ECHO_T}$ac_cv_lib_Xp_XpQueryExtension" >&6
+if test $ac_cv_lib_Xp_XpQueryExtension = yes; then
+ have_xp_ext=yes; MOTIF_LIBS="$MOTIF_LIBS -lXp"
+else
+ true
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LDFLAGS="$ac_save_LDFLAGS"
+# LIBS="$ac_save_LIBS"
+
+fi
+
+
+###############################################################################
+#
+# Checking whether Motif requires -lXintl (for _Xsetlocale.)
+#
+###############################################################################
+
+have_xintl=no
+if test "$have_motif" = yes ; then
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_save_LDFLAGS="$LDFLAGS"
+# ac_save_LIBS="$LIBS"
+
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ # note: $X_CFLAGS includes $x_includes
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ if test \! -z "$libdir" ; then
+ LDFLAGS="$LDFLAGS -L$libdir"
+ fi
+ # note: $X_LIBS includes $x_libraries
+ LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
+
+ echo "$as_me:$LINENO: checking for _Xsetlocale in -lXintl" >&5
+echo $ECHO_N "checking for _Xsetlocale in -lXintl... $ECHO_C" >&6
+if test "${ac_cv_lib_Xintl__Xsetlocale+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXintl -lX11 -lXext -lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"