On 04/11/2011 09:25, Dominic Fandrey wrote:
> On 04/11/2011 01:29, Simon McVittie wrote:
>> If you set USE_CURL_DLOPEN=0 the compiler will automatically pick up the
>> SONAME you compiled against, write it into the binary, and it'll work like
>> every other library (e.g. libjpeg, commonly seen with SONAME libjpeg.so.6
>> or libjpeg.so.8). I'd recommend that for distribution packages - it's almost
>> certainly how every other executable in your distribution works.
> 
> Surprisingly it doesn't link. I set USE_LOCAL_HEADERS=0 in order to unveil
> incompatibilities. Apparently the freebsd/libcurl.so.6 is in deed something
> other than debian/libcurl.so.4.
> 
> That's a grep over the error messages:
> : undefined reference to `curl_easy_cleanup'
> : undefined reference to `curl_easy_getinfo'
> ...

It turned out to be a Makefile problem. I propose the following
patch, apart from introducing VORBIS_CFLAGS and VORBIS_LIBS it only
affects the FreeBSD section of the Makefile.

Thanks for all the support in this thread!

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 
--- Makefile.orig       2011-11-04 19:06:29.000000000 +0100
+++ Makefile    2011-11-04 19:11:54.000000000 +0100
@@ -248,6 +248,8 @@
     OPENAL_LIBS=$(shell pkg-config --silence-errors --libs openal)
     SDL_CFLAGS=$(shell pkg-config --silence-errors --cflags sdl|sed 
's/-Dmain=SDL_main//')
     SDL_LIBS=$(shell pkg-config --silence-errors --libs sdl)
+    VORBIS_CFLAGS=$(shell pkg-config --silence-errors --cflags vorbis 
vorbisfile)
+    VORBIS_LIBS=$(shell pkg-config --silence-errors --libs vorbis vorbisfile)
   endif
   # Use sdl-config if all else fails
   ifeq ($(SDL_CFLAGS),)
@@ -608,19 +610,24 @@
 
   # optional features/libraries
   ifeq ($(USE_OPENAL),1)
-    ifeq ($(USE_OPENAL_DLOPEN),1)
-      CLIENT_LIBS += $(THREAD_LIBS) -lopenal
+    CLIENT_LIBS += $(THREAD_LIBS) $(OPENAL_LIBS)
+    ifneq ($(USE_LOCAL_HEADERS),1)
+      CLIENT_CFLAGS += $(OPENAL_CFLAGS)
     endif
   endif
 
   ifeq ($(USE_CURL),1)
-    ifeq ($(USE_CURL_DLOPEN),1)
-      CLIENT_LIBS += -lcurl
+    CLIENT_LIBS += $(CURL_LIBS)
+    ifneq ($(USE_LOCAL_HEADERS),1)
+      CLIENT_CFLAGS += $(CURL_CFLAGS)
     endif
   endif
 
   ifeq ($(USE_CODEC_VORBIS),1)
-    CLIENT_LIBS += -lvorbisfile -lvorbis -logg
+    CLIENT_LIBS += $(VORBIS_LIBS)
+    ifneq ($(USE_LOCAL_HEADERS),1)
+      CLIENT_CFLAGS += $(VORBIS_CFLAGS)
+    endif
   endif
 
   # cross-compiling tweaks
_______________________________________________
ioquake3 mailing list
[email protected]
http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
By sending this message I agree to love ioquake3 and libsdl.

Reply via email to