-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfigure.ac
More file actions
114 lines (100 loc) · 3.12 KB
/
configure.ac
File metadata and controls
114 lines (100 loc) · 3.12 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
##
# Prologue
##
AC_INIT([flux-foundry],
m4_esyscmd([git describe --always | awk '/.*/ {sub(/^v/, ""); printf "%s",$1; exit}']))
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([config])
AC_CONFIG_SRCDIR([NEWS.md])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([subdir-objects tar-pax foreign])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config/config.h])
AM_MAINTAINER_MODE([enable])
AC_DEFINE([_GNU_SOURCE], 1,
[Define _GNU_SOURCE so that we get all necessary prototypes])
##
# Generate project versions from PACKAGE_VERSION (set from git describe above)
##
AX_SPLIT_VERSION
AX_POINT_VERSION=$(echo $AX_POINT_VERSION | $SED 's/-.*$//')
AC_SUBST([AX_MAJOR_VERSION])
AC_SUBST([AX_MINOR_VERSION])
AC_SUBST([AX_POINT_VERSION])
##
# Initialize pkg-config for PKG_CHECK_MODULES to avoid conditional issues
##
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR
# Checks for programs
##
m4_version_prereq(2.70, [AC_PROG_CC], [AC_PROG_CC_C99])
AM_PROG_CC_C_O
AX_COMPILER_VENDOR
AX_COMPILER_VERSION
AS_CASE($ax_cv_c_compiler_vendor,
[clang | gnu], [
WARNING_CFLAGS="-Wall -Werror -Wno-strict-aliasing -Wno-error=deprecated-declarations"
]
)
AC_SUBST([WARNING_CFLAGS])
LT_INIT
AX_CODE_COVERAGE
X_AC_JANSSON
AC_ARG_ENABLE([docs],
AS_HELP_STRING([--disable-docs], [disable building docs]))
AS_IF([test "x$enable_docs" != "xno"], [
AM_PATH_PYTHON(3.6)
AM_CHECK_PYMOD(sphinx,
[Version(sphinx.__version__) >= Version ('1.6.7')],
[sphinx=true],
[sphinx=false; AC_MSG_WARN([could not find sphinx to generate docs, version 1.6.7+ required])]
)
AM_CHECK_PYMOD(docutils,
[Version(docutils.__version__) >= Version ('0.11.0')],
[docutils=true],
[docutils=false; AC_MSG_WARN([could not find docutils to generate docs, version 0.11.0+ required])]
)
])
# If --enable-docs=yes, but no doc generator found,
# then error immediately:
#
AS_IF([test "x$enable_docs" = "xyes" -a "x$sphinx" = "xfalse"],[
AC_MSG_ERROR([--enable-docs used but no document generator found!])
])
AS_IF([test "x$enable_docs" = "xyes" -a "x$docutils" = "xfalse"],[
AC_MSG_ERROR([--enable-docs used but docutils not found!])
])
AM_CONDITIONAL([ENABLE_DOCS], [test "x$sphinx" = "xtrue" -a "x$docutils" = "xtrue"])
AC_CHECK_PROG(ASPELL,[aspell],[aspell])
AC_REPLACE_FUNCS( \
argz_add \
mempcpy \
)
AC_SEARCH_LIBS([floor], [m], [], [
AC_MSG_ERROR([unable to find the floor() function in libm])
])
AS_VAR_SET(fluxincludedir, $includedir/flux)
AC_SUBST(fluxincludedir)
##
# Epilogue
##
AC_CONFIG_FILES( \
Makefile \
vendored/libtap/Makefile \
vendored/libccan/Makefile \
vendored/libveb/Makefile \
vendored/libglibc/Makefile \
vendored/libczmq/Makefile \
src/libmissing/Makefile \
src/libutil/Makefile \
src/libhostlist/Makefile \
src/libhostlist/flux-hostlist.pc \
src/libidset/Makefile \
src/libidset/flux-idset.pc \
src/liboptparse/Makefile \
src/liboptparse/flux-optparse.pc \
doc/Makefile \
doc/test/Makefile \
)
AC_OUTPUT