+AC_DEFUN([LDISKFS_LINUX_SERIES], [
+AC_MSG_CHECKING([which ldiskfs series to use])
+case x$LDISKFS_SERIES in
+ x) # not set
+ ;;
+ *.series) # set externally
+ ;;
+ *) LDISKFS_SERIES=
+esac
+AS_IF([test -z "$LDISKFS_SERIES"], [
+AS_IF([test x$RHEL_KERNEL = xyes], [
+ case $RHEL_RELEASE_NO in
+ 72) LDISKFS_SERIES="3.10-rhel7.2.series" ;;
+ 71) LDISKFS_SERIES="3.10-rhel7.series" ;;
+ 68) LDISKFS_SERIES="2.6-rhel6.8.series" ;;
+ 67) LDISKFS_SERIES="2.6-rhel6.7.series" ;;
+ 66) LDISKFS_SERIES="2.6-rhel6.6.series" ;;
+ 65) LDISKFS_SERIES="2.6-rhel6.5.series" ;;
+ 64) LDISKFS_SERIES="2.6-rhel6.4.series" ;;
+ 6[0-3]) LDISKFS_SERIES="2.6-rhel6.series" ;;
+ esac
+], [test x$SUSE_KERNEL = xyes], [
+ AS_VERSION_COMPARE([$LINUXRELEASE],[3.12.0],[
+ AS_VERSION_COMPARE([$LINUXRELEASE],[3.0.0],[
+ AS_VERSION_COMPARE([$LINUXRELEASE],[2.6.32], [],
+ [LDISKFS_SERIES="2.6-sles11.series"],[LDISKFS_SERIES="2.6-sles11.series"])],
+ [LDISKFS_SERIES="3.0-sles11.series"],[
+ PLEV=$(grep PATCHLEVEL /etc/SuSE-release | sed -e 's/.*= *//')
+ case $PLEV in
+ 2) LDISKFS_SERIES="3.0-sles11.series"
+ ;;
+ 3|4) LDISKFS_SERIES="3.0-sles11sp3.series"
+ ;;
+ esac
+ ])],[LDISKFS_SERIES="3.12-sles12.series"],[
+ PLEV=$(grep PATCHLEVEL /etc/SuSE-release | sed -e 's/.*= *//')
+ case $PLEV in
+ 1) LDISKFS_SERIES="3.12-sles12sp1.series"
+ ;;
+ *) LDISKFS_SERIES="3.12-sles12.series"
+ ;;
+ esac
+ ])
+])
+])
+AS_IF([test -z "$LDISKFS_SERIES"],
+ [AC_MSG_WARN([Unknown kernel version $LDISKFS_VERSIONRELEASE])])
+AC_MSG_RESULT([$LDISKFS_SERIES])
+AC_SUBST(LDISKFS_SERIES)
+]) # LDISKFS_LINUX_SERIES
+