[patch] ngx_cpp_test module build issue cleanup

Vladimir Homutov vl at inspert.ru
Wed Nov 23 17:50:54 UTC 2022


Hello,

the simplest ./configure --with-cpp_test_module leads to build error
after successful configuration:

src/misc/ngx_cpp_test_module.cpp:13:12: fatal error: ngx_mail.h: No such file or directory
   13 |   #include <ngx_mail.h>
      |            ^~~~~~~~~~~~
compilation terminated.


# HG changeset patch
# User Vladimir Khomutov <vl at inspert.ru>
# Date 1669225034 -10800
#      Wed Nov 23 20:37:14 2022 +0300
# Node ID 6237563c81707c8c2453cb0a7509ddaf64c02f4e
# Parent  49e7db44b57c9f4d54b87d19a696178b913aec5c
The ngx_cpp_test_module build requires mail and stream.

# HG changeset patch
# User Vladimir Khomutov <vl at inspert.ru>
# Date 1669225742 -10800
#      Wed Nov 23 20:49:02 2022 +0300
# Node ID 12c04127e3fe4d6aa689ef3bcf3ae0834e7e9ed5
# Parent  b809f53d3f5bd04df36ac338845289d8e60a888b
The ngx_cpp_test_module build requires mail and stream.

diff --git a/auto/modules b/auto/modules
--- a/auto/modules
+++ b/auto/modules
@@ -1358,6 +1358,17 @@ if [ $NGX_GOOGLE_PERFTOOLS = YES ]; then
 fi

 if [ $NGX_CPP_TEST = YES ]; then
+
+    if [ $MAIL = NO ]; then
+        echo "$0: error: ngx_cpp_test_module assumes \"--with-mail\""
+        exit 1
+    fi
+
+    if [ $STREAM = NO ]; then
+        echo "$0: error: ngx_cpp_test_module assumes \"--with-stream\""
+        exit 1
+    fi
+
     ngx_module_name=
     ngx_module_incs=
     ngx_module_deps=



More information about the nginx-devel mailing list