forked from barronh/DSMACC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
54 lines (51 loc) · 1.2 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
AC_INIT(DSMACC, 0.1)
if test -z $FCFLAGS; then
FCFLAGS="-O3"
fflags_update=1
else
fflags_update=0
fi
if test -z $CFLAGS; then
cflags_update=1
else
cflags_update=0
fi
AC_PROG_LEX()
AC_PROG_CC()
AC_MSG_CHECKING([System])
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
AC_MSG_RESULT([${UNAME_SYSTEM}])
if test $cflags_update -gt 0; then
# Adding compiler specific flags that have no macros in autoconf
case ${UNAME_SYSTEM}:${CC} in
Darwin:*)
AC_MSG_NOTICE([Adding include path for Mac where malloc.h is in /usr/include/sys])
CFLAGS="$CFLAGS -I/usr/include/sys"
;;
Darwin:gcc)
AC_MSG_NOTICE([Adding 32-bit option for KPP compilation; to disable use CFLAGS=" "])
CFLAGS="$CFLAGS -m32"
;;
esac
fi
AC_PROG_FC()
# Adding compiler specific flags that have no macros in autoconf
if test $fflags_update -gt 0; then
AC_MSG_NOTICE([Adding no automatic for $FC; to disable use FCFLAGS=" "])
case $FC in
gfortran)
FCFLAGS="$FCFLAGS -fno-automatic"
;;
ifort)
FCFLAGS="$FCFLAGS -noautomatic"
;;
pgf*)
FCFLAGS="$FCFLAGS -save"
;;
esac
fi
AC_CHECK_HEADERS([malloc.h])
AC_FC_PP_SRCEXT(f90)
AC_FC_CHECK_BOUNDS()
AC_FC_IMPLICIT_NONE()
AC_OUTPUT(Makefile.defs)