--- rxvt-unicode/configure.ac 2006/01/21 21:01:54 1.17 +++ rxvt-unicode/configure.ac 2006/01/28 21:25:47 1.32 @@ -65,7 +65,7 @@ dnl# if test -z "$orig_CXXFLAGS"; then if test x$GCC = xyes && test "x$GXX" = xyes; then - CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" + CXXFLAGS="-g -O3 -fno-threadsafe-statics -fno-enforce-eh-specs" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [], [CXXFLAGS="-g -O3"]) else CXXFLAGS="-O" @@ -94,22 +94,10 @@ AC_CHECK_FUNC(gethostbyname, [], [AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"])]) AC_CHECK_FUNC(socket, [], [AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])]) -dnl# more solaris -AC_CHECK_FUNC(sched_yield, [], [AC_CHECK_LIB(rt, sched_yield, [LIBS="$LIBS -lrt"])]) - -dnl# sched_yield to improve terminal efficiency -AC_MSG_CHECKING(for sched_yield support) -AC_TRY_LINK([#include ],[sched_yield ()], - [AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SCHED_YIELD, 1, Define if you have sched-h and sched_yield)], - [AC_MSG_RESULT(no)]) - dnl AC_ENABLE_SHARED(no)dnl# libtool dnl AC_ENABLE_STATIC(yes)dnl# libtool dnl AC_PROG_LIBTOOL()dnl# libtool -MALLOC_TYPE=S - support_frills=yes support_inheritpixmap=yes support_tinting=yes @@ -118,9 +106,6 @@ support_selectionscrolling=yes support_mousewheel=yes support_mouseslipwheel=yes -support_utmp=yes -support_wtmp=yes -support_lastlog=yes support_text_blink=yes support_pointer_blank=yes support_scroll_rxvt=yes @@ -154,7 +139,6 @@ NOTE: automatically enabled with --enable-shared], [ if test x$enableval = xno; then - support_24bit=no support_frills=no support_inheritpixmap=no support_tinting=no @@ -184,7 +168,6 @@ codesets= fi if test x$enableval = xyes; then - support_24bit=yes support_frills=yes support_inheritpixmap=yes support_tinting=yes @@ -239,24 +222,6 @@ support_styles=$enableval fi]) -AC_ARG_ENABLE(utmp, - [ --enable-utmp enable utmp (utmpx) support], - [if test x$enableval = xyes -o x$enableval = xno; then - support_utmp=$enableval - fi]) - -AC_ARG_ENABLE(wtmp, - [ --enable-wtmp enable wtmp (wtmpx) support (requires --enable-utmp)], - [if test x$enableval = xyes -o x$enableval = xno; then - support_wtmp=$enableval - fi]) - -AC_ARG_ENABLE(lastlog, - [ --enable-lastlog enable lastlog support (requires --enable-utmp)], - [if test x$enableval = xyes -o x$enableval = xno; then - support_lastlog=$enableval - fi]) - AC_ARG_ENABLE(xpm-background, [ --enable-xpm-background enable XPM background pixmaps], [if test x$enableval = xyes -o x$enableval = xno; then @@ -327,12 +292,6 @@ support_xim=$enableval fi]) -AC_ARG_ENABLE(ttygid, - [ --enable-ttygid enable tty setting to group named "tty"], - [if test x$enableval = xyes; then - AC_DEFINE(TTY_GID_SUPPORT, 1, Define to change gid of ttys to group tty) - fi]) - AC_ARG_ENABLE(backspace-key, [ --disable-backspace-key disable handling of the backspace key], [if test x$enableval = xno; then @@ -409,12 +368,6 @@ support_frills=$enableval fi]) -AC_ARG_ENABLE(24bit, - [ --enable-24bit enable support for using 24bit visuals if available], - [if test x$enableval = xyes -o x$enableval = xno; then - support_24bit=$enableval - fi]) - AC_ARG_ENABLE(keepscrolling, [ --enable-keepscrolling enable continual scrolling on scrollbar arrow press], [if test x$enableval = xyes -o x$enableval = xno; then @@ -439,25 +392,6 @@ support_mouseslipwheel=$enableval fi]) -AC_ARG_ENABLE(dmalloc, - [ --enable-dmalloc enable Gray Watson's malloc - for debugging use], - [if test x$enableval = xyes; then - MALLOC_TYPE=G - DEBUG=-DDEBUG_MALLOC - DLIB="-L/usr/local/lib -ldmalloc" - DINCLUDE=-I/usr/local/include - fi]) - -AC_ARG_ENABLE(dlmalloc, - [ --enable-dlmalloc enable Doug Lea's malloc - for production use - NOTE: enable only one malloc package], - [if test x$enableval = xyes; then - MALLOC_TYPE=D - DEBUG= - DLIB="-L/usr/local/lib -ldlmalloc" - DINCLUDE= - fi]) - AC_ARG_ENABLE(smart-resize, [ --enable-smart-resize enable smart growth/shrink behaviour], [if test x$enableval = xyes; then @@ -491,7 +425,6 @@ dnl# -------------------------------------------------------------------------- AC_PATH_PROG(MV, mv, mv) -AC_PATH_PROG(RM, rm, rm) AC_PATH_PROG(CP, cp, cp) AC_PATH_PROG(LN, ln, ln) AC_PATH_PROG(SED, sed, sed) @@ -711,11 +644,7 @@ AC_CHECK_FUNCS( \ unsetenv \ setutent \ - seteuid \ - setresuid \ - setreuid \ on_exit \ - nanosleep \ ) UTMP_CHECK @@ -783,42 +712,7 @@ AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) fi -AC_CACHE_CHECK(for unix-compliant filehandle passing ability, rxvt_can_pass_fds, -[AC_TRY_LINK([ -#include // broken bsds (is that redundant) need this -#include -#include -#include -],[ -{ - msghdr msg; - iovec iov; - char buf [100]; - char data = 0; - - iov.iov_base = &data; - iov.iov_len = 1; - - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_control = buf; - msg.msg_controllen = sizeof buf; - - cmsghdr *cmsg = CMSG_FIRSTHDR (&msg); - cmsg->cmsg_level = SOL_SOCKET; - cmsg->cmsg_type = SCM_RIGHTS; - cmsg->cmsg_len = 100; - - *(int *)CMSG_DATA (cmsg) = 5; - - return sendmsg (3, &msg, 0); -} -],[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 +SCM_RIGHTS_CHECK AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, [AC_COMPILE_IFELSE([ @@ -838,12 +732,23 @@ PTY_CHECK +TTY_GROUP_CHECK + dnl# -------------------------------------------------------------------------- dnl# now add and remove other stuff dnl# -------------------------------------------------------------------------- if test x$support_xft = xyes; then - LIBS="$LIBS `pkg-config xft --libs`" - CPPFLAGS="$CPPFLAGS `pkg-config xft --cflags`" + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + if test $PKG_CONFIG != no && $PKG_CONFIG --exists xft; then + LIBS="$LIBS `$PKG_CONFIG xft --libs`" + CPPFLAGS="$CPPFLAGS `$PKG_CONFIG xft --cflags`" + else + AC_PATH_PROG(XFT_CONFIG, xft-config, no) + if test $XFT_CONFIG != no; then + LIBS="$LIBS `$XFT_CONFIG --libs`" + CPPFLAGS="$CPPFLAGS `$XFT_CONFIG --cflags`" + fi + fi AC_CHECK_HEADERS(X11/Xft/Xft.h,,[support_xft=no]) AC_CHECK_LIB(Xft,XftDrawString32,,[support_xft=no]) @@ -879,24 +784,12 @@ 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_24bit = xyes; then - AC_DEFINE(PREFER_24BIT, 1, Define to use a 24 bit visual if the screen has 24 bit mode, even if the default is 8 bit) -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_utmp = xyes; then - AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) -fi -if test x$support_wtmp = xyes; then - AC_DEFINE(WTMP_SUPPORT, 1, Define if you want to have wtmp support when utmp/utmpx is enabled) -fi -if test x$support_lastlog = xyes; then - AC_DEFINE(LASTLOG_SUPPORT, 1, Define if you want to have lastlog support when utmp/utmpx is enabled) -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) @@ -1065,37 +958,10 @@ Compiler flags: $CFLAGS Linker: $LINKER" -if test "$MALLOC_TYPE" = S; then - echo " malloc support: system default" -fi -if test "$MALLOC_TYPE" = G; then - echo " malloc support: Gray Watson's dmalloc" -fi -if test "$MALLOC_TYPE" = D; then - echo " malloc support: Doug Lea's malloc" -fi - if test x$support_xpm = xyes; then echo " Xpm library: $XPM_LIBS" fi -echo " -The following are set in config.h -" -if test x$support_utmp != xyes; then - echo " utmp support: disabled" - echo -else - echo " utmp support: enabled - utmp file: $rxvt_cv_path_utmp - utmpx file: $rxvt_cv_path_utmpx - wtmp file: $rxvt_cv_path_wtmp - wtmpx file: $rxvt_cv_path_wtmpx - lastlog file: $rxvt_cv_path_lastlog - ttys/ttytab file: $rxvt_cv_path_ttytab - embedded perl: $support_perl" - echo -fi if test x$term != x; then echo " set TERM to: $term" fi @@ -1108,6 +974,8 @@ echo " resource class fallback: $RESFALLBACK" fi echo +echo " embedded perl: $support_perl" +echo if test x$support_xpm = xneedsmanualspecification; then echo ".----------------------------------------------------------------." echo ". WARNING: --enable-xpm-background was specified however the ." @@ -1126,7 +994,7 @@ echo ".----------------------------------------------------------------." fi -echo " *** Optionally check src/feature.h for further options ***" +echo "*** Optionally check src/feature.h for further, rarely used options ***" echo echo ".----------------------------------------------------------------."