aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-06-16 11:34:28 -0700
committerBrian Behlendorf <[email protected]>2009-06-16 11:34:28 -0700
commit2e0e7e69769eb0f5ceda102e575da79288d05127 (patch)
tree06cdc391b00603370f3b8c23ec67b0609c952aa1 /config
parent39a3d2a421bf067329bae352866a5d1fccbcee70 (diff)
Packaging improvements for RHEL and SLES (part 2)
- Allow checking for exported symbols in both Module.symvers and Module.symvers. My stock SLES kernel ships an objects directory with Module.symvers, yet produces a Module.symvers in the local build directory.
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m421
1 files changed, 17 insertions, 4 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index a141fce50..2f277a3b3 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -92,9 +92,20 @@ AC_DEFUN([SPL_AC_KERNEL], [
AC_SUBST(KERNELCFLAGS)
])
+AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
+ AC_MSG_CHECKING([kernel file name for module symbols])
+ if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then
+ LINUX_SYMBOLS=Modules.symvers
+ else
+ LINUX_SYMBOLS=Module.symvers
+ fi
+ AC_MSG_RESULT($LINUX_SYMBOLS)
+ AC_SUBST(LINUX_SYMBOLS)
+])
+
AC_DEFUN([SPL_AC_LICENSE], [
- AC_MSG_CHECKING([license])
- AC_MSG_RESULT([GPL])
+ AC_MSG_CHECKING([license])
+ AC_MSG_RESULT([GPL])
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS"
])
@@ -286,12 +297,14 @@ dnl # check symbol exported or not
dnl #
AC_DEFUN([SPL_CHECK_SYMBOL_EXPORT],
[AC_MSG_CHECKING([whether symbol $1 is exported])
- grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX_OBJ/Module.symvers 2>/dev/null
+ grep -q -E '[[[:space:]]]$1[[[:space:]]]' \
+ $LINUX_OBJ/Module*.symvers 2>/dev/null
rc=$?
if test $rc -ne 0; then
export=0
for file in $2; do
- grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX_OBJ/$file" 2>/dev/null
+ grep -q -E "EXPORT_SYMBOL.*($1)" \
+ "$LINUX_OBJ/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
export=1