Skip to content

Commit

Permalink
configure: remove obsolete test for socket.h link args
Browse files Browse the repository at this point in the history
~~~
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.
  • Loading branch information
0x5c committed Apr 14, 2023
1 parent 9097b95 commit f8231f7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
28 changes: 0 additions & 28 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
12 changes: 0 additions & 12 deletions configure_tests/trysocketlib.c

This file was deleted.

2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f8231f7

Please sign in to comment.