[Scummvm-git-logs] scummvm master -> fd89b8c82f45f3619ede241d99ae35b1a78590c0

LittleToonCat noreply at scummvm.org
Mon Mar 6 01:24:55 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fd89b8c82f CONFIGURE: Disable ENet if send/recvmsg is missing


Commit: fd89b8c82f45f3619ede241d99ae35b1a78590c0
    https://github.com/scummvm/scummvm/commit/fd89b8c82f45f3619ede241d99ae35b1a78590c0
Author: Little Cat (toontownlittlecat at gmail.com)
Date: 2023-03-05T21:24:48-04:00

Commit Message:
CONFIGURE: Disable ENet if send/recvmsg is missing

Changed paths:
    configure


diff --git a/configure b/configure
index 34c8a3fe697..64b66ff35f0 100755
--- a/configure
+++ b/configure
@@ -3586,7 +3586,7 @@ if test -n "$_host"; then
 		m68k-atari-mint)
 			# auto -> yes (overriden by $_release_build = yes)
 			if test "$_debug_build" = "no"; then
-				# --disable-debug 
+				# --disable-debug
 				append_var LDFLAGS "-s"
 			fi
 
@@ -3601,7 +3601,7 @@ if test -n "$_host"; then
 				# --enable-release
 				append_var DEFINES "-DNDEBUG"
 			fi
-			
+
 			_seq_midi=no
 			_timidity=no
 			;;
@@ -4179,6 +4179,48 @@ EOF
 	echo "$_sdlnet"
 fi
 
+#
+# Check for stuff required for ENet to compile
+#
+if test "$_enet" = yes ; then
+	case "$_host_os" in
+		mingw*)
+			# Skip for mingw.
+			;;
+		*)
+			echo "Checks for ENet..."
+
+				echo_n "   "
+				echocheck "sendmsg"
+				cat > $TMPC << EOF
+#include <sys/socket.h>
+int main(void) { return sendmsg(0, 0, 0); }
+EOF
+				cc_check
+				if test "$TMPR" -eq 0; then
+					echo "yes"
+				else
+					echo "no, required for ENet.  Disabling."
+					_enet=no
+				fi
+
+				echo_n "   "
+				echocheck "recvmsg"
+				cat > $TMPC << EOF
+#include <sys/socket.h>
+int main(void) { return recvmsg(0, 0, 0); }
+EOF
+				cc_check
+				if test "$TMPR" -eq 0; then
+					echo "yes"
+				else
+					echo "no, required for ENet.  Disabling."
+					_enet=no
+				fi
+			;;
+	esac
+fi
+
 #
 # Check whether ENet networking support is requested
 #
@@ -4196,13 +4238,13 @@ if test "$_enet" = yes ; then
 
 		*)
 			# Check for features and define.
-			echo "Checks for ENet..."
+			echo "Optional checks for ENet..."
 
 			echo_n "   "
 			echocheck "getaddrinfo"
 			cat > $TMPC << EOF
 #include <netdb.h>
-int main(void) { return getaddrinfo(0, 0, 0, 0); } 
+int main(void) { return getaddrinfo(0, 0, 0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4216,7 +4258,7 @@ EOF
 			echocheck "getnameinfo"
 			cat > $TMPC << EOF
 #include <netdb.h>
-int main(void) { return getnameinfo(0, 0, 0, 0, 0, 0, 0); } 
+int main(void) { return getnameinfo(0, 0, 0, 0, 0, 0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4230,7 +4272,7 @@ EOF
 			echocheck "gethostbyaddr_r"
 			cat > $TMPC << EOF
 #include <netdb.h>
-int main(void) { return gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0); } 
+int main(void) { return gethostbyaddr_r(0, 0, 0, 0, 0, 0, 0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4244,7 +4286,7 @@ EOF
 			echocheck "gethostbyname_r"
 			cat > $TMPC << EOF
 #include <netdb.h>
-int main(void) { return gethostbyname_r(0, 0, 0, 0, 0, 0); } 
+int main(void) { return gethostbyname_r(0, 0, 0, 0, 0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4258,7 +4300,7 @@ EOF
 			echocheck "poll"
 			cat > $TMPC << EOF
 #include <poll.h>
-int main(void) { return poll(0, 0, 0); } 
+int main(void) { return poll(0, 0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4272,7 +4314,7 @@ EOF
 			echocheck "fcntl"
 			cat > $TMPC << EOF
 #include <fcntl.h>
-int main(void) { return fcntl(0, 0); } 
+int main(void) { return fcntl(0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4286,7 +4328,7 @@ EOF
 			echocheck "inet_pton"
 			cat > $TMPC << EOF
 #include <arpa/inet.h>
-int main(void) { return inet_pton(0, 0, 0); } 
+int main(void) { return inet_pton(0, 0, 0); }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4300,7 +4342,7 @@ EOF
 			echocheck "inet_ntop"
 			cat > $TMPC << EOF
 #include <arpa/inet.h>
-int main(void) { inet_ntop(0, 0, 0, 0); return 0; } 
+int main(void) { inet_ntop(0, 0, 0, 0); return 0; }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4315,7 +4357,7 @@ EOF
 			cat > $TMPC << EOF
 #include <sys/socket.h>
 struct msghdr msg;
-int main(void) { return msg.msg_flags; } 
+int main(void) { return msg.msg_flags; }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then
@@ -4329,7 +4371,7 @@ EOF
 			echocheck "socklen_t"
 			cat > $TMPC << EOF
 #include <sys/socket.h>
-int main(void) { socklen_t len = 0; return 0; } 
+int main(void) { socklen_t len = 0; return 0; }
 EOF
 			cc_check
 			if test "$TMPR" -eq 0; then




More information about the Scummvm-git-logs mailing list