From 72d56cfea95b56a5fd5fb7dcc9e9dca62e3c3fdb Mon Sep 17 00:00:00 2001 From: Claus-Justus Heine <Claus-Justus.Heine@IANS.Uni-Stuttgart.DE> Date: Sat, 14 Jun 2003 13:52:37 +0000 Subject: [PATCH] Check for albert.h --- m4/albert-check.m4 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/m4/albert-check.m4 b/m4/albert-check.m4 index fca6460..9995168 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 ]) -- GitLab