libreboot-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lbwww-build][PATCH v1 4/4] configure.ac: Add --disable-lighttpd


From: Adrien Bourmault
Subject: Re: [lbwww-build][PATCH v1 4/4] configure.ac: Add --disable-lighttpd
Date: Thu, 13 Apr 2023 21:32:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1

Acked-by: Adrien 'neox' Bourmault <neox@a-lec.org>

Good point.

Le 08/04/2023 à 14:48, Denis 'GNUtoo' Carikli a écrit :
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""],


Attachment: OpenPGP_0xAAD6B069819E6979.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]