143
164
###############################################################################
166
# Function to figure out how to turn off Objective C on MacOS X.
167
# (We have to do this to work around an Apple-specific gcc bug.)
169
###############################################################################
171
AC_DEFUN(AC_GCC_ACCEPTS_NO_CPP_PRECOMP,
172
[if test -n "$GCC"; then
173
AC_CACHE_CHECK([whether gcc accepts -no-cpp-precomp],
174
ac_cv_gcc_accepts_no_cpp_precomp,
175
[if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
176
grep unrecognized >/dev/null ); then
177
ac_cv_gcc_accepts_no_cpp_precomp=no
179
ac_cv_gcc_accepts_no_cpp_precomp=yes
181
ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
185
AC_DEFUN(AC_NO_OBJECTIVE_C,
186
[if test -n "$GCC"; then
187
AC_GCC_ACCEPTS_NO_CPP_PRECOMP
188
if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
189
AC_MSG_RESULT(Disabling Objective C extensions in ANSI C code.)
190
CC="$CC -no-cpp-precomp"
196
###############################################################################
145
198
# Function to figure out how to create directory trees.
147
200
###############################################################################
149
202
AC_DEFUN(AC_PROG_INSTALL_DIRS,
150
[AC_CACHE_CHECK([whether \"\${INSTALL} -d\" creates intermediate directories],
203
[AC_CACHE_CHECK([whether "\${INSTALL} -d" creates intermediate directories],
151
204
ac_cv_install_d_creates_dirs,
152
205
[ac_cv_install_d_creates_dirs=no
153
206
rm -rf conftestdir
154
207
if mkdir conftestdir; then
156
${INSTALL} -d `pwd`/dir1/dir2 >&- 2>&-
208
cd conftestdir 2>/dev/null
209
${INSTALL} -d `pwd`/dir1/dir2 >/dev/null 2>&1
157
210
if test -d dir1/dir2/. ; then
158
211
ac_cv_install_d_creates_dirs=yes
161
214
rm -rf conftestdir
165
218
if test "$ac_cv_install_d_creates_dirs" = no ; then
166
AC_CACHE_CHECK([whether \"mkdir -p\" creates intermediate directories],
219
AC_CACHE_CHECK([whether "mkdir -p" creates intermediate directories],
167
220
ac_cv_mkdir_p_creates_dirs,
168
221
[ac_cv_mkdir_p_creates_dirs=no
169
222
rm -rf conftestdir
170
223
if mkdir conftestdir; then
172
mkdir -p dir1/dir2 >&- 2>&-
224
cd conftestdir 2>/dev/null
225
mkdir -p dir1/dir2 >/dev/null 2>&1
173
226
if test -d dir1/dir2/. ; then
174
227
ac_cv_mkdir_p_creates_dirs=yes
177
230
rm -rf conftestdir
862
955
###############################################################################
864
# Handle the --enable-subdir option
957
# Handle the --with-hackdir option
866
959
###############################################################################
868
AC_ARG_ENABLE(subdir,[
962
with_hackdir_req=unspecified
963
AC_ARG_WITH(hackdir,[
869
965
Installation options:
871
--enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
872
instead of putting them in bindir itself. You can
873
specify the name of the subdirectory. For example,
874
\`--exec-prefix=/usr/local --enable-subdir=demos'
875
would put xscreensaver in /usr/local/bin/, and would
876
put the demos in /usr/local/bin/demos/. (If DIR
877
begins with /, then bindir will not be prepended.)
879
--disable-subdir Just put the demos in \`bindir' (this is the default.)
881
[enable_subdir="$enableval"],[enable_subdir=no])
882
if test x"$enable_subdir" = xno; then
966
--with-hackdir=DIR Where to install the hundreds of demo executables.
967
Default: `EPREFIX/lib/xscreensaver/'],
968
[with_hackdir="$withval"; with_hackdir_req="$withval"],[with_hackdir=yes])
970
if test x"$with_hackdir" = xyes; then
971
HACKDIR='${libexecdir}/xscreensaver'
972
elif test x"$with_hackdir" = xno; then
883
973
HACKDIR='${bindir}'
884
elif test x"$enable_subdir" = xyes -o x"$enable_subdir" = x ; then
885
echo "error: must be a subdirectory name: --enable-subdir=$enable_subdir"
975
HACKDIR=$with_hackdir
978
# canonicalize slashes.
979
HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
981
# This option used to be called --enable-subdir; make sure that is no longer
982
# used, since configure brain-damagedly ignores unknown --enable options.
985
AC_ARG_ENABLE(subdir,,[obsolete_enable=yes])
986
if test -n "$obsolete_enable"; then
987
echo "error: the --enable-subdir option has been replaced with"
988
echo " the new --with-hackdir option; see \`configure --help'"
989
echo " for more information."
994
###############################################################################
996
# Handle the --with-configdir option
998
###############################################################################
1001
with_configdir_req=unspecified
1002
AC_ARG_WITH(configdir,
1003
[ --with-configdir=DIR Where to install the data files that describe each
1004
of the display modes to the GUI.
1005
Default: `PREFIX/share/xscreensaver/config/'
1007
[with_configdir="$withval"; with_configdir_req="$withval"],
1008
[with_configdir=yes])
1010
if test x"$with_configdir" = xyes; then
1011
HACK_CONF_DIR='${datadir}/xscreensaver/config'
1012
elif test x"$with_configdir" = xno; then
1013
echo "error: must be yes, or a pathname: --with-configdir=$with_configdir"
888
1016
# there must be a better way than this...
889
if test -z "`echo $enable_subdir | sed 's@^/.*@@'`" ; then
1017
if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then
891
HACKDIR=$enable_subdir
1019
HACK_CONF_DIR=$with_configdir
894
HACKDIR='${bindir}/'$enable_subdir
1022
HACK_CONF_DIR="\${exec_prefix}$with_configdir"
898
# canonicalize slashes.
899
HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'`
902
1029
###############################################################################
940
1068
###############################################################################
942
# Check for the MIT-SCREEN-SAVER server extension.
944
###############################################################################
947
with_mit_req=unspecified
949
[ --with-mit-ext Include support for the MIT-SCREEN-SAVER extension.],
950
[with_mit="$withval"; with_mit_req="$withval"],[with_mit=yes])
952
HANDLE_X_PATH_ARG(with_mit, --with-mit-ext, MIT-SCREEN-SAVER)
954
if test "$with_mit" = yes; then
955
AC_CHECK_X_HEADER(X11/extensions/scrnsaver.h, [have_mit=yes])
957
# Now check to see if it's really in the library; XF86Free-3.3 ships
958
# scrnsaver.h, but doesn't include the code in libXext.a, the idiots!
960
if test "$have_mit" = yes; then
961
AC_CHECK_X_LIB(Xext, XScreenSaverRegister, [true], [have_mit=no], -lm)
963
if test "$have_mit" = no; then
964
# Fuck! Looks like XF86Free-3.3 actually puts it in XExExt instead
965
# of in Xext. Thank you master, may I have another.
966
AC_CHECK_X_LIB(XExExt, XScreenSaverRegister,
967
[have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXExExt"],
968
[true], -lX11 -lXext -lm)
971
if test "$have_mit" = no; then
972
# Double fuck! Looks like some versions of XFree86 (whichever version
973
# it is that comes with RedHat Linux 2.0 -- I can't find a version
974
# number) put this garbage in Xss instead of Xext. Thank you master,
975
# may I have another.
976
AC_CHECK_X_LIB(Xss, XScreenSaverRegister,
977
[have_mit=yes; SAVER_LIBS="$SAVER_LIBS -lXss"],
978
[true], -lX11 -lXext -lm)
981
if test "$have_mit" = yes; then
982
AC_DEFINE(HAVE_MIT_SAVER_EXTENSION)
987
elif test "$with_mit" != no; then
988
echo "error: must be yes or no: --with-mit-ext=$with_mit"
993
###############################################################################
995
1070
# Check for the XIDLE server extension.
997
1072
###############################################################################
1101
1180
###############################################################################
1182
# Check for the XINERAMA server extension.
1184
###############################################################################
1187
with_xinerama_req=unspecified
1188
AC_ARG_WITH(xinerama-ext,
1189
[ --with-xinerama-ext Include support for the XINERAMA extension.],
1190
[with_xinerama="$withval"; with_xinerama_req="$withval"],[with_xinerama=yes])
1192
HANDLE_X_PATH_ARG(with_xinerama, --with-xinerama-ext, XINERAMA)
1194
if test "$with_xinerama" = yes; then
1196
# first check for Xinerama.h
1197
AC_CHECK_X_HEADER(X11/extensions/Xinerama.h, [have_xinerama=yes],,
1198
[#include <X11/Xlib.h>])
1200
# if that succeeded, then check for the XINERAMA code in the libraries
1201
if test "$have_xinerama" = yes; then
1203
# first look in -lXext
1205
AC_CHECK_X_LIB(Xext, XineramaQueryScreens, [have_xinerama=yes], [true],
1208
# if that failed, look in -lXinerama (this is where it is in XFree86 4.1.)
1209
if test "$have_xinerama" = no; then
1210
AC_CHECK_X_LIB(Xinerama, XineramaQueryScreens,
1211
[have_xinerama=yes; XINERAMA_LIBS="-lXinerama"],
1212
[true], -lXext -lX11)
1216
# if that succeeded, then we've really got it.
1217
if test "$have_xinerama" = yes; then
1218
AC_DEFINE(HAVE_XINERAMA)
1221
elif test "$with_xinerama" != no; then
1222
echo "error: must be yes or no: --with-xinerama-ext=$with_xinerama"
1227
###############################################################################
1103
1229
# Check for the XF86VMODE server extension (for virtual screens.)
1105
1231
###############################################################################
1201
1333
###############################################################################
1335
# Check for the RANDR (Resize and Rotate) server extension.
1337
# We need this to detect when the resolution of the desktop
1338
# has changed out from under us (this is a newer, different
1339
# mechanism than the XF86VMODE virtual viewports.)
1341
###############################################################################
1344
with_randr_req=unspecified
1345
AC_ARG_WITH(randr-ext,
1346
[ --with-randr-ext Include support for the X Resize+Rotate extension.],
1347
[with_randr="$withval"; with_randr_req="$withval"],[with_randr=yes])
1349
HANDLE_X_PATH_ARG(with_randr, --with-randr-ext, RANDR)
1351
if test "$with_randr" = yes; then
1353
# first check for Randr.h
1354
AC_CHECK_X_HEADER(X11/extensions/Xrandr.h, [have_randr=yes],,
1355
[#include <X11/Xlib.h>])
1357
# if that succeeded, then check for the XRR code in the libraries
1358
if test "$have_randr" = yes; then
1360
# RANDR probably needs -lXrender
1362
AC_CHECK_X_LIB(Xrender, XRenderSetSubpixelOrder,
1363
[xrender_libs="-lXrender"], [true], -lXext -lX11)
1365
# first look for RANDR in -lXext
1367
AC_CHECK_X_LIB(Xext, XRRGetScreenInfo,
1368
[have_randr=yes; SAVER_LIBS="$SAVER_LIBS $xrender_libs"],
1369
[true], $xrender_libs -lXext -lX11)
1371
# if that failed, look in -lXrandr
1372
if test "$have_randr" = no; then
1373
AC_CHECK_X_LIB(Xrandr, XRRGetScreenInfo,
1374
[have_randr=yes; SAVER_LIBS="$SAVER_LIBS -lXrandr $xrender_libs"],
1375
[true], $xrender_libs -lXext -lX11)
1379
# if that succeeded, then we've really got it.
1380
if test "$have_randr" = yes; then
1381
AC_DEFINE(HAVE_RANDR)
1384
elif test "$with_randr" != no; then
1385
echo "error: must be yes or no: --with-randr-ext=$with_randr"
1390
###############################################################################
1392
# Check for XF86MiscSetGrabKeysState (but only bother if we are already
1393
# using other XF86 stuff.)
1395
###############################################################################
1397
have_xf86miscsetgrabkeysstate=no
1398
if test "$have_xf86gamma" = yes -o "$have_xf86vmode" = yes; then
1399
AC_CHECK_X_LIB(Xxf86misc, XF86MiscSetGrabKeysState,
1400
[have_xf86miscsetgrabkeysstate=yes],
1401
[true], -lXext -lX11)
1402
if test "$have_xf86miscsetgrabkeysstate" = yes ; then
1403
SAVER_LIBS="$SAVER_LIBS -lXxf86misc"
1404
AC_DEFINE(HAVE_XF86MISCSETGRABKEYSSTATE)
1409
###############################################################################
1203
1411
# Check for HP XHPDisableReset and XHPEnableReset.
1205
1413
###############################################################################
1415
AC_MSG_CHECKING([for XHPDisableReset in X11/XHPlib.h])
1207
1416
AC_EGREP_X_HEADER(XHPDisableReset, X11/XHPlib.h,
1208
1417
[AC_DEFINE(HAVE_XHPDISABLERESET)
1209
SAVER_LIBS="-lXhp11 $SAVER_LIBS"])
1418
SAVER_LIBS="-lXhp11 $SAVER_LIBS"
1419
AC_MSG_RESULT(yes)],
1420
[AC_MSG_RESULT(no)])
1212
1423
###############################################################################
1413
1636
if test "$ac_cv_kerberos5" = yes ; then
1416
AC_DEFINE(HAVE_KERBEROS)
1417
AC_DEFINE(HAVE_KERBEROS5)
1638
# Andrew Snare <ajs@pigpond.com> wrote:
1640
# You were assuming that if kerberosV (krb5) was found, then kerberosIV
1641
# (krb4) was also available. This turns out not to be the case with
1642
# mit-krb-1.2.7; apparently backwards-compatibility with KerberosIV
1645
# So, disable kerberosV support if libkrb4 can't be found.
1646
# This is not the best solution, but it makes the compile not fail.
1648
AC_CHECK_X_LIB(krb4, krb_get_tf_realm,
1649
[have_kerberos=yes],
1651
if test "$have_kerberos" = yes ; then
1653
AC_DEFINE(HAVE_KERBEROS)
1654
AC_DEFINE(HAVE_KERBEROS5)
1657
AC_MSG_WARN([Cannot find compat lib (libkrb4) needed to use Kerberos 5])
1420
1662
if test "$have_kerberos5" = yes ; then
1421
1663
# from Matt Knopp <mhat@infocalypse.netlag.com>
1422
1664
# (who got it from amu@mit.edu)
1423
PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcrypt -lcom_err"
1666
PASSWD_LIBS="$PASSWD_LIBS -lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
1668
# jwz: MacOS X uses -lkrb5, but not -lcrypt
1669
AC_CHECK_X_LIB(crypt, crypt, [PASSWD_LIBS="$PASSWD_LIBS -lcrypt"])
1424
1671
elif test "$have_kerberos" = yes ; then
1425
# from Tim Showalter <tjs+@andrew.cmu.edu>
1426
PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
1672
# from Tim Showalter <tjs@psaux.com> for FreeBSD 4.2
1673
PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes -lcom_err"
1429
1676
if test "$have_kerberos" = yes ; then
1654
1901
###############################################################################
1658
###############################################################################
1661
with_motif_req=unspecified
1663
User interface options:
1665
--with-motif Use the Motif toolkit for the user interface.],
1666
[with_motif="$withval"; with_motif_req="$withval"],[with_motif=yes])
1668
HANDLE_X_PATH_ARG(with_motif, --with-motif, Motif)
1670
if test "$with_motif" != yes -a "$with_motif" != no ; then
1671
echo "error: must be yes or no: --with-motif=$with_motif"
1675
if test "$with_motif" = yes; then
1677
AC_CHECK_X_HEADER(Xm/Xm.h,
1679
AC_DEFINE(HAVE_MOTIF)
1680
MOTIF_LIBS="$MOTIF_LIBS -lXm"])
1684
if test "$have_motif" = yes; then
1685
AC_CHECK_X_HEADER(Xm/ComboBox.h, [AC_DEFINE(HAVE_XMCOMBOBOX)])
1903
# Check for external password helper
1904
# On SuSE, instead of having xscreensaver be a setuid program, they
1905
# fork an external program that takes the password on stdin, and
1906
# returns true if that password is a valid one. Then only that
1907
# smaller program needs to be setuid.
1909
# (Note that this external program is not a GUI: the GUI is still
1910
# all in xscreensaver itself; the external program just does auth.)
1912
###############################################################################
1914
have_passwd_helper=no
1915
with_passwd_helper_req=unspecified
1917
AC_ARG_WITH(passwd-helper,
1918
[ --with-passwd-helper Include support for an external password
1919
verification helper program.],
1920
[with_passwd_helper="$withval"; with_passwd_helper_req="$withval"],[with_passwd_helper=no])
1921
# no HANDLE_X_PATH_ARG for this one
1923
if test "$enable_locking" = no ; then
1924
with_passwd_helper_req=no
1925
with_passwd_helper=no
1928
case "$with_passwd_helper" in
1931
AC_DEFINE_UNQUOTED(PASSWD_HELPER_PROGRAM, "$with_passwd_helper")
1932
have_passwd_helper=yes;;
1934
echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2
1939
###############################################################################
1941
# Check for a login manager for a "New Login" button on the lock dialog.
1942
# Usually this will be "/usr/bin/gdmflexiserver".
1944
###############################################################################
1946
have_login_manager=no
1947
with_login_manager_req=unspecified
1948
default_login_manager='gdmflexiserver -sl'
1950
AC_ARG_WITH(login-manager,
1951
[ --with-login-manager Put a "New Login" button on the unlock dialog that
1952
runs a login manager such as gdmflexiserver.],
1953
[with_login_manager="$withval"; with_login_manager_req="$withval"],
1954
[with_login_manager=no])
1955
# no HANDLE_X_PATH_ARG for this one
1957
if test "$enable_locking" = no ; then
1958
with_login_manager_req=no
1959
with_login_manager=no
1962
if test -n "$with_login_manager_req" ; then
1963
ac_cv_login_manager_program=""
1965
if test "$with_login_manager_req" = "yes" ; then
1966
with_login_manager=$default_login_manager
1969
# case "$with_login_manager_req" in
1972
# set dummy $with_login_manager_req ; login_manager_tmp=$2
1973
# AC_MSG_CHECKING([for $login_manager_tmp])
1974
# if test -x "$login_manager_tmp" ; then
1975
# AC_MSG_RESULT(yes)
1976
# with_login_manager="$login_manager_tmp"
1979
# with_login_manager=""
1984
# set dummy $with_login_manager_req ; login_manager_tmp=$2
1986
# unset ac_cv_path_login_manager_tmp
1987
# AC_PATH_PROG(login_manager_tmp, $login_manager_tmp, [])
1988
# if test -z "$login_manager_tmp" ; then
1989
# with_login_manager=""
1991
# with_login_manager="$login_manager_tmp"
1995
ac_cv_login_manager_program="$with_login_manager"
1997
elif test -n "$ac_cv_login_manager_program"; then
1998
AC_MSG_RESULT([checking for login_manager... (cached) $ac_cv_login_manager_program])
2001
NEW_LOGIN_COMMAND_P=''
2002
NEW_LOGIN_COMMAND="$ac_cv_login_manager_program"
2004
if test -z "$NEW_LOGIN_COMMAND" ; then
2005
NEW_LOGIN_COMMAND="$default_login_manager"
2006
NEW_LOGIN_COMMAND_P='! '
1689
2011
###############################################################################
1720
with_gnome_req=unspecified
1722
[ --with-gnome Include support for the Gnome Control Center.],
1723
[with_gnome="$withval"; with_gnome_req="$withval"],[with_gnome=yes])
1725
# if --with-gnome=/directory/ was specified, remember that directory so that
1726
# we can also look for the `gnome-config' program in that directory.
1727
case "$with_gnome" in
1729
gnome_dir="$with_gnome"
1736
HANDLE_X_PATH_ARG(with_gnome, --with-gnome, Gnome)
1738
if test "$with_gnome" != yes -a "$with_gnome" != no ; then
1739
echo "error: must be yes or no: --with-gnome=$with_gnome"
2044
parse_gtk_version_string() {
2047
maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
2048
min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
2050
ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
2051
if test -z "$ac_gtk_version"; then
2052
ac_gtk_version=unknown
2053
ac_gtk_version_string=unknown
2057
# Find pkg-config... (need this for both gtk and gdk_pixbuf.)
2058
# if the user specified --with-gtk=/foo/ then look there.
2061
if test ! -z "$gtk_dir"; then
2062
# canonicalize slashes.
2063
foo=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
2064
gtk_path="$foo:$gtk_path"
2067
AC_PATH_PROGS(pkg_config, pkg-config,, $gtk_path)
2069
if test -z "$pkg_config" ; then
2070
AC_MSG_WARN([pkg-config not found!])
2075
# Utility function for running pkg-config-based tests...
2078
pkg_check_version() {
2079
if test "$ok" = yes ; then
2082
AC_MSG_CHECKING(for $req)
2083
if $pkg_config --exists "$req" ; then
2084
vers=`$pkg_config --modversion "$req"`
2085
if $pkg_config --exists "$req >= $min" ; then
2086
AC_MSG_RESULT($vers)
2090
AC_MSG_RESULT($vers (wanted >= $min))
1744
2103
jurassic_gtk=no
1745
2106
if test "$with_gtk" = yes; then
1748
# if the user specified --with-gtk=/foo/ then look in /foo/bin/
1749
# for glib-config and gtk-config.
1753
if test ! -z "$gtk_dir"; then
1754
# canonicalize slashes.
1755
gtk_dir=`echo "${gtk_dir}/bin" | sed 's@//*@/@g'`
1756
gtk_path="$gtk_dir:$gtk_path"
1759
if test ! -z "gnome_dir"; then
1760
# canonicalize slashes.
1761
gnome_dir=`echo "${gnome_dir}/bin" | sed 's@//*@/@g'`
1762
gtk_path="$gnome_dir:$gtk_path"
1765
AC_PATH_PROGS(glib_config, glib12-config glib-config,, $gtk_path)
1766
AC_PATH_PROGS(gtk_config, gtk12-config gtk-config,, $gtk_path)
1768
if test "$with_gnome" = yes; then
1769
AC_PATH_PROGS(gnome_config, gnome-config,, $gtk_path)
1772
if test -n "$glib_config" -a -n "gtk_config" ; then
1774
if test "$with_gnome" = yes -a -n "$gnome_config" ; then
2110
pkg_check_version gtk+-2.0 2.0.1 ; ac_gtk_version_string="$vers"
2111
pkg_check_version gmodule-2.0 2.0.0
2112
pkg_check_version libxml-2.0 2.4.6
2113
pkg_check_version libglade-2.0 1.99.0
2114
pkg_check_version gdk-pixbuf-2.0 2.0.0
2115
pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
2118
if test "$have_gtk" = no; then
2119
if test -n "$ac_gtk_version_string" ; then
2120
gtk_halfassed="$ac_gtk_version_string"
2121
gtk_halfassed_lib="$req"
1779
2125
if test "$have_gtk" = yes; then
1780
AC_CACHE_CHECK([Gtk version number], ac_cv_gtk_version_string,
1781
[ac_cv_gtk_version_string=`$gtk_config --version`])
1782
ac_gtk_version_string=$ac_cv_gtk_version_string
1785
maj=`echo $ac_gtk_version_string | sed -n 's/\..*//p'`
1786
min=`echo $ac_gtk_version_string | sed -n 's/[^.]*\.\([^.]*\).*/\1/p'`
1788
ac_gtk_version=`echo "$maj * 1000 + $min" | bc`
1789
if test -z "$ac_gtk_version"; then
1790
ac_gtk_version=unknown
1791
ac_gtk_version_string=unknown
1793
if test "$ac_gtk_version" = "unknown" || test "$ac_gtk_version" -lt 1002
2126
parse_gtk_version_string
1801
2130
if test "$have_gtk" = yes; then
1802
2131
AC_CACHE_CHECK([for Gtk includes], ac_cv_gtk_config_cflags,
1803
[ac_cv_gtk_config_cflags=`$gtk_config --cflags`])
2132
[ac_cv_gtk_config_cflags=`$pkg_config --cflags $pkgs`])
1804
2133
AC_CACHE_CHECK([for Gtk libs], ac_cv_gtk_config_libs,
1805
[ac_cv_gtk_config_libs=`$gtk_config --libs`])
2134
[ac_cv_gtk_config_libs=`$pkg_config --libs $pkgs`])
1807
2136
ac_gtk_config_cflags=$ac_cv_gtk_config_cflags
1808
2137
ac_gtk_config_libs=$ac_cv_gtk_config_libs
1810
# Check for Gnome Capplet support.
1812
if test "$have_gnome" = yes -a "$have_gtk" = yes; then
1813
gnome_config_libs="gtk capplet gnomeui"
1814
AC_MSG_CHECKING(for Gnome capplet includes)
1815
AC_CACHE_VAL(ac_cv_gnome_config_cflags,
1816
[if ( $gnome_config --cflags $gnome_config_libs 2>&1 >/dev/null | \
1817
grep Unknown >/dev/null ) ; then
1818
ac_cv_gnome_config_cflags=''
1820
ac_cv_gnome_config_cflags=`$gnome_config --cflags $gnome_config_libs`
1822
ac_gnome_config_cflags=$ac_cv_gnome_config_cflags
1823
if test "$ac_gnome_config_cflags" = "" ; then
1827
AC_MSG_RESULT($ac_gnome_config_cflags)
1831
if test "$have_gnome" = yes -a "$have_gtk" = yes; then
1832
AC_MSG_CHECKING(for Gnome capplet libs)
1833
AC_CACHE_VAL(ac_cv_gnome_config_libs,
1834
[if ( $gnome_config --libs $gnome_config_libs 2>&1 >/dev/null |
1835
grep Unknown >/dev/null ) ; then
1836
ac_cv_gnome_config_libs=''
1838
ac_cv_gnome_config_libs=`$gnome_config --libs $gnome_config_libs`
1840
ac_gnome_config_libs=$ac_cv_gnome_config_libs
1841
if test "$ac_gnome_config_libs" = "" ; then
1845
AC_MSG_RESULT($ac_gnome_config_libs)
1850
if test "$have_gnome" = yes -a "$have_gtk" = yes; then
1851
GNOME_DATADIR=`$gnome_config --datadir`
1855
# If we have Gnome, then override the gtk-config values with
1856
# the gnome-config values.
1858
if test "$have_gnome" = yes -a "$have_gtk" = yes; then
1859
ac_gtk_config_cflags=$ac_gnome_config_cflags
1860
ac_gtk_config_libs=$ac_gnome_config_libs
1861
AC_DEFINE(HAVE_CRAPPLET)
2141
if test "$have_gtk" = yes; then
2142
GTK_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
2143
GTK_DATADIR="$GTK_DATADIR/share"
1865
2146
if test "$have_gtk" = yes; then
1866
2147
INCLUDES="$INCLUDES $ac_gtk_config_cflags"
1867
2148
GTK_LIBS="$GTK_LIBS $ac_gtk_config_libs"
1868
2149
AC_DEFINE(HAVE_GTK)
2150
AC_DEFINE(HAVE_GTK2)
1874
# Check for the Gnome Help Browser.
1876
if test "$have_gnome" = yes; then
1877
AC_CHECK_PROG(have_gnome_help, gnome-help-browser, yes, no)
2157
# Check for the various Gnome help and URL loading programs.
2159
if test "$have_gtk" = yes; then
2160
AC_CHECK_PROGS(gnome_open_program, gnome-open)
2161
AC_CHECK_PROGS(gnome_url_show_program, gnome-url-show)
2165
###############################################################################
2169
###############################################################################
2172
with_motif_req=unspecified
2173
AC_ARG_WITH(motif,[ --with-motif Use the Motif toolkit for the user interface
2174
(not recommended.)],
2175
[with_motif="$withval"; with_motif_req="$withval"],[with_motif=no])
2177
HANDLE_X_PATH_ARG(with_motif, --with-motif, Motif)
2179
if test "$with_motif" != yes -a "$with_motif" != no ; then
2180
echo "error: must be yes or no: --with-motif=$with_motif"
2184
if test "$with_motif" = yes; then
2186
AC_CHECK_X_HEADER(Xm/Xm.h,
2188
AC_DEFINE(HAVE_MOTIF)
2189
MOTIF_LIBS="$MOTIF_LIBS -lXm"],,
2190
[#include <stdlib.h>
2192
#include <X11/Intrinsic.h>])
2196
if test "$have_motif" = yes; then
2197
AC_CHECK_X_HEADER(Xm/ComboBox.h, [AC_DEFINE(HAVE_XMCOMBOBOX)],,
2198
[#include <stdlib.h>
2200
#include <X11/Intrinsic.h>])
2126
2448
#include <GL/gl.h>
2127
2449
#ifndef MESA_MAJOR_VERSION
2128
2450
# include <GL/xmesa.h>
2129
# define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
2130
# define MESA_MINOR_VERSION XMESA_MINOR_VERSION
2451
# ifdef XMESA_MAJOR_VERSION
2452
/* Around Mesa 3.2, they took out the Mesa version number, so instead,
2453
we have to check the XMesa version number (the number of the X protocol
2454
support, which seems to be the same as the Mesa version number.)
2456
# define MESA_MAJOR_VERSION XMESA_MAJOR_VERSION
2457
# define MESA_MINOR_VERSION XMESA_MINOR_VERSION
2459
/* Oh great. Some time after 3.4, they took out the xmesa.h header file,
2460
so we have no way of telling what version of Mesa this is at all.
2461
So, we'll guess that the osmesa version (the "offscreen protocol")
2462
is less than or equal to the real mesa version number. Except that
2463
if OSmesa is 3.3, assume at least Mesa 3.4, since OSmesa was 3.3 in
2464
Mesa 3.4. And Mesa 3.3 had xmesa.h. What a complete load of shit!
2466
# include <GL/osmesa.h>
2467
# define MESA_MAJOR_VERSION OSMESA_MAJOR_VERSION
2468
# define MESA_MINOR_VERSION OSMESA_MINOR_VERSION or newer, probably?
2469
# if OSMESA_MAJOR_VERSION == 3 && OSMESA_MINOR_VERSION == 3
2470
# undef MESA_MINOR_VERSION
2471
# define MESA_MINOR_VERSION 4 or newer, probably?
2132
2475
configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
2618
###############################################################################
2620
# Check for -lgdk_pixbuf.
2621
# These tests are for gdk_pixbuf usage of the hacks,
2622
# not xscreensaver-demo (thus we have to test again to get
2623
# the libraries right: don't want to pull in all of GTK
2626
###############################################################################
2629
with_gdk_pixbuf_req=unspecified
2631
[ --with-pixbuf Include support for the GDK-Pixbuf library in some
2632
demos, which will make it possible for them to read
2633
GIF, JPEG, and PNG files as well.],
2634
[with_gdk_pixbuf="$withval"; with_gdk_pixbuf_req="$withval"],
2635
[with_gdk_pixbuf=yes])
2637
# if --with-pixbuf=/directory/ was specified, remember that directory so that
2638
# we can also look for the `gdk-pixbuf-config' program in that directory.
2639
case "$with_gdk_pixbuf" in
2641
gdk_pixbuf_dir="$with_gdk_pixbuf"
2648
HANDLE_X_PATH_ARG(with_gdk_pixbuf, --with-pixbuf, GDK_PIXBUF)
2650
if test "$with_gdk_pixbuf" != yes -a "$with_gdk_pixbuf" != no ; then
2651
echo "error: must be yes or no: --with-pixbuf=$with_gdk_pixbuf"
2655
if test "$with_gdk_pixbuf" = yes; then
2661
pkg_check_version gdk-pixbuf-2.0 2.0.0
2662
pkg_check_version gdk-pixbuf-xlib-2.0 2.0.0
2663
have_gdk_pixbuf="$ok"
2665
if test "$have_gdk_pixbuf" = yes; then
2666
AC_CACHE_CHECK([for gdk-pixbuf includes], ac_cv_gdk_pixbuf_config_cflags,
2667
[ac_cv_gdk_pixbuf_config_cflags=`$pkg_config --cflags $pkgs`])
2668
AC_CACHE_CHECK([for gdk-pixbuf libs], ac_cv_gdk_pixbuf_config_libs,
2669
[ac_cv_gdk_pixbuf_config_libs=`$pkg_config --libs $pkgs`])
2671
ac_gdk_pixbuf_config_cflags=$ac_cv_gdk_pixbuf_config_cflags
2672
ac_gdk_pixbuf_config_libs=$ac_cv_gdk_pixbuf_config_libs
2675
if test "$have_gdk_pixbuf" = yes; then
2677
# we appear to have pixbuf; check for headers/libs to be sure.
2679
ac_save_gdk_pixbuf_CPPFLAGS="$CPPFLAGS"
2680
CPPFLAGS="$CPPFLAGS $ac_gdk_pixbuf_config_cflags"
2684
# check for header A...
2685
AC_CHECK_X_HEADER(gdk-pixbuf/gdk-pixbuf.h, [have_gdk_pixbuf=yes])
2687
# if that worked, check for header B...
2688
if test "$have_gdk_pixbuf" = yes; then
2690
gdk_pixbuf_halfassed=yes
2691
AC_CHECK_X_HEADER(gdk-pixbuf/gdk-pixbuf-xlib.h,
2692
[have_gdk_pixbuf=yes
2693
gdk_pixbuf_halfassed=no])
2695
# yay, it has a new name in Gtk 2.x...
2696
if test "$have_gdk_pixbuf" = no; then
2698
gdk_pixbuf_halfassed=yes
2699
AC_CHECK_X_HEADER(gdk-pixbuf-xlib/gdk-pixbuf-xlib.h,
2700
[have_gdk_pixbuf=yes
2701
gdk_pixbuf_halfassed=no])
2704
CPPFLAGS="$ac_save_gdk_pixbuf_CPPFLAGS"
2707
if test "$have_gdk_pixbuf" = yes; then
2708
# we have the headers, now check for the libraries
2710
gdk_pixbuf_halfassed=yes
2712
AC_MSG_RESULT(checking for gdk_pixbuf usability...)
2715
AC_CHECK_X_LIB(c, gdk_pixbuf_new_from_file, [have_gdk_pixbuf=yes],,
2716
$ac_gdk_pixbuf_config_libs -lX11 -lXext -lm)
2718
if test "$have_gdk_pixbuf" = yes; then
2720
AC_CHECK_X_LIB(c, gdk_pixbuf_xlib_init,
2721
[have_gdk_pixbuf=yes
2722
gdk_pixbuf_halfassed=no],,
2723
$ac_gdk_pixbuf_config_libs -lX11 -lXext -lm)
2727
if test "$have_gdk_pixbuf" = yes; then
2728
INCLUDES="$INCLUDES $ac_gdk_pixbuf_config_cflags"
2729
XPM_LIBS="$ac_gdk_pixbuf_config_libs"
2730
AC_DEFINE(HAVE_GDK_PIXBUF)
2732
AC_MSG_RESULT(checking for gdk_pixbuf usability... no)
2266
2737
###############################################################################
2300
2773
###############################################################################
2777
###############################################################################
2780
with_jpeg_req=unspecified
2783
[ --with-jpeg Include support for the JPEG library.],
2784
[with_jpeg="$withval"; with_jpeg_req="$withval"],
2787
HANDLE_X_PATH_ARG(with_jpeg, --with-jpeg, JPEG)
2789
if test "$with_jpeg" != yes -a "$with_jpeg" != no ; then
2790
echo "error: must be yes or no: --with-jpeg=$with_jpeg"
2794
if test "$with_jpeg" = yes; then
2797
AC_CHECK_X_HEADER(jpeglib.h, [have_jpeg=yes])
2799
if test "$have_jpeg" = yes; then
2800
# we have the header, now check for the library
2803
AC_CHECK_X_LIB(jpeg, jpeg_start_compress,
2807
AC_DEFINE(HAVE_JPEGLIB)])
2812
###############################################################################
2814
# Check for pty support for 'phosphor'
2816
###############################################################################
2819
AC_CHECK_HEADERS(pty.h util.h)
2820
AC_CHECK_X_LIB(util, forkpty,
2822
AC_DEFINE(HAVE_FORKPTY)])
2825
###############################################################################
2302
2827
# Check for the XSHM server extension.
2304
2829
###############################################################################
2414
2942
###############################################################################
2416
# Check for a program to generate random text.
2418
# Zippy is funnier than the idiocy generally spat out by `fortune',
2419
# so try to find that, by invoking Emacs and asking it where its
2420
# libexec directory is ("yow" lives in there.)
2422
# If that doesn't work, see if fortune, zippy, or yow are on $PATH,
2423
# and if so, use them.
2425
# If that doesn't work, look in /usr/games, and if it's there, use
2426
# the full pathname.
2944
# Check for a directory full of images to use as the default value
2945
# of the "imageDirectory" preference.
2428
2947
###############################################################################
2432
--with-zippy=PROGRAM Some demos are able to run an external program and
2433
display its text; this names the program to use by
2434
default (though it can be overridden with X
2435
resources.) If you don't specify this, the default
2436
is to use \"yow\" from the Emacs distribution (if you
2437
have it) or else to use \"fortune\".],
2438
[with_zippy_req="$withval"; with_zippy="$withval"],[with_zippy=yes])
2440
if test "$with_zippy" = no || test "$with_zippy" = yes ; then
2445
if test -n "$with_zippy_req" ; then
2446
ac_cv_zippy_program=""
2447
case "$with_zippy_req" in
2449
AC_MSG_CHECKING([for $with_zippy_req])
2450
if test -x "$with_zippy_req" ; then
2459
unset ac_cv_path_zip2
2460
AC_PATH_PROG(zip2, $with_zippy_req, [])
2461
if test "$zip2" = ""; then
2466
ac_cv_zippy_program="$with_zippy"
2468
elif test -n "$ac_cv_zippy_program"; then
2469
AC_MSG_RESULT([checking for zippy... (cached) $ac_cv_zippy_program])
2472
if test ! -n "$ac_cv_zippy_program"; then
2474
AC_CHECK_PROGS(emacs_exe, emacs)
2475
AC_CHECK_PROGS(xemacs_exe, xemacs)
2477
ac_cv_zippy_program=""
2478
eargs='-batch -q -nw --eval'
2480
if test -n "$emacs_exe" ; then
2481
AC_MSG_CHECKING([for emacs yow])
2483
# get emacs to tell us where the libexec directory is.
2485
dir=`$emacs_exe $eargs '(princ (concat exec-directory "\n"))' \
2486
2>/dev/null | tail -1`
2487
dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
2489
# try running libexec/yow and see if it exits without error.
2491
if test x"$dir" != x -a -x "$dir/yow" ; then
2492
if $dir/yow >&- 2>&- ; then
2493
ac_cv_zippy_program="$dir/yow"
2494
AC_MSG_RESULT($ac_cv_zippy_program)
2950
with_imagedir_req=unspecified
2952
AC_ARG_WITH(image-directory,
2953
[ --with-image-directory=DIR By default, some screen savers may load
2954
random images out of this directory.],
2955
[with_imagedir="$withval"; with_imagedir_req="$withval"],
2956
[with_imagedir=yes])
2957
# no HANDLE_X_PATH_ARG for this one
2959
case "$with_imagedir" in
2962
AC_MSG_CHECKING([for image directory $with_imagedir])
2963
if test -d "$with_imagedir" ; then
2501
if test -z "$ac_cv_zippy_program" ; then
2502
AC_MSG_CHECKING([for xemacs yow])
2503
if test -n "$xemacs_exe" ; then
2505
# get xemacs to tell us where the libexec directory is.
2507
dir=`$xemacs_exe $eargs '(princ (concat exec-directory "\n"))' \
2508
2>/dev/null | tail -1`
2509
dir=`echo "$dir" | sed 's@///*@/@g;s@/$@@'`
2511
# try running libexec/yow and see if it exits without error.
2513
if test x"$dir" != x -a -x "$dir/yow" ; then
2514
if $dir/yow >&- 2>&- ; then
2515
ac_cv_zippy_program="$dir/yow"
2516
AC_MSG_RESULT($ac_cv_zippy_program)
2973
#### Could use some more defaults here...
2975
"/usr/share/backgrounds/images/" \
2976
"/usr/share/wallpapers/" \
2977
"/Library/Desktop Pictures/" \
2979
if test -z "$with_imagedir"; then
2980
AC_MSG_CHECKING([for image directory $dd])
2981
if test -d "$dd" ; then
2519
# in some xemacs installations, the pathname of the yow.lines file
2520
# isn't hardcoded into the yow executable, and must be passed on
2521
# the command line. See if it's in libexec/../etc/.
2525
dir_up=`echo "$dir" | sed 's@/[^/]*$@@'`
2528
yowlines="$dir_up/etc/yow.lines"
2529
if $dir/yow -f $yowlines >&- 2>&- ; then
2530
ac_cv_zippy_program="$dir/yow -f $yowlines"
2531
AC_MSG_RESULT($ac_cv_zippy_program)
2534
# In newer XEmacs releases, yow.lines is in a different place,
2535
# and the easiest way to get it is by calling the new function
2536
# `locate-data-file'.
2538
yowlines=`$xemacs_exe $eargs \
2539
'(princ (concat (locate-data-file "yow.lines") "\n"))' \
2540
2>/dev/null | tail -1`
2541
if $dir/yow -f $yowlines >&- 2>&- ; then
2542
ac_cv_zippy_program="$dir/yow -f $yowlines"
2543
AC_MSG_RESULT($ac_cv_zippy_program)
2553
# if that didn't work, try for some other programs...
2554
if test -z "$ac_cv_zippy_program" ; then
2556
AC_CHECK_PROGS(fortune, [fortune zippy yow])
2557
# if that didn't work, try for those programs in /usr/games...
2558
if test -z "$fortune" ; then
2559
AC_PATH_PROGS(fortune, [fortune zippy yow], fortune,
2560
/usr/games:/usr/local/games:$PATH)
2565
if test -z "$ac_cv_zippy_program" ; then
2566
ac_cv_zippy_program=fortune
2569
AC_DEFINE_UNQUOTED(ZIPPY_PROGRAM, "$ac_cv_zippy_program")
2996
echo "error: must be an absolute path: --with-image-directory=$with_imagedir_req"
3000
ac_cv_imagedir="$with_imagedir"
3002
DEFAULT_IMAGES_P='True'
3003
DEFAULT_IMAGE_DIRECTORY="$ac_cv_imagedir"
3005
if test -z "$DEFAULT_IMAGE_DIRECTORY" ; then
3006
DEFAULT_IMAGES_P='False'
2572
3010
###############################################################################
2675
3128
if test "$have_gle" = yes; then
2676
3129
GLE_EXES='$(GLE_EXES)'
2677
GLE_MEN='$(GLE_MEN)'
2678
3130
GLE_KLUDGE="${tab} "
2680
3132
GLE_KLUDGE="-${tab} "
3135
if test "$have_jpeg" = yes -a "$have_gdk_pixbuf" = yes; then
3136
JPEG_EXES='$(JPEG_EXES)'
2684
3140
# Another substitution in the XScreenSaver.ad.in file:
2686
if test "$have_gnome_help" = yes; then
3142
if test "$gnome_open_program" != ''; then
3146
elif test "$gnome_url_show_program" != ''; then
3157
# Set PO_DATADIR to something sensible.
3159
AC_MSG_CHECKING([for locale directory])
3160
if test -n "$GTK_DATADIR" ; then
3161
PO_DATADIR="$GTK_DATADIR"
3162
elif test "$have_gtk" = yes; then
3163
PO_DATADIR=`$pkg_config --variable=prefix gtk+-2.0`
3164
PO_DATADIR="$PO_DATADIR/share"
3167
if test -z "$PO_DATADIR" ; then
3169
# #### Total fucking kludge --
3170
# Map /build/prefix/usr/X11R6/share/ to /build/prefix/usr/share/
3171
# but of course we need to expand all the nested variables to do that...
3179
PO_DATADIR=`echo $dd | sed 's@/X11R6/@/@'`
3182
AC_MSG_RESULT($PO_DATADIR/locale)
3185
# canonicalize slashes.
3186
HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'`
3188
# gcc 3.0 likes to issue this warning for every file:
3190
# cc1: warning: changing search order for system directory "/usr/local/include"
3191
# cc1: warning: as it has already been specified as a non-system directory
3193
# Yay. We can only avoid that by deleting "-I${prefix}/include" from the list.
3194
# Which *should* be totally redundant, and thus an ok thing to delete?
3196
INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'`
2695
3199
###############################################################################
2838
3356
warn 'The DPMS extension was requested, but was not found.'
3359
if test "$with_xinerama_req" = yes -a "$have_xinerama" = no ; then
3360
warn 'The Xinerama extension was requested, but was not found.'
2841
3363
if test "$with_xf86vmode_req" = yes -a "$have_xf86vmode" = no ; then
2842
3364
warn 'The XF86VMODE extension was requested, but was not found.'
3367
if test "$with_randr_req" = yes -a "$have_randr" = no ; then
3368
warn 'The RANDR extension was requested, but was not found.'
2845
3371
if test "$with_proc_interrupts_req" = yes -a "$have_proc_interrupts" = no; then
2846
3372
warn "Checking of /proc/interrupts was requested, but it's bogus."
3375
if test "$pkg_config" = false ; then
3376
warnL 'The "pkg-config" program was not found. Without that,'
3377
warn2 "detection of the various GTK libraries won't work."
3379
pkgerr=`$pkg_config --list-all 2>&1 >/dev/null`
3380
if test "x$pkgerr" != "x" ; then
3381
warnL 'The "pkg-config" program produces errors. This often causes'
3382
warn2 "detection of the various GTK libraries to malfunction."
3383
warn2 "The errors are:"
3385
echo "$pkgerr" | sed 's/^/ > /g'
3389
if test "$gtk_halfassed" != no ; then
3390
warnL "GTK version $gtk_halfassed was found, but at least one supporting"
3391
warn2 "library ($gtk_halfassed_lib) was not, so GTK can't be used."
3392
warn2 "Perhaps some of the development packages are not installed?"
3393
if test "$have_gtk" = yes ; then
3394
v="$ac_gtk_version_string"
3395
warn2 "GTK $v is also installed, so it will be used instead."
3396
warn2 "Please read the above output and the \`config.log' file"
3397
warn2 "for more details."
3402
warn2 'Though the Motif front-end to xscreensaver is still'
3403
warn2 'maintained, it is no longer being updated with new'
3404
warn2 'features: all new development on the xscreensaver-demo'
3405
warn2 'program is happening in the GTK version, and not in the'
3406
warn2 'Motif version. It is recommended that you build against'
3407
warn2 'GTK instead of Motif. See <http://www.gtk.org/>.'
2850
3410
if test "$have_motif" = no -a "$have_gtk" = no; then
2851
warnL "Neither Motif nor Gtk seem to be available;"
2852
warn2 "the \`xscreensaver-demo' program requires one of these."
3412
if test "$with_motif" = yes; then
3413
warnL "Neither the GTK nor Motif libraries were found; the"
3414
warn2 "\`xscreensaver-demo' program requires one of these."
3418
warnL "The GTK libraries do not seem to be available; the"
3419
warn2 "\`xscreensaver-demo' program requires them."
3421
# warn2 'You can use Motif or Lesstif instead of GTK (use the'
3422
# warn2 "\`--with-motif' option) but that is NOT recommended."
2854
3426
elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
2855
3427
warnL "Use of Motif was requested, but it wasn't found;"
2906
if test "$have_xpm" = no ; then
2907
if test "$with_xpm_req" = yes ; then
2908
warnL 'Use of XPM was requested, but it was not found.'
3475
if test "$have_motif" = yes -a "$have_gtk" = no ; then
3476
warn 'Motif is being used, and GTK is not.'
3482
if test "$with_xpm_req" = yes -a "$have_xpm" = no; then
3483
warnL 'Use of XPM was requested, but it was not found.'
3486
if test "$with_gdk_pixbuf_req" = yes -a "$have_gdk_pixbuf" = no; then
3487
warnL 'Use of GDK-Pixbuf was requested, but it was not found.'
3490
if test "$have_gdk_pixbuf" = no -o "$gdk_pixbuf_halfassed" = yes || \
3491
test "$have_gdk_pixbuf" = no -a "$have_xpm" = no ; then
3493
if test "$with_gdk_pixbuf_req" = yes ; then
3495
elif test "$with_gdk_pixbuf_req" = no ; then
3496
warnL 'The GDK-Pixbuf library is not being used.'
3498
warnL 'The GDK-Pixbuf library was not found.'
3501
if test "$with_xpm_req" = yes -o "$have_xpm" = yes ; then
2909
3503
elif test "$with_xpm_req" = no ; then
2910
noteL 'The XPM library is not being used.'
3504
warnL 'The XPM library is not being used.'
2912
noteL 'The XPM library was not found.'
3506
warnL 'The XPM library was not found.'
3509
if test "$have_gdk_pixbuf" = no -a "$have_xpm" = yes ; then
3510
warn2 'The XPM library is being used instead.'
3513
if test "$gdk_pixbuf_halfassed" = yes ; then
3515
warn2 'More specifically, we found the headers, but not the'
3516
warn2 'libraries; so either GDK-Pixbuf is half-installed on this'
3517
warn2 "system, or something else went wrong. The \`config.log'"
3518
warn2 'file might contain some clues.'
2916
warn2 'Some of the demos will not be as colorful as they'
2917
warn2 'could be. You might want to consider installing XPM'
2918
warn2 'and re-running configure. (Remember to delete the'
2919
warn2 'config.cache file first.) You can find XPM at most'
2920
warn2 'X11 archive sites, such as <http://sunsite.unc.edu/>.'
3522
warn2 'Some of the demos will not use images as much as they could.'
3523
warn2 'You should consider installing GDK-Pixbuf and re-running'
3524
warn2 'configure. (GDK-Pixbuf is recommended over XPM, as it'
3525
warn2 'provides support for more image formats.)'
3529
if test "$have_jpeg" = no ; then
3530
if test "$with_jpeg_req" = yes ; then
3531
warnL 'Use of libjpeg was requested, but it was not found.'
3532
elif test "$with_jpeg_req" = no ; then
3533
noteL 'The JPEG library is not being used.'
3535
noteL 'The JPEG library was not found.'
3538
if test "$jpeg_halfassed" = yes ; then
3540
warn2 'More specifically, we found the headers, but not the'
3541
warn2 'library; so either JPEG is half-installed on this'
3542
warn2 "system, or something else went wrong. The \`config.log'"
3543
warn2 'file might contain some clues.'
3547
if test "$have_gdk_pixbuf" = no ; then
3548
warn2 "This means that it won't be possible for the image-manipulating"
3549
warn2 "display modes to load files from disk; and it also means that"
3550
warn2 "the \`webcollage' program will be much slower."
3552
warn2 "This means the \`webcollage' program will be much slower."
3062
3700
do_dir_warning=no
3064
# Now let's see if there's a previous RPM version already installed. Blargh!
3068
rpmv=`(rpm -qv xscreensaver) 2>&- | \
3069
sed -n 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-.*$/\1/p'`
3072
if test \! -z "$rpmv" ; then
3073
rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
3074
rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'`
3077
warnL "There is already an installed RPM of xscreensaver $rpmv"
3078
warn2 "on this system. You might want to remove it (with"
3079
warn2 '"rpm -ve xscreensaver") before running "make install"'
3080
warn2 "from this directory."
3082
warn2 "Alternately, you could build this version of xscreensaver"
3083
warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
3084
warn2 "file is included. See the RPM documentation for more info."
3087
if test "$rpmbdir" = "$rpmhdir" ; then
3088
warn2 "The RPM version was installed in $rpmbdir."
3090
warn2 "The RPM version was installed in $rpmbdir,"
3091
warn2 "with demos in $rpmhdir."
3702
# Now let's warn if there's a previous RPM version already installed.
3703
# But don't bother with this test if we are currently *building* an RPM.
3705
if test -z "$RPM_PACKAGE_VERSION" ; then
3707
rpmnames="xscreensaver xscreensaver-base xscreensaver-extras"
3711
rpmv=`(rpm -qv $rpmnames) 2>/dev/null | \
3712
sed -n 's/^[-a-z]*-\([0-9][0-9]*[.][0-9][0-9a-z]*\)-.*$/\1/p' | \
3716
if test \! -z "$rpmv" ; then
3717
rpmbdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'`
3718
rpmhdir=`rpm -ql $rpmnames | sed -n 's@^\(.*\)/attraction$@\1@p'`
3721
warnL "There is already an installed RPM of xscreensaver $rpmv"
3722
warn2 'on this system. You might want to remove it ("rpm -ve")'
3723
warn2 'before running "make install" in this directory.'
3725
warn2 "Alternately, you could build this version of xscreensaver"
3726
warn2 'as an RPM, and then install that. An "xscreensaver.spec"'
3727
warn2 'file is included. Try "rpmbuild -v -ba xscreensaver.spec".'
3728
warn2 "See the RPM documentation for more info."
3731
if test "$rpmbdir" = "$rpmhdir" ; then
3732
warn2 "The RPM version was installed in $rpmbdir/."
3735
warn2 "The RPM version was installed in $rpmbdir/,"
3736
warn2 "with demos in $rpmhdir/."
3098
# Warn about egregious GNOME bogosity.
3100
#if (rpm -qv control-center) >&- 2>&- ; then
3102
# warnL "The Gnome Control Center seems to be installed."
3104
# warn2 "Note that simply installing this version of xscreensaver"
3105
# warn2 "will not cause GNOME to know about the newly-added display"
3106
# warn2 "modes -- GNOME is just lame that way. Instead of using the"
3107
# warn2 "Control Center, try using the \`xscreensaver-demo' command."
3111
3741
if test "${bindir}" = "${HACKDIR}" ; then
3112
3742
do_dir_warning=yes