summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in41
1 files changed, 26 insertions, 15 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 1e18a59..168d3d5 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.107 2005/05/29 07:53:09 das Exp $
+# RCS: @(#) $Id: configure.in,v 1.108 2005/06/02 10:08:06 rmax Exp $
AC_INIT([tk],[8.5])
AC_PREREQ(2.57)
@@ -210,7 +210,9 @@ fi
#--------------------------------------------------------------------
if test "`uname -s`" = "Darwin" ; then
- AC_ARG_ENABLE(aqua, [ --enable-aqua enable Aqua windowingsystem on Mac OS X [--disable-aqua]],
+ AC_ARG_ENABLE(aqua,
+ AC_HELP_STRING([--enable-aqua],
+ [enable Aqua windowingsystem on Mac OS X (default: off)]),
[tk_aqua=$enableval], [tk_aqua=no])
if test $tk_aqua = yes; then
if test $tcl_corefoundation = no; then
@@ -331,21 +333,30 @@ fi
#--------------------------------------------------------------------
if test $tk_aqua = no; then
- AC_MSG_CHECKING([for XScreenSaver support])
+
tk_oldCFlags=$CFLAGS
CFLAGS="$CFLAGS $XINCLUDES"
tk_oldLibs=$LIBS
- LIBS="$LIBS $XLIBSW -lXss -lXext"
- AC_TRY_LINK([
- #include <X11/Xlib.h>
- #include <X11/extensions/scrnsaver.h>
- ] , [
- XScreenSaverAllocInfo();
- ], [
- AC_MSG_RESULT(yes)
- XLIBSW="$XLIBSW -lXss -lXext"
- AC_DEFINE(HAVE_XSS, 1, [Is XScreenSaver available?])
- ], AC_MSG_RESULT(no))
+ LIBS="$tk_oldLibs $XLIBSW"
+ xss_header_found=no
+ AC_CHECK_HEADER(X11/extensions/scrnsaver.h, [
+ xss_header_found=yes
+ ],,[#include <X11/Xlib.h>])
+ xss_lib_found=no
+ AC_CHECK_FUNC(XScreenSaverQueryInfo,,[
+ AC_CHECK_LIB(Xext, XScreenSaverQueryInfo, [
+ XLIBSW="$XLIBSW -lXext"
+ xss_lib_found=yes
+ ], [
+ AC_CHECK_LIB(Xss,XScreenSaverQueryInfo, [
+ XLIBSW="$XLIBSW -lXss -lXext"
+ xss_lib_found=yes
+ ],, -lXext)
+ ])
+ ])
+ if test $xss_lib_found = yes -a $xss_header_found = yes; then
+ AC_DEFINE(HAVE_XSS, 1, [Is XScreenSaver available?])
+ fi
CFLAGS=$tk_oldCFlags
LIBS=$tk_oldLibs
fi
@@ -356,7 +367,7 @@ fi
if test $tk_aqua = no; then
AC_ARG_ENABLE(xft,
- [ --enable-xft Use freetype/fontconfig/xft [--disable-xft]],
+ AC_HELP_STRING([--enable-xft],[Use freetype/fontconfig/xft (default: off)]),
[enable_xft=$enableval],
[enable_xft="no"])