Skip to content

Commit

Permalink
appneta#136 install will insmod/rmmod/depmod and update /etc/modules
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Oct 7, 2014
1 parent 667d73b commit 93e0614
Show file tree
Hide file tree
Showing 18 changed files with 191 additions and 22 deletions.
2 changes: 2 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
insmod = @insmod@
install_sh = @install_sh@
kerneldir = @kerneldir@
kernelext = @kernelext@
Expand All @@ -247,6 +248,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
rmmod = @rmmod@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand Down
154 changes: 134 additions & 20 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,8 @@ LDNETLIB
LDNETINC
SANDBOXED_FALSE
SANDBOXED_TRUE
QUICK_TX_EXAMPLE_FALSE
QUICK_TX_EXAMPLE_TRUE
kerneluname
moduledir
KERNEL_DIR
Expand All @@ -797,6 +799,8 @@ WORDS_BIGENDIAN_TRUE
SYSTEM_STRLCPY_FALSE
SYSTEM_STRLCPY_TRUE
LIBOBJS
rmmod
insmod
depmod
GROFF
AUTOGEN
Expand Down Expand Up @@ -954,6 +958,7 @@ with_libpcap
with_netmap
with_kernel
with_moduledir
enable_quick_tx_example
enable_sandboxed
with_libdnet
with_pcapnav_config
Expand Down Expand Up @@ -1628,6 +1633,7 @@ Optional Features:
Force using libpcap's pcap_sendpacket() for sending
packets
--enable-dynamic-link Dynamically link libraries
--enable-quick_tx_example Build Quick TX kernel module example
--enable-sandboxed Don't install anything to the kernel module directories
--enable-local-libopts Use the supplied libopts tearoff code
--enable-libopts-install
Expand Down Expand Up @@ -5193,13 +5199,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:5196: $ac_compile\"" >&5)
(eval echo "\"\$as_me:5202: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:5199: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:5205: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:5202: output\"" >&5)
(eval echo "\"\$as_me:5208: 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 @@ -6405,7 +6411,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 6408 "configure"' > conftest.$ac_ext
echo '#line 6414 "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 @@ -7931,11 +7937,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:7934: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7940: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7938: \$? = $ac_status" >&5
echo "$as_me:7944: \$? = $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 @@ -8270,11 +8276,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:8273: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8279: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8277: \$? = $ac_status" >&5
echo "$as_me:8283: \$? = $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 @@ -8375,11 +8381,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:8378: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8384: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8382: \$? = $ac_status" >&5
echo "$as_me:8388: \$? = $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 @@ -8430,11 +8436,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:8433: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8439: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8437: \$? = $ac_status" >&5
echo "$as_me:8443: \$? = $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 @@ -10814,7 +10820,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10817 "configure"
#line 10823 "configure"
#include "confdefs.h"

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

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -14215,11 +14221,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:14218: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14224: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14222: \$? = $ac_status" >&5
echo "$as_me:14228: \$? = $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 @@ -14314,11 +14320,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:14317: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14323: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14321: \$? = $ac_status" >&5
echo "$as_me:14327: \$? = $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 @@ -14366,11 +14372,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:14369: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14375: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14373: \$? = $ac_status" >&5
echo "$as_me:14379: \$? = $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 @@ -15848,6 +15854,90 @@ $as_echo "no" >&6; }
fi


# Extract the first word of "insmod", so it can be a program name with args.
set dummy insmod; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_insmod+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $insmod in
[\\/]* | ?:[\\/]*)
ac_cv_path_insmod="$insmod" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:/sbin"
for as_dir in $as_dummy
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_insmod="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_path_insmod" && ac_cv_path_insmod="/sbin/insmod"
;;
esac
fi
insmod=$ac_cv_path_insmod
if test -n "$insmod"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $insmod" >&5
$as_echo "$insmod" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


# Extract the first word of "rmmod", so it can be a program name with args.
set dummy rmmod; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_path_rmmod+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $rmmod in
[\\/]* | ?:[\\/]*)
ac_cv_path_rmmod="$rmmod" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:/sbin"
for as_dir in $as_dummy
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_rmmod="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_path_rmmod" && ac_cv_path_rmmod="/sbin/rmmod"
;;
esac
fi
rmmod=$ac_cv_path_rmmod
if test -n "$rmmod"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rmmod" >&5
$as_echo "$rmmod" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi



AUTOGEN_VERSION="unknown - man pages will not be built"
if test -n "${AUTOGEN}" ; then
Expand Down Expand Up @@ -19890,6 +19980,26 @@ fi



QUICK_TX_EXAMPLE_DIR=
# Check whether --enable-quick_tx_example was given.
if test "${enable_quick_tx_example+set}" = set; then :
enableval=$enable_quick_tx_example; enable_tx_example="${enableval}"
else
enable_tx_example="no"
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.
if test "${enable_sandboxed+set}" = set; then :
enableval=$enable_sandboxed; enable_sandboxed="${enableval}"
Expand Down Expand Up @@ -22310,6 +22420,10 @@ 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
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ AC_PATH_PROG(CUT, cut)
AC_PATH_PROG(AUTOGEN, autogen)
AC_PATH_PROG(GROFF, groff)
AC_PATH_PROG(depmod, depmod, /sbin/depmod, $PATH:/sbin)
AC_PATH_PROG(insmod, insmod, /sbin/insmod, $PATH:/sbin)
AC_PATH_PROG(rmmod, rmmod, /sbin/rmmod, $PATH:/sbin)

dnl check autogen version
AUTOGEN_VERSION="unknown - man pages will not be built"
Expand Down Expand Up @@ -1115,6 +1117,17 @@ moduledir=${default_moduledir})
AC_SUBST(moduledir)
AC_SUBST(kerneluname)

dnl * Allow kernel example
QUICK_TX_EXAMPLE_DIR=
AC_ARG_ENABLE(quick_tx_example,
[ --enable-quick_tx_example Build Quick TX kernel module example],
[ enable_tx_example="${enableval}" ],
[ enable_tx_example="no"])
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)

dnl * Allow kernel sandbox mode (prevent depmod execution)
AC_ARG_ENABLE(sandboxed,
[ --enable-sandboxed Don't install anything to the kernel module directories],
Expand Down
2 changes: 2 additions & 0 deletions docs/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
insmod = @insmod@
install_sh = @install_sh@
kerneldir = @kerneldir@
kernelext = @kernelext@
Expand All @@ -191,6 +192,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
rmmod = @rmmod@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand Down
2 changes: 2 additions & 0 deletions kernel/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
insmod = @insmod@
install_sh = @install_sh@
kerneldir = @kerneldir@
kernelext = @kernelext@
Expand All @@ -233,6 +234,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
rmmod = @rmmod@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand Down
2 changes: 1 addition & 1 deletion kernel/linux/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# kernel/Makefile.am

SUBDIRS = quick_tx example
SUBDIRS = quick_tx $(QUICK_TX_EXAMPLE_DIR)

EXTRA_DIST = include/linux/quick_tx.h

Expand Down
Loading

0 comments on commit 93e0614

Please sign in to comment.