Skip to content
Snippets Groups Projects
configure.ac 3.63 KiB
Newer Older
  • Learn to ignore specific revisions
  • 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(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
    
    
    AC_ARG_WITH(petsc, [  --with-petsc=PETSC_DIR], petscdir=$withval, petscdir=no)
    AC_SUBST(PETSC_DIR, $petscdir)
    
    
    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(parallel-domain,
    
      [  --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)
    
    
    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)
    
    
    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)
    
    
    AC_ARG_WITH(dune, [  --with-dune=DUNE_DIR], dunedir=$withval, dunedir=no)
    AC_SUBST(DUNE_DIR, $dunedir)
    AM_CONDITIONAL(ENABLE_DUNE, test $dunedir != no)
    
    
    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)
    	
    
    
    AC_PROG_CC
    AC_PROG_CXX
    AC_PROG_LIBTOOL
    AC_CONFIG_FILES([
    	Makefile
    	lib/Makefile
    	bin/Makefile
    	])