Mercurial > fem-fenics-eugenio
annotate src/configure.ac @ 217:5292e0614efc
New patches submitted from eg123 for the automatization of
the configuration process.
Use of pkg-config to find dolfin and eigen3 includes and libs
* src/Makefile.in: make variables (CPPFLAGS, LDFLAGS, LIBS)
are defined substituting the Autoconf ones
* src/configure.ac: dolfin and eigen3 compile and link flags
are looked for through pkg-config macros
* DESCRIPTION: added pkg-config as a build-dependency
configure fails if dependencies are not met.
author | gedeone-octave <marcovass89@hotmail.it> |
---|---|
date | Mon, 10 Mar 2014 08:58:56 +0000 |
parents | 5b2a3d09f524 |
children | 194f8c66b45a |
rev | line source |
---|---|
5
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
1 AC_PREREQ([2.67]) |
217
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
2 AC_INIT([Fem-fenics Package], [0.0.1]) |
5
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
3 |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
4 AC_USE_SYSTEM_EXTENSIONS |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
5 |
5
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
6 AC_PROG_CXX |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
7 AC_LANG(C++) |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
8 |
217
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
9 PKG_PROG_PKG_CONFIG |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
10 |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
11 # Get Dense include locations |
211
5b2a3d09f524
maint: changing configure.ac option to ---with-eigen-includedir
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
210
diff
changeset
|
12 AC_ARG_WITH([eigen-includedir], |
5b2a3d09f524
maint: changing configure.ac option to ---with-eigen-includedir
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
210
diff
changeset
|
13 [AS_HELP_STRING([--with-eigen-includedir=DIR], |
5b2a3d09f524
maint: changing configure.ac option to ---with-eigen-includedir
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
210
diff
changeset
|
14 [location of the Eigen headers, defaults to /usr/include/])], |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
15 [DENSE_CPPFLAGS="-I$withval"], |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
16 [DENSE_CPPFLAGS='-I/usr/include/']) |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
17 AC_SUBST(DENSE_CPPFLAGS) |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
18 echo $DENSE_CPPFLAGS |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
19 |
217
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
20 ## Check for Eigen |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
21 AC_MSG_CHECKING([for eigen3]) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
22 |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
23 EIGEN_CPPFLAGS= |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
24 EIGEN_LDFLAGS= |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
25 EIGEN_LIBS= |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
26 |
217
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
27 PKG_CHECK_EXISTS([eigen3], |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
28 [EIGEN_CPPFLAGS=`$PKG_CONFIG --cflags-only-I eigen3` |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
29 EIGEN_LDFLAGS=`$PKG_CONFIG --libs-only-L eigen3` |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
30 EIGEN_LIBS=`$PKG_CONFIG --libs-only-l eigen3` |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
31 AC_MSG_RESULT([yes])], |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
32 [AC_MSG_RESULT([no]) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
33 AC_MSG_ERROR([eigen3 required to install $PACKAGE_NAME])] |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
34 ) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
35 |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
36 AC_SUBST(EIGEN_CPPFLAGS) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
37 AC_SUBST(EIGEN_LDFLAGS) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
38 AC_SUBST(EIGEN_LIBS) |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
39 |
217
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
40 ## Check for dolfin |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
41 AC_MSG_CHECKING([for dolfin]) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
42 |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
43 DOLFIN_CPPFLAGS= |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
44 DOLFIN_LDFLAGS= |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
45 DOLFIN_LIBS= |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
46 |
217
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
47 PKG_CHECK_EXISTS([dolfin], |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
48 [DOLFIN_CPPFLAGS=`$PKG_CONFIG --cflags-only-I dolfin` |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
49 DOLFIN_LDFLAGS=`$PKG_CONFIG --libs-only-L dolfin` |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
50 DOLFIN_LIBS=`$PKG_CONFIG --libs-only-l dolfin` |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
51 AC_MSG_RESULT([yes])], |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
52 [AC_MSG_RESULT([no]) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
53 AC_MSG_ERROR([dolfin required to install $PACKAGE_NAME])] |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
54 ) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
55 |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
56 AC_SUBST(DOLFIN_CPPFLAGS) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
57 AC_SUBST(DOLFIN_LDFLAGS) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
58 AC_SUBST(DOLFIN_LIBS) |
5292e0614efc
New patches submitted from eg123 for the automatization of
gedeone-octave <marcovass89@hotmail.it>
parents:
211
diff
changeset
|
59 |
210
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
60 |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
61 AC_CHECK_PROG([HAVE_FFC], [ffc], [yes], [no]) |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
62 if [test $HAVE_FFC = "no"]; then |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
63 AC_MSG_ERROR([ffc required to install $PACKAGE_NAME]) |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
64 fi |
b9999ff4fe5e
maint: configure.ac accpets includedir for Dense.
Juan Pablo Carbajal <ajuanpi+dev@gmail.com>
parents:
27
diff
changeset
|
65 |
5
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
66 AC_CHECK_PROG([HAVE_MKOCTFILE], [mkoctfile], [yes], [no]) |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
67 if [test $HAVE_MKOCTFILE = "no"]; then |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
68 AC_MSG_ERROR([mkoctfile required to install $PACKAGE_NAME]) |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
69 fi |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
70 |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
71 AC_CONFIG_FILES([Makefile]) |
e74ff416fd54
File for the configuration and compilation of the pkg
gedeone-octave <marco.vassallo@outlook.com>
parents:
diff
changeset
|
72 AC_OUTPUT |