dnl Configure linux kernel source tree
AC_DEFUN([OFP_CHECK_LINUX], [
AC_ARG_WITH([$1],
- [AC_HELP_STRING([--with-$1=/path/to/linux-$3],
- [Specify the linux $3 kernel sources])],
+ [AC_HELP_STRING([--with-$1=/path/to/linux-$2],
+ [Specify the linux $2 kernel sources])],
[path="$withval"], [path=])dnl
if test -n "$path"; then
path=`eval echo "$path"`
AC_MSG_CHECKING([for $path directory])
if test -d "$path"; then
AC_MSG_RESULT([yes])
- $4=$path
- AC_SUBST($4)
+ $3=$path
+ AC_SUBST($3)
else
AC_MSG_RESULT([no])
AC_ERROR([source dir $path doesn't exist])
AC_MSG_CHECKING([for $path kernel version])
version=`grep '^PATCHLEVEL = ' "$path/Makefile" | sed 's/PATCHLEVEL = '//`
AC_MSG_RESULT([2.$version])
- if test "2.$version" != '$3'; then
- AC_ERROR([Linux kernel source in $path is not version $3])
+ if test "2.$version" != '$2'; then
+ AC_ERROR([Linux kernel source in $path is not version $2])
fi
if ! test -e "$path"/include/linux/version.h || \
! test -e "$path"/include/linux/autoconf.h; then
AC_MSG_ERROR([Linux kernel source in $path is not configured])
fi
- m4_if($3, [2.6], [OFP_CHECK_LINUX26_COMPAT])
+ m4_if($2, [2.6], [OFP_CHECK_LINUX26_COMPAT])
fi
- AM_CONDITIONAL($5, test -n "$path")
+ AM_CONDITIONAL($4, test -n "$path")
])
dnl OFP_GREP_IFELSE(FILE, REGEX, IF-MATCH, IF-NO-MATCH)
AC_ARG_VAR(KARCH, [Kernel Architecture String])
AC_SUBST(KARCH)
-OFP_CHECK_LINUX(l26, 2.6, 2.6, KSRC26, L26_ENABLED)
-OFP_CHECK_LINUX(l24, 2.4, 2.4, KSRC24, L24_ENABLED)
+OFP_CHECK_LINUX(l26, 2.6, KSRC26, L26_ENABLED)
+OFP_CHECK_LINUX(l24, 2.4, KSRC24, L24_ENABLED)
OFP_CHECK_DPKG_BUILDPACKAGE