diff options
author | obache <obache@pkgsrc.org> | 2013-11-26 07:25:53 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-11-26 07:25:53 +0000 |
commit | 57a2144056e8ab7a823238f7050d64a88694b0e7 (patch) | |
tree | 1cf09328e8399443fec3a9b602175b349f732a48 /mk/endian.mk | |
parent | 64f231907a0f0572445f5801b9c683930a5abea7 (diff) | |
download | pkgsrc-57a2144056e8ab7a823238f7050d64a88694b0e7.tar.gz |
Use find-headers.mk to detect available endian.h.
Diffstat (limited to 'mk/endian.mk')
-rw-r--r-- | mk/endian.mk | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/mk/endian.mk b/mk/endian.mk index f40b8f10bb6..16c0efc8821 100644 --- a/mk/endian.mk +++ b/mk/endian.mk @@ -1,4 +1,4 @@ -# $NetBSD: endian.mk,v 1.8 2013/11/07 05:12:24 obache Exp $ +# $NetBSD: endian.mk,v 1.9 2013/11/26 07:25:53 obache Exp $ # # Determine the endianness of the platform by checking header files. # @@ -19,15 +19,11 @@ .include "../../mk/compiler.mk" .if !defined(MACHINE_ENDIAN) -. if exists(/usr/include/endian.h) -_ENDIAN_H= endian.h # Linux -. elif exists(/usr/include/sys/endian.h) -_ENDIAN_H= sys/endian.h # NetBSD>=1.5 -. elif exists(/usr/include/machine/endian.h) -_ENDIAN_H= machine/endian.h # NetBSD<1.5 -. elif exists(/usr/include/sys/byteorder.h) -_ENDIAN_H= sys/byteorder.h # Solaris -. else +BUILTIN_FIND_HEADERS_VAR:= _ENDIAN_H +BUILTIN_FIND_HEADERS.ENDIAN_H= endian.h sys/endian.h machine/endian.h \ + sys/byteorder.h +.include "../../mk/buildlink3/find-headers.mk" +. if !empty(_ENDIAN_H:M__nonexistent__) _ENDIAN_H= /dev/null . endif |