AC_ARG_WITH([kmp-moddir],
AC_HELP_STRING([--with-kmp-moddir=string],
[set the kmod updates or extra directory]),
- [KMP_MODDIR=$withval],[
- AS_IF([test x$RHEL_KERNEL = xyes], [KMP_MODDIR="extra"],
- [test x$SUSE_KERNEL = xyes], [KMP_MODDIR="updates"])])
+ [KMP_MODDIR=$withval
+ IN_KERNEL=''],[
+ AS_IF([test x$RHEL_KERNEL = xyes], [KMP_MODDIR="extra/kernel"],
+ [test x$SUSE_KERNEL = xyes], [KMP_MODDIR="updates/kernel"])
+ IN_KERNEL="${PACKAGE}"])
AC_MSG_RESULT($KMP_MODDIR)
-AC_SUBST(KMP_MODDIR)
-moduledir='/lib/modules/$(LINUXRELEASE)/$(KMP_MODDIR)/kernel'
-AC_SUBST(moduledir)
+moduledir="/lib/modules/${LINUXRELEASE}/${KMP_MODDIR}"
-modulefsdir='$(moduledir)/fs/$(PACKAGE)'
+modulefsdir="${moduledir}/fs/${IN_KERNEL}"
AC_SUBST(modulefsdir)
-modulenetdir='$(moduledir)/net/$(PACKAGE)'
+modulenetdir="${moduledir}/net/${IN_KERNEL}"
AC_SUBST(modulenetdir)
])