On 06/15/2008 01:08 PM, Ruediger Pluem wrote:
On 06/15/2008 06:23 AM, William A. Rowe, Jr. wrote:
Subject asks it all, candidates are up at http://apr.apache.org/dev/dist/
for your reviewing pleasure... vote away;
+/-1
[ -1 ] Release apr 1.3.1 as GA
[ -0 ] Release apr-util 1.3.1 as GA
Windows .zip's will follow when my head is above water and my sinuses
clear up.
-1.
APR fails to build on Solaris 8, 9, 10. This is because -Werror is
added to the CFLAGS permanently.
This cause IPV6 detection to fail on Solaris 8, 9, 10 and in addition
and Solaris 10 there is still a Warning during compile which causes
the build to fail with -Werror set.
The culprit seems to be the changes to build/apr in apr_network.m4
http://svn.apache.org/viewvc?view=rev&revision=662607
APR_TRY_COMPILE_NO_WARNING is called nested again which causes the CFLAGS
restore to fail and to add -Werror twice to the real CFLAGS.
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.
Regards
RĂ¼diger
Index: build/apr_network.m4
===================================================================
--- build/apr_network.m4 (Revision 667644)
+++ build/apr_network.m4 (Arbeitskopie)
@@ -290,9 +290,10 @@
dnl the headers.
AC_DEFUN([APR_CHECK_GETSERVBYNAME_R_STYLE], [
+AC_CACHE_CHECK([style of getservbyname_r routine], ac_cv_getservbyname_r_style, [
+
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,
APR_TRY_COMPILE_NO_WARNING([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
@@ -315,59 +316,64 @@
(struct servent **) 0);
/* use tmp to suppress the warning */
tmp=0;
-], ac_cv_getservbyname_r_style=glibc2, [
+], ac_cv_getservbyname_r_style=glibc2, ac_cv_getservbyname_r_style=none)
-dnl Try and compile a Solaris getservbyname_r piece of code, and set the
-dnl style of the routines to solaris on success
-AC_CACHE_VAL(ac_cv_getservbyname_r_style,
-APR_TRY_COMPILE_NO_WARNING([
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-],[
-struct servent tmp = getservbyname_r((const char *) 0, (const char *) 0,
- (struct servent *) 0, (char *) 0, 0);
-/* use tmp to suppress the warning */
-tmp=NULL;
-], ac_cv_getservbyname_r_style=solaris, [
+if test "$ac_cv_getservbyname_r_style" = "none"; then
+ dnl Try and compile a Solaris getservbyname_r piece of code, and set the
+ dnl style of the routines to solaris on success
+ AC_CACHE_VAL(ac_cv_getservbyname_r_style,
+ APR_TRY_COMPILE_NO_WARNING([
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+ #ifdef HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif
+ ],[
+ struct servent tmp = getservbyname_r((const char *) 0, (const char *) 0,
+ (struct servent *) 0, (char *) 0, 0);
+ /* use tmp to suppress the warning */
+ tmp=NULL;
+ ], ac_cv_getservbyname_r_style=solaris, ac_cv_getservbyname_r_style=none))
-dnl Try and compile a OSF/1 getservbyname_r piece of code, and set the
-dnl style of the routines to osf1 on success
-AC_CACHE_VAL( ac_cv_getservbyname_r_style,
-APR_TRY_COMPILE_NO_WARNING([
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-],[
-int tmp = getservbyname_r((const char *) 0, (const char *) 0,
- (struct servent *) 0, (struct servent_data *) 0);
-/* use tmp to suppress the warning */
-tmp=0;
-], ac_cv_getservbyname_r_style=osf1, ac_cv_getservbyname_r_style=none))]))]))
+ if test "$ac_cv_getservbyname_r_style" = "none"; then
+ dnl Try and compile a OSF/1 getservbyname_r piece of code, and set the
+ dnl style of the routines to osf1 on success
+ AC_CACHE_VAL( ac_cv_getservbyname_r_style,
+ APR_TRY_COMPILE_NO_WARNING([
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #ifdef HAVE_NETINET_IN_H
+ #include <netinet/in.h>
+ #endif
+ #ifdef HAVE_ARPA_INET_H
+ #include <arpa/inet.h>
+ #endif
+ #ifdef HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+ #ifdef HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif
+ ],[
+ int tmp = getservbyname_r((const char *) 0, (const char *) 0,
+ (struct servent *) 0, (struct servent_data *) 0);
+ /* use tmp to suppress the warning */
+ tmp=0;
+ ], ac_cv_getservbyname_r_style=osf1, ac_cv_getservbyname_r_style=none))
+ fi
+fi
+])
if test "$ac_cv_getservbyname_r_style" = "glibc2"; then
AC_DEFINE(GETSERVBYNAME_R_GLIBC2, 1, [Define if getservbyname_r has the glibc style])