diff options
Diffstat (limited to 'mk/Autoconf.mk')
-rw-r--r-- | mk/Autoconf.mk | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/mk/Autoconf.mk b/mk/Autoconf.mk index 65cd915..27eeb32 100644 --- a/mk/Autoconf.mk +++ b/mk/Autoconf.mk @@ -47,6 +47,11 @@ ac_uname = $(shell \ $(call ac_s_cmd,uname -s | tr 'A-Z' 'a-z');\ $(call ac_fini)) +ac_uname_arch = $(shell \ + $(call ac_init,for arch);\ + $(call ac_s_cmd,uname -m | tr 'A-Z' 'a-z');\ + $(call ac_fini)) + # check for some header file # args: header file ac_header = $(shell \ @@ -97,9 +102,14 @@ ac_binary = $(shell \ $(call ac_fini)) # check if lib64 is used +#ac_lib64 = $(shell \ +# $(call ac_init,for libdir name);\ +# $(call ac_s_cmd,$(CC) -print-search-dirs | grep -q lib64 &&\ +# echo "lib64" || echo "lib");\ +# $(call ac_fini)) ac_lib64 = $(shell \ $(call ac_init,for libdir name);\ - $(call ac_s_cmd,$(CC) -print-search-dirs | grep -q lib64 &&\ + $(call ac_s_cmd,/sbin/ldconfig -p | grep -q lib64 &&\ echo "lib64" || echo "lib");\ $(call ac_fini)) @@ -122,6 +132,13 @@ ac_pkg_config = $(shell \ $(call ac_b_cmd, pkg-config $(1));\ $(call ac_fini)) +# grep some file +# args: regex, file +ac_grep = $(shell \ + $(call ac_init,for $(1) in $(2));\ + $(call ac_b_cmd, grep -q $(1) $(2));\ + $(call ac_fini)) + ######################################################################## # build Make.config |