configure.ac: update lzma check and misc doc

* the lzma check during configure wasn't properly displaying the
additional information on how to install if --enable-lzma was passed
but lzma devel files were not present

* updated additional information blocks to include distribution
package names

* minor formatting updates to add quotes around variables

Signed-off-by: jason taylor <jtfas90@gmail.com>
pull/3746/head
jason taylor 6 years ago committed by Victor Julien
parent c63fea8d0a
commit b98c28a60d

@ -584,6 +584,9 @@
if test "$ZLIB" = "no"; then if test "$ZLIB" = "no"; then
echo echo
echo " ERROR! zlib library not found, go get it" echo " ERROR! zlib library not found, go get it"
echo " Debian/Ubuntu: apt install zlib1g-dev"
echo " Fedora: dnf install zlib-devel"
echo " CentOS/RHEL: yum install zlib-devel"
echo echo
exit 1 exit 1
fi fi
@ -595,7 +598,7 @@
AC_ARG_WITH(liblzma_includes, AC_ARG_WITH(liblzma_includes,
[ --with-liblzma-includes=DIR liblzma include directory], [ --with-liblzma-includes=DIR liblzma include directory],
[with_liblzma_includes="$withval"],[with_liblzma_includes=no]) [with_liblzma_includes="$withval"],[with_liblzma_includes="no"])
AC_ARG_WITH(liblzma_libraries, AC_ARG_WITH(liblzma_libraries,
[ --with-liblzma-libraries=DIR liblzma library directory], [ --with-liblzma-libraries=DIR liblzma library directory],
[with_liblzma_libraries="$withval"],[with_liblzma_libraries="no"]) [with_liblzma_libraries="$withval"],[with_liblzma_libraries="no"])
@ -603,36 +606,39 @@
if test "$with_liblzma_includes" != "no"; then if test "$with_liblzma_includes" != "no"; then
CPPFLAGS="${CPPFLAGS} -I${with_liblzma_includes}" CPPFLAGS="${CPPFLAGS} -I${with_liblzma_includes}"
fi fi
TMPLIBS="${LIBS}"
AC_CHECK_HEADER(lzma.h,LIBLZMA="yes",LIBLZMA="no") AC_CHECK_HEADER(lzma.h,
if test "$LIBLZMA" = "yes"; then AC_CHECK_LIB(lzma,lzma_code,[
if test "$with_liblzma_libraries" != "no"; then AC_DEFINE([HAVE_LIBLZMA],[1],[liblzma available])
LDFLAGS="${LDFLAGS} -L${with_liblzma_libraries}" LIBLZMA="yes"
fi if test "$LIBLZMA" = "yes"; then
if test "$with_liblzma_libraries" != "no"; then
# To prevent duping the lib link we reset LIBS after this check. Setting action-if-found to NULL doesn't seem to work LDFLAGS="${LDFLAGS} -L${with_liblzma_libraries}"
# see: http://blog.flameeyes.eu/2008/04/29/i-consider-ac_check_lib-harmful LIBS="${TMPLIBS} -llzma"
LIBLZMA="" else
TMPLIBS="${LIBS}" LIBS="${TMPLIBS} -llzma"
AC_CHECK_LIB(lzma,lzma_code,,LIBLZMA="no") fi
fi]),LIBLZMA="no")
if test "$LIBLZMA" = "no"; then if test "$LIBLZMA" != "yes"; then
echo echo
echo " Warning! liblzma library not found, you will not be" echo " Warning! liblzma library not found, you will not be"
echo " able to decompress flash file compressed with lzma." echo " able to decompress flash file compressed with lzma."
echo echo " Debian/Ubuntu: apt install liblzma-dev"
enable_liblzma=no echo " Fedora: dnf install xz-devel"
else echo " CentOS/RHEL: yum install xz-devel"
enable_liblzma=yes echo
AC_DEFINE([HAVE_LIBLZMA],[1],[liblzma available]) enable_liblzma=no
LIBS="${TMPLIBS} -llzma" else
fi enable_liblzma=yes
LIBS="${TMPLIBS} -llzma"
fi fi
#libpcre #libpcre
AC_ARG_WITH(libpcre_includes, AC_ARG_WITH(libpcre_includes,
[ --with-libpcre-includes=DIR libpcre include directory], [ --with-libpcre-includes=DIR libpcre include directory],
[with_libpcre_includes="$withval"],[with_libpcre_includes=no]) [with_libpcre_includes="$withval"],[with_libpcre_includes="no"])
AC_ARG_WITH(libpcre_libraries, AC_ARG_WITH(libpcre_libraries,
[ --with-libpcre-libraries=DIR libpcre library directory], [ --with-libpcre-libraries=DIR libpcre library directory],
[with_libpcre_libraries="$withval"],[with_libpcre_libraries="no"]) [with_libpcre_libraries="$withval"],[with_libpcre_libraries="no"])
@ -646,11 +652,14 @@
LDFLAGS="${LDFLAGS} -L${with_libpcre_libraries}" LDFLAGS="${LDFLAGS} -L${with_libpcre_libraries}"
fi fi
PCRE="" PCRE=""
AC_CHECK_LIB(pcre, pcre_get_substring,, PCRE="no") AC_CHECK_LIB(pcre, pcre_get_substring,,PCRE="no")
if test "$PCRE" = "no"; then if test "$PCRE" = "no"; then
echo echo
echo " ERROR! pcre library not found, go get it" echo " ERROR! pcre library not found, go get it"
echo " from www.pcre.org." echo " from www.pcre.org. Or from packages:"
echo " Debian/Ubuntu: apt install libpcre3-dev"
echo " Fedora: dnf install pcre-devel"
echo " CentOS/RHEL: yum install pcre-devel"
echo echo
exit 1 exit 1
fi fi
@ -907,7 +916,10 @@
echo echo
echo " Jansson >= 2.2 is required for features like unix socket" echo " Jansson >= 2.2 is required for features like unix socket"
echo " Go get it from your distribution or from:" echo " Go get it from your distribution or from:"
echo " http://www.digip.org/jansson/" echo " http://www.digip.org/jansson/"
echo " Ubuntu: apt-get install libjansson-dev"
echo " Fedora: dnf install jansson-devel"
echo " CentOS/RHEL: yum install jansson-devel"
echo echo
if test "x$enable_unixsocket" = "xyes"; then if test "x$enable_unixsocket" = "xyes"; then
exit 1 exit 1
@ -932,6 +944,9 @@
echo " Jansson >= 2.2 is required for features like unix socket" echo " Jansson >= 2.2 is required for features like unix socket"
echo " Go get it from your distribution or from:" echo " Go get it from your distribution or from:"
echo " http://www.digip.org/jansson/" echo " http://www.digip.org/jansson/"
echo " Ubuntu: apt-get install libjansson-dev"
echo " Fedora: dnf install jansson-devel"
echo " CentOS/RHEL: yum install jansson-devel"
echo echo
exit 1 exit 1
fi fi
@ -983,6 +998,9 @@
echo " we automatically append libnetfilter_queue/ when searching" echo " we automatically append libnetfilter_queue/ when searching"
echo " for headers etc. when the --with-libnfnetlink-includes directive" echo " for headers etc. when the --with-libnfnetlink-includes directive"
echo " is used" echo " is used"
echo " Ubuntu: apt-get install libnetfilter-queue-dev"
echo " Fedora: dnf install libnetfilter_queue-devel"
echo " CentOS/RHEL: yum install libnetfilter_queue-devel"
echo echo
fi fi
;; ;;
@ -1051,6 +1069,9 @@
echo " we automatically append libnetfilter_queue/ when searching" echo " we automatically append libnetfilter_queue/ when searching"
echo " for headers etc. when the --with-libnfq-includes directive" echo " for headers etc. when the --with-libnfq-includes directive"
echo " is used" echo " is used"
echo " Ubuntu: apt-get install libnetfilter-queue-dev"
echo " Fedora: dnf install libnetfilter_queue-devel"
echo " CentOS/RHEL: yum install libnetfilter_queue-devel"
echo echo
exit 1 exit 1
fi fi
@ -1549,7 +1570,7 @@
echo " Debian/Ubuntu: apt install python-yaml" echo " Debian/Ubuntu: apt install python-yaml"
echo " Fedora: dnf install python-yaml" echo " Fedora: dnf install python-yaml"
echo " CentOS/RHEL: yum install python-yaml" echo " CentOS/RHEL: yum install python-yaml"
echo "" echo
else else
SURICATA_UPDATE_DIR="suricata-update" SURICATA_UPDATE_DIR="suricata-update"
AC_SUBST(SURICATA_UPDATE_DIR) AC_SUBST(SURICATA_UPDATE_DIR)
@ -2330,7 +2351,7 @@ fi
echo " ERROR! Rust support requires Python." echo " ERROR! Rust support requires Python."
echo echo
echo " Ubuntu: apt install python" echo " Ubuntu: apt install python"
echo "" echo
exit 1 exit 1
fi fi
enable_rust="no" enable_rust="no"
@ -2343,7 +2364,7 @@ fi
echo " Ubuntu: apt-get install libjansson-dev" echo " Ubuntu: apt-get install libjansson-dev"
echo " Fedora: dnf install jansson-devel" echo " Fedora: dnf install jansson-devel"
echo " CentOS/RHEL: yum install jansson-devel" echo " CentOS/RHEL: yum install jansson-devel"
echo "" echo
if test "x$enable_rust" = "xyes"; then if test "x$enable_rust" = "xyes"; then
exit 1 exit 1
fi fi
@ -2363,7 +2384,7 @@ fi
echo " Ubuntu: apt-get install cargo" echo " Ubuntu: apt-get install cargo"
echo " Fedora: dnf install cargo" echo " Fedora: dnf install cargo"
echo " CentOS/RHEL: yum install cargo" echo " CentOS/RHEL: yum install cargo"
echo "" echo
if test "x$enable_rust" = "xyes"; then if test "x$enable_rust" = "xyes"; then
exit 1 exit 1
fi fi
@ -2379,7 +2400,7 @@ fi
echo " Debian 10: apt-get install rustc" echo " Debian 10: apt-get install rustc"
echo " Fedora: dnf install rust" echo " Fedora: dnf install rust"
echo " CentOS/RHEL: yum install rust" echo " CentOS/RHEL: yum install rust"
echo "" echo
if test "x$enable_rust" = "xyes"; then if test "x$enable_rust" = "xyes"; then
exit 1 exit 1
fi fi

Loading…
Cancel
Save