Fix the network libraries test
Fix the network libraries test

The existing test would never work anyway, as AC_CHECK_FUNC would
only check for a function named "socket bind listen inet_ntop".

Instead we use AC_SEARCH_LIBS which tests first without any library,
then iterates over the provided libraries list.

We list the traditionally searched libs, and libnetwork for Haiku
(which must be checked for before libsocket).

Open-UDC/thttpgpd,Open-UDC/thttpgpd,Open-UDC/thttpgpd,Open-UDC/thttpgpd