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