Skip to content

Commit

Permalink
appneta#136 fix build on Linux systems without kernel source/headers
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Oct 7, 2014
1 parent 3905371 commit aed75e3
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 35 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
54 changes: 21 additions & 33 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,7 @@ LDNETLIB
LDNETINC
SANDBOXED_FALSE
SANDBOXED_TRUE
QUICK_TX_EXAMPLE_FALSE
QUICK_TX_EXAMPLE_TRUE
QUICK_TX_EXAMPLE_DIR
kerneluname
moduledir
KERNEL_DIR
Expand Down Expand Up @@ -5199,13 +5198,13 @@ if test "${lt_cv_nm_interface+set}" = set; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:5202: $ac_compile\"" >&5)
(eval echo "\"\$as_me:5201: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:5205: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:5204: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:5208: output\"" >&5)
(eval echo "\"\$as_me:5207: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
Expand Down Expand Up @@ -6411,7 +6410,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 6414 "configure"' > conftest.$ac_ext
echo '#line 6413 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
Expand Down Expand Up @@ -7937,11 +7936,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7940: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7939: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7944: \$? = $ac_status" >&5
echo "$as_me:7943: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
Expand Down Expand Up @@ -8276,11 +8275,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8279: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8278: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8283: \$? = $ac_status" >&5
echo "$as_me:8282: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
Expand Down Expand Up @@ -8381,11 +8380,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8384: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8383: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8388: \$? = $ac_status" >&5
echo "$as_me:8387: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
Expand Down Expand Up @@ -8436,11 +8435,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8439: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8438: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8443: \$? = $ac_status" >&5
echo "$as_me:8442: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
Expand Down Expand Up @@ -10820,7 +10819,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10823 "configure"
#line 10822 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -10916,7 +10915,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10919 "configure"
#line 10918 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -14221,11 +14220,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14224: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14223: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14228: \$? = $ac_status" >&5
echo "$as_me:14227: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
Expand Down Expand Up @@ -14320,11 +14319,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14323: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14322: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14327: \$? = $ac_status" >&5
echo "$as_me:14326: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
Expand Down Expand Up @@ -14372,11 +14371,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14375: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14374: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14379: \$? = $ac_status" >&5
echo "$as_me:14378: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
Expand Down Expand Up @@ -19991,13 +19990,6 @@ fi
if test x$enable_tx_example = xyes; then
QUICK_TX_EXAMPLE_DIR=example
fi
if test x$enable_tx_example = xyes; then
QUICK_TX_EXAMPLE_TRUE=
QUICK_TX_EXAMPLE_FALSE='#'
else
QUICK_TX_EXAMPLE_TRUE='#'
QUICK_TX_EXAMPLE_FALSE=
fi


# Check whether --enable-sandboxed was given.
Expand Down Expand Up @@ -22420,10 +22412,6 @@ if test -z "${COMPILE_NETMAP_TRUE}" && test -z "${COMPILE_NETMAP_FALSE}"; then
as_fn_error "conditional \"COMPILE_NETMAP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${QUICK_TX_EXAMPLE_TRUE}" && test -z "${QUICK_TX_EXAMPLE_FALSE}"; then
as_fn_error "conditional \"QUICK_TX_EXAMPLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${SANDBOXED_TRUE}" && test -z "${SANDBOXED_FALSE}"; then
as_fn_error "conditional \"SANDBOXED\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ AC_ARG_ENABLE(quick_tx_example,
if test x$enable_tx_example = xyes; then
QUICK_TX_EXAMPLE_DIR=example
fi
AM_CONDITIONAL(QUICK_TX_EXAMPLE, test x$enable_tx_example = xyes)
AC_SUBST(QUICK_TX_EXAMPLE_DIR)

dnl * Allow kernel sandbox mode (prevent depmod execution)
AC_ARG_ENABLE(sandboxed,
Expand Down
1 change: 1 addition & 0 deletions docs/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions kernel/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions kernel/linux/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions kernel/linux/example/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions kernel/linux/quick_tx/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions lib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions libopts/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions scripts/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions src/common/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
6 changes: 5 additions & 1 deletion src/common/sendpacket.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,11 @@ static struct tcpr_ether_addr *sendpacket_get_hwaddr_pcap(sendpacket_t *) _U_;

static void sendpacket_seterr(sendpacket_t *sp, const char *fmt, ...);
static sendpacket_t * sendpacket_open_khial(const char *, char *) _U_;
static struct tcpr_ether_addr * sendpacket_get_hwaddr_khial(sendpacket_t *) _U_;
#ifdef HAVE_QUICK_TX
static sendpacket_t * sendpacket_open_quick_tx(const char *, char *) _U_;
static void sendpacket_close_quick_tx(sendpacket_t *sp);
static struct tcpr_ether_addr * sendpacket_get_hwaddr_khial(sendpacket_t *) _U_;
#endif /* HAVE_QUICK_TX */

/**
* returns number of bytes sent on success or -1 on error
Expand Down Expand Up @@ -1238,6 +1240,7 @@ sendpacket_open_khial(const char *device, char *errbuf)
* Opens connection to Quick TX module for injecting packets directly into
* your interfaces via a the quick_tx module
*/
#ifdef HAVE_QUICK_TX
static sendpacket_t *
sendpacket_open_quick_tx(const char *device, char *errbuf)
{
Expand Down Expand Up @@ -1355,6 +1358,7 @@ sendpacket_close_quick_tx(sendpacket_t *sp)

close(sp->handle.fd);
}
#endif /* HAVE_QUICK_TX */

/**
* Get the hardware MAC address for the given interface using khial
Expand Down
1 change: 1 addition & 0 deletions src/fragroute/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions src/tcpedit/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down
1 change: 1 addition & 0 deletions test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PCAP_BPF_H_FILE = @PCAP_BPF_H_FILE@
POSIX_SHELL = @POSIX_SHELL@
PRINTF = @PRINTF@
QUICK_TX_EXAMPLE_DIR = @QUICK_TX_EXAMPLE_DIR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
Expand Down

0 comments on commit aed75e3

Please sign in to comment.