configure.ac 2.38 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
  AC_SUBST(CXX, $mpidir/bin/mpiCC)
  AC_SUBST(CC, $mpidir/bin/mpicc)
fi

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)

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)

75
76
77
78
79
80
81
82
83
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)

84
85
86
87
88
89
90
91
92
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_CONFIG_FILES([
	Makefile
	lib/Makefile
	bin/Makefile
	])
AC_OUTPUT