• Bug#999956: snort: depends on obsolete pcre3 library (1/2)

    From Yavor Doganov@21:1/5 to All on Tue Jan 2 15:40:02 2024
    Control: tags -1 + patch

    Please find attached a patch (it applies to the latest upstream
    release 2.9.20 as well but not to the 3.x series).

    Description: Port to PCRE2.
    Bug-Debian: https://bugs.debian.org/999956
    Author: Yavor Doganov <yavor@gnu.org>
    Forwarded: no
    Last-Update: 2024-01-02
    ---

    --- snort-2.9.15.1.orig/configure.in
    +++ snort-2.9.15.1/configure.in
    @@ -465,19 +465,21 @@
    CPPFLAGS="${CPPFLAGS} -I${with_libpcre_includes}"
    ICONFIGFLAGS="${ICONFIGFLAGS} -I${with_libpcre_includes}"
    else
    - CPPFLAGS="${CPPFLAGS} `pcre-config --cflags`"
    + CPPFLAGS="${CPPFLAGS} `pcre2-config --cflags`"
    fi

    if test "x$with_libpcre_libraries" != "xno"; then
    LDFLAGS="${LDFLAGS} -L${with_libpcre_libraries}"
    else
    - LDFLAGS="${LDFLAGS} `pcre-config --libs`"
    + LDFLAGS="${LDFLAGS} `pcre2-config --libs8`"
    fi

    # PCRE configuration (required)
    # Verify that we have the headers
    PCRE_H=""
    -AC_CHECK_HEADERS(pcre.h,, PCRE_H="no")
    +AC_CHECK_HEADERS([pcre2.h], [], [PCRE_H="no"], [[
    +#define PCRE2_CODE_UNIT_WIDTH 8
    +]])
    if test "x$PCRE_H" = "xno"; then
    echo
    echo " ERROR! Libpcre header not found."
    @@ -487,36 +489,13 @@

    # Verify that we have the library
    PCRE_L=""
    -pcre_version_six=""
    -AC_CHECK_LIB(pcre, pcre_compile, ,PCRE_L="no")
    +AC_CHECK_LIB