--- rxvt-unicode/configure.ac 2007/06/09 14:13:16 1.46 +++ rxvt-unicode/configure.ac 2007/06/26 19:47:00 1.58 @@ -48,7 +48,10 @@ LINKER="$CC" AC_LINK_IFELSE( [AC_LANG_PROGRAM([struct test { }; void f() try { throw new test; } catch (...) { throw; }],[])], - [AC_MSG_RESULT(ok)], + [ + AC_MSG_RESULT(ok) + CXXLIB="-lsupc++" + ], [ AC_MSG_RESULT([no, making everything bigger and slower]) LIBS="$save_LIBS" @@ -58,6 +61,7 @@ CXX="$save_CXX" fi AC_SUBST(LINKER,[$LINKER]) +AC_SUBST(CXXLIB) dnl# -------------------------------------------------------------------------- dnl# Supply default CXXFLAGS, if not specified by `CXXFLAGS=flags ./configure' @@ -76,9 +80,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 +243,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 +443,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 @@ -474,8 +472,6 @@ if test "x$afterimage_config" = "x" ; then AC_PATH_PROG(afterimage_config, afterimage-config, no) - else - afterimage_config=$afterimage_config/afterimage-config fi AC_MSG_CHECKING(for libAfterImage) @@ -535,49 +531,6 @@ #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 @@ -747,9 +700,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, @@ -834,7 +789,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) @@ -842,20 +797,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 @@ -959,8 +906,10 @@ 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) @@ -968,13 +917,11 @@ 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) @@ -1034,7 +981,7 @@ fi if test x$support_afterstep = xyes; then - echo " AfterStep intergration: yes" + echo " AfterStep integration: yes" fi if test x$term != x; then