Skip to content

Commit b3a267d

Browse files
author
Marc Stern
authored
Merge pull request #3095 from airween/v3/buildmacros
fix: Replace obsolete macros
2 parents 985cb94 + d0f3cf1 commit b3a267d

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

build/lua.m4

+11-10
Original file line numberDiff line numberDiff line change
@@ -192,29 +192,30 @@ AC_DEFUN([CHECK_FOR_LUA_AT], [
192192
LUA_DISPLAY="${lua_lib_file}, ${lua_inc_path}"
193193
194194
# Double checking version from lua.h...
195-
AC_TRY_COMPILE([ #include <lua.h>> ],
196-
[ #if (LUA_VERSION_NUM < 502)
195+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ],
196+
[ #if (LUA_VERSION_NUM == 502)
197197
return 0;
198198
#else
199-
#error Lua 5.1 not detected
200-
#endif ],
201-
[ LUA_VERSION=501 ], [ lua_5_1=0 ]
199+
#error Lua 5.2 not detected
200+
#endif ]])],
201+
[ LUA_VERSION=502 ], [ lua_5_2=0 ]
202202
)
203203
204-
AC_TRY_COMPILE([ #include <lua.h> ],
205-
[ #if (LUA_VERSION_NUM == 502)
204+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ],
205+
[ #if (LUA_VERSION_NUM == 502)
206206
return 0;
207207
#else
208208
#error Lua 5.2 not detected
209-
#endif ],
209+
#endif ]])],
210210
[ LUA_VERSION=502 ], [ lua_5_2=0 ]
211211
)
212-
AC_TRY_COMPILE([ #include <lua.h> ],
212+
213+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <lua.h> ],
213214
[ #if (LUA_VERSION_NUM == 504)
214215
return 0;
215216
#else
216217
#error Lua 5.4 not detected
217-
#endif ],
218+
#endif ]])],
218219
[ LUA_VERSION=504 ], [ lua_5_4=0 ]
219220
)
220221

build/pcre.m4

+5-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ else
7777
CFLAGS="${PCRE_CFLAGS} ${CFLAGS}"
7878
LDFLAGS="${PCRE_LDADD} ${LDFLAGS}"
7979
LIBS="${PCRE_LDADD} ${LIBS}"
80-
AC_TRY_LINK([ #include <pcre.h> ],
81-
[ pcre_jit_exec(NULL, NULL, NULL, 0, 0, 0, NULL, 0, NULL); ],
82-
[ pcre_jit_available=yes ], [:]
80+
AC_LINK_IFELSE(
81+
[AC_LANG_PROGRAM([[ #include <pcre.h> ]],
82+
[[ pcre_jit_exec(NULL, NULL, NULL, 0, 0, 0, NULL, 0, NULL); ]])],
83+
[ pcre_jit_available=yes ],
84+
[:]
8385
)
8486
8587
if test "x$pcre_jit_available" = "xyes"; then

configure.ac

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ AM_CONDITIONAL([PCRE2_CFLAGS], [test "PCRE2_CFLAGS" != ""])
137137

138138

139139
# Checks for header files.
140-
AC_HEADER_STDC
141140
AC_CHECK_HEADERS([string])
142141
AC_CHECK_HEADERS([iostream])
143142
AC_CHECK_HEADERS([sys/utsname.h])
@@ -304,7 +303,7 @@ fi
304303

305304
if test $buildParser = true; then
306305
AC_PROG_YACC
307-
AC_PROG_LEX
306+
AC_PROG_LEX(noyywrap)
308307
AC_PATH_PROG([FLEX], [flex])
309308
test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build ModSecurity])
310309

0 commit comments

Comments
 (0)