Curl and http2 on raspberry pi running ubuntu

I am trying to install nghttp2 on pi3 running ubuntu.
when i typed curl --version. the version showed that doesn’t support http2.
I need to type this:
LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/curl --version
this curl supports http2. I know I can install many curl versions in the same system. My question is, how can I make the curl officially in the system supports http2?
as I am using swift language that will link to “include/curl.h” header file.
on x86 ubuntu this problem won’t happen.