--- rxvt-unicode/autoconf/configure.in 2004/01/16 18:49:33 1.5 +++ rxvt-unicode/autoconf/configure.in 2004/03/14 17:33:07 1.21 @@ -1,7 +1,5 @@ dnl# -*- sh -*- dnl# -dnl# $Id: configure.in,v 1.5 2004/01/16 18:49:33 pcg Exp $ -dnl# dnl# Process this file with autoconf to produce a configure script. dnl# AC_INIT(src/feature.h) @@ -32,6 +30,25 @@ 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" + +if test x$GXX = xyes; then + CXXFLAGS="$CXXFLAGS -fno-exceptions" +fi + +AC_LANG(C++) + dnl# system hacks AC_AIX AC_ISC_POSIX @@ -44,7 +61,6 @@ support_addstrings=no support_frills=no support_linespace=no -support_graphics=no support_inheritpixmap=no support_keepscrolling=no support_selectionscrolling=no @@ -56,14 +72,17 @@ support_wtmp=no support_lastlog=no support_cursor_blink=no +support_text_blink=no support_pointer_blank=no support_scroll_rxvt=no support_scroll_next=no support_scroll_xterm=no +support_scroll_plain=no support_xim=no support_xpm=no support_xft=no support_unicode3=no +support_combining=no codesets= dnl# -------------------------------------------------------------------------- @@ -77,14 +96,13 @@ AC_SUBST(INSTALL_LIBRXVT) AC_ARG_ENABLE(everything, - [ --enable-everything enable standard non-multichoice features: marked * + [ --enable-everything enable standard non-multichoice features NOTE: this option is order dependent NOTE: automatically enabled with --enable-shared], [if test x$enableval = xyes; then support_24bit=yes support_frills=yes support_linespace=yes - support_graphics=yes support_inheritpixmap=yes support_keepscrolling=yes support_selectionscrolling=yes @@ -94,142 +112,116 @@ support_mouseslipwheel=yes support_oldselection=yes support_cursor_blink=yes + support_text_blink=yes support_pointer_blank=yes support_scroll_rxvt=yes support_scroll_next=yes support_scroll_xterm=yes + support_scroll_plain=yes support_utmp=yes support_wtmp=yes support_xim=yes support_xpm=yes support_xft=yes support_unicode3=yes + support_combining=yes codesets=all fi]) -echo -if test x$support_inheritpixmap = xyes; then - support_inheritpixmap=no - echo "******* transparency support disabled, does not work" -fi -if test x$support_xpm = xyes; then - support_xpm=no - echo "******* pixmap support disabled, does not work" -fi -if test x$support_graphics = xyes; then - support_graphics=no - echo "******* graphics support disabled, does not work" -fi -if test x$support_menubar = xyes; then - support_menubar=no - echo "******* menubar support disabled, does not work" -fi -echo - AC_ARG_ENABLE(unicode3, [ --enable-unicode3 use 21 instead of 16 bits to represent unicode characters], - [if test x$enableval = xyes; then + [if test x$enableval = xyes -o x$enableval = xno; then support_unicode3=yes fi]) -AC_ARG_ENABLE(xft, - [ --enable-xft enable xft support on systems that have it], - [if test x$enableval = xyes; 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)], - [if test x$enableval = xyes; then - codesets="$withval" +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_WITH(encoding, - [ --with-encoding=NAME set language default encoding to NAME (default: sjis) - (eucj|sjis|big5|gb|kr|noenc)], - [if test x$enableval = xyes; then - withval=`echo $withval | tr '[a-z]' '[A-Z]'` - AC_DEFINE_UNQUOTED(MULTICHAR_ENCODING, $withval, Define default multichar glyph encoding) +AC_ARG_ENABLE(xft, + [ --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_ENABLE(utmp, - [ --enable-utmp enable utmp (utmpx) support *], + [ --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)*], + [ --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) *], + [ --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 *], + [ --enable-xpm-background enable XPM background pixmaps], [if test x$enableval = xyes -o x$enableval = xno; then support_xpm=$enableval fi]) AC_ARG_ENABLE(transparency, - [ --enable-transparency enable transparent backgrounds *], + [ --enable-transparency enable transparent backgrounds], [if test x$enableval = xyes -o x$enableval = xno; then support_inheritpixmap=$enableval fi]) AC_ARG_ENABLE(menubar, - [ --enable-menubar enable menubar *], + [ --enable-menubar enable menubar], [if test x$enableval = xyes -o x$enableval = xno; then support_menubar=$enableval fi]) -AC_ARG_ENABLE(graphics, - [ --enable-graphics enable rxvt own graphics mode (see src/graphics) *], - [if test x$enableval = xyes -o x$enableval = xno; then - support_graphics=$enableval - fi]) - AC_ARG_ENABLE(rxvt-scroll, - [ --enable-rxvt-scroll enable rxvt style scrollbar *], + [ --enable-rxvt-scroll enable rxvt style scrollbar], [if test x$enableval = xyes -o x$enableval = xno; then support_scroll_rxvt=$enableval fi]) AC_ARG_ENABLE(next-scroll, - [ --enable-next-scroll enable NeXT style scrollbar *], + [ --enable-next-scroll enable NeXT style scrollbar], [if test x$enableval = xyes -o x$enableval = xno; then support_scroll_next=$enableval fi]) AC_ARG_ENABLE(xterm-scroll, - [ --enable-xterm-scroll enable Xterm style scrollbar *], + [ --enable-xterm-scroll enable Xterm style scrollbar], [if test x$enableval = xyes -o x$enableval = xno; then support_scroll_xterm=$enableval fi]) +AC_ARG_ENABLE(plain-scroll, + [ --enable-plain-scroll enable plain style scrollbar], + [if test x$enableval = xyes -o x$enableval = xno; then + support_scroll_plain=$enableval + fi]) + AC_ARG_ENABLE(half-shadow, [ --enable-half-shadow use half width/height shadow on rxvt scrollbar], [if test x$enableval = xyes; then 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 *], + [ --enable-xim XIM (X Input Method) protocol support], [if test x$enableval = xyes -o x$enableval = xno; then support_xim=$enableval fi]) -AC_ARG_ENABLE(greek, - [ --enable-greek enable greek keyboard support], - [if test x$enableval = xyes; then - AC_DEFINE(GREEK_SUPPORT, 1, Define if you want support for Greek Elot-928 & IBM-437 keyboard) - fi]) - AC_ARG_ENABLE(ttygid, [ --enable-ttygid enable tty setting to group named "tty"], [if test x$enableval = xyes; then @@ -260,6 +252,39 @@ AC_DEFINE(USE_XGETDEFAULT, 1, Define if you want to use XGetDefault instead of our internal version) 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 @@ -273,49 +298,49 @@ fi]) AC_ARG_ENABLE(frills, - [ --enable-frills enable support for rarely used features *], + [ --enable-frills enable support for rarely used features], [if test x$enableval = xyes -o x$enableval = xno; then support_frills=$enableval fi]) AC_ARG_ENABLE(linespace, - [ --enable-linespace enable support for linespace *], + [ --enable-linespace enable support for linespace], [if test x$enableval = xyes -o x$enableval = xno; then support_linespace=$enableval fi]) AC_ARG_ENABLE(24bit, - [ --enable-24bit enable support for using 24bit visuals if available *], + [ --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 *], + [ --enable-keepscrolling enable continual scrolling on scrollbar arrow press], [if test x$enableval = xyes -o x$enableval = xno; then support_keepscrolling=$enableval fi]) AC_ARG_ENABLE(selectionscrolling, - [ --enable-selectionscrolling enable scrolling during selections *], + [ --enable-selectionscrolling enable scrolling during selections], [if test x$enableval = xyes -o x$enableval = xno; then support_selectionscrolling=$enableval fi]) AC_ARG_ENABLE(mousewheel, - [ --enable-mousewheel enable scrolling via mouse wheel or buttons 4 & 5 *], + [ --enable-mousewheel enable scrolling via mouse wheel or buttons 4 & 5], [if test x$enableval = xyes -o x$enableval = xno; then support_mousewheel=$enableval fi]) AC_ARG_ENABLE(slipwheeling, - [ --enable-slipwheeling enable slip wheel scrolling (requires previous) *], + [ --enable-slipwheeling enable slip wheel scrolling (requires previous)], [if test x$enableval = xyes -o x$enableval = xno; then support_mouseslipwheel=$enableval fi]) AC_ARG_ENABLE(old-selection, - [ --enable-old-selection enable v2.20 (& prior) mouse selection style support*], + [ --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]) @@ -358,19 +383,25 @@ fi]) AC_ARG_ENABLE(cursor-blink, - [ --enable-cursor-blink enable blinking cursor *], + [ --enable-cursor-blink enable blinking cursor], [if test x$enableval = xyes -o x$enableval = xno; then support_cursor_blink=$enableval fi]) +AC_ARG_ENABLE(text-blink, + [ --enable-text-blink enable blinking text], + [if test x$enableval = xyes -o x$enableval = xno; then + support_text_blink=$enableval + fi]) + AC_ARG_ENABLE(pointer-blank, - [ --enable-pointer-blank enable pointer blank when typing or inactive pointer*], + [ --enable-pointer-blank enable pointer blank when typing or inactive pointer], [if test x$enableval = xyes -o x$enableval = xno; then support_pointer_blank=$enableval fi]) AC_ARG_WITH(term, - [ --with-term=NAME set the terminal to NAME (default \"xterm\")], + [ --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]) @@ -1029,7 +1060,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 @@ -1047,7 +1078,7 @@ 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)]) @@ -1135,9 +1166,6 @@ dnl# -------------------------------------------------------------------------- dnl# now add and remove other stuff dnl# -------------------------------------------------------------------------- -if test x$support_graphics = xyes; then - AC_DEFINE(RXVT_GRAPHICS, 1, Define if you want Rob Nation's own graphic mode) -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 @@ -1197,22 +1225,32 @@ AC_DEFINE(XTERM_SCROLLBAR, 1, Support Xterm style scrollbars) scrolltypes="$scrolltypes xterm" fi +if test x$support_scroll_plain = xyes; then + AC_DEFINE(PLAIN_SCROLLBAR, 1, Support plain style scrollbars) + scrolltypes="$scrolltypes plain" +fi if test x$support_pointer_blank = xyes; then AC_DEFINE(POINTER_BLANK, 1, Define if you want hide the pointer while typing) fi if test x$support_cursor_blink = xyes; then AC_DEFINE(CURSOR_BLINK, 1, Define if you want blinking cursor support) fi +if test x$support_text_blink = xyes; then + AC_DEFINE(TEXT_BLINK, 1, Define if you want blinking text support) +fi 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 europeean extended codesets) + 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) ;; @@ -1257,9 +1295,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 " @@ -1272,10 +1307,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) @@ -1302,7 +1337,6 @@ Makefile \ doc/Makefile \ src/Makefile \ -src/graphics/Makefile \ src/test/Makefile \ src/rxvtlib.h \ W11/Makefile \ @@ -1313,8 +1347,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" @@ -1348,13 +1383,17 @@ " 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 ."