From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 25 Apr 2024 14:08:50 +0000 (+0100) Subject: Add some extra CFLAG settings to configure.ac for libconfig libpopt and openssl/libcr... X-Git-Tag: 4.3.4-dev~15 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=be74e3e17171d2e74f77e08346974b320d04c1a1;p=thirdparty%2Fshairport-sync.git Add some extra CFLAG settings to configure.ac for libconfig libpopt and openssl/libcrypto to enable compilation on macOS without extra flag settings. --- diff --git a/configure.ac b/configure.ac index 7bf534ea..15636e96 100644 --- a/configure.ac +++ b/configure.ac @@ -68,8 +68,7 @@ AC_CHECK_LIB([m],[exp], , AC_MSG_ERROR(maths library needed)) if test "x${with_pkg_config}" = xyes ; then PKG_CHECK_MODULES( [popt], [popt], - [CFLAGS="${popt_CFLAGS} ${CFLAGS}" - LIBS="${popt_LIBS} ${LIBS}"], AC_MSG_ERROR(libpopt needed)) + [CFLAGS="${popt_CFLAGS} ${CFLAGS}" LIBS="${popt_LIBS} ${LIBS}"], AC_MSG_ERROR(libpopt needed)) else AC_CHECK_LIB([popt],[poptGetContext], , AC_MSG_ERROR(libpopt needed)) fi @@ -124,7 +123,7 @@ AM_CONDITIONAL([INSTALL_CREATE_USER_GROUP], [test "x$with_with_create_user_group if test "x${with_pkg_config}" = xyes ; then PKG_CHECK_MODULES( [libconfig], [libconfig], - [LIBS="${libconfig_LIBS} ${LIBS}"], AC_MSG_ERROR([libconfig library needed])) + [CFLAGS="${libconfig_CFLAGS} ${CFLAGS}" LIBS="${libconfig_LIBS} ${LIBS}"], AC_MSG_ERROR([libconfig library needed])) else AC_CHECK_LIB([config],[config_init], , AC_MSG_ERROR([libconfig library needed])) fi @@ -181,7 +180,7 @@ if test "x${with_ssl}" = xopenssl ; then if test "x${with_pkg_config}" = xyes ; then PKG_CHECK_MODULES( [SSL], [libssl,libcrypto], - [LIBS="${SSL_LIBS} ${LIBS}"]) + [CFLAGS="${SSL_CFLAGS} ${CFLAGS}" LIBS="${SSL_LIBS} ${LIBS}"]) else AC_CHECK_LIB([crypto], [main], , AC_MSG_ERROR(libcrypto selected but the library cannot be found!)) AC_CHECK_LIB([ssl], [main], , AC_MSG_ERROR(libssl selected but the library cannot be found!)) @@ -291,7 +290,7 @@ if test "x$with_ao" = "xyes" ; then if test "x${with_pkg_config}" = xyes ; then PKG_CHECK_MODULES( [AO], [ao > 1.0.0], - [LIBS="${AO_LIBS} ${LIBS}"], [AC_MSG_ERROR(AO support requires the ao library -- libao-dev suggested)]) + [CFLAGS="${AO_CFLAGS} ${CFLAGS}" LIBS="${AO_LIBS} ${LIBS}"], [AC_MSG_ERROR(AO support requires the ao library -- libao-dev suggested)]) else AC_CHECK_LIB([ao], [ao_initialize], , AC_MSG_ERROR(AO support requires the ao library -- libao-dev suggested)) fi