--- rxvt-unicode/configure.ac 2006/01/17 12:21:41 1.1 +++ rxvt-unicode/configure.ac 2006/01/21 00:09:06 1.14 @@ -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 CXXFLAGS, if not specified by `CXXFLAGS=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 -fno-threadsafe-statics -fno-enforce-eh-specs" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [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 @@ -538,17 +533,17 @@ sys/select.h \ sys/sockio.h \ sys/strredir.h \ - sys/stropts.h \ + sys/stropts.h \ sys/time.h \ utmp.h \ utmpx.h \ - stdint.h \ - pty.h \ - util.h \ - libutil.h \ - wchar.h \ - cwchar \ - clocale \ + stdint.h \ + pty.h \ + util.h \ + libutil.h \ + wchar.h \ + cwchar \ + clocale \ ) AC_HEADER_TIME @@ -633,7 +628,7 @@ AC_CHECK_SIZEOF(int *, 4) dnl# see usage below -AC_DEFUN(RXVT_CHECK_SIZE, +AC_DEFUN([RXVT_CHECK_SIZE], [AC_CACHE_CHECK([for $2], $1, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[$2 dummy;]])],[$1=yes],[dnl if test "$ac_cv_sizeof_char" -ge $3; then @@ -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) @@ -1440,7 +1425,7 @@ dnl# test for "sun" or "__sun__" before include sys_ioctl dnl# revert HAVE_BLAH_H into a "#include " -AC_DEFUN(RXVT_DEFINE_TO_INCLUDE, dnl +AC_DEFUN([RXVT_DEFINE_TO_INCLUDE], dnl [if test "$$3" = "$4" -o "$$5" = "$6"; then $1="#include <$2>" else