From 2d186a28945868303f8e40b728058f979f77b3b5 Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Tue, 11 Jun 2013 14:59:02 +0200
Subject: glib/configure.ac: use AC_PROG_CC instead of AM_PROG_CC_STDC


diff --git a/glib/configure.ac b/glib/configure.ac
index 9e48cc9..f51d103 100644
--- a/glib/configure.ac
+++ b/glib/configure.ac
@@ -288,7 +288,7 @@ AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
 AM_CONDITIONAL(HAVE_CXX, [test "$CXX" != ""])
 AC_LANG_RESTORE
 
-AM_PROG_CC_STDC
+AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_INSTALL
 
-- 
1.7.5


From 8a711d6bac22f0334acf6eecc83a3b38b19e2409 Mon Sep 17 00:00:00 2001
From: Ingo Weinhold <ingo_weinhold@gmx.de>
Date: Tue, 11 Jun 2013 16:16:06 +0200
Subject: glib/configure.ac: search for stuff in -lnetwork


diff --git a/glib/configure.ac b/glib/configure.ac
index f51d103..d41bef3 100644
--- a/glib/configure.ac
+++ b/glib/configure.ac
@@ -1057,11 +1057,19 @@ if test $glib_native_win32 = no; then
                                         [res_query("test", 0, 0, (void *)0, 0);],
                                         [AC_MSG_RESULT([in -lbind])
                                          NETWORK_LIBS="-lbind $NETWORK_LIBS"],
-                                        [AC_MSG_ERROR(not found)])])
+                                        [LIBS="-lnetwork $save_libs"
+                                         AC_TRY_LINK([#include <resolv.h>],
+                                                     [res_query("test", 0, 0, (void *)0, 0);],
+                                                     [AC_MSG_RESULT([in -lbind])
+                                                      NETWORK_LIBS="-lnetwork $NETWORK_LIBS"],
+                                                     [AC_MSG_ERROR(not found)])])])
                LIBS="$save_libs"])
-  AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket,
-				        [NETWORK_LIBS="-lsocket $NETWORK_LIBS"],
-				        [AC_MSG_ERROR(Could not find socket())]))
+  AC_CHECK_FUNC(socket, :,
+                AC_CHECK_LIB(socket, socket,
+                             [NETWORK_LIBS="-lsocket $NETWORK_LIBS"],
+                             [AC_CHECK_LIB(network, socket,
+                                           [NETWORK_LIBS="-lnetwork $NETWORK_LIBS"],
+				           [AC_MSG_ERROR(Could not find socket())])]))
 fi
 AC_SUBST(NETWORK_LIBS)
 
-- 
1.7.5

