From 92e39b26fa901193ca392b332401debe026ef5c1 Mon Sep 17 00:00:00 2001 From: midipix Date: Nov 11 2016 04:35:23 +0000 Subject: build system: remove dependency on compiler support of the --include switch. --- diff --git a/sysinfo/host/host.sh b/sysinfo/host/host.sh index 2d1439e..5d963c9 100755 --- a/sysinfo/host/host.sh +++ b/sysinfo/host/host.sh @@ -27,19 +27,19 @@ host_endian_h() rm -f "$mb_hdrdir"/$mb_header # portable - $mb_compiler $mb_cflags \ - --include=$mb_header -E - < /dev/null > /dev/null 2>/dev/null \ + printf "#include <$mb_header>" | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && return 0 # non-portable mb_hosthdr= - [ -z $mb_hosthdr ] && $mb_compiler $mb_cflags \ - --include='sys/'$mb_header -E - < /dev/null > /dev/null 2>/dev/null \ + [ -z $mb_hosthdr ] && printf "#include " | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && mb_hosthdr='sys/'$mb_header - [ -z $mb_hosthdr ] && $mb_compiler $mb_cflags \ - --include='machine/'$mb_header -E - < /dev/null > /dev/null 2>/dev/null \ + [ -z $mb_hosthdr ] && printf "#include " | $mb_compiler $mb_cflags \ + -E - > /dev/null 2>/dev/null \ && mb_hosthdr='machine/'$mb_header if [ x"$mb_hosthdr" = x ]; then