[vorbis-dev] [PATCH] libcurl detection (and a Mac OS X build problem)

Evan Jones ejones at uwaterloo.ca
Thu Jan 16 12:36:11 PST 2003


vorbis-tools does not seem to perform curl detection properly. The test 
program it provides will build and link and run even without linking it 
against libcurl, (at least on my platform: Mac OS X 10.2) which I 
believe is an error. The following test program would be a better 
choice: It will fail to build and link on Mac OS X 10.2 unless the 
correct flags are provided.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>

int main ()
{
   system("touch conf.curltest");
   return 0;
}

void func ()
{
   curl_easy_perform( (void*) 0 );
}

Attached is a patch which updates the acinclude.m4 in vorbis-tools to 
test for curl using this program, as well as using "curl-config" to 
find curl and the library flags. There is a problem with Mac OS X's 
curl-config: it includes "-arch i386 -arch ppc" which screws up 
compilation, so I've added a bit of "sed" to remove any "arch" stuff 
that curl-config emits. Likely this is unnecessary for other platforms, 
and I have filed a bug with Apple's developer site, however it should 
be harmless (configure already uses sed extensively). This patch is 
being used by my fink package for vorbis-tools.

It would be nice if others could test this with their curl 
configuration (particularly to make sure that it fails correctly), and 
maybe get it integrated into vorbis tools? This is a "better" way to 
test for libcurl, and it gets the configuration (sort of) right.

Thanks,

Evan Jones

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vorbis-tools-libcurl.patch
Type: application/octet-stream
Size: 4927 bytes
Desc: vorbis-tools-libcurl.patch
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20030116/10f7398b/vorbis-tools-libcurl.obj


More information about the Vorbis-dev mailing list