From: Michael R Sweet Date: Sat, 19 Oct 2024 19:31:18 +0000 (-0400) Subject: More libraries needed for static builds X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11aec4e0adebb4abdf8595b5af3d6f563e28f1ee;p=thirdparty%2Fcups.git More libraries needed for static builds --- diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index b42220906b..572382987a 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -361,6 +361,7 @@ AS_CASE([$host_os_name], [darwin*], [ LIBS="-framework SystemConfiguration $LIBS" AC_CHECK_FUNCS([SCDynamicStoreCopyComputerName], [ AC_DEFINE([HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME], [1], [Have SCDynamicStoreCopyComputerName function?]) + PKGCONFIG_LIBS_STATIC="-framework SystemConfiguration $PKGCONFIG_LIBS_STATIC" ],[ LIBS="$SAVELIBS" ]) diff --git a/config-scripts/cups-network.m4 b/config-scripts/cups-network.m4 index 593a63d472..6d5e41ea07 100644 --- a/config-scripts/cups-network.m4 +++ b/config-scripts/cups-network.m4 @@ -19,6 +19,8 @@ AC_CHECK_HEADER([resolv.h], [ #include #include ]) +SAVELIBS="$LIBS" +LIBS="" AC_SEARCH_LIBS([socket], [socket]) AC_SEARCH_LIBS([gethostbyaddr], [nsl]) AC_SEARCH_LIBS([getifaddrs], [nsl], [ @@ -38,6 +40,8 @@ AC_SEARCH_LIBS([__res_init], [resolv bind], [ ]) ]) ]) +PKGCONFIG_LIBS_STATIC="$PKGCONFIG_LIBS_STATIC $LIBS" +LIBS="$SAVELIBS $LIBS" AC_CHECK_MEMBER([struct sockaddr.sa_len],,, [#include ]) AC_CHECK_HEADER([sys/sockio.h], [ diff --git a/configure b/configure index b26b1b3153..3317fcadde 100755 --- a/configure +++ b/configure @@ -6794,6 +6794,7 @@ then : printf "%s\n" "#define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1" >>confdefs.h + PKGCONFIG_LIBS_STATIC="-framework SystemConfiguration $PKGCONFIG_LIBS_STATIC" else $as_nop @@ -8278,6 +8279,8 @@ printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h fi +SAVELIBS="$LIBS" +LIBS="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 printf %s "checking for library containing socket... " >&6; } if test ${ac_cv_search_socket+y} @@ -8717,6 +8720,8 @@ fi fi +PKGCONFIG_LIBS_STATIC="$PKGCONFIG_LIBS_STATIC $LIBS" +LIBS="$SAVELIBS $LIBS" ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include "