Skip to content

Commit

Permalink
More libraries needed for static builds
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Oct 19, 2024
1 parent ddd13fd commit 11aec4e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions config-scripts/cups-common.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
])
Expand Down
4 changes: 4 additions & 0 deletions config-scripts/cups-network.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ AC_CHECK_HEADER([resolv.h], [
#include <netinet/in_systm.h>
#include <netinet/ip.h>
])
SAVELIBS="$LIBS"
LIBS=""
AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([gethostbyaddr], [nsl])
AC_SEARCH_LIBS([getifaddrs], [nsl], [
Expand All @@ -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 <sys/socket.h>])
AC_CHECK_HEADER([sys/sockio.h], [
Expand Down
5 changes: 5 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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 <sys/socket.h>
"
Expand Down

0 comments on commit 11aec4e

Please sign in to comment.