[oe-commits] Khem Raj : glib-2.0_2.22.1: Fix configure to test res_query by including resolv.h
git version control
git at git.openembedded.org
Thu Dec 10 09:10:39 UTC 2009
Module: openembedded.git
Branch: martin_jansa/xorg-7.5
Commit: ff873fff3ac3fc92ac3e50d68eee8583ae60f478
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=ff873fff3ac3fc92ac3e50d68eee8583ae60f478
Author: Khem Raj <raj.khem at gmail.com>
Date: Wed Dec 9 09:40:56 2009 -0800
glib-2.0_2.22.1: Fix configure to test res_query by including resolv.h
* uclibc does not export res_query as weak like glibc, instead it exports
__res_query and then in resolv.h it defines res_query as __res_query,
the check for this fuction in configure checked the availability in every
way except it did not check if the function is in C library by including
resolv.h. Without resolv.h the function is reported as undefined.
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
.../glib-2.0-2.22.1/uclibc-res_query.patch | 36 ++++++++++++++++++++
recipes/glib-2.0/glib-2.0_2.22.1.bb | 3 +-
2 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/recipes/glib-2.0/glib-2.0-2.22.1/uclibc-res_query.patch b/recipes/glib-2.0/glib-2.0-2.22.1/uclibc-res_query.patch
new file mode 100644
index 0000000..bbb34b5
--- /dev/null
+++ b/recipes/glib-2.0/glib-2.0-2.22.1/uclibc-res_query.patch
@@ -0,0 +1,36 @@
+Index: glib-2.22.1/configure.in
+===================================================================
+--- glib-2.22.1.orig/configure.in 2009-12-08 12:01:39.000000000 -0800
++++ glib-2.22.1/configure.in 2009-12-08 12:05:29.000000000 -0800
+@@ -1004,17 +1004,22 @@ if test $glib_native_win32 = no; then
+ AC_CHECK_FUNC(res_query, ,
+ [AC_CHECK_LIB(resolv, res_query, [ LIBASYNCNS_LIBADD="-lresolv" ],
+ [ save_libs="$LIBS"
+- LIBS="-lresolv $LIBS"
+- AC_MSG_CHECKING([for res_query in -lresolv (alternate version)])
++ AC_MSG_CHECKING([for res_query (alternate version)])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_query(0,0,0,0,0)]])],
+- [ AC_MSG_RESULT(yes)
+- LIBASYNCNS_LIBADD="-lresolv" ],
+- [ AC_MSG_RESULT(no)
+- AC_CHECK_LIB(bind, res_query,
+- [ LIBASYNCNS_LIBADD="-lbind" ],
+- [ AC_MSG_ERROR(res_query not found) ] ) ] )
+- LIBS="$save_libs"
++ [ ac_cv_func_res_query=yes ],
++ [ AC_MSG_CHECKING([for res_query in -lresolv (alternate version)])
++ LIBS="-lresolv $LIBS"
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_query(0,0,0,0,0)]])],
++ [ AC_MSG_RESULT(yes)
++ LIBASYNCNS_LIBADD="-lresolv" ],
++ [ AC_MSG_RESULT(no)
++ AC_CHECK_LIB(bind, res_query,
++ [ LIBASYNCNS_LIBADD="-lbind" ],
++ [ AC_MSG_ERROR(res_query not found) ] ) ] )
++ ] )
++ LIBS="$save_libs"
+ ] )
+ ]
+ )
diff --git a/recipes/glib-2.0/glib-2.0_2.22.1.bb b/recipes/glib-2.0/glib-2.0_2.22.1.bb
index 533116b..95fa07b 100644
--- a/recipes/glib-2.0/glib-2.0_2.22.1.bb
+++ b/recipes/glib-2.0/glib-2.0_2.22.1.bb
@@ -1,5 +1,5 @@
require glib.inc
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
SRC_URI = "\
http://ftp.gnome.org/pub/GNOME/sources/glib/2.22/glib-${PV}.tar.bz2 \
@@ -7,6 +7,7 @@ SRC_URI = "\
file://configure-libtool.patch;patch=1 \
file://bug-556515.patch;patch=1 \
file://g_once_init_enter.patch;patch=1 \
+ file://uclibc-res_query.patch;patch=1 \
"
More information about the Openembedded-commits
mailing list