Skip to content

Commit dd38f5e

Browse files
committed
Adjust link library options to compile with Windows port of libModSecurity v3
1 parent 0d8ee3b commit dd38f5e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

config

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ if [ -n "$MODSECURITY_INC" -o -n "$MODSECURITY_LIB" ]; then
3232
ngx_modsecurity_opt_I="-I$MODSECURITY_INC"
3333
ngx_modsecurity_opt_L="-L$MODSECURITY_LIB $YAJL_EXTRA"
3434

35-
if [ $NGX_RPATH = YES ]; then
36-
ngx_feature_libs="-R$MODSECURITY_LIB -L$MODSECURITY_LIB -lmodsecurity $YAJL_EXTRA"
37-
elif [ "$NGX_IGNORE_RPATH" != "YES" -a $NGX_SYSTEM = "Linux" ]; then
38-
ngx_feature_libs="-Wl,-rpath,$MODSECURITY_LIB -L$MODSECURITY_LIB -lmodsecurity $YAJL_EXTRA"
35+
if [ "$NGX_CC_NAME" != msvc ]; then
36+
if [ $NGX_RPATH = YES ]; then
37+
ngx_feature_libs="-R$MODSECURITY_LIB -L$MODSECURITY_LIB -lmodsecurity $YAJL_EXTRA"
38+
elif [ "$NGX_IGNORE_RPATH" != "YES" -a $NGX_SYSTEM = "Linux" ]; then
39+
ngx_feature_libs="-Wl,-rpath,$MODSECURITY_LIB -L$MODSECURITY_LIB -lmodsecurity $YAJL_EXTRA"
40+
else
41+
ngx_feature_libs="-L$MODSECURITY_LIB -lmodsecurity $YAJL_EXTRA"
42+
fi
3943
else
40-
ngx_feature_libs="-L$MODSECURITY_LIB -lmodsecurity $YAJL_EXTRA"
44+
# Adjust link library arguments to work with MSVC C++ compiler and
45+
# output of the Windows port of libModSecurity v3
46+
ngx_feature_libs="$MODSECURITY_LIB/libModSecurity.lib $YAJL_EXTRA"
4147
fi
4248

4349
. auto/feature

0 commit comments

Comments
 (0)