kumquat-buildroot/package/snort/snort.mk
Thomas Petazzoni f6d28852ab snort: avoid detecting the host pcre
The pcre configure script does this:

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

So if you don't pass --with-libpcre-libraries, it calls pcre-config as
available in the PATH. So it picks up pcre-config from $(HOST_DIR) or
the system, which return results inappropriate for cross-compilation.

So, let's explicitly pass --with-libpcre-includes and
--with-libpcre-libraries to avoid those issues.

Fixes:

  http://autobuild.buildroot.net/results/3df11c48c8e2f795f478d1ee666dda9de19133d0/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-02 09:16:22 +02:00

35 lines
960 B
Makefile

################################################################################
#
# snort
#
################################################################################
SNORT_VERSION = 2.9.11.1
SNORT_SITE = https://www.snort.org/downloads/snort
SNORT_LICENSE = GPL-2.0
SNORT_LICENSE_FILES = LICENSE COPYING
SNORT_DEPENDENCIES = libpcap libdnet daq pcre
# patching configure.in
SNORT_AUTORECONF = YES
SNORT_CONF_OPTS = \
--with-libpcre-includes=$(STAGING_DIR)/usr/include \
--with-libpcre-libraries=$(STAGING_DIR)/usr/lib \
--with-libpcap-includes=$(STAGING_DIR)/usr/include/pcap \
--disable-static-daq
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
SNORT_DEPENDENCIES += libtirpc host-pkgconf
SNORT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
SNORT_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
endif
SNORT_CONF_ENV = \
CFLAGS="$(TARGET_CFLAGS) $(SNORT_CFLAGS)" \
LIBS="$(SNORT_LIBS)" \
have_inaddr_none=yes
$(eval $(autotools-package))