freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] Re: [Freetype] Compiling 2.1.7 on Mac OS X


From: Garrick Meeker
Subject: [Devel] Re: [Freetype] Compiling 2.1.7 on Mac OS X
Date: Tue, 30 Mar 2004 14:24:18 -0800
User-agent: KMail/1.6.1

This seems to work.  I'm not sure how this is supposed to be quoted.  
CFLAGS="$CFLAGS -DOS_INLINE='static __inline'" produces "-DOS_INLINE=static 
__inline" on the command line so I guess it's okay.

The system headers say:
#ifndef OS_INLINE
#define OS_INLINE static inline
#endif

so this seems to be valid.

This probably isn't necessary when using g++ but it still works.  The stuff in 
configure that sets $GXX is further down so I wasn't sure how to check for 
g++ correctly.

I'm checking for gcc because I'm not sure how other compilers will behave (if 
-ansi is supported).  I couldn't even build using codewarrior (mwcc) and 
configure (I had to pass in a bunch of extra flags to get -I to work and then 
it still couldn't find the standard headers) so this might not be necessary.

On Saturday 27 March 2004 21:19, Werner LEMBERG wrote:
> See below for the various suggestions made to the list(s) how to
> improve support for the Mac.  Can someone please try the proposed
> solutions (preferably the changes to ftmac.c first) and report the
> results?
>
>
>     Werner
>
>
> ======================================================================
>
> > It looks like configure is setting XX_ANSICFLAGS instead of
> > XX_ANSIFLAGS to remove -ansi when this flag is given.  If the inline
> > thing isn't fixed, this is an alternative solution.
> >
> > > > The error is in the source file ftmac.c, which includes a
> > > > Mac-specific header using 'inline' keywords by default.  The
> > > > problem comes from the -ansi switch to gcc, as Garrick Meeker
> > > > has recently reported, which causes gcc not to recognize
> > > > 'inline'.
> > > >
> > > > The simple solution is to change builds/unix/configure to not
> > > > use -ansi if $host matches *-apple*.  However it would be a
> > > > shame to disable -ansi for the whole build; do you know how to
> > > > tweak the builds/unix makefile so that only ftmac.c is built
> > > > without -ansi?  I guess it would have to be separated out from
> > > > ftbase.c in that case...
> > >
> > > Various possibilities come to my mind, to be applied to ftmac.c
> > > rather than the makefile:
> > >
> > >   . Redefine `OS_INLINE' to be `__inline__'.  This survives even
> > >     gcc's -ansi switch.
> > >
> > >   . Redefine `OS_INLINE' to be a no-op.
> > >
> > >   . Compile FreeType with g++.  `inline' is a normal keyword
> > >     then.  [I regularly test whether FreeType really builds with
> > >     g++.]
>
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/freetype

Attachment: configure_mac.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]