merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / pkg_config.mk
blob4c04de5b5520366bb7530794f04eb5983642c647
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: pkg_config.mk,v $
11 # $Revision: 1.7 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 .INCLUDE .IGNORE : pkgroot.mk
34 .IF "$(PKGCONFIG_ROOT)"!=""
35 PKG_CONFIG=$(PKGCONFIG_ROOT)/bin/pkg-config
36 .IF "$(OS)"=="SOLARIS" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
37 PKG_CONFIG_PATH:=$(PKGCONFIG_ROOT)/lib/64/pkgconfig
38 .ELSE
39 PKG_CONFIG_PATH:=$(PKGCONFIG_ROOT)/lib/pkgconfig
40 .ENDIF
41 .EXPORT : PKG_CONFIG_PATH
42 PKGCONFIG_PREFIX=--define-variable=prefix=$(PKGCONFIG_ROOT)
43 .ELSE
44 PKG_CONFIG*=pkg-config
45 .IF "$(OS)"=="SOLARIS" && "$(CPUNAME)"=="SPARC" && "$(CPU)"=="U"
46 PKG_CONFIG_PATH=/usr/lib/64/pkgconfig
47 .EXPORT : PKG_CONFIG_PATH
48 .ENDIF
49 .ENDIF
51 PKGCONFIG_CFLAGS:=$(shell @$(PKG_CONFIG) $(PKGCONFIG_PREFIX) --cflags $(PKGCONFIG_MODULES))
52 PKGCONFIG_LIBS:=$(shell @$(PKG_CONFIG) $(PKGCONFIG_PREFIX) --libs $(PKGCONFIG_MODULES))
53 CFLAGS+=$(PKGCONFIG_CFLAGS)