← Back to team overview

syfi team mailing list archive

Re: syfi and swiginac 1.0

 

Here are the relevant files:
acinclude.m4
configure.ac

They will break the old ginac-config installations. I also have modified
versions of ex.i and typemaps.i. Tell me if you want them.

Ola

Kent-Andre Mardal skrev den 11/12-2007 følgende:
> I'll have a look, but probably not before tonight. 
> 
> Kent
> 
> 
> tir, 11.12.2007 kl. 08.16 +0100, skrev Ola Skavhaug:
> > Hi list,
> > 
> > I have tried to compile syfi using ginac 1.4.1 and corresponding swiginac. It
> > did not work, which autoconf correctly reported. I proceed anyway, using the
> > new swiginac interface files for ex.i and typemaps.i.  I also used
> > --with-ginac-prefix=/my/ginac/prefix, but since it was not used during
> > compilation, I have no way of telling if my fixes are correct.
> > 
> > I can always roll back to an old ginac version, but I would prefer to have
> > syfi running with ginac 1.4. Am I missing something with the
> > --with-ginac-prefix, or is that option not used when configure give a
> > warning about the ginac version?
> > 
> > Ola
> > 
> > _______________________________________________
> > SyFi-dev mailing list
> > SyFi-dev@xxxxxxxxxx
> > http://fenics.org/mailman/listinfo/syfi-dev
> 
> _______________________________________________
> SyFi-dev mailing list
> SyFi-dev@xxxxxxxxxx
> http://fenics.org/mailman/listinfo/syfi-dev
dnl ===========================================================================
dnl Additional macros used to configure SyFi.  We don't start our own 
dnl additions' names with AC_ but with SYFI_ in order to steer clear of
dnl future trouble.
dnl ===========================================================================


dnl Usage: SYFI_ERROR(message)
dnl This macro displays the warning "message" and sets the flag syfi_error
dnl to yes.
AC_DEFUN([SYFI_ERROR],[
syfi_error_txt="$syfi_error_txt
** $1
"
syfi_error=yes])

dnl Usage: SYFI_WARNING(message)
dnl This macro displays the warning "message" and sets the flag syfi_warning
dnl to yes.
AC_DEFUN([SYFI_WARNING],[
syfi_warning_txt="$syfi_warning_txt
== $1
"
syfi_warning=yes])

dnl Usage: SYFI_CHECK_ERRORS
dnl (must be put at end of configure.in, because it exits on error)
dnl This macro displays a warning message if SYFI_ERROR or SYFI_WARNING 
dnl has occured previously.
AC_DEFUN([SYFI_CHECK_ERRORS],[
if test "x${syfi_error}" = "xyes"; then
    echo "**** The following problems have been detected by configure."
    echo "**** Please check the messages below before running \"make\"."
    echo "**** (see the section 'Common Problems' in the INSTALL file)"
    echo "$syfi_error_txt"
    if test "x${syfi_warning_txt}" != "x"; then
        echo "${syfi_warning_txt}"
    fi
    if test "x$cache_file" != "x/dev/null"; then
        echo "deleting cache ${cache_file}"
        rm -f $cache_file
    fi
    exit 1
else 
    if test "x${syfi_warning}" = "xyes"; then
        echo "=== The following minor problems have been detected by configure."
        echo "=== Please check the messages below before running \"make\"."
        echo "=== (see the section 'Common Problems' in the INSTALL file)"
        echo "$syfi_warning_txt"
    fi
    echo "Configuration of SyFi $VERSION done. Now type \"make\"."
fi])



dnl Process this file with autoconf to produce a configure script.

AC_INIT
AC_PREREQ(2.50)

dnl SyFi library version information.
dnl
dnl Making releases:
dnl   SYFILIB_MICRO_VERSION += 1;
dnl   SYFILIB_INTERFACE_AGE += 1;
dnl   SYFILIB_BINARY_AGE += 1;
dnl if any functions have been added, set SYFILIB_INTERFACE_AGE to 0.
dnl if backwards compatibility has been broken,
dnl set SYFILIB_BINARY_AGE and SYFILIB_INTERFACE_AGE to 0.
dnl
dnl NOTE: these can't be renamed to SYFI_MAJOR_VERSION etc. because
dnl autoconf sees "AC_MAJOR_VERSION" and complains about an undefined macro
dnl (don't we all *love* M4?)...

SYFILIB_MAJOR_VERSION=0
SYFILIB_MINOR_VERSION=4
SYFILIB_MICRO_VERSION=0
SYFILIB_INTERFACE_AGE=0
SYFILIB_BINARY_AGE=0
SYFILIB_VERSION=$SYFILIB_MAJOR_VERSION.$SYFILIB_MINOR_VERSION.$SYFILIB_MICRO_VERSION

AC_SUBST(SYFILIB_MAJOR_VERSION)
AC_SUBST(SYFILIB_MINOR_VERSION)
AC_SUBST(SYFILIB_MICRO_VERSION)
AC_SUBST(SYFILIB_INTERFACE_AGE)
AC_SUBST(SYFILIB_BINARY_AGE)
AC_SUBST(SYFILIB_VERSION)

dnl SyFi archive file version information.
dnl
dnl If properties have been added, ARCHIVE_VERSION += 1, ARCHIVE_AGE += 1.
dnl If backwards compatibility has been broken, set ARCHIVE_AGE to 0.
dnl
dnl The version number in newly created archives will be ARCHIVE_VERSION.
dnl Archives version (ARCHIVE_VERSION-ARCHIVE_AGE) thru ARCHIVE_VERSION can
dnl be read by this version of the SyFi library.

ARCHIVE_VERSION=2
ARCHIVE_AGE=2

AC_SUBST(ARCHIVE_VERSION)
AC_SUBST(ARCHIVE_AGE)
AC_DEFINE_UNQUOTED(ARCHIVE_VERSION, $ARCHIVE_VERSION, [Current SyFi archive file version number])
AC_DEFINE_UNQUOTED(ARCHIVE_AGE, $ARCHIVE_AGE, [SyFi archive file version age])

dnl libtool versioning
LT_RELEASE=$SYFILIB_MAJOR_VERSION.$SYFILIB_MINOR_VERSION
LT_CURRENT=`expr $SYFILIB_MICRO_VERSION - $SYFILIB_INTERFACE_AGE`
LT_REVISION=$SYFILIB_INTERFACE_AGE
LT_AGE=`expr $SYFILIB_BINARY_AGE - $SYFILIB_INTERFACE_AGE`

AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

dnl This defines PACKAGE and VERSION.
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([SyFi], $SYFILIB_VERSION)

dnl Check for the compiler and all the utilities needed for the build.
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_INSTALL
AM_PROG_LIBTOOL

dnl Check for data types which are needed by the hash function 
dnl (golden_ratio_hash).
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_SIZEOF(long double, 12)

dnl Switch to C++ language mode for the following libraries and headers.
AC_LANG([C++])

dnl Make sure all the necessary standard headers are installed on the system.
AC_CHECK_HEADER(iosfwd, , SYFI_ERROR([The standard <iosfwd> header file could not be found.]))
AC_CHECK_HEADER(iostream, , SYFI_ERROR([The standard <iostream> header file could not be found.]))
AC_CHECK_HEADER(vector, , SYFI_ERROR([The standard <vector> header file could not be found.]))
AC_CHECK_HEADER(list, , SYFI_ERROR([The standard <list> header file could not be found.]))
AC_CHECK_HEADER(map, , SYFI_ERROR([The standard <map> header file could not be found.]))
AC_CHECK_HEADER(string, , SYFI_ERROR([The standard <string> header file could not be found.]))
AC_CHECK_HEADER(sstream, , SYFI_ERROR([The standard <sstream> header file could not be found.]))
AC_CHECK_HEADER(typeinfo, , SYFI_ERROR([The standard <typeinfo> header file could not be found.]))
AC_CHECK_HEADER(stdexcept, , SYFI_ERROR([The standard <stdexcept> header file could not be found.]))
AC_CHECK_HEADER(algorithm, , SYFI_ERROR([The standard <algorithm> header file could not be found.]))
AC_CHECK_HEADER(limits, , SYFI_ERROR([The standard <limits> header file could not be found.]))

dnl ----------------------------------------
dnl GiNaC
dnl this defines GINACLIB_CPPFLAGS and GINACLIBS_LIBS
dnl AM_PATH_GINAC(1.3.7)
PKG_CHECK_MODULES(GINAC, ginac >= 1.4.0)
LIBS="$LIBS $GINAC_LIBS"
CPPFLAGS="$CPPFLAGS $GINAC_CFLAGS"

dnl Expand the cppflags and libraries needed by apps using SyFi
SYFILIB_CPPFLAGS="$CPPFLAGS" 
SYFILIB_LIBS="$LIBS"

CPPFLAGS=$SYFILIB_CPPFLAGS
LIBS=$SYFILIB_LIBS
 
 
AC_SUBST(SYFILIB_CPPFLAGS)
AC_SUBST(SYFILIB_LIBS)

dnl Check for utilities needed by the different kinds of documentation.
dnl Documentation needs only be built when extending it, so never mind if it
dnl cannot find those helpers:
AC_PATH_PROG(DOXYGEN, doxygen, "")
AC_PATH_PROG(LATEX, latex, "")
AC_PATH_PROG(PDFLATEX, pdflatex, "")
AC_PATH_PROG(MAKEINDEX, makeindex, "")
AC_PATH_PROG(DVIPS, dvips, "")
AC_PATH_PROG(FIG2DEV, fig2dev, "")

dnl Output makefiles etc.
AC_CONFIG_FILES([
Makefile
SyFi.spec
syfi-config
syfi.pc
syfi/Makefile
syfi/syfi_version.h
doc/Makefile
doc/reference/Makefile
doc/maketarball.sh
doc/manual/Makefile
doc/para06/Makefile
doc/para06/proceeding/Makefile
tests/Makefile
python/Makefile
python/setup.py 
])
AC_CONFIG_COMMANDS([default],[[chmod +x syfi-config]],[[]])
AC_OUTPUT
dnl Display a final warning if there has been a SYFI_ERROR or a SYFI_WARNING
SYFI_CHECK_ERRORS


echo ""
echo ""
echo "Configuration of SyFi complete." 
echo "Type: "
echo "   make "
echo "   make install"
echo ""
echo "To install SyFi on your system."
echo ""



Follow ups

References