From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/libnet/Config.in | 12 + package/libnet/Makefile | 36 + package/libnet/ipkg/libnet.control | 5 + package/libnet/patches/500-debian-subset.patch | 28584 +++++++++++++++++++++++ 4 files changed, 28637 insertions(+) create mode 100644 package/libnet/Config.in create mode 100644 package/libnet/Makefile create mode 100644 package/libnet/ipkg/libnet.control create mode 100644 package/libnet/patches/500-debian-subset.patch (limited to 'package/libnet') diff --git a/package/libnet/Config.in b/package/libnet/Config.in new file mode 100644 index 000000000..6a82db9c3 --- /dev/null +++ b/package/libnet/Config.in @@ -0,0 +1,12 @@ +config ADK_PACKAGE_LIBNET + prompt "libnet............................ Low-level packet creation library" + tristate + default n + select ADK_PACKAGE_LIBPCAP + help + A low-level packet creation library. + + http://www.packetfactory.net/libnet/ + + Depends: libpcap + diff --git a/package/libnet/Makefile b/package/libnet/Makefile new file mode 100644 index 000000000..bc3a13b97 --- /dev/null +++ b/package/libnet/Makefile @@ -0,0 +1,36 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= libnet +PKG_VERSION:= 1.0.2a +PKG_RELEASE:= 7 +PKG_MD5SUM:= ddf53f0f484184390e8c2a1bd0853667 +MASTER_SITES:= http://www.packetfactory.net/libnet/dist/deprecated/ +WRKDIST= ${WRKDIR}/Libnet-${PKG_VERSION} + +include ${TOPDIR}/mk/package.mk + +ENDIAN:=lil +ifeq (${ARCH},mips) +ENDIAN:=big +endif + +$(eval $(call PKG_template,LIBNET,libnet,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ENV+= ac_libnet_have_pf_packet=yes \ + ac_cv_lbl_unaligned_fail=no \ + ac_cv_libnet_endianess=${ENDIAN} +CONFIGURE_ARGS+= --with-pf_packet=yes +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_LIBNET}/usr/lib + ${CP} ${WRKINST}/usr/lib/libnet.so.* ${IDIR_LIBNET}/usr/lib/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libnet/ipkg/libnet.control b/package/libnet/ipkg/libnet.control new file mode 100644 index 000000000..65a2b5e84 --- /dev/null +++ b/package/libnet/ipkg/libnet.control @@ -0,0 +1,5 @@ +Package: libnet +Priority: optional +Section: libs +Description: a low-level packet creation library +Depends: libpcap diff --git a/package/libnet/patches/500-debian-subset.patch b/package/libnet/patches/500-debian-subset.patch new file mode 100644 index 000000000..87674b83f --- /dev/null +++ b/package/libnet/patches/500-debian-subset.patch @@ -0,0 +1,28584 @@ +diff -ruN libnet-1.0.2a-orig/Makefile.am libnet-1.0.2a-7/Makefile.am +--- libnet-1.0.2a-orig/Makefile.am 1970-01-01 01:00:00.000000000 +0100 ++++ libnet-1.0.2a-7/Makefile.am 2005-03-08 03:53:26.000000000 +0100 +@@ -0,0 +1,10 @@ ++include $(top_srcdir)/Makefile.am.common ++ ++SUBDIRS = src include ++ ++EXTRA_DIST = Makefile.am.common ++ ++bin_SCRIPTS = libnet-config ++ ++version.h: VERSION ++ sed -e 's/.*/#define VERSION "&"/' < $< > $@ +diff -ruN libnet-1.0.2a-orig/Makefile.am.common libnet-1.0.2a-7/Makefile.am.common +--- libnet-1.0.2a-orig/Makefile.am.common 1970-01-01 01:00:00.000000000 +0100 ++++ libnet-1.0.2a-7/Makefile.am.common 2005-03-08 03:53:26.000000000 +0100 +@@ -0,0 +1,3 @@ ++AUTOMAKE_OPTIONS = foreign no-dependencies ++ ++DISTCLEANFILES = *~ +diff -ruN libnet-1.0.2a-orig/Makefile.in libnet-1.0.2a-7/Makefile.in +--- libnet-1.0.2a-orig/Makefile.in 2001-02-05 18:51:41.000000000 +0100 ++++ libnet-1.0.2a-7/Makefile.in 2005-03-08 03:53:26.000000000 +0100 +@@ -1,147 +1,620 @@ +-# +-# $Id: Makefile.in,v 1.1.1.1 2000/05/25 00:28:49 route Exp $ +-# +-# Libnet 1.0 makefile +-# (c) 1998 - 2001 Mike D. Schiffman +-# +-# @configure_input@ +- +-# Enabled: Dumps debugging info and verbose error information. +-# Disabled: Doesn't. +-# default: disabled. +-DEFINES += #-D__DEBUG +-prefix = @prefix@ +-exec_prefix = @exec_prefix@ +-srcdir = @srcdir@ +-BIN_PREFIX = @bindir@/ +-INC_PREFIX = @includedir@/ +-LIB_PREFIX = @libdir@/ +-MAN_PREFIX = @MAN_PREFIX@ +- +-LIBNET = libnet +-LIBPWRITE = libpwrite +-LIB = lib/$(LIBNET).a +-MAN = doc/$(LIBNET).3 +-INCLUDE = include/$(LIBNET).h +-INCLUDE-H = include/$(LIBNET)/$(LIBNET)-headers.h +-INCLUDE-F = include/$(LIBNET)/$(LIBNET)-functions.h +-INCLUDE-S = include/$(LIBNET)/$(LIBNET)-structures.h +-INCLUDE-M = include/$(LIBNET)/$(LIBNET)-macros.h +-INCLUDE-A = include/$(LIBNET)/$(LIBNET)-asn1.h +-INCLUDE-O = include/$(LIBNET)/$(LIBNET)-ospf.h +-CONFIG = $(LIBNET)-config +-DEFINES += @DEFS@ +-RANLIB = @RANLIB@ +-AR = @AR@ +-LN = @LN@ +-CC = @CC@ +-ENSUREDIR = $(srcdir)/ensure-dir.sh +-INSTALL_DATA= $(srcdir)/install-sh +-CFLAGS = @CFLAGS@ +-CPPFLAGS = @CPPFLAGS@ +-OBJECTS = src/libnet_resolve.o\ +- src/libnet_socket.o\ +- src/libnet_checksum.o\ +- src/libnet_prand.o\ +- src/libnet_version.o\ +- src/libnet_write_ip.o\ +- src/libnet_insert_ipo.o\ +- src/libnet_insert_tcpo.o\ +- src/libnet_error.o\ +- src/libnet_link_@LL_INT_TYPE@.o\ +- src/libnet_packet_mem.o\ +- src/libnet_build_ip.o\ +- src/libnet_build_tcp.o\ +- src/libnet_build_udp.o\ +- src/libnet_build_arp.o\ +- src/libnet_build_ethernet.o\ +- src/libnet_build_icmp.o\ +- src/libnet_build_igmp.o\ +- src/libnet_build_dns.o\ +- src/libnet_build_snmp.o\ +- src/libnet_build_rip.o\ +- src/libnet_build_ospf.o\ +- src/libnet_build_vrrp.o\ +- src/libnet_asn1.o\ +- src/libnet_hex_dump.o\ +- src/libnet_if_addr.o\ +- src/libnet_port_list.o +- +-.c.o: +- $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) -c $< -o $@ +- +-all: libnet +-supp: test example +- +-libnet: version.h $(OBJECTS) +- $(AR) -cr $(LIB) $(OBJECTS) +- $(RANLIB) $(LIB) +- +-version.o: version.h +-version.h: ./VERSION +- @rm -f $@ +- sed -e 's/.*/#define VERSION "&"/' ./VERSION > $@ +- +-test: libnet +- cd test; make +- +-util: libnet install +- cd util; make +- +-example: libnet install +- cd example; make +- +-install: libnet +- $(ENSUREDIR) $(DESTDIR)$(prefix) 755 +- $(ENSUREDIR) $(DESTDIR)$(LIB_PREFIX) 755 +- $(ENSUREDIR) $(DESTDIR)$(INC_PREFIX)$(LIBNET) 755 +- $(ENSUREDIR) $(DESTDIR)$(INC_PREFIX) 755 +- $(ENSUREDIR) $(DESTDIR)$(MAN_PREFIX) 755 +- $(ENSUREDIR) $(DESTDIR)$(BIN_PREFIX) 755 +- $(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIB_PREFIX) +- rm -f $(DESTDIR)$(LIB_PREFIX)$(LIBPWRITE).a +- cd $(DESTDIR)$(LIB_PREFIX); $(LN) -f -s $(LIBNET).a $(LIBPWRITE).a +- $(INSTALL_DATA) $(INCLUDE) $(DESTDIR)$(INC_PREFIX) +- $(INSTALL_DATA) $(INCLUDE-H) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(INCLUDE-F) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(INCLUDE-S) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(INCLUDE-M) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(INCLUDE-A) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(INCLUDE-O) $(DESTDIR)$(INC_PREFIX)$(LIBNET) +- $(INSTALL_DATA) $(MAN) $(DESTDIR)$(MAN_PREFIX) +- $(INSTALL_DATA) $(CONFIG) $(DESTDIR)$(BIN_PREFIX) +- +- +- +-clean: +- if test -f test/Makefile; then \ +- cd test && make clean; \ +- fi +- if test -f example/Makefile; then \ +- cd example && make clean; \ +- fi +- if test -f util/Makefile; then \ +- cd util && make clean; \ +- fi +- if test -f support/bpf-lkm/etherspoof; then \ +- cd support/bpf-lkm/etherspoof && make clean; \ +- fi +- rm -f *.core src/*.o $(LIB) ++# Makefile.in generated by automake 1.8.5 from Makefile.am. ++# @configure_input@ + +-distclean: clean +- if test -f test/Makefile; then \ +- cd test && make distclean; \ +- fi +- if test -f example/Makefile; then \ +- cd example && make distclean; \ ++# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ++# 2003, 2004 Free Software Foundation, Inc. ++# This Makefile.in is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. ++ ++@SET_MAKE@ ++ ++srcdir = @srcdir@ ++top_srcdir = @top_srcdir@ ++VPATH = @srcdir@ ++pkgdatadir = $(datadir)/@PACKAGE@ ++pkglibdir = $(libdir)/@PACKAGE@ ++pkgincludedir = $(includedir)/@PACKAGE@ ++top_builddir = . ++am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd ++INSTALL = @INSTALL@ ++install_sh_DATA = $(install_sh) -c -m 644 ++install_sh_PROGRAM = $(install_sh) -c ++install_sh_SCRIPT = $(install_sh) -c ++INSTALL_HEADER = $(INSTALL_DATA) ++transform = $(program_transform_name) ++NORMAL_INSTALL = : ++PRE_INSTALL = : ++POST_INSTALL = : ++NORMAL_UNINSTALL = : ++PRE_UNINSTALL = : ++POST_UNINSTALL = : ++build_triplet = @build@ ++host_triplet = @host@ ++target_triplet = @target@ ++DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/libnet-config.in \ ++ $(top_srcdir)/Makefile.am.common $(top_srcdir)/configure \ ++ acconfig.h config.guess config.sub install-sh ltmain.sh \ ++ missing mkinstalldirs ++subdir = . ++ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ++am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ ++ $(top_srcdir)/configure.in ++am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ ++ $(ACLOCAL_M4) ++am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ ++ configure.lineno configure.status.lineno ++mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs ++CONFIG_HEADER = $(top_builddir)/include/config.h ++CONFIG_CLEAN_FILES = libnet-config ++am__installdirs = "$(DESTDIR)$(bindir)" ++binSCRIPT_INSTALL = $(INSTALL_SCRIPT) ++SCRIPTS = $(bin_SCRIPTS) ++depcomp = ++am__depfiles_maybe = ++SOURCES = ++DIST_SOURCES = ++RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ ++ html-recursive info-recursive install-data-recursive \ ++ install-exec-recursive install-info-recursive \ ++ install-recursive installcheck-recursive installdirs-recursive \ ++ pdf-recursive ps-recursive uninstall-info-recursive \ ++ uninstall-recursive ++ETAGS = etags ++CTAGS = ctags ++DIST_SUBDIRS = $(SUBDIRS) ++DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ++distdir = $(PACKAGE)-$(VERSION) ++top_distdir = $(distdir) ++am__remove_distdir = \ ++ { test ! -d $(distdir) \ ++ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ ++ && rm -fr $(distdir); }; } ++DIST_ARCHIVES = $(distdir).tar.gz ++GZIP_ENV = --best ++distuninstallcheck_listfiles = find . -type f -print ++distcleancheck_listfiles = find . -type f -print ++ACLOCAL = @ACLOCAL@ ++ADDITIONAL_LIBS = @ADDITIONAL_LIBS@ ++AMDEP_FALSE = @AMDEP_FALSE@ ++AMDEP_TRUE = @AMDEP_TRUE@ ++AMTAR = @AMTAR@ ++AR = @AR@ ++AUTOCONF = @AUTOCONF@ ++AUTOHEADER = @AUTOHEADER@ ++AUTOMAKE = @AUTOMAKE@ ++AWK = @AWK@ ++BIN_PREFIX = @BIN_PREFIX@ ++CC = @CC@ ++CCDEPMODE = @CCDEPMODE@ ++CFLAGS = @CFLAGS@ ++CPP = @CPP@ ++CPPFLAGS = @CPPFLAGS@ ++CYGPATH_W = @CYGPATH_W@ ++DEFS = @DEFS@ ++DEPDIR = @DEPDIR@ ++ECHO = @ECHO@ ++ECHO_C = @ECHO_C@ ++ECHO_N = @ECHO_N@ ++ECHO_T = @ECHO_T@ ++EGREP = @EGREP@ ++EXEEXT = @EXEEXT@ ++INC_PREFIX = @INC_PREFIX@ ++INSTALL_DATA = @INSTALL_DATA@ ++INSTALL_PROGRAM = @INSTALL_PROGRAM@ ++INSTALL_SCRIPT = @INSTALL_SCRIPT@ ++INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ ++LDFLAGS = @LDFLAGS@ ++LIBNET_CONFIG_CFLAGS = @LIBNET_CONFIG_CFLAGS@ ++LIBNET_CONFIG_DEFINES = @LIBNET_CONFIG_DEFINES@ ++LIBNET_CONFIG_LIBS = @LIBNET_CONFIG_LIBS@ ++LIBOBJS = @LIBOBJS@ ++LIBS = @LIBS@ ++LIBTOOL = @LIBTOOL@ ++LIB_PREFIX = @LIB_PREFIX@ ++LL_INT_TYPE = @LL_INT_TYPE@ ++LL_INT_TYPE_UC = @LL_INT_TYPE_UC@ ++LN = @LN@ ++LN_S = @LN_S@ ++LTLIBOBJS = @LTLIBOBJS@ ++MAKEINFO = @MAKEINFO@ ++MAN_PREFIX = @MAN_PREFIX@ ++OBJEXT = @OBJEXT@ ++PACKAGE = @PACKAGE@ ++PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ ++PACKAGE_NAME = @PACKAGE_NAME@ ++PACKAGE_STRING = @PACKAGE_STRING@ ++PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_VERSION = @PACKAGE_VERSION@ ++PATH_SEPARATOR = @PATH_SEPARATOR@ ++RANLIB = @RANLIB@ ++SET_MAKE = @SET_MAKE@ ++SHELL = @SHELL@ ++STRIP = @STRIP@ ++VERSION = @VERSION@ ++ac_ct_CC = @ac_ct_CC@ ++ac_ct_RANLIB = @ac_ct_RANLIB@ ++ac_ct_STRIP = @ac_ct_STRIP@ ++am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ ++am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ ++am__include = @am__include@ ++am__leading_dot = @am__leading_dot@ ++am__quote = @am__quote@ ++bindir = @bindir@ ++build = @build@ ++build_alias = @build_alias@ ++build_cpu = @build_cpu@ ++build_os = @build_os@ ++build_vendor = @build_vendor@ ++datadir = @datadir@ ++exec_prefix = @exec_prefix@ ++host = @host@ ++host_alias = @host_alias@ ++host_cpu = @host_cpu@ ++host_os = @host_os@ ++host_vendor = @host_vendor@ ++includedir = @includedir@ ++infodir = @infodir@ ++install_sh = @install_sh@ ++libdir = @libdir@ ++libexecdir = @libexecdir@ ++localstatedir = @localstatedir@ ++mandir = @mandir@ ++mkdir_p = @mkdir_p@ ++oldincludedir = @oldincludedir@ ++prefix = @prefix@ ++program_transform_name = @program_transform_name@ ++sbindir = @sbindir@ ++sharedstatedir = @sharedstatedir@ ++sysconfdir = @sysconfdir@ ++target = @target@ ++target_alias = @target_alias@ ++target_cpu = @target_cpu@ ++target_os = @target_os@ ++target_vendor = @target_vendor@ ++AUTOMAKE_OPTIONS = foreign no-dependencies ++DISTCLEANFILES = *~ ++SUBDIRS = src include ++EXTRA_DIST = Makefile.am.common ++bin_SCRIPTS = libnet-config ++all: all-recursive ++ ++.SUFFIXES: ++am--refresh: ++ @: ++$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.am.common $(am__configure_deps) ++ @for dep in $?; do \ ++ case '$(am__configure_deps)' in \ ++ *$$dep*) \ ++ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ ++ cd $(srcdir) && $(AUTOMAKE) --foreign \ ++ && exit 0; \ ++ exit 1;; \ ++ esac; \ ++ done; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ ++ cd $(top_srcdir) && \ ++ $(AUTOMAKE) --foreign Makefile ++.PRECIOUS: Makefile ++Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status ++ @case '$?' in \ ++ *config.status*) \ ++ echo ' $(SHELL) ./config.status'; \ ++ $(SHELL) ./config.status;; \ ++ *) \ ++ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ ++ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ ++ esac; ++ ++$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) ++ $(SHELL) ./config.status --recheck ++ ++$(top_srcdir)/configure: $(am__configure_deps) ++ cd $(srcdir) && $(AUTOCONF) ++$(ACLOCAL_M4): $(am__aclocal_m4_deps) ++ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) ++libnet-config: $(top_builddir)/config.status $(srcdir)/libnet-config.in ++ cd $(top_builddir) && $(SHELL) ./config.status $@ ++install-binSCRIPTS: $(bin_SCRIPTS) ++ @$(NORMAL_INSTALL) ++ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" ++ @list='$(bin_SCRIPTS)'; for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ if test -f $$d$$p; then \ ++ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ ++ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ ++ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ ++ else :; fi; \ ++ done ++ ++uninstall-binSCRIPTS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(bin_SCRIPTS)'; for p in $$list; do \ ++ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ ++ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(bindir)/$$f"; \ ++ done ++ ++mostlyclean-libtool: ++ -rm -f *.lo ++ ++clean-libtool: ++ -rm -rf .libs _libs ++ ++distclean-libtool: ++ -rm -f libtool ++uninstall-info-am: ++ ++# This directory's subdirectories are mostly independent; you can cd ++# into them and run `make' without going through this Makefile. ++# To change the values of `make' variables: instead of editing Makefiles, ++# (1) if the variable is set in `config.status', edit `config.status' ++# (which will cause the Makefiles to be regenerated when you run `make'); ++# (2) otherwise, pass the desired values on the `make' command line. ++$(RECURSIVE_TARGETS): ++ @set fnord $$MAKEFLAGS; amf=$$2; \ ++ dot_seen=no; \ ++ target=`echo $@ | sed s/-recursive//`; \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ echo "Making $$target in $$subdir"; \ ++ if test "$$subdir" = "."; then \ ++ dot_seen=yes; \ ++ local_target="$$target-am"; \ ++ else \ ++ local_target="$$target"; \ ++ fi; \ ++ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ++ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ done; \ ++ if test "$$dot_seen" = "no"; then \ ++ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ ++ fi; test -z "$$fail" ++ ++mostlyclean-recursive clean-recursive distclean-recursive \ ++maintainer-clean-recursive: ++ @set fnord $$MAKEFLAGS; amf=$$2; \ ++ dot_seen=no; \ ++ case "$@" in \ ++ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ ++ *) list='$(SUBDIRS)' ;; \ ++ esac; \ ++ rev=''; for subdir in $$list; do \ ++ if test "$$subdir" = "."; then :; else \ ++ rev="$$subdir $$rev"; \ ++ fi; \ ++ done; \ ++ rev="$$rev ."; \ ++ target=`echo $@ | sed s/-recursive//`; \ ++ for subdir in $$rev; do \ ++ echo "Making $$target in $$subdir"; \ ++ if test "$$subdir" = "."; then \ ++ local_target="$$target-am"; \ ++ else \ ++ local_target="$$target"; \ ++ fi; \ ++ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ ++ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ done && test -z "$$fail" ++tags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ ++ done ++ctags-recursive: ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ ++ done ++ ++ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ mkid -fID $$unique ++tags: TAGS ++ ++TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ ++ include_option=--etags-include; \ ++ empty_fix=.; \ ++ else \ ++ include_option=--include; \ ++ empty_fix=; \ ++ fi; \ ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ if test "$$subdir" = .; then :; else \ ++ test ! -f $$subdir/TAGS || \ ++ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ ++ fi; \ ++ done; \ ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ ++ test -n "$$unique" || unique=$$empty_fix; \ ++ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique; \ + fi +- if test -f util/Makefile; then \ +- cd util && make distclean; \ ++ctags: CTAGS ++CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ ++ $(TAGS_FILES) $(LISP) ++ tags=; \ ++ here=`pwd`; \ ++ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ ++ unique=`for i in $$list; do \ ++ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ ++ done | \ ++ $(AWK) ' { files[$$0] = 1; } \ ++ END { for (i in files) print i; }'`; \ ++ test -z "$(CTAGS_ARGS)$$tags$$unique" \ ++ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ ++ $$tags $$unique ++ ++GTAGS: ++ here=`$(am__cd) $(top_builddir) && pwd` \ ++ && cd $(top_srcdir) \ ++ && gtags -i $(GTAGS_ARGS) $$here ++ ++distclean-tags: ++ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags ++ ++distdir: $(DISTFILES) ++ $(am__remove_distdir) ++ mkdir $(distdir) ++ $(mkdir_p) $(distdir)/. ++ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ ++ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ ++ list='$(DISTFILES)'; for file in $$list; do \ ++ case $$file in \ ++ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ ++ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ ++ esac; \ ++ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ++ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ ++ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ ++ dir="/$$dir"; \ ++ $(mkdir_p) "$(distdir)$$dir"; \ ++ else \ ++ dir=''; \ ++ fi; \ ++ if test -d $$d/$$file; then \ ++ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ ++ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ ++ fi; \ ++ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ ++ else \ ++ test -f $(distdir)/$$file \ ++ || cp -p $$d/$$file $(distdir)/$$file \ ++ || exit 1; \ ++ fi; \ ++ done ++ list='$(SUBDIRS)'; for subdir in $$list; do \ ++ if test "$$subdir" = .; then :; else \ ++ test -d "$(distdir)/$$subdir" \ ++ || mkdir "$(distdir)/$$subdir" \ ++ || exit 1; \ ++ (cd $$subdir && \ ++ $(MAKE) $(AM_MAKEFLAGS) \ ++ top_distdir="../$(top_distdir)" \ ++ distdir="../$(distdir)/$$subdir" \ ++ distdir) \ ++ || exit 1; \ ++ fi; \ ++ done ++ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ++ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ ++ || chmod -R a+r $(distdir) ++dist-gzip: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++dist-bzip2: distdir ++ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 ++ $(am__remove_distdir) ++ ++dist-tarZ: distdir ++ $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z ++ $(am__remove_distdir) ++ ++dist-shar: distdir ++ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz ++ $(am__remove_distdir) ++ ++dist-zip: distdir ++ -rm -f $(distdir).zip ++ zip -rq $(distdir).zip $(distdir) ++ $(am__remove_distdir) ++ ++dist dist-all: distdir ++ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz ++ $(am__remove_distdir) ++ ++# This target untars the dist file and tries a VPATH configuration. Then ++# it guarantees that the distribution is self-contained by making another ++# tarfile. ++distcheck: dist ++ case '$(DIST_ARCHIVES)' in \ ++ *.tar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ ++ *.tar.bz2*) \ ++ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ ++ *.tar.Z*) \ ++ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ ++ *.shar.gz*) \ ++ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ ++ *.zip*) \ ++ unzip $(distdir).zip ;;\ ++ esac ++ chmod -R a-w $(distdir); chmod a+w $(distdir) ++ mkdir $(distdir)/_build ++ mkdir $(distdir)/_inst ++ chmod a-w $(distdir) ++ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ ++ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ ++ && cd $(distdir)/_build \ ++ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ ++ $(DISTCHECK_CONFIGURE_FLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) \ ++ && $(MAKE) $(AM_MAKEFLAGS) dvi \ ++ && $(MAKE) $(AM_MAKEFLAGS) check \ ++ && $(MAKE) $(AM_MAKEFLAGS) install \ ++ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ ++ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ ++ distuninstallcheck \ ++ && chmod -R a-w "$$dc_install_base" \ ++ && ({ \ ++ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ ++ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ ++ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ ++ } || { rm -rf "$$dc_destdir"; exit 1; }) \ ++ && rm -rf "$$dc_destdir" \ ++ && $(MAKE) $(AM_MAKEFLAGS) dist \ ++ && rm -rf $(DIST_ARCHIVES) \ ++ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck ++ $(am__remove_distdir) ++ @(echo "$(distdir) archives ready for distribution: "; \ ++ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ ++ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' ++distuninstallcheck: ++ @cd $(distuninstallcheck_dir) \ ++ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ ++ || { echo "ERROR: files left after uninstall:" ; \ ++ if test -n "$(DESTDIR)"; then \ ++ echo " (check DESTDIR support)"; \ ++ fi ; \ ++ $(distuninstallcheck_listfiles) ; \ ++ exit 1; } >&2 ++distcleancheck: distclean ++ @if test '$(srcdir)' = . ; then \ ++ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ ++ exit 1 ; \ + fi +- if test -f support/bpf-lkm/etherspoof; then \ +- cd support/bpf-lkm/etherspoof && rm -rf Makefile; \ +- fi +- rm -f config.log config.cache config.status Makefile include/config.h \ +- version.h support/bpf-lkm/etherspoof conftest* libnet-config ++ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ ++ || { echo "ERROR: files left in build directory after distclean:" ; \ ++ $(distcleancheck_listfiles) ; \ ++ exit 1; } >&2 ++check-am: all-am ++check: check-recursive ++all-am: Makefile $(SCRIPTS) ++installdirs: installdirs-recursive ++installdirs-am: ++ for dir in "$(DESTDIR)$(bindir)"; do \ ++ test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ done ++install: install-recursive ++install-exec: install-exec-recursive ++install-data: install-data-recursive ++uninstall: uninstall-recursive ++ ++install-am: all-am ++ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am ++ ++installcheck: installcheck-recursive ++install-strip: ++ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ ++ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ ++ `test -z '$(STRIP)' || \ ++ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install ++mostlyclean-generic: ++ ++clean-generic: ++ ++distclean-generic: ++ -rm -f $(CONFIG_CLEAN_FILES) ++ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) ++ ++maintainer-clean-generic: ++ @echo "This command is intended for maintainers to use" ++ @echo "it deletes files that may require special tools to rebuild." ++clean: clean-recursive ++ ++clean-am: clean-generic clean-libtool mostlyclean-am ++ ++distclean: distclean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -f Makefile ++distclean-am: clean-am distclean-generic distclean-libtool \ ++ distclean-tags ++ ++dvi: dvi-recursive ++ ++dvi-am: ++ ++html: html-recursive ++ ++info: info-recursive ++ ++info-am: ++ ++install-data-am: ++ ++install-exec-am: install-binSCRIPTS ++ ++install-info: install-info-recursive ++ ++install-man: ++ ++installcheck-am: ++ ++maintainer-clean: maintainer-clean-recursive ++ -rm -f $(am__CONFIG_DISTCLEAN_FILES) ++ -rm -rf $(top_srcdir)/autom4te.cache ++ -rm -f Makefile ++maintainer-clean-am: distclean-am maintainer-clean-generic ++ ++mostlyclean: mostlyclean-recursive ++ ++mostlyclean-am: mostlyclean-generic mostlyclean-libtool ++ ++pdf: pdf-recursive ++ ++pdf-am: ++ ++ps: ps-recursive ++ ++ps-am: ++ ++uninstall-am: uninstall-binSCRIPTS uninstall-info-am ++ ++uninstall-info: uninstall-info-recursive ++ ++.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ ++ check-am clean clean-generic clean-libtool clean-recursive \ ++ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ ++ dist-shar dist-tarZ dist-zip distcheck distclean \ ++ distclean-generic distclean-libtool distclean-recursive \ ++ distclean-tags distcleancheck distdir distuninstallcheck dvi \ ++ dvi-am html html-am info info-am install install-am \ ++ install-binSCRIPTS install-data install-data-am install-exec \ ++ install-exec-am install-info install-info-am install-man \ ++ install-strip installcheck installcheck-am installdirs \ ++ installdirs-am maintainer-clean maintainer-clean-generic \ ++ maintainer-clean-recursive mostlyclean mostlyclean-generic \ ++ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ ++ tags tags-recursive uninstall uninstall-am \ ++ uninstall-binSCRIPTS uninstall-info-am ++ + +-# EOF ++version.h: VERSION ++ sed -e 's/.*/#define VERSION "&"/' < $< > $@ ++# Tell versions [3.59,3.63) of GNU make to not export all variables. ++# Otherwise a system limit (for SysV at least) may be exceeded. ++.NOEXPORT: +diff -ruN libnet-1.0.2a-orig/acconfig.h libnet-1.0.2a-7/acconfig.h +--- libnet-1.0.2a-orig/acconfig.h 2000-12-12 19:31:39.000000000 +0100 ++++ libnet-1.0.2a-7/acconfig.h 2005-03-08 03:53:26.000000000 +0100 +@@ -1,15 +1,17 @@ +-dnl $Id: acconfig.h,v 1.1.1.1 2000/05/25 00:28:49 route Exp $ +-dnl +-dnl Libnet autoconfiguration acconfig.h file +-dnl Copyright (c) 1998 - 2001 Mike D. Schiffman +-dnl All rights reserved. +-dnl +-dnl Process this file with autoheader to produce a config.h file. +-dnl ++/* $Id: acconfig.h,v 1.1.1.1 2000/05/25 00:28:49 route Exp $ ++ * ++ * Libnet autoconfiguration acconfig.h file ++ * Copyright (c) 1998 - 2001 Mike D. Schiffman ++ * All rights reserved. ++ * ++ * Process this file with autoheader to produce a config.h file. ++ */ + + #undef LIBNET_BSDISH_OS + #undef LIBNET_BSD_BYTE_SWAP + #undef DLPI_DEV_PREFIX ++#undef LIBNET_FAST_X86_CHECK ++#undef HAVE_SOLARIS + #undef HAVE_DEV_DLPI + #undef HAVE_SOCKADDR_SA_LEN + #undef HAVE_DLPI +@@ -23,5 +25,3 @@ + #undef __FAVOR_BSD + #undef LIBNET_BIG_ENDIAN + #undef LIBNET_LIL_ENDIAN +- +-dnl EOF +diff -ruN libnet-1.0.2a-orig/acinclude.m4 libnet-1.0.2a-7/acinclude.m4 +--- libnet-1.0.2a-orig/acinclude.m4 2000-12-12 19:31:54.000000000 +0100 ++++ libnet-1.0.2a-7/acinclude.m4 2005-03-08 03:53:26.000000000 +0100 +@@ -30,65 +30,43 @@ + *) + + cat > pf_packet-test.c << EOF +-#include +-#if (__GLIBC__) +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include /* for the glibc version number */ ++#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1 ++#include ++#include /* the L2 protocols */ + #else +-#include +-#include ++#include ++#include ++#include /* The L2 protocols */ + #endif +-#if (PF_PACKET) ++ + #ifndef SOL_PACKET + #define SOL_PACKET 263 + #endif /* SOL_PACKET */ +-#include +-#endif +-#include "./include/libnet.h" + + int + main() + { +-#if (PF_PACKET) + int fd; +- struct sockaddr_ll sa; +- struct ifreq ifr; +- struct packet_mreq mr; +- char *device ="lo"; + + fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); + if (fd == -1) + { +- printf("choked"); +- exit (EXIT_FAILURE); +- } +- +- memset(&sa, 0, sizeof(sa)); +- strcpy(ifr.ifr_name, device); +- if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) +- { +- printf("choked"); +- exit (EXIT_FAILURE); +- } +- sa.sll_family = AF_PACKET; +- sa.sll_ifindex = ifr.ifr_ifindex; +- sa.sll_protocol = htons(ETH_P_ALL); +- +- memset(&mr, 0, sizeof (mr)); +- mr.mr_ifindex = sa.sll_ifindex; +- mr.mr_type = PACKET_MR_ALLMULTI; +- +- if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char *)&mr, +- sizeof (mr)) < 0) +- { +- printf("choked\n"); ++ if (errno == EPERM) ++ { ++ /* user's UID != 0 */ ++ printf("probably"); ++ exit (EXIT_FAILURE); ++ } ++ printf("no"); + exit (EXIT_FAILURE); + } +- /* yay. we made it and it workz! */ + printf("yes"); +-#else /* PF_PACKET */ +- printf("no"); +-#endif + exit (EXIT_SUCCESS); + } + EOF +@@ -104,16 +82,21 @@ + if test $ac_libnet_have_pf_packet = choked; then + AC_MSG_RESULT(test program choked... assuming no) + elif test $ac_libnet_have_pf_packet = yes; then +- AC_DEFINE(HAVE_PF_PACKET) ++ AC_MSG_RESULT(yes) + LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_PF_PACKET" ++ elif test $ac_libnet_have_pf_packet = probably; then ++ AC_MSG_RESULT(test program got EPERM... assuming yes) ++ elif test $ac_libnet_have_pf_packet = no; then ++ AC_MSG_RESULT(no) + fi + +- if test $ac_libnet_have_pf_packet != choked; then +- AC_MSG_RESULT($ac_libnet_have_pf_packet) +- fi + rm -f pf_packet-test* core core.pf_packet-test + ;; + esac]) ++ ++ if test $ac_libnet_have_pf_packet = yes -o $ac_libnet_have_pf_packet = probably; then ++ AC_DEFINE(HAVE_PF_PACKET) ++ fi + ]) + + dnl +@@ -279,6 +262,8 @@ + + AC_DEFUN(AC_LIBNET_ENDIAN_CHECK, + [AC_MSG_CHECKING(machine endianess) ++ AC_CACHE_VAL(ac_cv_libnet_endianess, ++ [ + + cat > conftest.c << EOF + # include +@@ -332,6 +317,7 @@ + fi + rm -f conftest* core core.conftest + ++ ]) + AC_MSG_RESULT($ac_cv_libnet_endianess) + + if test $ac_cv_libnet_endianess = big ; then +diff -ruN libnet-1.0.2a-orig/aclocal.m4 libnet-1.0.2a-7/aclocal.m4 +--- libnet-1.0.2a-orig/aclocal.m4 2001-01-07 21:49:29.000000000 +0100 ++++ libnet-1.0.2a-7/aclocal.m4 2005-03-08 03:53:26.000000000 +0100 +@@ -1,358 +1,4525 @@ +-dnl aclocal.m4 generated automatically by aclocal 1.4 ++# generated automatically by aclocal 1.8.5 -*- Autoconf -*- + +-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +-dnl This file is free software; the Free Software Foundation +-dnl gives unlimited permission to copy and/or distribute it, +-dnl with or without modifications, as long as this notice is preserved. +- +-dnl This program is distributed in the hope that it will be useful, +-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +-dnl PARTICULAR PURPOSE. ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++# Free Software Foundation, Inc. ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-dnl $Id: aclocal.m4,v 1.1.1.1 2000/05/25 00:28:49 route Exp $ +-dnl +-dnl Libnet specific autoconf macros +-dnl Copyright (c) 1998, 1999, 2000 Mike D. Schiffman +-dnl All rights reserved. +-dnl ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY, to the extent permitted by law; without ++# even the implied warranty of MERCHANTABILITY or FITNESS FOR A ++# PARTICULAR PURPOSE. + +-dnl +-dnl Checks to see if this linux kernel has a working PF_PACKET +-dnl +-dnl usage: +-dnl +-dnl AC_LIBNET_CHECK_PF_PACKET +-dnl +-dnl results: +-dnl +-dnl HAVE_PF_PACKET (DEFINED) ++# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- ++ ++# serial 46 AC_PROG_LIBTOOL ++# Debian $Rev: 102 $ ++ ++AC_DEFUN([AC_PROG_LIBTOOL], ++[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl ++ ++# This can be used to rebuild libtool when needed ++LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" ++ ++# Always use our own libtool. ++LIBTOOL='$(SHELL) $(top_builddir)/libtool' ++AC_SUBST(LIBTOOL)dnl ++ ++# Prevent multiple expansion ++define([AC_PROG_LIBTOOL], []) ++]) ++ ++AC_DEFUN([AC_LIBTOOL_SETUP], ++[AC_PREREQ(2.13)dnl ++AC_REQUIRE([AC_ENABLE_SHARED])dnl ++AC_REQUIRE([AC_ENABLE_STATIC])dnl ++AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl ++AC_REQUIRE([AC_CANONICAL_HOST])dnl ++AC_REQUIRE([AC_CANONICAL_BUILD])dnl ++AC_REQUIRE([AC_PROG_CC])dnl ++AC_REQUIRE([AC_PROG_LD])dnl ++AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl ++AC_REQUIRE([AC_PROG_NM])dnl ++AC_REQUIRE([LT_AC_PROG_SED])dnl ++ ++AC_REQUIRE([AC_PROG_LN_S])dnl ++AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl ++AC_REQUIRE([AC_OBJEXT])dnl ++AC_REQUIRE([AC_EXEEXT])dnl + dnl + +-AC_DEFUN(AC_LIBNET_CHECK_PF_PACKET, +-[ +- AC_MSG_CHECKING(for PF_PACKET) +- AC_CACHE_VAL(ac_libnet_have_pf_packet, +- +- [case "$target_os" in +- +- linux) +- ac_libnet_have_pf_packet = no +- ;; +- *) +- +- cat > pf_packet-test.c << EOF +-#include +-#if (__GLIBC__) +-#include +-#include +-#else +-#include +-#include ++_LT_AC_PROG_ECHO_BACKSLASH ++# Only perform the check for file, if the check method requires it ++case $deplibs_check_method in ++file_magic*) ++ if test "$file_magic_cmd" = '$MAGIC_CMD'; then ++ AC_PATH_MAGIC ++ fi ++ ;; ++esac ++ ++AC_CHECK_TOOL(RANLIB, ranlib, :) ++AC_CHECK_TOOL(STRIP, strip, :) ++ ++ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) ++ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ++enable_win32_dll=yes, enable_win32_dll=no) ++ ++AC_ARG_ENABLE(libtool-lock, ++ [ --disable-libtool-lock avoid locking (might break parallel builds)]) ++test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes ++ ++# Some flags need to be propagated to the compiler or linker for good ++# libtool support. ++case $host in ++*-*-irix6*) ++ # Find out which ABI we are using. ++ echo '[#]line __oline__ "configure"' > conftest.$ac_ext ++ if AC_TRY_EVAL(ac_compile); then ++ case `/usr/bin/file conftest.$ac_objext` in ++ *32-bit*) ++ LD="${LD-ld} -32" ++ ;; ++ *N32*) ++ LD="${LD-ld} -n32" ++ ;; ++ *64-bit*) ++ LD="${LD-ld} -64" ++ ;; ++ esac ++ fi ++ rm -rf conftest* ++ ;; ++ ++*-*-sco3.2v5*) ++ # On SCO OpenServer 5, we need -belf to get full-featured binaries. ++ SAVE_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -belf" ++ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, ++ [AC_LANG_SAVE ++ AC_LANG_C ++ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) ++ AC_LANG_RESTORE]) ++ if test x"$lt_cv_cc_needs_belf" != x"yes"; then ++ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf ++ CFLAGS="$SAVE_CFLAGS" ++ fi ++ ;; ++ ++ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], ++[*-*-cygwin* | *-*-mingw* | *-*-pw32*) ++ AC_CHECK_TOOL(DLLTOOL, dlltool, false) ++ AC_CHECK_TOOL(AS, as, false) ++ AC_CHECK_TOOL(OBJDUMP, objdump, false) ++ ++ # recent cygwin and mingw systems supply a stub DllMain which the user ++ # can override, but on older systems we have to supply one ++ AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, ++ [AC_TRY_LINK([], ++ [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); ++ DllMain (0, 0, 0);], ++ [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) ++ ++ case $host/$CC in ++ *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) ++ # old mingw systems require "-dll" to link a DLL, while more recent ones ++ # require "-mdll" ++ SAVE_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -mdll" ++ AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, ++ [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) ++ CFLAGS="$SAVE_CFLAGS" ;; ++ *-*-cygwin* | *-*-pw32*) ++ # cygwin systems need to pass --dll to the linker, and not link ++ # crt.o which will require a WinMain@16 definition. ++ lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; ++ esac ++ ;; ++ ]) ++esac ++ ++_LT_AC_LTCONFIG_HACK ++ ++]) ++ ++# AC_LIBTOOL_HEADER_ASSERT ++# ------------------------ ++AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], ++[AC_CACHE_CHECK([whether $CC supports assert without backlinking], ++ [lt_cv_func_assert_works], ++ [case $host in ++ *-*-solaris*) ++ if test "$GCC" = yes && test "$with_gnu_ld" != yes; then ++ case `$CC --version 2>/dev/null` in ++ [[12]].*) lt_cv_func_assert_works=no ;; ++ *) lt_cv_func_assert_works=yes ;; ++ esac ++ fi ++ ;; ++ esac]) ++ ++if test "x$lt_cv_func_assert_works" = xyes; then ++ AC_CHECK_HEADERS(assert.h) ++fi ++])# AC_LIBTOOL_HEADER_ASSERT ++ ++# _LT_AC_CHECK_DLFCN ++# -------------------- ++AC_DEFUN([_LT_AC_CHECK_DLFCN], ++[AC_CHECK_HEADERS(dlfcn.h) ++])# _LT_AC_CHECK_DLFCN ++ ++# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ++# --------------------------------- ++AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], ++[AC_REQUIRE([AC_CANONICAL_HOST]) ++AC_REQUIRE([AC_PROG_NM]) ++AC_REQUIRE([AC_OBJEXT]) ++# Check for command to grab the raw symbol name followed by C symbol from nm. ++AC_MSG_CHECKING([command to parse $NM output]) ++AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl ++ ++# These are sane defaults that work on at least a few old systems. ++# [They come from Ultrix. What could be older than Ultrix?!! ;)] ++ ++# Character class describing NM global symbol codes. ++symcode='[[BCDEGRST]]' ++ ++# Regexp to match symbols that can be accessed directly from C. ++sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' ++ ++# Transform the above into a raw symbol and a C symbol. ++symxfrm='\1 \2\3 \3' ++ ++# Transform an extracted symbol line into a proper C declaration ++lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" ++ ++# Transform an extracted symbol line into symbol name and symbol address ++lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ++ ++# Define system-specific variables. ++case $host_os in ++aix*) ++ symcode='[[BCDT]]' ++ ;; ++cygwin* | mingw* | pw32*) ++ symcode='[[ABCDGISTW]]' ++ ;; ++hpux*) # Its linker distinguishes data from code symbols ++ lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" ++ lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ++ ;; ++irix* | nonstopux*) ++ symcode='[[BCDEGRST]]' ++ ;; ++osf*) ++ symcode='[[BCDEGQRST]]' ++ ;; ++solaris* | sysv5*) ++ symcode='[[BDT]]' ++ ;; ++sysv4) ++ symcode='[[DFNSTU]]' ++ ;; ++esac ++ ++# Handle CRLF in mingw tool chain ++opt_cr= ++case $host_os in ++mingw*) ++ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ++ ;; ++esac ++ ++# If we're using GNU nm, then use its standard symbol codes. ++if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then ++ symcode='[[ABCDGISTW]]' ++fi ++ ++# Try without a prefix undercore, then with it. ++for ac_symprfx in "" "_"; do ++ ++ # Write the raw and C identifiers. ++lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" ++ ++ # Check to see that the pipe works correctly. ++ pipe_works=no ++ rm -f conftest* ++ cat > conftest.$ac_ext < ++char nm_test_var; ++void nm_test_func(){} ++#ifdef __cplusplus ++} + #endif +-#include +-#include ++int main(){nm_test_var='a';nm_test_func();return(0);} ++EOF + +-int +-main() +-{ +-#if (PF_PACKET) +- int fd; +- struct sockaddr_ll sa; +- struct ifreq ifr; +- struct packet_mreq mr; +- char *device ="lo"; ++ if AC_TRY_EVAL(ac_compile); then ++ # Now try to grab the symbols. ++ nlist=conftest.nm ++ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then ++ # Try sorting and uniquifying the output. ++ if sort "$nlist" | uniq > "$nlist"T; then ++ mv -f "$nlist"T "$nlist" ++ else ++ rm -f "$nlist"T ++ fi + +- fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); +- if (fd == -1) +- { +- printf("choked"); +- exit (EXIT_FAILURE); +- } ++ # Make sure that we snagged all the symbols we need. ++ if egrep ' nm_test_var$' "$nlist" >/dev/null; then ++ if egrep ' nm_test_func$' "$nlist" >/dev/null; then ++ cat < conftest.$ac_ext ++#ifdef __cplusplus ++extern "C" { ++#endif + +- memset(&sa, 0, sizeof(sa)); +- strcpy(ifr.ifr_name, device); +- if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) +- { +- printf("choked"); +- exit (EXIT_FAILURE); +- } +- sa.sll_family = AF_PACKET; +- sa.sll_ifindex = ifr.ifr_ifindex; +- sa.sll_protocol = htons(ETH_P_ALL); +- +- memset(&mr, 0, sizeof (mr)); +- mr.mr_ifindex = sa.sll_ifindex; +- mr.mr_type = PACKET_MR_ALLMULTI; ++EOF ++ # Now generate the symbol file. ++ eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' + +- if (setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char *)&mr, +- sizeof (mr)) < 0) +- { +- printf("choked\n"); +- exit (EXIT_FAILURE); +- } +- /* yay. we made it and it workz! */ +- printf("yes"); +-#else /* PF_PACKET */ +- printf("no"); ++ cat <> conftest.$ac_ext ++#if defined (__STDC__) && __STDC__ ++# define lt_ptr void * ++#else ++# define lt_ptr char * ++# define const + #endif +- exit (EXIT_SUCCESS); ++ ++/* The mapping between symbol names and symbols. */ ++const struct { ++ const char *name; ++ lt_ptr address; + } ++lt_preloaded_symbols[[]] = ++{ + EOF +- ${CC-cc} -o pf_packet-test $CFLAGS pf_packet-test.c >/dev/null 2>&1 ++ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext ++ cat <<\EOF >> conftest.$ac_ext ++ {0, (lt_ptr) 0} ++}; + +- # Oopz 4.3 BSD doesn't have this. Sorry. +- if test ! -x ./pf_packet-test ; then +- ac_libnet_have_pf_packet=choked ++#ifdef __cplusplus ++} ++#endif ++EOF ++ # Now try linking the two files. ++ mv conftest.$ac_objext conftstm.$ac_objext ++ save_LIBS="$LIBS" ++ save_CFLAGS="$CFLAGS" ++ LIBS="conftstm.$ac_objext" ++ CFLAGS="$CFLAGS$no_builtin_flag" ++ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then ++ pipe_works=yes ++ fi ++ LIBS="$save_LIBS" ++ CFLAGS="$save_CFLAGS" ++ else ++ echo "cannot find nm_test_func in $nlist" >&AC_FD_CC ++ fi ++ else ++ echo "cannot find nm_test_var in $nlist" >&AC_FD_CC ++ fi + else +- ac_libnet_have_pf_packet=`./pf_packet-test`; ++ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC ++ fi ++ else ++ echo "$progname: failed program was:" >&AC_FD_CC ++ cat conftest.$ac_ext >&5 ++ fi ++ rm -f conftest* conftst* ++ ++ # Do not use the global_symbol_pipe unless it works. ++ if test "$pipe_works" = yes; then ++ break ++ else ++ lt_cv_sys_global_symbol_pipe= ++ fi ++done ++]) ++global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" ++if test -z "$lt_cv_sys_global_symbol_pipe"; then ++ global_symbol_to_cdecl= ++ global_symbol_to_c_name_address= ++else ++ global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" ++ global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" ++fi ++if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; ++then ++ AC_MSG_RESULT(failed) ++else ++ AC_MSG_RESULT(ok) ++fi ++]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE ++ ++# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR ++# --------------------------------- ++AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], ++[# Find the correct PATH separator. Usually this is `:', but ++# DJGPP uses `;' like DOS. ++if test "X${PATH_SEPARATOR+set}" != Xset; then ++ UNAME=${UNAME-`uname 2>/dev/null`} ++ case X$UNAME in ++ *-DOS) lt_cv_sys_path_separator=';' ;; ++ *) lt_cv_sys_path_separator=':' ;; ++ esac ++ PATH_SEPARATOR=$lt_cv_sys_path_separator ++fi ++])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR ++ ++# _LT_AC_PROG_ECHO_BACKSLASH ++# -------------------------- ++# Add some code to the start of the generated configure script which ++# will find an echo command which doesn't interpret backslashes. ++AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], ++[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], ++ [AC_DIVERT_PUSH(NOTICE)]) ++_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR ++ ++# Check that we are running under the correct shell. ++SHELL=${CONFIG_SHELL-/bin/sh} ++ ++case X$ECHO in ++X*--fallback-echo) ++ # Remove one level of quotation (which was required for Make). ++ ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ++ ;; ++esac ++ ++echo=${ECHO-echo} ++if test "X[$]1" = X--no-reexec; then ++ # Discard the --no-reexec flag, and continue. ++ shift ++elif test "X[$]1" = X--fallback-echo; then ++ # Avoid inline document here, it may be left over ++ : ++elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then ++ # Yippee, $echo works! ++ : ++else ++ # Restart under the correct shell. ++ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} ++fi ++ ++if test "X[$]1" = X--fallback-echo; then ++ # used as fallback echo ++ shift ++ cat </dev/null && ++ echo_test_string="`eval $cmd`" && ++ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null ++ then ++ break ++ fi ++ done ++fi ++ ++if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ++ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ++ test "X$echo_testing_string" = "X$echo_test_string"; then ++ : ++else ++ # The Solaris, AIX, and Digital Unix default echo programs unquote ++ # backslashes. This makes it impossible to quote backslashes using ++ # echo "$something" | sed 's/\\/\\\\/g' ++ # ++ # So, first we look for a working echo in the user's PATH. ++ ++ IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR ++ for dir in $PATH /usr/ucb; do ++ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && ++ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && ++ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && ++ test "X$echo_testing_string" = "X$echo_test_string"; then ++ echo="$dir/echo" ++ break + fi ++ done ++ IFS="$save_ifs" + +- if test $ac_libnet_have_pf_packet = choked; then +- AC_MSG_RESULT(test program choked... assuming no) +- elif test $ac_libnet_have_pf_packet = yes; then +- AC_DEFINE(HAVE_PF_PACKET) +- LIBNET_CONFIG_DEFINES="$LIBNET_CONFIG_DEFINES -DHAVE_PF_PACKET" ++ if test "X$echo" = Xecho; then ++ # We didn't find a better echo, so look for alternatives. ++ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && ++ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && ++ test "X$echo_testing_string" = "X$echo_test_string"; then ++ # This shell has a builtin print -r that does the trick. ++ echo='print -r' ++ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && ++ test "X$CONFIG_SHELL" != X/bin/ksh; then ++ # If we have ksh, try running configure again with it. ++ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} ++ export ORIGINAL_CONFIG_SHELL ++ CONFIG_SHELL=/bin/ksh ++ export CONFIG_SHELL ++ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} ++ else ++ # Try using printf. ++ echo='printf %s\n' ++ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && ++ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && ++ test "X$echo_testing_string" = "X$echo_test_string"; then ++ # Cool, printf works ++ : ++ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ++ test "X$echo_testing_string" = 'X\t' && ++ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ++ test "X$echo_testing_string" = "X$echo_test_string"; then ++ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL ++ export CONFIG_SHELL ++ SHELL="$CONFIG_SHELL" ++ export SHELL ++ echo="$CONFIG_SHELL [$]0 --fallback-echo" ++ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && ++ test "X$echo_testing_string" = 'X\t' && ++ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && ++ test "X$echo_testing_string" = "X$echo_test_string"; then ++ echo="$CONFIG_SHELL [$]0 --fallback-echo" ++ else ++ # maybe with a smaller string... ++ prev=: ++ ++ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do ++ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null ++ then ++ break ++ fi ++ prev="$cmd" ++ done ++ ++ if test "$prev" != 'sed 50q "[$]0"'; then ++ echo_test_string=`eval $prev` ++ export echo_test_string ++ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} ++ else ++ # Oops. We lost completely, so just stick with echo. ++ echo=echo ++ fi ++ fi + fi ++ fi ++fi ++fi ++ ++# Copy echo and quote the copy suitably for passing to libtool from ++# the Makefile, instead of quoting the original, which is used later. ++ECHO=$echo ++if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ++ ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" ++fi ++ ++AC_SUBST(ECHO) ++AC_DIVERT_POP ++])# _LT_AC_PROG_ECHO_BACKSLASH ++ ++# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, ++# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) ++# ------------------------------------------------------------------ ++AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], ++[if test "$cross_compiling" = yes; then : ++ [$4] ++else ++ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ++ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 ++ lt_status=$lt_dlunknown ++ cat > conftest.$ac_ext < ++#endif ++ ++#include ++ ++#ifdef RTLD_GLOBAL ++# define LT_DLGLOBAL RTLD_GLOBAL ++#else ++# ifdef DL_GLOBAL ++# define LT_DLGLOBAL DL_GLOBAL ++# else ++# define LT_DLGLOBAL 0 ++# endif ++#endif ++ ++/* We may have to define LT_DLLAZY_OR_NOW in the command line if we ++ find out it does not work in some platform. */ ++#ifndef LT_DLLAZY_OR_NOW ++# ifdef RTLD_LAZY ++# define LT_DLLAZY_OR_NOW RTLD_LAZY ++# else ++# ifdef DL_LAZY ++# define LT_DLLAZY_OR_NOW DL_LAZY ++# else ++# ifdef RTLD_NOW ++# define LT_DLLAZY_OR_NOW RTLD_NOW ++# else ++# ifdef DL_NOW ++# define LT_DLLAZY_OR_NOW DL_NOW ++# else ++# define LT_DLLAZY_OR_NOW 0 ++# endif ++# endif ++# endif ++# endif ++#endif ++ ++#ifdef __cplusplus ++extern "C" void exit (int); ++#endif ++ ++void fnord() { int i=42;} ++int main () ++{ ++ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); ++ int status = $lt_dlunknown; ++ ++ if (self) ++ { ++ if (dlsym (self,"fnord")) status = $lt_dlno_uscore; ++ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; ++ /* dlclose (self); */ ++ } ++ ++ exit (status); ++}] ++EOF ++ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then ++ (./conftest; exit; ) 2>/dev/null ++ lt_status=$? ++ case x$lt_status in ++ x$lt_dlno_uscore) $1 ;; ++ x$lt_dlneed_uscore) $2 ;; ++ x$lt_unknown|x*) $3 ;; ++ esac ++ else : ++ # compilation failed ++ $3 ++ fi ++fi ++rm -fr conftest* ++])# _LT_AC_TRY_DLOPEN_SELF ++ ++# AC_LIBTOOL_DLOPEN_SELF ++# ------------------- ++AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], ++[if test "x$enable_dlopen" != xyes; then ++ enable_dlopen=unknown ++ enable_dlopen_self=unknown ++ enable_dlopen_self_static=unknown ++else ++ lt_cv_dlopen=no ++ lt_cv_dlopen_libs= ++ ++ case $host_os in ++ beos*) ++ lt_cv_dlopen="load_add_on" ++ lt_cv_dlopen_libs= ++ lt_cv_dlopen_self=yes ++ ;; ++ ++ cygwin* | mingw* | pw32*) ++ lt_cv_dlopen="LoadLibrary" ++ lt_cv_dlopen_libs= ++ ;; ++ ++ *) ++ AC_CHECK_FUNC([shl_load], ++ [lt_cv_dlopen="shl_load"], ++ [AC_CHECK_LIB([dld], [shl_load], ++ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], ++ [AC_CHECK_FUNC([dlopen], ++ [lt_cv_dlopen="dlopen"], ++ [AC_CHECK_LIB([dl], [dlopen], ++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], ++ [AC_CHECK_LIB([svld], [dlopen], ++ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], ++ [AC_CHECK_LIB([dld], [dld_link], ++ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ++ ]) ++ ]) ++ ]) ++ ]) ++ ]) ++ ;; ++ esac ++ ++ if test "x$lt_cv_dlopen" != xno; then ++ enable_dlopen=yes ++ else ++ enable_dlopen=no ++ fi ++ ++ case $lt_cv_dlopen in ++ dlopen) ++ save_CPPFLAGS="$CPPFLAGS" ++ AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl ++ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" ++ ++ save_LDFLAGS="$LDFLAGS" ++ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + +- if test $ac_libnet_have_pf_packet != choked; then +- AC_MSG_RESULT($ac_libnet_have_pf_packet) ++ save_LIBS="$LIBS" ++ LIBS="$lt_cv_dlopen_libs $LIBS" ++ ++ AC_CACHE_CHECK([whether a program can dlopen itself], ++ lt_cv_dlopen_self, [dnl ++ _LT_AC_TRY_DLOPEN_SELF( ++ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, ++ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ++ ]) ++ ++ if test "x$lt_cv_dlopen_self" = xyes; then ++ LDFLAGS="$LDFLAGS $link_static_flag" ++ AC_CACHE_CHECK([whether a statically linked program can dlopen itself], ++ lt_cv_dlopen_self_static, [dnl ++ _LT_AC_TRY_DLOPEN_SELF( ++ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, ++ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ++ ]) + fi +- rm -f pf_packet-test* core core.pf_packet-test ++ ++ CPPFLAGS="$save_CPPFLAGS" ++ LDFLAGS="$save_LDFLAGS" ++ LIBS="$save_LIBS" + ;; +- esac]) ++ esac ++ ++ case $lt_cv_dlopen_self in ++ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; ++ *) enable_dlopen_self=unknown ;; ++ esac ++ ++ case $lt_cv_dlopen_self_static in ++ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; ++ *) enable_dlopen_self_static=unknown ;; ++ esac ++fi ++])# AC_LIBTOOL_DLOPEN_SELF ++ ++AC_DEFUN([_LT_AC_LTCONFIG_HACK], ++[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl ++# Sed substitution that helps us do robust quoting. It backslashifies ++# metacharacters that are still active within double-quoted strings. ++Xsed='sed -e s/^X//' ++sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' ++ ++# Same as above, but do not quote variable references. ++double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' ++ ++# Sed substitution to delay expansion of an escaped shell variable in a ++# double_quote_subst'ed string. ++delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' ++ ++# Constants: ++rm="rm -f" ++ ++# Global variables: ++default_ofile=libtool ++can_build_shared=yes ++ ++# All known linkers require a `.a' archive for static linking (except M$VC, ++# which needs '.lib'). ++libext=a ++ltmain="$ac_aux_dir/ltmain.sh" ++ofile="$default_ofile" ++with_gnu_ld="$lt_cv_prog_gnu_ld" ++need_locks="$enable_libtool_lock" ++ ++old_CC="$CC" ++old_CFLAGS="$CFLAGS" ++ ++# Set sane defaults for various variables ++test -z "$AR" && AR=ar ++test -z "$AR_FLAGS" && AR_FLAGS=cru ++test -z "$AS" && AS=as ++test -z "$CC" && CC=cc ++test -z "$DLLTOOL" && DLLTOOL=dlltool ++test -z "$LD" && LD=ld ++test -z "$LN_S" && LN_S="ln -s" ++test -z "$MAGIC_CMD" && MAGIC_CMD=file ++test -z "$NM" && NM=nm ++test -z "$OBJDUMP" && OBJDUMP=objdump ++test -z "$RANLIB" && RANLIB=: ++test -z "$STRIP" && STRIP=: ++test -z "$ac_objext" && ac_objext=o ++ ++if test x"$host" != x"$build"; then ++ ac_tool_prefix=${host_alias}- ++else ++ ac_tool_prefix= ++fi ++ ++# Transform linux* to *-*-linux-gnu*, to support old configure scripts. ++case $host_os in ++linux-gnu*) ;; ++linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` ++esac ++ ++case $host_os in ++aix3*) ++ # AIX sometimes has problems with the GCC collect2 program. For some ++ # reason, if we set the COLLECT_NAMES environment variable, the problems ++ # vanish in a puff of smoke. ++ if test "X${COLLECT_NAMES+set}" != Xset; then ++ COLLECT_NAMES= ++ export COLLECT_NAMES ++ fi ++ ;; ++esac ++ ++# Determine commands to create old-style static archives. ++old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' ++old_postinstall_cmds='chmod 644 $oldlib' ++old_postuninstall_cmds= ++ ++if test -n "$RANLIB"; then ++ case $host_os in ++ openbsd*) ++ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ++ ;; ++ *) ++ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ++ ;; ++ esac ++ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" ++fi ++ ++# Allow CC to be a program name with arguments. ++set dummy $CC ++compiler="[$]2" ++ ++AC_MSG_CHECKING([for objdir]) ++rm -f .libs 2>/dev/null ++mkdir .libs 2>/dev/null ++if test -d .libs; then ++ objdir=.libs ++else ++ # MS-DOS does not allow filenames that begin with a dot. ++ objdir=_libs ++fi ++rmdir .libs 2>/dev/null ++AC_MSG_RESULT($objdir) ++ ++ ++AC_ARG_WITH(pic, ++[ --with-pic try to use only PIC/non-PIC objects [default=use both]], ++pic_mode="$withval", pic_mode=default) ++test -z "$pic_mode" && pic_mode=default ++ ++# We assume here that the value for lt_cv_prog_cc_pic will not be cached ++# in isolation, and that seeing it set (from the cache) indicates that ++# the associated values are set (in the cache) correctly too. ++AC_MSG_CHECKING([for $compiler option to produce PIC]) ++AC_CACHE_VAL(lt_cv_prog_cc_pic, ++[ lt_cv_prog_cc_pic= ++ lt_cv_prog_cc_shlib= ++ lt_cv_prog_cc_wl= ++ lt_cv_prog_cc_static= ++ lt_cv_prog_cc_no_builtin= ++ lt_cv_prog_cc_can_build_shared=$can_build_shared ++ ++ if test "$GCC" = yes; then ++ lt_cv_prog_cc_wl='-Wl,' ++ lt_cv_prog_cc_static='-static' ++ ++ case $host_os in ++ aix*) ++ # Below there is a dirty hack to force normal static linking with -ldl ++ # The problem is because libdl dynamically linked with both libc and ++ # libC (AIX C++ library), which obviously doesn't included in libraries ++ # list by gcc. This cause undefined symbols with -static flags. ++ # This hack allows C programs to be linked with "-static -ldl", but ++ # not sure about C++ programs. ++ lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" ++ ;; ++ amigaos*) ++ # FIXME: we need at least 68020 code to build shared libraries, but ++ # adding the `-m68020' flag to GCC prevents building anything better, ++ # like `-m68040'. ++ lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' ++ ;; ++ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) ++ # PIC is the default for these OSes. ++ ;; ++ darwin* | rhapsody*) ++ # PIC is the default on this platform ++ # Common symbols not allowed in MH_DYLIB files ++ lt_cv_prog_cc_pic='-fno-common' ++ ;; ++ cygwin* | mingw* | pw32* | os2*) ++ # This hack is so that the source file can tell whether it is being ++ # built for inclusion in a dll (and should export symbols for example). ++ lt_cv_prog_cc_pic='-DDLL_EXPORT' ++ ;; ++ sysv4*MP*) ++ if test -d /usr/nec; then ++ lt_cv_prog_cc_pic=-Kconform_pic ++ fi ++ ;; ++ *) ++ lt_cv_prog_cc_pic='-fPIC' ++ ;; ++ esac ++ else ++ # PORTME Check for PIC flags for the system compiler. ++ case $host_os in ++ aix3* | aix4* | aix5*) ++ lt_cv_prog_cc_wl='-Wl,' ++ # All AIX code is PIC. ++ if test "$host_cpu" = ia64; then ++ # AIX 5 now supports IA64 processor ++ lt_cv_prog_cc_static='-Bstatic' ++ else ++ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' ++