From 9aee4e563fd05c2aad99e87e92a95e3273732024 Mon Sep 17 00:00:00 2001 From: Joshua Kwan Date: Fri, 18 Jun 2004 18:16:22 +0000 Subject: [PATCH] various fixes git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@304 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- Makefile.in | 29 ++++++++--------------------- configure.ac | 4 ++-- dgamelaunch.c | 4 ++-- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index ada238b..2ae5d41 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,7 +31,9 @@ dgl-wall: $(WALL_OBJS) clean: rm -f $(NAME) nethackstub dgl-wall - rm -f editors/*.o *.o .#* *~ y.tab.* lex.yy.c Makefile.dep + rm -f editors/*.o *.o .#* *~ y.tab.* lex.yy.c .depend + +distclean: clean rm -f Makefile config.h config.log config.status rm -rf autom4te.cache @@ -52,7 +54,7 @@ y.tab.c y.tab.h: config.y lex.yy.o: lex.yy.c y.tab.o: y.tab.c -dist: dep clean +dist: .depend distclean rm -rf $(NAME)-$(VERSION) autoheader autoconf @@ -61,23 +63,8 @@ dist: dep clean rm -f ../$(NAME)-$(VERSION) @echo "Created source release $(NAME)-$(VERSION).tar.gz" -dep: y.tab.c lex.yy.c - @sed -e '/^# Source code dependencies/,$$d' < Makefile > Makefile.dep - @echo "# Source code dependencies" >> Makefile.dep - $(CC) -MM $(SRCS) $(EXTRA_SRCS) >> Makefile.dep - mv Makefile.dep Makefile +.depend: y.tab.c lex.yy.c + $(CC) -MM $(SRCS) $(EXTRA_SRCS) > .depend + +include .depend -# Source code dependencies -ee.o: ee.c -dgl-common.o: dgl-common.c dgamelaunch.h -ttyrec.o: ttyrec.c dgamelaunch.h ttyrec.h io.h -dgamelaunch.o: dgamelaunch.c dgamelaunch.h ttyplay.h ttyrec.h y.tab.h -io.o: io.c ttyrec.h -ttyplay.o: ttyplay.c dgamelaunch.h ttyplay.h ttyrec.h io.h stripgfx.h -mygetnstr.o: mygetnstr.c -stripgfx.o: stripgfx.c stripgfx.h -strlcpy.o: strlcpy.c -strlcat.o: strlcat.c -y.tab.o: y.tab.c dgamelaunch.h -lex.yy.o: lex.yy.c y.tab.h dgamelaunch.h -nethackstub.o: nethackstub.c diff --git a/configure.ac b/configure.ac index 2fedfc1..13c666e 100644 --- a/configure.ac +++ b/configure.ac @@ -14,7 +14,7 @@ AC_PROG_YACC case "$(uname -s)" in Linux | *BSD) LIBS="$LIBS -lutil -lcrypt" - AC_DEFINE(NOSTREAMS, 1, [Use SVR4 streams support in ttyrec.]) + AC_DEFINE(NOSTREAMS, 1, [Don't use SVR4 streams support in ttyrec.]) ;; esac @@ -35,6 +35,6 @@ AC_ARG_WITH(config-file, AC_DEFINE_UNQUOTED(DEFCONFIG, "$configfile", [Path to the default config file.]) -AC_CHECK_FUNCS(openpty) +AC_CHECK_FUNCS([openpty setenv]) AC_CONFIG_FILES(Makefile) AC_OUTPUT diff --git a/dgamelaunch.c b/dgamelaunch.c index 68b3cfa..6b42812 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -100,7 +100,7 @@ struct dg_user **users = NULL; struct dg_user *me = NULL; struct dg_banner banner; -#if !(defined(__linux__) || defined(BSD)) +#ifndef HAVE_SETENV int mysetenv (const char* name, const char* value, int overwrite) { @@ -121,7 +121,7 @@ mysetenv (const char* name, const char* value, int overwrite) } #else /* use native setenv */ # define mysetenv setenv -#endif /* !linux && !bsd */ +#endif /* ************************************************************* */ /* for ttyrec */ -- 2.47.3