--- rxvt-unicode/autoconf/configure.in 2004/02/25 12:03:47 1.14 +++ rxvt-unicode/autoconf/configure.in 2004/03/05 04:26:54 1.19 @@ -30,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 @@ -63,6 +82,7 @@ support_xpm=no support_xft=no support_unicode3=no +support_combining=no codesets= dnl# -------------------------------------------------------------------------- @@ -76,7 +96,7 @@ 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 @@ -104,33 +124,26 @@ support_xpm=yes support_xft=yes support_unicode3=yes + support_combining=yes codesets=all fi]) 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, @@ -199,6 +212,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 @@ -235,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 @@ -351,7 +401,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]) @@ -1191,13 +1241,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(ENCODING_COMPOSE, 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) ;; @@ -1242,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 " @@ -1297,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" @@ -1332,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 ."