build-sys: Really fix composefs check
authorColin Walters <walters@verbum.org>
Thu, 24 Aug 2023 23:48:22 +0000 (19:48 -0400)
committerColin Walters <walters@verbum.org>
Thu, 24 Aug 2023 23:58:20 +0000 (19:58 -0400)
The ordering of the includes apparently matters...and I didn't
actually check that the previous change enables composefs on c9s.
But I did now.  For reals.

While we have the patient open, I switched to `AC_LANG_PROGRAM`
because I originally thought the bug had something to do with that.
As far as I understand, more cleanly separating the includes
from the injected body text is a useful thing in `AC_LANG_PROGRAM`.

configure.ac

index 20f9e4ed3a30fc900f1636f36afa11c4e8d4678b..a98736ebced5a9abbbd937f91d5c01f6ab3e8016 100644 (file)
@@ -277,11 +277,11 @@ AM_CONDITIONAL(USE_GPGME, test "x$have_gpgme" = xyes)
 dnl composefs won't work at all without this
 AC_MSG_CHECKING([for MOUNT_ATTR_IDMAP])
 AC_COMPILE_IFELSE(
-       [AC_LANG_SOURCE([[
-                       #include <linux/mount.h>
+       [AC_LANG_PROGRAM([
                        #include <sys/mount.h>
-      int foo = MOUNT_ATTR_IDMAP;
-       ]])],
+                       #include <linux/mount.h>
+  ],[int foo = MOUNT_ATTR_IDMAP;]
+       )],
        [AC_MSG_RESULT(yes)
         have_mount_attr_idmap=yes],
        [AC_MSG_RESULT(no)])