--- rxvt-unicode/configure 2006/01/11 00:59:58 1.65 +++ rxvt-unicode/configure 2006/01/17 15:41:32 1.77 @@ -310,7 +310,7 @@ #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os VERSION DATE LSMDATE LIBVERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AWK LINKER CXXCPP EGREP INSTALL_LIBRXVT RXVTNAME MV RM CP LN SED ECHO CMP TBL TIC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XPM_CPPFLAGS XPM_CFLAGS XPM_LIBS rxvt_int16_typedef rxvt_uint16_typedef rxvt_int32_typedef rxvt_uint32_typedef rxvt_intp_define rxvt_u_intp_define PERL PERLLIB PERLFLAGS PERLPRIVLIBEXP IF_PERL PERL_O DEBUG DINCLUDE DLIB include_stdint_h include_stdarg_h include_stdlib_h include_unistd_h include_string_h include_fcntl_h include_util_h include_assert_h include_sys_ioctl_h include_sys_select_h include_sys_strredir_h include_sys_time_h include_time_h LIBOBJS LTLIBOBJS' -ac_subst_files='MCOMMON' +ac_subst_files='' # Initialize some variables set by options. ac_init_help= @@ -879,13 +879,11 @@ --enable-transparency enable transparent backgrounds --enable-tinting enable tinting of transparent bg --enable-fading enable colors fading when off focus - --enable-menubar enable menubar --enable-rxvt-scroll enable rxvt style scrollbar --enable-next-scroll enable NeXT style scrollbar --enable-xterm-scroll enable Xterm style scrollbar --enable-perl enable embedded perl interpreter --enable-plain-scroll enable plain style scrollbar - --enable-half-shadow use half width/height shadow on rxvt scrollbar --enable-xim XIM (X Input Method) protocol support --enable-ttygid enable tty setting to group named "tty" --disable-backspace-key disable handling of the backspace key @@ -893,7 +891,6 @@ --disable-resources disable all resource checking --enable-8bitctrls enable 8 bit control sequences (not recommended) --enable-fallback(=CLASS) fall back on CLASS resources in addition to URxvt ones (default: Rxvt) - --enable-strings enable some replacement system functions --disable-swapscreen disable swap screen support --enable-iso14755 enable support for extended ISO 14755 modes --enable-frills enable support for rarely used features @@ -1374,8 +1371,12 @@ + + ac_config_headers="$ac_config_headers config.h:config.h.in" + + ac_aux_dir= -for ac_dir in autoconf $srcdir/autoconf; do +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -1391,17 +1392,14 @@ fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in autoconf $srcdir/autoconf" >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - ac_config_headers="$ac_config_headers config.h:autoconf/config.h.in" - - # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 @@ -1463,6 +1461,8 @@ echo "configuring for rxvt $VERSION" echo "" +orig_CXXFLAGS="$CXXFLAGS" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3101,9 +3101,10 @@ if test -z "$orig_CXXFLAGS"; then - CXXFLAGS='-O' if test x$GCC = xyes && test "x$GXX" = xyes; then CXXFLAGS="-g -O3" + else + CXXFLAGS="-O" fi CFLAGS="$CXXFLAGS" fi @@ -4319,14 +4320,12 @@ MALLOC_TYPE=S -support_addstrings=no support_frills=yes support_inheritpixmap=yes support_tinting=yes support_fading=yes support_keepscrolling=yes support_selectionscrolling=yes -support_menubar=no support_mousewheel=yes support_mouseslipwheel=yes support_utmp=yes @@ -4373,7 +4372,6 @@ support_keepscrolling=no support_selectionscrolling=no support_lastlog=no - support_menubar=no support_mousewheel=no support_mouseslipwheel=no support_text_blink=no @@ -4404,7 +4402,6 @@ support_keepscrolling=yes support_selectionscrolling=yes support_lastlog=yes - support_menubar=yes support_mousewheel=yes support_mouseslipwheel=yes support_text_blink=yes @@ -4517,14 +4514,6 @@ fi fi; -# Check whether --enable-menubar or --disable-menubar was given. -if test "${enable_menubar+set}" = set; then - enableval="$enable_menubar" - if test x$enableval = xyes -o x$enableval = xno; then - support_menubar=$enableval - fi -fi; - # Check whether --enable-rxvt-scroll or --disable-rxvt-scroll was given. if test "${enable_rxvt_scroll+set}" = set; then enableval="$enable_rxvt_scroll" @@ -4565,17 +4554,6 @@ fi fi; -# Check whether --enable-half-shadow or --disable-half-shadow was given. -if test "${enable_half_shadow+set}" = set; then - enableval="$enable_half_shadow" - if test x$enableval = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define HALFSHADOW 1 -_ACEOF - - fi -fi; # Check whether --with-codesets or --without-codesets was given. @@ -4709,14 +4687,6 @@ RXVTNAME=`echo "$RXVTNAME"|sed "$program_transform_name"` -# Check whether --enable-strings or --disable-strings was given. -if test "${enable_strings+set}" = set; then - enableval="$enable_strings" - if test x$enableval = xyes -o x$enableval = xno; then - support_addstrings=$enableval - fi -fi; - # Check whether --enable-swapscreen or --disable-swapscreen was given. if test "${enable_swapscreen+set}" = set; then enableval="$enable_swapscreen" @@ -10162,13 +10132,6 @@ -case "$host_alias" in - *ultrix) ac_cv_func_setsid='no' ;; - *) break;; -esac - - - @@ -10187,17 +10150,15 @@ for ac_func in \ - atexit \ revoke \ unsetenv \ setutent \ seteuid \ + setresuid \ setreuid \ - setsid \ - setpgrp \ - setpgid \ - openpty \ _getpty \ + getpt \ + posix_openpt \ grantpt \ unlockpt \ isastream \ @@ -11928,6 +11889,10 @@ #define HAVE_UNIX_FDPASS 1 _ACEOF +else + { { echo "$as_me:$LINENO: error: urxvt requires unix-compliant filehandle passing ability" >&5 +echo "$as_me: error: urxvt requires unix-compliant filehandle passing ability" >&2;} + { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: checking for broken XIM callback" >&5 @@ -11988,9 +11953,10 @@ fi -echo "$as_me:$LINENO: checking for getpt" >&5 -echo $ECHO_N "checking for getpt... $ECHO_C" >&6 -if test "${rxvt_cv_func_getpt+set}" = set; then +if test x$ac_cv_func_getpt = xno -a x$ac_cv_func_posix_openpt = xno; then + echo "$as_me:$LINENO: checking for openpty" >&5 +echo $ECHO_N "checking for openpty... $ECHO_C" >&6 +if test "${ac_cv_func_openpty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -11999,14 +11965,47 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define _GNU_SOURCE -#ifdef HAVE_STDLIB_H -# include +/* Define openpty to an innocuous variant, in case declares openpty. + For example, HP-UX 11i declares gettimeofday. */ +#define openpty innocuous_openpty + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char openpty (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include #endif + +#undef openpty + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char openpty (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_openpty) || defined (__stub___openpty) +choke me +#else +char (*f) () = openpty; +#endif +#ifdef __cplusplus +} +#endif + int main () { -(void)getpt(); +return f != openpty; ; return 0; } @@ -12032,23 +12031,89 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - rxvt_cv_func_getpt=yes + ac_cv_func_openpty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -rxvt_cv_func_getpt=no +ac_cv_func_openpty=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $rxvt_cv_func_getpt" >&5 -echo "${ECHO_T}$rxvt_cv_func_getpt" >&6 -if test x$rxvt_cv_func_getpt = xyes; then +echo "$as_me:$LINENO: result: $ac_cv_func_openpty" >&5 +echo "${ECHO_T}$ac_cv_func_openpty" >&6 +if test $ac_cv_func_openpty = yes; then + : +else + echo "$as_me:$LINENO: checking for openpty in -lutil" >&5 +echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6 +if test "${ac_cv_lib_util_openpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETPT 1 +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char openpty (); +int +main () +{ +openpty (); + ; + return 0; +} _ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_openpty=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_util_openpty=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5 +echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6 +if test $ac_cv_lib_util_openpty = yes; then + LIBS="$LIBS -lutil" +fi + +fi fi @@ -12057,16 +12122,18 @@ if test "${rxvt_cv_ptys+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test x$ac_cv_func_openpty = xyes; then + if test x$ac_cv_func_openpty = xyes -o x$ac_cv_lib_util_openpty = xyes; then rxvt_cv_ptys=OPENPTY + else if test x$ac_cv_func_getpt = xyes; then + rxvt_cv_ptys=GLIBC + else if test x$ac_cv_func_posix_openpt = xyes; then + rxvt_cv_ptys=POSIX else if test x$ac_cv_func__getpty = xyes; then rxvt_cv_ptys=SGI4 else if test -c /dev/ttyp20; then rxvt_cv_ptys=SCO else if test -c /dev/ptym/clone; then rxvt_cv_ptys=HPUX - else if test x$rxvt_cv_func_getpt = xyes; then - rxvt_cv_ptys=GLIBC else if test -c /dev/ptc -a -c /dev/pts; then rxvt_cv_ptys=PTC else if test -c /dev/ptc -a -d /dev/pts; then @@ -12086,57 +12153,58 @@ fi fi fi +fi fi echo "$as_me:$LINENO: result: $rxvt_cv_ptys" >&5 echo "${ECHO_T}$rxvt_cv_ptys" >&6 -if test x$rxvt_cv_ptys = xOPENPTY; then +if test x$rxvt_cv_ptys = xGLIBC; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_OPENPTY 1 +#define PTYS_ARE_GETPT 1 _ACEOF fi -if test x$rxvt_cv_ptys = xSCO; then +if test x$rxvt_cv_ptys = xPOSIX; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_NUMERIC 1 +#define PTYS_ARE_POSIX 1 _ACEOF fi -if test x$rxvt_cv_ptys = xSTREAMS; then +if test x$rxvt_cv_ptys = xOPENPTY; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_PTMX 1 +#define PTYS_ARE_OPENPTY 1 _ACEOF fi -if test x$rxvt_cv_ptys = xPTC; then +if test x$rxvt_cv_ptys = xSCO; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_PTC 1 +#define PTYS_ARE_NUMERIC 1 _ACEOF fi -if test x$rxvt_cv_ptys = xSGI4; then +if test x$rxvt_cv_ptys = xSTREAMS; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE__GETPTY 1 +#define PTYS_ARE_PTMX 1 _ACEOF fi -if test x$rxvt_cv_ptys = xCONVEX; then +if test x$rxvt_cv_ptys = xPTC; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_GETPTY 1 +#define PTYS_ARE_PTC 1 _ACEOF fi -if test x$rxvt_cv_ptys = xGLIBC; then +if test x$rxvt_cv_ptys = xSGI4; then cat >>confdefs.h <<\_ACEOF -#define PTYS_ARE_GETPT 1 +#define PTYS_ARE__GETPTY 1 _ACEOF fi @@ -12147,7 +12215,7 @@ _ACEOF fi -if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xGLIBC; then +if test x$rxvt_cv_ptys = xBSD -o x$rxvt_cv_ptys = xHPUX -o x$rxvt_cv_ptys = xPOSIX; then cat >>confdefs.h <<\_ACEOF #define PTYS_ARE_SEARCHED 1 @@ -12471,13 +12539,6 @@ _ACEOF fi -if test x$support_menubar = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define MENUBAR 1 -_ACEOF - -fi if test x$support_frills = xyes; then cat >>confdefs.h <<\_ACEOF @@ -12803,15 +12864,14 @@ PERLLIB="`$PERL -MExtUtils::Embed -e ldopts`" PERLPRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`" else - support_perl=no - echo "$as_me:$LINENO: result: no, unable to link" >&5 -echo "${ECHO_T}no, unable to link" >&6 + { { echo "$as_me:$LINENO: error: no, unable to link" >&5 +echo "$as_me: error: no, unable to link" >&2;} + { (exit 1); exit 1; }; } fi else - { { echo "$as_me:$LINENO: error: no working perl found" >&5 -echo "$as_me: error: no working perl found" >&2;} - { (exit or perl not version >= 5.8); exit or perl not version >= 5.8; }; } - support_perl=no + { { echo "$as_me:$LINENO: error: no working perl found, or perl not version >= 5.8" >&5 +echo "$as_me: error: no working perl found, or perl not version >= 5.8" >&2;} + { (exit 1); exit 1; }; } fi fi @@ -12821,7 +12881,7 @@ -if text x$support_perl = xyes; then +if test x$support_perl = xyes; then support_frills=yes fi @@ -12849,17 +12909,6 @@ -if test x$support_addstrings = xno; then - -cat >>confdefs.h <<\_ACEOF -#define NO_STRINGS 1 -_ACEOF - -fi - -MCOMMON=./autoconf/Make.common - - test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. @@ -12943,7 +12992,7 @@ include_time_h="/* #include */" fi - ac_config_files="$ac_config_files autoconf/Make.common Makefile doc/Makefile src/Makefile src/rxvtlib.h" + ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile src/rxvtlib.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -13470,12 +13519,11 @@ do case "$ac_config_target" in # Handling of arguments. - "autoconf/Make.common" ) CONFIG_FILES="$CONFIG_FILES autoconf/Make.common" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/rxvtlib.h" ) CONFIG_FILES="$CONFIG_FILES src/rxvtlib.h" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:autoconf/config.h.in" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.h.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; @@ -13638,8 +13686,6 @@ s,@include_time_h@,$include_time_h,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t -/@MCOMMON@/r $MCOMMON -s,@MCOMMON@,,;t t CEOF _ACEOF