pkg-config:PKG_PROG_PKG_CONFIG:找不到命令

Joe*_*oel 4 macos autoconf build pkg-config kivy

我收到以下错误

./configure: line 11162: PKG_PROG_PKG_CONFIG: command not found
Run Code Online (Sandbox Code Playgroud)

当这是代码执行时(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
Run Code Online (Sandbox Code Playgroud)

我的pkg-config应用程序在我的PATH(/ usr/local/bin)中.我也尝试在命令行上将PKG_CONFIG_PATH导出到/ usr/local/bin/pkg-config和/ usr/local/lib/pkgconfig.我已经尝试将LD_LIBRARY_PATH导出到各种路径(不确定它应该指向tbh的位置),这似乎也没有帮助.

我读了一些关于我系统上多个aclocal目录的内容,这可能有问题,但我不清楚如何解决或确定问题.

这个linux构建新手(在OSX上)感谢任何帮助.

Jac*_*lly 5

当该脚本调用时autogen.sh,aclocal无法找到pkg.m4,附带的M4宏包pkg-config并提供PKG_PROG_PKG_CONFIG宏.在哪里pkg-config安装,以及aclocal搜索的目录是什么?

  • 其中 pkg-config 返回 /usr/local/bin/pkg-config。echo $PKG_PROG_PKG_CONFIG 未设置。find /usr -name "pkg.m4" 返回以下内容:/usr/local/share/aclocal/pkg.m4 /usr/X11/share/aclocal/pkg.m4。我如何知道 aclocal 正在搜索哪些目录? (2认同)
  • 可以自己设置aclocal路径`ACLOCAL_PATH=/usr/local/share/aclocal ./autogen.sh` (2认同)