configure.ac 3.69 KB
Newer Older
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
AC_INIT()
AM_INIT_AUTOMAKE(AMDiS, 0.1)
AM_MAINTAINER_MODE

#AC_DISABLE_SHARED

AC_ARG_ENABLE(debug,
  [  --enable-debug    Turn on debugging],
  [case "${enableval}" in
    yes) debug=true ;;
    no)  debug=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
  esac],[debug=false])
AM_CONDITIONAL(AMDIS_DEBUG, test $debug = true)

AC_ARG_ENABLE(intel,
  [  --enable-intel    Turn on support for the Intel compiler],
  [case "${enableval}" in
    yes) intel=true ;;
    no)  intel=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-intel) ;;
  esac],[intel=false])
if test $intel = true 
then
  AC_SUBST(CXX, icpc)
  AC_SUBST(CC, icc)
fi
AM_CONDITIONAL(AMDIS_INTEL, test $intel = true)

AC_ARG_ENABLE(openmp,
  [  --enable-openmp    Turn on support for the Intel compiler],
  [case "${enableval}" in
    yes) openmp=true ;;
    no)  openmp=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-openmp) ;;
  esac],[openmp=false])
AM_CONDITIONAL(AMDIS_OPENMP, test $openmp = true)

if test $openmp = true ; then
  if test $intel = true ; then
    AC_SUBST(OPENMP_FLAG, -openmp)
  else
    AC_SUBST(OPENMP_FLAG, -fopenmp)
  fi
else
  OPENMP_FLAG=
  AC_SUBST(OPENMP_FLAG, )
fi

AC_ARG_WITH(mpi, [  --with-mpi=MPI_DIR], mpidir=$withval, mpidir=no)
AC_SUBST(MPI_DIR, $mpidir)
if test $mpidir != no ; then
53
  AC_SUBST(CXX, $mpidir/bin/mpicxx)
54
55
56
  AC_SUBST(CC, $mpidir/bin/mpicc)
fi

57
58
59
60
61
62
63
64
65
66
67
68
AC_ARG_ENABLE(marmot,
  [  --enable-marmot    Use marmot compiler for mpi debugging.],
  [case "${enableval}" in
    yes) marmot=true ;;
    no)  marmot=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-marmot) ;;
  esac],[marmot=false])
if test $marmot != false ; then
  AC_SUBST(CXX, marmotcxx)
  AC_SUBST(CC, marmotcc)
fi

69
70
71
AC_ARG_WITH(petsc, [  --with-petsc=PETSC_DIR], petscdir=$withval, petscdir=no)
AC_SUBST(PETSC_DIR, $petscdir)

72
73
74
75
76
77
78
79
80
AC_ARG_ENABLE(parmetis,
  [  --enable-parmetis   Compile with the ParMetis library],
  [case "${enableval}" in
    yes) parmetis=true ;;
    no)  parmetis=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-parmetis) ;;
  esac],[parmetis=false])
AM_CONDITIONAL(USE_PARALLEL_AMDIS, test $parmetis = true)

81
AC_ARG_ENABLE(parallel-domain,
82
83
84
85
86
87
88
  [  --enable-parallel-domain  Parallelization with classical domain decomposition],
  [case "${enableval}" in
    yes) paralleldomain=true ;;
    no)  paralleldomain=false ;;
    *) AC_MSG_ERROR(bad value${enableval} for --enable-parallel-domain) ;;
  esac],[paralleldomain=false])
AM_CONDITIONAL(USE_PARALLEL_DOMAIN_AMDIS, test $paralleldomain = true)
89
AM_CONDITIONAL(ENABLE_ZOLTAN, test $paralleldomain = true)
90

91
92
93
94
95
96
97
98
99
AC_ARG_ENABLE(umfpack,
  [  --enable-umfpack  Compile with the UMFPACK direct solver library],
  [case "${enableval}" in
    yes) umfpack=true ;;
    no)  umfpack=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-umfpack) ;;
  esac],[umfpack=false])
AM_CONDITIONAL(ENABLE_UMFPACK, test $umfpack = true)

100
101
102
103
104
105
106
107
108
AC_ARG_ENABLE(mkl,
  [  --enable-mkl  Compile with the Intel MKL library],
  [case "${enableval}" in
    yes) mkl=true ;;
    no)  mkl=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-mkl) ;;
  esac],[mkl=false])
AM_CONDITIONAL(ENABLE_MKL, test $mkl = true)

109
110
111
112
AC_ARG_WITH(dune, [  --with-dune=DUNE_DIR], dunedir=$withval, dunedir=no)
AC_SUBST(DUNE_DIR, $dunedir)
AM_CONDITIONAL(ENABLE_DUNE, test $dunedir != no)

113
114
115
116
117
118
119
120
121
122
AC_ARG_ENABLE(boost,
  [  --enable-boost  Compile with the Boost library],
  [case "${enableval}" in
    yes) boost=true ;;
    no)  boost=false ;;
    *) AC_MSG_ERROR(bad value ${enableval} for --enable-boost) ;;
  esac],[boost=false])
AM_CONDITIONAL(ENABLE_BOOST, test $boost = true)
	

123
124
125
126
127
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_CONFIG_FILES([
	Makefile
Thomas Witkowski's avatar
Thomas Witkowski committed
128
	src/Makefile
129
130
	lib/Makefile
	])
131
AC_OUTPUT