Fix the quoting of AC_LANG_PROGRAM
authorRon <ron@debian.org>
Sat, 20 Dec 2014 09:16:20 +0000 (19:46 +1030)
committerRon <ron@debian.org>
Sat, 20 Dec 2014 09:16:20 +0000 (19:46 +1030)
It was under-quoted in c95c9a048f3283afb2e412b10085d4f7c19e1412, which
leads to a flood of warnings when it gets incorrectly expanded, like:

configure.ac:354: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body

configure.ac

index 9b2f51f..95f20b2 100644 (file)
@@ -357,9 +357,9 @@ AS_IF([test x"$enable_float" = x"no"],
     AS_IF([test x"$enable_rtcd" = x"yes"],[
             get_cpuid_by_asm="no"
             AC_MSG_CHECKING([Get CPU Info])
-            AC_LINK_IFELSE(AC_LANG_PROGRAM([
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                  #include <stdio.h>
-            ],[
+            ]],[[
                  unsigned int CPUInfo0;
                  unsigned int CPUInfo1;
                  unsigned int CPUInfo2;
@@ -373,19 +373,19 @@ AS_IF([test x"$enable_float" = x"no"],
                  "=d" (CPUInfo3) :
                  "a" (InfoType), "c" (0)
                 );
-            ]),
+            ]])],
             [get_cpuid_by_asm="yes"
              AC_MSG_RESULT([Inline Assembly])],
-             [AC_LINK_IFELSE(AC_LANG_PROGRAM([
+             [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                  #include <cpuid.h>
-            ],[
+            ]],[[
                  unsigned int CPUInfo0;
                  unsigned int CPUInfo1;
                  unsigned int CPUInfo2;
                  unsigned int CPUInfo3;
                  unsigned int InfoType;
                  __get_cpuid(InfoType, &CPUInfo0, &CPUInfo1, &CPUInfo2, &CPUInfo3);
-            ]),
+            ]])],
             [AC_MSG_RESULT([C method])],
             [AC_MSG_ERROR([not support Get CPU Info, please disable intrinsics ])])])
 
@@ -405,14 +405,14 @@ AS_IF([test x"$enable_float" = x"no"],
                  #endif
             ])
 
-            AC_LINK_IFELSE(AC_LANG_PROGRAM([
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                  #include <xmmintrin.h>
                  #include <emmintrin.h>
                  #include <smmintrin.h>
-            ],[
+            ]],[[
                  __m128i mtest = _mm_setzero_si128();
                  mtest = _mm_cmpeq_epi64(mtest, mtest);
-            ]),
+            ]])],
             [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([Compiler & linker failure for sse4.1, please disable intrinsics])])
 
             CFLAGS="$TMP_CFLAGS"
@@ -432,12 +432,12 @@ AS_IF([test x"$enable_float" = x"no"],
                    AC_CHECK_HEADER(xmmintrin.h, [], [AC_MSG_ERROR([Couldn't find xmmintrin.h])])
                    AC_CHECK_HEADER(emmintrin.h, [], [AC_MSG_ERROR([Couldn't find emmintrin.h])])
 
-                   AC_LINK_IFELSE(AC_LANG_PROGRAM([
+                   AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                         #include <xmmintrin.h>
                         #include <emmintrin.h>
-                   ],[
+                   ]],[[
                         __m128i mtest = _mm_setzero_si128();
-                   ]),
+                   ]])],
                    [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([Compiler & linker failure for sse2, please disable intrinsics])])
 
                   CFLAGS="$TMP_CFLAGS"