diff options
author | Volker Grabsch <vog@notjusthosting.com> | 2010-11-29 00:16:25 (GMT) |
---|---|---|
committer | Volker Grabsch <vog@notjusthosting.com> | 2010-11-29 00:16:25 (GMT) |
commit | 25b068145eb42dda62167192b1c75b555c872b2d (patch) | |
tree | a2ac68deb66dfb9b3c7743442d4274a81f27a497 /src | |
parent | 6414eebdaa8668a23628d2b5431b862d55e74da2 (diff) | |
download | mxe-25b068145eb42dda62167192b1c75b555c872b2d.zip mxe-25b068145eb42dda62167192b1c75b555c872b2d.tar.gz mxe-25b068145eb42dda62167192b1c75b555c872b2d.tar.bz2 |
test program for package curl
Diffstat (limited to 'src')
-rw-r--r-- | src/curl-test.c | 23 | ||||
-rw-r--r-- | src/curl.mk | 5 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/curl-test.c b/src/curl-test.c new file mode 100644 index 0000000..991a364 --- /dev/null +++ b/src/curl-test.c @@ -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; +} diff --git a/src/curl.mk b/src/curl.mk index a0285ec..a50886b 100644 --- a/src/curl.mk +++ b/src/curl.mk @@ -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 |