--- rxvt-unicode/configure.ac 2006/01/17 15:00:34 1.3 +++ rxvt-unicode/configure.ac 2006/01/20 10:27:08 1.9 @@ -1,4 +1,3 @@ -dnl# -*- sh -*- dnl# dnl# Process this file with autoconf to produce a configure script. dnl# @@ -33,31 +32,36 @@ AC_PROG_CXX AC_PROG_CPP AC_PROG_INSTALL -AC_PROG_AWK + +AC_AIX +AC_ISC_POSIX AC_LANG(C) +dnl check wetehr we can link with gcc -lsupc++ +LINKER="$CXX" +if test x$GCC = xyes && test x$GXX = xyes; then + AC_CHECK_LIB(supc++, main, [ + LINKER="$CC" + LIBS="$LIBS -lsupc++" + ]) +fi +AC_SUBST(LINKER,[$LINKER]) + +AC_LANG(C++) dnl# -------------------------------------------------------------------------- -dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure' +dnl# Supply default CXXLAGS, if not specified by `CXXLAGS=flags ./configure' dnl# if test -z "$orig_CXXFLAGS"; then if test x$GCC = xyes && test "x$GXX" = xyes; then - CXXFLAGS="-g -O3" + CXXFLAGS="-g -O3 -Os -fno-threadsafe-statics -fno-enforce-eh-specs" + AC_COMPILE_IFELSE([int i;], [echo didididid], [CXXFLAGS="-g -O3"]) else CXXFLAGS="-O" fi CFLAGS="$CXXFLAGS" fi -LINKER="$CXX" -if test x$GCC = xyes && test x$GXX = xyes; then - AC_CHECK_LIB(supc++, main, [ - LINKER="$CC" - LIBS="$LIBS -lsupc++" - ]) -fi -AC_SUBST(LINKER,[$LINKER]) - AC_DEFINE(_GNU_SOURCE, 1, Use all glibc features.) case $host in @@ -72,12 +76,6 @@ dnl CXXFLAGS="$CXXFLAGS" dnl I once had -fno-exceptions, but I am using them now... dnl fi -AC_LANG(C++) - -dnl# system hacks -AC_AIX -AC_ISC_POSIX - dnl# FreeBSD needs to link libxpg4 AC_CHECK_FUNC(setlocale, [], [AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])]) @@ -481,8 +479,6 @@ dnl# -------------------------------------------------------------------------- -AC_DEFINE(PROTOTYPES, 1, Define if you need function prototypes) - AC_PATH_PROG(MV, mv, mv) AC_PATH_PROG(RM, rm, rm) AC_PATH_PROG(CP, cp, cp) @@ -490,7 +486,6 @@ AC_PATH_PROG(SED, sed, sed) AC_PATH_PROG(ECHO, echo, echo) AC_PATH_PROG(CMP, cmp, cmp) -AC_PATH_PROG(TBL, tbl) AC_PATH_PROG(TIC, tic) dnl# need a neat way to detect SVR4 or its features @@ -716,6 +711,7 @@ unsetenv \ setutent \ seteuid \ + setresuid \ setreuid \ _getpty \ getpt \ @@ -739,7 +735,6 @@ AC_CHECK_HEADER(utmp.h, [AC_CACHE_CHECK([for struct utmp], rxvt_cv_struct_utmp, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#include #include ]], [[struct utmp ut;]])],[rxvt_cv_struct_utmp=yes],[rxvt_cv_struct_utmp=no])]) if test x$rxvt_cv_struct_utmp = xyes; then AC_DEFINE(HAVE_STRUCT_UTMP, 1, Define if utmp.h has struct utmp)