diff --git a/m4/albert-check.m4 b/m4/albert-check.m4
index fca646084c1366e02ab350cd05299b141cfd70c9..999516864895f3736ce3e52336f123fda13e76f0 100644
--- a/m4/albert-check.m4
+++ b/m4/albert-check.m4
@@ -16,7 +16,8 @@ dnl Check for ALBERT libraries at given dimensions, taking ELINDEX and DEBUG
 dnl into account. $1 is DIM, $2 ist DIM_OF_WORLD
 dnl
 AC_DEFUN([ALBERT_CHECK],
-[AC_REQUIRE([ALBERT_OPTIONS])
+[AC_REQUIRE([ALBERT_TYPE_SIZES])
+AC_REQUIRE([ALBERT_OPTIONS])
 AC_REQUIRE([AC_SET_PREFIX])
 dnl
 dnl library location
@@ -124,4 +125,24 @@ if test "x$ALBERT_LIBS_$1$2" = "x" ; then
     fi
   fi
 fi
+dnl
+dnl search for albert.h header
+dnl
+AC_CACHE_CHECK(
+	[whether albert.h exist and works with DIM=$1 and DIM_OF_WORLD=$2],
+	[ac_cv_header_albert$1$2_h],
+	[ac_albert_save_CPPFLAGS="$CPPFLAGS"
+	unset ac_cv_header_albert_h
+	CPPFLAGS="-DDIM=$1 -DDIM_OF_WORLD=$2 -DEL_INDEX=${ELINDEX:-0} -I$ALBERT_INCLUDE_PATH $CPPFLAGS"
+	AC_CHECK_HEADERS(albert.h,
+		[unset ac_cv_header_albert_h
+		ac_cv_header_albert$1$2_h=yes],
+		[ac_cv_header_albert$1$2_h=no
+		AC_MSG_ERROR([Header file "albert.h" not found])])
+	CPPFLAGS="$ac_albert_save_CPPFLAGS"
+	])
+	if test $ac_cv_header_albert$1$2_h = yes; then
+		AC_DEFINE([HAVE_ALBERT$1$2_H], 1,
+			[Define if "albert.h" works with DIM=$1 and DIM_OF_WORLD=$2.])
+	fi
 ])