configure.in.in 2.19 KB
Newer Older
prudhomm's avatar
prudhomm committed
1
2
# -*- autoconf -*-
# 
prudhomm's avatar
prudhomm committed
3
#
prudhomm's avatar
prudhomm committed
4
AC_INIT(life, 0.1.0pre4, christophe.prudhomme@epfl.ch)
prudhomm's avatar
prudhomm committed
5
LIFE_PACKAGE=life
prudhomm's avatar
prudhomm committed
6
LIFE_VERSION=0.1.0pre4
7
8
9
10

PACKAGE=$LIFE_PACKAGE
VERSION=$LIFE_VERSION

prudhomm's avatar
prudhomm committed
11
12
13
AC_SUBST(LIFE_PACKAGE)
AC_SUBST(LIFE_VERSION)

prudhomm's avatar
prudhomm committed
14
15
16
17
18
19
20
AC_CONFIG_AUX_DIR(admin)

dnl What the current system and host
AC_CANONICAL_HOST
AC_CANONICAL_SYSTEM


prudhomm's avatar
prudhomm committed
21
AM_INIT_AUTOMAKE(${LIFE_PACKAGE}, ${LIFE_VERSION} )
prudhomm's avatar
prudhomm committed
22
23
24
25
26
27
28
29
30
31
32
33
34
AM_CONFIG_HEADER(lifeconfig.h)



# check for a C compiler
AC_PROG_CC( gcc )
AC_PROG_CC_C_O
AC_PROG_CXX( g++ )
AC_PROG_F77( g77 )
AC_PROG_F77_C_O

# check for libtool
AC_PROG_LIBTOOL
prudhomm's avatar
prudhomm committed
35
AC_ARG_WITH([aztec], 
36
 #AS_HELP_STRING([--with-aztec],[tell where aztec resides]),
prudhomm's avatar
prudhomm committed
37
 [--with-aztec=PATH              tell the path where aztec resides],
prudhomm's avatar
prudhomm committed
38
39
40
41
42
43
44
 [
  # AZTEC check
  AC_MSG_CHECKING([Aztec headers files presence])
  ac_aztec_includedirs="$REPOSITORY/$ARCH/include/Aztec_LifeV/ /usr/include /usr/local/include"
  ac_aztec_includedir="$withval/include"
  AC_MSG_RESULT([$ac_aztec_includedir])
  CXXFLAGS="-I$ac_aztec_includedir ${CXXFLAGS}"
prudhomm's avatar
prudhomm committed
45

prudhomm's avatar
prudhomm committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
  AC_MSG_CHECKING([Aztec libraries presence])
  ac_aztec_libdir="$withval/lib"
  LDFLAGS="${LDFLAGS} -L${ac_aztec_libdir}"
  aztec_libs="-laztec"
  AC_SUBST(aztec_libs)
  AC_MSG_RESULT([$aztec_libs])
 ],
 [
  # AZTEC check
  AC_MSG_CHECKING([Aztec headers files presence])
  ac_aztec_includedirs="$REPOSITORY/$ARCH/include/Aztec_LifeV/ /usr/include /usr/local/include"
  AC_FIND_FILE("az_aztec.h",$ac_aztec_includedirs , ac_aztec_includedir)
  AC_MSG_RESULT([$ac_aztec_includedir])
  CXXFLAGS="-I$ac_aztec_includedir ${CXXFLAGS}"

  AC_MSG_CHECKING([Aztec libraries presence])
  ac_aztec_libdirs="$REPOSITORY/$ARCH/lib$AFFIX/Aztec_LifeV/ /usr/lib /usr/local/lib"
  AC_FIND_FILE("libaztec.a", $ac_aztec_libdirs, ac_aztec_libdir)
  # echo $ac_aztec_libdir
  LDFLAGS="${LDFLAGS} -L${ac_aztec_libdir}"
  aztec_libs="-laztec"
  AC_SUBST(aztec_libs)
  AC_MSG_RESULT([$aztec_libs])
 ])
prudhomm's avatar
prudhomm committed
70

prudhomm's avatar
prudhomm committed
71
72
CXXFLAGS="-I/usr/include/blitz ${CXXFLAGS}"
CXXFLAGS="-I\$(top_srcdir)/life/lifecore -I\$(top_srcdir)/life/lifemesh -I\$(top_srcdir)/life/lifefem ${CXXFLAGS}"
prudhomm's avatar
prudhomm committed
73
74
75
76
CXXFLAGS="-DTHREEDIM -Wall ${CXXFLAGS}"

life_libs="\$(top_builddir)/life/lifefem/liblifefem.la \$(top_builddir)/life/lifemesh/liblifemesh.la \$(top_builddir)/life/lifecore/liblifecore.la"
AC_SUBST(life_libs)