--- rxvt-unicode/configure.ac 2007/06/26 20:53:07 1.59 +++ rxvt-unicode/configure.ac 2007/07/27 10:06:43 1.66 @@ -48,10 +48,7 @@ LINKER="$CC" AC_LINK_IFELSE( [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], - [ - AC_MSG_RESULT(ok) - CXXLIB="-lsupc++" - ], + [AC_MSG_RESULT(ok)], [ AC_MSG_RESULT([no, making everything bigger and slower]) LIBS="$save_LIBS" @@ -61,7 +58,6 @@ CXX="$save_CXX" fi AC_SUBST(LINKER,[$LINKER]) -AC_SUBST(CXXLIB) dnl# -------------------------------------------------------------------------- dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' @@ -463,9 +459,9 @@ dnl# the only reasonable way to find libXpm is do-it-yourself dnl# only check if we want xpm-background -LIBAFTERIMAGE_CFLAGS= +AFTERIMAGE_CFLAGS= AFTERIMAGE_LIBS= -have_afterimage= +AFTERIMAGE_VERSION= if test x$support_afterimage = xyes; then support_afterimage=no @@ -473,13 +469,17 @@ if test "x$afterimage_config" = "x" ; then AC_PATH_PROG(afterimage_config, afterimage-config, no) fi - - AC_MSG_CHECKING(for libAfterImage) - if $afterimage_config --version >/dev/null 2>&1 ; then - LIBAFTERIMAGE_CFLAGS=`$afterimage_config --cflags` + AC_MSG_CHECKING(for libAfterImage version >= 1.15) + AFTERIMAGE_VERSION=`$afterimage_config --version` + if test -n $AFTERIMAGE_VERSION ; then + AFTERIMAGE_CFLAGS=`$afterimage_config --cflags` AFTERIMAGE_LIBS=`$afterimage_config --libs` if test "x$AFTERIMAGE_LIBS" != "x"; then - support_afterimage=yes + libai_ver_major=`echo $AFTERIMAGE_VERSION | cut -f 1 -d .` + libai_ver_minor=`echo $AFTERIMAGE_VERSION | cut -f 2 -d .` + if test $libai_ver_major -gt 1 -o \( $libai_ver_major -eq 1 -a $libai_ver_minor -ge 15 \); then + support_afterimage=yes + fi fi fi @@ -536,8 +536,6 @@ if test x$rxvt_cv_xpointer = xyes; then AC_DEFINE(HAVE_XPOINTER, 1, Define if you have XPointer typedef) fi -LIBS=$ac_save_LIBS -CFLAGS=$ac_save_CFLAGS AC_CACHE_CHECK([for XLIB_ILLEGAL_ACCESS], rxvt_xlib_illegal_access, [AC_COMPILE_IFELSE( @@ -917,7 +915,7 @@ AC_SUBST(X_LIBS) AC_SUBST(X_EXTRA_LIBS) -AC_SUBST(LIBAFTERIMAGE_CFLAGS) +AC_SUBST(AFTERIMAGE_CFLAGS) AC_SUBST(AFTERIMAGE_LIBS) AC_ARG_PROGRAM