You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Victor J. Orlikowski" <v....@gte.net> on 2000/07/12 18:08:49 UTC

[PATCH] Re-submit: AIX detection patch

This patch to some extent cleans up the detection of the various versions
of AIX. It has one glaring annoyance: xlC needs to be detected early on,
and passed a certain flag to quit on needed error conditions, so the cc
detection routine is run at the end of AIX version determination. If
someone has a better way around this, please let me know.

Index: src/lib/apr/hints.m4
===================================================================
RCS file: /cvs/apache/apache-2.0/src/lib/apr/hints.m4,v
retrieving revision 1.12
diff -u -r1.12 hints.m4
--- hints.m4	2000/06/26 13:23:27	1.12
+++ hints.m4	2000/07/12 15:45:08
@@ -77,30 +77,51 @@
 	APR_SETIFNULL(LIBS, [-lposix -lbsd])
 	APR_SETIFNULL(LDFLAGS, [-s])
 	;;
-    i386-ibm-aix*)
-	APR_SETIFNULL(CFLAGS, [-DAIX=1 -U__STR__ -DUSEBCOPY])
-	;;
-    *-ibm-aix[1-2].*)
-	APR_SETIFNULL(CFLAGS, [-DAIX=1 -DNEED_RLIM_T -U__STR__])
-	;;
-    *-ibm-aix3.*)
-	APR_SETIFNULL(CFLAGS, [-DAIX=30 -DNEED_RLIM_T -U__STR__])
-	;;
-    *-ibm-aix4.1)
-	APR_SETIFNULL(CFLAGS, [-DAIX=41 -DNEED_RLIM_T -U__STR__])
-	;;
-    *-ibm-aix4.2)
-	APR_SETIFNULL(CFLAGS, [-DAIX=42 -U__STR__])
-	APR_SETIFNULL(LDFLAGS, [-lm])
-	;;
-    *-ibm-aix4.3)
-	APR_SETIFNULL(CFLAGS, [-DAIX=43 -U__STR__])
-	APR_SETIFNULL(LDFLAGS, [-lm])
-	;;
     *-ibm-aix*)
-	APR_SETIFNULL(CFLAGS, [-DAIX=1 -U__STR__])
-	APR_SETIFNULL(LDFLAGS, [-lm])
-	;;
+        case $PLAT in
+        i386-ibm-aix*)
+	    APR_SETIFNULL(CFLAGS, [-U__STR__ -DUSEBCOPY])
+	    ;;
+        *-ibm-aix[1-2].*)
+	    APR_SETIFNULL(CFLAGS, [-DNEED_RLIM_T -U__STR__])
+	    ;;
+        *-ibm-aix3.*)
+	    APR_SETIFNULL(CFLAGS, [-DNEED_RLIM_T -U__STR__])
+	    ;;
+        *-ibm-aix4.1)
+	    APR_SETIFNULL(CFLAGS, [-DNEED_RLIM_T -U__STR__])
+	    ;;
+        *-ibm-aix4.1.*)
+            APR_SETIFNULL(CFLAGS, [-DNEED_RLIM_T -U__STR__])
+            ;;
+        *-ibm-aix4.2)
+	    APR_SETIFNULL(CFLAGS, [-U__STR__])
+	    APR_SETIFNULL(LDFLAGS, [-lm])
+	    ;;
+        *-ibm-aix4.2.*)
+            APR_SETIFNULL(CFLAGS, [-U__STR__])
+            APR_SETIFNULL(LDFLAGS, [-lm])
+            ;;
+        *-ibm-aix4.3)
+	    APR_SETIFNULL(CFLAGS, [-D_USE_IRS -U__STR__])
+	    APR_SETIFNULL(LDFLAGS, [-lm])
+	    ;;
+        *-ibm-aix4.3.*)
+            APR_SETIFNULL(CFLAGS, [-D_USE_IRS -U__STR__])
+            APR_SETIFNULL(LDFLAGS, [-lm])
+            ;;
+        *-ibm-aix*)
+	    APR_SETIFNULL(CFLAGS, [-U__STR__])
+	    APR_SETIFNULL(LDFLAGS, [-lm])
+	    ;;
+        esac
+        dnl Must do a check for gcc or egcs here, to get the right options  
+        dnl to the compiler.
+	AC_PROG_CC
+        if test "$GCC" != "yes"; then
+          APR_ADDTO(CFLAGS, [-qHALT=E])
+        fi
+        ;;
     *-apollo-*)
 	APR_SETIFNULL(CFLAGS, [-DAPOLLO])
 	;;

-- 
Victor J. Orlikowski            v.j.orlikowski@gte.net
                                vjo@raleigh.ibm.com
                                vjo@us.ibm.com