2 # This isn't a configure generated by autoconf!
9 TMPDIR
=$
(mktemp
-d config.XXXXXX
)
10 trap 'status=$?; rm -rf $TMPDIR; exit $status' EXIT HUP INT QUIT TERM
14 echo -n "[*] Checking nacl ... "
16 cat > $TMPDIR/nacltest.c
<< EOF
17 #include "crypto_hash_sha512.h"
18 #include "crypto_verify_32.h"
19 #include "crypto_hash_sha512.h"
20 #include "crypto_box_curve25519xsalsa20poly1305.h"
21 #include "crypto_scalarmult_curve25519.h"
22 #include "crypto_auth_hmacsha512256.h"
27 if [ -z $NACL_INC_DIR ] ; then
28 NACL_INC_DIR
="/usr/include/nacl"
31 if [ -z $NACL_LIB_DIR ] ; then
32 NACL_LIB_DIR
="/usr/lib"
35 LDFLAGS
="-L $NACL_LIB_DIR"
36 CFLAGS
="-I $NACL_INC_DIR"
38 $CC $CFLAGS $LDFLAGS -o $TMPDIR/nacltest
$TMPDIR/nacltest.c
>> $TMPDIR/config.log
2>&1
39 if [ ! -x $TMPDIR/nacltest
] ; then
44 echo "CONFIG_NACL_INC_DIR:=$NACL_INC_DIR" >> Config
45 echo "CONFIG_NACL_LIB_DIR:=$NACL_LIB_DIR" >> Config
52 echo -n "[*] Checking libnl ... "
54 cat > $TMPDIR/libnltest.c
<< EOF
55 #include <libnl3/netlink/genl/genl.h>
56 #include <libnl3/netlink/genl/family.h>
57 #include <libnl3/netlink/genl/ctrl.h>
58 #include <libnl3/netlink/msg.h>
59 #include <libnl3/netlink/attr.h>
60 #include <libnl3/netlink/version.h>
62 #if LIBNL_VER_NUM < LIBNL_VER(3,0)
63 # error incompatible libnl version
69 $CC $
(pkg-config
--cflags libnl-3.0
) -o $TMPDIR/libnltest
$TMPDIR/libnltest.c
>> $TMPDIR/config.log
2>&1
70 if [ ! -x $TMPDIR/libnltest
] ; then
78 echo "# This file is autogenerated by the configure script" > Config
82 if [ "$MISSING_DEFS" == "1" ] ; then
83 echo "[!] Some libraries or header definitions are missing or too old."
84 echo " Please refer to the INSTALL file for the libraries needed to"
85 echo " build netsniff-ng."
89 if [ "$MISSING_NACL" == "1" ] ; then
90 echo "[!] The NaCl crypto library is currently not present on your"
91 echo " system or could not be found. Either install it from your"
92 echo " distro or build it manually using 'make nacl' and make sure"
93 echo " that the NACL_INC_DIR and NACL_LIB_DIR variables are set"
94 echo " appropriately."