]> skyeroc.xyz Git - dgamelaunch/commitdiff
various fixes
authorJoshua Kwan <joshk@triplehelix.org>
Fri, 18 Jun 2004 18:16:22 +0000 (18:16 +0000)
committerJoshua Kwan <joshk@triplehelix.org>
Fri, 18 Jun 2004 18:16:22 +0000 (18:16 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@304 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

Makefile.in
configure.ac
dgamelaunch.c

index ada238b07db9fc4f179790e46d1de5b98d39103e..2ae5d4165b4cd56df0b27add696fec174a8f5118 100644 (file)
@@ -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
index 2fedfc1d1366f72b77494a0eb456c05afc4cd493..13c666e6cc76fdc98e19797df88f6e670dc1edcf 100644 (file)
@@ -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
index 68b3cfabacb2453ce3062894416b7560f42d06e6..6b42812c181f37b794ffea99a415b3609cab51cf 100644 (file)
@@ -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 */