summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
776615e)
Module.symvers shipped with kernel distribution.
add check for truncate_complete_page used by patchless client.
b=12415
i=adilger
i=scjody
[AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
])
[AM_CONDITIONAL(LINUX25, test x$linux25 = xyes)
])
+
+#
+# LB_CHECK_SYMBOL_EXPORT
+# check symbol exported or not
+# $1 - symbol
+# $2 - file(s) for find.
+# $3 - do 'yes'
+# $4 - do 'no'
+#
+# 2.6 based kernels - put modversion info into $LINUX/Module.modvers
+# or check
+AC_DEFUN([LB_CHECK_SYMBOL_EXPORT],
+[AC_MSG_CHECKING([if Linux was built with symbol $1 is exported])
+grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX/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/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+ fi
+ done
+ if test $export -eq 0; then
+ AC_MSG_RESULT([no])
+ $4
+ else
+ AC_MSG_RESULT([yes])
+ $3
+ fi
+else
+ AC_MSG_RESULT([yes])
+ $3
+fi
+])
# we export show_task(), but not all kernels have it (yet)
#
AC_DEFUN([LN_FUNC_SHOW_TASK],
# we export show_task(), but not all kernels have it (yet)
#
AC_DEFUN([LN_FUNC_SHOW_TASK],
-[AC_MSG_CHECKING([if kernel exports show_task])
-have_show_task=0
-for file in ksyms sched ; do
- if grep -q "EXPORT_SYMBOL(show_task)" \
- "$LINUX/kernel/$file.c" 2>/dev/null ; then
- have_show_task=1
- break
- fi
-done
-if test x$have_show_task = x1 ; then
- AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
+[LB_CHECK_SYMBOL_EXPORT([show_task],
+[kernel/ksyms.c kernel/sched.c],[
+AC_DEFINE(HAVE_SHOW_TASK, 1, [show_task is exported])
+],[
+])
])
# LN_TASKLIST_LOCK
# 2.6.18 remove tasklist_lock export
AC_DEFUN([LN_TASKLIST_LOCK],
])
# LN_TASKLIST_LOCK
# 2.6.18 remove tasklist_lock export
AC_DEFUN([LN_TASKLIST_LOCK],
-[AC_MSG_CHECKING([kernel export tasklist_lock])
- if grep -q "EXPORT_SYMBOL(tasklist_lock)" \
- "$LINUX/kernel/fork.c" 2>/dev/null ; then
- AC_DEFINE(HAVE_TASKLIST_LOCK, 1,
- [tasklist_lock exported])
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
+[LB_CHECK_SYMBOL_EXPORT([tasklist_lock],
+[kernel/fork.c],[
+AC_DEFINE(HAVE_TASKLIST_LOCK, 1,
+ [tasklist_lock exported])
+],[
+])