freebsd-nq/crypto/heimdal/cf/check-xau.m4

65 lines
1.7 KiB
Plaintext
Raw Normal View History

2004-04-03 21:22:55 +00:00
dnl $Id: check-xau.m4,v 1.3.34.1 2004/04/01 07:27:33 joda Exp $
dnl
dnl check for Xau{Read,Write}Auth and XauFileName
dnl
2004-04-03 21:22:55 +00:00
AC_DEFUN([AC_CHECK_XAU],[
save_CFLAGS="$CFLAGS"
CFLAGS="$X_CFLAGS $CFLAGS"
save_LIBS="$LIBS"
dnl LIBS="$X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
## check for XauWriteAuth first, so we detect the case where
## XauReadAuth is in -lX11, but XauWriteAuth is only in -lXau this
## could be done by checking for XauReadAuth in -lXau first, but this
## breaks in IRIX 6.5
AC_FIND_FUNC_NO_LIBS(XauWriteAuth, X11 Xau)
ac_xxx="$LIBS"
LIBS="$LIB_XauWriteAuth $LIBS"
AC_FIND_FUNC_NO_LIBS(XauReadAuth, X11 Xau)
LIBS="$LIB_XauReadAauth $LIBS"
AC_FIND_FUNC_NO_LIBS(XauFileName, X11 Xau)
LIBS="$ac_xxx"
## set LIB_XauReadAuth to union of these tests, since this is what the
## Makefiles are using
case "$ac_cv_funclib_XauWriteAuth" in
yes) ;;
no) ;;
*) if test "$ac_cv_funclib_XauReadAuth" = yes; then
if test "$ac_cv_funclib_XauFileName" = yes; then
LIB_XauReadAuth="$LIB_XauWriteAuth"
else
LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName"
fi
else
if test "$ac_cv_funclib_XauFileName" = yes; then
LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth"
else
LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName"
fi
fi
;;
esac
if test "$AUTOMAKE" != ""; then
AM_CONDITIONAL(NEED_WRITEAUTH, test "$ac_cv_func_XauWriteAuth" != "yes")
else
AC_SUBST(NEED_WRITEAUTH_TRUE)
AC_SUBST(NEED_WRITEAUTH_FALSE)
if test "$ac_cv_func_XauWriteAuth" != "yes"; then
NEED_WRITEAUTH_TRUE=
NEED_WRITEAUTH_FALSE='#'
else
NEED_WRITEAUTH_TRUE='#'
NEED_WRITEAUTH_FALSE=
fi
fi
CFLAGS=$save_CFLAGS
LIBS=$save_LIBS
LDFLAGS=$save_LDFLAGS
])