[redland-dev] Installation problems on Mac OS X
Dave Beckett
dave at dajobe.org
Tue Aug 15 16:32:07 UTC 2006
Ingo Paulsen wrote:
> I get
>
> -I/usr/local/mysql-standard-4.1.15-apple-darwin8.2.0-powerpc/include -Os
> -arch ppc -fno-common
>
> for invoking mysql_config --cflags on Mac OS X
OK, I see the problem now. Some programs insist on demanding the
optimizing options you use, which is crazy, so I always strip them out:
# Stop the MySQL config program adding -O<n> options to CFLAGS
mysql_cflags=`$MYSQL_CONFIG --cflags | sed -e "s/'//g" -e "s/-O[1-9]*//" `
I also do this later on, but *ONLY when redland is built in maintainer mode*:
CFLAGS=`echo $CFLAGS | sed s/-O[1-9]*//`
So I need to make the regexes more powerful. In this case, using
-e "s/-O[A-Za-z0-9]*//"
in the sed lines.
If somebody wants to add optimizing, there are two places you
want to do it:
1) When compiling redland itself
CFLAGS="-O255" ./configure ...
make
2) When building with redland
gcc -o foo foo.c -O255 `redland-config --cflags` `redland-config --libs`
rather than have redland-config --cflags override everything.
(or equivalent with pkg-config redland --cflags)
Dave
More information about the redland-dev
mailing list