cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: gethostbyname & MinGW build problem

From: Gour <gour_at_mail.inet.hr>
Date: Fri, 19 Dec 2003 11:27:30 +0100

Daniel Stenberg (daniel-curl_at_haxx.se) 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.

Here is the 1st snippet - checking for curl_global_init in -lcurl:

 echo "$as_me:$LINENO: checking for curl_global_init in -lcurl" >&5
 echo $ECHO_N "checking for curl_global_init in -lcurl... $ECHO_C" >&6
 if test "${ac_cv_lib_curl_curl_global_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
   else
     ac_check_lib_save_LIBS=$LIBS
     LIBS="-lcurl $LIBS"
     cat >conftest.$ac_ext <<_ACEOF
     /* confdefs.h. */
     _ACEOF
     cat confdefs.h >>conftest.$ac_ext
     cat >>conftest.$ac_ext <<_ACEOF
     /* end confdefs.h. */

     /* Override any gcc2 internal prototype to avoid an error. */
     #ifdef __cplusplus
     extern "C"
     #endif
     /* We use char because int might match the return type of a gcc2
        builtin and then its argument prototype would still apply. */
char curl_global_init ();
int
main ()
{
curl_global_init ();
  ;
return 0;
}
_ACEOF

...

> > Now I have to use wget instead of curl.
>
> 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.

>Also, why do you "have to" use wget intead of curl? Wget is an executable as
>well as curl is, why is using wget simpler?

I'm not the author of darcs, but it seems that if the configure can find
libcurl then the library is linked against the program; if not than external
tools - like wget are used (since libcurl is not found - probably there is no
curl either.)

The best would be to adjust curl's configure script for MinGW/MSYS.

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

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

Sincerely,
Gour

>
> --
> Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
> [[ Do not send mails to this email address. They won't reach me. ]]
>
>
> -------------------------------------------------------
> This SF.net 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! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>
>

-- 
Gour
gour_at_mail.inet.hr
Registered Linux User #278493
-------------------------------------------------------
This SF.net 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! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-19