-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
169 lines (144 loc) · 4.02 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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
dnl -------------------------------------------------------------------------
dnl Autoconf startup.
dnl -------------------------------------------------------------------------
AC_PREREQ([2.63])
AC_INIT([echse], [0.2.2], [https://github.com/hroptatyr/echse])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_SRCDIR([src/])
dnl -------------------------------------------------------------------------
dnl Local copyright notices.
dnl -------------------------------------------------------------------------
AC_COPYRIGHT([dnl
#### Configuration script for echse.
#### Copyright (C) 2013-2020 Sebastian Freundt
### Don't edit this script!
### This script was automatically generated by the `autoconf' program
### from the file `./configure.ac'.
### To rebuild it, execute the command
### autoreconf
])dnl
AM_INIT_AUTOMAKE([foreign dist-xz color-tests parallel-tests subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
## the build chain
AC_PROG_CC([icc gcc tcc cc])
AC_PROG_CPP
SXE_CHECK_CC([c11 c1x c99 gnu99])
SXE_CHECK_CFLAGS
AC_CHECK_TOOLS([AR], [xiar ar], [false])
AC_C_BIGENDIAN
AC_PATH_PROG([GPERF], [gperf])
if test -z "${GPERF}"; then
GPERF="gperf"
fi
AC_ARG_VAR([GPERF], [full path to the gperf tool])
## check for tzfile.h
AX_ZONEINFO([right])
AM_CONDITIONAL([ZONEINFO_UTC_RIGHT], [test -n "${ax_cv_zoneinfo_utc_right}"])
## check if yuck is globally available
AX_CHECK_YUCK
AX_YUCK_SCMVER([version.mk])
AC_CONFIG_LINKS([GNUmakefile:GNUmakefile])
AX_CHECK_CLITORIS
case "${featflags}" in
(*"msse2"*)
have_simd="yes"
;;
(*)
have_simd="no"
;;
esac
AM_CONDITIONAL([HAVE_SIMD], [test "${have_simd}" = "yes"])
## libtool goddess^Wgoodness
SXE_CHECK_LIBTOOL
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT([recursive])
SXE_CHECK_LIBLTDL
AC_CHECK_FUNCS([splice])
AC_CHECK_FUNCS([sendfile])
AC_CHECK_FUNCS([tee])
AC_CHECK_HEADERS([net/proto_uipc.h])
AC_CHECK_HEADERS([ucred.h])
AC_CHECK_HEADERS([sys/ucred.h])
AC_CHECK_TYPES([struct ucred], [], [], [[
#if defined HAVE_UCRED_H
# include <ucred.h>
#endif
#if defined HAVE_SYS_UCRED_H
# include <sys/ucred.h>
#endif
]])
AC_CHECK_TYPES([struct xucred], [], [], [[
#if defined HAVE_UCRED_H
# include <ucred.h>
#endif
#if defined HAVE_SYS_UCRED_H
# include <sys/ucred.h>
#endif
]])
AC_CHECK_TYPES([ucred_t], [], [], [[
#if defined HAVE_UCRED_H
# include <ucred.h>
#endif
#if defined HAVE_SYS_UCRED_H
# include <sys/ucred.h>
#endif
]])
AC_CHECK_HEADERS([paths.h])
AC_CHECK_HEADERS([grp.h])
AC_CHECK_FUNCS([clock_gettime])
if test "${ac_cv_func_clock_gettime}" != "yes"; then
AC_CHECK_LIB([rt], [clock_gettime])
if test "${ac_cv_lib_rt_clock_gettime}" = "yes"; then
rt_LIBS="-lrt"
AC_SUBST([rt_LIBS])
have_rt_funs="yes"
fi
else
have_rt_funs="yes"
fi
AM_CONDITIONAL([HAVE_RT_FUNS], [test "${have_rt_funs}" = "yes"])
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([sys/param.h])
SXE_CHECK_LIBEV
AM_CONDITIONAL([HAVE_LIBEV], [test "${have_libev}" = "yes"])
## mimic automake on this one
pkglibdir="${libdir}/${PACKAGE}"
pkgincludedir="${includedir}/${PACKAGE}"
AC_SUBST([pkglibdir])
AC_SUBST([pkgincludedir])
AC_DEFINE_UNQUOTED([PKGLIBDIR], ["${pkglibdir}"], [where modules reside])
AC_DEFINE_UNQUOTED([PKGINCLUDEDIR], ["${pkgincludedir}"], [where headers reside])
## compose build summary
if test "${have_libev}" = "yes"; then
libevX="x"
if test "${have_rt_funs}" = "yes"; then
echsxX="x"
else
echsxX=" "
fi
else
libevX=" "
echsxX=" "
fi
echo
echo
echo "Build summary"
echo "============="
echo
echo "[[x]] echse helper tool"
echo "[[${echsxX}]] echsx executor agent"
echo "[[${libevX}]] echsd job scheduling daemon"
echo "[[x]] echsq queue managing client"
echo
dnl -------------------------------------------------------------------------
dnl final output
dnl -------------------------------------------------------------------------
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libltdl/Makefile])
AC_CONFIG_FILES([build-aux/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([info/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_OUTPUT