-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
65 lines (47 loc) · 2.01 KB
/
configure.ac
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
AC_PREREQ(2.63)
# das Projekt initialisieren, versionsnummer und emailadresse angeben
AC_INIT([CRTomoMod], [1.8.0], [[email protected]])
# eine beliebige Sourcedatei angeben, damit der Sourceordner bekannt ist
AC_CONFIG_SRCDIR([src/inv.f90])
AC_CONFIG_AUX_DIR([config])
mySCRIPTS=scripts
# apparently the call to AC_PROG_FF/AC_PROG_F77 will change the user-supplied
# settings for the compilers. Therefore, save and restore the content later
# normally we should not set FCFLAGS and FFLAGS (these are for user-supplied
# settings). However, we want to change some machine specific stuff for the
# Debian package
default_flags=" -O3 -march=native -ftree-vectorize -ffast-math -finline-functions -floop-nest-optimize "
test -z "${FCFLAGS}" && FCFLAGS="${default_flags}"
test -z "${FFLAGS}" && FFLAGS="${default_flags}"
FCFLAGS_SAVE="${FCFLAGS}"
FFLAGS_SAVE="${FFLAGS}"
# default compiler flags
AM_FC_FLAGS="-fopenmp "
AC_SUBST(AM_FC_FLAGS)
# den autotools mitteilen, das Fortran benutzt wird. Mit folgenden Aufrufen werden die
# entsprechenden Variablen initialisiert
AC_PROG_FC([gfortran])
AC_PROG_F77([gfortran])
# restore user compiler flags
FCFLAGS="${FCFLAGS_SAVE}"
FFLAGS="${FFLAGS_SAVE}"
AC_PREFIX_DEFAULT($HOME)
# Automake soll aufgerufen werden (nicht nur autoconf)
AM_INIT_AUTOMAKE
# CRTomo and CRMod error generation
AC_CONFIG_COMMANDS_PRE([cd src; ./../$mySCRIPTS/make_crerr.sh ; cd ..;])
# CRTomo git version generation
AC_CONFIG_COMMANDS_PRE([cd src; ./../$mySCRIPTS/get_git_version.sh $myCompiler ; cd ..;])
# CutMcK error generation
AC_CONFIG_COMMANDS_PRE([cd cutmckee; ./../$mySCRIPTS/make_crerr.sh ; cd ..;])
# old (development) Makefile should be moved to a save place
#AC_CONFIG_COMMANDS_PRE([mv src/Makefile src/old.Makefile])
#AC_CONFIG_COMMANDS_PRE([mv CutMcK/Makefile CutMcK/old.Makefile])
# Lapack und Blas vorhanden ? Checks für configure
#ACX_LAPACK
# An diesen Stellen sollen Makefiles von configure erstellt werden
AC_CONFIG_FILES([Makefile
src/Makefile
cutmckee/Makefile])
# generiere output
AC_OUTPUT