-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfigure.ac
89 lines (80 loc) · 2.59 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
AC_INIT(DSMACC, 0.1)
if test -z $FCFLAGS; then
fflags_update=1
else
fflags_update=0
fi
if test -z $CFLAGS; then
cflags_update=1
else
cflags_update=0
fi
AC_PROG_YACC
AC_CHECK_PROG([FOUND_YACC],[$YACC],[yes],[AC_MSG_NOTICE([bison/byacc/yacc not found. If KPP will not install, you may need to install bison])])
AC_PROG_LEX
AC_CHECK_PROG([FOUND_LEX],[$LEX],[yes],[AC_MSG_NOTICE([flex/lex not found. If KPP will not install, you may need to install lex])])
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_MAKE_SET
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lfl':
AC_CHECK_LIB([fl], [yywrap],,AC_MSG_ERROR([Flex library `libfl` is required by kpp and not found]), )
AC_MSG_CHECKING([System])
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
AC_MSG_RESULT([${UNAME_SYSTEM}])
if test $cflags_update -eq 0; then
AC_MSG_NOTICE([You have disabled automatic CFLAGS by setting your own. Unset CFLAGS to allow configure to automatically manage flags.])
else
AC_MSG_NOTICE([Updating CFLAGS automatically KPP compilation; to disable use CFLAGS=" "])
# Adding compiler specific flags that have no macros in autoconf
AC_MSG_NOTICE([${CFLAGS}])
fi
AC_PROG_FC()
# Adding compiler spec ic flags that have no macros in autoconf
if test $fflags_update -eq 0; then
AC_MSG_NOTICE([You have disabled automatic FCFLAGS by setting your own. Unset FCFLAGS to allow configure to automatically manage flags.])
else
AC_MSG_NOTICE([Updating FCFLAGS automatically; to disable set your own FCFLAGS])
AC_MSG_NOTICE([Adding no automatic for $FC; to disable set your own FCFLAGS])
case $FC in
gfortran)
FCFLAGS="$FCFLAGS -fno-automatic"
;;
ifort)
FCFLAGS="$FCFLAGS -noautomatic"
;;
pgf*)
FCFLAGS="$FCFLAGS -save"
;;
esac
case ${UNAME_SYSTEM} in
Darwin)
AC_MSG_NOTICE([Not adding -fPIC for mac])
;;
*)
AC_MSG_NOTICE([Adding -fPIC on non-mac])
FCFLAGS="$FCFLAGS -fPIC"
;;
esac
fi
# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([stdlib.h],,AC_MSG_ERROR([`stdlib.h` is required and not found]), )
AC_CHECK_HEADERS([stdio.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([floor ftime getcwd memmove memset pow sqrt strchr])
AC_FC_PP_SRCEXT(f90)
AC_FC_CHECK_BOUNDS()
AC_FC_IMPLICIT_NONE()
AC_CONFIG_FILES([Makefile src/Makefile kpp/Makefile kpp/src/Makefile UCI_fastJX72e/Makefile tuv_new/Makefile pysrc/Makefile])
AC_OUTPUT