On Sun, 2008-06-15 at 14:43 +0200, Ruediger Pluem wrote:

> The attached patch fixes this for me, but as I am no autoconf specialist
> some remote eyes seem to be a good idea before committing.

Or we can just remember CFLAGS and restore them.

-- 
Bojan
Index: build/apr_network.m4
===================================================================
--- build/apr_network.m4	(revision 662610)
+++ build/apr_network.m4	(working copy)
@@ -290,6 +290,9 @@
 dnl the headers.
 AC_DEFUN([APR_CHECK_GETSERVBYNAME_R_STYLE], [
 
+dnl We have nested APR_TRY_COMPILE_NO_WARNING, save CFLAGS
+old_cflags="$CFLAGS"
+
 dnl Try and compile a glibc2 getservbyname_r piece of code, and set the
 dnl style of the routines to glibc2 on success
 AC_CACHE_CHECK([style of getservbyname_r routine], ac_cv_getservbyname_r_style,
@@ -376,6 +379,8 @@
 elif test "$ac_cv_getservbyname_r_style" = "osf1"; then
     AC_DEFINE(GETSERVBYNAME_R_OSF1, 1, [Define if getservbyname_r has the OSF/1 style])
 fi
+
+CFLAGS="$old_cflags"
 ])
 
 dnl

Reply via email to