-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Ineiev on 3/21/2008 12:21 AM: | --- Ralf Wildenhues <Ralf.Wildenhues@xxxxxx> wrote: |> For example: |> |> # We temporarily set cross-compile mode to force AC_COMPUTE_INT |> # to use the slow link-only method |> save_cross_compiling=$cross_compiling |> AC_COMPUTE_INT([...]) |> cross_compiling=$save_cross_compiling | | Thank you. | | Or there is another manual documenting this? Thanks for the suggestion. I'm adding this (the fixed version) to the manual. I would like to add attribution in THANKS; would you prefer something longer than "Ineiev" as your name? - -- Don't work too hard, make some time for fun as well! Eric Blake ebb9@xxxxxxx -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfkDH8ACgkQ84KuGfSFAYDdEACeIgSFS59DAqtAWPcff48FWTy+ s+UAmwXpecSoDptW28l4ouvzyedNFIQM =lVWj -----END PGP SIGNATURE-----
>From 339f0dc22e16124b3ef27bff5ea5668b31d4ff20 Mon Sep 17 00:00:00 2001 From: Eric Blake <ebb9@xxxxxxx> Date: Fri, 21 Mar 2008 13:27:01 -0600 Subject: [PATCH] Document more uses of $cross_compiling. * doc/autoconf.texi (Runtime): Document that a temporary override is permissible. * THANKS: Update. Reported by Ineiev, example by Ralf Wildenhues. Signed-off-by: Eric Blake <ebb9@xxxxxxx> --- ChangeLog | 6 ++++++ doc/autoconf.texi | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 97e8ddc..ef48fbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-03-21 Eric Blake <ebb9@xxxxxxx> + Document more uses of $cross_compiling. + * doc/autoconf.texi (Runtime): Document that a temporary override + is permissible. + * THANKS: Update. + Reported by Ineiev, example by Ralf Wildenhues. + Don't swallow $1 in textual local variables. * lib/m4sugar/m4sugar.m4 (m4_combine): Don't use overquoting and expansion of text arguments, as that swallows $1. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 0710397..a32e779 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8371,6 +8371,21 @@ you can test whether the shell variable @code{cross_compiling} is set to @samp{yes}, and then use an alternate method to get the results instead of calling the macros. +It is also permissible to temporarily assign to @code{cross_compiling} +in order to force tests to behave as though they are in a +cross-compilation environment, particularly since this provides a way to +test your @var{action-if-cross-compiling} even when you are not using a +cross-compiler. + +@example +# We temporarily set cross-compile mode to force AC_COMPUTE_INT +# to use the slow link-only method +save_cross_compiling=$cross_compiling +cross_compiling=yes +AC_COMPUTE_INT([@dots{}]) +cross_compiling=$save_cross_compiling +@end example + A C or C++ runtime test should be portable. @xref{Portable C and C++}. -- 1.5.4
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf