From: Enrico Scholz Date: Mon, 13 Oct 2003 19:50:29 +0000 (+0000) Subject: initial checkin X-Git-Tag: VERSION_0_10~1272 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2749c05871732467c837eac83c3538a55926e594;p=util-vserver.git initial checkin git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@89 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/util-vserver/m4/pkgconfig.am b/util-vserver/m4/pkgconfig.am new file mode 100644 index 0000000..c864288 --- /dev/null +++ b/util-vserver/m4/pkgconfig.am @@ -0,0 +1,55 @@ +## $Id$ ---*- makefile -*--- + +## Copyright (C) 2002 Enrico Scholz +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +## + +BAD_INC_PATHS = /usr/include|/usr/local/include +BAD_LIB_PATHS = /usr/lib + +pkgconfdir = $(libdir)/pkgconfig +pkgconf_DATA = $(addsuffix .pc, $(PKGCONFIG_FILES)) + +CLEANFILES += $(addsuffix .pc, $(PKGCONFIG_FILES)) +EXTRA_DIST += $(addsuffix .pc.subst, $(PKGCONFIG_FILES)) + + +%.pc: %.pc.subst Makefile + rm -f $@ + @case '$(libdir)' in \ + $(BAD_LIB_PATHS)) libflags=;; \ + *) libflags='-L$${libdir} ';; \ + esac; \ + case '$(pkgincludedir)' in \ + $(BAD_INC_PATHS)) pkgincflags=;; \ + *) pkgincflags='-I$${pkgincludedir} ';; \ + esac; \ + case '$(includedir)' in \ + $(BAD_INC_PATHS)) incflags=;; \ + *) incflags='-I$${includedir} ';; \ + esac; \ + sed -e 's!@'PACKAGE'@!$(PACKAGE)!g; \ + s!@'VERSION'@!$(VERSION)!g; \ + s!@'prefix'@!$(prefix)!g; \ + s!@'exec_prefix'@!$(exec_prefix)!g; \ + s!@'libdir'@!$(libdir)!g; \ + s!@'includedir'@!$(includedir)!g; \ + s!@'libflags"@!$${libflags}$(pkgconf_LIBFLAGS)!g;"' \ + s!@'incflags"@!$${incflags}$(pkgconf_INCFLAGS)!g;"' \ + s!@'pkgincflags"@!$${pkgincflags}$(pkgconf_PKGINCFLAGS)!g;"' \ + s!@'pkgincludedir'@!$(pkgincludedir)!g' \ + $< >$@ + test -z "$(CHMOD_REFERENCE)" || $(CHMOD_REFERENCE) '$<' '$@' + chmod a-w $@