There are some issues with this.

- We don't use the X11 GL at all.  It should be the OpenGL and AGL frameworks
- FTGL should not use the X11 GL either
- freetype and FTGL are linked statically


On 8/10/06, IOhannes m zmoelnig <zmoelnig@iem.at> wrote:
hi.

i recently played a bit with a G5 and tried to compile Gem on OS-X
(10.4.7) via the autoconf system.

good news:

basically changing the line dealing with "-bundle" in configure(.ac) did
the trick; it is already in the CVS (plus some minor changes, which
should the use of configure a bit simpler; like "--with-pd" not pointing
to the pd-executable anymore, but to the base path where both the
pd-executable/library (./bin) and the headers (./src) can be found)


i only forgot about ftgl-support, which i did today, trying to make
everything from the command-line (which might - or not - be important
for the hans's autobuild system; basically i believe that freetype2 and
ftgl should not be included in the nightly builds, as they are virtually
never-changing; so they could be built via some IDE like xcode once and
then the building of Gem would run without gui)

all in all, it was not hard to do, and here is how i did it:

### START

## i have ${GEMROOT}/Gem/src/ and ${GEMROOT}/GemLibs/
$> export GEMROOT=/Users/zmoelnig/src/pd-gem
## ${PDPATH}/src/m_pd.h
$> export PDPATH=/Users/zmoelnig/src/pure-data/pd
## openGL-headers are in ${X11OPENGL}/GL/gl.h
$> export X11OPENGL=/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/

$> cd ${GEMROOT}/GemLibs

## freetype2

$> wget
http://download.savannah.gnu.org/releases/freetype/freetype-2.2.1.tar.bz2
$> tar xvzf freetype-2.2.1.tar.bz2
$> cd ${GEMROOT}/freetype-2.2.1/
$> ./configure
$> make
## this installs freetype2 into /usr/local/:
$> sudo make install

## since FTGL's build system needs to run freetype-config, we
## need /usr/local/bin in our path
$> export PATH=$PATH:/usr/local/bin

## FTGL

$> wget http://opengl.geek.nz/ftgl/ftgl-2.1.2.tar.gz
$> tar xvzf ftgl-2.1.2.tar.gz
$> cd ${GEMROOT}/FTGL/unix
$> ./configure --with-ft-prefix=/usr/local/
--with-gl-inc=${X11OPENGL}/include/ --with-gl-lib=${X11OPENGL}/lib/
$> make

## allright, that's it; we don't have to do the above for months,
## probably years!

## here's how i compiled Gem with the above settings

$> export PKG_FTGL_CFLAGS="-I${GEMROOT}/GemLibs/FTGL/include/
$(freetype-config --cflags)"
$> export PKG_FTGL_LIBS="$(freetype-config --libs)
${GEMLIBS}/GemLibs/FTGL/unix/src/.libs/libftgl.a"
$> ./configure --with-pd=${PDPATH}
$> make


### END


(actually i didn't use "export" for the PKG_FTGL_... vars, but set them
in the same line as calling configure:

$> PKG_FTGL_CFLAGS="-I${GEMROOT}/GemLibs/FTGL/include/ $(freetype-config
--cflags)" PKG_FTGL_LIBS="$(freetype-config --libs)
${GEMLIBS}/GemLibs/FTGL/unix/src/.libs/libftgl.a" ./configure
--with-pd=${PDPATH}

i haven't yet spotted any problems with my built (but probably i have
linked the freetype2-lib dynamically, which i guess i should NOT do.
what is the standard tool on os-x to find out the dll-dependencies of a
binary? something like "ldd" on linux.


mf.asdr.
IOhannes

_______________________________________________
GEM-dev mailing list
GEM-dev@iem.at
http://lists.puredata.info/listinfo/gem-dev