From f8231f72f05de32e64cfead4939a6c105fb23054 Mon Sep 17 00:00:00 2001 From: 0x5c Date: Thu, 13 Apr 2023 22:11:18 -0400 Subject: [PATCH] configure: remove obsolete test for socket.h link args ~~~ runit 0.13.1 Mon, 19 Jan 2004 18:32:58 +0000 * trysocketlib.c: new; check for libraries needed for socket() on some systems (fixes link failure on solaris, thx Uffe Jakobsen). ~~~ 19 years later, we don't really need to care about solaris oddities anymore. --- configure | 28 ---------------------------- configure_tests/trysocketlib.c | 12 ------------ src/Makefile | 2 +- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 configure_tests/trysocketlib.c diff --git a/configure b/configure index bb37325..afb2aac 100755 --- a/configure +++ b/configure @@ -327,34 +327,6 @@ if test -n "$HASWAITPID"; then echo "CPPFLAGS += -DHASWAITPID" >> $CONFIG_MK fi -# -# Check for socket() link args. -# XXX: Is this correct? -# -printf "Checking for socket library ... " -if test -n "$SOCKETLIB"; then - # XXX: this seems very wrong, the value we want is empty in most cases, yet empty means "check again"? - echo "$SOCKETLIB (cached)." -else - _CC="$XCC configure_tests/trysocketlib.c -o trysocketlib" - if $_CC 2>/dev/null; then - SOCKETLIB= - echo yes. - elif $_CC -lxnet 2>/dev/null; then - SOCKETLIB="-lxnet" - echo "-lxnet" - elif $_CC -lsocket -lnsl 2>/dev/null; then - SOCKETLIB="-lsocket -lnsl" - echo "-lsocket -lnsl" - else - echo no. - echo "Can't find socket library!" - exit 1 - fi - rm -f trysocketlib -fi -echo "SOCKETLIB_LDFLAGS = $SOCKETLIB" >> $CONFIG_MK - # # Check for utmpx/utmp. # diff --git a/configure_tests/trysocketlib.c b/configure_tests/trysocketlib.c deleted file mode 100644 index 0fe5d06..0000000 --- a/configure_tests/trysocketlib.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include -#include -#include -#include - -int main(void) { - int s; - - s =socket(AF_INET, SOCK_STREAM, 0); - return(close(s)); -} diff --git a/src/Makefile b/src/Makefile index 2c46c55..2aa59fc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -48,7 +48,7 @@ runsvchdir: runsvchdir.o unix.a byte.a svlogd: svlogd.o pmatch.o fmt_ptime.o unix.a byte.a time.a @printf " [CCLD]\t\t$@\n" - ${SILENT}$(CC) $^ $(LDFLAGS) $(BUILD_STATIC) $(SOCKETLIB_LDFLAGS) -o $@ + ${SILENT}$(CC) $^ $(LDFLAGS) $(BUILD_STATIC) -o $@ chpst: chpst.o uidgid.o unix.a byte.a @printf " [CCLD]\t\t$@\n"