git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 4/4] Don't link with libsocket in MINGW port

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
May 30, 2007, 13:08 UTC
Message-ID
<fcaeb9bf0705300608y6ae9eb12i71635746defbec10@mail.gmail.com>
In-Reply-To
<465D6796.27B65043@eudaptics.com>
On 5/30/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> This looks wrong. NEEDS_SOCKET is set in the architecture sections of
> Makefile where necessary, but the MinGW section doesn't want it and
> doesn't set it. If ./configure sets it, then you should fix
> configure.ac, not work around in Makefile.

I did so because I didn't have SunOS to test so I'd rather not touch the code detecting NEEDS_SOCKET in configure.ac. How about this patch:

diff --git a/configure.ac b/configure.ac
index 4a12cb0..0516fdb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,12 @@ test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
 AC_CHECK_LIB([c], [socket],
 [NEEDS_SOCKET=],
 [NEEDS_SOCKET=YesPlease])
+if test "$NEEDS_SOCKET" = YesPlease; then # more check
+	AC_CHECK_LIB([socket], [socket],
+	[LIBSOCKET_HAS_SOCKET=],
+	[LIBSOCKET_HAS_SOCKET=1])
+	test -n "$LIBSOCKET_HAS_SOCKET" && NEEDS_SOCKET=
+fi
 AC_SUBST(NEEDS_SOCKET)
 test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"

If someone has a SunOS, please test the above patch. Thanks
-- 
Duy
Previous: Johannes SixtNext: Johannes Schindelin
Message 4 of 5 in “Re: [PATCH 0/4] Make MINGW port cross-compilable from Linux”
  1. Johannes SixtMay 30, 2007
  2. Johannes SchindelinMay 30, 2007
  3. Johannes SixtMay 30, 2007
  4. Nguyen Thai Ngoc DuyMay 30, 2007
  5. Johannes SchindelinMay 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.