From 955ecb391f6d579df3877761ccd156dbaee9b3a2 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sat, 8 Apr 2023 13:58:15 +0200 Subject: [PATCH] configure.ac: Add --disable-lighttpd Users can also extract the tarball manually and point a browser to it, so lighttpd should not be striclty required. Signed-off-by: Denis 'GNUtoo' Carikli Acked-by: Adrien 'neox' Bourmault --- Makefile.am | 8 ++++++++ configure.ac | 21 +++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index c6935a9..f6833d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,8 +101,16 @@ test: website.tar.gz -- \ ./serve.sh website.tar.gz else +if WANT_LIGHTTPD test: website.tar.gz ./serve.sh website.tar.gz +else +test: + @printf "%s %s\n" \ + "The test target is disabled." \ + "To enable it, run './configure --enable-lighttpd'." + @false +endif endif upload: website.tar.gz diff --git a/configure.ac b/configure.ac index 30be170..33a9261 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,14 @@ AC_ARG_WITH([lbwww-img-path], AM_CONDITIONAL( [WANT_LBWWW_IMG_PATH], [test x"$LBWWW_IMG_PATH" != x""]) +# --enable-lighttpd +AC_ARG_ENABLE(lighttpd, + [AS_HELP_STRING([--enable-lighttpd], + [Use lighttpd to run the scripts (default=enabled)])], + [lighttpd=$enableval], + [lighttpd="yes"]) +AM_CONDITIONAL( [WANT_LIGHTTPD], [test x"$lighttpd" = x"yes"]) + # --with-untitled-path AC_ARG_WITH([untitled-path], [AS_HELP_STRING([--with-untitled-path=PATH], @@ -112,10 +120,15 @@ AS_IF([test x"$guix" = x"yes"], [AC_MSG_ERROR( [gzip was not found in PATH ($PATH)])]) - AC_CHECK_PROG([FOUND_LIGHTTPD], [lighttpd], [lighttpd]) - AS_IF([test x"$FOUND_LIGHTTPD" = x""], - [AC_MSG_ERROR( - [lighttpd was not found in PATH ($PATH)])]) + AS_IF([test x"$lighttpd" = x"yes"], + [AC_CHECK_PROG([FOUND_LIGHTTPD], [lighttpd], [lighttpd]) + AS_IF([test x"$FOUND_LIGHTTPD" = x""], + [AC_MSG_ERROR( + [lighttpd was not found in PATH ($PATH)])])], + [AC_CHECK_PROG([FOUND_FALSE], [false], [false]) + AS_IF([test x"$FOUND_FALSE" = x""], + [AC_MSG_ERROR( + [false was not found in PATH ($PATH)])])]) AC_CHECK_PROG([FOUND_MKDIR], [mkdir], [mkdir]) AS_IF([test x"$FOUND_MKDIR" = x""],