--- rxvt-unicode/configure.ac 2007/06/09 11:22:10 1.43 +++ rxvt-unicode/configure.ac 2007/07/27 10:06:43 1.66 @@ -76,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 @@ -241,7 +239,9 @@ AC_ARG_WITH(afterimage_config, [ --with-afterimage-config=DIR use libAfterImage config script in DIR], - [afterimage_config="$withval"]) + [if test "x$withval" != x; then + afterimage_config=$withval/afterimage-config + fi]) AC_ARG_ENABLE(afterstep, [ --enable-afterstep enable integration with AfterStep window manager], @@ -439,12 +439,6 @@ dnl# -------------------------------------------------------------------------- -AC_PATH_PROG(MV, mv, mv) -AC_PATH_PROG(CP, cp, cp) -AC_PATH_PROG(LN, ln, ln) -AC_PATH_PROG(SED, sed, sed) -AC_PATH_PROG(ECHO, echo, echo) -AC_PATH_PROG(CMP, cmp, cmp) AC_PATH_PROG(TIC, tic) dnl# need a neat way to detect SVR4 or its features @@ -465,30 +459,34 @@ 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 - AC_MSG_CHECKING(installed libAfterImage) +if test x$support_afterimage = xyes; then support_afterimage=no + if test "x$afterimage_config" = "x" ; then AC_PATH_PROG(afterimage_config, afterimage-config, no) - else - afterimage_config=$afterimage_config/afterimage-config fi - 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 if test "x$support_afterimage" = "xyes"; then AC_MSG_RESULT($AFTERIMAGE_LIBS) else - AC_MSG_RESULT(afterimage-config not found in $afterimage_config - can't use libAfterImage for images.) + AC_MSG_RESULT(no) fi fi @@ -533,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( @@ -732,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 @@ -745,9 +695,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, @@ -832,7 +784,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) @@ -840,20 +792,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 @@ -957,27 +901,21 @@ support_frills=yes fi -AC_SUBST(DEBUG) -AC_SUBST(DINCLUDE) +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 - DLIB=`echo $DLIB | sed "$R_TRANSLATE"` - 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(DLIB) 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 @@ -1028,11 +966,11 @@ fi if test x$support_afterimage = xyes; then - echo " AfterImage library: $AFTERIMAGE_LIBS" + echo " AfterImage support: yes" fi if test x$support_afterstep = xyes; then - echo " With AfterStep integration" + echo " AfterStep integration: yes" fi if test x$term != x; then