From 51642118c156044133720d7b36e971fcb99b1e45 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 13 Sep 2013 06:49:50 +0000 Subject: [PATCH] build: ldflags conversion: libsocket. This converts the ldflags needed for the socket/connect system calls in the usual way. It also drops the check for the connect() system call, as it should always be either in -lc or -lsocket. --- Makefile.in | 9 +++++++++ configure.ac | 13 +++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index 2643ee84..b154c329 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,6 +38,7 @@ samplerate_ldflags := @samplerate_ldflags@ osl_ldflags := @osl_ldflags@ openssl_ldflags := @openssl_ldflags@ gcrypt_ldflags := @gcrypt_ldflags@ +socket_ldflags := @socket_ldflags@ build_date := $(shell date) uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") @@ -312,6 +313,14 @@ para_recv \ $(faad_ldflags) \ $(flac_ldflags) +para_server \ +para_client \ +para_audioc \ +para_audiod \ +para_recv \ +: LDFLAGS += \ + $(socket_ldflags) + para_recv: $(recv_objs) @[ -z "$(Q)" ] || echo 'LD $@' $(Q) $(CC) $(recv_objs) -o $@ @recv_ldflags@ $(LDFLAGS) diff --git a/configure.ac b/configure.ac index 61365e63..9ceed415 100644 --- a/configure.ac +++ b/configure.ac @@ -410,17 +410,10 @@ else fi ########################################################################### libsocket AC_CHECK_LIB([c], [socket], - [socket_lib=], - [socket_lib="-lsocket"] + [socket_ldlflags=], + [socket_ldflags="-lsocket"] ) -server_ldflags="$server_ldflags $socket_lib" -client_ldflags="$client_ldflags $socket_lib" -audioc_ldflags="$audioc_ldflags $socket_lib" -audiod_ldflags="$audiod_ldflags $socket_lib" -recv_ldflags="$recv_ldflags $socket_lib" -AC_SEARCH_LIBS([connect],[socket],[],[ - AC_MSG_ERROR([Fatal: Did not find connect().]) -],[]) +AC_SUBST(socket_ldflags) ########################################################################### libnsl AC_CHECK_LIB([c], [gethostbyname], [nsl_lib=], -- 2.39.5