]> www.ginac.de Git - ginac.git/blob - configure.in
Included more classes.
[ginac.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(ginac/basic.cpp)
4 AC_PREREQ(2.12)
5
6 dnl GiNaC version information
7 dnl
8 dnl Making releases:
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.
15 dnl
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?)...
19
20 GINACLIB_MAJOR_VERSION=0
21 GINACLIB_MINOR_VERSION=4
22 GINACLIB_MICRO_VERSION=0
23 GINACLIB_INTERFACE_AGE=0
24 GINACLIB_BINARY_AGE=0
25 GINACLIB_VERSION=$GINACLIB_MAJOR_VERSION.$GINACLIB_MINOR_VERSION.$GINACLIB_MICRO_VERSION
26
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)
33
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`
39
40 AC_SUBST(LT_RELEASE)
41 AC_SUBST(LT_CURRENT)
42 AC_SUBST(LT_REVISION)
43 AC_SUBST(LT_AGE)
44
45 dnl This defines PACKAGE and VERSION
46 AM_CONFIG_HEADER(config.h)
47 AM_INIT_AUTOMAKE([GiNaC], $GINACLIB_VERSION)
48 AM_MAINTAINER_MODE
49
50 dnl ===========================================================================
51 dnl Check for the compiler and all the utilities needed for the build:
52 dnl ===========================================================================
53 AC_PROG_CXX
54 AC_PROG_CXXCPP
55 AM_PROG_INSTALL
56 AM_PROG_LIBTOOL
57 AM_PROG_LEX
58 AC_PROG_YACC
59
60 dnl Switch to C++ language mode for the following libraries and headers:
61 AC_LANG_CPLUSPLUS
62
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
65 dnl the Makefile:
66 AC_CHECK_LIB(stdc++, cout)
67
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))
73
74 dnl We need to have Bruno Haible's CLN installed (macros are in aclocal.m4):
75 GINAC_CHECK_CLN_H
76 GINAC_CHECK_LIBCLN
77
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)
83
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, "")
94
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\"."