httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1692108 - /httpd/test/mod_h2/trunk/configure.ac
Date Tue, 21 Jul 2015 13:21:22 GMT
Author: icing
Date: Tue Jul 21 13:21:21 2015
New Revision: 1692108

URL: http://svn.apache.org/r1692108
Log:
required nghttp2 version can now be configured via --with-nghttp2-version=x.y.z

Modified:
    httpd/test/mod_h2/trunk/configure.ac

Modified: httpd/test/mod_h2/trunk/configure.ac
URL: http://svn.apache.org/viewvc/httpd/test/mod_h2/trunk/configure.ac?rev=1692108&r1=1692107&r2=1692108&view=diff
==============================================================================
--- httpd/test/mod_h2/trunk/configure.ac (original)
+++ httpd/test/mod_h2/trunk/configure.ac Tue Jul 21 13:21:21 2015
@@ -52,6 +52,12 @@ AC_ARG_WITH([serverdir], [AS_HELP_STRING
     [Use serverdir directory for setup [default=gen/apache]])],
     [request_serverdir=$withval], [request_serverdir=$PWD/gen/apache])
 
+NGHTTP2_VERSION=1.1.2
+
+AC_ARG_WITH([nghttp2-version], [AS_HELP_STRING([--with-nghttp2-version],
+    [Use nghttp2 of specified version [default=<ignore>]])],
+    [NGHTTP2_VERSION_EXACT=$withval], [NGHTTP2_VERSION_EXACT=])
+
 
 export BUILD_SUBDIRS="clients"
 
@@ -145,13 +151,17 @@ if test "x${CURL}" = "x"; then
     CURL="${prefix}/bin/curl"
     INSTALL_DEP="install-client"
     INSTALL_ADDITIONAL="curl($CURL_VERSION)"
+else
+    CURL_VERSION="$( $CURL --version )"
+    CURL_VERSION="${CURL_VERSION#*curl }"
+    CURL_VERSION="${CURL_VERSION%% *}"
+    CURL_INSTALLED="$CURL ($CURL_VERSION)"
 fi
 
 ################################################################################
 # nghttp2 
 ################################################################################
 
-NGHTTP2_VERSION=1.1.1
 NGHTTP2_DEPS=""
 
 
@@ -204,6 +214,9 @@ if test "x$ac_cv_nghttp2" = "xyes"; then
             AC_MSG_WARN([no nghttp executable found])
             ac_cv_nghttp2=no
         fi
+        NGHTTP2_VERSION=$( $NGHTTP --version )
+        NGHTTP2_VERSION=${NGHTTP2_VERSION##*/}
+        NGHTTP_INSTALLED="$NGHTTP ($NGHTTP2_VERSION)"
     fi
 fi
 if test "x$ac_cv_nghttp2" = "xyes"; then
@@ -217,8 +230,19 @@ if test "x$ac_cv_nghttp2" = "xyes"; then
     fi
 fi
 
+if test "x$ac_cv_nghttp2" = "xyes" -a "x$NGHTTP2_VERSION_EXACT" != "x"; then
+    AC_MSG_CHECKING([if nghttp2 has version == $NGHTTP2_VERSION_EXACT])
+    if test $NGHTTP2_VERSION = $NGHTTP2_VERSION_EXACT; then
+        AC_MSG_RESULT(OK)
+    else
+        AC_MSG_RESULT([no, installed is $NGHTTP2_VERSION])
+        NGHTTP2_VERSION=$NGHTTP2_VERSION_EXACT
+        ac_cv_nghttp2=no
+    fi
+fi
+
 if test "x$ac_cv_nghttp2" = "xyes"; then
-    ap_nghttp2_libs="${ap_nghttp2_libs:--lnghttp2} `$apr_config --libs`"    
+    ap_nghttp2_libs="${ap_nghttp2_libs:--lnghttp2}"    
     LIBS="$LIBS $ap_nghttp2_libs"
 
     # Run library and function checks
@@ -233,6 +257,8 @@ else
     AC_MSG_NOTICE([no suitable nghttp2 found])
     INSTALL_DEP="install-nghttp2 ${INSTALL_DEP}"
     INSTALL_ADDITIONAL="nghttp2($NGHTTP2_VERSION)"
+    NGHTTP="${prefix}/bin/nghttp"
+    H2LOAD="${prefix}/bin/h2load"
 fi
 
 ################################################################################
@@ -342,7 +368,7 @@ AC_MSG_NOTICE([summary of build options:
     Host type:        ${host}
     prefix:           ${prefix}
     APXS:             ${APXS}
-    NGHTTP:           ${NGHTTP}
-    CURL:             ${CURL}
+    NGHTTP:           ${NGHTTP_INSTALLED}
+    CURL:             ${CURL_INSTALLED}
     download+install: ${INSTALL_ADDITIONAL:-n.a.}
 ])



Mime
View raw message