tool: generate easysrc only on --libcurl

Code should only be generated when --libcurl is used.

Bug: https://github.com/bagder/curl/issues/429
Reported-by: @greafhe, Jay Satiro

Closes #429
Closes #442
This commit is contained in:
Daniel Lee Hwang 2015-09-19 23:16:23 -07:00 committed by Daniel Stenberg
parent 47b7d658b4
commit 4d95491636
1 changed files with 6 additions and 4 deletions

View File

@ -1369,9 +1369,10 @@ static CURLcode operate_do(struct GlobalConfig *global,
retrystart = tvnow();
#ifndef CURL_DISABLE_LIBCURL_OPTION
result = easysrc_perform();
if(result) {
goto show_error;
if(global->libcurl) {
result = easysrc_perform();
if(result)
goto show_error;
}
#endif
@ -1863,7 +1864,8 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
else {
#ifndef CURL_DISABLE_LIBCURL_OPTION
/* Initialise the libcurl source output */
result = easysrc_init();
if(config->libcurl)
result = easysrc_init();
#endif
/* Perform the main operations */