Commit 8b209b47 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl

Add an example project that uses ELPA as a library

With this, the pkg-config installation can be verified
parent 613620c7
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
AM_FCFLAGS = @FC_MODINC@modules @FC_MODOUT@modules $(ELPA_FCFLAGS)
AM_LDFLAGS = $(ELPA_LIBS)
#bindir = $(abs_top_builddir)
bin_PROGRAMS = test_real
test_real_SOURCES = src/test_real.F90
../autogen.sh
\ No newline at end of file
AC_PREREQ([2.69])
AC_INIT([elpa_test_project],[2014.06.000], elpa-library@rzg.mpg.de)
AC_CONFIG_SRCDIR([src/test_real.F90])
AM_INIT_AUTOMAKE([foreign -Wall subdir-objects])
# Without this, automake tries to be smart and rebuilt
# the autoconf generated files such as configure, aclocal.m4, etc.,
# in case the timestamps of files such as configure.ac are newer
#
# This only makes trouble for end users with out-of-date autoconf versions
# that cannot produce these files
AM_MAINTAINER_MODE([disable])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
rm -rf config.h config-f90.h
AX_CHECK_GNU_MAKE()
if test x$_cv_gnu_make_command = x ; then
AC_MSG_ERROR([Need GNU Make])
fi
AC_CHECK_PROG(CPP_FOUND,cpp,yes,no)
if test x"${CPP_FOUND}" = xno; then
AC_MSG_ERROR([no cpp found])
fi
# gnu-make fortran module dependencies
m4_include([fdep/fortran_dependencies.m4])
FDEP_F90_GNU_MAKE_DEPS
AC_PROG_INSTALL
AM_PROG_CC_C_O
AM_PROG_AR
AM_PROG_AS
# Here comes the ELPA specific part
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([ELPA],[elpa-2014.06.000],[],[AC_MSG_ERROR(["Need elpa-2014.06.000"])])
PKG_CHECK_VAR([ELPA_FCFLAGS],[elpa-2014.06.000],[fcflags])
AC_LANG([Fortran])
m4_include([m4/ax_prog_fc_mpi.m4])
dnl check whether an mpi compiler is available;
dnl if not abort since it is mandatory
AX_PROG_FC_MPI([],[have_mpi=yes],[have_mpi=no
if test x"${have_mpi}" = xno; then
AC_MSG_ERROR([no mpi found])
fi])
AC_FC_FREEFORM
AC_FC_MODULE_FLAG
AC_FC_MODULE_OUTPUT_FLAG
AC_MSG_CHECKING(whether OpenMP usage is specified)
AC_ARG_WITH([openmp],
AS_HELP_STRING([--with-openmp],
[use OpenMP threading, default no.]),
[with_openmp=yes],
[with_openmp=no])
AC_MSG_RESULT([${with_openmp}])
if test x"${enable_openmp}" = x"yes"; then
with_openmp=yes
AC_MSG_CHECKING(whether --enable-openmp is specified)
AC_MSG_RESULT([${enable_openmp}])
fi
AM_CONDITIONAL([WITH_OPENMP],[test x"$with_openmp" = x"yes"])
if test x"${with_openmp}" = x"yes"; then
AC_DEFINE([WITH_OPENMP], [1], [use OpenMP threading])
AX_ELPA_OPENMP
fi
LT_INIT
AC_SUBST([FC_MODINC])
AC_SUBST([FC_MODOUT])
rm -rf modules/ .fortran_dependencies/
mkdir modules
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT
grep "^#define" config.h > config-f90.h
../fdep
\ No newline at end of file
../../m4/ax_prog_fc_mpi.m4
\ No newline at end of file
../../test/test_real.F90
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment