Add files from parent branch HEAD:
[pkgsrc.git] / mk / x11.buildlink3.mk
1 # $NetBSD: x11.buildlink3.mk,v 1.10 2007/10/09 19:19:12 martti Exp $
2 #
3 # This file should only be included from the buildlink3.mk files from
4 # the modular Xorg packages and only in the case that the native X11
5 # distribution should be used.
6 #
7
8 X11_BUILDLINK3_MK:=     ${X11_BUILDLINK3_MK}+
9
10 .if !defined(_X11_BUILDLINK3_MK)
11 _X11_BUILDLINK3_MK=     1
12
13 USE_X11=        yes
14
15 .  include "../../mk/bsd.prefs.mk"
16
17 #
18 # Sanity checks.
19 #
20
21 .  if ${X11_TYPE} != "native"
22 _WRONG_X11_TYPE:=       ${X11_TYPE}
23 PKG_FAIL_REASON+=       "Do not include x11.buildlink3.mk for X11_TYPE != \"native\"."
24 X11_TYPE:=              native
25 X11BASE:=               /usr
26 .  endif
27
28 .  include "../../mk/x11.version.mk"
29
30 .  if defined(GNU_CONFIGURE)
31 CONFIGURE_ARGS+=        --x-includes=${X11BASE:Q}/include
32 CONFIGURE_ARGS+=        --x-libraries=${X11BASE:Q}/lib${LIBABISUFFIX:Q}
33 .  endif
34
35 X11_LDFLAGS+=   ${COMPILER_RPATH_FLAG}${X11BASE}/lib${LIBABISUFFIX}
36 X11_LDFLAGS+=   -L${X11BASE}/lib${LIBABISUFFIX}
37 .endif  # _X11_BUILDLINK3_MK
38
39 .include "${X11_PKGSRCDIR.${X11_TYPE}}/buildlink3.mk"
40
41 X11_BUILDLINK3_MK:=     ${X11_BUILDLINK3_MK:S/+$//}