• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl nghttp2 - HTTP/2 C Library
2
3dnl Copyright (c) 2012, 2013, 2014, 2015 Tatsuhiro Tsujikawa
4
5dnl Permission is hereby granted, free of charge, to any person obtaining
6dnl a copy of this software and associated documentation files (the
7dnl "Software"), to deal in the Software without restriction, including
8dnl without limitation the rights to use, copy, modify, merge, publish,
9dnl distribute, sublicense, and/or sell copies of the Software, and to
10dnl permit persons to whom the Software is furnished to do so, subject to
11dnl the following conditions:
12
13dnl The above copyright notice and this permission notice shall be
14dnl included in all copies or substantial portions of the Software.
15
16dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17dnl EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19dnl NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20dnl LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21dnl OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22dnl WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24dnl Do not change user variables!
25dnl https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
26
27AC_PREREQ(2.61)
28AC_INIT([nghttp2], [1.52.0], [t-tujikawa@users.sourceforge.net])
29AC_CONFIG_AUX_DIR([.])
30AC_CONFIG_MACRO_DIR([m4])
31AC_CONFIG_HEADERS([config.h])
32AC_USE_SYSTEM_EXTENSIONS
33
34LT_PREREQ([2.2.6])
35LT_INIT()
36
37AC_CANONICAL_BUILD
38AC_CANONICAL_HOST
39AC_CANONICAL_TARGET
40
41AM_INIT_AUTOMAKE([subdir-objects])
42
43m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
44
45dnl See versioning rule:
46dnl  https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
47AC_SUBST(LT_CURRENT, 38)
48AC_SUBST(LT_REVISION, 1)
49AC_SUBST(LT_AGE, 24)
50
51major=`echo $PACKAGE_VERSION |cut -d. -f1 | sed -e "s/[^0-9]//g"`
52minor=`echo $PACKAGE_VERSION |cut -d. -f2 | sed -e "s/[^0-9]//g"`
53patch=`echo $PACKAGE_VERSION |cut -d. -f3 | cut -d- -f1 | sed -e "s/[^0-9]//g"`
54
55PACKAGE_VERSION_NUM=`printf "0x%02x%02x%02x" "$major" "$minor" "$patch"`
56
57AC_SUBST(PACKAGE_VERSION_NUM)
58
59dnl Checks for command-line options
60AC_ARG_ENABLE([werror],
61    [AS_HELP_STRING([--enable-werror],
62                    [Turn on compile time warnings])],
63    [werror=$enableval], [werror=no])
64
65AC_ARG_ENABLE([debug],
66    [AS_HELP_STRING([--enable-debug],
67                    [Turn on debug output])],
68    [debug=$enableval], [debug=no])
69
70AC_ARG_ENABLE([threads],
71    [AS_HELP_STRING([--disable-threads],
72                    [Turn off threading in apps])],
73    [threads=$enableval], [threads=yes])
74
75AC_ARG_ENABLE([app],
76    [AS_HELP_STRING([--enable-app],
77                    [Build applications (nghttp, nghttpd, nghttpx and h2load) [default=check]])],
78    [request_app=$enableval], [request_app=check])
79
80AC_ARG_ENABLE([hpack-tools],
81    [AS_HELP_STRING([--enable-hpack-tools],
82                    [Build HPACK tools [default=check]])],
83    [request_hpack_tools=$enableval], [request_hpack_tools=check])
84
85AC_ARG_ENABLE([examples],
86    [AS_HELP_STRING([--enable-examples],
87                    [Build examples [default=check]])],
88    [request_examples=$enableval], [request_examples=check])
89
90AC_ARG_ENABLE([failmalloc],
91    [AS_HELP_STRING([--disable-failmalloc],
92                    [Do not build failmalloc test program])],
93    [request_failmalloc=$enableval], [request_failmalloc=yes])
94
95AC_ARG_ENABLE([lib-only],
96    [AS_HELP_STRING([--enable-lib-only],
97                    [Build libnghttp2 only.  This is a short hand for --disable-app --disable-examples --disable-hpack-tools])],
98    [request_lib_only=$enableval], [request_lib_only=no])
99
100AC_ARG_ENABLE([http3],
101    [AS_HELP_STRING([--enable-http3],
102                    [(EXPERIMENTAL) Enable HTTP/3.  This requires ngtcp2, nghttp3, and a custom OpenSSL.])],
103    [request_http3=$enableval], [request_http3=no])
104
105AC_ARG_WITH([libxml2],
106    [AS_HELP_STRING([--with-libxml2],
107                    [Use libxml2 [default=check]])],
108    [request_libxml2=$withval], [request_libxml2=check])
109
110AC_ARG_WITH([jansson],
111    [AS_HELP_STRING([--with-jansson],
112                    [Use jansson [default=check]])],
113    [request_jansson=$withval], [request_jansson=check])
114
115AC_ARG_WITH([zlib],
116    [AS_HELP_STRING([--with-zlib],
117                    [Use zlib [default=check]])],
118    [request_zlib=$withval], [request_zlib=check])
119
120AC_ARG_WITH([libevent-openssl],
121    [AS_HELP_STRING([--with-libevent-openssl],
122                    [Use libevent_openssl [default=check]])],
123    [request_libevent_openssl=$withval], [request_libevent_openssl=check])
124
125AC_ARG_WITH([libcares],
126    [AS_HELP_STRING([--with-libcares],
127                    [Use libc-ares [default=check]])],
128    [request_libcares=$withval], [request_libcares=check])
129
130AC_ARG_WITH([openssl],
131    [AS_HELP_STRING([--with-openssl],
132                    [Use openssl [default=check]])],
133    [request_openssl=$withval], [request_openssl=check])
134
135AC_ARG_WITH([libev],
136    [AS_HELP_STRING([--with-libev],
137                    [Use libev [default=check]])],
138    [request_libev=$withval], [request_libev=check])
139
140AC_ARG_WITH([cunit],
141    [AS_HELP_STRING([--with-cunit],
142                    [Use cunit [default=check]])],
143    [request_cunit=$withval], [request_cunit=check])
144
145AC_ARG_WITH([jemalloc],
146    [AS_HELP_STRING([--with-jemalloc],
147                    [Use jemalloc [default=check]])],
148    [request_jemalloc=$withval], [request_jemalloc=check])
149
150AC_ARG_WITH([systemd],
151    [AS_HELP_STRING([--with-systemd],
152                    [Enable systemd support in nghttpx [default=check]])],
153    [request_systemd=$withval], [request_systemd=check])
154
155AC_ARG_WITH([mruby],
156    [AS_HELP_STRING([--with-mruby],
157                    [Use mruby [default=no]])],
158    [request_mruby=$withval], [request_mruby=no])
159
160AC_ARG_WITH([neverbleed],
161    [AS_HELP_STRING([--with-neverbleed],
162                    [Use neverbleed [default=no]])],
163    [request_neverbleed=$withval], [request_neverbleed=no])
164
165AC_ARG_WITH([libngtcp2],
166    [AS_HELP_STRING([--with-libngtcp2],
167                    [Use libngtcp2 [default=check]])],
168    [request_libngtcp2=$withval], [request_libngtcp2=check])
169
170AC_ARG_WITH([libnghttp3],
171    [AS_HELP_STRING([--with-libnghttp3],
172                    [Use libnghttp3 [default=check]])],
173    [request_libnghttp3=$withval], [request_libnghttp3=check])
174
175AC_ARG_WITH([libbpf],
176    [AS_HELP_STRING([--with-libbpf],
177                    [Use libbpf [default=no]])],
178    [request_libbpf=$withval], [request_libbpf=no])
179
180dnl Define variables
181AC_ARG_VAR([LIBEV_CFLAGS], [C compiler flags for libev, skipping any checks])
182AC_ARG_VAR([LIBEV_LIBS], [linker flags for libev, skipping any checks])
183
184AC_ARG_VAR([JEMALLOC_CFLAGS],
185           [C compiler flags for jemalloc, skipping any checks])
186AC_ARG_VAR([JEMALLOC_LIBS], [linker flags for jemalloc, skipping any checks])
187
188AC_ARG_VAR([LIBTOOL_LDFLAGS],
189           [libtool specific flags (e.g., -static-libtool-libs)])
190
191AC_ARG_VAR([BPFCFLAGS], [C compiler flags for bpf program])
192
193dnl Checks for programs
194AC_PROG_CC
195AC_PROG_CXX
196AC_PROG_CPP
197AC_PROG_INSTALL
198AC_PROG_LN_S
199AC_PROG_MAKE_SET
200AC_PROG_MKDIR_P
201
202PKG_PROG_PKG_CONFIG([0.20])
203
204AM_PATH_PYTHON([3.8],, [:])
205
206if [test "x$request_lib_only" = "xyes"]; then
207  request_app=no
208  request_hpack_tools=no
209  request_examples=no
210  request_http3=no
211  request_libxml2=no
212  request_jansson=no
213  request_zlib=no
214  request_libevent_openssl=no
215  request_libcares=no
216  request_openssl=no
217  request_libev=no
218  request_jemalloc=no
219  request_systemd=no
220  request_mruby=no
221  request_neverbleed=no
222  request_libngtcp2=no
223  request_libnghttp3=no
224  request_libbpf=no
225fi
226
227if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
228  AC_DEFINE([NGHTTP2_NORETURN], [__attribute__((noreturn))], [Hint to the compiler that a function never return])
229else
230  AC_DEFINE([NGHTTP2_NORETURN], , [Hint to the compiler that a function never return])
231fi
232
233save_CXXFLAGS="$CXXFLAGS"
234CXXFLAGS=
235
236AX_CXX_COMPILE_STDCXX([14], [noext], [optional])
237
238CXX1XCXXFLAGS="$CXXFLAGS"
239CXXFLAGS="$save_CXXFLAGS"
240AC_SUBST([CXX1XCXXFLAGS])
241
242AC_LANG_PUSH(C++)
243
244save_CXXFLAGS="$CXXFLAGS"
245CXXFLAGS="$CXXFLAGS $CXX1XCXXFLAGS"
246
247# Check that std::future is available.
248AC_MSG_CHECKING([whether std::future is available])
249AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
250[[
251#include <vector>
252#include <future>
253]],
254[[
255std::vector<std::future<int>> v;
256(void)v;
257]])],
258    [AC_DEFINE([HAVE_STD_FUTURE], [1],
259               [Define to 1 if you have the `std::future`.])
260     have_std_future=yes
261     AC_MSG_RESULT([yes])],
262    [have_std_future=no
263     AC_MSG_RESULT([no])])
264
265# Check that std::map::emplace is available for g++-4.7.
266AC_MSG_CHECKING([whether std::map::emplace is available])
267AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
268[[
269#include <map>
270]],
271[[
272std::map<int, int>().emplace(1, 2);
273]])],
274    [AC_DEFINE([HAVE_STD_MAP_EMPLACE], [1],
275               [Define to 1 if you have the `std::map::emplace`.])
276     have_std_map_emplace=yes
277     AC_MSG_RESULT([yes])],
278    [have_std_map_emplace=no
279     AC_MSG_RESULT([no])])
280
281# Check that std::atomic_* overloads for std::shared_ptr are
282# available.
283AC_MSG_CHECKING([whether std::atomic_* overloads for std::shared_ptr are available])
284AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
285[[
286#include <memory>
287]],
288[[
289auto a = std::make_shared<int>(1000000007);
290auto p = std::atomic_load(&a);
291++*p;
292std::atomic_store(&a, p);
293]])],
294    [AC_DEFINE([HAVE_ATOMIC_STD_SHARED_PTR], [1],
295               [Define to 1 if you have the std::atomic_* overloads for std::shared_ptr.])
296     have_atomic_std_shared_ptr=yes
297     AC_MSG_RESULT([yes])],
298    [have_atomic_std_shared_ptr=no
299     AC_MSG_RESULT([no])])
300
301# Check that thread_local storage specifier is available
302AC_MSG_CHECKING([whether thread_local storage class specifier is available.])
303AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
304,
305[[
306thread_local int a = 0;
307(void)a;
308]])],
309    [AC_DEFINE([HAVE_THREAD_LOCAL], [1],
310               [Define to 1 if you have thread_local storage specifier.])
311     have_thread_local=yes
312     AC_MSG_RESULT([yes])],
313    [have_Thread_local=no
314     AC_MSG_RESULT([no])])
315
316CXXFLAGS=$save_CXXFLAGS
317
318AC_LANG_POP()
319
320# Checks for libraries.
321
322# Additional libraries required for tests.
323TESTLDADD=
324
325# Additional libraries required for programs under src directory.
326APPLDFLAGS=
327
328case "$host_os" in
329  *android*)
330    android_build=yes
331    # android does not need -pthread, but needs following 2 libs for C++
332    APPLDFLAGS="$APPLDFLAGS -lstdc++ -latomic"
333    ;;
334  *)
335    PTHREAD_LDFLAGS="-pthread"
336    APPLDFLAGS="$APPLDFLAGS $PTHREAD_LDFLAGS"
337    ;;
338esac
339
340case "$host_os" in
341  *solaris*)
342    APPLDFLAGS="$APPLDFLAGS -lsocket -lnsl"
343    ;;
344esac
345
346case "${build}" in
347  *-apple-darwin*)
348    EXTRA_DEFS="-D__APPLE_USE_RFC_3542"
349    AC_SUBST([EXTRA_DEFS])
350    ;;
351esac
352
353# zlib
354have_zlib=no
355if test "x${request_zlib}" != "xno"; then
356  PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.3], [have_zlib=yes], [have_zlib=no])
357
358  if test "x${have_zlib}" = "xno"; then
359    AC_MSG_NOTICE($ZLIB_PKG_ERRORS)
360  fi
361fi
362
363if test "x${request_zlib}" = "xyes" &&
364   test "x${have_zlib}" != "xyes"; then
365  AC_MSG_ERROR([zlib was requested (--with-zlib) but not found])
366fi
367
368# dl: openssl requires libdl when it is statically linked.
369case "${host_os}" in
370  *bsd*)
371    # dlopen is in libc on *BSD
372    ;;
373  *)
374    save_LIBS=$LIBS
375    AC_SEARCH_LIBS([dlopen], [dl], [APPLDFLAGS="-ldl $APPLDFLAGS"], [], [])
376    LIBS=$save_LIBS
377    ;;
378esac
379
380# cunit
381have_cunit=no
382if test "x${request_cunit}" != "xno"; then
383  PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
384  # If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
385  # do this because Debian (Ubuntu) lacks pkg-config file for cunit.
386  if test "x${have_cunit}" = "xno"; then
387    AC_MSG_WARN([${CUNIT_PKG_ERRORS}])
388    AC_CHECK_LIB([cunit], [CU_initialize_registry],
389                 [have_cunit=yes], [have_cunit=no])
390    if test "x${have_cunit}" = "xyes"; then
391      CUNIT_LIBS="-lcunit"
392      CUNIT_CFLAGS=""
393      AC_SUBST([CUNIT_LIBS])
394      AC_SUBST([CUNIT_CFLAGS])
395    fi
396  fi
397  if test "x${have_cunit}" = "xyes"; then
398    # cunit in Mac OS X requires ncurses. Note that in Mac OS X, test
399    # program can be built without -lncurses, but it emits runtime
400    # error.
401    case "${build}" in
402      *-apple-darwin*)
403        CUNIT_LIBS="$CUNIT_LIBS -lncurses"
404        AC_SUBST([CUNIT_LIBS])
405        ;;
406    esac
407  fi
408fi
409
410if test "x${request_cunit}" = "xyes" &&
411   test "x${have_cunit}" != "xyes"; then
412  AC_MSG_ERROR([cunit was requested (--with-cunit) but not found])
413fi
414
415AM_CONDITIONAL([HAVE_CUNIT], [ test "x${have_cunit}" = "xyes" ])
416
417# libev (for src)
418have_libev=no
419if test "x${request_libev}" != "xno"; then
420  if test "x${LIBEV_LIBS}" = "x" && test "x${LIBEV_CFLAGS}" = "x"; then
421    # libev does not have pkg-config file.  Check it in an old way.
422    save_LIBS=$LIBS
423    # android requires -lm for floor
424   AC_CHECK_LIB([ev], [ev_time], [have_libev=yes], [have_libev=no], [-lm])
425   if test "x${have_libev}" = "xyes"; then
426      AC_CHECK_HEADER([ev.h], [have_libev=yes], [have_libev=no])
427      if test "x${have_libev}" = "xyes"; then
428        LIBEV_LIBS=-lev
429        LIBEV_CFLAGS=
430      fi
431    fi
432    LIBS=$save_LIBS
433  else
434    have_libev=yes
435  fi
436fi
437
438if test "x${request_libev}" = "xyes" &&
439   test "x${have_libev}" != "xyes"; then
440  AC_MSG_ERROR([libev was requested (--with-libev) but not found])
441fi
442
443# openssl (for src)
444have_openssl=no
445if test "x${request_openssl}" != "xno"; then
446  PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1],
447                    [have_openssl=yes], [have_openssl=no])
448  if test "x${have_openssl}" = "xno"; then
449    AC_MSG_NOTICE($OPENSSL_PKG_ERRORS)
450  else
451    save_CFLAGS="$CFLAGS"
452    save_LIBS="$LIBS"
453    CFLAGS="$OPENSSL_CFLAGS $CFLAGS"
454    LIBS="$OPENSSL_LIBS $LIBS"
455
456    # quictls/openssl has SSL_is_quic.
457    have_ssl_is_quic=no
458    AC_MSG_CHECKING([for SSL_is_quic])
459    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
460      #include <openssl/ssl.h>
461    ]], [[
462      SSL *ssl = NULL;
463      SSL_is_quic(ssl);
464    ]])],
465    [AC_MSG_RESULT([yes]); have_ssl_is_quic=yes],
466    [AC_MSG_RESULT([no]); have_ssl_is_quic=no])
467
468    # boringssl has SSL_set_quic_early_data_context.
469    AC_MSG_CHECKING([for SSL_set_quic_early_data_context])
470    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
471      #include <openssl/ssl.h>
472    ]], [[
473      SSL *ssl = NULL;
474      SSL_set_quic_early_data_context(ssl, NULL, 0);
475    ]])],
476    [AC_MSG_RESULT([yes]); have_boringssl_quic=yes],
477    [AC_MSG_RESULT([no]); have_boringssl_quic=no])
478
479    CFLAGS="$save_CFLAGS"
480    LIBS="$save_LIBS"
481  fi
482fi
483
484if test "x${request_openssl}" = "xyes" &&
485   test "x${have_openssl}" != "xyes"; then
486  AC_MSG_ERROR([openssl was requested (--with-openssl) but not found])
487fi
488
489# c-ares (for src)
490have_libcares=no
491if test "x${request_libcares}" != "xno"; then
492  PKG_CHECK_MODULES([LIBCARES], [libcares >= 1.7.5], [have_libcares=yes],
493                    [have_libcares=no])
494  if test "x${have_libcares}" = "xno"; then
495    AC_MSG_NOTICE($LIBCARES_PKG_ERRORS)
496  fi
497fi
498
499if test "x${request_libcares}" = "xyes" &&
500   test "x${have_libcares}" != "xyes"; then
501  AC_MSG_ERROR([libcares was requested (--with-libcares) but not found])
502fi
503
504# ngtcp2 (for src)
505have_libngtcp2=no
506if test "x${request_libngtcp2}" != "xno"; then
507  PKG_CHECK_MODULES([LIBNGTCP2], [libngtcp2 >= 0.13.0], [have_libngtcp2=yes],
508                    [have_libngtcp2=no])
509  if test "x${have_libngtcp2}" = "xno"; then
510    AC_MSG_NOTICE($LIBNGTCP2_PKG_ERRORS)
511  fi
512fi
513
514if test "x${request_libngtcp2}" = "xyes" &&
515   test "x${have_libngtcp2}" != "xyes"; then
516  AC_MSG_ERROR([libngtcp2 was requested (--with-libngtcp2) but not found])
517fi
518
519# ngtcp2_crypto_openssl (for src)
520have_libngtcp2_crypto_openssl=no
521if test "x${have_ssl_is_quic}" = "xyes" &&
522   test "x${request_libngtcp2}" != "xno"; then
523  PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_OPENSSL],
524                    [libngtcp2_crypto_openssl >= 0.13.0],
525                    [have_libngtcp2_crypto_openssl=yes],
526                    [have_libngtcp2_crypto_openssl=no])
527  if test "x${have_libngtcp2_crypto_openssl}" = "xno"; then
528    AC_MSG_NOTICE($LIBNGTCP2_CRYPTO_OPENSSL_PKG_ERRORS)
529  else
530    AC_DEFINE([HAVE_LIBNGTCP2_CRYPTO_OPENSSL], [1],
531              [Define to 1 if you have `libngtcp2_crypto_openssl` library.])
532  fi
533fi
534
535if test "x${have_ssl_is_quic}" = "xyes" &&
536   test "x${request_libngtcp2}" = "xyes" &&
537   test "x${have_libngtcp2_crypto_openssl}" != "xyes"; then
538  AC_MSG_ERROR([libngtcp2_crypto_openssl was requested (--with-libngtcp2) but not found])
539fi
540
541# ngtcp2_crypto_boringssl (for src)
542have_libngtcp2_crypto_boringssl=no
543if test "x${have_boringssl_quic}" = "xyes" &&
544   test "x${request_libngtcp2}" != "xno"; then
545  PKG_CHECK_MODULES([LIBNGTCP2_CRYPTO_BORINGSSL],
546                    [libngtcp2_crypto_boringssl >= 0.0.0],
547                    [have_libngtcp2_crypto_boringssl=yes],
548                    [have_libngtcp2_crypto_boringssl=no])
549  if test "x${have_libngtcp2_crypto_boringssl}" = "xno"; then
550    AC_MSG_NOTICE($LIBNGTCP2_CRYPTO_BORINGSSL_PKG_ERRORS)
551  else
552    AC_DEFINE([HAVE_LIBNGTCP2_CRYPTO_BORINGSSL], [1],
553              [Define to 1 if you have `libngtcp2_crypto_boringssl` library.])
554  fi
555fi
556
557if test "x${have_boringssl_quic}" = "xyes" &&
558   test "x${request_libngtcp2}" = "xyes" &&
559   test "x${have_libngtcp2_crypto_boringssl}" != "xyes"; then
560  AC_MSG_ERROR([libngtcp2_crypto_boringssl was requested (--with-libngtcp2) but not found])
561fi
562
563# nghttp3 (for src)
564have_libnghttp3=no
565if test "x${request_libnghttp3}" != "xno"; then
566  PKG_CHECK_MODULES([LIBNGHTTP3], [libnghttp3 >= 0.7.0], [have_libnghttp3=yes],
567                    [have_libnghttp3=no])
568  if test "x${have_libnghttp3}" = "xno"; then
569    AC_MSG_NOTICE($LIBNGHTTP3_PKG_ERRORS)
570  fi
571fi
572
573if test "x${request_libnghttp3}" = "xyes" &&
574   test "x${have_libnghttp3}" != "xyes"; then
575  AC_MSG_ERROR([libnghttp3 was requested (--with-libnghttp3) but not found])
576fi
577
578# libbpf (for src)
579have_libbpf=no
580if test "x${request_libbpf}" != "xno"; then
581  PKG_CHECK_MODULES([LIBBPF], [libbpf >= 0.7.0], [have_libbpf=yes],
582                    [have_libbpf=no])
583  if test "x${have_libbpf}" = "xyes"; then
584    AC_DEFINE([HAVE_LIBBPF], [1], [Define to 1 if you have `libbpf` library.])
585    if test "x${BPFCFLAGS}" = "x"; then
586      BPFCFLAGS="-Wall -O2 -g"
587    fi
588    # Add the include path for Debian
589    EXTRABPFCFLAGS="-I/usr/include/$host_cpu-$host_os"
590    AC_SUBST([EXTRABPFCFLAGS])
591
592    AC_MSG_CHECKING([whether enum bpf_stats_type is defined in linux/bpf.h])
593    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
594    [[
595    #include <linux/bpf.h>
596    ]],
597    [[
598    enum bpf_stats_type foo;
599    (void)foo;
600    ]])],
601    [have_bpf_stats_type=yes],
602    [have_bpf_stats_type=no])
603
604    if test "x${have_bpf_stats_type}" = "xyes"; then
605      AC_MSG_RESULT([yes])
606      AC_DEFINE([HAVE_BPF_STATS_TYPE], [1],
607                [Define to 1 if you have enum bpf_stats_type in linux/bpf.h.])
608    else
609      AC_MSG_RESULT([no])
610    fi
611  else
612    AC_MSG_NOTICE($LIBBPF_PKG_ERRORS)
613  fi
614fi
615
616if test "x${request_libbpf}" = "xyes" &&
617   test "x${have_libbpf}" != "xyes"; then
618  AC_MSG_ERROR([libbpf was requested (--with-libbpf) but not found])
619fi
620
621AM_CONDITIONAL([HAVE_LIBBPF], [ test "x${have_libbpf}" = "xyes" ])
622
623# libevent_openssl (for examples)
624# 2.0.8 is required because we use evconnlistener_set_error_cb()
625have_libevent_openssl=no
626if test "x${request_libevent_openssl}" != "xno"; then
627  PKG_CHECK_MODULES([LIBEVENT_OPENSSL], [libevent_openssl >= 2.0.8],
628                    [have_libevent_openssl=yes], [have_libevent_openssl=no])
629  if test "x${have_libevent_openssl}" = "xno"; then
630    AC_MSG_NOTICE($LIBEVENT_OPENSSL_PKG_ERRORS)
631  fi
632fi
633
634if test "x${request_libevent_openssl}" = "xyes" &&
635   test "x${have_libevent_openssl}" != "xyes"; then
636  AC_MSG_ERROR([libevent_openssl was requested (--with-libevent) but not found])
637fi
638
639# jansson (for src/nghttp, src/deflatehd and src/inflatehd)
640have_jansson=no
641if test "x${request_jansson}" != "xno"; then
642  PKG_CHECK_MODULES([JANSSON], [jansson >= 2.5],
643                    [have_jansson=yes], [have_jansson=no])
644  if test "x${have_jansson}" = "xyes"; then
645    AC_DEFINE([HAVE_JANSSON], [1],
646              [Define to 1 if you have `libjansson` library.])
647  else
648    AC_MSG_NOTICE($JANSSON_PKG_ERRORS)
649  fi
650fi
651
652if test "x${request_jansson}" = "xyes" &&
653   test "x${have_jansson}" != "xyes"; then
654  AC_MSG_ERROR([jansson was requested (--with-jansson) but not found])
655fi
656
657#  libsystemd (for src/nghttpx)
658have_libsystemd=no
659if test "x${request_systemd}" != "xno"; then
660  PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [have_libsystemd=yes],
661                    [have_libsystemd=no])
662  if test "x${have_libsystemd}" = "xyes"; then
663    AC_DEFINE([HAVE_LIBSYSTEMD], [1],
664              [Define to 1 if you have `libsystemd` library.])
665  else
666    AC_MSG_NOTICE($SYSTEMD_PKG_ERRORS)
667  fi
668fi
669
670if test "x${request_systemd}" = "xyes" &&
671   test "x${have_libsystemd}" != "xyes"; then
672  AC_MSG_ERROR([systemd was requested (--with-systemd) but not found])
673fi
674
675# libxml2 (for src/nghttp)
676have_libxml2=no
677if test "x${request_libxml2}" != "xno"; then
678  PKG_CHECK_MODULES([LIBXML2], [libxml-2.0 >= 2.6.26],
679                    [have_libxml2=yes], [have_libxml2=no])
680  if test "x${have_libxml2}" = "xyes"; then
681    AC_DEFINE([HAVE_LIBXML2], [1], [Define to 1 if you have `libxml2` library.])
682  else
683    AC_MSG_NOTICE($LIBXML2_PKG_ERRORS)
684  fi
685fi
686
687if test "x${request_libxml2}" = "xyes" &&
688   test "x${have_libxml2}" != "xyes"; then
689  AC_MSG_ERROR([libxml2 was requested (--with-libxml2) but not found])
690fi
691
692AM_CONDITIONAL([HAVE_LIBXML2], [ test "x${have_libxml2}" = "xyes" ])
693
694# jemalloc
695have_jemalloc=no
696if test "x${request_jemalloc}" != "xno"; then
697  if test "x${JEMALLOC_LIBS}" = "x" && test "x${JEMALLOC_CFLAGS}" = "x"; then
698    save_LIBS=$LIBS
699    AC_SEARCH_LIBS([malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
700                   [$PTHREAD_LDFLAGS])
701
702    if test "x${have_jemalloc}" = "xyes"; then
703      jemalloc_libs=${ac_cv_search_malloc_stats_print}
704    else
705      # On Darwin, malloc_stats_print is je_malloc_stats_print
706      AC_SEARCH_LIBS([je_malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
707                     [$PTHREAD_LDFLAGS])
708
709      if test "x${have_jemalloc}" = "xyes"; then
710        jemalloc_libs=${ac_cv_search_je_malloc_stats_print}
711      fi
712    fi
713
714    LIBS=$save_LIBS
715
716    if test "x${have_jemalloc}" = "xyes" &&
717       test "x${jemalloc_libs}" != "xnone required"; then
718      JEMALLOC_LIBS=${jemalloc_libs}
719    fi
720  else
721    have_jemalloc=yes
722  fi
723fi
724
725if test "x${request_jemalloc}" = "xyes" &&
726   test "x${have_jemalloc}" != "xyes"; then
727  AC_MSG_ERROR([jemalloc was requested (--with-jemalloc) but not found])
728fi
729
730# The nghttp, nghttpd and nghttpx under src depend on zlib, OpenSSL,
731# libev, and libc-ares.
732enable_app=no
733if test "x${request_app}" != "xno" &&
734   test "x${have_zlib}" = "xyes" &&
735   test "x${have_openssl}" = "xyes" &&
736   test "x${have_libev}" = "xyes" &&
737   test "x${have_libcares}" = "xyes"; then
738  enable_app=yes
739fi
740
741if test "x${request_app}" = "xyes" &&
742   test "x${enable_app}" != "xyes"; then
743  AC_MSG_ERROR([applications were requested (--enable-app) but dependencies are not met.])
744fi
745
746AM_CONDITIONAL([ENABLE_APP], [ test "x${enable_app}" = "xyes" ])
747
748# Check HTTP/3 support
749enable_http3=no
750if test "x${request_http3}" != "xno" &&
751   (test "x${have_ssl_is_quic}" = "xyes" ||
752    test "x${have_boringssl_quic}" = "xyes") &&
753   test "x${have_libngtcp2}" = "xyes" &&
754   (test "x${have_libngtcp2_crypto_openssl}" = "xyes" ||
755    test "x${have_libngtcp2_crypto_boringssl}" = "xyes") &&
756   test "x${have_libnghttp3}" = "xyes"; then
757  enable_http3=yes
758  AC_DEFINE([ENABLE_HTTP3], [1], [Define to 1 if HTTP/3 is enabled.])
759fi
760
761if test "x${request_http3}" = "xyes" &&
762   test "x${enable_http3}" != "xyes"; then
763  AC_MSG_ERROR([HTTP/3 was requested (--enable-http3) but dependencies are not met.])
764fi
765
766AM_CONDITIONAL([ENABLE_HTTP3], [ test "x${enable_http3}" = "xyes" ])
767
768enable_hpack_tools=no
769# HPACK tools requires jansson
770if test "x${request_hpack_tools}" != "xno" &&
771   test "x${have_jansson}" = "xyes"; then
772  enable_hpack_tools=yes
773fi
774
775if test "x${request_hpack_tools}" = "xyes" &&
776   test "x${enable_hpack_tools}" != "xyes"; then
777  AC_MSG_ERROR([HPACK tools were requested (--enable-hpack-tools) but dependencies are not met.])
778fi
779
780AM_CONDITIONAL([ENABLE_HPACK_TOOLS], [ test "x${enable_hpack_tools}" = "xyes" ])
781
782# The example programs depend on OpenSSL and libevent_openssl
783enable_examples=no
784if test "x${request_examples}" != "xno" &&
785   test "x${have_openssl}" = "xyes" &&
786   test "x${have_libevent_openssl}" = "xyes"; then
787  enable_examples=yes
788fi
789
790if test "x${request_examples}" = "xyes" &&
791   test "x${enable_examples}" != "xyes"; then
792  AC_MSG_ERROR([examples were requested (--enable-examples) but dependencies are not met.])
793fi
794
795AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
796
797# third-party only be built when needed
798
799enable_third_party=no
800have_mruby=no
801have_neverbleed=no
802if test "x${enable_examples}" = "xyes" ||
803   test "x${enable_app}" = "xyes" ||
804   test "x${enable_hpack_tools}" = "xyes"; then
805  enable_third_party=yes
806
807  # mruby (for src/nghttpx)
808  if test "x${request_mruby}" = "xyes"; then
809    # We are going to build mruby
810    have_mruby=yes
811    AC_DEFINE([HAVE_MRUBY], [1], [Define to 1 if you have `mruby` library.])
812    LIBMRUBY_LIBS="-lmruby -lm"
813    LIBMRUBY_CFLAGS=
814    AC_SUBST([LIBMRUBY_LIBS])
815    AC_SUBST([LIBMRUBY_CFLAGS])
816  fi
817
818  # neverbleed (for src/nghttpx)
819  if test "x${request_neverbleed}" = "xyes"; then
820    have_neverbleed=yes
821    AC_DEFINE([HAVE_NEVERBLEED], [1], [Define to 1 if you have `neverbleed` library.])
822  fi
823fi
824
825AM_CONDITIONAL([ENABLE_THIRD_PARTY], [ test "x${enable_third_party}" = "xyes" ])
826AM_CONDITIONAL([HAVE_MRUBY], [test "x${have_mruby}" = "xyes"])
827AM_CONDITIONAL([HAVE_NEVERBLEED], [test "x${have_neverbleed}" = "xyes"])
828
829# failmalloc tests
830enable_failmalloc=no
831if test "x${request_failmalloc}" = "xyes"; then
832  enable_failmalloc=yes
833fi
834
835AM_CONDITIONAL([ENABLE_FAILMALLOC], [ test "x${enable_failmalloc}" = "xyes" ])
836
837# Checks for header files.
838AC_HEADER_ASSERT
839AC_CHECK_HEADERS([ \
840  arpa/inet.h \
841  fcntl.h \
842  inttypes.h \
843  limits.h \
844  netdb.h \
845  netinet/in.h \
846  pwd.h \
847  stddef.h \
848  stdint.h \
849  stdlib.h \
850  string.h \
851  sys/socket.h \
852  sys/time.h \
853  syslog.h \
854  time.h \
855  unistd.h \
856])
857
858# Checks for typedefs, structures, and compiler characteristics.
859AC_TYPE_SIZE_T
860AC_TYPE_SSIZE_T
861AC_TYPE_UINT8_T
862AC_TYPE_UINT16_T
863AC_TYPE_UINT32_T
864AC_TYPE_UINT64_T
865AC_TYPE_INT8_T
866AC_TYPE_INT16_T
867AC_TYPE_INT32_T
868AC_TYPE_INT64_T
869AC_TYPE_OFF_T
870AC_TYPE_PID_T
871AC_TYPE_UID_T
872AC_CHECK_TYPES([ptrdiff_t])
873AC_C_BIGENDIAN
874AC_C_INLINE
875AC_SYS_LARGEFILE
876
877AC_CHECK_MEMBER([struct tm.tm_gmtoff], [have_struct_tm_tm_gmtoff=yes],
878                [have_struct_tm_tm_gmtoff=no], [[#include <time.h>]])
879
880AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
881                [AC_DEFINE([HAVE_SOCKADDR_IN_SIN_LEN],[1],
882                  [Define to 1 if struct sockaddr_in has sin_len member.])],
883                [],
884                [[
885#include <sys/types.h>
886#include <sys/socket.h>
887#include <netinet/in.h>
888]])
889
890AC_CHECK_MEMBER([struct sockaddr_in6.sin6_len],
891                [AC_DEFINE([HAVE_SOCKADDR_IN6_SIN6_LEN],[1],
892                  [Define to 1 if struct sockaddr_in6 has sin6_len member.])],
893                [],
894                [[
895#include <sys/types.h>
896#include <sys/socket.h>
897#include <netinet/in.h>
898]])
899
900if test "x$have_struct_tm_tm_gmtoff" = "xyes"; then
901  AC_DEFINE([HAVE_STRUCT_TM_TM_GMTOFF], [1],
902            [Define to 1 if you have `struct tm.tm_gmtoff` member.])
903fi
904
905# Check size of pointer to decide we need 8 bytes alignment
906# adjustment.
907AC_CHECK_SIZEOF([int *])
908
909AC_CHECK_SIZEOF([time_t])
910
911# Checks for library functions.
912
913# Don't check malloc, since it does not play nicely with C++ stdlib
914# AC_FUNC_MALLOC
915
916AC_FUNC_CHOWN
917AC_FUNC_ERROR_AT_LINE
918AC_FUNC_FORK
919# Don't check realloc, since LeakSanitizer detects memory leak during check
920# AC_FUNC_REALLOC
921AC_FUNC_STRERROR_R
922AC_FUNC_STRNLEN
923
924AC_CHECK_FUNCS([ \
925  _Exit \
926  accept4 \
927  dup2 \
928  getcwd \
929  getpwnam \
930  localtime_r \
931  memchr \
932  memmove \
933  memset \
934  mkostemp \
935  socket \
936  sqrt \
937  strchr \
938  strdup \
939  strerror \
940  strndup \
941  strstr \
942  strtol \
943  strtoul \
944  timegm \
945])
946
947# timerfd_create was added in linux kernel 2.6.25
948
949AC_CHECK_FUNC([timerfd_create],
950              [have_timerfd_create=yes], [have_timerfd_create=no])
951
952# For cygwin: we can link initgroups, so AC_CHECK_FUNCS succeeds, but
953# cygwin disables initgroups due to feature test macro magic with our
954# configuration.  FreeBSD declares initgroups() in unistd.h.
955AC_CHECK_DECLS([initgroups], [], [], [[
956  #ifdef HAVE_UNISTD_H
957  # include <unistd.h>
958  #endif
959  #include <grp.h>
960]])
961
962save_CFLAGS=$CFLAGS
963save_CXXFLAGS=$CXXFLAGS
964
965CFLAGS=
966CXXFLAGS=
967
968if test "x$werror" != "xno"; then
969    # For C compiler
970    AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
971    AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"])
972    AX_CHECK_COMPILE_FLAG([-Werror], [CFLAGS="$CFLAGS -Werror"])
973    AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"])
974    AX_CHECK_COMPILE_FLAG([-Wstrict-prototypes], [CFLAGS="$CFLAGS -Wstrict-prototypes"])
975    AX_CHECK_COMPILE_FLAG([-Wmissing-declarations], [CFLAGS="$CFLAGS -Wmissing-declarations"])
976    AX_CHECK_COMPILE_FLAG([-Wpointer-arith], [CFLAGS="$CFLAGS -Wpointer-arith"])
977    AX_CHECK_COMPILE_FLAG([-Wdeclaration-after-statement], [CFLAGS="$CFLAGS -Wdeclaration-after-statement"])
978    AX_CHECK_COMPILE_FLAG([-Wformat-security], [CFLAGS="$CFLAGS -Wformat-security"])
979    AX_CHECK_COMPILE_FLAG([-Wwrite-strings], [CFLAGS="$CFLAGS -Wwrite-strings"])
980    AX_CHECK_COMPILE_FLAG([-Wshadow], [CFLAGS="$CFLAGS -Wshadow"])
981    AX_CHECK_COMPILE_FLAG([-Winline], [CFLAGS="$CFLAGS -Winline"])
982    AX_CHECK_COMPILE_FLAG([-Wnested-externs], [CFLAGS="$CFLAGS -Wnested-externs"])
983    AX_CHECK_COMPILE_FLAG([-Wfloat-equal], [CFLAGS="$CFLAGS -Wfloat-equal"])
984    AX_CHECK_COMPILE_FLAG([-Wundef], [CFLAGS="$CFLAGS -Wundef"])
985    AX_CHECK_COMPILE_FLAG([-Wendif-labels], [CFLAGS="$CFLAGS -Wendif-labels"])
986    AX_CHECK_COMPILE_FLAG([-Wempty-body], [CFLAGS="$CFLAGS -Wempty-body"])
987    AX_CHECK_COMPILE_FLAG([-Wcast-align], [CFLAGS="$CFLAGS -Wcast-align"])
988    AX_CHECK_COMPILE_FLAG([-Wclobbered], [CFLAGS="$CFLAGS -Wclobbered"])
989    AX_CHECK_COMPILE_FLAG([-Wvla], [CFLAGS="$CFLAGS -Wvla"])
990    AX_CHECK_COMPILE_FLAG([-Wpragmas], [CFLAGS="$CFLAGS -Wpragmas"])
991    AX_CHECK_COMPILE_FLAG([-Wunreachable-code], [CFLAGS="$CFLAGS -Wunreachable-code"])
992    AX_CHECK_COMPILE_FLAG([-Waddress], [CFLAGS="$CFLAGS -Waddress"])
993    AX_CHECK_COMPILE_FLAG([-Wattributes], [CFLAGS="$CFLAGS -Wattributes"])
994    AX_CHECK_COMPILE_FLAG([-Wdiv-by-zero], [CFLAGS="$CFLAGS -Wdiv-by-zero"])
995    AX_CHECK_COMPILE_FLAG([-Wshorten-64-to-32], [CFLAGS="$CFLAGS -Wshorten-64-to-32"])
996
997    AX_CHECK_COMPILE_FLAG([-Wconversion], [CFLAGS="$CFLAGS -Wconversion"])
998    AX_CHECK_COMPILE_FLAG([-Wextended-offsetof], [CFLAGS="$CFLAGS -Wextended-offsetof"])
999    AX_CHECK_COMPILE_FLAG([-Wformat-nonliteral], [CFLAGS="$CFLAGS -Wformat-nonliteral"])
1000    AX_CHECK_COMPILE_FLAG([-Wlanguage-extension-token], [CFLAGS="$CFLAGS -Wlanguage-extension-token"])
1001    AX_CHECK_COMPILE_FLAG([-Wmissing-field-initializers], [CFLAGS="$CFLAGS -Wmissing-field-initializers"])
1002    AX_CHECK_COMPILE_FLAG([-Wmissing-noreturn], [CFLAGS="$CFLAGS -Wmissing-noreturn"])
1003    AX_CHECK_COMPILE_FLAG([-Wmissing-variable-declarations], [CFLAGS="$CFLAGS -Wmissing-variable-declarations"])
1004    # Not used because we cannot change public structs
1005    # AX_CHECK_COMPILE_FLAG([-Wpadded], [CFLAGS="$CFLAGS -Wpadded"])
1006    AX_CHECK_COMPILE_FLAG([-Wsign-conversion], [CFLAGS="$CFLAGS -Wsign-conversion"])
1007    # Not used because this basically disallows default case
1008    # AX_CHECK_COMPILE_FLAG([-Wswitch-enum], [CFLAGS="$CFLAGS -Wswitch-enum"])
1009    AX_CHECK_COMPILE_FLAG([-Wunreachable-code-break], [CFLAGS="$CFLAGS -Wunreachable-code-break"])
1010    AX_CHECK_COMPILE_FLAG([-Wunused-macros], [CFLAGS="$CFLAGS -Wunused-macros"])
1011    AX_CHECK_COMPILE_FLAG([-Wunused-parameter], [CFLAGS="$CFLAGS -Wunused-parameter"])
1012    AX_CHECK_COMPILE_FLAG([-Wredundant-decls], [CFLAGS="$CFLAGS -Wredundant-decls"])
1013    # Only work with Clang for the moment
1014    AX_CHECK_COMPILE_FLAG([-Wheader-guard], [CFLAGS="$CFLAGS -Wheader-guard"])
1015    AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CFLAGS="$CFLAGS -Wsometimes-uninitialized"])
1016
1017    # This is required because we pass format string as "const char*.
1018    AX_CHECK_COMPILE_FLAG([-Wno-format-nonliteral], [CFLAGS="$CFLAGS -Wno-format-nonliteral"])
1019
1020    # For C++ compiler
1021    AC_LANG_PUSH(C++)
1022    AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS="$CXXFLAGS -Wall"])
1023    AX_CHECK_COMPILE_FLAG([-Werror], [CXXFLAGS="$CXXFLAGS -Werror"])
1024    AX_CHECK_COMPILE_FLAG([-Wformat-security], [CXXFLAGS="$CXXFLAGS -Wformat-security"])
1025    AX_CHECK_COMPILE_FLAG([-Wsometimes-uninitialized], [CXXFLAGS="$CXXFLAGS -Wsometimes-uninitialized"])
1026    # Disable noexcept-type warning of g++-7.  This is not harmful as
1027    # long as all source files are compiled with the same compiler.
1028    AX_CHECK_COMPILE_FLAG([-Wno-noexcept-type], [CXXFLAGS="$CXXFLAGS -Wno-noexcept-type"])
1029    AC_LANG_POP()
1030fi
1031
1032WARNCFLAGS=$CFLAGS
1033WARNCXXFLAGS=$CXXFLAGS
1034
1035CFLAGS=$save_CFLAGS
1036CXXFLAGS=$save_CXXFLAGS
1037
1038AC_SUBST([WARNCFLAGS])
1039AC_SUBST([WARNCXXFLAGS])
1040
1041EXTRACFLAG=
1042AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [EXTRACFLAG="-fvisibility=hidden"])
1043
1044AC_SUBST([EXTRACFLAG])
1045
1046if test "x$debug" != "xno"; then
1047    AC_DEFINE([DEBUGBUILD], [1], [Define to 1 to enable debug output.])
1048fi
1049
1050enable_threads=yes
1051# Some platform does not have working std::future.  We disable
1052# threading for those platforms.
1053if test "x$threads" != "xyes" ||
1054   test "x$have_std_future" != "xyes"; then
1055    enable_threads=no
1056    AC_DEFINE([NOTHREADS], [1], [Define to 1 if you want to disable threads.])
1057fi
1058
1059# propagate $enable_static to tests/Makefile.am
1060AM_CONDITIONAL([ENABLE_STATIC], [test "x$enable_static" = "xyes"])
1061
1062AC_SUBST([TESTLDADD])
1063AC_SUBST([APPLDFLAGS])
1064
1065AC_CONFIG_FILES([
1066  Makefile
1067  lib/Makefile
1068  lib/libnghttp2.pc
1069  lib/includes/Makefile
1070  lib/includes/nghttp2/nghttp2ver.h
1071  tests/Makefile
1072  tests/testdata/Makefile
1073  third-party/Makefile
1074  src/Makefile
1075  bpf/Makefile
1076  examples/Makefile
1077  integration-tests/Makefile
1078  integration-tests/config.go
1079  integration-tests/setenv
1080  doc/Makefile
1081  doc/conf.py
1082  doc/index.rst
1083  doc/package_README.rst
1084  doc/tutorial-client.rst
1085  doc/tutorial-server.rst
1086  doc/tutorial-hpack.rst
1087  doc/nghttpx-howto.rst
1088  doc/h2load-howto.rst
1089  doc/building-android-binary.rst
1090  doc/nghttp2.h.rst
1091  doc/nghttp2ver.h.rst
1092  doc/contribute.rst
1093  contrib/Makefile
1094  script/Makefile
1095])
1096AC_OUTPUT
1097
1098AC_MSG_NOTICE([summary of build options:
1099
1100    Package version: ${VERSION}
1101    Library version: $LT_CURRENT:$LT_REVISION:$LT_AGE
1102    Install prefix:  ${prefix}
1103    System types:
1104      Build:         ${build}
1105      Host:          ${host}
1106      Target:        ${target}
1107    Compiler:
1108      C compiler:     ${CC}
1109      CFLAGS:         ${CFLAGS}
1110      LDFLAGS:        ${LDFLAGS}
1111      C++ compiler:   ${CXX}
1112      CXXFLAGS:       ${CXXFLAGS}
1113      CXXCPP:         ${CXXCPP}
1114      C preprocessor: ${CPP}
1115      CPPFLAGS:       ${CPPFLAGS}
1116      WARNCFLAGS:     ${WARNCFLAGS}
1117      WARNCXXFLAGS:   ${WARNCXXFLAGS}
1118      CXX1XCXXFLAGS:  ${CXX1XCXXFLAGS}
1119      EXTRACFLAG:     ${EXTRACFLAG}
1120      BPFCFLAGS:      ${BPFCFLAGS}
1121      EXTRABPFCFLAGS: ${EXTRABPFCFLAGS}
1122      LIBS:           ${LIBS}
1123      DEFS:           ${DEFS}
1124      EXTRA_DEFS:     ${EXTRA_DEFS}
1125    Library:
1126      Shared:         ${enable_shared}
1127      Static:         ${enable_static}
1128    Libtool:
1129      LIBTOOL_LDFLAGS: ${LIBTOOL_LDFLAGS}
1130    Python:
1131      Python:         ${PYTHON}
1132      PYTHON_VERSION: ${PYTHON_VERSION}
1133    Test:
1134      CUnit:          ${have_cunit} (CFLAGS='${CUNIT_CFLAGS}' LIBS='${CUNIT_LIBS}')
1135      Failmalloc:     ${enable_failmalloc}
1136    Libs:
1137      OpenSSL:        ${have_openssl} (CFLAGS='${OPENSSL_CFLAGS}' LIBS='${OPENSSL_LIBS}')
1138      Libxml2:        ${have_libxml2} (CFLAGS='${LIBXML2_CFLAGS}' LIBS='${LIBXML2_LIBS}')
1139      Libev:          ${have_libev} (CFLAGS='${LIBEV_CFLAGS}' LIBS='${LIBEV_LIBS}')
1140      Libc-ares:      ${have_libcares} (CFLAGS='${LIBCARES_CFLAGS}' LIBS='${LIBCARES_LIBS}')
1141      libngtcp2:      ${have_libngtcp2} (CFLAGS='${LIBNGTCP2_CFLAGS}' LIBS='${LIBNGTCP2_LIBS}')
1142      libngtcp2_crypto_openssl: ${have_libngtcp2_crypto_openssl} (CFLAGS='${LIBNGTCP2_CRYPTO_OPENSSL_CFLAGS}' LIBS='${LIBNGTCP2_CRYPTO_OPENSSL_LIBS}')
1143      libngtcp2_crypto_boringssl: ${have_libngtcp2_crypto_boringssl} (CFLAGS='${LIBNGTCP2_CRYPTO_BORINGSSL_CFLAGS}' LIBS='${LIBNGTCP2_CRYPTO_BORINGSSL_LIBS}')
1144      libnghttp3:     ${have_libnghttp3} (CFLAGS='${LIBNGHTTP3_CFLAGS}' LIBS='${LIBNGHTTP3_LIBS}')
1145      libbpf:         ${have_libbpf} (CFLAGS='${LIBBPF_CFLAGS}' LIBS='${LIBBPF_LIBS}')
1146      Libevent(SSL):  ${have_libevent_openssl} (CFLAGS='${LIBEVENT_OPENSSL_CFLAGS}' LIBS='${LIBEVENT_OPENSSL_LIBS}')
1147      Jansson:        ${have_jansson} (CFLAGS='${JANSSON_CFLAGS}' LIBS='${JANSSON_LIBS}')
1148      Jemalloc:       ${have_jemalloc} (CFLAGS='${JEMALLOC_CFLAGS}' LIBS='${JEMALLOC_LIBS}')
1149      Zlib:           ${have_zlib} (CFLAGS='${ZLIB_CFLAGS}' LIBS='${ZLIB_LIBS}')
1150      Systemd:        ${have_libsystemd} (CFLAGS='${SYSTEMD_CFLAGS}' LIBS='${SYSTEMD_LIBS}')
1151    Third-party:
1152      http-parser:    ${enable_third_party}
1153      MRuby:          ${have_mruby} (CFLAGS='${LIBMRUBY_CFLAGS}' LIBS='${LIBMRUBY_LIBS}')
1154      Neverbleed:     ${have_neverbleed}
1155    Features:
1156      Applications:   ${enable_app}
1157      HPACK tools:    ${enable_hpack_tools}
1158      Examples:       ${enable_examples}
1159      Threading:      ${enable_threads}
1160      HTTP/3 (EXPERIMENTAL): ${enable_http3}
1161])
1162