From 95321e11382121f4d2ab7054ac82a31812d72115 Mon Sep 17 00:00:00 2001 From: Daniel Koester <Koester@Math.Uni-Augsburg.DE> Date: Thu, 29 Apr 2004 13:55:03 +0000 Subject: [PATCH] ---* REMOVED DIM MACRO CONSTANT *--- First compilable version --- MAINTENANCE | 12 ++++---- Makefile.am.template | 3 +- README | 25 ++++------------ configure.ac | 15 ++++------ generate-alberta-automakefiles.sh | 33 +++++++++------------ m4/alberta-check.m4 | 49 +++++++++++++++---------------- m4/alberta-dims.m4 | 29 ++++-------------- m4/check-alberta-qgl.m4 | 4 +-- m4/grapeiface.m4 | 9 +++--- m4/plotansi.m4 | 2 -- 10 files changed, 68 insertions(+), 113 deletions(-) diff --git a/MAINTENANCE b/MAINTENANCE index 20c2bfc..59c29f1 100644 --- a/MAINTENANCE +++ b/MAINTENANCE @@ -1,5 +1,5 @@ MAINTENANCE DOCUMENTATION FOR ALBERTA PACKAGES -Daniel Koester, February 2004 +Daniel Koester, April 2004 koester@math.uni-augsburg.de Claus-Justus Heine, December 2003 @@ -11,14 +11,14 @@ I) Introduction and Maintenance The alberta-x.x packages are now distributed using GNU autoconf 2.5*, automake 1.7*, and libtool 1.5*. Since some unusual compilation was necessary, a few hints seemed like a good idea. Here is the general -structure of the alberta-1.2 packages: +structure of the alberta-1.3 packages: __________ ALBERTA/ __________ src/ _______|--- 1d/ / \ |--- 2d/ / -- doc/ |--- 3d/ / |--- Common/ - /_____________ DEMO/ __ src/ _______|--- 1d/ |--- ALBERTA??_?/ -alberta-1.2/ * |--- 2d/ + /_____________ DEMO/ __ src/ _______|--- 1d/ |--- ALBERTA?_??/ +alberta-1.3/ * |--- 2d/ \_____________ ALBERTA_UTIL/ |--- 3d/ \ |--- Common/ \___________ PLOT_ANSI/ __ src/ @@ -56,7 +56,7 @@ several variations of "clean" targets. II) Package contents ==================== -The following subpackages are included in alberta-1.2: +The following subpackages are included in alberta-1.3: 1) ALBERTA The main package. @@ -259,7 +259,7 @@ Step 5) ./configure BLABLABLA --enable-maintainer-mode Step 6) - Do "[g]make dist" at the top level. This creates alberta-1.2.tar.gz + Do "[g]make dist" at the top level. This creates alberta-1.3.tar.gz in which all CVS-directories, ~-files, and other unnecessary components are stripped. To be a bit more precise: diff --git a/Makefile.am.template b/Makefile.am.template index c531b5b..709bee3 100644 --- a/Makefile.am.template +++ b/Makefile.am.template @@ -6,12 +6,11 @@ DEBUG= %DEBUG% lib_LTLIBRARIES = libALBERTA%LIBCODE%.la -include $(srcdir)/../%DIM%d/Makefile.am.include include $(srcdir)/../Common/Makefile.am.include AM_CFLAGS = $(ALBERTA_%EFLAGS%_CFLAGS) -nodist_libALBERTA%LIBCODE%_la_SOURCES = $(sources_common) $(sources) +nodist_libALBERTA%LIBCODE%_la_SOURCES = $(sources) if HAVE_GLTOOLS nodist_libALBERTA%LIBCODE%_la_SOURCES += ../Common/gltools.c diff --git a/README b/README index afa2116..440a238 100644 --- a/README +++ b/README @@ -47,7 +47,7 @@ Contained in the package are the following sub-packages: / \ |--- 2d/ / -- doc/ |--- 3d/ / |--- Common/ - /_____________ DEMO/ __ src/ _______|--- 1d/ |--- ALBERTA??_?/ + /_____________ DEMO/ __ src/ _______|--- 1d/ |--- ALBERTA?_??/ alberta-1.2/| |--- 2d/ \_____________ ALBERTA_UTIL/ |--- 3d/ \ |--- Common/ @@ -274,37 +274,22 @@ This will be the layout after running "make install". Compiling all flavours of the ALBERTA libraries takes a long time. The ALBERTA libraries are all named - libALBERTA$(DIM)$(DIM_OF_WORLD)_$(DEBUG)$(EL_INDEX) + libALBERTA$(DIM_OF_WORLD)_$(DEBUG)$(EL_INDEX) The options below control which of them are actually created. - --disable-alberta-11 + --disable-alberta-1 Disable building of an ALBERTA library for Finite Elements of dimension 1. (default: enabled) - --disable-alberta-22 + --disable-alberta-2 Disable building of an ALBERTA library for Finite Elements of dimension 2. (default: enabled) - --disable-alberta-33 + --disable-alberta-3 Disable building of an ALBERTA library for Finite Elements of dimension 3. (default: enabled) - --enable-alberta-12 - Enable building of an ALBERTA library for parametric - Finite Elements of dimension 1 where the - surrounding space has dimension 2. (default: disabled) - - --enable-alberta-13 - Enable building of an ALBERTA library for parametric - Finite Elements of dimension 1 where the - surrounding space has dimension 3. (default: disabled) - - --enable-alberta-23 - Enable building of an ALBERTA library for parametric - Finite Elements of dimension 2 where the - surrounding space has dimension 3. (default: disabled) - --enable-el-index Additionally build ALBERTA libraries which assigns an unique index to each element. Normally, this is not needed but it can diff --git a/configure.ac b/configure.ac index 93b3e64..70ed210 100644 --- a/configure.ac +++ b/configure.ac @@ -173,7 +173,7 @@ AC_TYPE_SIGNAL # ****************************************************************************** case "$host_vendor" in - *sun*) AC_MSG_RESULT([Building fo a SUN system, affects xdr-routines...]) + *sun*) AC_MSG_RESULT([Building for a SUN system, affects xdr-routines...]) AC_CHECK_LIB(nsl, main) ;; esac @@ -207,7 +207,7 @@ dnl ALBERTA_CHECK_PACKAGE(opengl, GL, ,${X_ALL_LIBS}, GL/gl.h,,,required) dnl -dnl check for optional pacakge gltools +dnl check for optional package gltools dnl ALBERTA_CHECK_PACKAGE(gltools, gltools, , ${X_ALL_LIBS}, glmesh.h,,,optional) @@ -231,20 +231,17 @@ dnl NOTA BENE: using NEIGH_IN_EL=1 is probably buggy.], 0) # SIMPLE_ENABLE_FLAG([debug], [disable building of ALBERTA libraries with debugging information.], 1) -# building of parametric versions is disabled by default, but can be -# enabled using --enable-DIMDIMOFWORLD-dimension switches (the macros -# below do _not_ enable the builds, but simply implement +# building of all versions is enabled by default, but can be +# disabled using --disable-DIM-dimension switches (the macros +# below do _not_ disable the builds, but simply implement # AC_ARG_ENABLE() stuff # -# BIG FAT NOTE: the DIMENSION_EN/DISABLE macro MUST COME LAST, right +# BIG FAT NOTE: the DIMENSION_DISABLE macro MUST COME LAST, right # before the AC_OUTPUT # ALBERTA_DIMENSION_DISABLE(1) ALBERTA_DIMENSION_DISABLE(2) ALBERTA_DIMENSION_DISABLE(3) -ALBERTA_DIMENSION_ENABLE(1,2) -ALBERTA_DIMENSION_ENABLE(1,3) -ALBERTA_DIMENSION_ENABLE(2,3) AC_CONFIG_COMMANDS_POST([ if ! test "$srcdir" = \. ; then diff --git a/generate-alberta-automakefiles.sh b/generate-alberta-automakefiles.sh index 4346c32..803e4b7 100755 --- a/generate-alberta-automakefiles.sh +++ b/generate-alberta-automakefiles.sh @@ -1,27 +1,22 @@ #!/bin/sh # -# Generate all ALBERTA Makefile.am's form a template. I was just fed -# up with changing 24 different files which looked essentially the +# Generate all ALBERTA Makefile.am's from a template. I was just fed +# up with changing 12 different files which looked essentially the # same. # for DEBUG in 0 1; do - for EL_INDEX in 0 1; do - for DIM in 1 2 3; do - DIM_OF_WORLD=${DIM}; while test ${DIM_OF_WORLD} -le 3; do - if test $EL_INDEX -eq 0; then - LIBCODE=${DIM}${DIM_OF_WORLD}_${DEBUG} - else - LIBCODE=${DIM}${DIM_OF_WORLD}_${DEBUG}1 - fi - if test $DEBUG -eq 0; then - EFLAGS=OPTIMIZE - else - EFLAGS=DEBUG - fi - sed -e "s/%DIM%/$DIM/g" Makefile.am.template -e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" -e "s/%DEBUG%/$DEBUG/g" -e "s/%EL_INDEX%/$EL_INDEX/g" -e "s/%LIBCODE%/$LIBCODE/g" -e "s/%EFLAGS%/$EFLAGS/g" > ALBERTA/src/ALBERTA$LIBCODE/Makefile.am - DIM_OF_WORLD=$(( $DIM_OF_WORLD + 1 )) - done + for EL_INDEX in 0 1; do + for DIM_OF_WORLD in 1 2 3; do + LIBCODE=${DIM_OF_WORLD}_${DEBUG}${EL_INDEX} + + if test $DEBUG -eq 0; then + EFLAGS=OPTIMIZE + else + EFLAGS=DEBUG + fi + + sed -e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" Makefile.am.template -e "s/%DEBUG%/$DEBUG/g" -e "s/%EL_INDEX%/$EL_INDEX/g" -e "s/%LIBCODE%/$LIBCODE/g" -e "s/%EFLAGS%/$EFLAGS/g" > ALBERTA/src/ALBERTA$LIBCODE/Makefile.am + done done - done done diff --git a/m4/alberta-check.m4 b/m4/alberta-check.m4 index 9442965..dd7e2bd 100644 --- a/m4/alberta-check.m4 +++ b/m4/alberta-check.m4 @@ -6,15 +6,14 @@ AC_DEFUN([ALBERTA_OPTIONS], AC_ARG_ENABLE(el_index, [ --enable-el_index use an EL_INDEX enabled version of the ALBERTA libraries (default is off)], -[ELINDEX=1], -ELINDEX=) -EL_INDEX=${ELINDEX:-0} +[EL_INDEX=1], +[EL_INDEX=0]) AC_SUBST([EL_INDEX]) dnl AC_ARG_ENABLE(debug, [ --enable-debug use debug-enabled ALBERTA libraries (default: off)], [ALBERTA_DEBUG=1], -ALBERTA_DEBUG=0) +[ALBERTA_DEBUG=0]) AC_SUBST([ALBERTA_DEBUG]) ]) @@ -44,8 +43,8 @@ ALBERTA_CHECK_PACKAGE(csolver, csolver, $ALBERTA_LIB_PATH, ]) dnl -dnl Check for ALBERTA libraries at given dimensions, taking ELINDEX and DEBUG -dnl into account. $1 is DIM, $2 ist DIM_OF_WORLD +dnl Check for ALBERTA libraries at given dimensions, taking EL_INDEX and DEBUG +dnl into account. $1 is dimension, $2 is DIM_OF_WORLD. dnl AC_DEFUN([ALBERTA_CHECK], [AC_REQUIRE([ALBERTA_TYPE_SIZES]) @@ -95,48 +94,48 @@ AC_REQUIRE([ALBERTA_AUX_CHECK]) dnl dnl Now check for libALBERTA_XXX itself dnl -ALBERTA_LIB_$1$2=ALBERTA$1$2_${ALBERTA_DEBUG}${ELINDEX} -ALBERTA_LIB_$1$2_C=ac_cv_lib_ALBERTA$1$2_${ALBERTA_DEBUG}${ELINDEX} +ALBERTA_LIB_$1=ALBERTA$1_${ALBERTA_DEBUG}${EL_INDEX} +ALBERTA_LIB_$1_C=ac_cv_lib_ALBERTA$1_${ALBERTA_DEBUG}${EL_INDEX} AC_CACHE_CHECK([for additional libraries needed to link], - [ac_cv_libalberta$1$2_gfxlibs], - [ac_cv_libalberta$1$2_gfxlibs=unset + [ac_cv_libalberta$1_gfxlibs], + [ac_cv_libalberta$1_gfxlibs=unset for GFX_LIBS in "" \ "$OpenGL_LIB ${X_LIBS} -lX11" \ "$gltools_LIB $OpenGL_LIB ${X_LIBS} -lX11" \ "$PLOT_LIB $OpenGL_LIB ${X_LIBS} -lX11" \ "$gltools_LIB $PLOT_LIB $OpenGL_LIB ${X_LIBS} -lX11" do - eval "unset ${ALBERTA_LIB_$1$2_C}___main" - AC_CHECK_LIB($ALBERTA_LIB_$1$2, main, - [ac_cv_libalberta$1$2_gfxlibs="$GFX_LIBS" + eval "unset ${ALBERTA_LIB_$1_C}___main" + AC_CHECK_LIB($ALBERTA_LIB_$1, main, + [ac_cv_libalberta$1_gfxlibs="$GFX_LIBS" break],, [$csolver_LIB $GFX_LIBS]) done]) -if test "$ac_cv_libalberta$1$2_gfxlibs" = unset; then - AC_MSG_ERROR([Unable to link a program with lib$ALBERTA_LIB_$1$2!]) +if test "$ac_cv_libalberta$1_gfxlibs" = unset; then + AC_MSG_ERROR([Unable to link a program with lib$ALBERTA_LIB_$1!]) else - ALBERTA_LIBS_$1$2="-L$ALBERTA_LIB_PATH -l$ALBERTA_LIB_$1$2 $csolver_LIB $ac_cv_libalberta$1$2_gfxlibs" + ALBERTA_LIBS_$1="-L$ALBERTA_LIB_PATH -l$ALBERTA_LIB_$1 $csolver_LIB $ac_cv_libalberta$1_gfxlibs" fi -AC_SUBST([ALBERTA_LIBS_$1$2]) +AC_SUBST([ALBERTA_LIBS_$1]) dnl dnl search for alberta.h header dnl AC_CACHE_CHECK( - [whether alberta.h exist and works with DIM=$1 and DIM_OF_WORLD=$2], - [ac_cv_header_alberta$1$2_h], + [whether alberta.h exist and works with DIM_OF_WORLD=$2], + [ac_cv_header_alberta$2_h], [ac_alberta_save_CPPFLAGS="$CPPFLAGS" unset ac_cv_header_alberta_h - CPPFLAGS="-DDIM=$1 -DDIM_OF_WORLD=$2 -DEL_INDEX=${ELINDEX:-0} -I$ALBERTA_INCLUDE_PATH $CPPFLAGS" + CPPFLAGS="-DDIM_OF_WORLD=$2 -DEL_INDEX=${EL_INDEX} -I$ALBERTA_INCLUDE_PATH $CPPFLAGS" AC_CHECK_HEADERS(alberta.h, [unset ac_cv_header_alberta_h - ac_cv_header_alberta$1$2_h=yes], - [ac_cv_header_alberta$1$2_h=no + ac_cv_header_alberta$2_h=yes], + [ac_cv_header_alberta$2_h=no AC_MSG_ERROR([Header file "alberta.h" not found])]) CPPFLAGS="$ac_alberta_save_CPPFLAGS" ]) - if test $ac_cv_header_alberta$1$2_h = yes; then - AC_DEFINE([HAVE_ALBERTA$1$2_H], 1, - [Define if "alberta.h" works with DIM=$1 and DIM_OF_WORLD=$2.]) + if test $ac_cv_header_alberta$2_h = yes; then + AC_DEFINE([HAVE_ALBERTA$2_H], 1, + [Define if "alberta.h" works with DIM_OF_WORLD=$2.]) fi ]) diff --git a/m4/alberta-dims.m4 b/m4/alberta-dims.m4 index bf70476..86b4eea 100644 --- a/m4/alberta-dims.m4 +++ b/m4/alberta-dims.m4 @@ -1,40 +1,23 @@ # -# enable building of $1$2 library (DIM/DIM_OF_WORLD) +# disable building of $1_library (dimension) # # # NOTE: it is a bad idea to remove the unneeded Makefiles from the # config-files, it breaks "make distclean" # -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) -dnl if test "$ALBERTA_$1$2" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_0/Makefile]) -dnl if test "$DEBUG" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_1/Makefile]) -dnl fi -dnl if test "$EL_INDEX" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_01/Makefile]) -dnl fi -dnl if test "$DEBUG" -eq 1 -a "$EL_INDEX" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$2_11/Makefile]) -dnl fi -dnl fi -]) AC_DEFUN([ALBERTA_DIMENSION_DISABLE], -[SIMPLE_ENABLE_FLAG([alberta-$1$1], +[SIMPLE_ENABLE_FLAG([alberta-$1], [disable building of an ALBERTA library for Finite Elements of dimension $1.], 1) dnl if test "$ALBERTA_$1$1" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_0/Makefile]) + AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1_00/Makefile]) dnl if test "$DEBUG" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_1/Makefile]) + AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1_10/Makefile]) dnl fi dnl if test "$EL_INDEX" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_01/Makefile]) + AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1_01/Makefile]) dnl fi dnl if test "$DEBUG" -eq 1 -a "$EL_INDEX" -eq 1; then - AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1$1_11/Makefile]) + AC_CONFIG_FILES([ALBERTA/src/ALBERTA$1_11/Makefile]) dnl fi dnl fi ]) diff --git a/m4/check-alberta-qgl.m4 b/m4/check-alberta-qgl.m4 index 922fd5d..7e07335 100644 --- a/m4/check-alberta-qgl.m4 +++ b/m4/check-alberta-qgl.m4 @@ -8,9 +8,9 @@ AC_DEFUN([ALBERTA_CHECK_QGL], else ALBERTA_CHECK_QT($3) ac_alberta_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="-DDIM=$1 -DDIM_OF_WORLD=$2 -DEL_INDEX=${EL_INDEX} -I$ALBERTA_INCLUDE_PATH $CPPFLAGS" + CPPFLAGS="-DDIM_OF_WORLD=$2 -DEL_INDEX=${EL_INDEX} -I$ALBERTA_INCLUDE_PATH $CPPFLAGS" ALBERTA_CHECK_PACKAGE(alberta-qgl$1$2, alberta-qgl$1$2, $ALBERTA_LIB_PATH, - $ALBERTA_LIBS_$1$2 $Qt_LIB $OpenGL_LIB, + $ALBERTA_LIBS_$1 $Qt_LIB $OpenGL_LIB, alberta-qgl.h, $ALBERTA_INCLUDE_PATH, $3) CPPFLAGS="$ac_alberta_save_CPPFLAGS" fi diff --git a/m4/grapeiface.m4 b/m4/grapeiface.m4 index b679e06..a3cb519 100644 --- a/m4/grapeiface.m4 +++ b/m4/grapeiface.m4 @@ -8,16 +8,15 @@ ALBERTA_CHECK_PACKAGE(grape, gr, , ${OPENGL_LIB} ${X_ALL_LIBS}, grape.h,,, optio AM_CONDITIONAL(GRAPE, test -n "${GRAPE_LIB}") ALBERTA_LIB_PATH=$prefix/lib ALBERTA_INCLUDE_PATH='$(top_srcdir)/ALBERTA/src/Common/ -I$(top_srcdir)/ALBERTA_UTIL' -ALBERTA_LIBS_22='$(top_builddir)/ALBERTA/src/ALBERTA22_0/libALBERTA22_0.la $(top_builddir)/SOLVER/src/libcsolver.la $(top_builddir)/ALBERTA_UTIL/libalberta_util.la $(top_builddir)/PLOT_ANSI/src/libPLOTansi.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' -ALBERTA_LIBS_33='$(top_builddir)/ALBERTA/src/ALBERTA33_0/libALBERTA33_0.la $(top_builddir)/SOLVER/src/libcsolver.la $(top_builddir)/ALBERTA_UTIL/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' +ALBERTA_LIBS_2='$(top_builddir)/ALBERTA/src/ALBERTA2_00/libALBERTA2_00.la $(top_builddir)/SOLVER/src/libcsolver.la $(top_builddir)/ALBERTA_UTIL/libalberta_util.la $(top_builddir)/PLOT_ANSI/src/libPLOTansi.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' +ALBERTA_LIBS_3='$(top_builddir)/ALBERTA/src/ALBERTA3_00/libALBERTA3_00.la $(top_builddir)/SOLVER/src/libcsolver.la $(top_builddir)/ALBERTA_UTIL/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_DEBUG= AC_SUBST(ALBERTA_DEBUG) AC_SUBST(ALBERTA_LIB_PATH) AC_SUBST(ALBERTA_INCLUDE_PATH) -AC_SUBST(ALBERTA_LIBS_22) -AC_SUBST(ALBERTA_LIBS_33) +AC_SUBST(ALBERTA_LIBS_2) +AC_SUBST(ALBERTA_LIBS_3) dnl dnl end of alberta_movi dnl - ]) \ No newline at end of file diff --git a/m4/plotansi.m4 b/m4/plotansi.m4 index ddb5ccc..98603cf 100644 --- a/m4/plotansi.m4 +++ b/m4/plotansi.m4 @@ -82,6 +82,4 @@ if test "$plot_for_all" = true; then AC_CONFIG_FILES([PLOT_ANSI/src/PLOT_for_all.c]) fi # PLOT_for_all - - ]) -- GitLab