mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
- Include definition of PCRE2_CODE_UNIT_WIDTH to allow the header test to compile correctly - Add description to the definition of HAVE_PCRE2_PCRE2_H to prevent an autoheader missing template error
This commit is contained in:
11
configure
vendored
11
configure
vendored
@@ -7300,7 +7300,8 @@ fi
|
||||
|
||||
# If they didn't specify it, we try to find it
|
||||
if test $have_pcre != yes -a $requested_included_pcre != yes ; then
|
||||
ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "$ac_includes_default"
|
||||
ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
"
|
||||
if test "x$ac_cv_header_pcre2_h" = xyes
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5
|
||||
@@ -7344,7 +7345,8 @@ then :
|
||||
fi
|
||||
|
||||
else $as_nop
|
||||
ac_fn_c_check_header_compile "$LINENO" "pcre2/pcre2.h" "ac_cv_header_pcre2_pcre2_h" "$ac_includes_default"
|
||||
ac_fn_c_check_header_compile "$LINENO" "pcre2/pcre2.h" "ac_cv_header_pcre2_pcre2_h" "#define PCRE2_CODE_UNIT_WIDTH 8
|
||||
"
|
||||
if test "x$ac_cv_header_pcre2_pcre2_h" = xyes
|
||||
then :
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5
|
||||
@@ -7385,14 +7387,13 @@ printf "%s\n" "$ac_cv_lib_pcre2_8_pcre2_compile_8" >&6; }
|
||||
if test "x$ac_cv_lib_pcre2_8_pcre2_compile_8" = xyes
|
||||
then :
|
||||
have_pcre=yes
|
||||
printf "%s\n" "#define HAVE_PCRE2_PCRE2_H 1" >>confdefs.h
|
||||
|
||||
printf "%s\n" "#define HAVE_PCRE2_PCRE2_H 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
17
configure.ac
17
configure.ac
@@ -529,12 +529,17 @@ AC_HELP_STRING([--with-libpcre=included], [Always use the version included with
|
||||
# If they didn't specify it, we try to find it
|
||||
if test $have_pcre != yes -a $requested_included_pcre != yes ; then
|
||||
AC_CHECK_HEADER(pcre2.h,
|
||||
AC_CHECK_LIB(pcre2-8, pcre2_compile_8, [have_pcre=yes ]),
|
||||
[AC_CHECK_HEADER(pcre2/pcre2.h,
|
||||
[AC_CHECK_LIB(pcre2-8, pcre2_compile_8, [have_pcre=yes
|
||||
AC_DEFINE(HAVE_PCRE2_PCRE2_H, 1)])]
|
||||
)]
|
||||
)
|
||||
AC_CHECK_LIB(pcre2-8,
|
||||
pcre2_compile_8,
|
||||
[have_pcre=yes ]),
|
||||
AC_CHECK_HEADER(pcre2/pcre2.h,
|
||||
AC_CHECK_LIB(pcre2-8,
|
||||
pcre2_compile_8,
|
||||
[have_pcre=yes
|
||||
AC_DEFINE(HAVE_PCRE2_PCRE2_H, 1, [Using system pcre2/pcre2.h])]),
|
||||
[],
|
||||
[#define PCRE2_CODE_UNIT_WIDTH 8]),
|
||||
[#define PCRE2_CODE_UNIT_WIDTH 8])
|
||||
fi
|
||||
|
||||
# If we still don't have it, we use our own
|
||||
|
||||
Reference in New Issue
Block a user