Compiling glib-2.34.3 on Mac OSX
I loaded the development app on the mac.
I tried to configure glib-2.34.3, but it required gettext. So, I got gettext. The only problem I has was the file stpncpy.c had a weak_alias macro that allowed stpncpy.c to declare a function. However, since Mac already had that function, there was a problem. I had to define weak_alias in that file:
#define weak_alias(a,b) /* */
Of course, the right way to do this would be to check if stpncpy.c is defined. The test failed on bash. Everything else passed.
On to the build of glib2.
I had to define export LIBFFI_LIBS=-lffi and export LIBFFI-CFLAGS=-I/usr/include/ffi
Then, config did not put these values into the make file so I had to invoke make with “-e” option.
The package I wanted to compile needed pkg-config, so I went to http://www.freedesktop.org/wiki/Software/pkg-config to get it. I needed to put in the variables from /usr/local/lib/pkgconfig/glib-2.0.pc from Libs: and Cflags: as
GLIB_LIBS="-L/usr/local/lib -lglib-2.0 -lintl"