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

Merge the "dim-of-world-spaces" branch into the trunk, so branch is
close from now on.

Status:
- direct sums of fe-spaces & vector valued basis functions are working
- some demo-programs still need to be ported (hiwi-job).
parent a752656f
No related branches found
No related tags found
No related merge requests found
...@@ -3,35 +3,88 @@ ...@@ -3,35 +3,88 @@
## DO NOT EDIT, this file is automatically generated by ## DO NOT EDIT, this file is automatically generated by
## ${top_srcdir}/generate-alberta-automakefiles.sh ## ${top_srcdir}/generate-alberta-automakefiles.sh
DIM_OF_WORLD = %DIM_OF_WORLD% %NO_MULTI_DIM%lib_LTLIBRARIES =
ALBERTA_DEBUG = %ALBERTA_DEBUG% %NO_MULTI_DIM%noinst_LTLIBRARIES =
lib_LTLIBRARIES = libalberta%LIBCODE%.la assemble%LIBCODE%_libs = libSS_assemble%LIBCODE%.la
if VECTOR_BASIS_FUNCTIONS
assemble%LIBCODE%_libs += libVV_assemble%LIBCODE%.la\
libVC_assemble%LIBCODE%.la libCV_assemble%LIBCODE%.la\
libVS_assemble%LIBCODE%.la libSV_assemble%LIBCODE%.la
endif
lib_LTLIBRARIES += libalberta%LIBCODE%.la
noinst_LTLIBRARIES += $(assemble%LIBCODE%_libs)
include $(srcdir)/../Common/Makefile.am.include %NO_MULTI_DIM%include $(srcdir)/../Common/Makefile.am.include
AM_CFLAGS = $(ALBERTA_%EFLAGS%_CFLAGS) AM_CFLAGS = $(ALBERTA_%EFLAGS%_CFLAGS)
AM_CXXFLAGS = $(ALBERTA_%EFLAGS%_CXXFLAGS) AM_CXXFLAGS = $(ALBERTA_%EFLAGS%_CXXFLAGS)
nodist_libalberta%LIBCODE%_la_SOURCES = $(sources) nodist_libalberta%LIBCODE%_la_SOURCES = $(sources)
libalberta%LIBCODE%_la_LIBADD = $(assemble%LIBCODE%_libs)
libalberta%LIBCODE%_la_CPPFLAGS = \ libalberta%LIBCODE%_la_CPPFLAGS = \
$(CPPFLAGS) -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) $(CPPFLAGS) -DDIM_OF_WORLD=%DIM_OF_WORLD% -DALBERTA_DEBUG=%ALBERTA_DEBUG%
libalberta%LIBCODE%_la_LDFLAGS = -version-info 3:0:0 libalberta%LIBCODE%_la_LDFLAGS = -version-info 4:0:0
# Various flavours of block-matrix assembly
# scalar-scalar or Cartesian/Cartesian
libSS_assemble%LIBCODE%_la_SOURCES = $(assemble_sources)
libSS_assemble%LIBCODE%_la_CPPFLAGS = \
$(libalberta%LIBCODE%_la_CPPFLAGS)\
-DHAVE_PSI_V_TYPE=0 -DHAVE_PHI_V_TYPE=0\
-DHAVE_PSI_C_TYPE=0 -DHAVE_PHI_C_TYPE=0
# vector-vector
libVV_assemble%LIBCODE%_la_SOURCES = $(assemble_sources)
libVV_assemble%LIBCODE%_la_CPPFLAGS = \
$(libalberta%LIBCODE%_la_CPPFLAGS)\
-DHAVE_PSI_V_TYPE=1 -DHAVE_PHI_V_TYPE=1\
-DHAVE_PSI_C_TYPE=0 -DHAVE_PHI_C_TYPE=0
# vector-Cartesian
libVC_assemble%LIBCODE%_la_SOURCES = $(assemble_sources)
libVC_assemble%LIBCODE%_la_CPPFLAGS = \
$(libalberta%LIBCODE%_la_CPPFLAGS)\
-DHAVE_PSI_V_TYPE=1 -DHAVE_PHI_V_TYPE=0\
-DHAVE_PSI_C_TYPE=0 -DHAVE_PHI_C_TYPE=1
# Cartesian-vector
libCV_assemble%LIBCODE%_la_SOURCES = $(assemble_sources)
libCV_assemble%LIBCODE%_la_CPPFLAGS = \
$(libalberta%LIBCODE%_la_CPPFLAGS)\
-DHAVE_PSI_V_TYPE=0 -DHAVE_PHI_V_TYPE=1\
-DHAVE_PSI_C_TYPE=1 -DHAVE_PHI_C_TYPE=0
# vector-scalar
libVS_assemble%LIBCODE%_la_SOURCES = $(VSSV_assemble_sources)
libVS_assemble%LIBCODE%_la_CPPFLAGS = \
$(libalberta%LIBCODE%_la_CPPFLAGS)\
-DHAVE_PSI_V_TYPE=1 -DHAVE_PHI_V_TYPE=0\
-DHAVE_PSI_C_TYPE=0 -DHAVE_PHI_C_TYPE=0
# scalar-vector
libSV_assemble%LIBCODE%_la_SOURCES = $(VSSV_assemble_sources)
libSV_assemble%LIBCODE%_la_CPPFLAGS = \
$(libalberta%LIBCODE%_la_CPPFLAGS)\
-DHAVE_PSI_V_TYPE=0 -DHAVE_PHI_V_TYPE=1\
-DHAVE_PSI_C_TYPE=0 -DHAVE_PHI_C_TYPE=0
if ALBERTA_USE_GRAPHICS if ALBERTA_USE_GRAPHICS
lib_LTLIBRARIES += libalberta_gfx%LIBCODE%.la lib_LTLIBRARIES += libalberta_gfx%LIBCODE%.la
nodist_libalberta_gfx%LIBCODE%_la_SOURCES = $(gfxsources) nodist_libalberta_gfx%LIBCODE%_la_SOURCES = $(gfxsources)
libalberta_gfx%LIBCODE%_la_CPPFLAGS = \ libalberta_gfx%LIBCODE%_la_CPPFLAGS = \
$(CPPFLAGS) -DDIM_OF_WORLD=$(DIM_OF_WORLD) -DALBERTA_DEBUG=$(ALBERTA_DEBUG) $(CPPFLAGS) -DDIM_OF_WORLD=%DIM_OF_WORLD% -DALBERTA_DEBUG=%ALBERTA_DEBUG%
#libalberta_gfx%LIBCODE%_la_LIBADD = @GLTOOLS_ALL_LIBS@ @OPENDX_ALL_LIBS@ @OPENGL_ALL_LIBS@ #libalberta_gfx%LIBCODE%_la_LIBADD = @GLTOOLS_ALL_LIBS@ @OPENDX_ALL_LIBS@ @OPENGL_ALL_LIBS@
libalberta_gfx%LIBCODE%_la_LDFLAGS = -version-info 3:0:0 libalberta_gfx%LIBCODE%_la_LDFLAGS = -version-info 4:0:0
endif endif
if MAINTAINER_MODE %NO_MULTI_DIM%if MAINTAINER_MODE
$(srcdir)/Makefile.am: \ %NO_MULTI_DIM%$(srcdir)/Makefile.am: \
$(top_srcdir)/Makefile.am.template \ %NO_MULTI_DIM% $(top_srcdir)/Makefile.am.template \
$(top_srcdir)/generate-alberta-automakefiles.sh %NO_MULTI_DIM% $(top_srcdir)/generate-alberta-automakefiles.sh
cd $(top_srcdir) && sh generate-alberta-automakefiles.sh %NO_MULTI_DIM% cd $(top_srcdir) && sh generate-alberta-automakefiles.sh
endif %NO_MULTI_DIM%endif
...@@ -24,6 +24,8 @@ AC_CONFIG_FILES([Makefile gnu-compat/Makefile ...@@ -24,6 +24,8 @@ AC_CONFIG_FILES([Makefile gnu-compat/Makefile
alberta_util/Makefile alberta_util/src/Makefile alberta_util/Makefile alberta_util/src/Makefile
alberta_util/src/alberta_util_inlines.h.in alberta_util/src/alberta_util_inlines.h.in
add_ons/Makefile add_ons/Makefile
add_ons/libalbas/Makefile
add_ons/libalbas/src/Makefile
add_ons/geomview/Makefile add_ons/geomview/Makefile
add_ons/grape/Makefile add_ons/grape/Makefile
add_ons/grape/mesh/Makefile add_ons/grape/mesh/Makefile
...@@ -70,18 +72,18 @@ else ...@@ -70,18 +72,18 @@ else
fi], fi],
[BITS=$(( ${ac_cv_sizeof_long} * 8 ))]) [BITS=$(( ${ac_cv_sizeof_long} * 8 ))])
AC_CONFIG_COMMANDS([dof_stride_free_bit.h], dnl AC_CONFIG_COMMANDS([dof_stride_free_bit.h],
[: ${TMPDIR=/tmp} dnl [: ${TMPDIR=/tmp}
TARGET_NEW=${TMPDIR}/dof_stride_free_bit.h dnl TARGET_NEW=${TMPDIR}/dof_stride_free_bit.h
TARGET=alberta/src/Common/dof_stride_free_bit.h dnl TARGET=alberta/src/Common/dof_stride_free_bit.h
${SHELL} ${srcdir}/mkdoffreemasks.sh ${BITS} ${BITS} > ${TARGET_NEW} dnl ${SHELL} ${srcdir}/mkdoffreemasks.sh ${BITS} ${BITS} > ${TARGET_NEW}
if test -f ${TARGET} && cmp ${TARGET} ${TARGET_NEW} > /dev/null 2>&1 ; then dnl if test -f ${TARGET} && cmp ${TARGET} ${TARGET_NEW} > /dev/null 2>&1 ; then
AC_MSG_NOTICE([${TARGET} is unchanged]) dnl AC_MSG_NOTICE([${TARGET} is unchanged])
else dnl else
AC_MSG_NOTICE([Creating ${TARGET}]) dnl AC_MSG_NOTICE([Creating ${TARGET}])
mv -f ${TARGET_NEW} ${TARGET} dnl mv -f ${TARGET_NEW} ${TARGET}
fi], dnl fi],
[BITS=$(( ${ac_cv_sizeof_long} * 8 ))]) dnl [BITS=$(( ${ac_cv_sizeof_long} * 8 ))])
# Collect the demo programs # Collect the demo programs
DEMOSOURCES= DEMOSOURCES=
...@@ -114,11 +116,7 @@ else ...@@ -114,11 +116,7 @@ else
alberta_util/src/alberta_util_inlines.h alberta_util/src/alberta_util_inlines.h
fi]) fi])
# change the installation directory. This could surely be done more elegantly... # Control of features which may be disabled/enabled as needed
#
# cH: hey, boys and girls, why do we do that?
#
# AC_PREFIX_DEFAULT([`pwd`])
AC_ARG_ENABLE([dim-of-world], AC_ARG_ENABLE([dim-of-world],
[AC_HELP_STRING([--enable-dim-of-world="DIM1 ... DIMk"], [AC_HELP_STRING([--enable-dim-of-world="DIM1 ... DIMk"],
...@@ -142,28 +140,34 @@ AC_ARG_ENABLE([dim-of-world], ...@@ -142,28 +140,34 @@ AC_ARG_ENABLE([dim-of-world],
;; ;;
esac]) esac])
ASSEMBLE_TYPES=" ALBERTA_ENABLE_FLAG([vector-basis-functions],
M_M_M_M [Disable support for vector-valued basis functions. If you leave this enabled
M_M_DM_DM ALBERTA supports DIM_OF_WORLD-valued basis functions and scalar basis
M_M_SCM_SCM functions. If you disable this feature ALBERTA only supports scalar valued
DM_DM_DM_DM basis functions. DIM_OF_WORLD-valued
DM_DM_SCM_SCM basis functions play an important role, e.g. for the discretisation of
SCM_SCM_SCM_SCM" problems involving H(div) (Maxwell equations ...) and, e.g., for stable
ASSEMBLE_FCTS_BASE=assemble_fcts.c mixed discretisations for the Stokes-problem. Building ALBERTA with
ASSEMBLE_FCTS="" support for vector valued basis functions increases the compile-time,
for variant in ${ASSEMBLE_TYPES}; do otherwise it should not have any measureable performance impact, therefore
ASSEMBLE_FCTS="${ASSEMBLE_FCTS} ${variant}_${ASSEMBLE_FCTS_BASE}" this feature is normally ENABLED. Disable it to reduce the compile time
done if you do not need this feature.],
AC_SUBST(ASSEMBLE_FCTS) [enabled],
[VECTOR_BASIS_FUNCTIONS],
[DEFINE SUBST COND])
ALBERTA_ENABLE_FLAG([chained-basis-functions],
[Disable support for chains of basis-functions. ALBERTA has support for
forming direct sums of FE-spaces. This is useful, e.g., to
implement certain stable mixed discretisations for the Stokes-problem
(P1+Bubble = Mini, P1+FaceBubble = Bernardi-Raugel, weak slip b.c.).
Keeping this feature enabled will have a slight performance impact,
you may disable it if you do not need this feature.],
[enabled],
[CHAINED_BASIS_FUNCTIONS],
[DEFINE SUBST COND])
ASSEMBLE_BNDRY_TYPES="M_M M_DM M_SCM DM_DM DM_SCM SCM_SCM" ################################################################################
ASSEMBLE_BNDRY_FCTS_BASE=assemble_bndry_fcts.c
ASS_BNDRY_FCTS=""
for variant in ${ASSEMBLE_BNDRY_TYPES}; do
ASS_BNDRY_FCTS="${ASS_BNDRY_FCTS} ${variant}_${ASSEMBLE_BNDRY_FCTS_BASE}"
done
ASSEMBLE_BNDRY_FCTS="${ASS_BNDRY_FCTS}"
AC_SUBST(ASSEMBLE_BNDRY_FCTS)
# Checks for programs. # Checks for programs.
AC_PROG_INSTALL AC_PROG_INSTALL
...@@ -178,6 +182,17 @@ AC_ARG_VAR([TAR_PROGRAM],[name of tar program (need _not_ be GNU-tar)]) ...@@ -178,6 +182,17 @@ AC_ARG_VAR([TAR_PROGRAM],[name of tar program (need _not_ be GNU-tar)])
# #
# now check for compilers # now check for compilers
# #
ALBERTA_ENABLE_FLAG([gcc-attribute-flatten],
[The GNU C-compiler gcc knows about a special function attribute which
forces the compiler to "flatten" a specific function, i.e. to forcibly
inline all functions called from the function which carries the "flatten"
attribute. ALBERTA can use this feature on selected functions to produce
faster code at the expense of compile time. The extra time needed to compile
the library is quite large, so use of the "flatten" attribute is normally
disabled.],
[disabled],
[GCC_ATTRIBUTE_FLATTEN],
[DEFINE SUBST COND])
# #
# remember the user override, if any. # remember the user override, if any.
...@@ -346,6 +361,7 @@ AC_PROG_LIBTOOL ...@@ -346,6 +361,7 @@ AC_PROG_LIBTOOL
# Checks for libraries, headers, functions, declarations ... # Checks for libraries, headers, functions, declarations ...
AC_FUNC_OBSTACK AC_FUNC_OBSTACK
AM_CONDITIONAL(NEED_OBSTACK, [test ! "x${ac_cv_func_obstack}" = "xyes"])
# Check for libraries # Check for libraries
AC_CHECK_LIB([m],[main],, AC_CHECK_LIB([m],[main],,
...@@ -411,8 +427,10 @@ AC_CHECK_FUNCS([unsetenv]) ...@@ -411,8 +427,10 @@ AC_CHECK_FUNCS([unsetenv])
AC_CHECK_FUNCS([getopt_long],[], AC_CHECK_FUNCS([getopt_long],[],
[AC_LIBOBJ([getopt]) [AC_LIBOBJ([getopt])
AC_LIBOBJ([getopt1]) AC_LIBOBJ([getopt1])
NEED_GETOPT=1
GNUCOMPAT_INCLUDE_PATH='$(top_srcdir)/gnu-compat/']) GNUCOMPAT_INCLUDE_PATH='$(top_srcdir)/gnu-compat/'])
AC_SUBST([GNUCOMPAT_INCLUDE_PATH]) AC_SUBST([GNUCOMPAT_INCLUDE_PATH])
AM_CONDITIONAL(NEED_GETOPT, [test "x${NEED_GETOPT}" = "x1"])
# Checks for typedefs, structures, and compiler characteristics. # Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST AC_C_CONST
......
#! /bin/sh #! /bin/sh
# A script to generate the various assemble function flavours from the
# template files alberta/src/Common/assemble_fcts.c.in and
# alberta/src/Common/assemble_bndry_fcts.c.in
#
# The idea is to generate specializations for the various block-matrix
# variants while still only consuming a moderate amount of compilation
# time. So we generate different files for different flavours of
# block-matrices.
if test "$#" -eq 4 if test "$#" -eq 4
then then
DST_DOWB_ST=$1 DST_DOWB_ST=$1
......
...@@ -14,8 +14,40 @@ for ALBERTA_DEBUG in 0 1; do ...@@ -14,8 +14,40 @@ for ALBERTA_DEBUG in 0 1; do
LIBCODE=_${DIM_OF_WORLD}d_debug LIBCODE=_${DIM_OF_WORLD}d_debug
EFLAGS=DEBUG EFLAGS=DEBUG
fi fi
DIRECTORY="alberta/src/alberta${LIBCODE}"
mkdir -p alberta/src/alberta$LIBCODE mkdir -p ${DIRECTORY}
sed -e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" Makefile.am.template -e "s/%DEBUG%/$DEBUG/g" -e "s/%ALBERTA_DEBUG%/$ALBERTA_DEBUG/g" -e "s/%LIBCODE%/$LIBCODE/g" -e "s/%EFLAGS%/$EFLAGS/g" > alberta/src/alberta$LIBCODE/Makefile.am sed \
-e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" \
-e "s/%DEBUG%/$DEBUG/g" \
-e "s/%ALBERTA_DEBUG%/$ALBERTA_DEBUG/g" \
-e "s/%LIBCODE%/$LIBCODE/g" \
-e "s/%EFLAGS%/$EFLAGS/g" \
-e "s/%NO_MULTI_DIM%//g" \
-e "s/%MULTI_DIM%/#/g" \
Makefile.am.template > ${DIRECTORY}/Makefile.am
done
if test $ALBERTA_DEBUG -eq 0; then
DIRECTORY="alberta/src/alberta_Nd"
else
DIRECTORY="alberta/src/alberta_Nd_debug"
fi
mkdir -p ${DIRECTORY}
for DIM_OF_WORLD in 4 5 6 7 8 9; do
if test $ALBERTA_DEBUG -eq 0; then
LIBCODE=_${DIM_OF_WORLD}d
EFLAGS=OPTIMIZE
else
LIBCODE=_${DIM_OF_WORLD}d_debug
EFLAGS=DEBUG
fi
sed \
-e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" \
-e "s/%DEBUG%/$DEBUG/g" \
-e "s/%ALBERTA_DEBUG%/$ALBERTA_DEBUG/g" \
-e "s/%LIBCODE%/$LIBCODE/g" \
-e "s/%EFLAGS%/$EFLAGS/g" \
-e "s/%NO_MULTI_DIM%/#/g" \
-e "s/%MULTI_DIM%//g" \
Makefile.am.template > ${DIRECTORY}/Makefile-${DIM_OF_WORLD}d.am
done done
done done
EXTRADIST = README COPYING EXTRADIST = README COPYING
noinst_LTLIBRARIES = libalbertagnucompat.la noinst_LTLIBRARIES = libalbertagnucompat.la
noinst_HEADERS = getopt.h obstack.h
pkginclude_HEADERS =
if NEED_GETOPT
pkginclude_HEADERS += getopt.h
endif
if NEED_OBSTACK
pkginclude_HEADERS += obstack.h
endif
libalbertagnucompat_la_SOURCES = getopt.h dummy.c libalbertagnucompat_la_SOURCES = getopt.h dummy.c
libalbertagnucompat_la_LIBADD = @LTLIBOBJS@ libalbertagnucompat_la_LIBADD = @LTLIBOBJS@
...@@ -20,11 +20,20 @@ AC_COMPILE_IFELSE( ...@@ -20,11 +20,20 @@ AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[[extern void exit(int status); [[extern void exit(int status);
#define FOO(a, ...) (a, __VA_ARGS__) #define FOO(a, ...) (a, __VA_ARGS__)
#include <stdarg.h>
void va_copy_test(va_list ap)
{
va_list ap2;
va_copy(ap2, ap);
va_end(ap2);
}
extern int foo(int a, int b, int c);]], extern int foo(int a, int b, int c);]],
[[int bar[foo FOO(3, 4, 5)]; [[int bar[foo FOO(3, 4, 5)];
exit(bar[0]);]])], exit(bar[0]);]])],
[AC_MSG_RESULT([variadic macros and variable length arrays available])], [AC_MSG_RESULT(
[AC_MSG_FAILURE([variadic macros and/or vairable length arrays NOT available])]) [variadic macros, va_copy() and variable length arrays are available])],
[AC_MSG_FAILURE(
[variadic macros, va_copy() and/or vairable length arrays are NOT available])])
AC_LANG_POP([C]) AC_LANG_POP([C])
CFLAGS="${_alberta_save_cflags}" CFLAGS="${_alberta_save_cflags}"
]) ])
...@@ -290,6 +290,11 @@ UPNAME[_AUXLIBS]="alb_ac_AUXLIBS" ...@@ -290,6 +290,11 @@ UPNAME[_AUXLIBS]="alb_ac_AUXLIBS"
dnl dnl
dnl now check if the library and header files exist dnl now check if the library and header files exist
dnl dnl
AC_CACHE_CHECK([for libraries for package alb_ac_PKGNAME],
[alb_ac_cv_]UPNAME[_libs],[
dnl
dnl Cache check start
dnl
m4_if(OPTIONAL,[optional], m4_if(OPTIONAL,[optional],
[AC_CHECK_LIB(${UPNAME[_LINK_NAMES]}, main, [AC_CHECK_LIB(${UPNAME[_LINK_NAMES]}, main,
[UPNAME[_LIBS]="${UPNAME[_LIB_PATHS]} -l${UPNAME[_LINK_NAMES]}" [UPNAME[_LIBS]="${UPNAME[_LIB_PATHS]} -l${UPNAME[_LINK_NAMES]}"
...@@ -384,6 +389,25 @@ else ...@@ -384,6 +389,25 @@ else
UPNAME[_INCLUDE_PATH]=""]) UPNAME[_INCLUDE_PATH]=""])
LIBS="${alb_ac_save_LIBS}" LIBS="${alb_ac_save_LIBS}"
fi]) fi])
if test "x${UPNAME[_LIBS]}" = "x" ; then
[alb_ac_cv_]UPNAME[_libs]="notfound"
else
[alb_ac_cv_]UPNAME[_libs]="${UPNAME[_LIBS]}"
fi
]) dnl Cache check end
if test "x${[alb_ac_cv_]UPNAME[_libs]}" = "xnotfound"; then
m4_if(OPTIONAL,[optional],
[UPNAME[_LIBS]=""
UPNAME[_ALL_LIBS]=""
UPNAME[_LIB_PATHS]=""
UPNAME[_INCLUDES]=""
UPNAME[_INCLUDE_PATH]=""],
[AC_MSG_ERROR([Failed to find libraries for alb_ac_PKGNAME])])
else
UPNAME[_LIBS]="${[alb_ac_cv_]UPNAME[_libs]}"
UPNAME[_ALL_LIBS]="${[alb_ac_cv_]UPNAME[_libs]} ${UPNAME[_AUXLIBS]}"
fi
dnl dnl
dnl restore default linker dnl restore default linker
...@@ -397,32 +421,40 @@ else ...@@ -397,32 +421,40 @@ else
dnl dnl
dnl check for the header file(s) dnl check for the header file(s)
dnl dnl
[gv_ac_]UPNAME[_save_CPPFLAGS]="$CPPFLAGS" AC_CACHE_CHECK(
for alb_ac_incdir in ${UPNAME[_INCLUDE_PATH]} ""; do [for include-files for package alb_ac_PKGNAME],
unset alb_ac_header_status [alb_ac_cv_]UPNAME[_incdir],[
unset alb_ac_unset_names [alb_ac_]UPNAME[_save_CPPFLAGS]="$CPPFLAGS"
alb_ac_incdir_exp="`eval eval eval echo ${alb_ac_incdir}`" for [alb_ac_cv_]UPNAME[_incdir] in ${UPNAME[_INCLUDE_PATH]} ""; do
if test -n "${alb_ac_incdir_exp}"; then unset alb_ac_header_status
CPPFLAGS="-I${alb_ac_incdir_exp} alb_ac_EXTRA_INC ${[gv_ac_]UPNAME[_save_CPPFLAGS]}" unset alb_ac_unset_names
AC_MSG_CHECKING([for header(s) \"alb_ac_HEADERS\" in \"${alb_ac_incdir_exp}\" and system include path]) alb_ac_incdir_exp="`eval eval eval echo ${[alb_ac_cv_]UPNAME[_incdir]}`"
AC_MSG_RESULT([]) if test -n "${alb_ac_incdir_exp}"; then
else CPPFLAGS="-I${alb_ac_incdir_exp} alb_ac_EXTRA_INC ${[alb_ac_]UPNAME[_save_CPPFLAGS]}"
AC_MSG_CHECKING([for header(s) \"alb_ac_HEADERS\" in system include path]) AC_MSG_CHECKING([for header(s) \"alb_ac_HEADERS\" in \"${alb_ac_incdir_exp}\" and system include path])
AC_MSG_RESULT([]) AC_MSG_RESULT([])
fi else
AC_CHECK_HEADERS(alb_ac_HEADERS, AC_MSG_CHECKING([for header(s) \"alb_ac_HEADERS\" in system include path])
[alb_ac_unset_names="${alb_ac_unset_names} $as_ac_Header"], AC_MSG_RESULT([])
[alb_ac_unset_names="${alb_ac_unset_names} $as_ac_Header" fi
alb_ac_header_status=notfound]) AC_CHECK_HEADERS(alb_ac_HEADERS,
[alb_ac_unset_names="${alb_ac_unset_names} $as_ac_Header"],
[alb_ac_unset_names="${alb_ac_unset_names} $as_ac_Header"
alb_ac_header_status=notfound])
if test "x${alb_ac_header_status}" = "xnotfound"; then
for name in ${alb_ac_unset_names}; do
eval "unset ${name}"
done
else
break
fi
done
CPPFLAGS="${[alb_ac_]UPNAME[_save_CPPFLAGS]}"
if test "x${alb_ac_header_status}" = "xnotfound"; then if test "x${alb_ac_header_status}" = "xnotfound"; then
for name in ${alb_ac_unset_names}; do [alb_ac_cv_]UPNAME[_incdir]="notfound"
eval "unset ${name}"
done
else
break
fi fi
done ])
if test "x${alb_ac_header_status}" = "xnotfound"; then if test "x${[alb_ac_cv_]UPNAME[_incdir]}" = "xnotfound"; then
m4_if(OPTIONAL,[optional], m4_if(OPTIONAL,[optional],
[UPNAME[_LIBS]="" [UPNAME[_LIBS]=""
UPNAME[_ALL_LIBS]="" UPNAME[_ALL_LIBS]=""
...@@ -431,11 +463,10 @@ else ...@@ -431,11 +463,10 @@ else
UPNAME[_INCLUDE_PATH]=""], UPNAME[_INCLUDE_PATH]=""],
[AC_MSG_ERROR([Header file(s) \"alb_ac_HEADERS\" were not found])]) [AC_MSG_ERROR([Header file(s) \"alb_ac_HEADERS\" were not found])])
else else
UPNAME[_ALL_INCLUDES]="-I${alb_ac_incdir} alb_ac_EXTRA_INC" UPNAME[_ALL_INCLUDES]="-I${[alb_ac_cv_]UPNAME[_incdir]} alb_ac_EXTRA_INC"
UPNAME[_INCLUDES]="-I${alb_ac_incdir}" UPNAME[_INCLUDES]="-I${[alb_ac_cv_]UPNAME[_incdir]}"
UPNAME[_INCLUDE_PATH]="${incdir}" UPNAME[_INCLUDE_PATH]="${[alb_ac_cv_]UPNAME[_incdir]}"
fi fi
CPPFLAGS="${[gv_ac_]UPNAME[_save_CPPFLAGS]}"
]) ])
dnl dnl
dnl define makefile substitutions and config.h macros dnl define makefile substitutions and config.h macros
......
...@@ -24,15 +24,19 @@ AC_DEFUN([ALBERTA_ENABLE_FLAG], ...@@ -24,15 +24,19 @@ AC_DEFUN([ALBERTA_ENABLE_FLAG],
[m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$4]),-,_)])]) [m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$4]),-,_)])])
m4_define([NEGDEFAULT],[enable]) m4_define([NEGDEFAULT],[enable])
m4_define([DEFAULT],[disabled]) m4_define([DEFAULT],[disabled])
m4_define([VALUE],[0])
m4_if([$3],[1], m4_if([$3],[1],
[m4_define([NEGDEFAULT],[disable]) [m4_define([NEGDEFAULT],[disable])
m4_define([DEFAULT],[enabled])]) m4_define([DEFAULT],[enabled])
m4_define([VALUE],[1])])
m4_if([$3],[yes], m4_if([$3],[yes],
[m4_define([NEGDEFAULT],[disable]) [m4_define([NEGDEFAULT],[disable])
m4_define([DEFAULT],[enabled])]) m4_define([DEFAULT],[enabled])
m4_define([VALUE],[1])])
m4_if([$3],[enabled], m4_if([$3],[enabled],
[m4_define([NEGDEFAULT],[disable]) [m4_define([NEGDEFAULT],[disable])
m4_define([DEFAULT],[enabled])]) m4_define([DEFAULT],[enabled])
m4_define([VALUE],[1])])
AC_ARG_ENABLE($1, AC_ARG_ENABLE($1,
AC_HELP_STRING(--[]NEGDEFAULT[]-$1, AC_HELP_STRING(--[]NEGDEFAULT[]-$1,
[$2 (default: DEFAULT)]), [$2 (default: DEFAULT)]),
...@@ -47,7 +51,7 @@ AC_ARG_ENABLE($1, ...@@ -47,7 +51,7 @@ AC_ARG_ENABLE($1,
AC_MSG_ERROR(["--[]NEGDEFAULT[]-$1" does not take an argument.]) AC_MSG_ERROR(["--[]NEGDEFAULT[]-$1" does not take an argument.])
;; ;;
esac], esac],
[FLAGNAME=$3]) [FLAGNAME=VALUE])
m4_if($#,5, m4_if($#,5,
[for i in m4_toupper([$5]); do [for i in m4_toupper([$5]); do
case $i in case $i in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment