Latex Equation Compiler eqc
Brought to you by:
jrheinlaender
dnl Process this file with autoconf to produce a configure script.
dnl EQC version number
m4_define([eqc_major_version], [1])
m4_define([eqc_minor_version], [4])
m4_define([eqc_micro_version], [20])
m4_define([eqc_version], [eqc_major_version.eqc_minor_version.eqc_micro_version])
m4_define([eqc_release], [eqc_major_version.eqc_minor_version])
dnl EQC library version information. It has very little to do with EQC
dnl version number. In particular, library version is OS dependent.
dnl
dnl When making releases, do
dnl 1. Increment eqc_lt_revision
dnl 2. If any interfaces have been added, removed, or changed since the last
dnl release, increment eqc_lt_current and set eqc_lt_revision to 0.
dnl 3. If any interfaces have been added since the last release, increment
dnl eqc_lt_age.
dnl 4. If any interfaces have been removed since the last release, set
dnl eqc_lt_age to 0.
dnl
dnl Please note: the libtool naming scheme cannot guarantee that on all
dnl systems, the numbering is consecutive. It only guarantees that it is
dnl increasing. This doesn't matter, though: there is not incurred cost
dnl for numbers that are omitted, except for shrinking the available space
dnl of leftover numbers. Not something we need to worry about yet. ;-)
m4_define([eqc_lt_current], [5])
m4_define([eqc_lt_age], [0])
m4_define([eqc_lt_revision], [0])
dnl AC_INIT(configure.in)
AC_INIT([eqc], eqc_version)
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR(src/eqc.cpp)
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config/config.h])
AC_CONFIG_MACRO_DIR([m4])
dnl This defines PACKAGE and VERSION.
AM_INIT_AUTOMAKE([gnu 1.8 dist-bzip2])
dnl Process EQC version information
AC_DEFINE([EQCLIB_MAJOR_VERSION], eqc_major_version, [Major version of EQC])
AC_DEFINE([EQCLIB_MINOR_VERSION], eqc_minor_version, [Minor version of EQC])
AC_DEFINE([EQCLIB_MICRO_VERSION], eqc_micro_version, [Micro version of EQC])
dnl EQC 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 EQC library.
ARCHIVE_VERSION=3
ARCHIVE_AGE=3
AC_SUBST(ARCHIVE_VERSION)
AC_SUBST(ARCHIVE_AGE)
AC_DEFINE_UNQUOTED(ARCHIVE_VERSION, $ARCHIVE_VERSION, [Current EQC archive file version number])
AC_DEFINE_UNQUOTED(ARCHIVE_AGE, $ARCHIVE_AGE, [EQC archive file version age])
dnl libtool versioning
LT_VERSION_INFO="eqc_lt_current:eqc_lt_revision:eqc_lt_age"
LT_RELEASE="eqc_release"
AC_SUBST(LT_VERSION_INFO)
AC_SUBST(LT_RELEASE)
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
AM_PROG_LEX
AC_PROG_YACC
dnl Switch to C++11 language mode for the following libraries and headers.
AC_LANG([C++])
AX_CXX_COMPILE_STDCXX_11
dnl Include proper rpath into pkg-config meta data, so
dnl g++ `pkg-config --cflags --libs eqc`
dnl actually works
EQCLIB_LIBS='-L${libdir} -leqc'
AC_LIB_LINKFLAGS_FROM_LIBS([EQCLIB_RPATH], [$EQCLIB_LIBS])
dnl Check for data types which are needed by the hash function
dnl (golden_ratio_hash).
AC_CHECK_TYPE(long long)
dnl Check for data types which are needed by the hash function
dnl (golden_ratio_hash).
dnl AC_CHECK_SIZEOF(long, 4)
dnl AC_CHECK_SIZEOF(long long, 8)
dnl AC_CHECK_SIZEOF(long double, 12)
dnl Check for GiNaC
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([GINAC], [ginac >= 1.7.1])
LIBS="$LIBS $GINAC_LIBS"
CXXFLAGS="$CXXFLAGS $GINAC_CFLAGS"
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, "")
AM_CONDITIONAL(CONFIG_DOXYGEN, [test ! -z "$DOXYGEN"])
AC_PATH_PROG(LATEX, latex, "")
AC_PATH_PROG(PDFLATEX, pdflatex, "")
AC_PATH_PROG(MAKEINDEX, makeindex, "")
AC_PATH_PROG(DVIPS, dvips, "")
AM_CONDITIONAL(CONFIG_TEX, [test ! \( -z "$LATEX" -o -z $"PDFLATEX" -o -z "$MAKEINDEX" -o -z "$DVIPS" \)])
dnl AC_OUTPUT(Makefile src/Makefile docs/Makefile examples/Makefile src/iMath/Makefile)
dnl Output makefiles etc.
AC_CONFIG_FILES([
Makefile
eqc.spec
eqc.pc
src/Makefile
docs/Makefile
examples/Makefile
docs/reference/Makefile
docs/reference/DoxyfileHTML
docs/reference/DoxyfileTEX
docs/reference/DoxyfilePDF
docs/reference/Doxyfooter
])
AC_OUTPUT
dnl Display a final warning if there has been a EQC_ERROR or a EQC_WARNING
dnl EQC_CHECK_ERRORS