XFree86 3.9p - xterm patch #51 - 1997/9/15 - T.Dickey Most of this patch is related to the standalone configure script, though there are fixes/enhancements as well: + add a new resource sunKeyboard, with associated command-line option and menu-toggle that allows using a normal Sun or PC keyboard to generated the complete DEC-style function keys and keypad. + correct a reversed foreground/background test in the control sequence that replies with the current SGR settings. + correct, by invoking XSync, a display problem that caused the program to not properly update newly exposed areas when a font change or 80/132 resize request was not completely accepted. + restructured autoconf macros (I made a library of all of the macros across the complicated configure scripts I'm working on). + use the autoconf config.guess and config.sub scripts to better identify the host-os. + improve the configure script that uses 'imake' as a fallback for definitions. + correct several instances of unsigned/signed mixed expressions. I've tested the configure script on Linux, SunOS 4.1.3, Solaris 2.5.1, IRIX 5.2 and 6.2, AIX 3.2.5 and CLIX 3.1 (all but the last run properly as well). -------------------------------------------------------------------------------- Makefile.in | 9 Tekproc.c | 5 XTerm.ad | 1 aclocal.m4 | 307 ++++++---- charproc.c | 12 configure | 1413 ++++++++++++++++++++++++++++++++---------------- configure.in | 18 data.c | 3 data.h | 8 input.c | 31 - main.c | 15 menu.c | 59 +- menu.h | 11 misc.c | 6 os2main.c | 15 print.c | 10 ptyx.h | 10 screen.c | 2 scrollbar.c | 3 util.c | 8 xterm-51/config.guess | 696 +++++++++++++++++++++++ xterm-51/config.sub | 927 +++++++++++++++++++++++++++++++ xterm.h | 14 xterm.man | 16 xtermcfg.hin | 2 25 files changed, 2965 insertions, 636 deletions -------------------------------------------------------------------------------- Index: Makefile.in --- xterm/Makefile.in Wed Aug 27 06:48:32 1997 +++ xterm-51/Makefile.in Sun Sep 14 19:00:14 1997 @@ -11,7 +11,8 @@ INSTALL_DATA = @INSTALL_DATA@ IMAKE_CFLAGS = @IMAKE_CFLAGS@ -CFLAGS = @CFLAGS@ $(IMAKE_CFLAGS) +EXTRA_CFLAGS = @EXTRA_CFLAGS@ +CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS) $(IMAKE_CFLAGS) LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ @@ -58,11 +59,11 @@ .SUFFIXES : .i .c.o: -@SHOW_CC@ +@RULE_CC@ @ECHO_CC@$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/$*.c .c.i: -@SHOW_CC@ +@RULE_CC@ @ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@ xterm : $(OBJS1) @@ -87,7 +88,7 @@ $(mandir)/resize.$(manext) mostlyclean: - -$(RM) *.[oi] core *~ *.BAK + -$(RM) *.[oi] .pure core *~ *.BAK clean: mostlyclean -$(RM) $(PROGRAMS) Index: Tekproc.c --- xterm/Tekproc.c Wed Aug 27 06:48:32 1997 +++ xterm-51/Tekproc.c Mon Sep 15 19:50:38 1997 @@ -682,7 +682,7 @@ int c2, len = 0; while ((c2 = Tinput()) != BEL) { if (!isprint(c2 & 0x7f) - || len+2 >= sizeof(buf2)) + || len+2 >= (int) sizeof(buf2)) break; buf2[len++] = c2; } @@ -1269,7 +1269,8 @@ */ static void TekInitialize(request, new, args, num_args) - Widget request, new GCC_UNUSED; + Widget request GCC_UNUSED; + Widget new GCC_UNUSED; ArgList args GCC_UNUSED; Cardinal *num_args GCC_UNUSED; { Index: XTerm.ad --- xterm/XTerm.ad Wed Aug 27 06:48:32 1997 +++ xterm-51/XTerm.ad Mon Sep 15 20:51:48 1997 @@ -23,6 +23,7 @@ *mainMenu*8-bit control*Label: 8-Bit Controls *mainMenu*backarrow key*Label: Backarrow Key *mainMenu*sun function keys*Label: Sun Function-Keys +*mainMenu*sun keyboard*Label: Sun/PC Keyboard *mainMenu*suspend*Label: Send STOP Signal *mainMenu*continue*Label: Send CONT Signal *mainMenu*interrupt*Label: Send INT Signal Index: aclocal.m4 --- xterm/aclocal.m4 Wed Aug 27 06:48:32 1997 +++ xterm-51/aclocal.m4 Mon Sep 15 18:25:45 1997 @@ -25,13 +25,14 @@ dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl dnl --------------------------------------------------------------------------- +dnl --------------------------------------------------------------------------- dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' dnl in the sharutils 4.2 distribution. -dnl -AC_DEFUN([CF_ANSI_CC], -[AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) -AC_CACHE_VAL(cf_cv_ansi_cc, -[cf_cv_ansi_cc=no +AC_DEFUN([CF_ANSI_CC_CHECK], +[ +AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) +AC_CACHE_VAL(cf_cv_ansi_cc,[ +cf_cv_ansi_cc=no cf_save_CFLAGS="$CFLAGS" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. @@ -50,15 +51,23 @@ choke me #endif #endif -], [int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);};], -[cf_cv_ansi_cc="$cf_arg"; break]) +],[ + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);};], + [cf_cv_ansi_cc="$cf_arg"; break]) done CFLAGS="$cf_save_CFLAGS" ]) AC_MSG_RESULT($cf_cv_ansi_cc) -test ".$cf_cv_ansi_cc" != .no && AC_DEFINE(CC_HAS_PROTOS) + +if test "$cf_cv_ansi_cc" != "no"; then +if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then + CFLAGS="$CFLAGS $cf_cv_ansi_cc" +else + AC_DEFINE(CC_HAS_PROTOS) +fi +fi ])dnl dnl --------------------------------------------------------------------------- dnl Allow user to disable a normally-on option. @@ -93,15 +102,22 @@ dnl Check if we're accidentally using a cache from a different machine. dnl Derive the system name, as a check for reusing the autoconf cache. dnl +dnl If we've packaged config.guess and config.sub, run that (since it does a +dnl better job than uname). AC_DEFUN([CF_CHECK_CACHE], [ -system_name="`(uname -s -r) 2>/dev/null`" -if test -n "$system_name" ; then - AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") +if test -f $srcdir/config.guess ; then + AC_CANONICAL_HOST + system_name="$host_os" else - system_name="`(hostname) 2>/dev/null`" + system_name="`(uname -s -r) 2>/dev/null`" + if test -z "$system_name" ; then + system_name="`(hostname) 2>/dev/null`" + fi fi +test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) + test -z "$system_name" && system_name="$cf_cv_system_name" test -n "$cf_cv_system_name" && AC_MSG_RESULT("Configuring for $cf_cv_system_name") @@ -113,15 +129,31 @@ dnl --------------------------------------------------------------------------- dnl You can always use "make -n" to see the actual options, but it's hard to dnl pick out/analyze warning messages when the compile-line is long. +dnl +dnl Sets: +dnl ECHO_LD - symbol to prefix "cc -o" lines +dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o) +dnl SHOW_CC - symbol to put before explicit "cc -c" lines +dnl ECHO_CC - symbol to put before any "cc" line +dnl AC_DEFUN([CF_DISABLE_ECHO],[ AC_MSG_CHECKING(if you want to see long compiling messages) CF_ARG_DISABLE(echo, [ --disable-echo test: display \"compiling\" commands], - [SHOW_CC=' @echo compiling [$]@' - ECHO_CC='@'], - [SHOW_CC='# compiling' - ECHO_CC='']) + [ + ECHO_LD='@echo linking [$]@;' + RULE_CC=' @echo compiling [$]<' + SHOW_CC=' @echo compiling [$]@' + ECHO_CC='@' +],[ + ECHO_LD='' + RULE_CC='# compiling' + SHOW_CC='# compiling' + ECHO_CC='' +]) AC_MSG_RESULT($enableval) +AC_SUBST(ECHO_LD) +AC_SUBST(RULE_CC) AC_SUBST(SHOW_CC) AC_SUBST(ECHO_CC) ])dnl @@ -176,7 +208,8 @@ LIBS="$cf_save_LIBS -l$cf_termlib" AC_TRY_RUN([ /* terminfo implementations ignore the buffer argument, making it useless for - * the xterm application, which uses this information to make a new $TERMCAP + * the xterm application, which uses this information to make a new TERMCAP + * environment variable. */ int main() { @@ -220,7 +253,10 @@ dnl compiler warnings. Though useful, not all are supported -- and contrary dnl to documentation, unrecognized directives cause older compilers to barf. AC_DEFUN([CF_GCC_ATTRIBUTES], -[cat > conftest.i < conftest.i <&AC_FD_CC case $cf_attribute in @@ -287,7 +323,7 @@ fgrep define conftest.i >>confdefs.h fi rm -rf conftest* - +fi ])dnl dnl --------------------------------------------------------------------------- dnl Check if the compiler supports useful warning options. There's a few that @@ -297,12 +333,12 @@ dnl -Wredundant-decls (system headers make this too noisy) dnl -Wtraditional (combines too many unrelated messages, only a few useful) dnl -Wwrite-strings (too noisy, but should review occasionally) +dnl -pedantic dnl AC_DEFUN([CF_GCC_WARNINGS], -[cf_warn_CFLAGS="" +[EXTRA_CFLAGS="" if test -n "$GCC" then - CF_GCC_ATTRIBUTES changequote(,)dnl cat > conftest.$ac_ext </dev/null 2>&AC_FD_CC) -then - CF_VERBOSE(Using $IMAKE) -else - # sometimes imake doesn't have the config path compiled in. Find it. - cf_config= - for cf_libpath in $X_LIBS $LIBS ; do - case $cf_libpath in # (vi - -L*) - cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'` - cf_libpath=$cf_libpath/X11/config - if test -d $cf_libpath ; then - cf_config=$cf_libpath - break - fi - ;; - esac - done - if test -z $cf_config ; then - AC_ERROR(Could not find imake config-directory) - fi - cf_imake_opts="$cf_imake_opts -I$cf_config" - if ( $IMAKE -v $cf_imake_opts 2>&AC_FD_CC) +if mkdir conftestdir; then + cd conftestdir + echo >./Imakefile + test ../Imakefile && cat ../Imakefile >>./Imakefile + cat >> ./Imakefile <<'CF_EOF' +findstddefs: + @echo 'IMAKE_CFLAGS="${STD_DEFINES} ifelse($1,,,$1)"' +CF_EOF + if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&AC_FD_CC && test -f Makefile) then - CF_VERBOSE(Using $IMAKE $cf_config) + CF_VERBOSE(Using $IMAKE) else - AC_ERROR(Cannot run imake) - fi -fi - -# If we've gotten this far, we have a Makefile for xterm. Some X11R5 config -# macros do not work well enough to actually use the Makefile for a build, but -# the definitions are usable (probably). -AC_MSG_CHECKING(for compiler options known to imake) -AC_CACHE_VAL(cf_cv_imake_cflags,[ - test -n "$verbose" && echo working... - cf_imake_cflags=`${MAKE-make} -n -f Makefile main.o RM=echo 2>/dev/null` - for cf_opt in $cf_imake_cflags - do - cf_found=no - case $cf_opt in # (vi -changequote(,)dnl - -[focg]) cf_found=yes - ;; # (vi - -[OID]*) #(vi -changequote([,])dnl - for cf_opt2 in $CFLAGS - do - if test ".$cf_opt" = ".$cf_opt2" ; then - cf_found=yes + # sometimes imake doesn't have the config path compiled in. Find it. + cf_config= + for cf_libpath in $X_LIBS $LIBS ; do + case $cf_libpath in # (vi + -L*) + cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'` + cf_libpath=$cf_libpath/X11/config + if test -d $cf_libpath ; then + cf_config=$cf_libpath break fi - done - ;; - "\\") cf_found=yes #(vi - ;; - "&&") cf_found=yes #(vi - ;; - -*) ;; #(vi - $CC|cc|gcc|main.*|echo) cf_found=yes - ;; - esac - if test $cf_found = no ; then - CF_VERBOSE(flag:$cf_opt) - cf_cv_imake_cflags="$cf_cv_imake_cflags $cf_opt" + ;; + esac + done + if test -z "$cf_config" ; then + AC_ERROR(Could not find imake config-directory) + fi + cf_imake_opts="$cf_imake_opts -I$cf_config" + if ( $IMAKE -v $cf_imake_opts 2>&AC_FD_CC) + then + CF_VERBOSE(Using $IMAKE $cf_config) else - CF_VERBOSE(skip:$cf_opt) + AC_ERROR(Cannot run $IMAKE) fi - done -]) -test -z "$verbose" && AC_MSG_RESULT(done) -IMAKE_CFLAGS="$cf_cv_imake_cflags" -rm -f Makefile Makefile.bak + fi + + # GNU make sometimes prints "make[1]: Entering...", which + # would confuse us. + eval `make findstddefs 2>/dev/null | grep -v make` + + cd .. + rm -rf conftestdir +fi +AC_SUBST(IMAKE_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl Make an uppercase version of a given name -AC_DEFUN([CF_UPPERCASE], +dnl Check for the declaration of fd_set. Some platforms declare it in +dnl , and some in , which requires +AC_DEFUN([CF_TYPE_FD_SET], +[ +AC_MSG_CHECKING(for declaration of fd_set) +AC_CACHE_VAL(cf_cv_type_fd_set,[ +AC_TRY_COMPILE([ +#include ], + [fd_set x], + [cf_cv_type_fd_set=sys/types.h], + [AC_TRY_COMPILE([ +#include +#include ], + [fd_set x], + [cf_cv_type_fd_set=sys/select.h], + [cf_cv_type_fd_set=unknown])])]) +AC_MSG_RESULT($cf_cv_type_fd_set) +if test $cf_cv_type_fd_set = sys/select.h ; then + AC_DEFINE(USE_SYS_SELECT_H) +fi +]) +dnl --------------------------------------------------------------------------- +dnl Make an uppercase version of a variable +dnl $1=uppercase($2) +AC_DEFUN([CF_UPPER], [ changequote(,)dnl -$2=`echo $1 |tr '[a-z]' '[A-Z]'` +$1=`echo $2 | tr '[a-z]' '[A-Z]'` changequote([,])dnl ])dnl dnl --------------------------------------------------------------------------- @@ -447,27 +479,74 @@ AC_DEFUN([CF_X_ATHENA], [AC_REQUIRE([CF_X_TOOLKIT]) AC_CHECK_HEADERS(X11/Xaw/SimpleMenu.h) -AC_CHECK_LIB(Xext,XextCreateExtension) AC_CHECK_LIB(Xmu, XmuClientWindow) -AC_CHECK_LIB(Xaw, XawSimpleMenuAddGlobalActions,, +AC_CHECK_LIB(Xext,XextCreateExtension, + [LIBS="-lXext $LIBS"]) +AC_CHECK_LIB(Xmu_s, XmuClientWindow) +AC_CHECK_LIB(Xaw, XawSimpleMenuAddGlobalActions, + [LIBS="-lXaw $LIBS"],[ +AC_CHECK_LIB(Xaw_s, XawSimpleMenuAddGlobalActions, + [LIBS="-lXaw_s $LIBS"], AC_ERROR( -[Unable to successfully link Athena library (-lXaw)]), - [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) - +[Unable to successfully link Athena library (-lXaw) with test program]), + [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])]) ])dnl dnl --------------------------------------------------------------------------- dnl Check for X Toolkit libraries dnl AC_DEFUN([CF_X_TOOLKIT], [ -AC_CHECK_LIB(X11,XOpenDisplay, - [LIBS="-lX11 $LIBS"],, - [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) -AC_CHECK_LIB(Xt, XtAppInitialize, - [AC_DEFINE(HAVE_LIBXT) LIBS="-lXt $X_PRE_LIBS $LIBS"], - AC_WARN( -[Unable to successfully link X Toolkit library (-lXt). -You will have to check and add the proper libraries by hand to Makefile.]), - [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) +# We need to check for -lsocket and -lnsl here in order to work around an +# autoconf bug. autoconf-2.12 is not checking for these prior to checking for +# the X11R6 -lSM and -lICE libraries. The resultant failures cascade... +# (tested on Solaris 2.5 w/ X11R6) +SYSTEM_NAME=`echo "$system_name"|tr ' ' -` +cf_have_X_LIBS=no +case $SYSTEM_NAME in +irix5*) ;; +clix*) + # FIXME: modify the library lookup in autoconf to + # allow _s.a suffix ahead of .a + AC_CHECK_LIB(c_s,open, + [LIBS="-lc_s $LIBS" + AC_CHECK_LIB(bsd,gethostname, + [LIBS="-lbsd $LIBS" + AC_CHECK_LIB(nsl_s,gethostname, + [LIBS="-lnsl_s $LIBS" + AC_CHECK_LIB(X11_s,XOpenDisplay, + [LIBS="-lX11_s $LIBS" + AC_CHECK_LIB(Xt_s,XtAppInitialize, + [LIBS="-lXt_s $LIBS" + cf_have_X_LIBS=Xt + ]) ]) ]) ]) ]) + ;; +*) + AC_CHECK_LIB(socket,socket) + AC_CHECK_LIB(nsl,gethostname) + ;; +esac +if test $cf_have_X_LIBS = no ; then + AC_PATH_XTRA + LDFLAGS="$LDFLAGS $X_LIBS" + CFLAGS="$CFLAGS $X_CFLAGS" + AC_CHECK_LIB(X11,XOpenDisplay, + [LIBS="-lX11 $LIBS"],, + [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) + AC_CHECK_LIB(Xt, XtAppInitialize, + [AC_DEFINE(HAVE_LIBXT) + cf_have_X_LIBS=Xt + LIBS="-lXt $X_PRE_LIBS $LIBS"],, + [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) +else + LDFLAGS="$LDFLAGS $X_LIBS" + CFLAGS="$CFLAGS $X_CFLAGS" +fi + +if test $cf_have_X_LIBS = no ; then + AC_WARN( +[Unable to successfully link X Toolkit library (-lXt) with +test program. You will have to check and add the proper libraries by hand +to makefile.]) +fi ])dnl Index: charproc.c --- xterm/charproc.c Wed Aug 27 06:48:32 1997 +++ xterm-51/charproc.c Mon Sep 15 20:39:35 1997 @@ -2492,8 +2492,8 @@ register int len; { unsigned flags = term->flags; - unsigned fg = term->cur_foreground; - unsigned bg = term->cur_background; + int fg = term->cur_foreground; + int bg = term->cur_background; GC currentGC; TRACE(("WriteText (%2d,%2d) (%d) %3d:%.*s\n", @@ -3194,7 +3194,7 @@ char c; int fd; { - char buf[2]; + Char buf[2]; register i = 1; #ifdef AMOEBA @@ -3204,7 +3204,7 @@ buf[1] = '\n'; i++; } - v_write(fd, buf, i); + v_write(fd, (char *)buf, i); /* If send/receive mode is reset, we echo characters locally */ if ((term->keyboard.flags & MODE_SRM) == 0) { @@ -3437,6 +3437,10 @@ (Widget) termw, askedWidth, askedHeight, &replyWidth, &replyHeight); + + XSync(screen->display, FALSE); /* synchronize */ + if(XtAppPending(app_con)) + xevents(); if (status == XtGeometryYes || status == XtGeometryDone) { Index: config.guess --- /dev/null Sun Jul 17 19:46:18 1994 +++ xterm-51/config.guess Fri May 16 15:50:50 1997 @@ -0,0 +1,696 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-cbm-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-atari-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-sun-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-apple-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[3478]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp3[0-9][05]:OpenBSD:*:*) + echo m68k-hp-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo i386-pc-cygwin32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin32 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then + echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then + echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then + echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then + echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then + echo "powerpc-unknown-linux-gnu" ; exit 0 + elif test "${UNAME_MACHINE}" = "alpha" ; then + echo alpha-unknown-linux-gnu ; exit 0 + elif test "${UNAME_MACHINE}" = "sparc" ; then + echo sparc-unknown-linux-gnu ; exit 0 + else + # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us + # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. + test ! -d /usr/lib/ldscripts/. \ + && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + # Determine whether the default compiler is a.out or elf + cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 Index: config.sub --- /dev/null Sun Jul 17 19:46:18 1994 +++ xterm-51/config.sub Fri Nov 22 11:45:56 1996 @@ -0,0 +1,927 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ + | arme[lb] | pyramid \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | i370 | sh \ + | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ + | pdp11 | mips64el | mips64orion | mips64orionel \ + | sparc | sparclet | sparclite | sparc64) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[3456]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ + | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ + | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ + | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ + | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigados) + basic_machine=m68k-cbm + os=-amigados + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[3456]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[3456]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[3456]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[3456]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5) + basic_machine=i586-intel + ;; + pentiumpro | p6) + basic_machine=i686-intel + ;; + pentium-* | p5-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + k5) + # We don't have specific support for AMD's K5 yet, so just call it a Pentium + basic_machine=i586-amd + ;; + nexen) + # We don't have specific support for Nexgen yet, so just call it a Pentium + basic_machine=i586-nexgen + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + basic_machine=mips-mips + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -unixware* | svr4*) + os=-sysv4 + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -linux-gnu* | -uxpv*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigados + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os Index: configure --- xterm/configure Wed Aug 27 06:48:32 1997 +++ xterm-51/configure Mon Sep 15 19:18:21 1997 @@ -1,6 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.5 +# From configure.in Revision: 1.13 + # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 @@ -16,7 +17,7 @@ ac_help="$ac_help --with-x use the X Window System" ac_help="$ac_help - --without-imake disable use of imake for definitions (default: on)" + --disable-imake disable use of imake for definitions (default: on)" ac_help="$ac_help --with-terminal-id[=V] set default decTerminalID (default: vt100)" ac_help="$ac_help @@ -553,22 +554,72 @@ +ac_aux_dir= +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" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +if test -f $srcdir/config.guess ; then + +# Make sure we can run config.sub. +if $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:586: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`$ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac -system_name="`(uname -s -r) 2>/dev/null`" -if test -n "$system_name" ; then - cat >> confdefs.h <&6 + + system_name="$host_os" +else + system_name="`(uname -s -r) 2>/dev/null`" + if test -z "$system_name" ; then + system_name="`(hostname) 2>/dev/null`" + fi +fi +test -n "$system_name" && cat >> confdefs.h <&6 else cf_cv_system_name="$system_name" fi + test -z "$system_name" && system_name="$cf_cv_system_name" test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6 @@ -582,7 +633,7 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:586: checking for $ac_word" >&5 +echo "configure:637: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -611,7 +662,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:615: checking for $ac_word" >&5 +echo "configure:666: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -659,7 +710,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:714: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -669,11 +720,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -693,12 +744,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:748: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:702: checking whether we are using GNU C" >&5 +echo "configure:753: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -707,7 +758,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -722,7 +773,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:726: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:777: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -750,7 +801,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:754: checking how to run the C preprocessor" >&5 +echo "configure:805: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -765,13 +816,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -782,13 +833,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -812,13 +863,13 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:816: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:867: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -836,7 +887,7 @@ if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -857,25 +908,6 @@ fi fi -ac_aux_dir= -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" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -887,7 +919,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:891: checking for a BSD compatible install" >&5 +echo "configure:923: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -939,9 +971,9 @@ ### checks for UNIX variants that set C preprocessor variables echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:943: checking for AIX" >&5 +echo "configure:975: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:967: checking for POSIXized ISC" >&5 +echo "configure:999: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -985,17 +1017,17 @@ ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 -echo "configure:989: checking for minix/config.h" >&5 +echo "configure:1021: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1037,12 +1069,12 @@ ### checks for typedefs echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1041: checking for ANSI C header files" >&5 +echo "configure:1073: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1050,7 +1082,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1067,7 +1099,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1085,7 +1117,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1106,7 +1138,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1117,7 +1149,7 @@ exit (0); } EOF -if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1141,12 +1173,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1145: checking for size_t" >&5 +echo "configure:1177: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1174,12 +1206,12 @@ fi echo $ac_n "checking for time_t""... $ac_c" 1>&6 -echo "configure:1178: checking for time_t" >&5 +echo "configure:1210: checking for time_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1215,12 +1247,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1219: checking for $ac_func" >&5 +echo "configure:1251: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1271,7 +1303,7 @@ if test ".$ac_cv_func_memmove" != .yes ; then if test $ac_cv_func_bcopy = yes ; then echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6 -echo "configure:1275: checking if bcopy does overlapping moves" >&5 +echo "configure:1307: checking if bcopy does overlapping moves" >&5 if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1280,7 +1312,7 @@ cf_cv_good_bcopy=unknown else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then cf_cv_good_bcopy=yes else @@ -1327,7 +1359,7 @@ echo $ac_n "checking for workable tgetent function""... $ac_c" 1>&6 -echo "configure:1331: checking for workable tgetent function" >&5 +echo "configure:1363: checking for workable tgetent function" >&5 if eval "test \"`echo '$''{'cf_cv_func_tgetent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1343,11 +1375,12 @@ cf_cv_func_tgetent=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then echo "yes, there is a termcap/tgetent present" 1>&5 cf_cv_func_tgetent=yes @@ -1377,14 +1410,14 @@ for cf_termlib in $cf_TERMLIB do cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "there is a terminfo/tgetent present" 1>&5 cf_cv_func_tgetent=$cf_termlib @@ -1410,17 +1443,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1414: checking for $ac_hdr" >&5 +echo "configure:1447: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1457,14 +1490,69 @@ ### checks for structures +echo $ac_n "checking for declaration of fd_set""... $ac_c" 1>&6 +echo "configure:1495: checking for declaration of fd_set" >&5 +if eval "test \"`echo '$''{'cf_cv_type_fd_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext < +int main() { +fd_set x +; return 0; } +EOF +if { (eval echo configure:1509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_type_fd_set=sys/types.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext < +#include +int main() { +fd_set x +; return 0; } +EOF +if { (eval echo configure:1526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_type_fd_set=sys/select.h +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_type_fd_set=unknown +fi +rm -f conftest* +fi +rm -f conftest* +fi + +echo "$ac_t""$cf_cv_type_fd_set" 1>&6 +if test $cf_cv_type_fd_set = sys/select.h ; then + cat >> confdefs.h <<\EOF +#define USE_SYS_SELECT_H 1 +EOF + +fi + + ### checks for compiler characteristics echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1463: checking for working const" >&5 +echo "configure:1551: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1533,12 +1621,14 @@ fi + echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:1538: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:1627: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cf_cv_ansi_cc=no + +cf_cv_ansi_cc=no cf_save_CFLAGS="$CFLAGS" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. @@ -1551,7 +1641,7 @@ do CFLAGS="$cf_save_CFLAGS $cf_arg" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -1580,10 +1671,17 @@ fi echo "$ac_t""$cf_cv_ansi_cc" 1>&6 -test ".$cf_cv_ansi_cc" != .no && cat >> confdefs.h <<\EOF + +if test "$cf_cv_ansi_cc" != "no"; then +if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then + CFLAGS="$CFLAGS $cf_cv_ansi_cc" +else + cat >> confdefs.h <<\EOF #define CC_HAS_PROTOS 1 EOF +fi +fi ### checks for system services and user specified options @@ -1593,7 +1691,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1597: checking for X" >&5 +echo "configure:1695: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1655,12 +1753,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1729,14 +1827,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1822,111 +1920,75 @@ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 fi -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - cat >> confdefs.h <<\EOF -#define X_DISPLAY_MISSING 1 -EOF - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +# We need to check for -lsocket and -lnsl here in order to work around an +# autoconf bug. autoconf-2.12 is not checking for these prior to checking for +# the X11R6 -lSM and -lICE libraries. The resultant failures cascade... +# (tested on Solaris 2.5 w/ X11R6) +SYSTEM_NAME=`echo "$system_name"|tr ' ' -` +cf_have_X_LIBS=no +case $SYSTEM_NAME in +irix5*) ;; +clix*) + # FIXME: modify the library lookup in autoconf to + # allow _s.a suffix ahead of .a + echo $ac_n "checking for open in -lc_s""... $ac_c" 1>&6 +echo "configure:1937: checking for open in -lc_s" >&5 +ac_lib_var=`echo c_s'_'open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - case "`(uname -sr) 2>/dev/null`" in - "SunOS 5"*) - echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1846: checking whether -R must be followed by a space" >&5 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - ac_R_nospace=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_R_nospace=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* - if test $ac_R_nospace = yes; then - echo "$ac_t""no" 1>&6 - X_LIBS="$X_LIBS -R$x_libraries" - else - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - ac_R_space=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_R_space=no fi -rm -f conftest* - if test $ac_R_space = yes; then - echo "$ac_t""yes" 1>&6 - X_LIBS="$X_LIBS -R $x_libraries" - else - echo "$ac_t""neither works" 1>&6 - fi - fi - LIBS="$ac_xsave_LIBS" - esac - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And karl@cs.umb.edu says - # the Alpha needs dnet_stub (dnet does not exist). - echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1911: checking for dnet_ntoa in -ldnet" >&5 -ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lc_s $LIBS" + echo $ac_n "checking for gethostname in -lbsd""... $ac_c" 1>&6 +echo "configure:1973: checking for gethostname in -lbsd" >&5 +ac_lib_var=`echo bsd'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldnet $LIBS" +LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1941,33 +2003,28 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -else - echo "$ac_t""no" 1>&6 -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1952: checking for dnet_ntoa in -ldnet_stub" >&5 -ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` + LIBS="-lbsd $LIBS" + echo $ac_n "checking for gethostname in -lnsl_s""... $ac_c" 1>&6 +echo "configure:2009: checking for gethostname in -lnsl_s" >&5 +ac_lib_var=`echo nsl_s'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ldnet_stub $LIBS" +LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1982,89 +2039,64 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -else - echo "$ac_t""no" 1>&6 -fi - - fi - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to dickey@clark.net. - echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2000: checking for gethostbyname" >&5 -if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + LIBS="-lnsl_s $LIBS" + echo $ac_n "checking for XOpenDisplay in -lX11_s""... $ac_c" 1>&6 +echo "configure:2045: checking for XOpenDisplay in -lX11_s" >&5 +ac_lib_var=`echo X11_s'_'XOpenDisplay | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - cat > conftest.$ac_ext < conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char gethostbyname(); +char XOpenDisplay(); int main() { - -/* 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_gethostbyname) || defined (__stub___gethostbyname) -choke me -#else -gethostbyname(); -#endif - +XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - eval "ac_cv_func_gethostbyname=yes" + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func_gethostbyname=no" + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* -fi +LIBS="$ac_save_LIBS" -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 fi - - if test $ac_cv_func_gethostbyname = no; then - echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2049: checking for gethostbyname in -lnsl" >&5 -ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lX11_s $LIBS" + echo $ac_n "checking for XtAppInitialize in -lXt_s""... $ac_c" 1>&6 +echo "configure:2081: checking for XtAppInitialize in -lXt_s" >&5 +ac_lib_var=`echo Xt_s'_'XtAppInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lnsl $LIBS" +LIBS="-lXt_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2079,27 +2111,407 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" + LIBS="-lXt_s $LIBS" + cf_have_X_LIBS=Xt + else echo "$ac_t""no" 1>&6 fi - - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says simon@lia.di.epfl.ch: it contains - # gethostby* variants that don't use the nameserver (or something). - # -lsocket must be given before -lnsl if both are needed. - # We assume that if connect needs -lnsl, so does gethostbyname. - echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2098: checking for connect" >&5 + +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + +else + echo "$ac_t""no" 1>&6 +fi + + ;; +*) + echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:2141: checking for socket in -lsocket" >&5 +ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 +echo "configure:2188: checking for gethostname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + ;; +esac + +if test $cf_have_X_LIBS = no ; then + if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + cat >> confdefs.h <<\EOF +#define X_DISPLAY_MISSING 1 +EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 +echo "configure:2258: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_R_nospace=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_nospace=no +fi +rm -f conftest* + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_R_space=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no +fi +rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +echo "configure:2323: checking for dnet_ntoa in -ldnet" >&5 +ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 +echo "configure:2364: checking for dnet_ntoa in -ldnet_stub" >&5 +ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet_stub $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +echo "configure:2412: checking for gethostbyname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname(); + +int main() { + +/* 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_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:2461: checking for gethostbyname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + echo $ac_n "checking for connect""... $ac_c" 1>&6 +echo "configure:2510: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2143,7 +2555,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2147: checking for connect in -lsocket" >&5 +echo "configure:2559: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2151,7 +2563,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2186,12 +2598,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2190: checking for remove" >&5 +echo "configure:2602: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2235,7 +2647,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2239: checking for remove in -lposix" >&5 +echo "configure:2651: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2243,7 +2655,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2278,12 +2690,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2282: checking for shmat" >&5 +echo "configure:2694: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2327,7 +2739,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2331: checking for shmat in -lipc" >&5 +echo "configure:2743: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2335,7 +2747,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2379,7 +2791,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2383: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2795: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2387,7 +2799,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2422,57 +2834,10 @@ fi - -LDFLAGS="$LDFLAGS $X_LIBS" -CFLAGS="$CFLAGS $X_CFLAGS" - -for ac_hdr in \ - unistd.h \ - X11/Xpoll.h \ - -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2437: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - - -echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:2476: checking for XOpenDisplay in -lX11" >&5 + LDFLAGS="$LDFLAGS $X_LIBS" + CFLAGS="$CFLAGS $X_CFLAGS" + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 +echo "configure:2841: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2480,7 +2845,7 @@ ac_save_LIBS="$LIBS" LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2511,8 +2876,8 @@ echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:2516: checking for XtAppInitialize in -lXt" >&5 + echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6 +echo "configure:2881: checking for XtAppInitialize in -lXt" >&5 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2520,7 +2885,7 @@ ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2549,13 +2914,68 @@ cat >> confdefs.h <<\EOF #define HAVE_LIBXT 1 EOF - LIBS="-lXt $X_PRE_LIBS $LIBS" + + cf_have_X_LIBS=Xt + LIBS="-lXt $X_PRE_LIBS $LIBS" else echo "$ac_t""no" 1>&6 -echo "configure: warning: Unable to successfully link X Toolkit library (-lXt). -You will have to check and add the proper libraries by hand to Makefile." 1>&2 fi +else + LDFLAGS="$LDFLAGS $X_LIBS" + CFLAGS="$CFLAGS $X_CFLAGS" +fi + +if test $cf_have_X_LIBS = no ; then + echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with +test program. You will have to check and add the proper libraries by hand +to makefile." 1>&2 +fi + + +for ac_hdr in \ + unistd.h \ + X11/DECkeysym.h \ + X11/Xpoll.h \ + +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:2945: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done @@ -2563,17 +2983,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2567: checking for $ac_hdr" >&5 +echo "configure:2987: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2599,27 +3019,27 @@ fi done -echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6 -echo "configure:2604: checking for XextCreateExtension in -lXext" >&5 -ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'` +echo $ac_n "checking for XmuClientWindow in -lXmu""... $ac_c" 1>&6 +echo "configure:3024: checking for XmuClientWindow in -lXmu" >&5 +ac_lib_var=`echo Xmu'_'XmuClientWindow | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lXext $LIBS" +LIBS="-lXmu $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2634,28 +3054,68 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo Xext | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi -echo $ac_n "checking for XmuClientWindow in -lXmu""... $ac_c" 1>&6 -echo "configure:2651: checking for XmuClientWindow in -lXmu" >&5 -ac_lib_var=`echo Xmu'_'XmuClientWindow | sed 'y%./+-%__p_%'` +echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6 +echo "configure:3071: checking for XextCreateExtension in -lXext" >&5 +ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lXmu $LIBS" +LIBS="-lXext $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lXext $LIBS" +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking for XmuClientWindow in -lXmu_s""... $ac_c" 1>&6 +echo "configure:3111: checking for XmuClientWindow in -lXmu_s" >&5 +ac_lib_var=`echo Xmu_s'_'XmuClientWindow | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXmu_s $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2681,28 +3141,28 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + ac_tr_lib=HAVE_LIB`echo Xmu_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for XawSimpleMenuAddGlobalActions in -lXaw""... $ac_c" 1>&6 -echo "configure:2698: checking for XawSimpleMenuAddGlobalActions in -lXaw" >&5 +echo "configure:3158: checking for XawSimpleMenuAddGlobalActions in -lXaw" >&5 ac_lib_var=`echo Xaw'_'XawSimpleMenuAddGlobalActions | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lXaw $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" +LIBS="-lXaw $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2728,26 +3188,59 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo Xaw | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 + +echo $ac_n "checking for XawSimpleMenuAddGlobalActions in -lXaw_s""... $ac_c" 1>&6 +echo "configure:3197: checking for XawSimpleMenuAddGlobalActions in -lXaw_s" >&5 +ac_lib_var=`echo Xaw_s'_'XawSimpleMenuAddGlobalActions | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXaw_s $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="-lXaw_s $LIBS" else echo "$ac_t""no" 1>&6 -{ echo "configure: error: Unable to successfully link Athena library (-lXaw)" 1>&2; exit 1; } +{ echo "configure: error: Unable to successfully link Athena library (-lXaw) with test program" 1>&2; exit 1; } fi +fi LIBS="$LIBS $X_EXTRA_LIBS" echo $ac_n "checking if we should use imake to help""... $ac_c" 1>&6 -echo "configure:2751: checking if we should use imake to help" >&5 +echo "configure:3244: checking if we should use imake to help" >&5 # Check whether --enable-imake or --disable-imake was given. if test "${enable_imake+set}" = set; then enableval="$enable_imake" @@ -2766,13 +3259,12 @@ echo "$ac_t""$enable_imake" 1>&6 if test $enable_imake = yes ; then -rm -f Makefile Makefile.bak for ac_prog in xmkmf imake do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2776: checking for $ac_word" >&5 +echo "configure:3268: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_IMAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2814,93 +3306,60 @@ # If it's installed properly, imake (or its wrapper, xmkmf) will point to the # config directory. -if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5) -then - test -n "$verbose" && echo " Using $IMAKE" 1>&6 - -else - # sometimes imake doesn't have the config path compiled in. Find it. - cf_config= - for cf_libpath in $X_LIBS $LIBS ; do - case $cf_libpath in # (vi - -L*) - cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'` - cf_libpath=$cf_libpath/X11/config - if test -d $cf_libpath ; then - cf_config=$cf_libpath - break - fi - ;; - esac - done - if test -z $cf_config ; then - { echo "configure: error: Could not find imake config-directory" 1>&2; exit 1; } - fi - cf_imake_opts="$cf_imake_opts -I$cf_config" - if ( $IMAKE -v $cf_imake_opts 2>&5) +if mkdir conftestdir; then + cd conftestdir + echo >./Imakefile + test ../Imakefile && cat ../Imakefile >>./Imakefile + cat >> ./Imakefile <<'CF_EOF' +findstddefs: + @echo 'IMAKE_CFLAGS="${STD_DEFINES} $(MAIN_DEFINES)"' +CF_EOF + if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile) then - test -n "$verbose" && echo " Using $IMAKE $cf_config" 1>&6 + test -n "$verbose" && echo " Using $IMAKE" 1>&6 else - { echo "configure: error: Cannot run imake" 1>&2; exit 1; } - fi -fi - -# If we've gotten this far, we have a Makefile for xterm. Some X11R5 config -# macros do not work well enough to actually use the Makefile for a build, but -# the definitions are usable (probably). -echo $ac_n "checking for compiler options known to imake""... $ac_c" 1>&6 -echo "configure:2854: checking for compiler options known to imake" >&5 -if eval "test \"`echo '$''{'cf_cv_imake_cflags'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - - test -n "$verbose" && echo working... - cf_imake_cflags=`${MAKE-make} -n -f Makefile main.o RM=echo 2>/dev/null` - for cf_opt in $cf_imake_cflags - do - cf_found=no - case $cf_opt in # (vi - -[focg]) cf_found=yes - ;; # (vi - -[OID]*) #(vi - for cf_opt2 in $CFLAGS - do - if test ".$cf_opt" = ".$cf_opt2" ; then - cf_found=yes + # sometimes imake doesn't have the config path compiled in. Find it. + cf_config= + for cf_libpath in $X_LIBS $LIBS ; do + case $cf_libpath in # (vi + -L*) + cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'` + cf_libpath=$cf_libpath/X11/config + if test -d $cf_libpath ; then + cf_config=$cf_libpath break fi - done - ;; - "\\") cf_found=yes #(vi - ;; - "&&") cf_found=yes #(vi - ;; - -*) ;; #(vi - $CC|cc|gcc|main.*|echo) cf_found=yes - ;; - esac - if test $cf_found = no ; then - test -n "$verbose" && echo " flag:$cf_opt" 1>&6 + ;; + esac + done + if test -z "$cf_config" ; then + { echo "configure: error: Could not find imake config-directory" 1>&2; exit 1; } + fi + cf_imake_opts="$cf_imake_opts -I$cf_config" + if ( $IMAKE -v $cf_imake_opts 2>&5) + then + test -n "$verbose" && echo " Using $IMAKE $cf_config" 1>&6 - cf_cv_imake_cflags="$cf_cv_imake_cflags $cf_opt" else - test -n "$verbose" && echo " skip:$cf_opt" 1>&6 - + { echo "configure: error: Cannot run $IMAKE" 1>&2; exit 1; } fi - done + fi + + # GNU make sometimes prints "make[1]: Entering...", which + # would confuse us. + eval `make findstddefs 2>/dev/null | grep -v make` + cd .. + rm -rf conftestdir fi -test -z "$verbose" && echo "$ac_t""done" 1>&6 -IMAKE_CFLAGS="$cf_cv_imake_cflags" -rm -f Makefile Makefile.bak fi echo $ac_n "checking for default terminal-id""... $ac_c" 1>&6 -echo "configure:2904: checking for default terminal-id" >&5 +echo "configure:3363: checking for default terminal-id" >&5 # Check whether --with-terminal-id or --without-terminal-id was given. if test "${with_terminal_id+set}" = set; then withval="$with_terminal_id" @@ -2921,7 +3380,7 @@ ### checks for optional features echo $ac_n "checking if you want active-icons""... $ac_c" 1>&6 -echo "configure:2925: checking if you want active-icons" >&5 +echo "configure:3384: checking if you want active-icons" >&5 # Check whether --enable-active-icon or --disable-active-icon was given. if test "${enable_active_icon+set}" = set; then enableval="$enable_active_icon" @@ -2946,7 +3405,7 @@ fi echo $ac_n "checking if you want ANSI color""... $ac_c" 1>&6 -echo "configure:2950: checking if you want ANSI color" >&5 +echo "configure:3409: checking if you want ANSI color" >&5 # Check whether --enable-ansi-color or --disable-ansi-color was given. if test "${enable_ansi_color+set}" = set; then enableval="$enable_ansi_color" @@ -2969,7 +3428,7 @@ echo $ac_n "checking if you want 16 colors like aixterm""... $ac_c" 1>&6 -echo "configure:2973: checking if you want 16 colors like aixterm" >&5 +echo "configure:3432: checking if you want 16 colors like aixterm" >&5 # Check whether --enable-16-color or --disable-16-color was given. if test "${enable_16_color+set}" = set; then enableval="$enable_16_color" @@ -2992,7 +3451,7 @@ echo $ac_n "checking for default color-mode""... $ac_c" 1>&6 -echo "configure:2996: checking for default color-mode" >&5 +echo "configure:3455: checking for default color-mode" >&5 # Check whether --enable-color-mode or --disable-color-mode was given. if test "${enable_color_mode+set}" = set; then enableval="$enable_color_mode" @@ -3015,7 +3474,7 @@ echo $ac_n "checking for doublesize characters""... $ac_c" 1>&6 -echo "configure:3019: checking for doublesize characters" >&5 +echo "configure:3478: checking for doublesize characters" >&5 # Check whether --enable-doublechars or --disable-doublechars was given. if test "${enable_doublechars+set}" = set; then enableval="$enable_doublechars" @@ -3038,7 +3497,7 @@ echo $ac_n "checking if you want support for input-method""... $ac_c" 1>&6 -echo "configure:3042: checking if you want support for input-method" >&5 +echo "configure:3501: checking if you want support for input-method" >&5 # Check whether --enable-input-method or --disable-input-method was given. if test "${enable_input_method+set}" = set; then enableval="$enable_input_method" @@ -3063,7 +3522,7 @@ fi echo $ac_n "checking if you want support for internationalization""... $ac_c" 1>&6 -echo "configure:3067: checking if you want support for internationalization" >&5 +echo "configure:3526: checking if you want support for internationalization" >&5 # Check whether --enable-i18n or --disable-i18n was given. if test "${enable_i18n+set}" = set; then enableval="$enable_i18n" @@ -3088,7 +3547,7 @@ fi echo $ac_n "checking if you want support for logging""... $ac_c" 1>&6 -echo "configure:3092: checking if you want support for logging" >&5 +echo "configure:3551: checking if you want support for logging" >&5 # Check whether --enable-logging or --disable-logging was given. if test "${enable_logging+set}" = set; then enableval="$enable_logging" @@ -3113,7 +3572,7 @@ fi echo $ac_n "checking if you want debugging traces""... $ac_c" 1>&6 -echo "configure:3117: checking if you want debugging traces" >&5 +echo "configure:3576: checking if you want debugging traces" >&5 # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then enableval="$enable_trace" @@ -3140,7 +3599,7 @@ fi echo $ac_n "checking if you want VT52 emulation""... $ac_c" 1>&6 -echo "configure:3144: checking if you want VT52 emulation" >&5 +echo "configure:3603: checking if you want VT52 emulation" >&5 # Check whether --enable-vt52 or --disable-vt52 was given. if test "${enable_vt52+set}" = set; then enableval="$enable_vt52" @@ -3165,22 +3624,34 @@ # development/testing aids echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6 -echo "configure:3169: checking if you want to see long compiling messages" >&5 +echo "configure:3628: checking if you want to see long compiling messages" >&5 # Check whether --enable-echo or --disable-echo was given. if test "${enable_echo+set}" = set; then enableval="$enable_echo" test "$enableval" != no && enableval=yes if test "$enableval" != "yes" ; then + + ECHO_LD='@echo linking $@;' + RULE_CC=' @echo compiling $<' SHOW_CC=' @echo compiling $@' - ECHO_CC='@' + ECHO_CC='@' + else + + ECHO_LD='' + RULE_CC='# compiling' SHOW_CC='# compiling' ECHO_CC='' + fi else enableval=yes - SHOW_CC='# compiling' + + ECHO_LD='' + RULE_CC='# compiling' + SHOW_CC='# compiling' ECHO_CC='' + fi @@ -3189,8 +3660,10 @@ + + echo $ac_n "checking if you want magic cookie emulation""... $ac_c" 1>&6 -echo "configure:3194: checking if you want magic cookie emulation" >&5 +echo "configure:3667: checking if you want magic cookie emulation" >&5 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given. if test "${enable_xmc_glitch+set}" = set; then enableval="$enable_xmc_glitch" @@ -3219,7 +3692,7 @@ if test -n "$GCC" ; then echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6 -echo "configure:3223: checking if you want to turn on gcc warnings" >&5 +echo "configure:3696: checking if you want to turn on gcc warnings" >&5 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" @@ -3238,10 +3711,10 @@ echo "$ac_t""$with_warnings" 1>&6 if test "$with_warnings" = yes then - cf_warn_CFLAGS="" + if test -n "$GCC" then - cat > conftest.i < conftest.i <&6 -echo "configure:3262: checking for gcc __attribute__ directives" >&5 +echo "configure:3735: checking for gcc __attribute__ directives" >&5 cat > conftest.$ac_ext <&5 @@ -3298,7 +3771,7 @@ EOF ;; esac - if { (eval echo configure:3302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6 cat conftest.h >>confdefs.h # else @@ -3309,18 +3782,21 @@ fgrep define conftest.i >>confdefs.h fi rm -rf conftest* +fi - + EXTRA_CFLAGS="" +if test -n "$GCC" +then cat > conftest.$ac_ext <&6 -echo "configure:3320: checking for gcc warning options" >&5 +echo "configure:3796: checking for gcc warning options" >&5 cf_save_CFLAGS="$CFLAGS" - cf_warn_CFLAGS="-W -Wall" + EXTRA_CFLAGS="-W -Wall" for cf_opt in \ - Wbad-fuvction-cast \ + Wbad-function-cast \ Wcast-align \ Wcast-qual \ Winline \ @@ -3331,24 +3807,25 @@ Wshadow \ Wstrict-prototypes do - CFLAGS="$cf_save_CFLAGS $cf_warn_CFLAGS -$cf_opt" - if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" + if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6 - cf_warn_CFLAGS="$cf_warn_CFLAGS -$cf_opt" - test "$cf_opt" = Wcast-qual && cf_warn_CFLAGS="$cf_warn_CFLAGS -DXTSTRINGDEFINES" + EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" + test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES" fi done rm -f conftest* CFLAGS="$cf_save_CFLAGS" fi - CFLAGS="$CFLAGS $cf_warn_CFLAGS" + fi fi + ### output Makefile and xtermcfg.h trap '' 1 2 15 cat > confcache <<\EOF @@ -3481,6 +3958,11 @@ s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g @@ -3491,8 +3973,11 @@ s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@IMAKE@%$IMAKE%g s%@IMAKE_CFLAGS@%$IMAKE_CFLAGS%g +s%@ECHO_LD@%$ECHO_LD%g +s%@RULE_CC@%$RULE_CC%g s%@SHOW_CC@%$SHOW_CC%g s%@ECHO_CC@%$ECHO_CC%g +s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g s%@EXTRASRCS@%$EXTRASRCS%g s%@EXTRAOBJS@%$EXTRAOBJS%g Index: configure.in --- xterm/configure.in Wed Aug 27 06:48:32 1997 +++ xterm-51/configure.in Mon Sep 15 13:33:13 1997 @@ -27,7 +27,7 @@ dnl --------------------------------------------------------------------------- dnl Process this file with autoconf to produce a configure script. dnl -AC_REVISION($Revision: 1.5 $) +AC_REVISION($Revision: 1.13 $) AC_PREREQ(2.12) AC_INIT(charproc.c) AC_CONFIG_HEADER(xtermcfg.h:xtermcfg.hin) @@ -60,20 +60,19 @@ CF_FUNC_TGETENT ### checks for structures +CF_TYPE_FD_SET ### checks for compiler characteristics AC_CONST -CF_ANSI_CC +CF_ANSI_CC_CHECK ### checks for system services and user specified options -AC_PATH_XTRA - -LDFLAGS="$LDFLAGS $X_LIBS" -CFLAGS="$CFLAGS $X_CFLAGS" +CF_X_TOOLKIT AC_CHECK_HEADERS( \ unistd.h \ + X11/DECkeysym.h \ X11/Xpoll.h \ ) @@ -83,12 +82,12 @@ AC_MSG_CHECKING(if we should use imake to help) CF_ARG_DISABLE(imake, - [ --without-imake disable use of imake for definitions], + [ --disable-imake disable use of imake for definitions], [enable_imake=no], [enable_imake=yes]) AC_MSG_RESULT($enable_imake) if test $enable_imake = yes ; then - CF_IMAKE_CFLAGS + CF_IMAKE_CFLAGS($(MAIN_DEFINES)) fi AC_SUBST(IMAKE_CFLAGS) @@ -222,11 +221,12 @@ AC_MSG_RESULT($with_warnings) if test "$with_warnings" = yes then + CF_GCC_ATTRIBUTES CF_GCC_WARNINGS - CFLAGS="$CFLAGS $cf_warn_CFLAGS" fi fi +AC_SUBST(EXTRA_CFLAGS) AC_SUBST(EXTRASRCS) AC_SUBST(EXTRAOBJS) Index: data.c --- xterm/data.c Tue Jul 29 15:13:30 1997 +++ xterm-51/data.c Mon Sep 15 20:18:29 1997 @@ -91,6 +91,9 @@ XtermWidget term; /* master data structure for client */ char *xterm_name; /* argv[0] */ Boolean sunFunctionKeys; +#if OPT_SUNPC_KBD +Boolean sunKeyboard; +#endif int am_slave = 0; /* set to 1 if running as a slave process */ int max_plus1; Index: data.h --- xterm/data.h Tue Jul 29 15:13:30 1997 +++ xterm-51/data.h Mon Sep 15 20:18:40 1997 @@ -32,6 +32,11 @@ #define XFD_COPYSET(src,dst) bcopy((src)->fds_bits, (dst)->fds_bits, sizeof(fd_set)) #endif +#if USE_SYS_SELECT_H +#include +#include +#endif + extern XtAppContext app_con; extern TekLink *TekRefresh; @@ -52,6 +57,9 @@ extern char *ttydev; extern char *xterm_name; extern Boolean sunFunctionKeys; +#if OPT_SUNPC_KBD +extern Boolean sunKeyboard; +#endif extern Char buffer[]; extern int T_lastx; extern int T_lasty; Index: input.c --- xterm/input.c Mon Sep 15 10:13:20 1997 +++ xterm-51/input.c Mon Sep 15 21:03:39 1997 @@ -33,8 +33,12 @@ #endif #include "ptyx.h" /* gets Xt headers, too */ + #include +#if HAVE_X11_DECKEYSYM_H #include +#endif + #include #include @@ -45,7 +49,7 @@ static char *kypd_apl = " ABCDEFGHIJKLMNOPQRSTUVWXYZ??????abcdefghijklmnopqrstuvwxyzXXX"; static char *cur = "HDACB FE"; -static int funcvalue PROTO((KeySym keycode)); +static int decfuncvalue PROTO((KeySym keycode)); static int sunfuncvalue PROTO((KeySym keycode)); static void AdjustAfterInput PROTO((TScreen *screen)); @@ -88,6 +92,7 @@ int nbytes; KeySym keysym = 0; ANSI reply; + int dec_code; /* Ignore characters typed at the keyboard */ if (keyboard->flags & MODE_KAM) @@ -161,13 +166,22 @@ } else if (IsFunctionKey(keysym) || IsMiscFunctionKey(keysym) || keysym == XK_Prior || keysym == XK_Next +#ifdef DXK_Remove || keysym == DXK_Remove +#endif #ifdef XK_KP_Delete || keysym == XK_KP_Delete || keysym == XK_KP_Insert #endif ) { - int dec_code = funcvalue(keysym); +#if OPT_SUNPC_KBD + if ((event->state & ControlMask) + && sunKeyboard + && (keysym >= XK_F1 && keysym <= XK_F12)) + keysym += 12; +#endif + + dec_code = decfuncvalue(keysym); if ((event->state & ShiftMask) && ((string = udk_lookup(dec_code, &nbytes)) != 0)) { while (nbytes-- > 0) @@ -201,18 +215,19 @@ } key = TRUE; } else if (IsKeypadKey(keysym)) { -#if OPT_VT52_MODE +#if OPT_SUNPC_KBD /* * DEC keyboards don't have keypad(+), but do have keypad(,) * instead. Other (Sun, PC) keyboards commonly have keypad(+), * but no keypad(,) - it's a pain for users to work around. */ - if (!sunFunctionKeys && screen->ansi_level == 0 + if (!sunFunctionKeys + && sunKeyboard && keysym == XK_KP_Add) keysym = XK_KP_Separator; #endif if ((keyboard->flags & MODE_DECKPAM) != 0) { - reply.a_type = SS3; + reply.a_type = SS3; reply.a_final = kypd_apl[keysym-XK_KP_Space]; VT52_KEYPAD unparseseq(&reply, pty); @@ -263,7 +278,7 @@ } /* These definitions are DEC-style (e.g., vt320) */ -static int funcvalue (keycode) +static int decfuncvalue (keycode) KeySym keycode; { switch (keycode) { @@ -297,7 +312,9 @@ case XK_KP_Insert: return(2); case XK_KP_Delete: return(3); #endif +#ifdef DXK_Remove case DXK_Remove: return(3); +#endif case XK_Select: return(4); case XK_Prior: return(5); case XK_Next: return(6); @@ -356,7 +373,9 @@ case XK_KP_Insert: return(2); case XK_KP_Delete: return(3); #endif +#ifdef DXK_Remove case DXK_Remove: return(3); +#endif case XK_Select: return(4); case XK_Prior: return(5); case XK_Next: return(6); Index: main.c --- xterm/main.c Tue Sep 9 13:39:28 1997 +++ xterm-51/main.c Mon Sep 15 21:02:37 1997 @@ -710,6 +710,9 @@ char *tty_modes; Boolean utmpInhibit; Boolean sunFunctionKeys; /* %%% should be widget resource? */ +#if OPT_SUNPC_KBD + Boolean sunKeyboard; +#endif Boolean wait_for_map; Boolean useInsertMode; } resource; @@ -735,6 +738,10 @@ offset(utmpInhibit), XtRString, "false"}, {"sunFunctionKeys", "SunFunctionKeys", XtRBoolean, sizeof (Boolean), offset(sunFunctionKeys), XtRString, "false"}, +#if OPT_SUNPC_KBD + {"sunKeyboard", "SunKeyboard", XtRBoolean, sizeof (Boolean), + offset(sunKeyboard), XtRString, "false"}, +#endif {"waitForMap", "WaitForMap", XtRBoolean, sizeof (Boolean), offset(wait_for_map), XtRString, "false"}, {"useInsertMode", "UseInsertMode", XtRBoolean, sizeof (Boolean), @@ -817,6 +824,10 @@ {"-sk", "*scrollKey", XrmoptionNoArg, (caddr_t) "on"}, {"+sk", "*scrollKey", XrmoptionNoArg, (caddr_t) "off"}, {"-sl", "*saveLines", XrmoptionSepArg, (caddr_t) NULL}, +#if OPT_SUNPC_KBD +{"-sp", "*sunKeyboard", XrmoptionNoArg, (caddr_t) "on"}, +{"+sp", "*sunKeyboard", XrmoptionNoArg, (caddr_t) "off"}, +#endif {"-t", "*tekStartup", XrmoptionNoArg, (caddr_t) "on"}, {"+t", "*tekStartup", XrmoptionNoArg, (caddr_t) "off"}, {"-tm", "*ttyModes", XrmoptionSepArg, (caddr_t) NULL}, @@ -900,6 +911,7 @@ { "-/+si", "turn on/off scroll-on-tty-output inhibit" }, { "-/+sk", "turn on/off scroll-on-keypress" }, { "-sl number", "number of scrolled lines to save" }, +{ "-/+sp", "turn on/off Sun/PC Function/Keypad mapping" }, { "-/+t", "turn on/off Tek emulation window" }, { "-tm string", "terminal mode keywords and characters" }, { "-tn name", "TERM environment variable name" }, @@ -1386,6 +1398,9 @@ xterm_name = resource.xterm_name; sunFunctionKeys = resource.sunFunctionKeys; +#if OPT_SUNPC_KBD + sunKeyboard = resource.sunKeyboard; +#endif if (strcmp(xterm_name, "-") == 0) xterm_name = "xterm"; if (resource.icon_geometry != NULL) { int scr, junk; Index: menu.c --- xterm/menu.c Wed Aug 27 06:48:32 1997 +++ xterm-51/menu.c Mon Sep 15 20:18:34 1997 @@ -82,6 +82,7 @@ static void do_securekbd PROTO_XT_CALLBACK_ARGS; static void do_softreset PROTO_XT_CALLBACK_ARGS; static void do_sun_fkeys PROTO_XT_CALLBACK_ARGS; +static void do_sun_kbd PROTO_XT_CALLBACK_ARGS; static void do_suspend PROTO_XT_CALLBACK_ARGS; static void do_tekcopy PROTO_XT_CALLBACK_ARGS; static void do_tekhide PROTO_XT_CALLBACK_ARGS; @@ -107,25 +108,26 @@ * The order of entries MUST match the values given in menu.h */ MenuEntry mainMenuEntries[] = { - { "securekbd", do_securekbd, NULL }, /* 0 */ - { "allowsends", do_allowsends, NULL }, /* 1 */ + { "securekbd", do_securekbd, NULL }, + { "allowsends", do_allowsends, NULL }, #ifdef ALLOWLOGGING - { "logging", do_logging, NULL }, /* 2 */ + { "logging", do_logging, NULL }, #endif - { "redraw", do_redraw, NULL }, /* 3 */ - { "line1", NULL, NULL }, /* 4 */ - { "8-bit control", do_8bit_control, NULL }, /* 5 */ - { "backarrow key", do_backarrow, NULL }, /* 5 */ - { "sun function-keys",do_sun_fkeys, NULL }, /* 6 */ - { "line2", NULL, NULL }, /* 7 */ - { "suspend", do_suspend, NULL }, /* 8 */ - { "continue", do_continue, NULL }, /* 9 */ - { "interrupt", do_interrupt, NULL }, /* 10 */ - { "hangup", do_hangup, NULL }, /* 11 */ - { "terminate", do_terminate, NULL }, /* 12 */ - { "kill", do_kill, NULL }, /* 13 */ - { "line3", NULL, NULL }, /* 14 */ - { "quit", do_quit, NULL }}; /* 15 */ + { "redraw", do_redraw, NULL }, + { "line1", NULL, NULL }, + { "8-bit control", do_8bit_control, NULL }, + { "backarrow key", do_backarrow, NULL }, + { "sun function-keys",do_sun_fkeys, NULL }, + { "sun keyboard", do_sun_kbd, NULL }, + { "line2", NULL, NULL }, + { "suspend", do_suspend, NULL }, + { "continue", do_continue, NULL }, + { "interrupt", do_interrupt, NULL }, + { "hangup", do_hangup, NULL }, + { "terminate", do_terminate, NULL }, + { "kill", do_kill, NULL }, + { "line3", NULL, NULL }, + { "quit", do_quit, NULL }}; MenuEntry vtMenuEntries[] = { { "scrollbar", do_scrollbar, NULL }, /* 0 */ @@ -527,6 +529,17 @@ } +#if OPT_SUNPC_KBD +static void do_sun_kbd (gw, closure, data) + Widget gw GCC_UNUSED; + XtPointer closure GCC_UNUSED, data GCC_UNUSED; +{ + sunKeyboard = ! sunKeyboard; + update_sun_kbd(); +} +#endif + + /* * The following cases use the pid instead of the process group so that we * don't get hosed by programs that change their process group @@ -1147,6 +1160,18 @@ handle_toggle (do_sun_fkeys, (int) sunFunctionKeys, params, *param_count, w, (XtPointer)0, (XtPointer)0); } + +#if OPT_SUNPC_KBD +void HandleSunKeyboard(w, event, params, param_count) + Widget w; + XEvent *event GCC_UNUSED; + String *params; + Cardinal *param_count; +{ + handle_toggle (do_sun_kbd, (int) sunKeyboard, + params, *param_count, w, (XtPointer)0, (XtPointer)0); +} +#endif void HandleScrollbar(w, event, params, param_count) Widget w; Index: menu.h --- xterm/menu.h Wed Aug 27 06:48:32 1997 +++ xterm-51/menu.h Mon Sep 15 20:23:15 1997 @@ -74,6 +74,7 @@ extern void HandleSetVisualBell PROTO_XT_ACTIONS_ARGS; extern void HandleSoftReset PROTO_XT_ACTIONS_ARGS; extern void HandleSunFunctionKeys PROTO_XT_ACTIONS_ARGS; +extern void HandleSunKeyboard PROTO_XT_ACTIONS_ARGS; extern void HandleTekCopy PROTO_XT_ACTIONS_ARGS; extern void HandleTekPage PROTO_XT_ACTIONS_ARGS; extern void HandleTekReset PROTO_XT_ACTIONS_ARGS; @@ -104,6 +105,9 @@ mainMenu_8bit_ctrl, mainMenu_backarrow, mainMenu_sun_fkeys, +#if OPT_SUNPC_KBD + mainMenu_sun_kbd, +#endif mainMenu_line2, mainMenu_suspend, mainMenu_continue, @@ -241,6 +245,13 @@ update_menu_item (term->screen.mainMenu, \ mainMenuEntries[mainMenu_sun_fkeys].widget, \ sunFunctionKeys) + +#if OPT_SUNPC_KBD +#define update_sun_kbd() \ + update_menu_item (term->screen.mainMenu, \ + mainMenuEntries[mainMenu_sun_kbd].widget, \ + sunKeyboard) +#endif #define update_scrollbar() \ update_menu_item (term->screen.vtMenu, \ Index: misc.c --- xterm/misc.c Wed Aug 27 06:48:32 1997 +++ xterm-51/misc.c Mon Sep 15 20:37:37 1997 @@ -837,7 +837,7 @@ void do_dcs(dcsbuf, dcslen) Char *dcsbuf; -int dcslen; +Size_t dcslen; { register TScreen *screen = &term->screen; char *cp = (char *)dcsbuf; @@ -873,10 +873,10 @@ if (term->flags & INVISIBLE) strcat(reply, ";8"); if_OPT_ISO_COLORS(screen,{ - if (term->flags & BG_COLOR) + if (term->flags & FG_COLOR) sprintf(reply+strlen(reply), ";3%d", term->cur_foreground); - if (term->flags & FG_COLOR) + if (term->flags & BG_COLOR) sprintf(reply+strlen(reply), ";4%d", term->cur_background); }) Index: os2main.c --- xterm/os2main.c Tue Jun 3 16:05:50 1997 +++ xterm-51/os2main.c Mon Sep 15 20:18:25 1997 @@ -239,6 +239,9 @@ char *tty_modes; Boolean utmpInhibit; Boolean sunFunctionKeys; /* %%% should be widget resource? */ +#if OPT_SUNPC_KBD + Boolean sunKeyboard; +#endif Boolean wait_for_map; Boolean useInsertMode; } resource; @@ -264,6 +267,10 @@ offset(utmpInhibit), XtRString, "false"}, {"sunFunctionKeys", "SunFunctionKeys", XtRBoolean, sizeof (Boolean), offset(sunFunctionKeys), XtRString, "false"}, +#if OPT_SUNPC_KBD + {"sunKeyboard", "SunKeyboard", XtRBoolean, sizeof (Boolean), + offset(sunKeyboard), XtRString, "false"}, +#endif {"waitForMap", "WaitForMap", XtRBoolean, sizeof (Boolean), offset(wait_for_map), XtRString, "false"}, {"useInsertMode", "UseInsertMode", XtRBoolean, sizeof (Boolean), @@ -348,6 +355,10 @@ {"-sk", "*scrollKey", XrmoptionNoArg, (caddr_t) "on"}, {"+sk", "*scrollKey", XrmoptionNoArg, (caddr_t) "off"}, {"-sl", "*saveLines", XrmoptionSepArg, (caddr_t) NULL}, +#if OPT_SUNPC_KBD +{"-sp", "*sunKeyboard", XrmoptionNoArg, (caddr_t) "on"}, +{"+sp", "*sunKeyboard", XrmoptionNoArg, (caddr_t) "off"}, +#endif {"-t", "*tekStartup", XrmoptionNoArg, (caddr_t) "on"}, {"+t", "*tekStartup", XrmoptionNoArg, (caddr_t) "off"}, {"-tm", "*ttyModes", XrmoptionSepArg, (caddr_t) NULL}, @@ -431,6 +442,7 @@ { "-/+si", "turn on/off scroll-on-tty-output inhibit" }, { "-/+sk", "turn on/off scroll-on-keypress" }, { "-sl number", "number of scrolled lines to save" }, +{ "-/+sp", "turn on/off Sun/PC Function/Keypad mapping" }, { "-/+t", "turn on/off Tek emulation window" }, { "-tm string", "terminal mode keywords and characters" }, { "-tn name", "TERM environment variable name" }, @@ -802,6 +814,9 @@ xterm_name = resource.xterm_name; sunFunctionKeys = resource.sunFunctionKeys; +#if OPT_SUNPC_KBD + sunKeyboard = resource.sunKeyboard; +#endif if (strcmp(xterm_name, "-") == 0) xterm_name = "xterm"; if (resource.icon_geometry != NULL) { int scr, junk; Index: print.c --- xterm/print.c Wed Aug 13 09:29:16 1997 +++ xterm-51/print.c Mon Sep 15 19:14:34 1997 @@ -44,6 +44,10 @@ #include "data.h" #include "xterm.h" +#define Strlen(a) strlen((char *)a) +#define Strcmp(a,b) strcmp((char *)a,(char *)b) +#define Strncmp(a,b,c) strncmp((char *)a,(char *)b,c) + #define SGR_MASK (BOLD|UNDERLINE|INVERSE) static void charToPrinter PROTO((int chr)); @@ -293,15 +297,15 @@ case 'i': bfr[length++] = chr; for (n = 0; n < sizeof(tbl)/sizeof(tbl[0]); n++) { - Size_t len = strlen(tbl[n].seq); + Size_t len = Strlen(tbl[n].seq); if (length == len - && strcmp(bfr, tbl[n].seq) == 0) { + && Strcmp(bfr, tbl[n].seq) == 0) { screen->printer_controlmode = tbl[n].active; length = 0; return 0; } else if (len > length - && strncmp(bfr, tbl[n].seq, length) == 0) { + && Strncmp(bfr, tbl[n].seq, length) == 0) { return 0; } } Index: ptyx.h --- xterm/ptyx.h Wed Aug 27 06:48:32 1997 +++ xterm-51/ptyx.h Mon Sep 15 20:40:51 1997 @@ -324,6 +324,10 @@ #define OPT_ISO_COLORS 1 /* true if xterm is configured with ISO colors */ #endif +#ifndef OPT_SUNPC_KBD +#define OPT_SUNPC_KBD 1 /* true if xterm supports Sun/PC keyboard map */ +#endif + #ifndef OPT_TRACE #define OPT_TRACE 0 /* true if we're using debugging traces */ #endif @@ -775,10 +779,10 @@ TKeyboard keyboard; /* terminal keyboard */ TScreen screen; /* terminal screen */ unsigned flags; /* mode flags */ - unsigned cur_foreground; /* current foreground color */ - unsigned cur_background; /* current background color */ + int cur_foreground; /* current foreground color */ + int cur_background; /* current background color */ #if OPT_ISO_COLORS - unsigned sgr_foreground; /* current SGR foreground color */ + int sgr_foreground; /* current SGR foreground color */ #endif #if OPT_ISO_COLORS || OPT_DEC_CHRSET int num_ptrs; /* number of pointers per row in 'ScrnBuf' */ Index: screen.c --- xterm/screen.c Wed Aug 27 06:48:32 1997 +++ xterm-51/screen.c Mon Sep 8 15:42:08 1997 @@ -720,6 +720,8 @@ #endif /* sun */ Window tw = TextWindow (screen); + TRACE(("ScreenResize %dx%d\n", height, width)) + /* clear the right and bottom internal border because of NorthWest gravity might have left junk on the right and bottom edges */ if (width >= FullWidth(screen)) { Index: scrollbar.c --- xterm/scrollbar.c Wed Aug 27 06:48:32 1997 +++ xterm-51/scrollbar.c Mon Sep 8 15:42:08 1997 @@ -178,6 +178,9 @@ geomreqresult = XtMakeResizeRequest ((Widget)xw, repWidth, repHeight, NULL, NULL); } + XSync(screen->display, FALSE); /* synchronize */ + if(XtAppPending(app_con)) + xevents(); #ifndef nothack XSetWMNormalHints(screen->display, XtWindow(XtParent(xw)), &sizehints); Index: util.c --- xterm/util.c Tue Jul 29 15:13:30 1997 +++ xterm-51/util.c Mon Sep 15 20:47:35 1997 @@ -1436,12 +1436,12 @@ * BOLD or UNDERLINE color-mode active, those will be used unless we've got * an SGR foreground color active. */ -unsigned +int extract_fg (color, flags) unsigned color; unsigned flags; { - unsigned fg = (color >> 4) & 0xf; + int fg = (int) ((color >> 4) & 0xf); if (fg == extract_bg(color)) { if (term->screen.colorULMode && (flags & UNDERLINE)) @@ -1452,11 +1452,11 @@ return fg; } -unsigned +int extract_bg (color) unsigned color; { - return color & 0xf; + return (int) (color & 0xf); } /* Index: xterm.h --- xterm/xterm.h Wed Aug 27 06:48:32 1997 +++ xterm-51/xterm.h Mon Sep 15 20:46:29 1997 @@ -9,6 +9,14 @@ #define GCC_UNUSED /* nothing */ #endif +#ifndef HAVE_CONFIG_H + +#ifndef HAVE_X11_DECKEYSYM_H +#define HAVE_X11_DECKEYSYM_H 1 +#endif + +#endif + #include "proto.h" /* Tekproc.c */ @@ -134,7 +142,7 @@ extern void SysError PROTO((int i)); extern void VisualBell PROTO((void)); extern void creat_as PROTO((int uid, int gid, char *pathname, int mode)); -extern void do_dcs PROTO((Char *buf, int len)); +extern void do_dcs PROTO((Char *buf, Size_t len)); extern void do_osc PROTO((Char *buf, int len)); extern void do_xevents PROTO((void)); extern void end_tek_mode PROTO((void)); @@ -220,8 +228,8 @@ extern Pixel getXtermBackground PROTO((int flags, int color)); extern Pixel getXtermForeground PROTO((int flags, int color)); -extern unsigned extract_bg PROTO((unsigned color)); -extern unsigned extract_fg PROTO((unsigned color, unsigned flags)); +extern int extract_bg PROTO((unsigned color)); +extern int extract_fg PROTO((unsigned color, unsigned flags)); extern unsigned makeColorPair PROTO((int fg, int bg)); extern unsigned xtermColorPair PROTO((void)); extern void ClearCurBackground PROTO((TScreen *screen, int top, int left, unsigned height, unsigned width)); Index: xterm.man --- xterm/xterm.man Wed Aug 27 06:48:32 1997 +++ xterm-51/xterm.man Mon Sep 15 20:29:12 1997 @@ -371,6 +371,15 @@ This option specifies the number of lines to save that have been scrolled off the top of the screen. The default is 64. .TP 8 +.B \-sp +This option indicates that Sun/PC keyboard should be assumed, +providing mapping for keypad `+' to `,', and +CTRL-F1 to F13, CTRL-F2 to F14, etc. +.TP 8 +.B \+sp +This option indicates that the standard escape codes should be generated for +keypad and function keys. +.TP 8 .B \-t This option indicates that \fIxterm\fP should start in Tektronix mode, rather than in VT102 mode. Switching between the two windows is done using the @@ -575,6 +584,13 @@ .B "sunFunctionKeys (\fPclass\fB SunFunctionKeys)" Specifies whether or not Sun Function Key escape codes should be generated for function keys instead of standard escape sequences. +.TP 8 +.B "sunKeyboard (\fPclass\fB SunKeyboard)" +Specifies whether or not Sun/PC keyboard layout should be assumed rather +than DEC VT220. +This causes the keypad `+' to be mapped to `,'. +and +CTRL-F1 to F13, CTRL-F2 to F14, etc. .\".in -1in .TP 8 .B "waitForMap (\fPclass\fB WaitForMap)" Index: xtermcfg.hin --- xterm/xtermcfg.hin Wed Aug 27 06:48:32 1997 +++ xterm-51/xtermcfg.hin Mon Sep 15 18:24:23 1997 @@ -36,6 +36,7 @@ #undef HAVE_STRERROR /* AC_CHECK_FUNCS(strerror) */ #undef HAVE_TERMCAP_H /* AC_CHECK_HEADERS(termcap.h) */ #undef HAVE_UNISTD_H /* AC_CHECK_HEADERS(unistd.h) */ +#undef HAVE_X11_DECKEYSYM_H /* AC_CHECK_HEADERS(X11/DECkeysym.h) */ #undef HAVE_X11_XPOLL_H /* AC_CHECK_HEADERS(X11/Xpoll.h) */ #undef NO_ACTIVE_ICON /* CF_ARG_DISABLE(active-icon) */ #undef OPT_AIX_COLORS /* CF_ARG_DISABLE(16-color) */ @@ -48,6 +49,7 @@ #undef OPT_XMC_GLITCH /* CF_ARG_ENABLE(xmc-glitch) */ #undef USE_MY_MEMMOVE /* CF_FUNC_MEMMOVE */ #undef USE_OK_BCOPY /* CF_FUNC_MEMMOVE */ +#undef USE_SYS_SELECT_H /* CF_TYPE_FD_SET */ #undef USE_TERMINFO /* CF_FUNC_TGETENT */ #undef const /* AC_CONST */ #undef size_t /* AC_TYPE_SIZE_T */