Index: kscreensaver/configure.in.in =================================================================== --- kscreensaver/configure.in.in (revision 428301) +++ kscreensaver/configure.in.in (working copy) @@ -36,33 +36,42 @@ 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) +AC_ARG_WITH(libart, + [AS_HELP_STRING(--with-libart, + [enable support for libart @<:@default=check@:>@])], + [], with_libart=check) + 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/]) + ]) -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 + 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 + 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]) + 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_FAILURE([--with-libart was given, but test for libart failed]) + fi fi AC_SUBST(LIBART_LIBS)