Blame


1 dd038bc6 2021-09-21 thomas.ad # Process this file with autoconf to produce a configure script.
2 dd038bc6 2021-09-21 thomas.ad
3 dd038bc6 2021-09-21 thomas.ad AC_PREREQ([2.69])
4 598139dd 2022-07-22 thomas AC_INIT([got-portable],
5 4b553fec 2022-08-20 thomas m4_esyscmd_s(util/got-portable-ver.sh),
6 598139dd 2022-07-22 thomas [thomas@xteddy.org])
7 dd038bc6 2021-09-21 thomas.ad AC_CONFIG_AUX_DIR(etc)
8 dd038bc6 2021-09-21 thomas.ad AC_CONFIG_SRCDIR([lib/rcsutil.h])
9 dd038bc6 2021-09-21 thomas.ad AM_INIT_AUTOMAKE([foreign subdir-objects])
10 dd038bc6 2021-09-21 thomas.ad
11 47dc83f5 2023-03-08 thomas AC_CONFIG_HEADERS([include/got_compat.h])
12 47dc83f5 2023-03-08 thomas
13 4fccd2fe 2023-03-08 thomas AC_DEFINE_UNQUOTED(VERSION, $VERSION)
14 dd038bc6 2021-09-21 thomas.ad AC_SUBST(VERSION)
15 dd038bc6 2021-09-21 thomas.ad AC_SUBST(GOT_RELEASE)
16 dd038bc6 2021-09-21 thomas.ad
17 4fccd2fe 2023-03-08 thomas AC_DEFINE_UNQUOTED([GOT_VERSION], VERSION, [GoT version string])
18 4fccd2fe 2023-03-08 thomas AC_DEFINE_UNQUOTED([GOT_VERSION_NUMBER], VERSION, [Got version number])
19 47dc83f5 2023-03-08 thomas
20 4859aafd 2022-11-05 thomas AC_USE_SYSTEM_EXTENSIONS
21 dd038bc6 2021-09-21 thomas.ad AC_CANONICAL_HOST
22 dd038bc6 2021-09-21 thomas.ad
23 9981e8e3 2023-01-19 thomas AC_CONFIG_SUBDIRS([template])
24 2f1efc18 2023-08-29 thomas AC_ARG_ENABLE([gotd],
25 2f1efc18 2023-08-29 thomas AS_HELP_STRING([--enable gotd], [build gotd and gotsh]))
26 a77903c9 2023-09-24 thomas AC_ARG_ENABLE([cvg],
27 a77903c9 2023-09-24 thomas AS_HELP_STRING([--enable cvg],
28 a77903c9 2023-09-24 thomas [EXPERIMENTAL: cvg - cvs-like-git]))
29 adafacd3 2023-08-29 thomas
30 adafacd3 2023-08-29 thomas # Override gotd's empty_path location.
31 adafacd3 2023-08-29 thomas AC_ARG_WITH([gotd-empty-path],
32 adafacd3 2023-08-29 thomas [AS_HELP_STRING([--with-gotd-empty-path],
33 adafacd3 2023-08-29 thomas [gotd empty path])
34 adafacd3 2023-08-29 thomas ],
35 adafacd3 2023-08-29 thomas [GOTD_EMPTY_PATHC=$withval]
36 adafacd3 2023-08-29 thomas [])
37 adafacd3 2023-08-29 thomas AC_SUBST(GOTD_EMPTY_PATHC)
38 adafacd3 2023-08-29 thomas
39 adafacd3 2023-08-29 thomas # Override where git's libexec helpers are located for gitwrapper.
40 adafacd3 2023-08-29 thomas AC_ARG_WITH([gitwrapper-git-libexec-path],
41 adafacd3 2023-08-29 thomas [AS_HELP_STRING([--with-gitwrapper-git-libexec-path],
42 adafacd3 2023-08-29 thomas [git libexec path for gitwrapper])
43 adafacd3 2023-08-29 thomas ],
44 adafacd3 2023-08-29 thomas [GITWRAPPER_LIBEXEC_PATHC=$withval]
45 adafacd3 2023-08-29 thomas [])
46 adafacd3 2023-08-29 thomas AC_SUBST(GITWRAPPER_LIBEXEC_PATHC)
47 9981e8e3 2023-01-19 thomas
48 dd038bc6 2021-09-21 thomas.ad # When CFLAGS isn't set at this stage and gcc is detected by the macro below,
49 dd038bc6 2021-09-21 thomas.ad # autoconf will automatically use CFLAGS="-O2 -g". Prevent that by using an
50 dd038bc6 2021-09-21 thomas.ad # empty default.
51 dd038bc6 2021-09-21 thomas.ad : ${CFLAGS=""}
52 dd038bc6 2021-09-21 thomas.ad
53 dd038bc6 2021-09-21 thomas.ad # Save user CPPFLAGS, CFLAGS and LDFLAGS. We need to change them because
54 dd038bc6 2021-09-21 thomas.ad # AC_CHECK_HEADER doesn't give us any other way to update the include
55 dd038bc6 2021-09-21 thomas.ad # paths. But for Makefile.am we want to use AM_CPPFLAGS and friends.
56 dd038bc6 2021-09-21 thomas.ad SAVED_CFLAGS="$CFLAGS"
57 dd038bc6 2021-09-21 thomas.ad SAVED_CPPFLAGS="$CPPFLAGS"
58 dd038bc6 2021-09-21 thomas.ad SAVED_LDFLAGS="$LDFLAGS"
59 dd038bc6 2021-09-21 thomas.ad
60 b29d689b 2023-02-11 thomas # YACC override
61 b29d689b 2023-02-11 thomas YACC_OVERRIDE="yes"
62 b29d689b 2023-02-11 thomas
63 dd038bc6 2021-09-21 thomas.ad # Checks for programs.
64 dd038bc6 2021-09-21 thomas.ad AC_PROG_CC
65 dd038bc6 2021-09-21 thomas.ad AC_PROG_CPP
66 dd038bc6 2021-09-21 thomas.ad AC_PROG_INSTALL
67 dd038bc6 2021-09-21 thomas.ad AC_PROG_LN_S
68 dd038bc6 2021-09-21 thomas.ad AC_PROG_MAKE_SET
69 b29d689b 2023-02-11 thomas if test -z "$YACC"; then
70 b29d689b 2023-02-11 thomas YACC_OVERRIDE="no"
71 dd038bc6 2021-09-21 thomas.ad AC_PROG_YACC
72 b29d689b 2023-02-11 thomas fi
73 47e5cb11 2022-11-05 thomas AM_PROG_AR
74 dd038bc6 2021-09-21 thomas.ad AC_PROG_RANLIB
75 dd038bc6 2021-09-21 thomas.ad PKG_PROG_PKG_CONFIG
76 dd038bc6 2021-09-21 thomas.ad
77 b29d689b 2023-02-11 thomas if test "$YACC_OVERRIDE" = "yes"; then
78 b29d689b 2023-02-11 thomas AC_MSG_NOTICE("Using YACC set from environment: $YACC")
79 b29d689b 2023-02-11 thomas fi
80 b29d689b 2023-02-11 thomas
81 dd038bc6 2021-09-21 thomas.ad # Checks for header files.
82 dd038bc6 2021-09-21 thomas.ad AC_CHECK_HEADERS([ \
83 dd038bc6 2021-09-21 thomas.ad fcntl.h \
84 8d60d668 2023-03-16 thomas getopt.h \
85 dd038bc6 2021-09-21 thomas.ad langinfo.h \
86 d9b944c7 2023-03-08 thomas libutil.h \
87 dd038bc6 2021-09-21 thomas.ad limits.h \
88 97799ccd 2022-02-06 thomas linux/landlock.h \
89 dd038bc6 2021-09-21 thomas.ad locale.h \
90 dd038bc6 2021-09-21 thomas.ad netdb.h \
91 dd038bc6 2021-09-21 thomas.ad netinet/in.h \
92 dd038bc6 2021-09-21 thomas.ad paths.h \
93 d24ddaa6 2022-02-26 thomas poll.h \
94 98670ba7 2023-02-23 thomas sha.h \
95 98670ba7 2023-02-23 thomas sha1.h \
96 98670ba7 2023-02-23 thomas sha2.h \
97 98670ba7 2023-02-23 thomas sha256.h \
98 dd038bc6 2021-09-21 thomas.ad stddef.h \
99 dd038bc6 2021-09-21 thomas.ad stdint.h \
100 dd038bc6 2021-09-21 thomas.ad stdlib.h \
101 dd038bc6 2021-09-21 thomas.ad string.h \
102 dd038bc6 2021-09-21 thomas.ad sys/ioctl.h \
103 dd038bc6 2021-09-21 thomas.ad sys/param.h \
104 d24ddaa6 2022-02-26 thomas sys/poll.h \
105 19467d59 2022-07-16 thomas sys/queue.h \
106 d9b944c7 2023-03-08 thomas sys/select.h \
107 dd038bc6 2021-09-21 thomas.ad sys/socket.h \
108 dd038bc6 2021-09-21 thomas.ad sys/time.h \
109 dd038bc6 2021-09-21 thomas.ad sys/tree.h \
110 a58e44b0 2024-03-30 thomas tls.h \
111 dd038bc6 2021-09-21 thomas.ad util.h \
112 dd038bc6 2021-09-21 thomas.ad unistd.h \
113 dd038bc6 2021-09-21 thomas.ad wchar.h \
114 dd038bc6 2021-09-21 thomas.ad ])
115 b1ec8cee 2023-02-25 thomas
116 d9b944c7 2023-03-08 thomas AC_HEADER_DIRENT
117 d9b944c7 2023-03-08 thomas AC_CHECK_DECL([F_CLOSEM],
118 d9b944c7 2023-03-08 thomas HAVE_FCNTL_CLOSEM
119 d9b944c7 2023-03-08 thomas AC_DEFINE([HAVE_FCNTL_CLOSEM], [1],
120 d9b944c7 2023-03-08 thomas [Use F_CLOSEM fcntl for closefrom]),
121 d9b944c7 2023-03-08 thomas [],
122 d9b944c7 2023-03-08 thomas [#include <limits.h>
123 d9b944c7 2023-03-08 thomas #include <fcntl.h>
124 d9b944c7 2023-03-08 thomas ]
125 d9b944c7 2023-03-08 thomas )
126 d9b944c7 2023-03-08 thomas
127 d9b944c7 2023-03-08 thomas AC_MSG_CHECKING([for /proc/pid/fd directory])
128 d9b944c7 2023-03-08 thomas if test -d "/proc/$$/fd" ; then
129 d9b944c7 2023-03-08 thomas AC_DEFINE([HAVE_PROC_PID], [1], [Define if you have /proc/$pid/fd])
130 d9b944c7 2023-03-08 thomas AC_MSG_RESULT([yes])
131 d9b944c7 2023-03-08 thomas else
132 d9b944c7 2023-03-08 thomas AC_MSG_RESULT([no])
133 d9b944c7 2023-03-08 thomas fi
134 d9b944c7 2023-03-08 thomas
135 d9b944c7 2023-03-08 thomas AC_MSG_CHECKING([whether program_invocation_short_name is defined])
136 d9b944c7 2023-03-08 thomas AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
137 d9b944c7 2023-03-08 thomas #include <argp.h>
138 d9b944c7 2023-03-08 thomas ]], [[
139 d9b944c7 2023-03-08 thomas program_invocation_short_name = "test";
140 d9b944c7 2023-03-08 thomas ]])], [
141 d9b944c7 2023-03-08 thomas AC_MSG_RESULT([yes])
142 d9b944c7 2023-03-08 thomas AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
143 d9b944c7 2023-03-08 thomas [Define if program_invocation_short_name is defined])
144 d9b944c7 2023-03-08 thomas ], [
145 d9b944c7 2023-03-08 thomas AC_MSG_RESULT([no])
146 d9b944c7 2023-03-08 thomas ])
147 d9b944c7 2023-03-08 thomas
148 d9b944c7 2023-03-08 thomas # Look for prctl(PR_SET_NAME).
149 d9b944c7 2023-03-08 thomas AC_CHECK_DECL(
150 d9b944c7 2023-03-08 thomas [PR_SET_NAME],
151 d9b944c7 2023-03-08 thomas [AC_DEFINE([HAVE_PR_SET_NAME], [1], [Define if PR_SET_NAME is defined])],
152 d9b944c7 2023-03-08 thomas [],
153 d9b944c7 2023-03-08 thomas [#include <sys/prctl.h>]
154 d9b944c7 2023-03-08 thomas )
155 d9b944c7 2023-03-08 thomas
156 b1ec8cee 2023-02-25 thomas AM_CONDITIONAL([HAVE_SHA2], [test "x$ac_cv_header_sha2_h" = xyes])
157 8d60d668 2023-03-16 thomas
158 8d60d668 2023-03-16 thomas AC_CACHE_CHECK([whether getopt has optreset support],
159 8d60d668 2023-03-16 thomas ac_cv_have_getopt_optreset, [
160 8d60d668 2023-03-16 thomas AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <getopt.h> ]],
161 8d60d668 2023-03-16 thomas [[ extern int optreset; optreset = 0; ]])],
162 8d60d668 2023-03-16 thomas [ ac_cv_have_getopt_optreset="yes" ],
163 8d60d668 2023-03-16 thomas [ ac_cv_have_getopt_optreset="no"
164 8d60d668 2023-03-16 thomas ])
165 8d60d668 2023-03-16 thomas ])
166 9445abba 2023-02-24 thomas
167 8d60d668 2023-03-16 thomas AM_CONDITIONAL([HAVE_GETOPT], [test "x$ac_cv_have_getopt_optreset" = "xyes"])
168 8d60d668 2023-03-16 thomas if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
169 8d60d668 2023-03-16 thomas AC_DEFINE([HAVE_GETOPT_OPTRESET], [1],
170 8d60d668 2023-03-16 thomas [Define if your getopt(3) defines and uses optreset])
171 8d60d668 2023-03-16 thomas fi
172 8d60d668 2023-03-16 thomas
173 d9b944c7 2023-03-08 thomas AC_CHECK_MEMBERS([struct pollfd.fd], [], [], [[
174 d9b944c7 2023-03-08 thomas #include <sys/types.h>
175 d9b944c7 2023-03-08 thomas #ifdef HAVE_POLL_H
176 d9b944c7 2023-03-08 thomas #include <poll.h>
177 d9b944c7 2023-03-08 thomas #endif
178 d9b944c7 2023-03-08 thomas #ifdef HAVE_SYS_POLL_H
179 d9b944c7 2023-03-08 thomas #include <sys/poll.h>
180 d9b944c7 2023-03-08 thomas #endif
181 d9b944c7 2023-03-08 thomas ]])
182 98670ba7 2023-02-23 thomas
183 dd038bc6 2021-09-21 thomas.ad # Checks for typ edefs, structures, and compiler characteristics.
184 dd038bc6 2021-09-21 thomas.ad AC_CHECK_HEADER_STDBOOL
185 dd038bc6 2021-09-21 thomas.ad AC_C_INLINE
186 dd038bc6 2021-09-21 thomas.ad AC_TYPE_INT64_T
187 dd038bc6 2021-09-21 thomas.ad AC_TYPE_MODE_T
188 dd038bc6 2021-09-21 thomas.ad AC_TYPE_OFF_T
189 dd038bc6 2021-09-21 thomas.ad AC_TYPE_PID_T
190 dd038bc6 2021-09-21 thomas.ad AC_TYPE_SIZE_T
191 dd038bc6 2021-09-21 thomas.ad AC_TYPE_SSIZE_T
192 dd038bc6 2021-09-21 thomas.ad AC_TYPE_UINT16_T
193 dd038bc6 2021-09-21 thomas.ad AC_TYPE_UINT32_T
194 dd038bc6 2021-09-21 thomas.ad AC_TYPE_UINT64_T
195 dd038bc6 2021-09-21 thomas.ad AC_TYPE_UINT8_T
196 dd038bc6 2021-09-21 thomas.ad
197 ff36aeea 2022-07-16 thomas # Check for ifgroupreq which is only available on BSD.
198 ff36aeea 2022-07-16 thomas AC_CHECK_TYPES([struct ifgroupreq])
199 ff36aeea 2022-07-16 thomas
200 75716fd6 2022-08-27 thomas # Check for sockaddr_storage. On some systems, ss_len is filled out, although
201 75716fd6 2022-08-27 thomas # this is not mandated by POSIX, and hence systems such as linux, don't have
202 75716fd6 2022-08-27 thomas # it.
203 75716fd6 2022-08-27 thomas AC_CHECK_TYPES([struct sockaddr_storage], [], [], [
204 75716fd6 2022-08-27 thomas #include <sys/types.h>
205 75716fd6 2022-08-27 thomas #include <sys/socket.h>
206 75716fd6 2022-08-27 thomas ])
207 75716fd6 2022-08-27 thomas
208 75716fd6 2022-08-27 thomas # Same thing as sockaddr_storage above, only now check if the member exists in
209 75716fd6 2022-08-27 thomas # the struct as well.
210 75716fd6 2022-08-27 thomas AC_CHECK_MEMBERS([struct sockaddr_storage.ss_len], , ,
211 75716fd6 2022-08-27 thomas [ #include <netdb.h>
212 75716fd6 2022-08-27 thomas #include <netinet/in.h>
213 75716fd6 2022-08-27 thomas #include <sys/socket.h> ]
214 75716fd6 2022-08-27 thomas )
215 75716fd6 2022-08-27 thomas
216 75716fd6 2022-08-27 thomas AC_CHECK_MEMBERS([struct sockaddr.sa_len], , ,
217 75716fd6 2022-08-27 thomas [ #include <netdb.h>
218 75716fd6 2022-08-27 thomas #include <netinet/in.h>
219 75716fd6 2022-08-27 thomas #include <sys/socket.h> ]
220 75716fd6 2022-08-27 thomas )
221 75716fd6 2022-08-27 thomas
222 75716fd6 2022-08-27 thomas # Both checks above will result in:
223 75716fd6 2022-08-27 thomas #
224 75716fd6 2022-08-27 thomas # HAVE_STRUCT_SOCKADDR_AS_LEN
225 75716fd6 2022-08-27 thomas # SS_LEN
226 75716fd6 2022-08-27 thomas #
227 75716fd6 2022-08-27 thomas # Either being defined or not.
228 75716fd6 2022-08-27 thomas
229 dd038bc6 2021-09-21 thomas.ad # Look for library needed for flock.
230 dd038bc6 2021-09-21 thomas.ad AC_SEARCH_LIBS(flock, bsd)
231 dd038bc6 2021-09-21 thomas.ad
232 dd038bc6 2021-09-21 thomas.ad # Checks for library functions.
233 dd038bc6 2021-09-21 thomas.ad AC_FUNC_FORK
234 dd038bc6 2021-09-21 thomas.ad AC_FUNC_FSEEKO
235 dd038bc6 2021-09-21 thomas.ad AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
236 dd038bc6 2021-09-21 thomas.ad AC_FUNC_MALLOC
237 dd038bc6 2021-09-21 thomas.ad AC_FUNC_MMAP
238 dd038bc6 2021-09-21 thomas.ad AC_FUNC_REALLOC
239 dd038bc6 2021-09-21 thomas.ad AC_FUNC_STRERROR_R
240 dd038bc6 2021-09-21 thomas.ad AC_FUNC_STRNLEN
241 dd038bc6 2021-09-21 thomas.ad AC_CHECK_FUNCS([ \
242 dd038bc6 2021-09-21 thomas.ad dup2 \
243 dd038bc6 2021-09-21 thomas.ad flock \
244 dd038bc6 2021-09-21 thomas.ad getcwd \
245 dd038bc6 2021-09-21 thomas.ad localtime_r \
246 dd038bc6 2021-09-21 thomas.ad memchr \
247 dd038bc6 2021-09-21 thomas.ad memmove \
248 dd038bc6 2021-09-21 thomas.ad memset \
249 4fccd2fe 2023-03-08 thomas mergesort \
250 dd038bc6 2021-09-21 thomas.ad mkdir \
251 dd038bc6 2021-09-21 thomas.ad munmap \
252 dd038bc6 2021-09-21 thomas.ad nl_langinfo \
253 dd038bc6 2021-09-21 thomas.ad realpath \
254 dd038bc6 2021-09-21 thomas.ad regcomp \
255 dd038bc6 2021-09-21 thomas.ad rmdir \
256 dd038bc6 2021-09-21 thomas.ad setlocale \
257 dd038bc6 2021-09-21 thomas.ad socket \
258 683ec58e 2022-07-16 thomas setresgid \
259 683ec58e 2022-07-16 thomas setresuid \
260 c4e2e0d0 2022-07-16 thomas setproctitle \
261 dd038bc6 2021-09-21 thomas.ad strcasecmp \
262 dd038bc6 2021-09-21 thomas.ad strchr \
263 dd038bc6 2021-09-21 thomas.ad strcspn \
264 dd038bc6 2021-09-21 thomas.ad strdup \
265 dd038bc6 2021-09-21 thomas.ad strerror \
266 dd038bc6 2021-09-21 thomas.ad strncasecmp \
267 dd038bc6 2021-09-21 thomas.ad strndup \
268 dd038bc6 2021-09-21 thomas.ad strrchr \
269 dd038bc6 2021-09-21 thomas.ad strspn \
270 dd038bc6 2021-09-21 thomas.ad strstr \
271 dd038bc6 2021-09-21 thomas.ad strtol \
272 dd038bc6 2021-09-21 thomas.ad strtoul \
273 d9b944c7 2023-03-08 thomas sysconf \
274 dd038bc6 2021-09-21 thomas.ad wcwidth \
275 dd038bc6 2021-09-21 thomas.ad ])
276 ddd12270 2022-04-22 thomas
277 c4e2e0d0 2022-07-16 thomas AM_CONDITIONAL([HAVE_SETPROCTITLE], [test "x$ac_cv_func_setproctitle" = xyes])
278 d9b944c7 2023-03-08 thomas
279 d9b944c7 2023-03-08 thomas if test "x$ac_cv_func_sysconf" = xyes; then
280 d9b944c7 2023-03-08 thomas AC_DEFINE([HAVE_SYSCONF], [1], [Define to 1 if sysconf() present])
281 d9b944c7 2023-03-08 thomas fi
282 c4e2e0d0 2022-07-16 thomas
283 ddd12270 2022-04-22 thomas # Siphash support.
284 ddd12270 2022-04-22 thomas AC_CHECK_FUNCS([SipHash])
285 ddd12270 2022-04-22 thomas AM_CONDITIONAL([HAVE_SIPHASH], [test "x$ac_cv_func_SipHash" = xyes])
286 dd038bc6 2021-09-21 thomas.ad
287 dd038bc6 2021-09-21 thomas.ad # Check for functions with a compatibility implementation.
288 dd038bc6 2021-09-21 thomas.ad AC_REPLACE_FUNCS([ \
289 dd038bc6 2021-09-21 thomas.ad asprintf \
290 dd038bc6 2021-09-21 thomas.ad closefrom \
291 dd038bc6 2021-09-21 thomas.ad explicit_bzero \
292 dd038bc6 2021-09-21 thomas.ad fmt_scaled \
293 dd038bc6 2021-09-21 thomas.ad freezero \
294 dd038bc6 2021-09-21 thomas.ad getdtablecount \
295 dd038bc6 2021-09-21 thomas.ad getline \
296 dd038bc6 2021-09-21 thomas.ad getprogname \
297 dd038bc6 2021-09-21 thomas.ad recallocarray \
298 dd038bc6 2021-09-21 thomas.ad reallocarray \
299 dd038bc6 2021-09-21 thomas.ad strlcat \
300 dd038bc6 2021-09-21 thomas.ad strlcpy \
301 dd038bc6 2021-09-21 thomas.ad strndup \
302 d9b944c7 2023-03-08 thomas strnlen \
303 dd038bc6 2021-09-21 thomas.ad strsep \
304 dd038bc6 2021-09-21 thomas.ad strtonum \
305 dd038bc6 2021-09-21 thomas.ad ])
306 4fccd2fe 2023-03-08 thomas AM_CONDITIONAL([HAVE_CLOSEFROM], [test "x$ac_cv_func_closefrom" = xyes])
307 dd038bc6 2021-09-21 thomas.ad
308 dd038bc6 2021-09-21 thomas.ad # Always use our getopt because 1) glibc's doesn't enforce argument order 2)
309 dd038bc6 2021-09-21 thomas.ad # musl does not set optarg to NULL for flags without arguments (although it is
310 dd038bc6 2021-09-21 thomas.ad # not required to, but it is helpful) 3) there are probably other weird
311 dd038bc6 2021-09-21 thomas.ad # implementations.
312 dd038bc6 2021-09-21 thomas.ad AC_LIBOBJ(getopt)
313 dd038bc6 2021-09-21 thomas.ad
314 206be139 2023-03-08 thomas # Check for b64_ntop. If we have b64_ntop, we assume b64_pton as well.
315 206be139 2023-03-08 thomas AC_MSG_CHECKING(for b64_ntop)
316 206be139 2023-03-08 thomas AC_LINK_IFELSE([AC_LANG_PROGRAM(
317 206be139 2023-03-08 thomas [
318 206be139 2023-03-08 thomas #include <sys/types.h>
319 206be139 2023-03-08 thomas #include <netinet/in.h>
320 206be139 2023-03-08 thomas #include <resolv.h>
321 206be139 2023-03-08 thomas ],
322 206be139 2023-03-08 thomas [
323 206be139 2023-03-08 thomas b64_ntop(NULL, 0, NULL, 0);
324 206be139 2023-03-08 thomas ])],
325 206be139 2023-03-08 thomas found_b64_ntop=yes,
326 206be139 2023-03-08 thomas found_b64_ntop=no
327 206be139 2023-03-08 thomas )
328 206be139 2023-03-08 thomas AC_MSG_RESULT($found_b64_ntop)
329 206be139 2023-03-08 thomas libresolv_LIBS=""
330 206be139 2023-03-08 thomas if test "x$found_b64_ntop" = xno; then
331 206be139 2023-03-08 thomas AC_MSG_CHECKING(for b64_ntop with -lresolv)
332 206be139 2023-03-08 thomas LIBS="-lresolv"
333 206be139 2023-03-08 thomas AC_LINK_IFELSE([AC_LANG_PROGRAM(
334 206be139 2023-03-08 thomas [
335 206be139 2023-03-08 thomas #include <sys/types.h>
336 206be139 2023-03-08 thomas #include <netinet/in.h>
337 206be139 2023-03-08 thomas #include <resolv.h>
338 206be139 2023-03-08 thomas ],
339 206be139 2023-03-08 thomas [
340 206be139 2023-03-08 thomas b64_ntop(NULL, 0, NULL, 0);
341 206be139 2023-03-08 thomas ])],
342 206be139 2023-03-08 thomas found_b64_ntop=yes,
343 206be139 2023-03-08 thomas found_b64_ntop=no
344 206be139 2023-03-08 thomas )
345 206be139 2023-03-08 thomas AC_MSG_RESULT($found_b64_ntop)
346 206be139 2023-03-08 thomas libresolv_LIBS="$LIBS"
347 206be139 2023-03-08 thomas fi
348 206be139 2023-03-08 thomas if test "x$found_b64_ntop" = xno; then
349 206be139 2023-03-08 thomas AC_MSG_CHECKING(for b64_ntop with -lnetwork)
350 206be139 2023-03-08 thomas LIBS="-lresolv -lnetwork"
351 206be139 2023-03-08 thomas AC_LINK_IFELSE([AC_LANG_PROGRAM(
352 206be139 2023-03-08 thomas [
353 206be139 2023-03-08 thomas #include <sys/types.h>
354 206be139 2023-03-08 thomas #include <netinet/in.h>
355 206be139 2023-03-08 thomas #include <resolv.h>
356 206be139 2023-03-08 thomas ],
357 206be139 2023-03-08 thomas [
358 206be139 2023-03-08 thomas b64_ntop(NULL, 0, NULL, 0);
359 206be139 2023-03-08 thomas ])],
360 206be139 2023-03-08 thomas found_b64_ntop=yes,
361 206be139 2023-03-08 thomas found_b64_ntop=no
362 206be139 2023-03-08 thomas )
363 206be139 2023-03-08 thomas AC_MSG_RESULT($found_b64_ntop)
364 206be139 2023-03-08 thomas libresolv_LIBS="$LIBS"
365 206be139 2023-03-08 thomas fi
366 206be139 2023-03-08 thomas
367 206be139 2023-03-08 thomas AM_CONDITIONAL([HAVE_B64], [test "x$found_b64_ntop" = xyes])
368 206be139 2023-03-08 thomas if test "x$found_b64_ntop" = xyes; then
369 206be139 2023-03-08 thomas AC_DEFINE([HAVE_B64_NTOP], [1], [define if b64_ntop is present])
370 206be139 2023-03-08 thomas AC_SUBST(libresolv_LIBS)
371 206be139 2023-03-08 thomas else
372 206be139 2023-03-08 thomas AC_LIBOBJ(base64)
373 206be139 2023-03-08 thomas fi
374 206be139 2023-03-08 thomas
375 92a9e85d 2021-09-24 thomas # Check the platform we're compiling on.
376 92a9e85d 2021-09-24 thomas AC_MSG_CHECKING(platform)
377 92a9e85d 2021-09-24 thomas case "$host_os" in
378 92a9e85d 2021-09-24 thomas *linux*)
379 92a9e85d 2021-09-24 thomas AC_MSG_RESULT(linux)
380 92a9e85d 2021-09-24 thomas PLATFORM=linux
381 92a9e85d 2021-09-24 thomas ;;
382 92a9e85d 2021-09-24 thomas *freebsd*)
383 92a9e85d 2021-09-24 thomas AC_MSG_RESULT(freebsd)
384 92a9e85d 2021-09-24 thomas PLATFORM=freebsd
385 d24ddaa6 2022-02-26 thomas ;;
386 d24ddaa6 2022-02-26 thomas *darwin*)
387 d24ddaa6 2022-02-26 thomas AC_MSG_RESULT(darwin)
388 d24ddaa6 2022-02-26 thomas PLATFORM=darwin
389 a3732bb6 2022-02-26 thomas ;;
390 a3732bb6 2022-02-26 thomas *netbsd*)
391 a3732bb6 2022-02-26 thomas AC_MSG_RESULT(netbsd)
392 a3732bb6 2022-02-26 thomas PLATFORM=netbsd
393 92a9e85d 2021-09-24 thomas ;;
394 01a22331 2023-02-26 thomas *openbsd*)
395 398ba35f 2023-02-26 thomas AC_MSG_RESULT(openbsd)
396 01a22331 2023-02-26 thomas PLATFORM=openbsd
397 01a22331 2023-02-26 thomas ;;
398 b26177ad 2022-03-03 thomas *dragonfly*)
399 b26177ad 2022-03-03 thomas AC_MSG_RESULT(dragonfly)
400 b26177ad 2022-03-03 thomas PLATFORM=dragonflybsd
401 b26177ad 2022-03-03 thomas ;;
402 92a9e85d 2021-09-24 thomas *)
403 92a9e85d 2021-09-24 thomas AC_MSG_RESULT(unknown)
404 92a9e85d 2021-09-24 thomas PLATFORM=unknown
405 92a9e85d 2021-09-24 thomas ;;
406 92a9e85d 2021-09-24 thomas esac
407 92a9e85d 2021-09-24 thomas AC_SUBST(PLATFORM)
408 92a9e85d 2021-09-24 thomas AM_CONDITIONAL([HOST_FREEBSD], [test "$PLATFORM" = "freebsd"])
409 92a9e85d 2021-09-24 thomas AM_CONDITIONAL([HOST_LINUX], [test "$PLATFORM" = "linux"])
410 d24ddaa6 2022-02-26 thomas AM_CONDITIONAL([HOST_DARWIN], [test "$PLATFORM" = "darwin"])
411 a3732bb6 2022-02-26 thomas AM_CONDITIONAL([HOST_NETBSD], [test "$PLATFORM" = "netbsd"])
412 01a22331 2023-02-26 thomas AM_CONDITIONAL([HOST_OPENBSD], [test "$PLATFORM" = "openbsd"])
413 b26177ad 2022-03-03 thomas AM_CONDITIONAL([HOST_DRAGONFLYBSD], [test "$PLATFORM" = "dragonflybsd"])
414 8cff5e95 2023-03-08 thomas
415 8cff5e95 2023-03-08 thomas # On OpenBSD, these functions are already defined, yet looking for them in
416 8cff5e95 2023-03-08 thomas # this way on OpenBSD breaks <sha2.h> inclusion.
417 8cff5e95 2023-03-08 thomas # FIXME: this needs addressing.
418 8cff5e95 2023-03-08 thomas if test "x$PLATFORM" != "xopenbsd"; then
419 8cff5e95 2023-03-08 thomas AC_CHECK_FUNCS([ \
420 8cff5e95 2023-03-08 thomas SHA256Update \
421 8cff5e95 2023-03-08 thomas SHA384Update \
422 8cff5e95 2023-03-08 thomas SHA512Update \
423 8cff5e95 2023-03-08 thomas ])
424 8cff5e95 2023-03-08 thomas fi
425 92a9e85d 2021-09-24 thomas
426 b29d689b 2023-02-11 thomas # Look for yacc.
427 b29d689b 2023-02-11 thomas if test "YACC_OVERRIDE" = "yes" && test -n "$YACC" \
428 b29d689b 2023-02-11 thomas && ! command -v "$YACC" >/dev/null 2>&1; then
429 b29d689b 2023-02-11 thomas AC_MSG_ERROR("yacc not found: $YACC")
430 b29d689b 2023-02-11 thomas fi
431 b29d689b 2023-02-11 thomas
432 51207398 2022-07-21 thomas if test x"$PLATFORM" = "xdarwin"; then
433 5baa5fe2 2022-09-05 thomas # Check for and/or set HOMEBREW_PREFIX. brew is a common way of
434 5baa5fe2 2022-09-05 thomas # installing applications. The other is MacPorts.
435 5baa5fe2 2022-09-05 thomas #
436 5baa5fe2 2022-09-05 thomas # Before Apple Silicon existed (M1 onward), the paths for applications
437 5baa5fe2 2022-09-05 thomas # installed via homebrew was typically /usr/local. However, with M1
438 5baa5fe2 2022-09-05 thomas # onward, this changed to a different path.
439 5baa5fe2 2022-09-05 thomas #
440 5baa5fe2 2022-09-05 thomas # Rather than hardcode this, check for HOMEBREW_PREFIX in the
441 8e396e19 2022-09-12 thomas # environment if it's already set, and use it. Otherwise, check for
442 5baa5fe2 2022-09-05 thomas # brew(1) and use that. If that fails, default to /usr/local
443 5baa5fe2 2022-09-05 thomas #
444 5baa5fe2 2022-09-05 thomas # This also means that MacPorts should continue to work.
445 8e396e19 2022-09-12 thomas #
446 8e396e19 2022-09-12 thomas # But with MacPorts, we should also check --prefix, and use that if it
447 8e396e19 2022-09-12 thomas # has been supplied.
448 8e396e19 2022-09-12 thomas #
449 8e396e19 2022-09-12 thomas # In both cases, the variable HOMEBREW_PREFIX is used for both.
450 8e396e19 2022-09-12 thomas HB_PREFIX=""
451 8e396e19 2022-09-12 thomas FOUND_BISON="no"
452 8e396e19 2022-09-12 thomas GNUBISON=""
453 8e396e19 2022-09-12 thomas if test -z "$HOMEBREW_PREFIX" -o "$HOMEBREW_PREFIX" = "NONE"; then
454 5baa5fe2 2022-09-05 thomas # HOMEBREW_PREFIX not set, check for brew(1)
455 8e396e19 2022-09-12 thomas if command -v brew >/dev/null 2>&1; then
456 8e396e19 2022-09-12 thomas AC_MSG_NOTICE("HOMEBREW_PREFIX set via 'brew --prefix'")
457 5baa5fe2 2022-09-05 thomas export HOMEBREW_PREFIX="$(brew --prefix)"
458 8e396e19 2022-09-12 thomas fi
459 8e396e19 2022-09-12 thomas
460 8e396e19 2022-09-12 thomas if test -z "$HOMEBREW_PREFIX" -o "$HOMEBREW_PREFIX" = "NONE"
461 8e396e19 2022-09-12 thomas then
462 5baa5fe2 2022-09-05 thomas # Default.
463 8e396e19 2022-09-12 thomas if test -z "${prefix}" -o "${prefix}" = "NONE"; then
464 8e396e19 2022-09-12 thomas export HOMEBREW_PREFIX="/usr/local"
465 8e396e19 2022-09-12 thomas HB_PREFIX="/usr/local"
466 8e396e19 2022-09-12 thomas AC_MSG_NOTICE("HOMEBREW_PREFIX defaulting to $HB_PREFIX")
467 8e396e19 2022-09-12 thomas else
468 8e396e19 2022-09-12 thomas HB_PREFIX="$(eval echo ${prefix})"
469 8e396e19 2022-09-12 thomas if test "$HB_PREFIX" = "NONE"; then
470 8e396e19 2022-09-12 thomas HB_PREFIX="/opt/local"
471 8e396e19 2022-09-12 thomas else
472 8e396e19 2022-09-12 thomas AC_MSG_NOTICE("HOMEBREW_PREFIX using --prefix")
473 8e396e19 2022-09-12 thomas fi
474 8e396e19 2022-09-12 thomas export HOMEBREW_PREFIX="$HB_PREFIX"
475 8e396e19 2022-09-12 thomas fi
476 5baa5fe2 2022-09-05 thomas fi
477 5baa5fe2 2022-09-05 thomas fi
478 5baa5fe2 2022-09-05 thomas
479 8e396e19 2022-09-12 thomas AC_MSG_NOTICE("HOMEBREW_PREFIX determined as: $HOMEBREW_PREFIX")
480 8e396e19 2022-09-12 thomas
481 b29d689b 2023-02-11 thomas if test "$YACC_OVERRIDE" = "no" && \
482 b29d689b 2023-02-11 thomas ! test -x "${HOMEBREW_PREFIX}/opt/bison/bin/bison"; then
483 8e396e19 2022-09-12 thomas AC_MSG_WARN([
484 8e396e19 2022-09-12 thomas "***********************************************************
485 8e396e19 2022-09-12 thomas GNU Bison not found: ${HOMEBREW_PREFIX}/opt/bison/bin/bison
486 8e396e19 2022-09-12 thomas ***********************************************************
487 8e396e19 2022-09-12 thomas
488 8e396e19 2022-09-12 thomas Falling back to checking either /usr/local or \${prefix}"
489 8e396e19 2022-09-12 thomas ])
490 8e396e19 2022-09-12 thomas
491 8e396e19 2022-09-12 thomas FOUND_BISON="no"
492 8e396e19 2022-09-12 thomas AC_MSG_WARN("Trying ${HB_PREFIX}/opt/bison/bin/bison")
493 8e396e19 2022-09-12 thomas if test -x "${HB_PREFIX}/opt/bison/bin/bison"; then
494 8e396e19 2022-09-12 thomas export HOMEBREW_PREFIX="/usr/local"
495 8e396e19 2022-09-12 thomas FOUND_BISON="yes"
496 8e396e19 2022-09-12 thomas GNUBISON="${HB_PREFIX}/opt/bison/bin/bison"
497 8e396e19 2022-09-12 thomas fi
498 8e396e19 2022-09-12 thomas
499 8e396e19 2022-09-12 thomas if test "$FOUND_BISON" = "no"; then
500 8e396e19 2022-09-12 thomas HB_PREFIX="/opt/local"
501 8e396e19 2022-09-12 thomas AC_MSG_WARN("Trying ${HB_PREFIX}/bin/bison")
502 8e396e19 2022-09-12 thomas
503 8e396e19 2022-09-12 thomas if test -x "${HB_PREFIX}/bin/bison"; then
504 8e396e19 2022-09-12 thomas export HOMEBREW_PREFIX="${HB_PREFIX}"
505 8e396e19 2022-09-12 thomas GNUBISON="${HB_PREFIX}/bin/bison"
506 8e396e19 2022-09-12 thomas FOUND_BISON="yes"
507 8e396e19 2022-09-12 thomas fi
508 8e396e19 2022-09-12 thomas fi
509 8e396e19 2022-09-12 thomas else
510 8e396e19 2022-09-12 thomas FOUND_BISON="yes"
511 8e396e19 2022-09-12 thomas GNUBISON="${HOMEBREW_PREFIX}/opt/bison/bin/bison"
512 8e396e19 2022-09-12 thomas fi
513 8e396e19 2022-09-12 thomas
514 b29d689b 2023-02-11 thomas if test "$FOUND_BISON" = "no" && test "$YACC_OVERRIDE" = "no"; then
515 8e396e19 2022-09-12 thomas AC_MSG_ERROR("*** Couldn't find GNU BISON ***")
516 51207398 2022-07-21 thomas fi
517 8e396e19 2022-09-12 thomas
518 51207398 2022-07-21 thomas # Override YACC here to point to the GNU version of bison.
519 b29d689b 2023-02-11 thomas if test "$YACC_OVERRIDE" = "yes"; then
520 b29d689b 2023-02-11 thomas export YACC="$YACC -y"
521 b29d689b 2023-02-11 thomas else
522 b29d689b 2023-02-11 thomas AC_MSG_NOTICE("Found GNU Bison as: $GNUBISON")
523 b29d689b 2023-02-11 thomas export YACC="${GNUBISON} -y"
524 b29d689b 2023-02-11 thomas fi
525 8e396e19 2022-09-12 thomas export LDFLAGS="-L${HOMEBREW_PREFIX}/opt/ncurses/lib -L${HOMEBREW_PREFIX}/opt/openssl@3/lib $LDFLAGS"
526 5baa5fe2 2022-09-05 thomas export CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/ncurses/include -I${HOMEBREW_PREFIX}/opt/openssl@3/include $CPPFLAGS"
527 5baa5fe2 2022-09-05 thomas export PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/ncurses/lib/pkgconfig"
528 5baa5fe2 2022-09-05 thomas export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${HOMEBREW_PREFIX}/opt/openssl@3/lib/pkgconfig"
529 51207398 2022-07-21 thomas fi
530 51207398 2022-07-21 thomas
531 97799ccd 2022-02-06 thomas # Landlock detection.
532 97799ccd 2022-02-06 thomas AC_MSG_CHECKING([for landlock])
533 97799ccd 2022-02-06 thomas AM_CONDITIONAL([HAVE_LINUX_LANDLOCK],
534 97799ccd 2022-02-06 thomas [test "x$ac_cv_header_linux_landlock_h" = "xyes"])
535 97799ccd 2022-02-06 thomas if test "x$ac_cv_header_linux_landlock_h" = "xyes"; then
536 97799ccd 2022-02-06 thomas AC_MSG_RESULT(yes)
537 97799ccd 2022-02-06 thomas else
538 97799ccd 2022-02-06 thomas AC_MSG_RESULT(no)
539 97799ccd 2022-02-06 thomas fi
540 97799ccd 2022-02-06 thomas
541 dd038bc6 2021-09-21 thomas.ad # Clang sanitizers wrap reallocarray even if it isn't available on the target
542 dd038bc6 2021-09-21 thomas.ad # system. When compiled it always returns NULL and crashes the program. To
543 dd038bc6 2021-09-21 thomas.ad # detect this we need a more complicated test.
544 dd038bc6 2021-09-21 thomas.ad AC_MSG_CHECKING([for working reallocarray])
545 dd038bc6 2021-09-21 thomas.ad AC_RUN_IFELSE([AC_LANG_PROGRAM(
546 dd038bc6 2021-09-21 thomas.ad [#include <stdlib.h>],
547 dd038bc6 2021-09-21 thomas.ad [return (reallocarray(NULL, 1, 1) == NULL);]
548 dd038bc6 2021-09-21 thomas.ad )],
549 dd038bc6 2021-09-21 thomas.ad AC_MSG_RESULT(yes),
550 7f20c2a8 2022-05-13 op [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])],
551 dd038bc6 2021-09-21 thomas.ad [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])]
552 dd038bc6 2021-09-21 thomas.ad )
553 dd038bc6 2021-09-21 thomas.ad AC_MSG_CHECKING([for working recallocarray])
554 dd038bc6 2021-09-21 thomas.ad AC_RUN_IFELSE([AC_LANG_PROGRAM(
555 dd038bc6 2021-09-21 thomas.ad [#include <stdlib.h>],
556 dd038bc6 2021-09-21 thomas.ad [return (recallocarray(NULL, 1, 1, 1) == NULL);]
557 dd038bc6 2021-09-21 thomas.ad )],
558 dd038bc6 2021-09-21 thomas.ad AC_MSG_RESULT(yes),
559 7f20c2a8 2022-05-13 op [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])],
560 dd038bc6 2021-09-21 thomas.ad [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])]
561 dd038bc6 2021-09-21 thomas.ad )
562 dd038bc6 2021-09-21 thomas.ad
563 dd038bc6 2021-09-21 thomas.ad # Look for imsg_init in libutil.
564 dd038bc6 2021-09-21 thomas.ad AC_SEARCH_LIBS(imsg_init, util, found_imsg_init=yes, found_imsg_init=no)
565 f600ad76 2023-01-06 thomas AM_CONDITIONAL([HAVE_IMSG], [test "x$found_imsg_init" = "xyes"])
566 4fccd2fe 2023-03-08 thomas if test "x$found_imsg_init" = "xyes"; then
567 d9b944c7 2023-03-08 thomas AC_DEFINE([HAVE_IMSG], [1], [Define to 1 if imsg is declared in libutil])
568 4fccd2fe 2023-03-08 thomas libutil_LIBS="$ac_cv_search_imsg_init"
569 4fccd2fe 2023-03-08 thomas AC_SUBST(libutil_LIBS)
570 ff36aeea 2022-07-16 thomas fi
571 ff36aeea 2022-07-16 thomas
572 ff36aeea 2022-07-16 thomas # libevent (for gotwebd). Lifted from tmux.
573 ff36aeea 2022-07-16 thomas # Look for libevent. Try libevent_core or libevent with pkg-config first then
574 ff36aeea 2022-07-16 thomas # look for the library.
575 4fccd2fe 2023-03-08 thomas found_libevent=no
576 ff36aeea 2022-07-16 thomas PKG_CHECK_MODULES(
577 ff36aeea 2022-07-16 thomas LIBEVENT_CORE,
578 ff36aeea 2022-07-16 thomas [libevent_core >= 2],
579 ff36aeea 2022-07-16 thomas [
580 4fccd2fe 2023-03-08 thomas libevent_CFLAGS="$LIBEVENT_CORE_CFLAGS"
581 4fccd2fe 2023-03-08 thomas libevent_LIBS="$LIBEVENT_CORE_LIBS"
582 4fccd2fe 2023-03-08 thomas AC_SUBST(libevent_CFLAGS)
583 4fccd2fe 2023-03-08 thomas AC_SUBST(libevent_LIBS)
584 ff36aeea 2022-07-16 thomas found_libevent=yes
585 ff36aeea 2022-07-16 thomas ],
586 ff36aeea 2022-07-16 thomas found_libevent=no
587 ff36aeea 2022-07-16 thomas )
588 ff36aeea 2022-07-16 thomas if test x$found_libevent = xno; then
589 ff36aeea 2022-07-16 thomas PKG_CHECK_MODULES(
590 ff36aeea 2022-07-16 thomas LIBEVENT,
591 ff36aeea 2022-07-16 thomas [libevent >= 2],
592 ff36aeea 2022-07-16 thomas [
593 4fccd2fe 2023-03-08 thomas libevent_CFLAGS="$LIBEVENT_CFLAGS"
594 4fccd2fe 2023-03-08 thomas libevent_LIBS="$LIBEVENT_LIBS"
595 4fccd2fe 2023-03-08 thomas AC_SUBST(libevent_CFLAGS)
596 4fccd2fe 2023-03-08 thomas AC_SUBST(libevent_LIBS)
597 ff36aeea 2022-07-16 thomas found_libevent=yes
598 ff36aeea 2022-07-16 thomas ],
599 ff36aeea 2022-07-16 thomas found_libevent=no
600 ff36aeea 2022-07-16 thomas )
601 ff36aeea 2022-07-16 thomas fi
602 ff36aeea 2022-07-16 thomas if test x$found_libevent = xno; then
603 ff36aeea 2022-07-16 thomas AC_SEARCH_LIBS(
604 ff36aeea 2022-07-16 thomas event_init,
605 ff36aeea 2022-07-16 thomas [event_core event event-1.4],
606 ff36aeea 2022-07-16 thomas found_libevent=yes,
607 ff36aeea 2022-07-16 thomas found_libevent=no
608 ff36aeea 2022-07-16 thomas )
609 4fccd2fe 2023-03-08 thomas
610 4fccd2fe 2023-03-08 thomas if test "x$found_libevent" = "xyes"; then
611 4fccd2fe 2023-03-08 thomas libevent_LIBS="$ac_cv_search_event_init"
612 4fccd2fe 2023-03-08 thomas AC_SUBST(libevent_LIBS)
613 4fccd2fe 2023-03-08 thomas fi
614 ff36aeea 2022-07-16 thomas fi
615 4fccd2fe 2023-03-08 thomas
616 4fccd2fe 2023-03-08 thomas if test x$found_libevent = xno; then
617 ff36aeea 2022-07-16 thomas AC_CHECK_HEADER(
618 ff36aeea 2022-07-16 thomas event2/event.h,
619 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_EVENT2_EVENT_H], [1], [libevent2 has event.h]),
620 ff36aeea 2022-07-16 thomas [
621 ff36aeea 2022-07-16 thomas AC_CHECK_HEADER(
622 ff36aeea 2022-07-16 thomas event.h,
623 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_EVENT_H], [0], [libevent]),
624 ff36aeea 2022-07-16 thomas found_libevent=no
625 ff36aeea 2022-07-16 thomas )
626 ff36aeea 2022-07-16 thomas ]
627 ff36aeea 2022-07-16 thomas )
628 4fccd2fe 2023-03-08 thomas fi
629 4fccd2fe 2023-03-08 thomas
630 ff36aeea 2022-07-16 thomas if test "x$found_libevent" = xno; then
631 ff36aeea 2022-07-16 thomas AC_MSG_ERROR("libevent not found")
632 92a9e85d 2021-09-24 thomas fi
633 92a9e85d 2021-09-24 thomas
634 4fccd2fe 2023-03-08 thomas AC_CHECK_FUNC([uuid_create], [found_uuid=yes], [found_uuid=no])
635 dd038bc6 2021-09-21 thomas.ad
636 d24ddaa6 2022-02-26 thomas # Don't define HAVE_BSD_UUID on darwin (Apple) as this breaks the BSD API.
637 d24ddaa6 2022-02-26 thomas # Instead, use the UUID implementation wrapper that's in compat/ plus uuid
638 d24ddaa6 2022-02-26 thomas # ossp
639 d24ddaa6 2022-02-26 thomas if test "x$found_uuid" = "xyes" -a "x$PLATFORM" != "darwin"; then
640 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_BSD_UUID], [1], [BSD UUID])
641 326237a6 2021-09-25 thomas else
642 326237a6 2021-09-25 thomas PKG_CHECK_MODULES(
643 326237a6 2021-09-25 thomas LIBUUID,
644 326237a6 2021-09-25 thomas uuid,
645 326237a6 2021-09-25 thomas [
646 4fccd2fe 2023-03-08 thomas libuuid_CFLAGS="$LIBUUID_CFLAGS"
647 4fccd2fe 2023-03-08 thomas libuuid_LIBS="$LIBUUID_LIBS"
648 4fccd2fe 2023-03-08 thomas AC_SUBST(libuuid_CFLAGS)
649 4fccd2fe 2023-03-08 thomas AC_SUBST(libuuid_LIBS)
650 326237a6 2021-09-25 thomas found_libuuid=yes
651 326237a6 2021-09-25 thomas ],
652 326237a6 2021-09-25 thomas [
653 326237a6 2021-09-25 thomas found_libuuid=no
654 326237a6 2021-09-25 thomas ]
655 326237a6 2021-09-25 thomas )
656 dd038bc6 2021-09-21 thomas.ad
657 326237a6 2021-09-25 thomas if test "x$found_libuuid" = "xno"; then
658 326237a6 2021-09-25 thomas AC_CHECK_HEADER(
659 326237a6 2021-09-25 thomas uuid.h,
660 326237a6 2021-09-25 thomas found_libuuid=yes,
661 326237a6 2021-09-25 thomas found_libuuid=no)
662 326237a6 2021-09-25 thomas fi
663 92a9e85d 2021-09-24 thomas fi
664 dd038bc6 2021-09-21 thomas.ad
665 92a9e85d 2021-09-24 thomas if test "x$found_libuuid" = "xno"; then
666 92a9e85d 2021-09-24 thomas AC_MSG_ERROR("*** couldn't find uuid ***")
667 92a9e85d 2021-09-24 thomas fi
668 92a9e85d 2021-09-24 thomas
669 dd038bc6 2021-09-21 thomas.ad PKG_CHECK_MODULES(
670 dd038bc6 2021-09-21 thomas.ad ZLIB,
671 dd038bc6 2021-09-21 thomas.ad zlib,
672 dd038bc6 2021-09-21 thomas.ad [
673 4fccd2fe 2023-03-08 thomas zlib_CFLAGS="$ZLIB_CFLAGS"
674 4fccd2fe 2023-03-08 thomas zlib_LIBS="$ZLIB_LIBS"
675 4fccd2fe 2023-03-08 thomas AC_SUBST(zlib_CFLAGS)
676 4fccd2fe 2023-03-08 thomas AC_SUBST(zlib_LIBS)
677 dd038bc6 2021-09-21 thomas.ad found_zlib=yes
678 dd038bc6 2021-09-21 thomas.ad ],
679 dd038bc6 2021-09-21 thomas.ad [
680 92a9e85d 2021-09-24 thomas found_zlib=no
681 dd038bc6 2021-09-21 thomas.ad ]
682 dd038bc6 2021-09-21 thomas.ad )
683 dd038bc6 2021-09-21 thomas.ad
684 92a9e85d 2021-09-24 thomas if test "x$found_zlib" = "xno"; then
685 92a9e85d 2021-09-24 thomas AC_CHECK_HEADER(
686 92a9e85d 2021-09-24 thomas zlib.h,
687 92a9e85d 2021-09-24 thomas ,
688 92a9e85d 2021-09-24 thomas found_zlib=no)
689 92a9e85d 2021-09-24 thomas fi
690 dd038bc6 2021-09-21 thomas.ad
691 92a9e85d 2021-09-24 thomas if test "x$found_zlib" = "xno"; then
692 92a9e85d 2021-09-24 thomas AC_MSG_ERROR("*** couldn't find zlib ***")
693 92a9e85d 2021-09-24 thomas fi
694 dd038bc6 2021-09-21 thomas.ad
695 92a9e85d 2021-09-24 thomas if test "$PLATFORM" = "linux"; then
696 92a9e85d 2021-09-24 thomas PKG_CHECK_MODULES(
697 92a9e85d 2021-09-24 thomas LIBBSD,
698 92a9e85d 2021-09-24 thomas libbsd-overlay,
699 92a9e85d 2021-09-24 thomas [
700 4fccd2fe 2023-03-08 thomas libbsd_CFLAGS="$LIBBSD_CFLAGS"
701 4fccd2fe 2023-03-08 thomas libbsd_LIBS="$LIBBSD_LIBS"
702 4fccd2fe 2023-03-08 thomas AC_SUBST(libbsd_CFLAGS)
703 4fccd2fe 2023-03-08 thomas AC_SUBST(libbsd_LIBS)
704 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_LIBBSD], [1], [BSD UUID])
705 92a9e85d 2021-09-24 thomas ],
706 46384c6e 2022-09-13 thomas [
707 46384c6e 2022-09-13 thomas AC_MSG_ERROR("*** couldn't find libbsd-overlay via pkg-config")
708 46384c6e 2022-09-13 thomas ]
709 46384c6e 2022-09-13 thomas
710 92a9e85d 2021-09-24 thomas )
711 4fccd2fe 2023-03-08 thomas
712 4fccd2fe 2023-03-08 thomas # Add LIBBSD_{CFLAGS,LIBS} to the environment here, as libbsd puts its
713 4fccd2fe 2023-03-08 thomas # header files in a non-standard location, which means the overlay for
714 4fccd2fe 2023-03-08 thomas # <sys/tree.h> and <sys/queue.h> won't be found.
715 4fccd2fe 2023-03-08 thomas CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
716 4fccd2fe 2023-03-08 thomas LIBS="$LIBS $LIBBSD_LIBS"
717 5007bd0d 2023-04-14 thomas
718 5007bd0d 2023-04-14 thomas PKG_CHECK_MODULES(
719 5007bd0d 2023-04-14 thomas LIBMD,
720 5007bd0d 2023-04-14 thomas libmd,
721 5007bd0d 2023-04-14 thomas [
722 5007bd0d 2023-04-14 thomas libmd_CFLAGS="$LIBMD_CFLAGS"
723 5007bd0d 2023-04-14 thomas libmd_LIBS="$LIBMD_LIBS"
724 5007bd0d 2023-04-14 thomas AC_SUBST(libmd_CFLAGS)
725 5007bd0d 2023-04-14 thomas AC_SUBST(libmd_LIBS)
726 5007bd0d 2023-04-14 thomas ], []
727 5007bd0d 2023-04-14 thomas )
728 5007bd0d 2023-04-14 thomas CFLAGS="$CFLAGS $LIBMD_CFLAGS"
729 5007bd0d 2023-04-14 thomas LIBS="$LIBS $LIBMD_LIBS"
730 5007bd0d 2023-04-14 thomas
731 92a9e85d 2021-09-24 thomas fi
732 92a9e85d 2021-09-24 thomas
733 dd038bc6 2021-09-21 thomas.ad # Look for a suitable queue.h. We hope libbsd is enough, but that is missing
734 8dbd2d50 2022-08-12 thomas # some declarations.
735 dd038bc6 2021-09-21 thomas.ad AC_CHECK_DECL(
736 dd038bc6 2021-09-21 thomas.ad TAILQ_CONCAT,
737 dd038bc6 2021-09-21 thomas.ad found_queue_h=yes,
738 dd038bc6 2021-09-21 thomas.ad found_queue_h=no,
739 8dbd2d50 2022-08-12 thomas [#include <sys/queue.h>]
740 dd038bc6 2021-09-21 thomas.ad )
741 dd038bc6 2021-09-21 thomas.ad AC_CHECK_DECL(
742 dd038bc6 2021-09-21 thomas.ad TAILQ_PREV,
743 19467d59 2022-07-16 thomas ,
744 dd038bc6 2021-09-21 thomas.ad found_queue_h=no,
745 8dbd2d50 2022-08-12 thomas [#include <sys/queue.h>]
746 dd038bc6 2021-09-21 thomas.ad )
747 dd038bc6 2021-09-21 thomas.ad AC_CHECK_DECL(
748 dd038bc6 2021-09-21 thomas.ad TAILQ_FOREACH_SAFE,
749 dd038bc6 2021-09-21 thomas.ad ,
750 dd038bc6 2021-09-21 thomas.ad found_queue_h=no,
751 8dbd2d50 2022-08-12 thomas [#include <sys/queue.h>]
752 dd038bc6 2021-09-21 thomas.ad )
753 19467d59 2022-07-16 thomas
754 8dbd2d50 2022-08-12 thomas if test "x$found_queue_h" = xyes; then
755 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_QUEUE_H], [1], [sys/queue.h])
756 46384c6e 2022-09-13 thomas else
757 46384c6e 2022-09-13 thomas AC_MSG_ERROR("*** sys/queue.h missing key defines ***)
758 dd038bc6 2021-09-21 thomas.ad fi
759 c59427c5 2022-10-13 thomas
760 c59427c5 2022-10-13 thomas AC_CHECK_DECL(
761 c59427c5 2022-10-13 thomas RB_GENERATE_STATIC,
762 c59427c5 2022-10-13 thomas found_sys_tree_h=yes,
763 c59427c5 2022-10-13 thomas found_sys_tree_h=no,
764 c59427c5 2022-10-13 thomas [#include <sys/tree.h>]
765 c59427c5 2022-10-13 thomas )
766 dd038bc6 2021-09-21 thomas.ad
767 a58e44b0 2024-03-30 thomas #FIXME: May need OS-wrapping.
768 a58e44b0 2024-03-30 thomas PKG_CHECK_MODULES(
769 a58e44b0 2024-03-30 thomas LIBTLS,
770 a58e44b0 2024-03-30 thomas [libtls],
771 a58e44b0 2024-03-30 thomas [
772 a58e44b0 2024-03-30 thomas libtls_CFLAGS="$LIBTLS_CFLAGS"
773 a58e44b0 2024-03-30 thomas libtls_LIBS="$LIBTLS_LIBS"
774 a58e44b0 2024-03-30 thomas AC_SUBST(libtls_CFLAGS)
775 a58e44b0 2024-03-30 thomas AC_SUBST(libtls_LIBS)
776 a58e44b0 2024-03-30 thomas ],
777 a58e44b0 2024-03-30 thomas AC_MSG_ERROR(["*** Couldn't find libtls ***"])
778 a58e44b0 2024-03-30 thomas )
779 46384c6e 2022-09-13 thomas
780 dd038bc6 2021-09-21 thomas.ad # Look for __progname.
781 dd038bc6 2021-09-21 thomas.ad AC_MSG_CHECKING(for __progname)
782 dd038bc6 2021-09-21 thomas.ad AC_LINK_IFELSE([AC_LANG_SOURCE(
783 dd038bc6 2021-09-21 thomas.ad [
784 dd038bc6 2021-09-21 thomas.ad #include <stdio.h>
785 dd038bc6 2021-09-21 thomas.ad #include <stdlib.h>
786 dd038bc6 2021-09-21 thomas.ad extern char *__progname;
787 dd038bc6 2021-09-21 thomas.ad int main(void) {
788 dd038bc6 2021-09-21 thomas.ad const char *cp = __progname;
789 dd038bc6 2021-09-21 thomas.ad printf("%s\n", cp);
790 dd038bc6 2021-09-21 thomas.ad exit(0);
791 dd038bc6 2021-09-21 thomas.ad }
792 dd038bc6 2021-09-21 thomas.ad ])],
793 47dc83f5 2023-03-08 thomas [AC_DEFINE([HAVE___PROGNAME], [1], [___progname]) AC_MSG_RESULT(yes)],
794 47dc83f5 2023-03-08 thomas [AC_MSG_RESULT(no)]
795 dd038bc6 2021-09-21 thomas.ad )
796 dd038bc6 2021-09-21 thomas.ad
797 d9e4d43f 2022-03-03 thomas PKG_CHECK_MODULES(
798 d9e4d43f 2022-03-03 thomas LIBPANELW,
799 d9e4d43f 2022-03-03 thomas panelw,
800 d3f1e38b 2023-03-08 thomas LIBPANELW_LIBS="$LIBPANELW_LIBS"
801 d9e4d43f 2022-03-03 thomas found_panel=yes,
802 d9e4d43f 2022-03-03 thomas found_panel=no
803 d9e4d43f 2022-03-03 thomas )
804 d9e4d43f 2022-03-03 thomas
805 d3f1e38b 2023-03-08 thomas if test "x$found_panel" = "xno"; then
806 d9e4d43f 2022-03-03 thomas PKG_CHECK_MODULES(
807 d9e4d43f 2022-03-03 thomas LIBPANELW,
808 d9e4d43f 2022-03-03 thomas gnupanelw,
809 d3f1e38b 2023-03-08 thomas [
810 d3f1e38b 2023-03-08 thomas LIBPANELW_LIBS="$LIBPANELW_LIBS"
811 d3f1e38b 2023-03-08 thomas found_panel=yes
812 d3f1e38b 2023-03-08 thomas ],
813 d9e4d43f 2022-03-03 thomas found_panel=no
814 d9e4d43f 2022-03-03 thomas )
815 d3f1e38b 2023-03-08 thomas fi
816 d9e4d43f 2022-03-03 thomas
817 d3f1e38b 2023-03-08 thomas if test "x$found_panel" = "xno"; then
818 b26177ad 2022-03-03 thomas PKG_CHECK_MODULES(
819 b26177ad 2022-03-03 thomas LIBPANELW,
820 b26177ad 2022-03-03 thomas panel,
821 d3f1e38b 2023-03-08 thomas [
822 d3f1e38b 2023-03-08 thomas LIBPANELW_LIBS="$LIBPANELW_LIBS"
823 d3f1e38b 2023-03-08 thomas found_panel=yes
824 d3f1e38b 2023-03-08 thomas ],
825 b26177ad 2022-03-03 thomas found_panel=no
826 b26177ad 2022-03-03 thomas )
827 d3f1e38b 2023-03-08 thomas fi
828 d3f1e38b 2023-03-08 thomas
829 d9e4d43f 2022-03-03 thomas if test "x$found_panel" = "xno"; then
830 947fe78c 2023-01-06 thomas AC_CHECK_LIB(panelw, update_panels, [],
831 947fe78c 2023-01-06 thomas AC_MSG_ERROR([ "*** panelw not found for ncurses. ***"]),
832 947fe78c 2023-01-06 thomas [-lncurses]
833 92a9e85d 2021-09-24 thomas )
834 acf52a76 2021-09-21 thomas.ad
835 92a9e85d 2021-09-24 thomas fi
836 92a9e85d 2021-09-24 thomas
837 acf52a76 2021-09-21 thomas.ad PKG_CHECK_MODULES(
838 acf52a76 2021-09-21 thomas.ad LIBNCURSES,
839 acf52a76 2021-09-21 thomas.ad ncursesw,
840 dd038bc6 2021-09-21 thomas.ad found_ncurses=yes,
841 dd038bc6 2021-09-21 thomas.ad found_ncurses=no
842 dd038bc6 2021-09-21 thomas.ad )
843 acf52a76 2021-09-21 thomas.ad if test "x$found_ncurses" = xyes; then
844 4fccd2fe 2023-03-08 thomas libncurses_CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $LIBPANELW_CFLAGS"
845 4fccd2fe 2023-03-08 thomas libncurses_LIBS="$LIBNCURSES_LIBS $LIBTINFO_LIBS $LIBPANELW_LIBS"
846 4fccd2fe 2023-03-08 thomas AC_SUBST(libncurses_CFLAGS)
847 4fccd2fe 2023-03-08 thomas AC_SUBST(libncurses_LIBS)
848 dd038bc6 2021-09-21 thomas.ad else
849 4fccd2fe 2023-03-08 thomas AC_SEARCH_LIBS(
850 dd038bc6 2021-09-21 thomas.ad setupterm,
851 dd038bc6 2021-09-21 thomas.ad found_ncurses=yes,
852 dd038bc6 2021-09-21 thomas.ad found_ncurses=no
853 dd038bc6 2021-09-21 thomas.ad )
854 dd038bc6 2021-09-21 thomas.ad if test "x$found_ncurses" = xyes; then
855 dd038bc6 2021-09-21 thomas.ad AC_CHECK_HEADER(
856 dd038bc6 2021-09-21 thomas.ad ncurses.h,
857 4fccd2fe 2023-03-08 thomas libncurses_CFLAGS="$LIBPANELW_CFLAGS $LIBPANEL_CFLAGS"
858 4fccd2fe 2023-03-08 thomas libncurses_LIBS="$LIBPANELW_LIBS -lncursesw"
859 4fccd2fe 2023-03-08 thomas AC_SUBST(libncurses_CFLAGS)
860 4fccd2fe 2023-03-08 thomas AC_SUBST(libncurses_LIBS)
861 acf52a76 2021-09-21 thomas.ad )
862 92a9e85d 2021-09-24 thomas fi
863 dd038bc6 2021-09-21 thomas.ad fi
864 dd038bc6 2021-09-21 thomas.ad if test "x$found_ncurses" = xyes; then
865 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_NCURSES_H], [1], [NCurses])
866 dd038bc6 2021-09-21 thomas.ad else
867 dd038bc6 2021-09-21 thomas.ad # No ncurses, try curses.
868 4fccd2fe 2023-03-08 thomas AC_CHECK_FUNC(
869 dd038bc6 2021-09-21 thomas.ad setupterm,
870 dd038bc6 2021-09-21 thomas.ad found_curses=yes,
871 dd038bc6 2021-09-21 thomas.ad found_curses=no
872 dd038bc6 2021-09-21 thomas.ad )
873 dd038bc6 2021-09-21 thomas.ad AC_CHECK_HEADER(
874 dd038bc6 2021-09-21 thomas.ad curses.h,
875 4fccd2fe 2023-03-08 thomas found_curses=yes,
876 dd038bc6 2021-09-21 thomas.ad found_curses=no)
877 dd038bc6 2021-09-21 thomas.ad if test "x$found_curses" = xyes; then
878 4fccd2fe 2023-03-08 thomas libncurses_CFLAGS="$LIBPANELW_CFLAGS $LIBPANEL_CFLAGS"
879 d3f1e38b 2023-03-08 thomas libncurses_LIBS="$LIBPANELW_LIBS -lncursesw -lpanelw"
880 4fccd2fe 2023-03-08 thomas AC_SUBST(libncurses_CFLAGS)
881 4fccd2fe 2023-03-08 thomas AC_SUBST(libncurses_LIBS)
882 47dc83f5 2023-03-08 thomas AC_DEFINE([HAVE_CURSES_H], [1], [Curses_h])
883 dd038bc6 2021-09-21 thomas.ad else
884 dd038bc6 2021-09-21 thomas.ad AC_MSG_ERROR("curses not found")
885 dd038bc6 2021-09-21 thomas.ad fi
886 dd038bc6 2021-09-21 thomas.ad fi
887 dd038bc6 2021-09-21 thomas.ad
888 dd038bc6 2021-09-21 thomas.ad # Save our CFLAGS/CPPFLAGS/LDFLAGS for the Makefile and restore the old user
889 dd038bc6 2021-09-21 thomas.ad # variables.
890 dd038bc6 2021-09-21 thomas.ad AC_SUBST(AM_CPPFLAGS)
891 dd038bc6 2021-09-21 thomas.ad CPPFLAGS="$SAVED_CPPFLAGS"
892 dd038bc6 2021-09-21 thomas.ad AC_SUBST(AM_CFLAGS)
893 dd038bc6 2021-09-21 thomas.ad CFLAGS="$SAVED_CFLAGS"
894 dd038bc6 2021-09-21 thomas.ad AC_SUBST(AM_LDFLAGS)
895 dd038bc6 2021-09-21 thomas.ad LDFLAGS="$SAVED_LDFLAGS"
896 dd038bc6 2021-09-21 thomas.ad
897 943e9ed2 2023-03-08 thomas # LIBS is designed to accumulate library dependencies as checks for them are
898 943e9ed2 2023-03-08 thomas # peformed, so that this can be included directly to ld(1).
899 943e9ed2 2023-03-08 thomas #
900 943e9ed2 2023-03-08 thomas # However, this hinders the splitting up of the library dependencies so that
901 943e9ed2 2023-03-08 thomas # they're targetted just where they're needed. Flatting LIBS here ensures
902 943e9ed2 2023-03-08 thomas # that this happens appropriately.
903 943e9ed2 2023-03-08 thomas LIBS=""
904 4fccd2fe 2023-03-08 thomas
905 47dc83f5 2023-03-08 thomas AH_BOTTOM([#include "got_compat2.h"])
906 47dc83f5 2023-03-08 thomas
907 2f1efc18 2023-08-29 thomas AM_CONDITIONAL([GOTD_ENABLED], [test "x$enable_gotd" = xyes])
908 a77903c9 2023-09-24 thomas AM_CONDITIONAL([CVG_ENABLED], [test "x$enable_cvg" = xyes])
909 2f1efc18 2023-08-29 thomas
910 dd038bc6 2021-09-21 thomas.ad AC_CONFIG_FILES([Makefile
911 dd038bc6 2021-09-21 thomas.ad compat/Makefile
912 dd038bc6 2021-09-21 thomas.ad libexec/Makefile
913 dd038bc6 2021-09-21 thomas.ad libexec/got-read-tree/Makefile
914 dd038bc6 2021-09-21 thomas.ad libexec/got-fetch-pack/Makefile
915 dd038bc6 2021-09-21 thomas.ad libexec/got-index-pack/Makefile
916 dd038bc6 2021-09-21 thomas.ad libexec/got-read-blob/Makefile
917 dd038bc6 2021-09-21 thomas.ad libexec/got-read-commit/Makefile
918 dd038bc6 2021-09-21 thomas.ad libexec/got-read-gitconfig/Makefile
919 dd038bc6 2021-09-21 thomas.ad libexec/got-read-gotconfig/Makefile
920 dd038bc6 2021-09-21 thomas.ad libexec/got-read-object/Makefile
921 dd038bc6 2021-09-21 thomas.ad libexec/got-read-pack/Makefile
922 973f3f6e 2022-03-07 thomas libexec/got-read-patch/Makefile
923 dd038bc6 2021-09-21 thomas.ad libexec/got-read-tag/Makefile
924 dd038bc6 2021-09-21 thomas.ad libexec/got-send-pack/Makefile
925 dd038bc6 2021-09-21 thomas.ad got/Makefile
926 2b0eee35 2021-09-21 thomas.ad gotadmin/Makefile
927 ff36aeea 2022-07-16 thomas gotwebd/Makefile
928 d3f2ad5e 2021-09-21 thomas.ad tog/Makefile
929 5a7ef102 2021-10-09 thomas Makefile.common:Makefile.common.in])
930 2f1efc18 2023-08-29 thomas
931 2f1efc18 2023-08-29 thomas if test "x$enable_gotd" = "xyes"; then
932 3770e055 2023-08-29 thomas AC_CONFIG_FILES([gitwrapper/Makefile])
933 2f1efc18 2023-08-29 thomas AC_CONFIG_FILES([gotd/Makefile])
934 b2ce1dae 2024-03-30 thomas AC_CONFIG_FILES([gotd/libexec/Makefile])
935 b2ce1dae 2024-03-30 thomas AC_CONFIG_FILES([gotd/libexec/got-notify-email/Makefile])
936 a58e44b0 2024-03-30 thomas AC_CONFIG_FILES([gotd/libexec/got-notify-http/Makefile])
937 52daa6ad 2023-08-29 thomas AC_CONFIG_FILES([gotsh/Makefile])
938 40de210a 2023-08-29 thomas AC_CONFIG_FILES([gotctl/Makefile])
939 2f1efc18 2023-08-29 thomas fi
940 2f1efc18 2023-08-29 thomas
941 a77903c9 2023-09-24 thomas if test "x$enable_cvg" = "xyes"; then
942 a77903c9 2023-09-24 thomas AC_CONFIG_FILES([cvg/Makefile])
943 a77903c9 2023-09-24 thomas fi
944 a77903c9 2023-09-24 thomas
945 dd038bc6 2021-09-21 thomas.ad AC_OUTPUT
946 dd038bc6 2021-09-21 thomas.ad
947 9ffe20fd 2022-09-10 thomas executables="$(eval echo ${exec_prefix}/bin)"
948 9ffe20fd 2022-09-10 thomas helpers="$(eval echo ${libexecdir})"
949 9ffe20fd 2022-09-10 thomas manpages="$(eval echo ${mandir})"
950 8dafd587 2023-08-29 thomas gotdep="$GOTD_EMPTY_PATHC"
951 8dafd587 2023-08-29 thomas gotgwlep="$GITWRAPPER_LIBEXEC_PATHC"
952 9ffe20fd 2022-09-10 thomas
953 2f1efc18 2023-08-29 thomas if test -z "$enable_gotd"; then
954 2f1efc18 2023-08-29 thomas enable_gotd="no"
955 8dafd587 2023-08-29 thomas gotdep="N/A"
956 8dafd587 2023-08-29 thomas gotgwlep="N/A"
957 8dafd587 2023-08-29 thomas fi
958 8dafd587 2023-08-29 thomas
959 36d7ed1e 2023-11-30 thomas if test -z "$enable_cvg"; then
960 36d7ed1e 2023-11-30 thomas enable_cvg="no"
961 36d7ed1e 2023-11-30 thomas fi
962 36d7ed1e 2023-11-30 thomas
963 8dafd587 2023-08-29 thomas if test -z "$gotdep"; then
964 8dafd587 2023-08-29 thomas gotdep="N/A"
965 2f1efc18 2023-08-29 thomas fi
966 2f1efc18 2023-08-29 thomas
967 8dafd587 2023-08-29 thomas if test -z "$gotgwlep"; then
968 8dafd587 2023-08-29 thomas gotgwlep="N/A"
969 8dafd587 2023-08-29 thomas fi
970 8dafd587 2023-08-29 thomas
971 9ffe20fd 2022-09-10 thomas echo "
972 9ffe20fd 2022-09-10 thomas Configured got-portable with:
973 9ffe20fd 2022-09-10 thomas
974 9ffe20fd 2022-09-10 thomas Version: $VERSION
975 9ffe20fd 2022-09-10 thomas
976 8dafd587 2023-08-29 thomas Prefix: ${prefix}
977 8dafd587 2023-08-29 thomas Executables: ${executables}
978 8dafd587 2023-08-29 thomas Bison: $YACC
979 8dafd587 2023-08-29 thomas CFlags: $CFLAGS
980 36d7ed1e 2023-11-30 thomas cvg: ${enable_cvg}
981 8dafd587 2023-08-29 thomas Gotd: ${enable_gotd}
982 8dafd587 2023-08-29 thomas Empty Path: ${gotdep}
983 8dafd587 2023-08-29 thomas Gitwrapper: ${gotgwlep}
984 8dafd587 2023-08-29 thomas Helpers: ${helpers}
985 8dafd587 2023-08-29 thomas Man pages: ${manpages}
986 9ffe20fd 2022-09-10 thomas "