add static support to autoconf

This commit is contained in:
nehalmistry 2003-05-14 16:20:17 +00:00
parent 9a69b81016
commit c0cff86489
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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)])