If you want to install the .deb package instead of putting everything in /usr/local , do the following:
sudo apt-get build-dep curl sudo apt-get install libc-ares-dev build-essential apt-get source curl cd curl-*
This will load curl sources with build files and Debian / Ubuntu patches.
Edit debian/control file: add libc-ares-dev to Build-Depends
Edit debian/rules file: remove --enable-threaded-resolver and add --enable-ares to CONFIGURE_ARGS
Optional: increase the version number in the first line of debian/changelog , for example 7.38.0-4+deb8u5 to 7.38.0-4+deb8u6 , so your package will not be overwritten when installing updates on your system.
Now run the command
dpkg-buildpackage -us -uc -b -j4
It will generate several .deb files after an unreasonably long compilation time, go for a coffee or something during compilation.
You can install the new curl using c-ares with this command:
cd .. sudo dpkg -i curl_*.deb libcurl3_*.deb libcurl4-openssl-dev*.deb
pelya source share