ext/patron/extconf.rb in patron-0.6.3 vs ext/patron/extconf.rb in patron-0.6.4

- old
+ new

@@ -25,18 +25,18 @@ require 'mkmf' require 'rbconfig' dir_config('curl') - -if find_executable('curl-config') - $CFLAGS << " #{`curl-config --cflags`.strip}" - $LIBS << " #{`curl-config --libs`.strip}" +curl_config_path = with_config('curl-config') || find_executable('curl-config') +if curl_config_path + $CFLAGS << " " << `#{curl_config_path} --cflags`.strip + $LIBS << " " << `#{curl_config_path} --libs`.strip elsif !have_library('curl') or !have_header('curl/curl.h') fail <<-EOM Can't find libcurl or curl/curl.h - Try passing --with-curl-dir or --with-curl-lib and --with-curl-include + Try passing --with-curl-config, --with-curl-dir, or --with-curl-lib and --with-curl-include options to extconf. EOM end if CONFIG['CC'] =~ /gcc/