1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(ginac/basic.cpp)
6 dnl GiNaC version information
9 dnl GINACLIB_MICRO_VERSION += 1;
10 dnl GINACLIB_INTERFACE_AGE += 1;
11 dnl GINACLIB_BINARY_AGE += 1;
12 dnl if any functions have been added, set GINACLIB_INTERFACE_AGE to 0.
13 dnl if backwards compatibility has been broken,
14 dnl set GINACLIB_BINARY_AGE and GINACLIB_INTERFACE_AGE to 0.
16 dnl NOTE: these can't be renamed to GINAC_MAJOR_VERSION etc. because
17 dnl autoconf sees "AC_MAJOR_VERSION" and complains about an undefined macro
18 dnl (don't we all *love* autoconf?)...
20 GINACLIB_MAJOR_VERSION=0
21 GINACLIB_MINOR_VERSION=4
22 GINACLIB_MICRO_VERSION=0
23 GINACLIB_INTERFACE_AGE=0
25 GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
27 AC_SUBST(GINACLIB_MAJOR_VERSION)
28 AC_SUBST(GINACLIB_MINOR_VERSION)
29 AC_SUBST(GINACLIB_MICRO_VERSION)
30 AC_SUBST(GINACLIB_INTERFACE_AGE)
31 AC_SUBST(GINACLIB_BINARY_AGE)
32 AC_SUBST(GINACLIB_VERSION)
34 dnl libtool versioning
35 LT_RELEASE=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION
36 LT_CURRENT=`expr $GINACLIB_MICRO_VERSION - $GINACLIB_INTERFACE_AGE`
37 LT_REVISION=$GINACLIB_INTERFACE_AGE
38 LT_AGE=`expr $GINACLIB_BINARY_AGE - $GINACLIB_INTERFACE_AGE`
45 dnl This defines PACKAGE and VERSION
46 AM_CONFIG_HEADER(config.h)
47 AM_INIT_AUTOMAKE([GiNaC], $GINACLIB_VERSION)
50 dnl ===========================================================================
51 dnl Check for the compiler and all the utilities needed for the build:
52 dnl ===========================================================================
60 dnl Switch to C++ language mode for the following libraries and headers:
63 dnl Make sure the following libraries work by testing for symbols therein.
64 dnl They are automatically added the the variable $LIBS and thus passed into
66 AC_CHECK_LIB(stdc++, cout)
68 dnl Make sure all the necessary new-style headers are installed on the system.
69 dnl If one of them cannot be found the system is probably not ANSI-conform
70 dnl enough so trying the .h-style headers is a waste of time.
71 AC_CHECK_HEADERS(iostream vector map string list typeinfo iterator strstream stdexcept algorithm, ,
72 AC_MSG_ERROR(need to have ANSI compliant headers))
74 dnl We need to have Bruno Haible's CLN installed (macros are in aclocal.m4):
78 dnl Check for stuff needed for building the GiNaC interactive shell (ginsh):
79 AC_CHECK_HEADERS(unistd.h)
80 AC_REPLACE_FUNCS(strdup)
81 AC_CHECK_HEADERS(readline/readline.h readline/history.h)
82 AC_CHECK_LIB(readline, readline)
84 dnl Check for utilities needed by the different kinds of documentation.
85 dnl Documantation needs only be built when extending it, so never mind if it
86 dnl cannot find those helpers:
87 AC_PATH_PROG(DOXYGEN, doxygen, "")
88 AC_PATH_PROG(LATEX, latex, "")
89 AC_PATH_PROG(MAKEINDEX, makeindex, "")
90 AC_PATH_PROG(DVIPS, dvips, "")
91 AC_PATH_PROG(FIG2DEV, fig2dev, "")
92 AC_PATH_PROG(JADE, jade, "")
93 AC_PATH_PROG(JADETEX, jadetex, "")
95 dnl ===========================================================================
96 dnl Produce a Makefile from Makefile.in:
97 dnl ===========================================================================
98 AC_OUTPUT([Makefile ginac/Makefile check/Makefile ginsh/Makefile doc/Makefile])
99 echo "Configuration done. Now type \"make\"."