portable: sha1.h
[got-portable.git] / configure.ac
blob5cbed704667c0074ac83e8335515f5a52f564c63
1 # Process this file with autoconf to produce a configure script.
3 AC_PREREQ([2.69])
4 AC_INIT([got-portable],
5         m4_esyscmd_s(util/got-portable-ver.sh),
6         [thomas@xteddy.org])
7 AC_CONFIG_AUX_DIR(etc)
8 AC_CONFIG_SRCDIR([lib/rcsutil.h])
9 AM_INIT_AUTOMAKE([foreign subdir-objects])
11 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
12 AC_SUBST(VERSION)
13 AC_SUBST(GOT_RELEASE)
15 AC_USE_SYSTEM_EXTENSIONS
16 AC_CANONICAL_HOST
18 # When CFLAGS isn't set at this stage and gcc is detected by the macro below,
19 # autoconf will automatically use CFLAGS="-O2 -g". Prevent that by using an
20 # empty default.
21 : ${CFLAGS=""}
23 # Save user CPPFLAGS, CFLAGS and LDFLAGS. We need to change them because
24 # AC_CHECK_HEADER doesn't give us any other way to update the include
25 # paths. But for Makefile.am we want to use AM_CPPFLAGS and friends.
26 SAVED_CFLAGS="$CFLAGS"
27 SAVED_CPPFLAGS="$CPPFLAGS"
28 SAVED_LDFLAGS="$LDFLAGS"
30 # Checks for programs.
31 AC_PROG_CC
32 AC_PROG_CPP
33 AC_PROG_INSTALL
34 AC_PROG_LN_S
35 AC_PROG_MAKE_SET
36 AC_PROG_YACC
37 AM_PROG_AR
38 AC_PROG_RANLIB
39 PKG_PROG_PKG_CONFIG
41 # Checks for header files.
42 AC_CHECK_HEADERS([ \
43         fcntl.h \
44         langinfo.h \
45         limits.h \
46         linux/landlock.h \
47         locale.h \
48         netdb.h \
49         netinet/in.h \
50         paths.h \
51         poll.h \
52         stddef.h \
53         stdint.h \
54         stdlib.h \
55         string.h \
56         sys/ioctl.h \
57         sys/param.h \
58         sys/poll.h \
59         sys/queue.h \
60         sys/socket.h \
61         sys/time.h \
62         sys/tree.h \
63         util.h \
64         unistd.h \
65         wchar.h \
68 # Checks for typ edefs, structures, and compiler characteristics.
69 AC_CHECK_HEADER_STDBOOL
70 AC_C_INLINE
71 AC_TYPE_INT64_T
72 AC_TYPE_MODE_T
73 AC_TYPE_OFF_T
74 AC_TYPE_PID_T
75 AC_TYPE_SIZE_T
76 AC_TYPE_SSIZE_T
77 AC_TYPE_UINT16_T
78 AC_TYPE_UINT32_T
79 AC_TYPE_UINT64_T
80 AC_TYPE_UINT8_T
82 # Check for ifgroupreq which is only available on BSD.
83 AC_CHECK_TYPES([struct ifgroupreq])
85 # Check for sockaddr_storage.  On some systems, ss_len is filled out, although
86 # this is not mandated by POSIX, and hence systems such as linux, don't have
87 # it.
88 AC_CHECK_TYPES([struct sockaddr_storage], [], [], [
89 #include <sys/types.h>
90 #include <sys/socket.h>
93 # Same thing as sockaddr_storage above, only now check if the member exists in
94 # the struct as well.
95 AC_CHECK_MEMBERS([struct sockaddr_storage.ss_len], , ,
96         [ #include <netdb.h>
97           #include <netinet/in.h>
98           #include <sys/socket.h> ]
101 AC_CHECK_MEMBERS([struct sockaddr.sa_len], , ,
102         [ #include <netdb.h>
103           #include <netinet/in.h>
104           #include <sys/socket.h> ]
107 # Both checks above will result in:
109 # HAVE_STRUCT_SOCKADDR_AS_LEN
110 # SS_LEN
112 # Either being defined or not.
114 # Look for library needed for flock.
115 AC_SEARCH_LIBS(flock, bsd)
117 # Checks for library functions.
118 AC_FUNC_FORK
119 AC_FUNC_FSEEKO
120 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
121 AC_FUNC_MALLOC
122 AC_FUNC_MMAP
123 AC_FUNC_REALLOC
124 AC_FUNC_STRERROR_R
125 AC_FUNC_STRNLEN
126 AC_CHECK_FUNCS([ \
127         dup2 \
128         flock \
129         getcwd \
130         localtime_r \
131         memchr \
132         memmove \
133         memset \
134         mkdir \
135         munmap \
136         nl_langinfo \
137         realpath \
138         regcomp \
139         rmdir \
140         setlocale \
141         socket \
142         setresgid \
143         setresuid \
144         setproctitle \
145         strcasecmp \
146         strchr \
147         strcspn \
148         strdup \
149         strerror \
150         strlcpy \
151         strncasecmp \
152         strndup \
153         strrchr \
154         strspn \
155         strstr \
156         strtol \
157         strtoul \
158         wcwidth \
161 AM_CONDITIONAL([HAVE_SETPROCTITLE], [test "x$ac_cv_func_setproctitle" = xyes])
162 AM_CONDITIONAL([HAVE_SETRESGID], [test "x$ac_cv_func_setresgid" = xyes])
163 AM_CONDITIONAL([HAVE_SETRESUID], [test "x$ac_cv_func_setresuid" = xyes])
165 # Siphash support.
166 AC_CHECK_FUNCS([SipHash])
167 AM_CONDITIONAL([HAVE_SIPHASH], [test "x$ac_cv_func_SipHash" = xyes])
169 # Check for functions with a compatibility implementation.
170 AC_REPLACE_FUNCS([ \
171         asprintf \
172         closefrom \
173         explicit_bzero \
174         fmt_scaled \
175         freezero \
176         getdtablecount \
177         getline \
178         getprogname \
179         recallocarray \
180         reallocarray \
181         strlcat \
182         strlcpy \
183         strndup \
184         strsep \
185         strtonum \
188 # Always use our getopt because 1) glibc's doesn't enforce argument order 2)
189 # musl does not set optarg to NULL for flags without arguments (although it is
190 # not required to, but it is helpful) 3) there are probably other weird
191 # implementations.
192 AC_LIBOBJ(getopt)
194 # Check the platform we're compiling on.
195 AC_MSG_CHECKING(platform)
196 case "$host_os" in
197         *linux*)
198                 AC_MSG_RESULT(linux)
199                 PLATFORM=linux
200                 ;;
201         *freebsd*)
202                 AC_MSG_RESULT(freebsd)
203                 PLATFORM=freebsd
204                 ;;
205         *darwin*)
206                 AC_MSG_RESULT(darwin)
207                 PLATFORM=darwin
208                 ;;
209         *netbsd*)
210                 AC_MSG_RESULT(netbsd)
211                 PLATFORM=netbsd
212                 ;;
213         *dragonfly*)
214                 AC_MSG_RESULT(dragonfly)
215                 PLATFORM=dragonflybsd
216                 ;;
217         *)
218                 AC_MSG_RESULT(unknown)
219                 PLATFORM=unknown
220                 ;;
221 esac
222 AC_SUBST(PLATFORM)
223 AM_CONDITIONAL([HOST_FREEBSD], [test "$PLATFORM" = "freebsd"])
224 AM_CONDITIONAL([HOST_LINUX], [test "$PLATFORM" = "linux"])
225 AM_CONDITIONAL([HOST_DARWIN], [test "$PLATFORM" = "darwin"])
226 AM_CONDITIONAL([HOST_NETBSD], [test "$PLATFORM" = "netbsd"])
227 AM_CONDITIONAL([HOST_DRAGONFLYBSD], [test "$PLATFORM" = "dragonflybsd"])
229 if test x"$PLATFORM" = "xdarwin"; then
230         # Check for and/or set HOMEBREW_PREFIX.  brew is a common way of
231         # installing applications.  The other is MacPorts.
232         #
233         # Before Apple Silicon existed (M1 onward), the paths for applications
234         # installed via homebrew was typically /usr/local.  However, with M1
235         # onward, this changed to a different path.
236         #
237         # Rather than hardcode this, check for HOMEBREW_PREFIX in the
238         # environment if it's already set, and use it.  Otherwise, check for
239         # brew(1) and use that.  If that fails, default to /usr/local
240         #
241         # This also means that MacPorts should continue to work.
242         #
243         # But with MacPorts, we should also check --prefix, and use that if it
244         # has been supplied.
245         #
246         # In both cases, the variable HOMEBREW_PREFIX is used for both.
247         HB_PREFIX=""
248         FOUND_BISON="no"
249         GNUBISON=""
250         if test -z "$HOMEBREW_PREFIX" -o "$HOMEBREW_PREFIX" = "NONE"; then
251                 # HOMEBREW_PREFIX not set, check for brew(1)
252                 if command -v brew >/dev/null 2>&1; then
253                         AC_MSG_NOTICE("HOMEBREW_PREFIX set via 'brew --prefix'")
254                         export HOMEBREW_PREFIX="$(brew --prefix)"
255                 fi
257                 if test -z "$HOMEBREW_PREFIX" -o "$HOMEBREW_PREFIX" = "NONE"
258                 then
259                         # Default.
260                         if test -z "${prefix}" -o "${prefix}" = "NONE"; then
261                                 export HOMEBREW_PREFIX="/usr/local"
262                                 HB_PREFIX="/usr/local"
263                                 AC_MSG_NOTICE("HOMEBREW_PREFIX defaulting to $HB_PREFIX")
264                         else
265                                 HB_PREFIX="$(eval echo ${prefix})"
266                                 if test "$HB_PREFIX" = "NONE"; then
267                                         HB_PREFIX="/opt/local"
268                                 else
269                                         AC_MSG_NOTICE("HOMEBREW_PREFIX using --prefix")
270                                 fi
271                                 export HOMEBREW_PREFIX="$HB_PREFIX"
272                         fi
273                 fi
274         fi
276         AC_MSG_NOTICE("HOMEBREW_PREFIX determined as: $HOMEBREW_PREFIX")
278         if ! test -x "${HOMEBREW_PREFIX}/opt/bison/bin/bison"; then
279                 AC_MSG_WARN([
280                              "***********************************************************
281                              GNU Bison not found: ${HOMEBREW_PREFIX}/opt/bison/bin/bison
282                              ***********************************************************
284                              Falling back to checking either /usr/local or \${prefix}"
285                 ])
287                 FOUND_BISON="no"
288                 AC_MSG_WARN("Trying ${HB_PREFIX}/opt/bison/bin/bison")
289                 if test -x "${HB_PREFIX}/opt/bison/bin/bison"; then
290                         export HOMEBREW_PREFIX="/usr/local"
291                         FOUND_BISON="yes"
292                         GNUBISON="${HB_PREFIX}/opt/bison/bin/bison"
293                 fi
295                 if test "$FOUND_BISON" = "no"; then
296                         HB_PREFIX="/opt/local"
297                         AC_MSG_WARN("Trying ${HB_PREFIX}/bin/bison")
299                         if test -x "${HB_PREFIX}/bin/bison"; then
300                                 export HOMEBREW_PREFIX="${HB_PREFIX}"
301                                 GNUBISON="${HB_PREFIX}/bin/bison"
302                                 FOUND_BISON="yes"
303                         fi
304                 fi
305         else
306                 FOUND_BISON="yes"
307                 GNUBISON="${HOMEBREW_PREFIX}/opt/bison/bin/bison"
308         fi
310         if test "$FOUND_BISON" = "no"; then
311                 AC_MSG_ERROR("*** Couldn't find GNU BISON ***")
312         fi
314         AC_MSG_NOTICE("Found GNU Bison as: $GNUBISON")
316         # Override YACC here to point to the GNU version of bison.
317         export YACC="${GNUBISON} -y"
318         export LDFLAGS="-L${HOMEBREW_PREFIX}/opt/ncurses/lib -L${HOMEBREW_PREFIX}/opt/openssl@3/lib $LDFLAGS"
319         export CPPFLAGS="-I${HOMEBREW_PREFIX}/opt/ncurses/include -I${HOMEBREW_PREFIX}/opt/openssl@3/include $CPPFLAGS"
320         export PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/opt/ncurses/lib/pkgconfig"
321         export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${HOMEBREW_PREFIX}/opt/openssl@3/lib/pkgconfig"
324 # Landlock detection.
325 AC_MSG_CHECKING([for landlock])
326 AM_CONDITIONAL([HAVE_LINUX_LANDLOCK],
327     [test "x$ac_cv_header_linux_landlock_h" = "xyes"])
328 if test "x$ac_cv_header_linux_landlock_h" = "xyes"; then
329         AC_MSG_RESULT(yes)
330 else
331         AC_MSG_RESULT(no)
334 # Clang sanitizers wrap reallocarray even if it isn't available on the target
335 # system. When compiled it always returns NULL and crashes the program. To
336 # detect this we need a more complicated test.
337 AC_MSG_CHECKING([for working reallocarray])
338 AC_RUN_IFELSE([AC_LANG_PROGRAM(
339                 [#include <stdlib.h>],
340                 [return (reallocarray(NULL, 1, 1) == NULL);]
341         )],
342         AC_MSG_RESULT(yes),
343         [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])],
344         [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])]
346 AC_MSG_CHECKING([for working recallocarray])
347 AC_RUN_IFELSE([AC_LANG_PROGRAM(
348                 [#include <stdlib.h>],
349                 [return (recallocarray(NULL, 1, 1, 1) == NULL);]
350         )],
351         AC_MSG_RESULT(yes),
352         [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])],
353         [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])]
356 # Look for imsg_init in libutil.
357 AC_SEARCH_LIBS(imsg_init, util, found_imsg_init=yes, found_imsg_init=no)
358 if test "x$found_imsg_init" = xyes; then
359         AC_DEFINE(HAVE_IMSG)
360 else
361         AC_LIBOBJ(imsg)
362         AC_LIBOBJ(imsg-buffer)
365 # libevent (for gotwebd).  Lifted from tmux.
366 # Look for libevent. Try libevent_core or libevent with pkg-config first then
367 # look for the library.
368 PKG_CHECK_MODULES(
369         LIBEVENT_CORE,
370         [libevent_core >= 2],
371         [
372                 AM_CPPFLAGS="$LIBEVENT_CORE_CFLAGS $AM_CPPFLAGS"
373                 CPPFLAGS="$AM_CPPFLAGS $SAVED_CPPFLAGS"
374                 LIBS="$LIBEVENT_CORE_LIBS $LIBS"
375                 found_libevent=yes
376         ],
377         found_libevent=no
379 if test x$found_libevent = xno; then
380         PKG_CHECK_MODULES(
381                 LIBEVENT,
382                 [libevent >= 2],
383                 [
384                         AM_CPPFLAGS="$LIBEVENT_CFLAGS $AM_CPPFLAGS"
385                         CPPFLAGS="$AM_CPPFLAGS $SAVED_CPPFLAGS"
386                         LIBS="$LIBEVENT_LIBS $LIBS"
387                         found_libevent=yes
388                 ],
389                 found_libevent=no
390         )
392 if test x$found_libevent = xno; then
393         AC_SEARCH_LIBS(
394                 event_init,
395                 [event_core event event-1.4],
396                 found_libevent=yes,
397                 found_libevent=no
398         )
400 AC_CHECK_HEADER(
401         event2/event.h,
402         AC_DEFINE(HAVE_EVENT2_EVENT_H),
403         [
404                 AC_CHECK_HEADER(
405                         event.h,
406                         AC_DEFINE(HAVE_EVENT_H),
407                         found_libevent=no
408                 )
409         ]
411 if test "x$found_libevent" = xno; then
412         AC_MSG_ERROR("libevent not found")
415 # libcrypto (via libssl for SHA information)
416 PKG_CHECK_MODULES(
417         LIBCRYPTO,
418         libcrypto,
419         [
420                 AM_CFLAGS="$LIBCRYPTO_CFLAGS $AM_CFLAGS"
421                 CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
422                 LIBS="$LIBCRYPTO_LIBS $LIBS"
423                 found_libcrypto=yes
424         ],
425         [
426                 found_libcrypto=no
427         ]
430 if test "x$found_libcrypto" = "xyes"; then
431         AC_DEFINE(HAVE_LIBCRYPTO)
434 AC_SEARCH_LIBS(uuid_create, , AC_DEFINE(HAVE_BSD_UUID))
435 AC_SEARCH_LIBS(uuid_create, found_uuid=no, found_uuid=yes)
436 AC_SEARCH_LIBS(mergesort, , AC_DEFINE(HAVE_BSD_MERGESORT))
438 # Don't define HAVE_BSD_UUID on darwin (Apple) as this breaks the BSD API.
439 # Instead, use the UUID implementation wrapper that's in compat/ plus uuid
440 # ossp
441 if test "x$found_uuid" = "xyes" -a "x$PLATFORM" != "darwin"; then
442         AC_DEFINE(HAVE_BSD_UUID)
443 else
444         PKG_CHECK_MODULES(
445                 LIBUUID,
446                 uuid,
447                 [
448                         AM_CFLAGS="$LIBUUID_CFLAGS $AM_CFLAGS"
449                         CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
450                         LIBS="$LIBUUID_LIBS $LIBS"
451                         found_libuuid=yes
452                 ],
453                 [
454                         found_libuuid=no
455                 ]
456         )
458         if test "x$found_libuuid" = "xno"; then
459                 AC_CHECK_HEADER(
460                         uuid.h,
461                         found_libuuid=yes,
462                         found_libuuid=no)
463         fi
466 if test "x$found_libuuid" = "xno"; then
467         AC_MSG_ERROR("*** couldn't find uuid ***")
470 PKG_CHECK_MODULES(
471         ZLIB,
472         zlib,
473         [
474                 AM_CFLAGS="$ZLIB_CFLAGS $AM_CFLAGS"
475                 CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
476                 LIBS="$ZLIB_LIBS $LIBS"
477                 found_zlib=yes
478         ],
479         [
480                 found_zlib=no
481         ]
484 if test "x$found_zlib" = "xno"; then
485         AC_CHECK_HEADER(
486                 zlib.h,
487                 ,
488                 found_zlib=no)
491 if test "x$found_zlib" = "xno"; then
492         AC_MSG_ERROR("*** couldn't find zlib ***")
495 if test "$PLATFORM" = "linux"; then
496         PKG_CHECK_MODULES(
497                 LIBMD,
498                 libmd,
499                 [
500                         AM_CFLAGS="$LIBMD_CFLAGS $AM_CFLAGS"
501                         CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
502                         LIBS="$LIBMD_LIBS $LIBS"
503                 ],
504                 [
505                         AC_MSG_ERROR("*** couldn't find libmd via pkg-config")
506                 ]
507         )
508         PKG_CHECK_MODULES(
509                 LIBBSD,
510                 libbsd-overlay,
511                 [
512                         AM_CFLAGS="$LIBBSD_CFLAGS $AM_CFLAGS"
513                         CFLAGS="$AM_CFLAGS $SAVED_CFLAGS"
514                         LIBS="$LIBBSD_LIBS $LIBS"
515                         found_libbsd=yes
516                         AC_DEFINE(HAVE_LIBBSD)
517                 ],
518                 [
519                         AC_MSG_ERROR("*** couldn't find libbsd-overlay via pkg-config")
520                 ]
522         )
525 # Look for a suitable queue.h.  We hope libbsd is enough, but that is missing
526 # some declarations.
527 AC_CHECK_DECL(
528         TAILQ_CONCAT,
529         found_queue_h=yes,
530         found_queue_h=no,
531         [#include <sys/queue.h>]
533 AC_CHECK_DECL(
534         TAILQ_PREV,
535         ,
536         found_queue_h=no,
537         [#include <sys/queue.h>]
539 AC_CHECK_DECL(
540         TAILQ_FOREACH_SAFE,
541         ,
542         found_queue_h=no,
543         [#include <sys/queue.h>]
546 if test "x$found_queue_h" = xyes; then
547         AC_DEFINE(HAVE_QUEUE_H)
548 else
549         AC_MSG_ERROR("*** sys/queue.h missing key defines ***)
552 AC_CHECK_DECL(
553         RB_GENERATE_STATIC,
554         found_sys_tree_h=yes,
555         found_sys_tree_h=no,
556         [#include <sys/tree.h>]
559 if test "x$found_sys_tree_h" = xyes; then
560         AC_DEFINE(HAVE_TREE_H)
561 else
562         AC_MSG_NOTICE("Using compat/tree.h")
565 # Look for __progname.
566 AC_MSG_CHECKING(for __progname)
567 AC_LINK_IFELSE([AC_LANG_SOURCE(
568         [
569                 #include <stdio.h>
570                 #include <stdlib.h>
571                 extern char *__progname;
572                 int main(void) {
573                         const char *cp = __progname;
574                         printf("%s\n", cp);
575                         exit(0);
576                 }
577         ])],
578         [AC_DEFINE(HAVE___PROGNAME) AC_MSG_RESULT(yes)],
579         AC_MSG_RESULT(no)
582 PKG_CHECK_MODULES(
583         LIBPANELW,
584         panelw,
585         found_panel=yes,
586         found_panel=no
589 PKG_CHECK_MODULES(
590         LIBPANELW,
591         gnupanelw,
592         found_panel=yes,
593         found_panel=no
596 PKG_CHECK_MODULES(
597         LIBPANELW,
598         panel,
599         found_panel=yes,
600         found_panel=no
602 if test "x$found_panel" = "xno"; then
603         AC_CHECK_LIB(panelw, update_panels,,
604                 AC_MSG_ERROR([ "*** panelw not found for ncurses. ***"])
605         )
607         LIBPANELW_LIBS="-lpanelw"
610 PKG_CHECK_MODULES(
611         LIBNCURSES,
612         ncursesw,
613         found_ncurses=yes,
614         found_ncurses=no
616 if test "x$found_ncurses" = xyes; then
617         AM_CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $LIBPANELW_CFLAGS $AM_CFLAGS"
618         CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $LIBPANELW_CFLAGS $CFLAGS"
619         LIBS="$LIBNCURSES_LIBS $LIBTINFO_LIBS $LIBPANELW_LIBS $LIBS"
620 else
621         AC_CHECK_LIB(
622                 ncursesw,
623                 setupterm,
624                 found_ncurses=yes,
625                 found_ncurses=no
626         )
627         if test "x$found_ncurses" = xyes; then
628                 AC_CHECK_HEADER(
629                         ncurses.h,
630                         AM_CFLAGS="$LIBPANELW_CFLAGS $AM_CFLAGS"
631                         CFLAGS="$LIBPANEL_CFLAGS $CFLAGS"
632                         LIBS="$LIBS -lncursesw $LIBPANELW_LIBS",
633                         found_ncurses=no
634                 )
635         fi
637 if test "x$found_ncurses" = xyes; then
638         AC_DEFINE(HAVE_NCURSES_H)
639 else
640         # No ncurses, try curses.
641         AC_CHECK_LIB(
642                 cursesw,
643                 setupterm,
644                 found_curses=yes,
645                 found_curses=no
646         )
647         AC_CHECK_HEADER(
648                 curses.h,
649                 ,
650                 found_curses=no)
651         if test "x$found_curses" = xyes; then
652                 AM_CFLAGS="$LIBPANELW_CFLAGS $AM_CFLAGS"
653                 CFLAGS="$LIBPANEL_CFLAGS $CFLAGS"
654                 LIBS="$LIBS -lcursesw $LIBPANELW_LIBS"
655                 AC_DEFINE(HAVE_CURSES_H)
656         else
657                 AC_MSG_ERROR("curses not found")
658         fi
661 # Save our CFLAGS/CPPFLAGS/LDFLAGS for the Makefile and restore the old user
662 # variables.
663 AC_SUBST(AM_CPPFLAGS)
664 CPPFLAGS="$SAVED_CPPFLAGS"
665 AC_SUBST(AM_CFLAGS)
666 CFLAGS="$SAVED_CFLAGS"
667 AC_SUBST(AM_LDFLAGS)
668 LDFLAGS="$SAVED_LDFLAGS"
670 AC_CONFIG_FILES([Makefile
671                  compat/Makefile
672                  libexec/Makefile
673                  libexec/got-read-tree/Makefile
674                  libexec/got-fetch-pack/Makefile
675                  libexec/got-index-pack/Makefile
676                  libexec/got-read-blob/Makefile
677                  libexec/got-read-commit/Makefile
678                  libexec/got-read-gitconfig/Makefile
679                  libexec/got-read-gotconfig/Makefile
680                  libexec/got-read-object/Makefile
681                  libexec/got-read-pack/Makefile
682                  libexec/got-read-patch/Makefile
683                  libexec/got-read-tag/Makefile
684                  libexec/got-send-pack/Makefile
685                  got/Makefile
686                  gotadmin/Makefile
687                  gotwebd/Makefile
688                  template/Makefile
689                  tog/Makefile
690                  Makefile.common:Makefile.common.in])
691 AC_OUTPUT
693 executables="$(eval echo ${exec_prefix}/bin)"
694 helpers="$(eval echo ${libexecdir})"
695 manpages="$(eval echo ${mandir})"
697 echo "
698 Configured got-portable with:
700  Version:      $VERSION
702  Prefix:       ${prefix}
703  Executables:  ${executables}
704  Helpers:      ${helpers}
705  Man pages:    ${manpages}