From 1062ffcbfbe0e13fb32bbf278c16e9ee557f26ba Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 20 Jan 1998 01:06:09 +0000 Subject: [PATCH] Add conditionalizations to give more control over the linking of termcap and X11 files. --- v7/src/microcode/s/linux.h | 21 ++++++++++++--------- v7/src/microcode/unxutl/ymkfile | 22 ++++++++++++++++------ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/v7/src/microcode/s/linux.h b/v7/src/microcode/s/linux.h index 13f371bb3..820f0e45f 100644 --- a/v7/src/microcode/s/linux.h +++ b/v7/src/microcode/s/linux.h @@ -1,9 +1,9 @@ /* -*-C-*- System file for Linux -$Id: linux.h,v 1.13 1997/10/02 19:52:53 adams Exp $ +$Id: linux.h,v 1.14 1998/01/20 01:06:09 cph Exp $ -Copyright (c) 1995-97 Massachusetts Institute of Technology +Copyright (c) 1995-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -33,22 +33,25 @@ Technology nor of any adaptation thereof in any advertising, promotional, or sales literature without prior written consent from MIT in each case. */ -#define LIBX11_MACHINE -L/usr/X11R6/lib +#define LIBX11_SYSTEM -L/usr/X11R6/lib #define LIB_DEBUG #define ALTERNATE_M4 s/ultrix.m4 +#define LINUX_STATIC_LIBS(libs) -Xlinker -Bstatic libs -Xlinker -Bdynamic + #ifdef __ELF__ #define M4_SWITCH_SYSTEM -P "define(LINUX_ELF,1)" -/* This is kind of random -- the only system that I've tried this on - is Debian 1.1, which uses ncurses for its termcap support (Debian - 0.93R6 used termcap instead). Debian can have -ltermcap, but it's - an optional package and often not installed. */ -#define LIBS_TERMCAP -lncurses +/* Newer versions of Debian don't really support termcap. However, + ncurses is supported on all GNU/Linux systems, so we'll use that + instead. */ +#define LIBS_TERMCAP LINUX_STATIC_LIBS (-lncurses) +#define HAVE_TERMINFO +#define TERMCAP_FILES #else #define M4_SWITCH_SYSTEM -#define LIBS_TERMCAP -ltermcap +#define LIBS_TERMCAP LINUX_STATIC_LIBS (-ltermcap) #endif #define LD_SWITCH_SYSTEM -export-dynamic diff --git a/v7/src/microcode/unxutl/ymkfile b/v7/src/microcode/unxutl/ymkfile index 05e504104..0eccdf313 100644 --- a/v7/src/microcode/unxutl/ymkfile +++ b/v7/src/microcode/unxutl/ymkfile @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: ymkfile,v 1.92 1997/10/22 05:40:36 cph Exp $ +$Id: ymkfile,v 1.93 1998/01/20 01:05:39 cph Exp $ -Copyright (c) 1989-97 Massachusetts Institute of Technology +Copyright (c) 1989-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -144,22 +144,32 @@ MIT in each case. */ #ifndef LIBS_TERMCAP #define LIBS_TERMCAP -lcurses #endif -TERMCAP_OBJECTS = terminfo.o tterm.o +#ifndef TERMCAP_FILES +#define TERMCAP_FILES terminfo.o +#endif #else /* not HAVE_TERMINFO */ #ifndef LIBS_TERMCAP #define LIBS_TERMCAP -TERMCAP_OBJECTS = termcap.o tparam.o tterm.o +#ifndef TERMCAP_FILES +#define TERMCAP_FILES termcap.o tparam.o +#endif #else /* LIBS_TERMCAP */ -TERMCAP_OBJECTS = tparam.o tterm.o +#ifndef TERMCAP_FILES +#define TERMCAP_FILES tparam.o +#endif #endif /* LIBS_TERMCAP */ #endif /* not HAVE_TERMINFO */ TERMCAP_SOURCES = tterm.c +TERMCAP_OBJECTS = TERMCAP_FILES tterm.o TERMCAP_LIBS = LIBS_TERMCAP #ifdef HAVE_X_WINDOWS X_SOURCES = x11base.c x11term.c x11graph.c x11color.c X_OBJECTS = x11base.o x11term.o x11graph.o x11color.o -X_LIB = LIBX11_MACHINE LIBX11_SYSTEM -lX11 +#ifndef X11_LIBRARY +#define X11_LIBRARY -lX11 +#endif +X_LIB = LIBX11_MACHINE LIBX11_SYSTEM X11_LIBRARY #endif /* HAVE_X_WINDOWS */ #ifdef HAVE_STARBASE_GRAPHICS -- 2.25.1