]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac] On AIX, check to see if the compiler will allow
authordtucker <dtucker>
Mon, 18 Sep 2006 13:17:40 +0000 (13:17 +0000)
committerdtucker <dtucker>
Mon, 18 Sep 2006 13:17:40 +0000 (13:17 +0000)
   macro redefinitions, and if not, remove "-qlanglvl=ansi" from the flags.
   Allows build out of the box with older VAC and XLC compilers.  Found by
   David Bronder and Bernhard Simon.

ChangeLog
configure.ac

index 2973498fc6683196b9f13685e70fd1376e8bc94e..c1de453a6b463b5a9e3a8f08ab688f9b3da38cc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20060918
+ - (dtucker) [configure.ac] On AIX, check to see if the compiler will allow
+   macro redefinitions, and if not, remove "-qlanglvl=ansi" from the flags.
+   Allows build out of the box with older VAC and XLC compilers.  Found by
+   David Bronder and Bernhard Simon.
+
 20060916
  - OpenBSD CVS Sync
    - djm@cvs.openbsd.org 2006/09/16 19:53:37
index 365eac46cac7c5dedbda70d780c9622ac96e8287..af92560e855026ec2d88e03f2692d51d436ef658 100644 (file)
@@ -134,6 +134,27 @@ SPC_MSG="no"
 # Check for some target-specific stuff
 case "$host" in
 *-*-aix*)
+       # Some versions of VAC won't allow macro redefinitions at
+       # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
+       # particularly with older versions of vac or xlc.
+       # It also throws errors about null macro argments, but these are
+       # not fatal.
+       AC_MSG_CHECKING(if compiler allows macro redefinitions)
+       AC_COMPILE_IFELSE(
+           [AC_LANG_SOURCE([[
+#define testmacro foo
+#define testmacro bar
+int main(void) { exit(0); }
+           ]])],
+           [ AC_MSG_RESULT(yes) ],
+           [ AC_MSG_RESULT(no)
+             CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
+             LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
+             CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
+             CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
+           ]
+       )
+
        AC_MSG_CHECKING([how to specify blibpath for linker ($LD)])
        if (test -z "$blibpath"); then
                blibpath="/usr/lib:/lib"
This page took 0.041902 seconds and 5 git commands to generate.