Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with autoconf and frameworks



Hi Brandon,

libogg and libvorbis are installed as /Library/Frameworks/ Ogg.framework
and Vorbis.framework. I have tried setting LDFLAGS and CFLAGS to
"-framework Ogg -framework Vorbis", but configure complains that it
can't find the libraries.


  % ./configure LDFLAGS="-framework Ogg -framework Vorbis"
  [...]
  checking for libogg... not found
  checking for libvorbis... not found
  configure: error: must have Ogg Vorbis v1.0 or above installed

What is the correct, OS X like thing to do to teach autoconf and
automake how to find these libraries via their Frameworks? I'd like to
fix this, and pass it back to Xiph so that icecast will do the right
thing on OS X when these Frameworks are installed.

Well, after I saw your follow-up postings, I'm sorry not to have answered earlier. There are two approaches to your problem:


a) Rewrite autoconf/automake files of the original package to know how to compile and link against Darwin frameworks. This is the path that you have chosen and which will result in most Mac OS X like behaviour (i.e. leveraging the power of versioned frameworks). Unfortunately, this means fiddling with the bowels of your package and adding code that is only useable on NeXT / Darwin platforms.

b) Instructing ./configure to tell compiler and linker how to find include files and libraries inside the framework packages. This way will save you lots of time and doesn't even require modifications to your project files. A framework is just a hierarchy of directories that contain include files and dynamic library (or: multiple versions of the same library for a versioned framework):

./configure CPPFLAGS="-I/Library/Frameworks/Ogg.framework/Versions/ Current/Headers -I/Library/Frameworks/Vorbis.framework/Versions/ Current/Headers" LDFLAGS="-L/Library/Frameworks/Ogg.frameworks/ Versions/Current -L/Library/Frameworks/Vorbis.framework/Versions/ Current"

This is the traditional way to add include paths and library search paths via ./configure invocation. If the Mac OS X framework versions of Ogg and Vorbis were created carefully, there will be libogg.dylib and libvorbis.dylib inside the respective Versions/Current directory (I don't know for sure because I don't have them installed).

Your configure script will find headers and libraries and know how to link them if it was built from recent versions of libtoolize. If not, on a Mac OS X machine go to the main directory of your project and invoke

glibtoolize --force --copy
autoreconf --force

and then do the ./configure step again. This will update your autotools project (if it was crafted correctly).

Yours, Mark
--
  Dipl.-Ing. Mark Asbach                      Tel +49 (0)241 80-27677
  Institute of Communications Engineering     Fax +49 (0)241 80-22196
  RWTH Aachen University, Germany      http://www.ient.rwth-aachen.de



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden
References: 
 >help with autoconf and frameworks (From: "Brandon D. Valentine" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.