http2 対応の curl をビルドする

curl の http2 は nghttp2 を利用しているので、あらかじめインストールしておく。

$ curl -O http://curl.haxx.se/download/curl-7.45.0.tar.gz
$ tar zxf curl-7.45.0.tar.gz
$ cd curl-7.45.0
$ ./configure --prefix=/usr/local/curl-http2 --with-nghttp2
(途中省略)
configure: Configured to build curl/libcurl:

  curl version:     7.45.0
  Host setup:       x86_64-pc-linux-gnu
  Install prefix:   /home/vagrant/opt/curl-7.45.0
  Compiler:         gcc
  SSL support:      enabled (OpenSSL)
  SSH support:      no      (--with-libssh2)
  zlib support:     enabled
  GSS-API support:  no      (--with-gssapi)
  TLS-SRP support:  enabled
  resolver:         default (--enable-ares / --enable-threaded-resolver)
  IPv6 support:     enabled
  Unix sockets support: enabled
  IDN support:      enabled
  Build libcurl:    Shared=yes, Static=yes
  Built-in manual:  enabled
  --libcurl option: enabled (--disable-libcurl-option)
  Verbose errors:   enabled (--disable-verbose)
  SSPI support:     no      (--enable-sspi)
  ca cert bundle:   /etc/ssl/certs/ca-certificates.crt
  ca cert path:     no
  LDAP support:     enabled (OpenLDAP)
  LDAPS support:    enabled
  RTSP support:     enabled
  RTMP support:     enabled (librtmp)
  metalink support: no      (--with-libmetalink)
  HTTP2 support:    enabled (nghttp2)
  Protocols:        DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTMP RTSP SMB SMBS SMTP SMTPS TELNET TFTP

$ make
$ sudo make install