You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2014/03/01 19:54:20 UTC

svn commit: r1573209 - /subversion/trunk/build/ac-macros/compiler.m4

Author: brane
Date: Sat Mar  1 18:54:20 2014
New Revision: 1573209

URL: http://svn.apache.org/r1573209
Log:
Follow up to r1573106: Make the test program source language-dependent.

* build/ac-macros/compiler.m4
  (_SVN_XXFLAGS_ADD_IFELSE): Renumber arguments and make $4 the program source.
  (SVN_CFLAGS_ADD_IFELSE, SVN_CXXFLAGS_ADD_IFELSE):
   Pass the language-specific program source to _SVN_XXFLAGS_ADD_IFELSE.

Modified:
    subversion/trunk/build/ac-macros/compiler.m4

Modified: subversion/trunk/build/ac-macros/compiler.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/compiler.m4?rev=1573209&r1=1573208&r2=1573209&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/compiler.m4 (original)
+++ subversion/trunk/build/ac-macros/compiler.m4 Sat Mar  1 18:54:20 2014
@@ -33,27 +33,27 @@ AC_DEFUN([_SVN_XXFLAGS_ADD_IFELSE],
 [
   _svn_xxflags__save="[$][$3]"
   AC_LANG_PUSH([$1])
-  AC_MSG_CHECKING([if [$][$2] accepts $4])
-  [$3]="$4 [$][$3]"
+  AC_MSG_CHECKING([if [$][$2] accepts $5])
+  [$3]="$5 [$][$3]"
   dnl Compiling is not enough: Solaris cc accepts invalid options at
   dnl compile-time and just warns, assuming they are for the linker,
   dnl but they cause errors at link-time.
-  AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){return 0;}]])],[
+  AC_LINK_IFELSE([AC_LANG_SOURCE([$4])],[
     AC_MSG_RESULT([yes])
-    $5
+    $6
   ],[
     AC_MSG_RESULT([no])
     [$3]="$_svn_xxflags__save"
-    $6
+    $7
   ])
   AC_LANG_POP([$1])
 ])
 
 AC_DEFUN([SVN_CFLAGS_ADD_IFELSE],
-  [_SVN_XXFLAGS_ADD_IFELSE([C],[CC],[CFLAGS],[$1],[$2],[$3])])
+  [_SVN_XXFLAGS_ADD_IFELSE([C],[CC],[CFLAGS],[[int main(void){return 0;}]],[$1],[$2],[$3])])
 
 AC_DEFUN([SVN_CXXFLAGS_ADD_IFELSE],
-  [_SVN_XXFLAGS_ADD_IFELSE([C++],[CXX],[CXXFLAGS],[$1],[$2],[$3])])
+  [_SVN_XXFLAGS_ADD_IFELSE([C++],[CXX],[CXXFLAGS],[[int main(){}]],[$1],[$2],[$3])])
 
 
 AC_DEFUN([SVN_CC_MODE_SETUP],