From ef3e165050891997ae1564a58ea1992d1d77dd2b Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 22 Mar 2013 21:55:02 +0100 Subject: [PATCH] configure.in: Quote AC_LANG_PROGRAM and remove AC_INCLUDES_DEFAULT. The latter isn't expanded anymore when quoted. There's no easy way around this :\ --- configure.in | 148 +++++++++++++++++++++++++++++++---------------------------- 1 file changed, 78 insertions(+), 70 deletions(-) diff --git a/configure.in b/configure.in index 70db3d53..7f4b0752 100644 --- a/configure.in +++ b/configure.in @@ -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 -#include ]], - [[ - int num = swapctl(0, NULL); - ]] - ), +#include +]], +[[ +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 -#include ]], - [[ - int num = swapctl(0, NULL,0); - ]] - ), +#include +]], +[[ +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 #include #include @@ -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 #include #include @@ -2467,35 +2472,36 @@ then #include ]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [ - #include - #include - #include - #include - #include - #include - ], [ - int retval = TCA_STATS2; - return (retval); - ] - )], - [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])]) - - AC_COMPILE_IFELSE( -[#include +[[ +#include #include #include #include #include #include +]], +[[ +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 +#include +#include +#include +#include +#include +]], +[[ +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 +#include #include #include #if HAVE_LIBNETLINK_H @@ -2526,24 +2533,25 @@ AC_INCLUDES_DEFAULT #elif HAVE_LINUX_LIBNETLINK_H # include #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 +#include #include #include #if HAVE_LIBNETLINK_H @@ -2553,17 +2561,17 @@ AC_INCLUDES_DEFAULT #elif HAVE_LINUX_LIBNETLINK_H # include #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" -- 2.11.0