diff options
| author | 2025-04-12 16:49:12 +0100 | |
|---|---|---|
| committer | 2025-04-12 16:49:12 +0100 | |
| commit | 3dbb636af28e09dbd294f6fa065950a883db5203 (patch) | |
| tree | 16abdf4a2d942a657640c4621e57d9ef590e5883 | |
| parent | Add the require_environment() build function. (diff) | |
Allow building the httpd module against the system http_parser lib.
| -rw-r--r-- | src/modules/m_httpd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 249a91f83..fa8c16a47 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -26,6 +26,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +/// $CompilerFlags: require_environment("SYSTEM_HTTP_PARSER" "1") -DUSE_SYSTEM_HTTP_PARSER +/// $LinkerFlags: require_environment("SYSTEM_HTTP_PARSER" "1") -lhttp_parser + #include "inspircd.h" #include "iohook.h" @@ -41,7 +44,11 @@ # pragma GCC diagnostic ignored "-Wshadow" #endif -#include <http_parser/http_parser.c> +#ifdef USE_SYSTEM_HTTP_PARSER +# include <http_parser.h> +#else +# include <http_parser/http_parser.c> +#endif #ifdef __GNUC__ # pragma GCC diagnostic pop |
