177 lines
5.0 KiB
Diff
177 lines
5.0 KiB
Diff
--- a/configure
|
|
+++ b/configure
|
|
@@ -4843,59 +4843,6 @@
|
|
|
|
disable_bpf=no
|
|
have_bpf=no
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
|
|
-$as_echo_n "checking for BPF device sending support... " >&6; }
|
|
-if test "$cross_compiling" = yes; then :
|
|
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
|
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
|
-as_fn_error $? "cannot run test program while cross compiling
|
|
-See \`config.log' for more details" "$LINENO" 5; }
|
|
-else
|
|
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
-/* end confdefs.h. */
|
|
-
|
|
-#include <stdio.h>
|
|
-#include <fcntl.h>
|
|
-#include <stdlib.h>
|
|
-#include <errno.h>
|
|
-
|
|
-int
|
|
-main(int argc, char *argv[]) {
|
|
- int fd;
|
|
-
|
|
- fd = open("/dev/bpf0", O_RDONLY, 0);
|
|
-
|
|
- /* if we opened it, we're good */
|
|
- if (fd > 1)
|
|
- exit(0);
|
|
-
|
|
- /* if we got EBUSY or permission denied it exists, so we're good */
|
|
- if (fd < 0 && (errno == EBUSY || errno == 13))
|
|
- exit(0);
|
|
-
|
|
- /* else suck, no good */
|
|
- exit(-1);
|
|
-}
|
|
-_ACEOF
|
|
-if ac_fn_c_try_run "$LINENO"; then :
|
|
-
|
|
- if test $disable_bpf = no ; then
|
|
-
|
|
-$as_echo "#define HAVE_BPF 1" >>confdefs.h
|
|
-
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
-$as_echo "yes" >&6; }
|
|
- have_bpf=yes
|
|
- else
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
-$as_echo "no" >&6; }
|
|
- fi
|
|
-
|
|
-fi
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
-fi
|
|
-
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
|
|
$as_echo_n "checking for a complete set of libnet headers... " >&6; }
|
|
@@ -4947,11 +4894,6 @@
|
|
LIBNET_INCLUDE="-I$libnet_dir"
|
|
LIBNET_LINK="-L`dirname $libnet_dir`/lib"
|
|
LIBNET_CONFIG="$libnet_config_dir/libnet-config"
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
fi
|
|
|
|
if test "$LIBNET_LINK" != "-L/usr/lib" ; then
|
|
@@ -4961,99 +4903,7 @@
|
|
CFLAGS="$CFLAGS $LIBNET_INCLUDE"
|
|
fi
|
|
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
|
|
-$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
|
|
-if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
|
|
- $as_echo_n "(cached) " >&6
|
|
-else
|
|
- ac_check_lib_save_LIBS=$LIBS
|
|
-LIBS="-lnet $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. */
|
|
-#ifdef __cplusplus
|
|
-extern "C"
|
|
-#endif
|
|
-char libnet_build_stp_conf ();
|
|
-int
|
|
-main ()
|
|
-{
|
|
-return libnet_build_stp_conf ();
|
|
- ;
|
|
- return 0;
|
|
-}
|
|
-_ACEOF
|
|
-if ac_fn_c_try_link "$LINENO"; then :
|
|
- ac_cv_lib_net_libnet_build_stp_conf=yes
|
|
-else
|
|
- ac_cv_lib_net_libnet_build_stp_conf=no
|
|
-fi
|
|
-rm -f core conftest.err conftest.$ac_objext \
|
|
- conftest$ac_exeext conftest.$ac_ext
|
|
-LIBS=$ac_check_lib_save_LIBS
|
|
-fi
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
|
|
-$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
|
|
-if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
|
|
- have_libnet=yes
|
|
-else
|
|
- have_libnet=no
|
|
-fi
|
|
-
|
|
-if test $have_libnet = no; then
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
|
|
-$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
|
|
- as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
|
|
-fi
|
|
-
|
|
-
|
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
|
|
-$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
|
|
-if test "$cross_compiling" = yes; then :
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
-$as_echo "no" >&6; }; have_libnet=no
|
|
-else
|
|
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
-/* end confdefs.h. */
|
|
-
|
|
-#include<stdio.h>
|
|
-#include<libnet.h>
|
|
-#define HOPE_MAJOR 1
|
|
-#define HOPE_MEDIUM 1
|
|
-#define HOPE_MINOR 2
|
|
-int main()
|
|
-{
|
|
- unsigned int major,medium,minor,current, desired;
|
|
- desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
|
|
- sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
|
|
- current = major*10000 + medium*100 + minor;
|
|
- if ( current >= desired )
|
|
- exit(0);
|
|
- exit(1);
|
|
-}
|
|
-_ACEOF
|
|
-if ac_fn_c_try_run "$LINENO"; then :
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
-$as_echo "yes" >&6; }; have_libnet=yes
|
|
-else
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
-$as_echo "no" >&6; }; have_libnet=no
|
|
-fi
|
|
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
|
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
|
-fi
|
|
-
|
|
-
|
|
-if test $have_libnet = no; then
|
|
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
|
|
-$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
|
|
- as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
|
|
-fi
|
|
-
|
|
-
|
|
+have_libnet=yes
|
|
|
|
for ac_header in sys/sockio.h sys/ioctl.h net/if.h
|
|
do :
|
|
|