Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pkg-config: PKG_PROG_PKG_CONFIG: command not found

I get the following error

./configure: line 11162: PKG_PROG_PKG_CONFIG: command not found

when this is code is executed in (kivy-ios/tools-build-sdlmixer.sh)

if [ ! -f libtremor/tremor/.libs/libvorbisidec.a ]; then
        try cd libtremor/tremor
        echo > asm_arm.h
        CC="$ARM_CC" AR="$ARM_AR" \
        LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS" \
        OGG_CFLAGS="-I../../libogg/include" \
        OGG_LDFLAGS="-L../../libogg/src/.libs" \
        PKG_CONFIG_LIBDIR="../../libogg" \
        ACLOCAL_FLAGS="-I $DESTROOT/share/aclocal -I `aclocal --print-ac-dir`" ./autogen.sh \
            --prefix=$DESTROOT \
                --disable-shared \
                --host=arm-apple-darwin \
                --enable-static=yes \
                --enable-shared=no
        try make
        try make install
        try cd ../..
fi

My pkg-config application is in my PATH (/usr/local/bin). I've also tried exporting PKG_CONFIG_PATH on my command line to /usr/local/bin/pkg-config and /usr/local/lib/pkgconfig. I've tried exporting LD_LIBRARY_PATH to various paths as well (not sure where it should point to tbh), and that doesn't seem to help either.

I read something about multiple aclocal directories on my system, which could be problematic, but its not clear to me how to resolve that or determine its the issue.

This linux build newbie (on OSX) appreciates any help.

like image 667
Joel Avatar asked Jun 13 '13 14:06

Joel


1 Answers

When that script calls autogen.sh, aclocal is failing to find pkg.m4, an M4 macro package that comes with pkg-config and provides the PKG_PROG_PKG_CONFIG macro. Where is pkg-config installed, and what directories is aclocal searching?

like image 105
Jack Kelly Avatar answered Oct 13 '22 18:10

Jack Kelly