diff -Nur kdeartwork-3.4.2.orig/kscreensaver/configure.in.in kdeartwork-3.4.2/kscreensaver/configure.in.in --- kdeartwork-3.4.2.orig/kscreensaver/configure.in.in 2005-07-20 18:40:58.000000000 +0200 +++ kdeartwork-3.4.2/kscreensaver/configure.in.in 2005-08-11 18:27:34.000000000 +0200 @@ -36,32 +36,41 @@ AM_CONDITIONAL(COMPILE_X11_KSAVERS, test "x$ac_x_includes" != x && test "x$ac_x_libraries" != x) AM_CONDITIONAL(COMPILE_ARTS_KSAVERS, test x$build_arts = xyes) -LIBART= +AC_ARG_WITH(libart, + [AC_HELP_STRING(--with-libart, + [enable support for libart @<:@default=check@:>@])], + [], with_libart=check) -KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [ - AC_MSG_WARN([Could not find libart anywhere, check http://www.levien.com/libart/]) -]) - -if test -n "$LIBART_CONFIG"; then - vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - if test -n "$vers" && test "$vers" -ge 2003008 - then - LIBART_LIBS="`$LIBART_CONFIG --libs`" - LIBART_RPATH= - for args in $LIBART_LIBS; do +LIBART= +if test "x$with_libart" != xno; then + KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [ + AC_MSG_WARN([Could not find libart anywhere, check http://www.levien.com/libart/]) + ]) + + if test -n "$LIBART_CONFIG"; then + vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test -n "$vers" && test "$vers" -ge 2003008; then + LIBART_LIBS="`$LIBART_CONFIG --libs`" + LIBART_RPATH= + for args in $LIBART_LIBS; do case $args in -L*) LIBART_RPATH="$LIBART_RPATH $args" ;; esac - done - LIBART_RPATH=`echo $LIBART_RPATH | sed -e "s/-L/-R/g"` - LIBART_CFLAGS="`$LIBART_CONFIG --cflags`" - LIBART=yes - - AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library]) - else - AC_MSG_WARN([You need at least libart 2.3.8]) + done + LIBART_RPATH=`echo $LIBART_RPATH | sed -e "s/-L/-R/g"` + LIBART_CFLAGS="`$LIBART_CONFIG --cflags`" + LIBART=yes + + AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library]) + else + AC_MSG_WARN([You need at least libart 2.3.8]) + fi + fi + + if test "x$with_libart" != xcheck && test -z "$LIBART"; then + AC_MSG_ERROR([--with-libart was given, but test for libart failed]) fi fi diff -Nur kdeartwork-3.4.2.orig/kscreensaver/kxsconfig/configure.in.bot kdeartwork-3.4.2/kscreensaver/kxsconfig/configure.in.bot --- kdeartwork-3.4.2.orig/kscreensaver/kxsconfig/configure.in.bot 2005-07-20 18:40:57.000000000 +0200 +++ kdeartwork-3.4.2/kscreensaver/kxsconfig/configure.in.bot 2005-08-11 18:22:05.000000000 +0200 @@ -1,4 +1,4 @@ -if test "$XSCREENSAVER" = "NO"; then +if test "x$with_xscreensaver" = xcheck && test "$XSCREENSAVER" = "NO"; then echo "" echo "xscreensaver could not be detected on your system." echo "Check www.jwz.org/xscreensaver if you're loving to" diff -Nur kdeartwork-3.4.2.orig/kscreensaver/kxsconfig/configure.in.in kdeartwork-3.4.2/kscreensaver/kxsconfig/configure.in.in --- kdeartwork-3.4.2.orig/kscreensaver/kxsconfig/configure.in.in 2005-07-20 18:40:57.000000000 +0200 +++ kdeartwork-3.4.2/kscreensaver/kxsconfig/configure.in.in 2005-08-11 18:39:20.000000000 +0200 @@ -1,4 +1,13 @@ -AC_DEFUN([KDE_CHECK_XSREENSAVER], +AC_DEFUN([KDE_CHECK_XSCREENSAVER_HACKS], +[ + XSCREENSAVER_HACKS_DIR=NO + AC_FIND_FILE($1/flame, [ $xscreensaver_prefixes ], XSCREENSAVER_HACKS_DIR) + if test "$XSCREENSAVER_HACKS_DIR" != NO; then + XSCREENSAVER_HACKS_DIR="$XSCREENSAVER_HACKS_DIR/$1" + fi +]) + +AC_DEFUN([KDE_CHECK_XSCREENSAVER_CONFIG], [ XSCREENSAVER_CONFIG=NO AC_FIND_FILE($1/flame.xml, [ $xscreensaver_prefixes ], XSCREENSAVER_CONFIG) @@ -22,46 +31,80 @@ done IFS=$old_IFS -KDE_FIND_PATH(lib$kdelibsuff/xscreensaver/flame, XSCREENSAVER, [ $xscreensaver_prefixes ], - [ - KDE_FIND_PATH(lib/xscreensaver/flame, XSCREENSAVER, [ $xscreensaver_prefixes ], - [ - KDE_FIND_PATH(bin/xscreensaver-hacks/flame, XSCREENSAVER, - [ $xscreensaver_prefixes ], - [ - KDE_FIND_PATH(hacks/flame, XSCREENSAVER, - [ $xscreensaver_prefixes ], - [ - XSCREENSAVER=NO - ]) - ]) - ]) - ]) +AC_ARG_WITH(xscreensaver, + [AC_HELP_STRING(--with-xscreensaver, + [enable support for xscreensaver @<:@default=check@:>@])], + [], with_xscreensaver=check) + +AC_ARG_WITH(xscreensaver-dir, + [AC_HELP_STRING(--with-xscreensaver-dir=DIR, + [where xscreensaver is installed])], []) + +AC_ARG_WITH(xscreensaver-config, + [AC_HELP_STRING(--with-xscreensaver-config=DIR, + [where the xscreensaver config files are])], []) + +XSCREENSAVER=NO +if test "x$with_xscreensaver" != xno; then + XSCREENSAVER_HACKS_DIR=NO + XSCREENSAVER_CONFIG=NO + + AC_MSG_CHECKING([for xscreensaver]) + + if test -n "$with_xscreensaver_dir" && test -f "$with_xscreensaver_dir/flame"; then + XSCREENSAVER_HACKS_DIR="$with_xscreensaver_dir" + fi + + if test "x$XSCREENSAVER_HACKS_DIR" = xNO; then + for subdir in lib$kdelibsuff/xscreensaver \ + lib/xscreensaver \ + libexec/xscreensaver \ + bin/xscreensaver-hacks \ + hacks; do + KDE_CHECK_XSCREENSAVER_HACKS($subdir) + if test "$XSCREENSAVER_HACKS_DIR" != NO; then + break + fi + done + fi + + AC_MSG_RESULT([$XSCREENSAVER_HACKS_DIR]) -XSCREENSAVER_HACKS_DIR= + AC_MSG_CHECKING([for xscreensaver config files]) -if test "$XSCREENSAVER" != "NO"; then - XSCREENSAVER_HACKS_DIR=`echo $XSCREENSAVER | sed -e 's,/flame$,,'` - AC_DEFINE_UNQUOTED(XSCREENSAVER_HACKS_DIR, "$XSCREENSAVER_HACKS_DIR", [Defines where xscreensaver stores its graphic hacks]) + if test -n "$with_xscreensaver_config" && test -f "$with_xscreensaver_config/flame.xml"; then + XSCREENSAVER_CONFIG="$with_xscreensaver_config" + fi - AC_MSG_CHECKING([for flame.xml]) + if test "x$XSCREENSAVER_CONFIG" = xNO; then for subdir in lib/xscreensaver/config \ lib/X11/xscreensaver/config \ share/control-center/screensavers \ - share/control-center/screensavers \ share/xscreensaver/config \ xscreensaver \ config/control-center-2.0; do - KDE_CHECK_XSREENSAVER($subdir) + KDE_CHECK_XSCREENSAVER_CONFIG($subdir) if test "$XSCREENSAVER_CONFIG" != NO; then break fi done - AC_MSG_RESULT([$XSCREENSAVER_CONFIG]) - AC_DEFINE_UNQUOTED(XSCREENSAVER_CONFIG_DIR, "$XSCREENSAVER_CONFIG", - [Defines where xscreensaver stores it's config files]) + fi + + AC_MSG_RESULT([$XSCREENSAVER_CONFIG]) + + if test "x$XSCREENSAVER_HACKS_DIR" != xNO && test "x$XSCREENSAVER_CONFIG" != xNO; then + XSCREENSAVER=YES + fi + + if test "x$with_xscreensaver" != xcheck && test "$XSCREENSAVER" != YES; then + AC_MSG_ERROR([--with-xscreensaver was given, but test for xscreensaver failed]) + fi +fi + +if test "$XSCREENSAVER" != "NO"; then + AC_DEFINE_UNQUOTED(XSCREENSAVER_HACKS_DIR, "$XSCREENSAVER_HACKS_DIR", [Defines where xscreensaver stores its graphic hacks]) + AC_DEFINE_UNQUOTED(XSCREENSAVER_CONFIG_DIR, "$XSCREENSAVER_CONFIG", [Defines where xscreensaver stores it's config files]) fi AM_CONDITIONAL(include_XSCREENSAVER, test "$XSCREENSAVER" != "NO") AC_SUBST(XSCREENSAVER_HACKS_DIR) -