Installing glib from git in mac os x and gettext

glib, macos, unix

Solution

I ran into something similar and you might want to try to set CFLAGS="-L/opt/local/lib -I/opt/local/include". It seems that those are not included by default when running the gettext tests. You can either CFLAGS to the configure call or probably also to the autogen.sh

Problem

I'm trying build glib from source in Mac OS X. I've clone glib repo from gnome site. The `autogen.sh` script seems to run fine. But when it starts it shows this message : ``` autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext ``` This seems spooky. However it finishes without showing any error. After spawning configure script it stops with the error : ``` checking libintl.h usability... no checking libintl.h presence... no checking for libintl.h... no configure: error: *** You must have either have gettext support in your C library, or use the *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html ``` Although i've install `gettext` from macports and it seems to be there : ``` arif@dev:~/sak/glib$ls /opt/local/lib/ | grep gettext gettext libgettextlib-0.18.3.dylib libgettextlib.dylib libgettextlib.la libgettextpo.0.dylib libgettextpo.a libgettextpo.dylib libgettextpo.la libgettextsrc-0.18.3.dylib libgettextsrc.dylib libgettextsrc.la ``` One thing i've noticed that although `gettext` is installed, it does not have `pkg-config` file. Maybe that's why its happening . ``` arif@dev:~/sak/glib$ls /opt/local/lib/pkgconfig/ | grep gettext ``` comes out with nothing.

Original source