Skip to content
  • Dave Borowitz's avatar
    Makefile: use curl-config to determine curl flags · 61a64fff
    Dave Borowitz authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    curl-config should always be installed alongside a curl distribution,
    and its purpose is to provide flags for building against libcurl, so
    use it instead of guessing flags and dependent libraries.
    
    Allow overriding CURL_CONFIG to a custom path to curl-config, to
    compile against a curl installation other than the first in PATH.
    
    Depending on the set of features curl is compiled with, there may be
    more libraries required than the previous two options of -lssl and
    -lidn. For example, with a vanilla build of libcurl-7.36.0 on Mac OS X
    10.9:
    
    $ ~/d/curl-out-7.36.0/lib/curl-config --libs
    -L/Users/dborowitz/d/curl-out-7.36.0/lib -lcurl -lgssapi_krb5 -lresolv -lldap -lz
    
    Use this only when CURLDIR is not explicitly specified, to continue
    supporting older builds.
    
    Signed-off-by: default avatarDave Borowitz <dborowitz@google.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    61a64fff