cURL / Mailing Lists / curl-library / Single Mail


Re: gethostbyname & MinGW build problem

From: Daniel Stenberg <>
Date: Fri, 19 Dec 2003 13:02:18 +0100 (CET)

On Fri, 19 Dec 2003, Gour wrote:

> > So then the configure (shell) support with MSYS seems pretty broken, or
> > the configure script itself is. How does it attempt to detect libcurl?
> I'd say that there are differences between sockets on Linux & winsock.

There are, but why is that an issue here?

> ac_check_lib_save_LIBS=$LIBS
> LIBS="-lcurl $LIBS"


> char curl_global_init ();
> int
> main ()
> {
> curl_global_init ();
> ;
> return 0;
> }

This is indeed a good test to detect libcurl. This probably fails because the
compiler (or rather the linker) doesn't know in what directory to find
libcurl. This might be able to cure by setting LDFLAGS=-L/path/to/dir before
you run configure.

> > Huh? The script can't detect libcurl, so you must use wget? Why not
> > override configure?
> As I wrote in previous post (or was it in darcs' list), I have tried to
> 'cheat' with setting ac_cv_lib_curl_curl_global_init=yes, but got just a
> bunch of unresolved references.

If I were to make that program to link with libcurl, I'd:

1. try setting LDFLAGS etc when I invoke configure to be sure it can link with
   libcurl for tests. Also, I'd check if the configure script takes some nice
   options that would help.

and it that fails:

2. I'd run configure without libcurl support, and then modify the config.h and
   Makefiles afterwards accordingly to use libcurl.

> I have lot of success in compiling different Linux tools with MinGW/MSYS and
> is much simpler/better than fiddling with makefiles.

I would love to have this work for curl too.

> If it's possible to compile whole wxWindows library in MinGW/MSYS
> environment, it should be possible to for curl too.

I agree. But since I don't have that environment setup myself, I have limited
ability to make it work myself.

    Daniel Stenberg -- --
   [[ Do not send mails to this email address. They won't reach me. ]]
This email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now!
Received on 2003-12-19