diff --git a/Rules.make.in b/Rules.make.in
index 392c7daa9..ef8212438 100644
--- a/Rules.make.in
+++ b/Rules.make.in
@@ -36,7 +36,7 @@ TOOLLIBS=$(XLDFLAGS) -lpng -lz -lm @THREAD_LIBS@
 FREECRAFT_LIBS= -lpng -lz -lm \
 	@VIDEO_LIBS@ @THREAD_LIBS@ $(CCLLIB) $(COMP_LIBS) \
 	$(ARTSCLIB) @FLAC_LIBS@ @OGG_LIBS@ @MAD_LIBS@ @CDAUDIO_LIBS@ \
-	 -lz -lm
+	@STATIC_LDFLAGS@ -lz -lm
 
 DISTLIST=$(TOPDIR)/distlist
 TAGS=$(TOPDIR)/src/tags
diff --git a/configure.in b/configure.in
index a0f0e6691..76b44e1ad 100644
--- a/configure.in
+++ b/configure.in
@@ -29,6 +29,12 @@ AC_CHECK_HEADERS(png.h,, AC_MSG_ERROR(could not find png.h))
 
 AC_ARG_ENABLE(static,
     [  --enable-static	  Compile a static binary (default: no)])
+if test "$enable_static" != "yes"; then
+    STATIC_LDFLAGS="-static"
+else
+    STATIC_LDFLAGS=
+fi
+AC_SUBST(STATIC_LDFLAGS)
 
 AC_ARG_ENABLE(profile,
     [  --enable-profile	  Enable profiling support, implies --enable-debug (default: no)])