+uses_dpkg=$lb_cv_uses_dpkg
+])
+
+#
+# LB_CHECK_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_EXPORT], [
+AS_VAR_PUSHDEF([lb_export], [lb_cv_export_$1])dnl
+AC_CACHE_CHECK([if Linux kernel exports '$1'], lb_export, [
+AS_VAR_SET([lb_export], [no])
+AS_IF([grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX_OBJ/$SYMVERFILE 2>/dev/null],
+ [AS_VAR_SET([lb_export], [yes])],
+ [for file in $2; do
+ AS_IF([grep -q -E "EXPORT_SYMBOL.*\($1\)" "$LINUX/$file" 2>/dev/null], [
+ AS_VAR_SET([lb_export], [yes])
+ break
+ ])
+ done])
+])
+AS_VAR_IF([lb_export], [yes], [$3], [$4])[]dnl
+AS_VAR_POPDEF([lb_export])dnl
+]) # LB_CHECK_EXPORT
+
+#
+# LB_CHECK_CONFIG
+#
+# check if a given config option is defined
+# $1 - CONFIG_<name>
+# $2 - do 'yes'
+# $3 - do 'no'
+#
+AC_DEFUN([LB_CHECK_CONFIG], [
+LB_CHECK_COMPILE([if Linux kernel was built with CONFIG_$1],
+config_$1, [
+ #include <$AUTOCONF_HDIR/autoconf.h>
+], [
+ #ifndef CONFIG_$1
+ #error CONFIG_$1 not #defined
+ #endif
+], [$2], [$3])
+]) # LB_CHECK_CONFIG
+
+#
+# LB_CHECK_CONFIG_IM
+#
+# check if a given config option is builtin or as module
+# $1 - CONFIG_<name> or CONFIG_<name>_MODULE
+# $2 - do 'yes'
+# $3 - do 'no'
+#
+AC_DEFUN([LB_CHECK_CONFIG_IM], [
+LB_CHECK_COMPILE([if Linux kernel was built with CONFIG_$1 in or as module],
+config_im_$1, [
+ #include <$AUTOCONF_HDIR/autoconf.h>
+], [
+ #if !(defined(CONFIG_$1) || defined(CONFIG_$1_MODULE))
+ #error CONFIG_$1 and CONFIG_$1_MODULE not #defined
+ #endif
+], [$2], [$3])
+]) # LB_CHECK_CONFIG_IM