--- rxvt-unicode/configure.ac 2007/06/26 00:40:18 1.56 +++ 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 @@ -531,56 +531,11 @@ #include #endif]], [[int a = ECHO;]])],[rxvt_cv_header_sysioctl=yes],[rxvt_cv_header_sysioctl=no])]) -dnl# ELF systems may want to store paths for dynamic libraries. -dnl# Lets see if the compiler can accept "-Rpath" or "-Wl,-Rpath" -dnl# At least one version of SunOS wants "-R path" but it's not checked yet. -if test -n "$GCC"; then - LDARG="-Wl," -else - LDARG="" -fi -changequote(, )dnl -R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-rpath '$LDARG'\1/g' -changequote([, ])dnl - -ac_save_CFLAGS=$CFLAGS -ac_save_LIBS=$LIBS -CFLAGS="$CFLAGS $X_CFLAGS" -LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` -AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include -#include -main() -{ - exit(0); - (void) XOpenDisplay("foobar"); -}]])],[rxvt_cv_rpath=yes],[rxvt_cv_rpath=no],[dnl - AC_MSG_WARN(You may need to check the LIBS line)])]) -if test x$rxvt_cv_rpath != xyes; then - changequote(, )dnl - R_TRANSLATE='s/-L\([^ ]*\)/-L\1 '$LDARG'-R\1/g' - changequote([, ])dnl - LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"` - AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include -#include -main() -{ - exit(0); - (void) XOpenDisplay("foobar"); -}]])],[rxvt_cv_R=yes],[rxvt_cv_R=no],[rxvt_cv_R=no])]) - if test x$rxvt_cv_R != xyes; then - LIBS="$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" - fi -fi - AC_CACHE_CHECK([for XPointer], rxvt_cv_xpointer, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[XPointer dummy;]])],[rxvt_cv_xpointer=yes],[rxvt_cv_xpointer=no])]) 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( @@ -730,9 +685,6 @@ ac_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" -if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then - LIBS=`echo $LIBS | sed "$R_TRANSLATE"` -fi AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include #include @@ -840,9 +792,6 @@ if test x$support_selectionscrolling = xyes; then AC_DEFINE(SELECTION_SCROLLING, 1, Define to allow scrolling when the selection moves to the top or bottom of the screen) fi -if test x$support_frills = xyes; then - AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) -fi if test x$support_mousewheel = xyes; then AC_DEFINE(MOUSE_WHEEL, 1, Define to use wheel events (button4 and button5) to scroll) fi @@ -952,23 +901,21 @@ support_frills=yes fi +if test x$support_frills = xyes; then + AC_DEFINE(ENABLE_FRILLS, 1, Define if you want handling for rarely used but handy features) +fi + AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(X_CFLAGS) dnl# Attack the libs -if test x$rxvt_cv_rpath = xyes -o x$rxvt_cv_R = xyes; then - LIBS=`echo $LIBS | sed "$R_TRANSLATE"` - X_LIBS=`echo $X_LIBS | sed "$R_TRANSLATE"` - X_EXTRA_LIBS=`echo $X_EXTRA_LIBS | sed "$R_TRANSLATE"` - XPM_LIBS=`echo $XPM_LIBS | sed "$R_TRANSLATE"` -fi AC_SUBST(LIBS) AC_SUBST(X_LIBS) AC_SUBST(X_EXTRA_LIBS) -AC_SUBST(LIBAFTERIMAGE_CFLAGS) +AC_SUBST(AFTERIMAGE_CFLAGS) AC_SUBST(AFTERIMAGE_LIBS) AC_ARG_PROGRAM