diff options
-rw-r--r-- | changes/ticket32191 | 3 | ||||
-rw-r--r-- | configure.ac | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/changes/ticket32191 b/changes/ticket32191 new file mode 100644 index 0000000000..65e919fe03 --- /dev/null +++ b/changes/ticket32191 @@ -0,0 +1,3 @@ + o Minor features (build system): + - force pkg-config to only use --prefix when cross-compiling. + Closes ticket 32191. diff --git a/configure.ac b/configure.ac index 0e9bfe1f6b..ece831d5bd 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,16 @@ else pkg_config_user_action="check the PKG_CONFIG_PATH environment variable" fi +if test "x$PKG_CONFIG_PATH" = "x" && test "x$prefix" != "xNONE" && test "$host" != "$build"; then + export PKG_CONFIG_PATH=$prefix/lib/pkgconfig + AC_MSG_NOTICE([set PKG_CONFIG_PATH=$PKG_CONFIG_PATH to support cross-compiling]) + if test -f "$PKG_CONFIG_PATH/libevent.pc"; then + echo "checking for $PKG_CONFIG_PATH/libevent.pc... yes" + else + AC_MSG_ERROR([$PKG_CONFIG_PATH/libevent.pc not found!]) + fi +fi + AC_ARG_ENABLE(openbsd-malloc, AS_HELP_STRING(--enable-openbsd-malloc, [use malloc code from OpenBSD. Linux only. Deprecated: see --with-malloc])) AC_ARG_ENABLE(static-openssl, |