configure.in: Quote AC_LANG_PROGRAM and remove AC_INCLUDES_DEFAULT.
authorFlorian Forster <octo@collectd.org>
Fri, 22 Mar 2013 20:55:02 +0000 (21:55 +0100)
committerFlorian Forster <octo@collectd.org>
Fri, 22 Mar 2013 20:56:09 +0000 (21:56 +0100)
The latter isn't expanded anymore when quoted. There's no easy way
around this :\

configure.in

index 70db3d5..7f4b075 100644 (file)
@@ -753,18 +753,19 @@ AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
 if test "x$have_swapctl" = "xyes"; then
         AC_CACHE_CHECK([whether swapctl takes two arguments],
                 [c_cv_have_swapctl_two_args],
-                AC_COMPILE_IFELSE(
-                        AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
 #  undef _FILE_OFFSET_BITS
 #  undef _LARGEFILE64_SOURCE
 #endif
 #include <sys/stat.h>
-#include <sys/swap.h>]],
-                                [[
-                                int num = swapctl(0, NULL);
-                                ]]
-                        ),
+#include <sys/swap.h>
+]],
+[[
+int num = swapctl(0, NULL);
+]]
+                        )],
                         [c_cv_have_swapctl_two_args="yes"],
                         [c_cv_have_swapctl_two_args="no"]
                 )
@@ -772,17 +773,19 @@ if test "x$have_swapctl" = "xyes"; then
         AC_CACHE_CHECK([whether swapctl takes three arguments],
                 [c_cv_have_swapctl_three_args],
                 AC_COMPILE_IFELSE(
-                        AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
+                        [AC_LANG_PROGRAM(
+[[
 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
 #  undef _FILE_OFFSET_BITS
 #  undef _LARGEFILE64_SOURCE
 #endif
 #include <sys/stat.h>
-#include <sys/swap.h>]],
-                                [[
-                                int num = swapctl(0, NULL,0);
-                                ]]
-                        ),
+#include <sys/swap.h>
+]],
+[[
+int num = swapctl(0, NULL, 0);
+]]
+                        )],
                         [c_cv_have_swapctl_three_args="yes"],
                         [c_cv_have_swapctl_three_args="no"]
                 )
@@ -1114,15 +1117,17 @@ if test "x$have_getmntent" = "xc"; then
        AC_CACHE_CHECK([whether getmntent takes one argument],
                [c_cv_have_one_getmntent],
                AC_COMPILE_IFELSE(
-                       AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
-#include "$srcdir/src/utils_mount.h"]],
-                               [[
-                                FILE *fh;
-                                struct mntent *me;
-                                fh = setmntent ("/etc/mtab", "r");
-                                me = getmntent (fh);
-                               ]]
-                       ),
+                       [AC_LANG_PROGRAM(
+[[
+#include "$srcdir/src/utils_mount.h"
+]],
+[[
+FILE *fh;
+struct mntent *me;
+fh = setmntent ("/etc/mtab", "r");
+me = getmntent (fh);
+]]
+                       )],
                        [c_cv_have_one_getmntent="yes"],
                        [c_cv_have_one_getmntent="no"]
                )
@@ -1130,16 +1135,18 @@ if test "x$have_getmntent" = "xc"; then
        AC_CACHE_CHECK([whether getmntent takes two arguments],
                [c_cv_have_two_getmntent],
                AC_COMPILE_IFELSE(
-                       AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
-#include "$srcdir/src/utils_mount.h"]],
-                               [[
+                       [AC_LANG_PROGRAM(
+[[
+#include "$srcdir/src/utils_mount.h"
+]],
+[[
                                 FILE *fh;
                                 struct mnttab mt;
                                 int status;
                                 fh = fopen ("/etc/mnttab", "r");
                                 status = getmntent (fh, &mt);
-                               ]]
-                       ),
+]]
+                       )],
                        [c_cv_have_two_getmntent="yes"],
                        [c_cv_have_two_getmntent="no"]
                )
@@ -1228,7 +1235,6 @@ AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct
                have_struct_kinfo_proc_freebsd="no"
        ],
        [
-AC_INCLUDES_DEFAULT
 #include <kvm.h>
 #include <sys/param.h>
 #include <sys/sysctl.h>
@@ -1245,7 +1251,6 @@ AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
                have_struct_kinfo_proc_openbsd="no"
        ],
        [
-AC_INCLUDES_DEFAULT
 #include <sys/param.h>
 #include <sys/sysctl.h>
 #include <kvm.h>
@@ -2467,35 +2472,36 @@ then
 #include <sys/socket.h>])
 
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                           [
-                            #include <stdio.h>
-                            #include <sys/types.h>
-                            #include <asm/types.h>
-                            #include <sys/socket.h>
-                            #include <linux/netlink.h>
-                            #include <linux/rtnetlink.h>
-                            ], [
-                                int retval = TCA_STATS2;
-                                return (retval);
-                                ]
-                            )],
-                            [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
-
-       AC_COMPILE_IFELSE(
-[#include <stdio.h>
+[[
+#include <stdio.h>
 #include <sys/types.h>
 #include <asm/types.h>
 #include <sys/socket.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
+]],
+[[
+int retval = TCA_STATS2;
+return (retval);
+]]
+       )],
+       [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
 
-int main (void)
-{
-       int retval = TCA_STATS;
-       return (retval);
-}],
-       [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
-       []);
+       AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
+#include <stdio.h>
+#include <sys/types.h>
+#include <asm/types.h>
+#include <sys/socket.h>
+#include <linux/netlink.h>
+#include <linux/rtnetlink.h>
+]],
+[[
+int retval = TCA_STATS;
+return (retval);
+]]
+       )],
+       [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
 
        CFLAGS="$SAVE_CFLAGS"
 fi
@@ -2515,8 +2521,9 @@ then
                [if function 'rtnl_dump_filter' expects five arguments],
                [c_cv_rtnl_dump_filter_five_args],
                AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                               [
-AC_INCLUDES_DEFAULT
+[[
+#include <stdio.h>
+#include <sys/types.h>
 #include <asm/types.h>
 #include <sys/socket.h>
 #if HAVE_LIBNETLINK_H
@@ -2526,24 +2533,25 @@ AC_INCLUDES_DEFAULT
 #elif HAVE_LINUX_LIBNETLINK_H
 # include <linux/libnetlink.h>
 #endif
-                               ],
-                               [
+]],
+[[
 if (rtnl_dump_filter(NULL, NULL, NULL, NULL, NULL))
        return 1;
 return 0;
-                               ]
-                       )],
-                       [c_cv_rtnl_dump_filter_five_args="yes"],
-                       [c_cv_rtnl_dump_filter_five_args="no"]
-               )
+]]
+       )],
+       [c_cv_rtnl_dump_filter_five_args="yes"],
+       [c_cv_rtnl_dump_filter_five_args="no"]
        )
+)
 
        AC_CACHE_CHECK(
                [if function 'rtnl_dump_filter' expects three arguments],
                [c_cv_rtnl_dump_filter_three_args],
                AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-                               [
-AC_INCLUDES_DEFAULT
+[[
+#include <stdio.h>
+#include <sys/types.h>
 #include <asm/types.h>
 #include <sys/socket.h>
 #if HAVE_LIBNETLINK_H
@@ -2553,17 +2561,17 @@ AC_INCLUDES_DEFAULT
 #elif HAVE_LINUX_LIBNETLINK_H
 # include <linux/libnetlink.h>
 #endif
-                               ],
-                               [
+]],
+[[
 if (rtnl_dump_filter(NULL, NULL, NULL))
        return 1;
 return 0;
-                               ]
-                       )],
-                       [c_cv_rtnl_dump_filter_three_args="yes"],
-                       [c_cv_rtnl_dump_filter_three_args="no"]
-               )
+]]
+       )],
+       [c_cv_rtnl_dump_filter_three_args="yes"],
+       [c_cv_rtnl_dump_filter_three_args="no"]
        )
+)
 
        CFLAGS="$SAVE_CFLAGS"