mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Also find pcre2/pcre2.h. Fixes #2851
This commit is contained in:
64
configure
vendored
64
configure
vendored
@@ -7300,11 +7300,7 @@ fi
|
|||||||
|
|
||||||
# If they didn't specify it, we try to find it
|
# If they didn't specify it, we try to find it
|
||||||
if test $have_pcre != yes -a $requested_included_pcre != yes ; then
|
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_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "$ac_includes_default"
|
||||||
#define PCRE2_CODE_UNIT_WIDTH 8
|
|
||||||
|
|
||||||
|
|
||||||
"
|
|
||||||
if test "x$ac_cv_header_pcre2_h" = xyes
|
if test "x$ac_cv_header_pcre2_h" = xyes
|
||||||
then :
|
then :
|
||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pcre2_compile_8 in -lpcre2-8" >&5
|
||||||
@@ -7347,6 +7343,56 @@ then :
|
|||||||
have_pcre=yes
|
have_pcre=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
else $as_nop
|
||||||
|
ac_fn_c_check_header_compile "$LINENO" "pcre2/pcre2.h" "ac_cv_header_pcre2_pcre2_h" "$ac_includes_default"
|
||||||
|
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
|
||||||
|
printf %s "checking for pcre2_compile_8 in -lpcre2-8... " >&6; }
|
||||||
|
if test ${ac_cv_lib_pcre2_8_pcre2_compile_8+y}
|
||||||
|
then :
|
||||||
|
printf %s "(cached) " >&6
|
||||||
|
else $as_nop
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lpcre2-8 $LIBS"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
/* Override any GCC internal prototype to avoid an error.
|
||||||
|
Use char because int might match the return type of a GCC
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char pcre2_compile_8 ();
|
||||||
|
int
|
||||||
|
main (void)
|
||||||
|
{
|
||||||
|
return pcre2_compile_8 ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"
|
||||||
|
then :
|
||||||
|
ac_cv_lib_pcre2_8_pcre2_compile_8=yes
|
||||||
|
else $as_nop
|
||||||
|
ac_cv_lib_pcre2_8_pcre2_compile_8=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
fi
|
||||||
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre2_8_pcre2_compile_8" >&5
|
||||||
|
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
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -7364,14 +7410,6 @@ if test $have_pcre != yes ; then
|
|||||||
printf "%s\n" "#define PCRE_INCLUDED 1" >>confdefs.h
|
printf "%s\n" "#define PCRE_INCLUDED 1" >>confdefs.h
|
||||||
|
|
||||||
else
|
else
|
||||||
# We only need to check for and use this if we are NOT using included pcre
|
|
||||||
ac_fn_c_check_header_compile "$LINENO" "pcre2.h" "ac_cv_header_pcre2_h" "$ac_includes_default"
|
|
||||||
if test "x$ac_cv_header_pcre2_h" = xyes
|
|
||||||
then :
|
|
||||||
printf "%s\n" "#define HAVE_PCRE2_H 1" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
LIBPCRE_LIBS="-lpcre2-8"
|
LIBPCRE_LIBS="-lpcre2-8"
|
||||||
PCRE_BUILD=""
|
PCRE_BUILD=""
|
||||||
PCRE_CLEAN=""
|
PCRE_CLEAN=""
|
||||||
|
|||||||
10
configure.ac
10
configure.ac
@@ -530,10 +530,10 @@ AC_HELP_STRING([--with-libpcre=included], [Always use the version included with
|
|||||||
if test $have_pcre != yes -a $requested_included_pcre != yes ; then
|
if test $have_pcre != yes -a $requested_included_pcre != yes ; then
|
||||||
AC_CHECK_HEADER(pcre2.h,
|
AC_CHECK_HEADER(pcre2.h,
|
||||||
AC_CHECK_LIB(pcre2-8, pcre2_compile_8, [have_pcre=yes ]),
|
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
|
||||||
#define PCRE2_CODE_UNIT_WIDTH 8
|
AC_DEFINE(HAVE_PCRE2_PCRE2_H, 1)])]
|
||||||
]
|
)]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -547,8 +547,6 @@ if test $have_pcre != yes ; then
|
|||||||
PCRE_DIST_CLEAN="distclean-pcre"
|
PCRE_DIST_CLEAN="distclean-pcre"
|
||||||
AC_DEFINE(PCRE_INCLUDED, 1, [Using included libpcre2])
|
AC_DEFINE(PCRE_INCLUDED, 1, [Using included libpcre2])
|
||||||
else
|
else
|
||||||
# We only need to check for and use this if we are NOT using included pcre
|
|
||||||
AC_CHECK_HEADERS(pcre2.h)
|
|
||||||
LIBPCRE_LIBS="-lpcre2-8"
|
LIBPCRE_LIBS="-lpcre2-8"
|
||||||
PCRE_BUILD=""
|
PCRE_BUILD=""
|
||||||
PCRE_CLEAN=""
|
PCRE_CLEAN=""
|
||||||
|
|||||||
@@ -104,6 +104,8 @@
|
|||||||
|
|
||||||
#undef HAVE_TERMIOS_H
|
#undef HAVE_TERMIOS_H
|
||||||
|
|
||||||
|
#undef HAVE_PCRE2_PCRE2_H
|
||||||
|
|
||||||
#undef BSD_NETWORKING
|
#undef BSD_NETWORKING
|
||||||
|
|
||||||
#undef IN_ADDR_DEEPSTRUCT
|
#undef IN_ADDR_DEEPSTRUCT
|
||||||
|
|||||||
@@ -71,7 +71,11 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define PCRE2_CODE_UNIT_WIDTH 8
|
#define PCRE2_CODE_UNIT_WIDTH 8
|
||||||
#include <pcre2.h>
|
#ifdef HAVE_PCRE2_PCRE2_H
|
||||||
|
# include <pcre2/pcre2.h>
|
||||||
|
#else
|
||||||
|
# include <pcre2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user