Skip to content
Snippets Groups Projects
Commit 229cafca authored by Claus-Justus Heine's avatar Claus-Justus Heine
Browse files

Initial revision.

parent 28e2706a
Branches
Tags
No related merge requests found
#
# enable building of $1$2 library (DIM/DIM_OF_WORLD)
#
AC_DEFUN([ALBERTA_DIMENSION_ENABLE],
[SIMPLE_ENABLE_FLAG([alberta-$1$2],
[enable building of an ALBERTA library for parametric Finite Elements
of dimension $1 where the surrounding space has dimension $2.], 0)
if test "$ALBERTA_$1$2" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_0/Makefile])
if test "$DEBUG" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_1/Makefile])
fi
if test "$EL_INDEX" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_01/Makefile])
fi
if test "$DEBUG" -eq 1 -a "$EL_INDEX" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_11/Makefile])
fi
fi
])
AC_DEFUN([ALBERTA_DIMENSION_DISABLE],
[SIMPLE_ENABLE_FLAG([alberta-$1$1],
[disable building of an ALBERTA library for Finite Elements of dimension $1.], 1)
if test "$ALBERTA_$1$1" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_0/Makefile])
if test "$DEBUG" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_1/Makefile])
fi
if test "$EL_INDEX" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_01/Makefile])
fi
if test "$DEBUG" -eq 1 -a "$EL_INDEX" -eq 1; then
AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_11/Makefile])
fi
fi
])
#
# $1: name of the enable-switch (e.g. el-index)
# $2: help string
# $3: one of {0,1}, default value
#
# Results: declare proper AC_ARG_ENABLE(), define make-file
# subsitution (e.g. EL_INDEX), define automake conditional
# (e.g. EL_INDEX).
#
AC_DEFUN([SIMPLE_ENABLE_FLAG],
[m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])
m4_if([$3],[1],
[m4_define([NEGDEFAULT],[disable])
m4_define([DEFAULT],[enabled])],
[m4_define([NEGDEFAULT],[enable])
m4_define([DEFAULT],[disabled])])
AC_ARG_ENABLE($1,
AC_HELP_STRING(--[]NEGDEFAULT[]-$1,
[$2 (default: DEFAULT)]),
[case "$enableval" in
yes)
FLAGNAME=1
;;
no)
FLAGNAME=0
;;
*)
AC_MSG_ERROR(["--[]NEGDEFAULT[]-$1" does not take an argument.])
;;
esac],
[FLAGNAME=$3])
AC_SUBST(FLAGNAME)
AM_CONDITIONAL(FLAGNAME, [test "$[]FLAGNAME" -eq 1])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment