-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
79 lines (65 loc) · 2.02 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# configure.ac for VFGEN (https://github.com/WarrenWeckesser/vfgen)
# Copyright (c) 2008-2022 Warren Weckesser
#
# Process this file with autoconf to produce a configure script.
#
AC_PREREQ(2.59)
AC_INIT([vfgen], m4_esyscmd_s(cat version.txt), [warren DOT weckesser AT gmail])
AC_MSG_NOTICE([[
------------------------------------
VFGEN Configure Script
------------------------------------
Basic environment check...
------------------------------------]])
AM_INIT_AUTOMAKE([foreign 1.8])
AC_MSG_NOTICE([[
------------------------------------
Checking your C++ compiler...
------------------------------------]])
AC_PROG_CXX
AC_LANG(C++)
AC_MSG_NOTICE([[
------------------------------------
Checking for MXML and GINAC libs...
------------------------------------]])
#
# Check for pkg-config first
#
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
dnl Give error and exit if we don't have pkgconfig
if test "x$HAVE_PKGCONFIG" = "xno"; then
AC_MSG_ERROR(dnl
[The pkg-config script could not be found. Make sure it is
in your path, or set the PKG_CONFIG environment variable
to the full path to pkg-config.
Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.])
fi
#
# Check for ginac and mxml (Mini-XML)
#
PKG_CHECK_MODULES([MXML], [mxml], HAVE_MXML=yes,HAVE_MXML=no)
if test "x$HAVE_MXML" = "xno"; then
AC_MSG_ERROR(dnl
[The Mini-XML (http://www.minixml.org) library was not found.])
fi
PKG_CHECK_MODULES([GINAC], [ginac], HAVE_GINAC=yes,HAVE_GINAC=no)
if test "x$HAVE_GINAC" = "xno"; then
AC_MSG_ERROR(dnl
[The GiNaC (http://www.ginac.de) library was not found.])
fi
# If the MXML and GINAC CFLAGS options are the same, we don't need both...
if test "$GINAC_CFLAGS" = "$MXML_CFLAGS"; then
MXML_CFLAGS=""
fi
AC_MSG_NOTICE([[
------------------------------------
Creating the Makefile...
------------------------------------]])
AC_OUTPUT(Makefile src/Makefile)
AC_MSG_NOTICE([[
------------------------------------
Now run
$ make
$ make install
to compile and install VFGEN
------------------------------------]])