summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2013-11-23 12:35:39 +0000
committerobache <obache@pkgsrc.org>2013-11-23 12:35:39 +0000
commit8caed5505d7ce3066adbb94b8788b8ca7335c84f (patch)
tree1660a4b739de6a1d9b3da4dcb5798a26f86dd512 /mk
parentb46a4d823fdc18d5057c305d339844ce8d2f56e2 (diff)
downloadpkgsrc-8caed5505d7ce3066adbb94b8788b8ca7335c84f.tar.gz
Let to find ${X11BASE}/include additionally for the case ${X11_TYPE}==native.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink3/find-headers.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/mk/buildlink3/find-headers.mk b/mk/buildlink3/find-headers.mk
index bf3342500ac..aff1ae96e35 100644
--- a/mk/buildlink3/find-headers.mk
+++ b/mk/buildlink3/find-headers.mk
@@ -1,4 +1,4 @@
-# $NetBSD: find-headers.mk,v 1.1 2013/11/23 09:06:09 obache Exp $
+# $NetBSD: find-headers.mk,v 1.2 2013/11/23 12:35:39 obache Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -46,7 +46,7 @@
# "found".
#
# BUILTIN_FIND_HEADERS.<var> is the list of header files to find, in
-# order, on the ${COMPILER_INCLUDE_DIRS}. The variable <var> is set
+# order, on the ${BUILTIN_INCLUDE_DIRS}. The variable <var> is set
# to the first path "found" on the filesystem.
#
# Optionally, the following variables may also be defined:
@@ -60,7 +60,7 @@
#
# <var> is the first of the header file listed in
# ${BUILTIN_FIND_HEADERS.<var>} that is "found" in
-# ${COMPILER_INCLUDE_DIRS}, or else it is "__nonexistent__".
+# ${BUILTIN_INCLUDE_DIRS}, or else it is "__nonexistent__".
#
# An example use is:
#
@@ -80,11 +80,13 @@ USE_TOOLS+= echo
USE_TOOLS+= grep
.endif
+BUILTIN_INCLUDE_DIRS?= ${COMPILER_INCLUDE_DIRS} ${"${X11_TYPE:Mnative}":?${X11BASE}/include:}
+
.for _var_ in ${BUILTIN_FIND_HEADERS_VAR}
. if !defined(${_var_})
${_var_}= __nonexistent__
. for _file_ in ${BUILTIN_FIND_HEADERS.${_var_}}
-. for _dir_ in ${COMPILER_INCLUDE_DIRS}
+. for _dir_ in ${BUILTIN_INCLUDE_DIRS}
. if !empty(${_var_}:M__nonexistent__) && exists(${_dir_}/${_file_})
. if !defined(BUILTIN_FIND_GREP.${_var_})
${_var_}= ${_dir_}/${_file_}