--- rxvt-unicode/configure.ac 2011/12/13 19:13:27 1.131 +++ rxvt-unicode/configure.ac 2012/01/18 19:44:09 1.136 @@ -11,8 +11,8 @@ dnl RXVT version changequote(, )dnl -VERSION=`sed -n -e 's/^.*[ \t]VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` -DATE=`sed -n -e 's/^.*[ \t]DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` +VERSION=`sed -n -e 's/^.* VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` +DATE=`sed -n -e 's/^.* DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h` changequote([, ])dnl AC_SUBST(VERSION)dnl AC_SUBST(DATE)dnl @@ -34,6 +34,7 @@ AC_ISC_POSIX AC_LANG(C++) +LINKER="$CXX" dnl check whether we can link with gcc -lsupc++ if test x$GCC = xyes && test x$GXX = xyes; then dnl FreeBSD (at least up to 5.3) has a broken GCC, workaround it @@ -42,14 +43,13 @@ save_LIBS="$LIBS" CXX="$CC" LIBS="$LIBS -lsupc++" - 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) + LINKER="$CC"], [ AC_MSG_RESULT([no, making everything bigger and slower]) LIBS="$save_LIBS" - LINKER="$save_CXX" ] ) CXX="$save_CXX" @@ -97,7 +97,6 @@ support_xim=yes support_pixbuf=yes support_startup_notification=yes -support_afterimage=yes support_xft=yes support_unicode3=no support_combining=yes @@ -134,7 +133,6 @@ support_xim=no support_pixbuf=no support_startup_notification=no - support_afterimage=no support_xft=no support_unicode3=no support_combining=no @@ -163,7 +161,6 @@ support_xim=yes support_pixbuf=yes support_startup_notification=yes - support_afterimage=yes support_xft=yes support_unicode3=yes support_combining=yes @@ -175,26 +172,26 @@ fi ]) -ASSERTIONS=no +support_assertions=no AC_ARG_ENABLE(assert, [ --enable-assert enable assertions], [if test x$enableval = xyes; then - ASSERTIONS=yes + support_assertions=yes fi]) -if test x$ASSERTIONS = xno; then +if test x$support_assertions = xno; then AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) fi -WARNINGS=no +support_warnings=no AC_ARG_ENABLE(warnings, [ --enable-warnings turn on g++ warnings], [if test x$enableval = xyes; then - WARNINGS=yes + support_warnings=yes fi]) if test x$GXX = xyes; then - if test $WARNINGS = yes; then + if test $support_warnings = yes; then save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" + CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-unused-value" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) else CXXFLAGS="$CXXFLAGS -w" @@ -236,7 +233,7 @@ fi]) AC_ARG_ENABLE(afterimage, - [ --enable-afterimage enable integration with libAfterImage for background images], + [ --enable-afterimage enable integration with libAfterImage for background images (deprecated)], [if test x$enableval = xyes -o x$enableval = xno; then support_afterimage=$enableval fi])