X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.in;h=75a8fe321785428a76d7c25d05815aee43202f25;hb=551b3de3f619c04c2dd1971ee9b3f02e270c28c9;hp=df6f23e67cbde728a45f12e8689963d9e7b87966;hpb=59ac4e9a0de290e4275a7bbb890ad16abd09d68f;p=xscreensaver diff --git a/configure.in b/configure.in index df6f23e6..75a8fe32 100644 --- a/configure.in +++ b/configure.in @@ -159,7 +159,7 @@ Installation options: --enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir', instead of putting them in bindir itself. You can specify the name of the subdirectory. For example, - --exec-prefix=/usr/local/bin --enable-subdir=demos + \`--exec-prefix=/usr/local --enable-subdir=demos' would put xscreensaver in /usr/local/bin/, and would put the demos in /usr/local/bin/demos/. (If DIR begins with /, then bindir will not be prepended.) @@ -777,6 +777,31 @@ elif test "$with_xshm" != no; then fi +# Check for the DOUBLE-BUFFER server extension header. +# +have_xdbe=no +with_xdbe_req=unspecified +AC_ARG_WITH(xdbe-ext, +[ --with-xdbe-ext Include support for the DOUBLE-BUFFER server + extension, if possible (this is the default). + --without-xdbe-ext Do not compile in support for this extension.], + [with_xdbe="$withval"; with_xdbe_req="$withval"],[with_xdbe=yes]) + +HANDLE_X_PATH_ARG(with_xdbe, --with-xdbe-ext, DOUBLE-BUFFER) + +if test "$with_xdbe" = yes; then + + AC_CHECK_X_HEADER(X11/extensions/Xdbe.h, [have_xdbe=yes]) + if test "$have_xdbe" = yes; then + AC_DEFINE(HAVE_DOUBLE_BUFFER_EXTENSION) + fi + +elif test "$with_xdbe" != no; then + echo "error: must be yes or no: --with-xdbe-ext=$with_xshm" + exit 1 +fi + + # Check for the SGI-VIDEO-CONTROL server extension header. # have_sgivc=no @@ -1476,12 +1501,25 @@ if test ! -n "$ac_cv_zippy_program"; then dir_up=`echo "$dir" | sed 's@/[^/]*$@@'` changequote([,]) - yow="yow -f $dir_up/etc/yow.lines" - if $dir/$yow >&- 2>&- ; then - ac_cv_zippy_program="$dir/$yow" + yowlines="$dir_up/etc/yow.lines" + if $dir/yow -f $yowlines >&- 2>&- ; then + ac_cv_zippy_program="$dir/yow -f $yowlines" AC_MSG_RESULT($ac_cv_zippy_program) else - AC_MSG_RESULT(no) + # + # In newer XEmacs releases, yow.lines is in a different place, + # and the easiest way to get it is by calling the new function + # `locate-data-file'. + # + yowlines=`$xemacs_exe $eargs \ + '(princ (concat (locate-data-file "yow.lines") "\n"))' \ + 2>/dev/null | tail -1` + if $dir/yow -f $yowlines >&- 2>&- ; then + ac_cv_zippy_program="$dir/yow -f $yowlines" + AC_MSG_RESULT($ac_cv_zippy_program) + else + AC_MSG_RESULT(no) + fi fi fi fi @@ -1975,6 +2013,10 @@ if test "$with_xshm_req" = yes -a "$have_xshm" = no ; then warn 'The XSHM extension was requested, but was not found.' fi +if test "$with_xdbe_req" = yes -a "$have_xdbe" = no ; then + warn 'The DOUBLE-BUFFER extension was requested, but was not found.' +fi + if test "$with_sgivc_req" = yes -a "$have_sgivc" = no ; then warn 'The SGI-VIDEO-CONTROL extension was requested, but was not found.' fi @@ -2138,7 +2180,60 @@ eval HACKDIR=${HACKDIR} bindir=`echo "${bindir}" | sed 's@/$@@;s@//*@/@g'` HACKDIR=`echo "${HACKDIR}" | sed 's@/$@@;s@//*@/@g'` + +# Sanity check the subdir +for bad_choice in xscreensaver xscreensaver-demo xscreensaver-command ; do + if test "${HACKDIR}" = "${bindir}/${bad_choice}" ; then + echo "" + AC_MSG_ERROR([\"--enable-subdir=${bindir}/${bad_choice}\" won't work. + There will be an executable installed with that name, so + that can't be the name of a directory as well. Please + re-configure with a different directory name.]) + fi +done + + +do_dir_warning=no + +# Now let's see if there's a previous RPM version already installed. Blargh! + +# M4 sucks!! +changequote(X,Y) +rpmv=`(rpm -qv xscreensaver) 2>&- | \ + sed 's/^xscreensaver-\([0-9][0-9]*[.][0-9][0-9]*\)-[0-9][0-9]*$/\1/'` +changequote([,]) + +if test \! -z "$rpmv" ; then + rpmbdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/xscreensaver-demo$@\1@p'` + rpmhdir=`rpm -ql xscreensaver | sed -n 's@^\(.*\)/attraction$@\1@p'` + + warning=no + warnL "There is already an installed RPM of xscreensaver $rpmv" + warn2 "on this system. You might want to remove it (with" + warn2 '"rpm -ve xscreensaver") before running "make install"' + warn2 "from this directory." + echo "" + warn2 "Alternately, you could build this version of xscreensaver" + warn2 'as an RPM, and then install that. An "xscreensaver.spec"' + warn2 "file is included. See the RPM documentation for more info." + echo "" + + if test "$rpmbdir" = "$rpmhdir" ; then + warn2 "The RPM version was installed in $rpmbdir." + else + warn2 "The RPM version was installed in $rpmbdir," + warn2 "with demos in $rpmhdir." + fi + + do_dir_warning=yes +fi + + if test "${bindir}" = "${HACKDIR}" ; then + do_dir_warning=yes +fi + +if test "$do_dir_warning" = yes; then echo "" echo "$warnsep" echo "" @@ -2146,7 +2241,7 @@ if test "${bindir}" = "${HACKDIR}" ; then echo ' "xscreensaver-demo", and "xscreensaver-command" executables' echo " will be installed in ${bindir}." echo "" - echo " The various graphics demos (80+ different executables) will" + echo " The various graphics demos (90+ different executables) will" echo " also be installed in ${HACKDIR}." echo "" echo " If you would prefer the demos to be installed elsewhere"