diff options
author | dkf <dkf@noemail.net> | 2009-07-14 08:29:36 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-07-14 08:29:36 (GMT) |
commit | 9ec10a087134f8933922dbe238aecd7abdcc0fc1 (patch) | |
tree | 9270307069eed7a16e87f4718f845f749c02cf8c | |
parent | 84317484fc1e0944280dce793c7edb3afd946460 (diff) | |
download | tk-9ec10a087134f8933922dbe238aecd7abdcc0fc1.zip tk-9ec10a087134f8933922dbe238aecd7abdcc0fc1.tar.gz tk-9ec10a087134f8933922dbe238aecd7abdcc0fc1.tar.bz2 |
Allow turning off of XScreenSaver use. [Bug 2496018]
FossilOrigin-Name: 521b07948fbec5c7658a1f79902d08dc12cdc9d6
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | unix/configure.in | 50 |
2 files changed, 36 insertions, 20 deletions
@@ -1,3 +1,9 @@ +2009-07-14 Donal K. Fellows <dkf@users.sf.net> + + * unix/configure.in: [Bug 2496018]: Allow the disabling of the use of + XScreenSaver at configuration time, so as to permit better control of + dependencies in the embedded case. + 2009-07-11 Donal K. Fellows <dkf@users.sf.net> * doc/grid.n: [Bug 2818455]: Corrected example. diff --git a/unix/configure.in b/unix/configure.in index 8106659..77c48b1 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.153.2.9 2009/04/10 18:13:06 dgp Exp $ +# RCS: @(#) $Id: configure.in,v 1.153.2.10 2009/07/14 08:29:37 dkf Exp $ AC_INIT([tk],[8.5]) AC_PREREQ(2.59) @@ -470,28 +470,38 @@ if test $tk_aqua = no; then tk_oldLibs=$LIBS 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, [ - if test "$tcl_cv_ld_weak_l" = yes; then - # On Darwin, weak link libXss if possible, - # as it is only available on Tiger or later. - XLIBSW="$XLIBSW -Wl,-weak-lXss -lXext" - else - XLIBSW="$XLIBSW -lXss -lXext" - fi + AC_MSG_CHECKING([whether to try to use XScreenSaver]) + AC_ARG_ENABLE(xss, + AC_HELP_STRING([--enable-xss], + [use XScreenSaver for activity timer (default: on)]), + [enable_xss=$enableval], [enable_xss=yes]) + if test "$enable_xss" = "no" ; then + AC_MSG_RESULT([$enable_xss]) + else + AC_MSG_RESULT([$enable_xss]) + AC_CHECK_HEADER(X11/extensions/scrnsaver.h, [ + xss_header_found=yes + ],,[#include <X11/Xlib.h>]) + AC_CHECK_FUNC(XScreenSaverQueryInfo,,[ + AC_CHECK_LIB(Xext, XScreenSaverQueryInfo, [ + XLIBSW="$XLIBSW -lXext" xss_lib_found=yes - ],, -lXext) + ], [ + AC_CHECK_LIB(Xss, XScreenSaverQueryInfo, [ + if test "$tcl_cv_ld_weak_l" = yes; then + # On Darwin, weak link libXss if possible, + # as it is only available on Tiger or later. + XLIBSW="$XLIBSW -Wl,-weak-lXss -lXext" + else + XLIBSW="$XLIBSW -lXss -lXext" + fi + xss_lib_found=yes + ],, -lXext) + ]) ]) - ]) - if test $xss_lib_found = yes -a $xss_header_found = yes; then + fi + if test $enable_xss = yes -a $xss_lib_found = yes -a $xss_header_found = yes; then AC_DEFINE(HAVE_XSS, 1, [Is XScreenSaver available?]) fi CFLAGS=$tk_oldCFlags |