[PATCH] Configure: introduced --without-libxslt

Dmitry Volyntsev xeioex at nginx.com
Sat May 6 06:05:09 UTC 2023


# HG changeset patch
# User Dmitry Volyntsev <xeioex at nginx.com>
# Date 1683353037 25200
#      Fri May 05 23:03:57 2023 -0700
# Node ID 4891e0920d7c0e89def28694686e34294c69acf1
# Parent  b71e69247483631bd8fc79a47cc32b762625b1fb
Configure: introduced --without-libxslt.

This allows to explicitly disable libxslt discovery by
nginx and nginx addons.

diff --git a/auto/lib/conf b/auto/lib/conf
--- a/auto/lib/conf
+++ b/auto/lib/conf
@@ -29,8 +29,21 @@ if [ $USE_ZLIB = YES ]; then
     . auto/lib/zlib/conf
 fi
 
-if [ $USE_LIBXSLT != NO ]; then
+if [ $USE_LIBXSLT != NO -a $USE_LIBXSLT != DISABLED ]; then
     . auto/lib/libxslt/conf
+
+else
+    if [ $USE_LIBXSLT = DISABLED -a $HTTP = YES -a $HTTP_XSLT = YES ]; then
+
+cat << END
+
+$0: error: the HTTP ngx_http_xslt_module requires the libxslt library.
+You can either disable the module by using --without-http_xslt_module
+option or you have to enable the libxslt support.
+
+END
+        exit 1
+    fi
 fi
 
 if [ $USE_LIBGD != NO ]; then
diff --git a/auto/modules b/auto/modules
--- a/auto/modules
+++ b/auto/modules
@@ -277,7 +277,7 @@ if [ $HTTP = YES ]; then
         . auto/module
     fi
 
-    if [ $HTTP_XSLT != NO ]; then
+    if [ $HTTP_XSLT != NO -a $USE_LIBXSLT != DISABLED ]; then
         ngx_module_name=ngx_http_xslt_filter_module
         ngx_module_incs=
         ngx_module_deps=
diff --git a/auto/options b/auto/options
--- a/auto/options
+++ b/auto/options
@@ -363,6 +363,8 @@ use the \"--with-mail_ssl_module\" optio
         --with-openssl=*)                OPENSSL="$value"           ;;
         --with-openssl-opt=*)            OPENSSL_OPT="$value"       ;;
 
+        --without-libxslt)               USE_LIBXSLT=DISABLED       ;;
+
         --with-md5=*)
             NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
 $0: warning: the \"--with-md5\" option is deprecated"
diff --git a/auto/summary b/auto/summary
--- a/auto/summary
+++ b/auto/summary
@@ -28,6 +28,10 @@ case $OPENSSL in
     *)     echo "  + using OpenSSL library: $OPENSSL" ;;
 esac
 
+if [ $USE_LIBXSLT = DISABLED ]; then
+    echo "  + XSLT library is disabled"
+fi
+
 case $ZLIB in
     YES)   echo "  + using system zlib library" ;;
     NONE)  echo "  + zlib library is not used" ;;


More information about the nginx-devel mailing list