configure 1.09 MB
Newer Older
powelld's avatar
powelld committed
31001 31002 31003 31004 31005 31006 31007 31008 31009 31010 31011 31012 31013 31014 31015 31016 31017 31018 31019 31020 31021 31022 31023 31024 31025 31026 31027 31028 31029 31030 31031 31032 31033 31034 31035 31036 31037 31038 31039 31040 31041 31042 31043 31044 31045 31046 31047 31048 31049 31050 31051 31052 31053 31054 31055 31056 31057 31058 31059 31060 31061 31062 31063 31064 31065 31066 31067 31068 31069 31070 31071 31072 31073 31074 31075 31076 31077 31078 31079 31080 31081 31082 31083 31084 31085 31086 31087 31088 31089 31090 31091 31092 31093 31094 31095 31096 31097 31098 31099 31100 31101 31102 31103 31104 31105 31106 31107 31108 31109 31110 31111 31112 31113 31114 31115 31116 31117 31118 31119 31120 31121 31122 31123 31124 31125 31126 31127 31128 31129 31130 31131 31132 31133 31134 31135 31136 31137 31138 31139 31140 31141 31142 31143 31144 31145 31146 31147 31148 31149 31150 31151 31152 31153 31154 31155 31156 31157 31158 31159 31160 31161 31162 31163 31164 31165 31166 31167 31168 31169 31170 31171 31172 31173 31174 31175 31176 31177 31178 31179 31180 31181 31182 31183 31184 31185 31186 31187 31188 31189 31190 31191 31192 31193 31194 31195 31196 31197 31198 31199 31200 31201 31202 31203 31204 31205 31206 31207 31208 31209 31210 31211 31212 31213 31214 31215 31216 31217 31218 31219 31220 31221 31222 31223 31224 31225 31226 31227 31228 31229 31230 31231 31232 31233 31234 31235 31236 31237 31238 31239 31240 31241 31242 31243 31244 31245 31246 31247 31248 31249 31250 31251 31252 31253 31254 31255 31256 31257 31258 31259 31260 31261 31262 31263 31264 31265 31266 31267 31268 31269 31270 31271 31272 31273 31274 31275 31276 31277 31278 31279 31280 31281 31282 31283 31284 31285 31286 31287 31288 31289 31290 31291 31292 31293 31294 31295 31296 31297 31298 31299 31300 31301 31302 31303 31304 31305 31306 31307 31308 31309 31310 31311 31312 31313 31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 31327 31328 31329 31330 31331 31332 31333 31334 31335 31336 31337 31338 31339 31340 31341 31342 31343 31344 31345 31346 31347 31348 31349 31350 31351 31352 31353 31354 31355 31356 31357 31358 31359 31360 31361 31362 31363 31364 31365 31366 31367 31368 31369 31370 31371 31372 31373 31374 31375 31376 31377 31378 31379 31380 31381 31382 31383 31384 31385 31386 31387 31388 31389 31390 31391 31392 31393 31394 31395 31396 31397 31398 31399 31400 31401 31402 31403 31404 31405 31406 31407 31408 31409 31410 31411 31412 31413 31414 31415 31416 31417 31418 31419 31420 31421 31422 31423 31424 31425 31426 31427 31428 31429 31430 31431 31432 31433 31434 31435 31436 31437 31438 31439 31440 31441 31442 31443 31444 31445 31446 31447 31448 31449 31450 31451 31452 31453 31454 31455 31456 31457 31458 31459 31460 31461 31462 31463 31464 31465 31466 31467 31468 31469 31470 31471 31472 31473 31474 31475 31476 31477 31478 31479 31480 31481 31482 31483 31484 31485 31486 31487 31488 31489 31490 31491 31492 31493 31494 31495 31496 31497 31498 31499 31500 31501 31502 31503 31504 31505 31506 31507 31508 31509 31510 31511 31512 31513 31514 31515 31516 31517 31518 31519 31520 31521 31522 31523 31524 31525 31526 31527 31528 31529 31530 31531 31532 31533 31534 31535 31536 31537 31538 31539 31540 31541 31542 31543 31544 31545 31546 31547 31548 31549 31550 31551 31552 31553 31554 31555 31556 31557 31558 31559 31560 31561 31562 31563 31564 31565 31566 31567 31568 31569 31570 31571 31572 31573 31574 31575 31576 31577 31578 31579 31580 31581 31582 31583 31584 31585 31586 31587 31588 31589 31590 31591 31592 31593 31594 31595 31596 31597 31598 31599 31600 31601 31602 31603 31604 31605 31606 31607 31608 31609 31610 31611 31612 31613 31614 31615 31616 31617 31618 31619 31620 31621 31622 31623 31624 31625 31626 31627 31628 31629 31630 31631 31632 31633 31634 31635 31636 31637 31638 31639 31640 31641 31642 31643 31644 31645 31646 31647 31648 31649 31650 31651 31652 31653 31654 31655 31656 31657 31658 31659 31660 31661 31662 31663 31664 31665 31666 31667 31668 31669 31670 31671 31672 31673 31674 31675 31676 31677 31678 31679 31680 31681 31682 31683 31684 31685 31686 31687 31688 31689 31690 31691 31692 31693 31694 31695 31696 31697 31698 31699 31700 31701 31702 31703 31704 31705 31706 31707 31708 31709 31710 31711 31712 31713 31714 31715 31716 31717 31718 31719 31720 31721 31722 31723 31724 31725 31726 31727 31728 31729 31730 31731 31732 31733 31734 31735 31736 31737 31738 31739 31740 31741 31742 31743 31744 31745 31746 31747 31748 31749 31750 31751 31752 31753 31754 31755 31756 31757 31758 31759 31760 31761 31762 31763 31764 31765 31766 31767 31768 31769 31770 31771 31772 31773 31774 31775 31776 31777 31778 31779 31780 31781 31782 31783 31784 31785 31786 31787 31788 31789 31790 31791 31792 31793 31794 31795 31796 31797 31798 31799 31800 31801 31802 31803 31804 31805 31806 31807 31808 31809 31810 31811 31812 31813 31814 31815 31816 31817 31818 31819 31820 31821 31822 31823 31824 31825 31826 31827 31828 31829 31830 31831 31832 31833 31834 31835 31836 31837 31838 31839 31840 31841 31842 31843 31844 31845 31846 31847 31848 31849 31850 31851 31852 31853 31854 31855 31856 31857 31858 31859 31860 31861 31862 31863 31864 31865 31866 31867 31868 31869 31870 31871 31872 31873 31874 31875 31876 31877 31878 31879 31880 31881 31882 31883 31884 31885 31886 31887 31888 31889 31890 31891 31892 31893 31894 31895 31896 31897 31898 31899 31900 31901 31902 31903 31904 31905 31906 31907 31908 31909 31910 31911 31912 31913 31914 31915 31916 31917 31918 31919 31920 31921 31922 31923 31924 31925 31926 31927 31928 31929 31930 31931 31932 31933 31934 31935 31936 31937 31938 31939 31940 31941 31942 31943 31944 31945 31946 31947 31948 31949 31950 31951 31952 31953 31954 31955 31956 31957 31958 31959 31960 31961 31962 31963 31964 31965 31966 31967 31968 31969 31970 31971 31972 31973 31974 31975 31976 31977 31978 31979 31980 31981 31982 31983 31984 31985 31986 31987 31988 31989 31990 31991 31992 31993 31994 31995 31996 31997 31998 31999 32000

        ac_cv_nghttp2=no
    ap_nghttp2_found=""
    ap_nghttp2_base=""
    ap_nghttp2_libs=""

        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for user-provided nghttp2 base directory" >&5
$as_echo_n "checking for user-provided nghttp2 base directory... " >&6; }

# Check whether --with-nghttp2 was given.
if test "${with_nghttp2+set}" = set; then :
  withval=$with_nghttp2;
            if test "x$withval" != "xyes" -a "x$withval" != "x"; then
                ap_nghttp2_base="`cd $withval ; pwd`"
      fi

fi

    if test "x$ap_nghttp2_base" = "x"; then
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
$as_echo "none" >&6; }
    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ap_nghttp2_base" >&5
$as_echo "$ap_nghttp2_base" >&6; }
    fi

        saved_CPPFLAGS="$CPPFLAGS"
    saved_LIBS="$LIBS"
    saved_LDFLAGS="$LDFLAGS"

        if test -n "$PKGCONFIG"; then
      saved_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pkg-config along $PKG_CONFIG_PATH" >&5
$as_echo_n "checking for pkg-config along $PKG_CONFIG_PATH... " >&6; }
      if test "x$ap_nghttp2_base" != "x" ; then
        if test -f "${ap_nghttp2_base}/lib/pkgconfig/libnghttp2.pc"; then
                              PKG_CONFIG_PATH="${ap_nghttp2_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
          export PKG_CONFIG_PATH
        elif test -f "${ap_nghttp2_base}/lib64/pkgconfig/libnghttp2.pc"; then
                              PKG_CONFIG_PATH="${ap_nghttp2_base}/lib64/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
          export PKG_CONFIG_PATH
        fi
      fi
      # Check whether --enable-nghttp2-staticlib-deps was given.
if test "${enable_nghttp2_staticlib_deps+set}" = set; then :
  enableval=$enable_nghttp2_staticlib_deps;
        if test "$enableval" = "yes"; then
          PKGCONFIG_LIBOPTS="--static"
        fi

fi

      ap_nghttp2_libs="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-l --silence-errors libnghttp2`"
      if test $? -eq 0; then
        ap_nghttp2_found="yes"
        pkglookup="`$PKGCONFIG --cflags-only-I libnghttp2`"

  if test "x$CPPFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$pkglookup\""
    CPPFLAGS="$pkglookup"
  else
    apr_addto_bugger="$pkglookup"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi


  if test "x$MOD_CFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_CFLAGS to \"$pkglookup\""
    MOD_CFLAGS="$pkglookup"
  else
    apr_addto_bugger="$pkglookup"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_CFLAGS"
        MOD_CFLAGS="$MOD_CFLAGS $i"
      fi
    done
  fi

        pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-L libnghttp2`"

  if test "x$LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pkglookup\""
    LDFLAGS="$pkglookup"
  else
    apr_addto_bugger="$pkglookup"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi


  if test "x$MOD_LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_LDFLAGS to \"$pkglookup\""
    MOD_LDFLAGS="$pkglookup"
  else
    apr_addto_bugger="$pkglookup"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_LDFLAGS"
        MOD_LDFLAGS="$MOD_LDFLAGS $i"
      fi
    done
  fi

        pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-other libnghttp2`"

  if test "x$LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$pkglookup\""
    LDFLAGS="$pkglookup"
  else
    apr_addto_bugger="$pkglookup"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi


  if test "x$MOD_LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_LDFLAGS to \"$pkglookup\""
    MOD_LDFLAGS="$pkglookup"
  else
    apr_addto_bugger="$pkglookup"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_LDFLAGS"
        MOD_LDFLAGS="$MOD_LDFLAGS $i"
      fi
    done
  fi

      fi
      PKG_CONFIG_PATH="$saved_PKG_CONFIG_PATH"
    fi

        if test "x$ap_nghttp2_base" != "x" -a "x$ap_nghttp2_found" = "x"; then

  if test "x$CPPFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"-I$ap_nghttp2_base/include\""
    CPPFLAGS="-I$ap_nghttp2_base/include"
  else
    apr_addto_bugger="-I$ap_nghttp2_base/include"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $i"
      fi
    done
  fi


  if test "x$MOD_CFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_CFLAGS to \"-I$ap_nghttp2_base/include\""
    MOD_CFLAGS="-I$ap_nghttp2_base/include"
  else
    apr_addto_bugger="-I$ap_nghttp2_base/include"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_CFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_CFLAGS"
        MOD_CFLAGS="$MOD_CFLAGS $i"
      fi
    done
  fi


  if test "x$LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"-L$ap_nghttp2_base/lib\""
    LDFLAGS="-L$ap_nghttp2_base/lib"
  else
    apr_addto_bugger="-L$ap_nghttp2_base/lib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi


  if test "x$MOD_LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_LDFLAGS to \"-L$ap_nghttp2_base/lib\""
    MOD_LDFLAGS="-L$ap_nghttp2_base/lib"
  else
    apr_addto_bugger="-L$ap_nghttp2_base/lib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_LDFLAGS"
        MOD_LDFLAGS="$MOD_LDFLAGS $i"
      fi
    done
  fi

      if test "x$ap_platform_runtime_link_flag" != "x"; then

  if test "x$LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$ap_platform_runtime_link_flag$ap_nghttp2_base/lib\""
    LDFLAGS="$ap_platform_runtime_link_flag$ap_nghttp2_base/lib"
  else
    apr_addto_bugger="$ap_platform_runtime_link_flag$ap_nghttp2_base/lib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
        LDFLAGS="$LDFLAGS $i"
      fi
    done
  fi


  if test "x$MOD_LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_LDFLAGS to \"$ap_platform_runtime_link_flag$ap_nghttp2_base/lib\""
    MOD_LDFLAGS="$ap_platform_runtime_link_flag$ap_nghttp2_base/lib"
  else
    apr_addto_bugger="$ap_platform_runtime_link_flag$ap_nghttp2_base/lib"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_LDFLAGS"
        MOD_LDFLAGS="$MOD_LDFLAGS $i"
      fi
    done
  fi

      fi
    fi

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nghttp2 version >= 1.2.1" >&5
$as_echo_n "checking for nghttp2 version >= 1.2.1... " >&6; }
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <nghttp2/nghttp2ver.h>
int
main ()
{

#if !defined(NGHTTP2_VERSION_NUM)
#error "Missing nghttp2 version"
#endif
#if NGHTTP2_VERSION_NUM < 0x010201
#error "Unsupported nghttp2 version " NGHTTP2_VERSION_TEXT
#endif
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: OK" >&5
$as_echo "OK" >&6; }
       ac_cv_nghttp2=yes
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: FAILED" >&5
$as_echo "FAILED" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

    if test "x$ac_cv_nghttp2" = "xyes"; then
      ap_nghttp2_libs="${ap_nghttp2_libs:--lnghttp2} `$apr_config --libs`"

  if test "x$MOD_LDFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_LDFLAGS to \"$ap_nghttp2_libs\""
    MOD_LDFLAGS="$ap_nghttp2_libs"
  else
    apr_addto_bugger="$ap_nghttp2_libs"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_LDFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_LDFLAGS"
        MOD_LDFLAGS="$MOD_LDFLAGS $i"
      fi
    done
  fi


  if test "x$LIBS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting LIBS to \"$ap_nghttp2_libs\""
    LIBS="$ap_nghttp2_libs"
  else
    apr_addto_bugger="$ap_nghttp2_libs"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LIBS"
        LIBS="$LIBS $i"
      fi
    done
  fi


            liberrors=""
      for ac_header in nghttp2/nghttp2.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "nghttp2/nghttp2.h" "ac_cv_header_nghttp2_nghttp2_h" "$ac_includes_default"
if test "x$ac_cv_header_nghttp2_nghttp2_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NGHTTP2_NGHTTP2_H 1
_ACEOF

fi

done

      for ac_func in nghttp2_session_server_new2
do :
  ac_fn_c_check_func "$LINENO" "nghttp2_session_server_new2" "ac_cv_func_nghttp2_session_server_new2"
if test "x$ac_cv_func_nghttp2_session_server_new2" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NGHTTP2_SESSION_SERVER_NEW2 1
_ACEOF

else
  liberrors="yes"
fi
done

      if test "x$liberrors" != "x"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: nghttp2 library is unusable" >&5
$as_echo "$as_me: WARNING: nghttp2 library is unusable" >&2;}
      fi
      for ac_func in nghttp2_stream_get_weight
do :
  ac_fn_c_check_func "$LINENO" "nghttp2_stream_get_weight" "ac_cv_func_nghttp2_stream_get_weight"
if test "x$ac_cv_func_nghttp2_stream_get_weight" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NGHTTP2_STREAM_GET_WEIGHT 1
_ACEOF

else
  liberrors="yes"
fi
done

      if test "x$liberrors" != "x"; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: nghttp2 version >= 1.3.0 is required" >&5
$as_echo "$as_me: WARNING: nghttp2 version >= 1.3.0 is required" >&2;}
      fi
      for ac_func in nghttp2_session_change_stream_priority
do :
  ac_fn_c_check_func "$LINENO" "nghttp2_session_change_stream_priority" "ac_cv_func_nghttp2_session_change_stream_priority"
if test "x$ac_cv_func_nghttp2_session_change_stream_priority" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NGHTTP2_SESSION_CHANGE_STREAM_PRIORITY 1
_ACEOF

  if test "x$MOD_CPPFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_CPPFLAGS to \""-DH2_NG2_CHANGE_PRIO"\""
    MOD_CPPFLAGS=""-DH2_NG2_CHANGE_PRIO""
  else
    apr_addto_bugger=""-DH2_NG2_CHANGE_PRIO""
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_CPPFLAGS"
        MOD_CPPFLAGS="$MOD_CPPFLAGS $i"
      fi
    done
  fi

fi
done

      for ac_func in nghttp2_session_callbacks_set_on_invalid_header_callback
do :
  ac_fn_c_check_func "$LINENO" "nghttp2_session_callbacks_set_on_invalid_header_callback" "ac_cv_func_nghttp2_session_callbacks_set_on_invalid_header_callback"
if test "x$ac_cv_func_nghttp2_session_callbacks_set_on_invalid_header_callback" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NGHTTP2_SESSION_CALLBACKS_SET_ON_INVALID_HEADER_CALLBACK 1
_ACEOF

  if test "x$MOD_CPPFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_CPPFLAGS to \""-DH2_NG2_INVALID_HEADER_CB"\""
    MOD_CPPFLAGS=""-DH2_NG2_INVALID_HEADER_CB""
  else
    apr_addto_bugger=""-DH2_NG2_INVALID_HEADER_CB""
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_CPPFLAGS"
        MOD_CPPFLAGS="$MOD_CPPFLAGS $i"
      fi
    done
  fi

fi
done

      for ac_func in nghttp2_session_get_stream_local_window_size
do :
  ac_fn_c_check_func "$LINENO" "nghttp2_session_get_stream_local_window_size" "ac_cv_func_nghttp2_session_get_stream_local_window_size"
if test "x$ac_cv_func_nghttp2_session_get_stream_local_window_size" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_NGHTTP2_SESSION_GET_STREAM_LOCAL_WINDOW_SIZE 1
_ACEOF

  if test "x$MOD_CPPFLAGS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_CPPFLAGS to \""-DH2_NG2_LOCAL_WIN_SIZE"\""
    MOD_CPPFLAGS=""-DH2_NG2_LOCAL_WIN_SIZE""
  else
    apr_addto_bugger=""-DH2_NG2_LOCAL_WIN_SIZE""
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_CPPFLAGS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_CPPFLAGS"
        MOD_CPPFLAGS="$MOD_CPPFLAGS $i"
      fi
    done
  fi

fi
done

    else
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: nghttp2 version is too old" >&5
$as_echo "$as_me: WARNING: nghttp2 version is too old" >&2;}
    fi

        CPPFLAGS="$saved_CPPFLAGS"
    LIBS="$saved_LIBS"
    LDFLAGS="$saved_LDFLAGS"

fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nghttp2" >&5
$as_echo "$ac_cv_nghttp2" >&6; }
  if test "x$ac_cv_nghttp2" = "xyes"; then

$as_echo "#define HAVE_NGHTTP2 1" >>confdefs.h

  fi

    if test "$ac_cv_nghttp2" = "yes" ; then
        if test "x$enable_http2" = "xshared"; then
           # The only symbol which needs to be exported is the module
           # structure, so ask libtool to hide everything else:

  if test "x$MOD_PROXY_HTTP2_LDADD" = "x"; then
    test "x$silent" != "xyes" && echo "  setting MOD_PROXY_HTTP2_LDADD to \"-export-symbols-regex proxy_http2_module\""
    MOD_PROXY_HTTP2_LDADD="-export-symbols-regex proxy_http2_module"
  else
    apr_addto_bugger="-export-symbols-regex proxy_http2_module"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $MOD_PROXY_HTTP2_LDADD; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to MOD_PROXY_HTTP2_LDADD"
        MOD_PROXY_HTTP2_LDADD="$MOD_PROXY_HTTP2_LDADD $i"
      fi
    done
  fi

        fi
    else
        enable_proxy_http2=no
    fi

            fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_proxy_http2" >&5
$as_echo_n "checking whether to enable mod_proxy_http2... " >&6; }
            if test "$enable_proxy_http2" = "no"; then
              if test "$_apmod_required" = "no"; then
                _apmod_extra_msg=" (disabled)"
              else
                as_fn_error $? "mod_proxy_http2 has been requested but can not be built due to prerequisite failures" "$LINENO" 5
              fi
            fi
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_proxy_http2$_apmod_extra_msg" >&5
$as_echo "$enable_proxy_http2$_apmod_extra_msg" >&6; }
  if test "$enable_proxy_http2" != "no"; then
    case "$enable_proxy_http2" in
    static*)
      MODLIST="$MODLIST proxy_http2"
      if test "proxy_http2" = "so"; then
          sharedobjs=yes
      fi
      shared="";;
    *)
      sharedobjs=yes
      shared=yes
      DSO_MODULES="$DSO_MODULES proxy_http2"
      if test "no" = "yes" ; then
        ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},proxy_http2"
      fi
      ;;
    esac


  if test -z "$proxy_http2_objs"; then
    objects="mod_proxy_http2.lo"
  else
    objects="$proxy_http2_objs"
  fi

  if test -z "$module_standalone"; then
    if test -z "$shared"; then
      # The filename of a convenience library must have a "lib" prefix:
      libname="libmod_proxy_http2.la"
      BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
      modpath_static="$modpath_static $libname"
      cat >>$modpath_current/modules.mk<<EOF
$libname: $objects
	\$(MOD_LINK) $objects \$(MOD_PROXY_HTTP2_LDADD)
EOF
      if test ! -z "\$(MOD_PROXY_HTTP2_LDADD)"; then

  if test "x$AP_LIBS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting AP_LIBS to \"\$(MOD_PROXY_HTTP2_LDADD)\""
    AP_LIBS="\$(MOD_PROXY_HTTP2_LDADD)"
  else
    apr_addto_bugger="\$(MOD_PROXY_HTTP2_LDADD)"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $AP_LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to AP_LIBS"
        AP_LIBS="$AP_LIBS $i"
      fi
    done
  fi

      fi
    else
      apache_need_shared=yes
      libname="mod_proxy_http2.la"
      shobjects=`echo $objects | sed 's/\.lo/.slo/g'`
      modpath_shared="$modpath_shared $libname"
      cat >>$modpath_current/modules.mk<<EOF
$libname: $shobjects
	\$(SH_LINK) -rpath \$(libexecdir) -module -avoid-version  $objects \$(MOD_PROXY_HTTP2_LDADD)
EOF
    fi
  fi


  APACHE_VAR_SUBST="$APACHE_VAR_SUBST MOD_PROXY_HTTP2_LDADD"



  fi




  echo "DISTCLEAN_TARGETS = modules.mk" >> $modpath_current/modules.mk
  echo "static = $modpath_static" >> $modpath_current/modules.mk
  echo "shared = $modpath_shared" >> $modpath_current/modules.mk
  for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS INCLUDES; do
    if eval val=\"\$MOD_$var\"; test -n "$val"; then
      echo "MOD_$var = $val" >> $modpath_current/modules.mk
    fi
  done
  if test ! -z "$modpath_static" -o ! -z "$modpath_shared"; then
    MODULE_DIRS="$MODULE_DIRS $current_dir"
  else
    MODULE_CLEANDIRS="$MODULE_CLEANDIRS $current_dir"
  fi

  APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $modpath_current/Makefile"





  current_dir=proxy/balancers
  modpath_current=modules/proxy/balancers
  modpath_static=
  modpath_shared=
  for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS INCLUDES; do
    eval MOD_$var=
  done
  test -d proxy/balancers || $srcdir/build/mkdir.sh $modpath_current
  > $modpath_current/modules.mk



  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_lbmethod_byrequests" >&5
$as_echo_n "checking whether to enable mod_lbmethod_byrequests... " >&6; }
    # Check whether --enable-lbmethod-byrequests was given.
if test "${enable_lbmethod_byrequests+set}" = set; then :
  enableval=$enable_lbmethod_byrequests; force_lbmethod_byrequests=$enableval
else
  enable_lbmethod_byrequests=$enable_proxy_balancer
fi

    _apmod_extra_msg=""
      case "$enable_lbmethod_byrequests" in
    yes|static|shared)
      _apmod_required="yes"
      ;;
    *)
      _apmod_required="no"
      ;;
  esac
  if test "$enable_lbmethod_byrequests" = "static" -o "$enable_lbmethod_byrequests" = "shared"; then
    :
  elif test "$enable_lbmethod_byrequests" = "yes"; then
    enable_lbmethod_byrequests=$module_default
  elif test "$enable_lbmethod_byrequests" = "few"; then
    if test "$module_selection" = "few" -o "$module_selection" = "most" -o \
            "$module_selection" = "all" -o "$module_selection" = "reallyall"
    then
      enable_lbmethod_byrequests=$module_default
    else
      enable_lbmethod_byrequests=no
    fi
    _apmod_extra_msg=" ($module_selection)"
  elif test "$enable_lbmethod_byrequests" = "most"; then
    if test "$module_selection" = "most" -o "$module_selection" = "all" -o \
            "$module_selection" = "reallyall"
    then
      enable_lbmethod_byrequests=$module_default
    else
      enable_lbmethod_byrequests=no
    fi
    _apmod_extra_msg=" ($module_selection)"
  elif test "$enable_lbmethod_byrequests" = "all" -o "$enable_lbmethod_byrequests" = "maybe-all"; then
    if test "$module_selection" = "all" -o "$module_selection" = "reallyall"
    then
      enable_lbmethod_byrequests=$module_default
      _apmod_extra_msg=" ($module_selection)"
    else
      enable_lbmethod_byrequests=no
    fi
  elif test "$enable_lbmethod_byrequests" = "reallyall" -o "$enable_lbmethod_byrequests" = "no" ; then
    if test "$module_selection" = "reallyall" -a "$force_lbmethod_byrequests" != "no" ; then
      enable_lbmethod_byrequests=$module_default
      _apmod_extra_msg=" ($module_selection)"
    else
      enable_lbmethod_byrequests=no
    fi
  else
    enable_lbmethod_byrequests=no
  fi
  if test "$enable_lbmethod_byrequests" != "no"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking dependencies" >&5
$as_echo "checking dependencies" >&6; }
            if test "$enable_proxy_balancer" = "no" ; then
                              enable_lbmethod_byrequests=no
                              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"mod_proxy_balancer is disabled but required for mod_lbmethod_byrequests\"" >&5
$as_echo "$as_me: WARNING: \"mod_proxy_balancer is disabled but required for mod_lbmethod_byrequests\"" >&2;}
                            elif test "$enable_lbmethod_byrequests" = "static" && test "$enable_proxy_balancer" != "static" ; then
                              enable_lbmethod_byrequests=$enable_proxy_balancer
                              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"building mod_lbmethod_byrequests shared because mod_proxy_balancer is built shared\"" >&5
$as_echo "$as_me: WARNING: \"building mod_lbmethod_byrequests shared because mod_proxy_balancer is built shared\"" >&2;}
                            else
            :
            fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_lbmethod_byrequests" >&5
$as_echo_n "checking whether to enable mod_lbmethod_byrequests... " >&6; }
            if test "$enable_lbmethod_byrequests" = "no"; then
              if test "$_apmod_required" = "no"; then
                _apmod_extra_msg=" (disabled)"
              else
                as_fn_error $? "mod_lbmethod_byrequests has been requested but can not be built due to prerequisite failures" "$LINENO" 5
              fi
            fi
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lbmethod_byrequests$_apmod_extra_msg" >&5
$as_echo "$enable_lbmethod_byrequests$_apmod_extra_msg" >&6; }
  if test "$enable_lbmethod_byrequests" != "no"; then
    case "$enable_lbmethod_byrequests" in
    static*)
      MODLIST="$MODLIST lbmethod_byrequests"
      if test "lbmethod_byrequests" = "so"; then
          sharedobjs=yes
      fi
      shared="";;
    *)
      sharedobjs=yes
      shared=yes
      DSO_MODULES="$DSO_MODULES lbmethod_byrequests"
      if test "$enable_proxy_balancer" = "yes" ; then
        ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},lbmethod_byrequests"
      fi
      ;;
    esac


  if test -z ""; then
    objects="mod_lbmethod_byrequests.lo"
  else
    objects=""
  fi

  if test -z "$module_standalone"; then
    if test -z "$shared"; then
      # The filename of a convenience library must have a "lib" prefix:
      libname="libmod_lbmethod_byrequests.la"
      BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
      modpath_static="$modpath_static $libname"
      cat >>$modpath_current/modules.mk<<EOF
$libname: $objects
	\$(MOD_LINK) $objects \$(MOD_LBMETHOD_BYREQUESTS_LDADD)
EOF
      if test ! -z "\$(MOD_LBMETHOD_BYREQUESTS_LDADD)"; then

  if test "x$AP_LIBS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting AP_LIBS to \"\$(MOD_LBMETHOD_BYREQUESTS_LDADD)\""
    AP_LIBS="\$(MOD_LBMETHOD_BYREQUESTS_LDADD)"
  else
    apr_addto_bugger="\$(MOD_LBMETHOD_BYREQUESTS_LDADD)"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $AP_LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break
        fi
      done
      if test $apr_addto_duplicate = "0"; then
        test "x$silent" != "xyes" && echo "  adding \"$i\" to AP_LIBS"
        AP_LIBS="$AP_LIBS $i"
      fi
    done
  fi

      fi
    else
      apache_need_shared=yes
      libname="mod_lbmethod_byrequests.la"
      shobjects=`echo $objects | sed 's/\.lo/.slo/g'`
      modpath_shared="$modpath_shared $libname"
      cat >>$modpath_current/modules.mk<<EOF
$libname: $shobjects
	\$(SH_LINK) -rpath \$(libexecdir) -module -avoid-version  $objects \$(MOD_LBMETHOD_BYREQUESTS_LDADD)
EOF
    fi
  fi


  APACHE_VAR_SUBST="$APACHE_VAR_SUBST MOD_LBMETHOD_BYREQUESTS_LDADD"



  fi


  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_lbmethod_bytraffic" >&5
$as_echo_n "checking whether to enable mod_lbmethod_bytraffic... " >&6; }
    # Check whether --enable-lbmethod-bytraffic was given.
if test "${enable_lbmethod_bytraffic+set}" = set; then :
  enableval=$enable_lbmethod_bytraffic; force_lbmethod_bytraffic=$enableval
else
  enable_lbmethod_bytraffic=$enable_proxy_balancer
fi

    _apmod_extra_msg=""
      case "$enable_lbmethod_bytraffic" in
    yes|static|shared)
      _apmod_required="yes"
      ;;
    *)
      _apmod_required="no"
      ;;
  esac
  if test "$enable_lbmethod_bytraffic" = "static" -o "$enable_lbmethod_bytraffic" = "shared"; then
    :
  elif test "$enable_lbmethod_bytraffic" = "yes"; then
    enable_lbmethod_bytraffic=$module_default
  elif test "$enable_lbmethod_bytraffic" = "few"; then
    if test "$module_selection" = "few" -o "$module_selection" = "most" -o \
            "$module_selection" = "all" -o "$module_selection" = "reallyall"
    then
      enable_lbmethod_bytraffic=$module_default
    else
      enable_lbmethod_bytraffic=no
    fi
    _apmod_extra_msg=" ($module_selection)"
  elif test "$enable_lbmethod_bytraffic" = "most"; then
    if test "$module_selection" = "most" -o "$module_selection" = "all" -o \
            "$module_selection" = "reallyall"
    then
      enable_lbmethod_bytraffic=$module_default
    else
      enable_lbmethod_bytraffic=no
    fi
    _apmod_extra_msg=" ($module_selection)"
  elif test "$enable_lbmethod_bytraffic" = "all" -o "$enable_lbmethod_bytraffic" = "maybe-all"; then
    if test "$module_selection" = "all" -o "$module_selection" = "reallyall"
    then
      enable_lbmethod_bytraffic=$module_default
      _apmod_extra_msg=" ($module_selection)"
    else
      enable_lbmethod_bytraffic=no
    fi
  elif test "$enable_lbmethod_bytraffic" = "reallyall" -o "$enable_lbmethod_bytraffic" = "no" ; then
    if test "$module_selection" = "reallyall" -a "$force_lbmethod_bytraffic" != "no" ; then
      enable_lbmethod_bytraffic=$module_default
      _apmod_extra_msg=" ($module_selection)"
    else
      enable_lbmethod_bytraffic=no
    fi
  else
    enable_lbmethod_bytraffic=no
  fi
  if test "$enable_lbmethod_bytraffic" != "no"; then
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking dependencies" >&5
$as_echo "checking dependencies" >&6; }
            if test "$enable_proxy_balancer" = "no" ; then
                              enable_lbmethod_bytraffic=no
                              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"mod_proxy_balancer is disabled but required for mod_lbmethod_bytraffic\"" >&5
$as_echo "$as_me: WARNING: \"mod_proxy_balancer is disabled but required for mod_lbmethod_bytraffic\"" >&2;}
                            elif test "$enable_lbmethod_bytraffic" = "static" && test "$enable_proxy_balancer" != "static" ; then
                              enable_lbmethod_bytraffic=$enable_proxy_balancer
                              { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"building mod_lbmethod_bytraffic shared because mod_proxy_balancer is built shared\"" >&5
$as_echo "$as_me: WARNING: \"building mod_lbmethod_bytraffic shared because mod_proxy_balancer is built shared\"" >&2;}
                            else
            :
            fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_lbmethod_bytraffic" >&5
$as_echo_n "checking whether to enable mod_lbmethod_bytraffic... " >&6; }
            if test "$enable_lbmethod_bytraffic" = "no"; then
              if test "$_apmod_required" = "no"; then
                _apmod_extra_msg=" (disabled)"
              else
                as_fn_error $? "mod_lbmethod_bytraffic has been requested but can not be built due to prerequisite failures" "$LINENO" 5
              fi
            fi
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lbmethod_bytraffic$_apmod_extra_msg" >&5
$as_echo "$enable_lbmethod_bytraffic$_apmod_extra_msg" >&6; }
  if test "$enable_lbmethod_bytraffic" != "no"; then
    case "$enable_lbmethod_bytraffic" in
    static*)
      MODLIST="$MODLIST lbmethod_bytraffic"
      if test "lbmethod_bytraffic" = "so"; then
          sharedobjs=yes
      fi
      shared="";;
    *)
      sharedobjs=yes
      shared=yes
      DSO_MODULES="$DSO_MODULES lbmethod_bytraffic"
      if test "$enable_proxy_balancer" = "yes" ; then
        ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},lbmethod_bytraffic"
      fi
      ;;
    esac


  if test -z ""; then
    objects="mod_lbmethod_bytraffic.lo"
  else
    objects=""
  fi

  if test -z "$module_standalone"; then
    if test -z "$shared"; then
      # The filename of a convenience library must have a "lib" prefix:
      libname="libmod_lbmethod_bytraffic.la"
      BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
      modpath_static="$modpath_static $libname"
      cat >>$modpath_current/modules.mk<<EOF
$libname: $objects
	\$(MOD_LINK) $objects \$(MOD_LBMETHOD_BYTRAFFIC_LDADD)
EOF
      if test ! -z "\$(MOD_LBMETHOD_BYTRAFFIC_LDADD)"; then

  if test "x$AP_LIBS" = "x"; then
    test "x$silent" != "xyes" && echo "  setting AP_LIBS to \"\$(MOD_LBMETHOD_BYTRAFFIC_LDADD)\""
    AP_LIBS="\$(MOD_LBMETHOD_BYTRAFFIC_LDADD)"
  else
    apr_addto_bugger="\$(MOD_LBMETHOD_BYTRAFFIC_LDADD)"
    for i in $apr_addto_bugger; do
      apr_addto_duplicate="0"
      for j in $AP_LIBS; do
        if test "x$i" = "x$j"; then
          apr_addto_duplicate="1"
          break