configure.in.in 4.64 KB
Newer Older
prudhomm's avatar
prudhomm committed
1
# -*- autoconf -*-
prudhomm's avatar
prudhomm committed
2
#
prudhomm's avatar
prudhomm committed
3
#
simone's avatar
simone committed
4
AC_INIT([lifev], [0.9.0], [lifev-dev@googlegroups.com])
5

prudhomm's avatar
prudhomm committed
6
LIFEV_VERSION_MAJOR=0
simone's avatar
simone committed
7
8
LIFEV_VERSION_MINOR=9
LIFEV_VERSION_MICRO=0
prudhomm's avatar
prudhomm committed
9
LIFEV_VERSION_EXTRA=
prudhomm's avatar
prudhomm committed
10
11
12
13
14
15
16
17
AC_SUBST(LIFEV_VERSION_MAJOR)
AC_SUBST(LIFEV_VERSION_MINOR)
AC_SUBST(LIFEV_VERSION_MICRO)
AC_SUBST(LIFEV_VERSION_EXTRA)
AC_DEFINE_UNQUOTED(LIFEV_VERSION_MAJOR,$LIFEV_VERSION_MAJOR,[major version number])
AC_DEFINE_UNQUOTED(LIFEV_VERSION_MINOR,$LIFEV_VERSION_MINOR,[minor version number])
AC_DEFINE_UNQUOTED(LIFEV_VERSION_MICRO,$LIFEV_VERSION_MICRO,[micro version number])
AC_DEFINE_UNQUOTED(LIFEV_VERSION_EXTRA,$LIFEV_VERSION_EXTRA,[extra version information: date, cvs, ...])
18

19
LIFEV_PACKAGE=lifev
prudhomm's avatar
prudhomm committed
20
LIFEV_VERSION=${LIFEV_VERSION_MAJOR}.${LIFEV_VERSION_MINOR}.${LIFEV_VERSION_MICRO}${LIFEV_VERSION_EXTRA}
21

prudhomm's avatar
prudhomm committed
22
AC_DEFINE_UNQUOTED(LIFEV_VERSION_STRING,["${LIFEV_VERSION_MAJOR}.${LIFEV_VERSION_MINOR}.${LIFEV_VERSION_MICRO} (${LIFEV_VERSION_EXTRA})"],[LifeV version string])
23

prudhomm's avatar
prudhomm committed
24

25
26
27
28
29
PACKAGE=$LIFEV_PACKAGE
VERSION=$LIFEV_VERSION

AC_SUBST(LIFEV_PACKAGE)
AC_SUBST(LIFEV_VERSION)
prudhomm's avatar
prudhomm committed
30

prudhomm's avatar
prudhomm committed
31
32


prudhomm's avatar
prudhomm committed
33
34
35
36
37
38
39
AC_CONFIG_AUX_DIR(admin)

dnl What the current system and host
AC_CANONICAL_HOST
AC_CANONICAL_SYSTEM


prudhomm's avatar
prudhomm committed
40
AM_INIT_AUTOMAKE([foreign 1.7.8])
prudhomm's avatar
prudhomm committed
41
42
AM_CONFIG_HEADER(lifeconfig.h)

prudhomm's avatar
prudhomm committed
43
44
LIFEV_CHECK_COMPILERS

prudhomm's avatar
prudhomm committed
45

simone's avatar
simone committed
46
AC_ENABLE_STATIC
prudhomm's avatar
prudhomm committed
47
48
AC_PROG_LIBTOOL

49
50
51
AC_LANG_SAVE
AC_LANG_CPLUSPLUS

simone's avatar
simone committed
52
53
54
dnl under amd64 size_t, unsigned do not have the same type
dnl AC_CHECK_TYPE(size_t, unsigned)

55
AC_MSG_CHECKING(for size_t == uint)
prudhomm's avatar
prudhomm committed
56
57
58
59
60
AC_TRY_RUN(AC_LANG_PROGRAM([
#include <cstdlib>
],[
return !(sizeof(size_t)==sizeof(uint));
]),
61
62
63
64
65
66
67
68
69
[
   AC_MSG_RESULT(yes)
   size_t_same_as_uint=yes
   AC_DEFINE(LIFEV_SIZET_SAME_AS_UINT, 1, [sizeof(size_t)==sizeof(uint)])
],
[
  AC_MSG_RESULT(no)
  size_t_same_as_uint=no
])
simone's avatar
simone committed
70
71

dnl AC_LANG_RESTORE
72

prudhomm's avatar
prudhomm committed
73
74
75
# pdflatex
AC_CHECK_PROG(PDFLATEX, pdflatex,[pdflatex],[no])

76
77
78
# doxygen
AC_CHECK_PROG(DOXYGEN, doxygen, [doxygen], [no-doxygen] )
AC_CHECK_PROG(LIFE_HAS_DOT, dot, [yes] )
prudhomm's avatar
prudhomm committed
79

prudhomm's avatar
prudhomm committed
80

81
AC_CHECK_BOOST
82
83
AC_CHECK_BOOST_GRAPH
AC_CHECK_BOOST_SIGNALS
prudhomm's avatar
prudhomm committed
84
AC_CHECK_BOOST_REGEX
85
AC_CHECK_BOOST_UNIT_TEST_FRAMEWORK
86

prudhomm's avatar
prudhomm committed
87
AC_CHECK_BOOST_PROGRAM_OPTIONS
prudhomm's avatar
prudhomm committed
88
AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS, test "x$boost_program_options_error" = "xno")
prudhomm's avatar
prudhomm committed
89

90

prudhomm's avatar
prudhomm committed
91
92
dnl
dnl checks for some scientific computing libraries
prudhomm's avatar
prudhomm committed
93
dnl
prudhomm's avatar
prudhomm committed
94
dnl libm
simone's avatar
simone committed
95
AC_CHECK_LIB(m,cos,[LIBS="-lm ${LIBS}"],[ echo "simple math functions not found"; exit 1;])
prudhomm's avatar
prudhomm committed
96
dnl umfpack
97
98
# disable it for not since it is not used yet: need to check for "NO"
# AC_CHECK_UMFPACK(4.3.0) # at least umfpack 4.3
99
100
AM_CONDITIONAL(HAVE_UMFPACK, test "x$umfpack_libs" != "x" )

simone's avatar
simone committed
101
dnl lapack, blas
102
AC_CHECK_LAPACK
simone's avatar
simone committed
103
104
dnl AC_CHECK_UMFPACK
dnl AM_CONDITIONAL(HAVE_UMFPACK, test "x$umfpack_libs" != "x" )
105

simone's avatar
simone committed
106
107
108
dnl hdf5
AC_CHECK_HDF5

simone's avatar
simone committed
109
110
dnl trilinos
AC_CHECK_TRILINOS
prudhomm's avatar
prudhomm committed
111
dnl petsc
prudhomm's avatar
prudhomm committed
112
dnl AC_CHECK_PETSC(2.1.6) #
prudhomm's avatar
prudhomm committed
113
114
AM_CONDITIONAL(HAVE_PETSC, test "x$petsc_libs" != "x" )

prudhomm's avatar
prudhomm committed
115
116
dnl parmetis
AC_CHECK_PARMETIS
prudhomm's avatar
prudhomm committed
117

simone's avatar
simone committed
118
119
120
121
dnl grace, commented since not used any more
dnl AC_CHECK_HEADERS([grace_np.h])
dnl AC_CHECK_LIB([grace_np],GraceClose,[grace_libs="-lgrace_np"],[grace_libs=""])
dnl AC_SUBST(grace_libs)
prudhomm's avatar
prudhomm committed
122

fernandez's avatar
fernandez committed
123
dnl pvm
simone's avatar
simone committed
124
125
dnl AC_CHECK_PVM
dnl AM_CONDITIONAL(HAVE_PVM, test "x$pvm_libs" != "x" )
fernandez's avatar
fernandez committed
126

prudhomm's avatar
prudhomm committed
127

prudhomm's avatar
prudhomm committed
128
129
#all_includes="-I\$(top_srcdir) -I\$(top_srcdir)/life/lifecore -I\$(top_srcdir)/life/lifearray  -I\$(top_srcdir)/life/lifemesh -I\$(top_srcdir)/life/lifealg  -I\$(top_srcdir)/life/lifefem -I\$(top_srcdir)/life/lifesolver -I\$(top_srcdir)/life/lifefilters"
#AC_SUBST(all_includes)
prudhomm's avatar
prudhomm committed
130

simone's avatar
simone committed
131
CPPFLAGS="-I\${top_srcdir} ${CPPFLAGS}"
prudhomm's avatar
prudhomm committed
132

simone's avatar
simone committed
133
life_libs="\${top_builddir}/life/lifefilters/liblifefilters.la \${top_builddir}/life/lifesolver/liblifesolver.la  \${top_builddir}/life/lifefem/liblifefem.la \${top_builddir}/life/lifealg/liblifealg.la \${top_builddir}/life/lifemesh/liblifemesh.la \${top_builddir}/life/lifearray/liblifearray.la \${top_builddir}/life/lifecore/liblifecore.la"
prudhomm's avatar
prudhomm committed
134

lformaggia's avatar
lformaggia committed
135
136
137
#life_libs="\$(top_builddir)/life/lifefilters/liblifefilters.la  \$(top_builddir)/life/lifesolver/liblifesolver.la \$(top_builddir)/life/lifefem/liblifefem.la \$(top_builddir)/life/lifealg/liblifealg.la \$(top_builddir)/life/lifemesh/liblifemesh.la \$(top_builddir)/life/lifearray/liblifearray.la \$(top_builddir)/life/lifecore/liblifecore.la"

#life_libs="\$(top_builddir)/life/lifefilters/liblifefilters.la  \$(top_builddir)/life/lifefem/liblifefem.la \$(top_builddir)/life/lifealg/liblifealg.la \$(top_builddir)/life/lifearray/liblifearray.la \$(top_builddir)/life/lifemesh/liblifemesh.la \$(top_builddir)/life/lifecore/liblifecore.la"
prudhomm's avatar
prudhomm committed
138
139

AC_SUBST(life_libs)
prudhomm's avatar
prudhomm committed
140
LIFEV_LIBS="-llifefilters -llifesolver -llifefem -llifealg -llifemesh -llifearray -llifecore"
prudhomm's avatar
prudhomm committed
141

prudhomm's avatar
prudhomm committed
142

143
144
#
# setting prefix
prudhomm's avatar
prudhomm committed
145
#
146
147
148
149
prefix=${prefix:-"/usr"}
if test "x${prefix}" = "xNONE"; then
    prefix=/usr
fi
prudhomm's avatar
prudhomm committed
150
151
152
153


dnl testdir
AC_CONFIG_TESTDIR(testsuite)
prudhomm's avatar
prudhomm committed
154
155
156

dnl pkgconfig
AX_CREATE_PKGCONFIG_INFO(life.pc,,[${LIFEV_LIBS} $LIBS],[Finite Element Library and more],[$CPPFLAGS $CFLAGS])
157
158