summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-10-28 00:09:40 -0400
committermidipix <writeonce@midipix.org>2016-11-10 23:35:23 -0500
commit92e39b26fa901193ca392b332401debe026ef5c1 (patch)
tree1b0768d4d40af3c9e9c2bdd1b94b722e7a1b607a
parentafc8efbc127c28e996fd77f1dc4b388afb08b7fe (diff)
downloadperk-92e39b26fa901193ca392b332401debe026ef5c1.tar.bz2
perk-92e39b26fa901193ca392b332401debe026ef5c1.tar.xz
build system: remove dependency on compiler support of the --include switch.
-rwxr-xr-xsysinfo/host/host.sh12
1 files changed, 6 insertions, 6 deletions
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 <sys/$mb_header>" | $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 <machine/$mb_header>" | $mb_compiler $mb_cflags \
+ -E - > /dev/null 2>/dev/null \
&& mb_hosthdr='machine/'$mb_header
if [ x"$mb_hosthdr" = x ]; then