aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 13:50:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 13:50:38 -0700
commit0bad3d66d571e292aa2a00a75bd1c8838ca816e5 (patch)
tree4b55de66ab532aa86a05323a2fdf104bc56614e8
parent8f72c143b41c199eca261e543a5df52665bb62ae (diff)
downloadgrv-0bad3d66d571e292aa2a00a75bd1c8838ca816e5.tar.gz
grv-0bad3d66d571e292aa2a00a75bd1c8838ca816e5.tar.xz
grv-0bad3d66d571e292aa2a00a75bd1c8838ca816e5.zip
Don't build grvscored if we don't have flock()
Windows file locking seems a mess, so just don't bother.
-rw-r--r--Makefile.in6
-rw-r--r--configure.ac17
2 files changed, 7 insertions, 16 deletions
diff --git a/Makefile.in b/Makefile.in
index f75f0c9..9122457 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,10 +12,10 @@ PERL = perl
O = @OBJEXT@
X = @EXEEXT@
-ALL = grv$(X) grvscored$(X)
+ALL = @ALLPROGS@
-OBJS = grv.$(O) drawlevel.$(O) play.$(O) action.$(O) bullets.$(O) mystery.$(O) \
- prefs.$(O) intro.$(O) \
+OBJS = grv.$(O) drawlevel.$(O) play.$(O) action.$(O) bullets.$(O) \
+ mystery.$(O) prefs.$(O) intro.$(O) \
utils.$(O) scoretbl.$(O) highscore.$(O) \
netopen.$(O) keyboard.$(O) graphics.$(O) grvfont.$(O) random.$(O) \
sysrand.$(O) homedir.$(O)
diff --git a/configure.ac b/configure.ac
index eaf5568..b3db1f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,30 +73,21 @@ AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(paths.h)
AC_CHECK_HEADERS(io.h)
AC_CHECK_HEADERS(windows.h)
-AC_CHECK_HEADERS(direct.h)
dnl Useful functions which we may lack
AC_CHECK_FUNCS([mempcpy])
AC_CHECK_FUNCS([asprintf])
-dnl These types are POSIX-specific, and Windows does it differently...
-AC_CHECK_TYPES([struct _stat64])
-AC_CHECK_TYPES([struct stat])
-AC_CHECK_FUNCS([stat _stat64])
-AC_CHECK_FUNCS([fstat _fstat64])
-
dnl Newer versions of POSIX have this
AC_CHECK_TYPES(mode_t)
dnl Temporary file functions
AC_CHECK_FUNCS([mkstemp tempnam])
-dnl File attributes
-AC_CHECK_FUNCS([_setmode])
-
-dnl Console handling
-AC_CHECK_FUNCS(setsid)
-AC_FUNC_FORK
+dnl File locking needed to build grvscored
+ALLPROGS='grv$(X)'
+AC_SUBST(ALLPROGS)
+AC_CHECK_FUNCS([flock], [ALLPROGS="$ALLPROGS grvscored\$(X)"])
dnl Libraries needed
AC_SEARCH_LIBS([exp],[m])