[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lbwww-build][PATCH v1 4/4] configure.ac: Add --disable-lighttpd
From: |
Denis 'GNUtoo' Carikli |
Subject: |
[lbwww-build][PATCH v1 4/4] configure.ac: Add --disable-lighttpd |
Date: |
Sat, 8 Apr 2023 14:48:57 +0200 |
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 <GNUtoo@cyberdimension.org>
---
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""],
--
2.39.1