--- rxvt-unicode/autoconf/configure.in 2004/02/29 22:32:31 1.15 +++ rxvt-unicode/autoconf/configure.in 2004/07/30 16:04:05 1.30 @@ -30,10 +30,36 @@ AC_PROG_INSTALL AC_PROG_AWK +AC_LANG(C) + +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]) + +CPPFLAGS="-D_GNU_SOURCE -D_XOPEN_SOURCE" + +dnl if test x$GXX = xyes; then +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_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]) + +dnl solaris needs to link libnsl and socket +AC_CHECK_LIB(nsl, gethostbyname, [LIBS="$LIBS -lnsl"]) +AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"]) + AC_ENABLE_SHARED(no)dnl# libtool AC_ENABLE_STATIC(yes)dnl# libtool AC_PROG_LIBTOOL()dnl# libtool @@ -43,12 +69,13 @@ support_frills=no support_linespace=no support_inheritpixmap=no +support_tinting=no +support_fading=no support_keepscrolling=no support_selectionscrolling=no support_menubar=no support_mousewheel=no support_mouseslipwheel=no -support_oldselection=no support_utmp=no support_wtmp=no support_lastlog=no @@ -63,6 +90,8 @@ support_xpm=no support_xft=no support_unicode3=no +support_combining=no +support_8bitctrls=no codesets= dnl# -------------------------------------------------------------------------- @@ -84,13 +113,14 @@ support_frills=yes support_linespace=yes support_inheritpixmap=yes + support_tinting=yes + support_fading=yes support_keepscrolling=yes support_selectionscrolling=yes support_lastlog=yes support_menubar=yes support_mousewheel=yes support_mouseslipwheel=yes - support_oldselection=yes support_cursor_blink=yes support_text_blink=yes support_pointer_blank=yes @@ -104,6 +134,8 @@ support_xpm=yes support_xft=yes support_unicode3=yes + support_combining=yes + #support_8bitctrls=yes codesets=all fi]) @@ -113,16 +145,18 @@ support_unicode3=yes fi]) +AC_ARG_ENABLE(combining, + [ --enable-combining enable composition of base and combining characters], + [if test x$enableval = xyes -o x$enableval = xno; then + support_combining=yes + fi]) + AC_ARG_ENABLE(xft, - [ --enable-xft enable xft support on systems that have it], + [ --enable-xft enable xft support on systems that have it], [if test x$enableval = xyes -o x$enableval = xno; then support_xft=yes fi]) -AC_ARG_WITH(codesets, - [ --with-codesets=NAME,... compile in additional codesets (jp,jp_ext,kr,cn,cn_ext,vn,all)], - [codesets="$withval"]) - AC_ARG_ENABLE(utmp, [ --enable-utmp enable utmp (utmpx) support], [if test x$enableval = xyes -o x$enableval = xno; then @@ -153,6 +187,18 @@ support_inheritpixmap=$enableval fi]) +AC_ARG_ENABLE(tinting, + [ --enable-tinting enable tinting of transparent bg], + [if test x$enableval = xyes -o x$enableval = xno; then + support_tinting=$enableval + fi]) + +AC_ARG_ENABLE(fading, + [ --enable-fading enable colors fading when off focus], + [if test x$enableval = xyes -o x$enableval = xno; then + support_fading=$enableval + fi]) + AC_ARG_ENABLE(menubar, [ --enable-menubar enable menubar], [if test x$enableval = xyes -o x$enableval = xno; then @@ -189,6 +235,10 @@ AC_DEFINE(HALFSHADOW, 1, Define if you want the depth of scrollbars and menus to be less) fi]) +AC_ARG_WITH(codesets, + [ --with-codesets=NAME,.. compile in additional codesets (jp,jp_ext,kr,cn,cn_ext,all)], + [codesets="$withval"]) + AC_ARG_ENABLE(xim, [ --enable-xim XIM (X Input Method) protocol support], [if test x$enableval = xyes -o x$enableval = xno; then @@ -225,6 +275,45 @@ AC_DEFINE(USE_XGETDEFAULT, 1, Define if you want to use XGetDefault instead of our internal version) fi]) +AC_ARG_ENABLE(8bitctrls, + [ --enable-8bitctrls enable 8 bit control sequences (not recommended)], + [if test x$enableval = xyes -o x$enableval = xno; then + support_8bitctrls=yes + fi]) + +RESFALLBACK=Rxvt +AC_ARG_ENABLE(fallback, + [ --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt)], + [ + test x$enableval = xyes && enableval=Rxvt + test x$enableval = xno && enableval= + RESFALLBACK="$enableval" + ]) + +if test x$RESFALLBACK != x; then + AC_DEFINE_UNQUOTED(RESFALLBACK, "$RESFALLBACK", [Fallback resource class]) +fi + +RESNAME=urxvt +AC_ARG_WITH(res-name, + [ --with-res-name=NAME use this as default resource name (default: urxvt)], + [RESNAME="$withval"]) +AC_DEFINE_UNQUOTED(RESNAME,"$RESNAME", [Default resource name]) + +RESCLASS=URxvt +AC_ARG_WITH(res-class, + [ --with-res-class=CLASS use this as the resource class (default: URxvt)], + [RESCLASS="$withval"]) +AC_DEFINE_UNQUOTED(RESCLASS,"$RESCLASS", [Resource class]) + +RXVTNAME=urxvt +AC_ARG_WITH(name, + [ --with-name=NAME set the basename for the installed binaries (default: urxvt)], + [RXVTNAME="$withval"]) + +RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"` +AC_SUBST(RXVTNAME) + AC_ARG_ENABLE(strings, [ --enable-strings enable some replacement system functions], [if test x$enableval = xyes -o x$enableval = xno; then @@ -279,18 +368,6 @@ support_mouseslipwheel=$enableval fi]) -AC_ARG_ENABLE(old-selection, - [ --enable-old-selection enable v2.20 (& prior) mouse selection style support], - [if test x$enableval = xyes -o x$enableval = xno; then - support_oldselection=$enableval - fi]) - -AC_ARG_ENABLE(new-selection, - [ --disable-new-selection disable new mouse (xterm) selection style support], - [if test x$enableval = xno; then - AC_DEFINE(NO_NEW_SELECTION, 1, Define to remove xterm style mouse selection) - fi]) - AC_ARG_ENABLE(dmalloc, [ --enable-dmalloc enable Gray Watson's malloc - for debugging use], [if test x$enableval = xyes; then @@ -341,7 +418,7 @@ fi]) AC_ARG_WITH(term, - [ --with-term=NAME set the terminal to NAME (default \"rxvt\")], + [ --with-term=NAME set the terminal to NAME (default: rxvt)], [if test x$withval != x; then AC_DEFINE_UNQUOTED(TERMENV, "$withval",Set TERM to the value given by configure) term="$withval" fi]) @@ -1000,7 +1077,7 @@ CFLAGS=$ac_save_CFLAGS AC_CACHE_CHECK(for working plain setlocale, rxvt_cv_func_setlocale, -[AC_TRY_LINK([#include ], +[AC_TRY_LINK([#include ], [setlocale(LC_CTYPE, "");], rxvt_cv_func_setlocale=yes, rxvt_cv_func_setlocale=no)]) if test x$rxvt_cv_func_setlocale = xyes; then @@ -1015,10 +1092,26 @@ AC_DEFINE(HAVE_NL_LANGINFO, 1, Define if nl_langinfo(CODESET) works) fi +AC_CACHE_CHECK(for broken XIM callback, rxvt_broken_ximcb, +[AC_COMPILE_IFELSE([ +#include + +void im_destroy_cb (XIC unused1, XPointer client_data, XPointer unused3); + +void f() { + XIMCallback cb; + cb.callback = im_destroy_cb; +} +],rxvt_broken_ximcb=yes,rxvt_broken_ximcb=no)]) + +if test x$rxvt_broken_ximcb = xyes; then + AC_DEFINE(XIMCB_PROTO_BROKEN, 1, Define if your XIMCallback specifies XIC as first type.) +fi + AC_CACHE_CHECK(for getpt, rxvt_cv_func_getpt, [AC_TRY_LINK([#define _GNU_SOURCE #ifdef HAVE_STDLIB_H -# include +# include #endif], [(void)getpt();], rxvt_cv_func_getpt=yes, rxvt_cv_func_getpt=no)]) @@ -1100,12 +1193,18 @@ AC_DEFINE_UNQUOTED(PTYCHAR2, "$pch2", Define for second char in devptyXX) fi -dnl# FreeBSD needs to link libxpg4 -AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"]) - dnl# -------------------------------------------------------------------------- dnl# now add and remove other stuff dnl# -------------------------------------------------------------------------- +if test x$support_8bitctrls = xyes; then + AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences) +fi +if test x$support_fading = xyes; then + AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost) +fi +if test x$support_tinting = xyes; then + AC_DEFINE(TINTING, 1, Define if you want your background to be tinted) +fi if test x$support_inheritpixmap = xyes; then AC_DEFINE(TRANSPARENT, 1, Define if you want your background to use the parent window background) fi @@ -1133,9 +1232,6 @@ 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_oldselection = xno; then - AC_DEFINE(NO_OLD_SELECTION, 1, Define to remove old rxvt (ver 2.20 and before) style selection) -fi if test x$support_utmp = xyes; then AC_DEFINE(UTMP_SUPPORT, 1, Define if you want to have utmp/utmpx support) fi @@ -1181,13 +1277,16 @@ if test x$support_unicode3 = xyes; then AC_DEFINE(UNICODE_3, 1, Define if you want to represent unicode characters outside plane 0) fi +if test x$support_combining = xyes; then + AC_DEFINE(ENABLE_COMBINING, 1, Define if you want to automatically compose combining characters) +fi if test x$codesets = xall; then - codesets=jp,jp-ext,kr,cn,cn-ext,vn + codesets=jp,jp-ext,kr,cn,cn-ext fi for codeset in `echo $codesets | tr "[a-z,\\-]" "[A-Z _]"`; do AC_DEFINE(ENCODING_EU, 1, Define if you want european extended codesets) + AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets) case "$codeset" in - VN ) AC_DEFINE(ENCODING_VN, 1, Define if you want vietnamese codesets) ;; JP ) AC_DEFINE(ENCODING_JP, 1, Define if you want japanese codesets) ;; JP_EXT ) AC_DEFINE(ENCODING_JP_EXT, 1, Define if you want extended japanese codesets) ;; KR ) AC_DEFINE(ENCODING_KR, 1, Define if you want korean codesets) ;; @@ -1232,9 +1331,6 @@ AC_ARG_PROGRAM -RXVTNAME=`echo rxvt|sed "$program_transform_name"` -AC_SUBST(RXVTNAME) - dnl# test for "sun" or "__sun__" before include sys_ioctl dnl# revert HAVE_BLAH_H into a "#include " @@ -1247,10 +1343,10 @@ AC_SUBST($1)]) RXVT_DEFINE_TO_INCLUDE(include_stdint_h, stdint.h, ac_cv_header_stdint_h, yes, notset, dontmatch) -RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, stdarg.h, ac_cv_header_stdarg_h, yes, notset, dontmatch) -RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, stdlib.h, ac_cv_header_stdlib_h, yes, notset, dontmatch) +RXVT_DEFINE_TO_INCLUDE(include_stdarg_h, cstdarg, ac_cv_header_stdarg_h, yes, notset, dontmatch) +RXVT_DEFINE_TO_INCLUDE(include_stdlib_h, cstdlib, ac_cv_header_stdlib_h, yes, notset, dontmatch) RXVT_DEFINE_TO_INCLUDE(include_unistd_h, unistd.h, ac_cv_header_unistd_h, yes, notset, dontmatch) -RXVT_DEFINE_TO_INCLUDE(include_string_h, string.h, ac_cv_header_string_h, yes, notset, dontmatch) +RXVT_DEFINE_TO_INCLUDE(include_string_h, cstring, ac_cv_header_string_h, yes, notset, dontmatch) RXVT_DEFINE_TO_INCLUDE(include_fcntl_h, fcntl.h, ac_cv_header_fcntl_h, yes, notset, dontmatch) RXVT_DEFINE_TO_INCLUDE(include_util_h, util.h, ac_cv_header_util_h, yes, notset, dontmatch) RXVT_DEFINE_TO_INCLUDE(include_assert_h, assert.h, ac_cv_header_assert_h, yes, notset, dontmatch) @@ -1287,8 +1383,9 @@ Rxvt version: $VERSION : $DATE Source code location: $srcdir Install path: ${prefix}/bin - Compiler: $CC - Compiler flags: $CFLAGS" + Compiler: $CXX + Compiler flags: $CFLAGS + Linker: $LINKER" if test "$MALLOC_TYPE" = S; then echo " malloc support: system default" @@ -1309,8 +1406,8 @@ " echo " pty/tty type: "$rxvt_cv_ptys if test x$support_utmp != xyes; then - echo " utmp support: disabled -" + echo " utmp support: disabled" + echo else echo " utmp support: enabled utmp file: $rxvt_cv_path_utmp @@ -1318,17 +1415,21 @@ 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 -" + ttys/ttytab file: $rxvt_cv_path_ttytab" + echo fi if test x$term != x; then - echo " set TERM to: $term -" + echo " set TERM to: $term" fi if test x$terminfo != x; then - echo " set TERMINFO to: $terminfo -" + echo " set TERMINFO to: $terminfo" fi +echo " default resource name: $RESNAME" +echo " resource class: $RESCLASS" +if test x$RESFALLBACK != x; then + echo " resource class fallback: $RESFALLBACK" +fi +echo if test x$rxvt_cv_ptys = xUNKNOWN; then echo ".----------------------------------------------------------------." echo ". WARNING: could not determine pty/tty type. Do not build until ." @@ -1352,5 +1453,13 @@ echo ". XIM is now being DISABLED! ." echo ".----------------------------------------------------------------." fi -echo " *** Please check src/feature.h for further options *** -" + +echo " *** Please check src/feature.h for further options ***" +echo + +echo ".----------------------------------------------------------------." +echo ". NOTE: most features are disabled by default, try ." +echo ". configure --help to get an idea of the optional features ." +echo ".----------------------------------------------------------------." +echo +