-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe necessary to link with tinfo? #35
Comments
Depending on the way nurses was compiled, linking libtinfo may be necessary. If you use $ pkg-config --libs ncurses
-lncurses -ltinfo
$ pkg-config --libs ncursesw
-lncursesw -ltinfo |
Instead of using diff --git a/Makefile b/Makefile
index a2941f5..6d17b53 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
# Makefile for the supdup server and client.
+SHELL = /bin/sh
PREFIX ?= /usr/local
OS_NAME = $(shell uname)
ifeq ($(OS_NAME), Darwin)
OS = OSX
endif
CC = cc
CFLAGS = -g -Wall
LDFLAGS = -g
@@ -14,21 +15,21 @@ LDFLAGS = -g
# Mac OSX
ifeq ($(OS), OSX)
LDFLAGS = -L/opt/local/lib
endif
# The server isn't ready for prime time.
all: supdup
SUPDUP_OBJS = supdup.o charmap.o tcp.o chaos.o
supdup: $(SUPDUP_OBJS)
- $(CC) $(LDFLAGS) -o $@ $(SUPDUP_OBJS) -lncurses
+ $(CC) $(LDFLAGS) -o $@ $(SUPDUP_OBJS) $(shell pkg-config --libs ncurses 2> /dev/null || echo '-lncurses')
SUPDUPD_OBJS = supdupd.o
supdupd: $(SUPDUPD_OBJS)
$(CC) $(LDFLAGS) -o $@ $(SUPDUPD_OBJS)
install: supdup
install -m 0755 supdup $(PREFIX)/bin
test -x supdupd && install -m 0755 supdupd $(PREFIX)/bin
clean: This is GNU syntax, but that should be fine, as the Makefile doesn't work under |
I made a PR at #36 Linux/musl, NetBSD, OpenBSD, AIX, and Haiku now work; they didn't before. |
I cannot explain why things changed, but historically |
@ams and @drforbin, please continue discussion here. I'm curious why -ltinfo would be needed now, when it was not the case before. Please elaborate.
See also: PDP-10/its#2322
The text was updated successfully, but these errors were encountered: