]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD
authorMarc Dionne <marc.c.dionne@gmail.com>
Sat, 29 Jan 2011 00:03:39 +0000 (19:03 -0500)
committerRuss Allbery <rra@debian.org>
Mon, 28 Feb 2011 23:58:11 +0000 (15:58 -0800)
Some linux autoconf tests require particular compile flags such as
-Werror.  Add a parameter to the AC_CHECK_LINUX_BUILD macro that
lets the caller pass in any needed special flags.

Reviewed-on: http://gerrit.openafs.org/3769
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ca38c9546e323b59189670b80740510fb9ec5269)

Change-Id: I8798e103b2aff77b87684b7fce56c730f0a74b8b
[andersk@mit.edu: Remove modifications of existing tests]
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
(cherry picked from commit a9ca625ba761d28a54bf817438cb9d42eb421672)

src/cf/linux-test1.m4
src/cf/linux-test4.m4

index 3115cdb6552aeb9c8dbdf7f0a58279ee5432370b..97a520fd59a48f003547f16acd058a5ade9cca28 100644 (file)
@@ -85,13 +85,16 @@ AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [
     CPPFLAGS="$save_CPPFLAGS"
     AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)])
 
-dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define])
+dnl AC_CHECK_LINUX_BUILD([msg], [var], [includes], [code], [define], [CFLAGS])
 AC_DEFUN([AC_CHECK_LINUX_BUILD],
  [AS_VAR_PUSHDEF([ac_linux_build], [$2])dnl
   AC_CACHE_CHECK([$1], [ac_linux_build],
-   [AC_TRY_KBUILD([$3], [$4],
+   [save_CPPFLAGS="$CPPFLAGS"
+     CPPFLAGS="$CPPFLAGS $7"
+     AC_TRY_KBUILD([$3], [$4],
                  AS_VAR_SET([ac_linux_build], [yes]),
                  AS_VAR_SET([ac_linux_build], [no]))
+     CPPFLAGS="$save_CPPFLAGS"
    ])
   AS_IF([test AS_VAR_GET([ac_linux_build]) = yes],
         [AC_DEFINE([$5],1,[$6])])
index 3f22f7a0dc3d5cdd9f5899f70e83e7675f399147..67ddf913fcc33214139b837d6352187e89e1a018 100644 (file)
@@ -684,7 +684,8 @@ struct dentry _dentry;
 struct nameidata _nameidata;
 (void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
                       [IOP_PERMISSION_TAKES_NAMEIDATA],
-                      [define if your iops.permission takes a nameidata argument])
+                      [define if your iops.permission takes a nameidata argument],
+                      [])
 ])