test program for package curl

This commit is contained in:
Volker Grabsch 2010-11-29 01:16:25 +01:00
parent 6414eebdaa
commit 25b068145e
2 changed files with 28 additions and 0 deletions

23
src/curl-test.c Normal file
View File

@ -0,0 +1,23 @@
/* This file is part of mingw-cross-env. */
/* See doc/index.html for further information. */
#include <curl/curl.h>
int main(int argc, char *argv[])
{
CURL *curl;
(void)argc;
(void)argv;
curl = curl_easy_init();
if (!curl) {
return 1;
}
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/");
curl_easy_perform(curl);
curl_easy_cleanup(curl);
return 0;
}

View File

@ -29,4 +29,9 @@ define $(PKG)_BUILD
--with-libidn \
LIBS="-lgcrypt -liconv `$(PREFIX)/$(TARGET)/bin/gpg-error-config --libs`"
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-curl.exe' \
`'$(TARGET)-pkg-config' libcurl --cflags --libs`
endef