]> www.ginac.de Git - ginac.git/blob - configure.in
a846c91e0fe1974d6ecbbf08fefb2968a8574219
[ginac.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(ginac/basic.cpp)
4 AM_CONFIG_HEADER(config.h)
5 AC_PREREQ(2.12)
6
7 dnl This defines PACKAGE and VERSION
8 AM_INIT_AUTOMAKE([GiNaC], [0.4])
9 AM_MAINTAINER_MODE
10
11 dnl ===========================================================================
12 dnl Check for the compiler and all the utilities needed for the build:
13 dnl ===========================================================================
14 AC_PROG_CXX
15 AC_PROG_CXXCPP
16 AM_PROG_INSTALL
17 AM_PROG_LIBTOOL
18 AM_PROG_LEX
19 AC_PROG_YACC
20
21 dnl Switch to C++ language mode for the following libraries and headers:
22 AC_LANG_CPLUSPLUS
23
24 dnl Make sure the following libraries work by testing for symbols therein. 
25 dnl They are automatically added the the variable $LIBS and thus passed into
26 dnl the Makefile:
27 AC_CHECK_LIB(stdc++, cout)
28
29 dnl Make sure all the necessary new-style headers are installed on the system.
30 dnl If one of them cannot be found the system is probably not ANSI-conform
31 dnl enough so trying the .h-style headers is a waste of time.
32 AC_CHECK_HEADERS(iostream vector map string list typeinfo iterator strstream stdexcept algorithm, ,
33     AC_MSG_ERROR(need to have ANSI compliant headers))
34
35 dnl We need to have Bruno Haible's CLN installed (macros are in aclocal.m4):
36 GINAC_CHECK_CLN_H
37 GINAC_CHECK_LIBCLN
38
39 dnl Check for stuff needed for building the GiNaC interactive shell (ginsh):
40 AC_CHECK_HEADERS(unistd.h)
41 AC_REPLACE_FUNCS(strdup)
42 AC_CHECK_HEADERS(readline/readline.h readline/history.h)
43 AC_CHECK_LIB(readline, readline)
44
45 dnl Check for utilities needed by the different kinds of documentation.
46 dnl Documantation needs only be built when extending it, so never mind if it
47 dnl cannot find those helpers:
48 AC_PATH_PROG(DOXYGEN, doxygen, "")
49 AC_PATH_PROG(LATEX, latex, "")
50 AC_PATH_PROG(MAKEINDEX, makeindex, "")
51 AC_PATH_PROG(DVIPS, dvips, "")
52 AC_PATH_PROG(FIG2DEV, fig2dev, "")
53 AC_PATH_PROG(JADE, jade, "")
54 AC_PATH_PROG(JADETEX, jadetex, "")
55
56 dnl ===========================================================================
57 dnl Produce a Makefile from Makefile.in:
58 dnl ===========================================================================
59 AC_OUTPUT([Makefile ginac/Makefile check/Makefile ginsh/Makefile doc/Makefile])
60 echo "Configuration done. Now type \"make\"."