From cd68727307a4ba96dc83edf3a5339e5fed386245 Mon Sep 17 00:00:00 2001 From: Steve Vinoski Date: Thu, 29 Jan 2009 05:54:17 +0000 Subject: [PATCH] add --disable-sendfile option to configure, fix src/Makefile to clean yaws_configure.hrl git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@1375 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52 --- configure | 15 ++++++++++++--- configure.in | 8 +++++--- src/Makefile | 4 ++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 38ea857b9..8b187c449 100755 --- a/configure +++ b/configure @@ -1261,13 +1261,16 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ---disable-pam disables pam auth + --disable-pam disables pam auth + --disable-sendfile disables use of sendfile system call Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-defaultcharset=String specify default charset, i.e UTF-8 - --with-extrainclude= dir to include if e.g. pam is installed in some odd place + --with-defaultcharset=String + specify default charset, i.e UTF-8 + --with-extrainclude=DIR dir to include if e.g. pam is installed in some odd + place Some influential environment variables: CC C compiler command @@ -1940,6 +1943,7 @@ ERLBINDIR=`dirname "$ERL"` ; ERLBINDIR=`dirname "$ERLBINDIR"`/lib/erlang/bin + # Check whether --with-default-charset was given. if test "${with_default_charset+set}" = set; then withval=$with_default_charset; @@ -3949,6 +3953,11 @@ echo "$as_me: error: Non-supported target OS!" >&2;} ;; esac +# Check whether --enable-sendfile was given. +if test "${enable_sendfile+set}" = set; then + enableval=$enable_sendfile; test "$enableval" = no && HAVE_SENDFILE=false +fi + YTOP=`pwd` diff --git a/configure.in b/configure.in index 37a4a9c5e..6d6d380c6 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_SUBST(ERLC) AC_SUBST(ERLBINDIR) AC_ARG_WITH(default-charset, -[ --with-defaultcharset=String specify default charset, i.e UTF-8 ]) +AS_HELP_STRING([--with-defaultcharset=String], [specify default charset, i.e UTF-8])) if test "x$with_defaultcharset" = "x" ; then @@ -32,7 +32,7 @@ AC_SUBST(DEFAULT_CHARSET) AC_ARG_WITH(extrainclude, -[ --with-extrainclude= dir to include if e.g. pam is installed in some odd place ]) +AS_HELP_STRING([--with-extrainclude=DIR], [dir to include if e.g. pam is installed in some odd place])) if test "x$with_extrainclude" = "x" ; then @@ -45,7 +45,7 @@ AC_SUBST(EXTRAINCLUDE) -AC_ARG_ENABLE(pam, [--disable-pam disables pam auth], EPAM=, EPAM=../priv/epam) +AC_ARG_ENABLE(pam, AS_HELP_STRING([--disable-pam], [disables pam auth]), EPAM=, EPAM=../priv/epam) AC_SUBST(EPAM) @@ -260,6 +260,8 @@ case "$target_os" in ;; esac +AC_ARG_ENABLE(sendfile, AS_HELP_STRING([--disable-sendfile], [disables use of sendfile system call]), + [ test "$enableval" = no && HAVE_SENDFILE=false ]) AC_SUBST(HAVE_SENDFILE) YTOP=`pwd` AC_SUBST(YTOP) diff --git a/src/Makefile b/src/Makefile index bc9027417..8f1e51299 100644 --- a/src/Makefile +++ b/src/Makefile @@ -67,7 +67,7 @@ yaws_generated.erl: yaws_generated.template ../vsn.mk ../scripts/Subst %localinstall% true | \ ../scripts/Subst %ETCDIR% ${ETCDIR} > yaws_generated.erl -yaws_configure.hrl: ../vsn.mk +yaws_configure.hrl: ../vsn.mk ../include.mk set -x; \ if [ $(HAVE_SENDFILE) = "true" ]; then \ echo "-define(HAVE_SENDFILE, true)." > yaws_configure.hrl; \ @@ -95,7 +95,7 @@ debug: $(MAKE) TYPE=debug clean: - rm -f $(EBIN_FILES) yaws_generated.erl charset.def mime_types.erl + rm -f $(EBIN_FILES) yaws_generated.erl charset.def mime_types.erl yaws_configure.hrl install: regen all docsinstall $(INSTALL) -d $(DESTDIR)$(PREFIX)/lib/yaws/examples/ebin