--- rxvt-unicode/configure.ac 2006/01/17 12:21:41 1.1 +++ 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 @@ -711,22 +706,13 @@ AC_TYPE_SIGNAL dnl> AC_FUNC_VPRINTF -dnl# Note: On Ultrix, setsid() does weirdo stuff, disable it -case "$host_alias" in - *ultrix) ac_cv_func_setsid='no' ;; - *) break;; -esac - AC_CHECK_FUNCS( \ - atexit \ revoke \ unsetenv \ setutent \ seteuid \ + setresuid \ setreuid \ - setsid \ - setpgrp \ - setpgid \ _getpty \ getpt \ posix_openpt \ @@ -749,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) @@ -1150,6 +1135,8 @@ ],[rxvt_can_pass_fds=yes],[rxvt_can_pass_fds=no])]) if test x$rxvt_can_pass_fds = xyes; then AC_DEFINE(HAVE_UNIX_FDPASS, 1, Define if sys/socket.h defines the necessary macros/functions for file handle passing) +else + AC_MSG_ERROR([urxvt requires unix-compliant filehandle passing ability]) fi AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, @@ -1390,12 +1377,10 @@ PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" else - support_perl=no - AC_MSG_RESULT([no, unable to link]) + AC_MSG_ERROR([no, unable to link]) fi else - AC_MSG_ERROR(no working perl found, or perl not version >= 5.8) - support_perl=no + AC_MSG_ERROR([no working perl found, or perl not version >= 5.8]) fi fi AC_SUBST(PERLLIB)