--- rxvt-unicode/configure.ac 2007/06/13 12:34:32 1.51 +++ rxvt-unicode/configure.ac 2007/07/25 22:41:45 1.62 @@ -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' @@ -80,9 +76,7 @@ case $host in *-*-solaris* ) - AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) - AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris) - AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) + AC_DEFINE(_XOPEN_SOURCE, 500, Needed to get declarations for msg_control and msg_controllen on Solaris) ;; esac @@ -445,9 +439,6 @@ dnl# -------------------------------------------------------------------------- -AC_PATH_PROG(CP, cp, cp) -AC_PATH_PROG(SED, sed, sed) -AC_PATH_PROG(ECHO, echo, echo) AC_PATH_PROG(TIC, tic) dnl# need a neat way to detect SVR4 or its features @@ -471,6 +462,7 @@ LIBAFTERIMAGE_CFLAGS= AFTERIMAGE_LIBS= have_afterimage= +AFTERIMAGE_VERSION= if test x$support_afterimage = xyes; then support_afterimage=no @@ -478,13 +470,18 @@ 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 + AC_PROG_AWK + AC_MSG_CHECKING(for libAfterImage version >= 1.15 ) + AFTERIMAGE_VERSION=`$afterimage_config --version` + if test -n $AFTERIMAGE_VERSION ; then LIBAFTERIMAGE_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 | $AWK -F . '{print $1}'` + libai_ver_minor=`echo $AFTERIMAGE_VERSION | $AWK -F . '{print $2}'` + 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,56 +533,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( @@ -735,9 +687,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 @@ -748,9 +697,11 @@ else exit (1);}]])],[dnl rxvt_cv_func_xlocale=yes],[rxvt_cv_func_xlocale=no],[dnl - AC_MSG_WARN(Define NO_XLOCALE in config.h manually)])]) -if test x$rxvt_cv_func_xlocale = xyes; then - AC_DEFINE(HAVE_XLOCALE, 1, Define if Xlocale support works) + :])]) +if test x$support_xim = xyes; then + if test x$rxvt_cv_func_xlocale = xyes; then + AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) + fi fi AC_CACHE_CHECK(for working X setlocale, rxvt_cv_func_xsetlocale, @@ -835,7 +786,7 @@ AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) fi if test x$support_inheritpixmap = xyes; then - AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) + AC_DEFINE(ENABLE_TRANSPARENCY, 1, Define if you want your background to use the parent window background) fi if test x$support_keepscrolling = xno; then AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING, 1, Define for continual scrolling when you keep the scrollbar button pressed) @@ -843,20 +794,12 @@ 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 if test x$support_mouseslipwheel = xyes; then AC_DEFINE(MOUSE_SLIP_WHEELING, 1, Define to have CTRL cause wheel events to accelerate scrolling. Release CTRL to halt scrolling) fi -if test x$support_xim = xyes -o x$multichar_set = xyes; then - if test x$rxvt_cv_func_xlocale = xyes; then - AC_DEFINE(USE_XIM, 1, Define if you want to have XIM (X Input Method) protocol support - required for multibyte characters input) - fi -fi if test x$support_xpm = xyes -o x$support_afterimage = xyes ; then AC_DEFINE(XPM_BACKGROUND, 1, Define if you want to have sexy-looking background pixmaps. Needs libXpm or libAfterImage) fi @@ -943,10 +886,12 @@ PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" else - AC_MSG_ERROR([no, unable to link]) + AC_MSG_RESULT([no, unable to link]) + rxvt_perl_link=no fi else - AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) + AC_MSG_RESULT([no working perl found, or perl not version >= 5.8]) + support_perl=no fi fi AC_SUBST(PERLLIB) @@ -960,18 +905,16 @@ 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)