------- Comment #5 from bonzini at gnu dot org 2009-10-24 09:59 ------- I agree with Andrew, but as a middle way you could put something like this in config/elf.m4:
dnl usage: ACX_ELF_TARGET_IFELSE([if-elf], [if-not-elf]) AC_DEFUN([ACX_ELF_TARGET_IFELSE]), [ AC_REQUIRE([AC_CANONICAL_TARGET]) target_elf=no case $target in ...) target_elf=yes;; esac AS_IF([test $target_elf = yes], [$1], [$2]) ]) and use the macro in the toplevel. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41529