summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rw-r--r--check/Makefile.am69
-rw-r--r--check/Makefile.in157
-rwxr-xr-xcheck/check-cflags22
-rwxr-xr-xcheck/check-circular-requires8
-rwxr-xr-xcheck/check-cmd-options17
-rwxr-xr-xcheck/check-conflicts4
-rwxr-xr-xcheck/check-debug22
-rwxr-xr-xcheck/check-define-variable15
-rwxr-xr-xcheck/check-duplicate-flags15
-rwxr-xr-xcheck/check-gtk59
-rwxr-xr-xcheck/check-idirafter4
-rwxr-xr-xcheck/check-includedir4
-rwxr-xr-xcheck/check-libs50
-rwxr-xr-xcheck/check-libs-private4
-rwxr-xr-xcheck/check-missing57
-rwxr-xr-xcheck/check-mixed-flags79
-rwxr-xr-xcheck/check-non-l-flags13
-rwxr-xr-xcheck/check-path22
-rwxr-xr-xcheck/check-print-options60
-rwxr-xr-xcheck/check-requires-private29
-rwxr-xr-xcheck/check-requires-version17
-rwxr-xr-xcheck/check-sort-order194
-rwxr-xr-xcheck/check-sysroot27
-rw-r--r--check/check-tilde13
-rwxr-xr-xcheck/check-uninstalled46
-rwxr-xr-xcheck/check-version67
-rwxr-xr-xcheck/check-whitespace8
-rw-r--r--check/circular-1.pc11
-rw-r--r--check/circular-2.pc11
-rw-r--r--check/circular-3.pc11
-rw-r--r--check/common10
-rw-r--r--check/config.sh.in12
-rw-r--r--check/flag-dup-1.pc10
-rw-r--r--check/flag-dup-2.pc11
-rw-r--r--check/gtk/atk.pc11
-rw-r--r--check/gtk/cairo-gobject.pc12
-rw-r--r--check/gtk/cairo.pc13
-rw-r--r--check/gtk/fontconfig.pc11
-rw-r--r--check/gtk/freetype2.pc12
-rw-r--r--check/gtk/gdk-3.0.pc12
-rw-r--r--check/gtk/gdk-pixbuf-2.0.pc19
-rw-r--r--check/gtk/gio-2.0.pc15
-rw-r--r--check/gtk/glib-2.0.pc15
-rw-r--r--check/gtk/gmodule-no-export-2.0.pc14
-rw-r--r--check/gtk/gobject-2.0.pc12
-rw-r--r--check/gtk/gthread-2.0.pc11
-rw-r--r--check/gtk/gtk+-3.0.pc15
-rw-r--r--check/gtk/kbproto.pc9
-rw-r--r--check/gtk/libpng.pc11
-rw-r--r--check/gtk/libpng12.pc11
-rw-r--r--check/gtk/pango.pc13
-rw-r--r--check/gtk/pangocairo.pc11
-rw-r--r--check/gtk/pangoft2.pc11
-rw-r--r--check/gtk/pixman-1.pc11
-rw-r--r--check/gtk/renderproto.pc9
-rw-r--r--check/gtk/x11.pc15
-rw-r--r--check/gtk/xau.pc11
-rw-r--r--check/gtk/xcb.pc13
-rw-r--r--check/gtk/xproto.pc10
-rw-r--r--check/gtk/xrender.pc12
-rw-r--r--check/inst-uninstalled.pc11
-rw-r--r--check/inst.pc11
-rw-r--r--check/no-variables.pc3
-rw-r--r--check/non-l-required.pc5
-rw-r--r--check/non-l.pc6
-rw-r--r--check/other.pc10
-rw-r--r--check/public-dep.pc1
-rw-r--r--check/requires-test.pc4
-rw-r--r--check/requires-version-1.pc4
-rw-r--r--check/requires-version-2.pc5
-rw-r--r--check/requires-version-3.pc5
-rw-r--r--check/sort-order-1-1.pc10
-rw-r--r--check/sort-order-1-2.pc10
-rw-r--r--check/sort-order-1-3.pc11
-rw-r--r--check/sort/sort-order-2-1.pc11
-rw-r--r--check/sort/sort-order-2-2.pc11
-rw-r--r--check/sort/sort-order-2-3.pc11
-rw-r--r--check/sort/sort/sort-order-3-1.pc11
-rw-r--r--check/sort/sort/sort-order-3-2.pc11
-rw-r--r--check/sort/sort/sort-order-3-3.pc10
-rw-r--r--check/sub/sub1.pc5
-rw-r--r--check/sub/sub2.pc5
-rw-r--r--check/tilde.pc5
83 files changed, 1487 insertions, 166 deletions
diff --git a/check/Makefile.am b/check/Makefile.am
index 607d845..30a527c 100644
--- a/check/Makefile.am
+++ b/check/Makefile.am
@@ -4,16 +4,29 @@ TESTS_ENVIRONMENT = PKG_CONFIG='$(TESTS_PKG_CONFIG)' $(TESTS_SHELL)
TESTS = \
check-cflags \
check-libs \
+ check-mixed-flags \
+ check-non-l-flags \
check-define-variable \
check-libs-private \
check-requires-private \
+ check-circular-requires \
check-includedir \
check-conflicts \
check-missing \
check-idirafter \
+ check-sort-order \
+ check-duplicate-flags \
check-whitespace \
check-cmd-options \
- check-version
+ check-version \
+ check-requires-version \
+ check-print-options \
+ check-path \
+ check-sysroot \
+ check-uninstalled \
+ check-debug \
+ check-gtk \
+ check-tilde
EXTRA_DIST = \
$(TESTS) \
@@ -28,4 +41,56 @@ EXTRA_DIST = \
idirafter.pc \
conflicts-test.pc \
whitespace.pc \
- fields-blank.pc
+ fields-blank.pc \
+ sub/sub1.pc \
+ sub/sub2.pc \
+ inst.pc \
+ inst-uninstalled.pc \
+ other.pc \
+ requires-version-1.pc \
+ requires-version-2.pc \
+ requires-version-3.pc \
+ non-l.pc \
+ non-l-required.pc \
+ circular-1.pc \
+ circular-2.pc \
+ circular-3.pc \
+ no-variables.pc \
+ sort-order-1-1.pc \
+ sort/sort-order-2-1.pc \
+ sort/sort/sort-order-3-1.pc \
+ sort-order-1-2.pc \
+ sort/sort-order-2-2.pc \
+ sort/sort/sort-order-3-2.pc \
+ sort-order-1-3.pc \
+ sort/sort-order-2-3.pc \
+ sort/sort/sort-order-3-3.pc \
+ flag-dup-1.pc \
+ flag-dup-2.pc \
+ gtk/atk.pc \
+ gtk/cairo-gobject.pc \
+ gtk/cairo.pc \
+ gtk/fontconfig.pc \
+ gtk/freetype2.pc \
+ gtk/gdk-3.0.pc \
+ gtk/gdk-pixbuf-2.0.pc \
+ gtk/gio-2.0.pc \
+ gtk/glib-2.0.pc \
+ gtk/gmodule-no-export-2.0.pc \
+ gtk/gobject-2.0.pc \
+ gtk/gthread-2.0.pc \
+ gtk/gtk+-3.0.pc \
+ gtk/kbproto.pc \
+ gtk/libpng12.pc \
+ gtk/libpng.pc \
+ gtk/pangocairo.pc \
+ gtk/pangoft2.pc \
+ gtk/pango.pc \
+ gtk/pixman-1.pc \
+ gtk/renderproto.pc \
+ gtk/x11.pc \
+ gtk/xau.pc \
+ gtk/xcb.pc \
+ gtk/xproto.pc \
+ gtk/xrender.pc \
+ tilde.pc
diff --git a/check/Makefile.in b/check/Makefile.in
index 54953eb..4f6fab4 100644
--- a/check/Makefile.in
+++ b/check/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,6 +14,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -37,23 +53,36 @@ subdir = check
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.sh.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = config.sh
CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = $(am__tty_colors_dummy)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -80,6 +109,8 @@ ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
+GCOV = @GCOV@
+GCOV_CFLAGS = @GCOV_CFLAGS@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
@@ -94,6 +125,7 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
+LN = @LN@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
@@ -114,6 +146,8 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -184,16 +218,29 @@ TESTS_ENVIRONMENT = PKG_CONFIG='$(TESTS_PKG_CONFIG)' $(TESTS_SHELL)
TESTS = \
check-cflags \
check-libs \
+ check-mixed-flags \
+ check-non-l-flags \
check-define-variable \
check-libs-private \
check-requires-private \
+ check-circular-requires \
check-includedir \
check-conflicts \
check-missing \
check-idirafter \
+ check-sort-order \
+ check-duplicate-flags \
check-whitespace \
check-cmd-options \
- check-version
+ check-version \
+ check-requires-version \
+ check-print-options \
+ check-path \
+ check-sysroot \
+ check-uninstalled \
+ check-debug \
+ check-gtk \
+ check-tilde
EXTRA_DIST = \
$(TESTS) \
@@ -208,7 +255,59 @@ EXTRA_DIST = \
idirafter.pc \
conflicts-test.pc \
whitespace.pc \
- fields-blank.pc
+ fields-blank.pc \
+ sub/sub1.pc \
+ sub/sub2.pc \
+ inst.pc \
+ inst-uninstalled.pc \
+ other.pc \
+ requires-version-1.pc \
+ requires-version-2.pc \
+ requires-version-3.pc \
+ non-l.pc \
+ non-l-required.pc \
+ circular-1.pc \
+ circular-2.pc \
+ circular-3.pc \
+ no-variables.pc \
+ sort-order-1-1.pc \
+ sort/sort-order-2-1.pc \
+ sort/sort/sort-order-3-1.pc \
+ sort-order-1-2.pc \
+ sort/sort-order-2-2.pc \
+ sort/sort/sort-order-3-2.pc \
+ sort-order-1-3.pc \
+ sort/sort-order-2-3.pc \
+ sort/sort/sort-order-3-3.pc \
+ flag-dup-1.pc \
+ flag-dup-2.pc \
+ gtk/atk.pc \
+ gtk/cairo-gobject.pc \
+ gtk/cairo.pc \
+ gtk/fontconfig.pc \
+ gtk/freetype2.pc \
+ gtk/gdk-3.0.pc \
+ gtk/gdk-pixbuf-2.0.pc \
+ gtk/gio-2.0.pc \
+ gtk/glib-2.0.pc \
+ gtk/gmodule-no-export-2.0.pc \
+ gtk/gobject-2.0.pc \
+ gtk/gthread-2.0.pc \
+ gtk/gtk+-3.0.pc \
+ gtk/kbproto.pc \
+ gtk/libpng12.pc \
+ gtk/libpng.pc \
+ gtk/pangocairo.pc \
+ gtk/pangoft2.pc \
+ gtk/pango.pc \
+ gtk/pixman-1.pc \
+ gtk/renderproto.pc \
+ gtk/x11.pc \
+ gtk/xau.pc \
+ gtk/xcb.pc \
+ gtk/xproto.pc \
+ gtk/xrender.pc \
+ tilde.pc
all: all-am
@@ -257,6 +356,8 @@ TAGS:
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
@@ -268,7 +369,7 @@ check-TESTS: $(TESTS)
if test -f ./$$tst; then dir=./; \
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
- if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
@@ -339,14 +440,15 @@ check-TESTS: $(TESTS)
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
- echo "$$grn$$dashes"; \
+ col="$$grn"; \
else \
- echo "$$red$$dashes"; \
+ col="$$red"; \
fi; \
- echo "$$banner"; \
- test -z "$$skipped" || echo "$$skipped"; \
- test -z "$$report" || echo "$$report"; \
- echo "$$dashes$$std"; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
@@ -395,10 +497,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/check/check-cflags b/check/check-cflags
index f662687..033cf25 100755
--- a/check/check-cflags
+++ b/check/check-cflags
@@ -4,11 +4,25 @@ set -e
. ${srcdir}/common
-ARGS="--cflags simple"
RESULT=""
-run_test
+run_test --cflags simple
-ARGS="--cflags fields-blank"
RESULT=""
-run_test
+run_test --cflags fields-blank
+RESULT="-DOTHER -I/other/include"
+run_test --cflags other
+
+RESULT="-I/other/include"
+run_test --cflags-only-I other
+
+RESULT="-DOTHER"
+run_test --cflags-only-other other
+
+# Try various mixed combinations
+RESULT="-DOTHER -I/other/include"
+run_test --cflags-only-I --cflags-only-other other
+run_test --cflags-only-other --cflags-only-I other
+run_test --cflags --cflags-only-I --cflags-only-other other
+run_test --cflags --cflags-only-I other
+run_test --cflags --cflags-only-other other
diff --git a/check/check-circular-requires b/check/check-circular-requires
new file mode 100755
index 0000000..e77370c
--- /dev/null
+++ b/check/check-circular-requires
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+RESULT="-lcirc1 -lcirc2 -lcirc3"
+run_test --libs circular-1
diff --git a/check/check-cmd-options b/check/check-cmd-options
index 8b5ef4c..5f94cf1 100755
--- a/check/check-cmd-options
+++ b/check/check-cmd-options
@@ -4,25 +4,26 @@ set -e
. ${srcdir}/common
+# non-existent option should fail
+EXPECT_RETURN=1
+RESULT="Unknown option --blah"
+run_test --blah
+
# all of these should fail, but when '=' or ' ' aren't used consistently
# between the two options, broken popt sets the version to compare to be
# "a=b"
-ARGS="--define-variable=a=b --atleast-pkgconfig-version=999.999"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --define-variable=a=b --atleast-pkgconfig-version=999.999
-ARGS="--define-variable=a=b --atleast-pkgconfig-version 999.999"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --define-variable=a=b --atleast-pkgconfig-version 999.999
-ARGS="--define-variable a=b --atleast-pkgconfig-version 999.999"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --define-variable a=b --atleast-pkgconfig-version 999.999
-ARGS="--define-variable a=b --atleast-pkgconfig-version=999.999"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --define-variable a=b --atleast-pkgconfig-version=999.999
diff --git a/check/check-conflicts b/check/check-conflicts
index 7f160db..372c2a6 100755
--- a/check/check-conflicts
+++ b/check/check-conflicts
@@ -4,8 +4,6 @@ set -e
. ${srcdir}/common
-ARGS="--libs conflicts-test"
RESULT="-L/public-dep/lib -lpublic-dep"
-
-run_test
+run_test --libs conflicts-test
diff --git a/check/check-debug b/check/check-debug
new file mode 100755
index 0000000..5ee95f2
--- /dev/null
+++ b/check/check-debug
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+# Check that debug output works with minimal output. This is still much
+# more than desirable.
+
+RESULT="PKG_CONFIG_DEBUG_SPEW variable enabling debug spew
+Adding directory '$srcdir' from PKG_CONFIG_PATH
+Global variable definition 'pc_sysrootdir' = '/'
+Global variable definition 'pc_top_builddir' = '\$(top_builddir)'
+Error printing enabled by default due to use of output options besides --exists or --atleast/exact/max-version. Value of --silence-errors: 0
+Error printing enabled
+$PACKAGE_VERSION"
+PKG_CONFIG_DEBUG_SPEW=1 run_test --version
+
+RESULT="Error printing enabled by default due to use of output options besides --exists or --atleast/exact/max-version. Value of --silence-errors: 0
+Error printing enabled
+$PACKAGE_VERSION"
+run_test --debug --version
diff --git a/check/check-define-variable b/check/check-define-variable
index b0aaabd..1394f41 100755
--- a/check/check-define-variable
+++ b/check/check-define-variable
@@ -4,15 +4,22 @@ set -e
. ${srcdir}/common
+RESULT="-I/includedir/"
case ${MACHTYPE} in
*-msys)
# Make sure path doesn't get mangled on MSYS
- ARGS="--define-variable=includedir=\\/includedir/ --cflags simple"
+ run_test --define-variable=includedir=\\/includedir/ --cflags simple
;;
*)
- ARGS="--define-variable=includedir=/includedir/ --cflags simple"
+ run_test --define-variable=includedir=/includedir/ --cflags simple
;;
esac
-RESULT="-I/includedir/"
-run_test
+# Spaces before/after the variable name and value should be stripped
+RESULT="bar"
+run_test --define-variable=' foo = bar ' --variable=foo simple
+
+# Should fail when no value set
+EXPECT_RETURN=1
+RESULT="--define-variable argument does not have a value for the variable"
+run_test --define-variable=foo= --variable=foo simple
diff --git a/check/check-duplicate-flags b/check/check-duplicate-flags
new file mode 100755
index 0000000..110da5b
--- /dev/null
+++ b/check/check-duplicate-flags
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+RESULT="-DPATH2 -DFOO -DPATH1 -DFOO -I/path/include"
+run_test --cflags flag-dup-1 flag-dup-2
+run_test --cflags flag-dup-2 flag-dup-1
+
+RESULT="-L/path/lib -lpath2 -Wl,--whole-archive -lm --Wl,--no-whole-archive \
+-Xlinker -R -Xlinker /path/lib -lpath1 -Wl,--whole-archive -lm \
+--Wl,--no-whole-archive -Xlinker -R -Xlinker /path/lib"
+run_test --libs flag-dup-1 flag-dup-2
+run_test --libs flag-dup-2 flag-dup-1
diff --git a/check/check-gtk b/check/check-gtk
new file mode 100755
index 0000000..7fd01bb
--- /dev/null
+++ b/check/check-gtk
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+# Limit pkg-config files to gtk subdir
+PKG_CONFIG_LIBDIR=${srcdir}/gtk
+
+# Fetch Cflags of gtk+-3.0. Prior results to check for regressions.
+# pkg-config-0.21 - pkg-config-0.27.1
+# -DGSEAL_ENABLE -pthread -I/gtk/include/gtk-3.0 -I/gtk/include/atk-1.0 \
+# -I/gtk/include/cairo -I/gtk/include/gdk-pixbuf-2.0 -I/gtk/include/pango-1.0 \
+# -I/gtk/include/glib-2.0 -I/gtk/lib/glib-2.0/include -I/gtk/include/pixman-1 \
+# -I/gtk/include -I/gtk/include/freetype2
+RESULT="-DGSEAL_ENABLE -pthread -I/gtk/include/gtk-3.0 \
+-I/gtk/include/pango-1.0 -I/gtk/include/atk-1.0 -I/gtk/include/cairo \
+-I/gtk/include/pixman-1 -I/gtk/include -I/gtk/include/gdk-pixbuf-2.0 \
+-I/gtk/include -I/gtk/include/pango-1.0 -I/gtk/include/glib-2.0 \
+-I/gtk/lib/glib-2.0/include -I/gtk/include/freetype2 -I/gtk/include"
+run_test --cflags gtk+-3.0
+run_test --cflags --static gtk+-3.0
+
+# Fetch Libs of gtk+-3.0. Prior results to check for regressions.
+# pkg-config-0.21 - pkg-config-0.27.1
+# -pthread -L/gtk/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 \
+# -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lpango-1.0 \
+# -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt \
+# -lglib-2.0
+RESULT="-L/gtk/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 -lcairo-gobject \
+-lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 \
+-lgthread-2.0 -pthread -lrt -lgmodule-2.0 -pthread -lrt -lglib-2.0 -lfreetype \
+-lfontconfig"
+if [ "$list_indirect_deps" = no ]; then
+ run_test --libs gtk+-3.0
+fi
+
+# Fetch static Libs of gtk+-3.0. Prior results to check for regressions.
+# pkg-config-0.21
+# -pthread -L/gtk/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lresolv \
+# -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo \
+# -lpixman-1 -lXrender -lX11 -lpthread -lpng12 -lz -lm -lpango-1.0 \
+# -lfontconfig -lexpat -lfreetype -lgobject-2.0 -lffi -lgmodule-2.0 -ldl \
+# -lgthread-2.0 -lglib-2.0 -lrt
+# pkg-config-0.22 - pkg-config-0.27.1
+# -pthread -L/gtk/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lresolv \
+# -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo \
+# -lpixman-1 -lXrender -lX11 -lpthread -lxcb -lXau -lpng12 -lz -lm \
+# -lpango-1.0 -lfontconfig -lexpat -lfreetype -lgobject-2.0 -lffi \
+# -lgmodule-2.0 -ldl -lgthread-2.0 -lglib-2.0 -lrt
+RESULT="-L/gtk/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -latk-1.0 -lcairo-gobject \
+-lcairo -lz -lpixman-1 -lpng12 -lz -lm -lXrender -lX11 -lpthread -lxcb -lXau \
+-lgdk_pixbuf-2.0 -lm -lpng12 -lz -lm -lgio-2.0 -lz -lresolv -lpangoft2-1.0 \
+-lpango-1.0 -lgobject-2.0 -lffi -lgthread-2.0 -pthread -lrt -lgmodule-2.0 \
+-pthread -lrt -ldl -lglib-2.0 -lrt -lfreetype -lfontconfig -lexpat -lfreetype"
+if [ "$list_indirect_deps" = yes ]; then
+ run_test --libs gtk+-3.0
+fi
+run_test --libs --static gtk+-3.0
diff --git a/check/check-idirafter b/check/check-idirafter
index 439d799..a41d11e 100755
--- a/check/check-idirafter
+++ b/check/check-idirafter
@@ -4,7 +4,5 @@ set -e
. ${srcdir}/common
-ARGS="--cflags idirafter"
RESULT="-idirafter -I/after -I/foo -I/bar"
-
-run_test
+run_test --cflags idirafter
diff --git a/check/check-includedir b/check/check-includedir
index 26d8ab5..d05cd9d 100755
--- a/check/check-includedir
+++ b/check/check-includedir
@@ -4,7 +4,5 @@ set -e
. ${srcdir}/common
-ARGS="--cflags includedir"
RESULT="-I/usr/include/somedir"
-
-run_test
+run_test --cflags includedir
diff --git a/check/check-libs b/check/check-libs
index 372314d..767e3fd 100755
--- a/check/check-libs
+++ b/check/check-libs
@@ -4,14 +4,48 @@ set -e
. ${srcdir}/common
-ARGS="--libs simple"
-if [ "$list_indirect_deps" = "yes" ]; then
- RESULT="-lsimple -lm"
-else
- RESULT="-lsimple"
+RESULT="-lsimple"
+if [ "$list_indirect_deps" = no ]; then
+ run_test --libs simple
fi
-run_test
-ARGS="--libs fields-blank"
+RESULT="-lsimple -lm"
+if [ "$list_indirect_deps" = yes ]; then
+ run_test --libs simple
+fi
+run_test --libs --static simple
+
RESULT=""
-run_test
+run_test --libs fields-blank
+
+RESULT="-L/other/lib -Wl,--as-needed -lother"
+run_test --libs other
+
+RESULT="-lother"
+run_test --libs-only-l other
+
+RESULT="-L/other/lib"
+run_test --libs-only-L other
+
+RESULT="-Wl,--as-needed"
+run_test --libs-only-other other
+
+# Try various mixed combinations
+RESULT="-L/other/lib -lother"
+run_test --libs-only-l --libs-only-L other
+run_test --libs-only-L --libs-only-l other
+
+RESULT="-Wl,--as-needed -lother"
+run_test --libs-only-l --libs-only-other other
+run_test --libs-only-other --libs-only-l other
+
+RESULT="-L/other/lib -Wl,--as-needed"
+run_test --libs-only-L --libs-only-other other
+run_test --libs-only-other --libs-only-L other
+
+RESULT="-L/other/lib -Wl,--as-needed -lother"
+run_test --libs-only-l --libs-only-L --libs-only-other other
+run_test --libs --libs-only-l --libs-only-L --libs-only-other other
+run_test --libs --libs-only-l other
+run_test --libs --libs-only-L other
+run_test --libs --libs-only-other other
diff --git a/check/check-libs-private b/check/check-libs-private
index 0678fd7..736332d 100755
--- a/check/check-libs-private
+++ b/check/check-libs-private
@@ -4,7 +4,5 @@ set -e
. ${srcdir}/common
-ARGS="--static --libs simple"
RESULT="-lsimple -lm"
-
-run_test
+run_test --static --libs simple
diff --git a/check/check-missing b/check/check-missing
index 5616945..bb5f79a 100755
--- a/check/check-missing
+++ b/check/check-missing
@@ -7,83 +7,68 @@ set -e
# non-existent package; call should fail and cause no output
EXPECT_RETURN=1
RESULT=""
-ARGS="--exists pkg-non-existent"
-run_test
+run_test --exists pkg-non-existent
# existing package, but with missing Requires
EXPECT_RETURN=1
RESULT=""
-ARGS="--exists missing-requires"
-run_test
+run_test --exists missing-requires
# tests below are on an existing package, but with missing Requires.private;
# when pkg-config outputs error, the actual error text isn't checked
# package exists, but should fail since deps can't be resolved
-ARGS="--exists missing-requires-private"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --exists missing-requires-private
# get Libs
-ARGS="--libs missing-requires-private"
-if [ "$list_indirect_deps" = "yes" ]; then
- EXPECT_RETURN=1
- RESULT='Package pkg-non-existent-private-dep was not found in the pkg-config search path.
-Perhaps you should add the directory containing `pkg-non-existent-private-dep.pc'\''
-to the PKG_CONFIG_PATH environment variable
-Package '\''pkg-non-existent-private-dep'\'', required by '\''Missing Requires.private test package'\'', not found'
-else
- EXPECT_RETURN=0
- RESULT="-L/missing-requires-private/lib -lmissing-requires-private"
+EXPECT_RETURN=0
+RESULT="-L/missing-requires-private/lib -lmissing-requires-private"
+if [ "$list_indirect_deps" = no ]; then
+ run_test --libs missing-requires-private
fi
-run_test
# Libs.private should fail (verbosely, but the output isn't verified)
-ARGS="--silence-errors --static --libs missing-requires-private"
EXPECT_RETURN=1
RESULT=""
-run_test
+if [ "$list_indirect_deps" = yes ]; then
+ run_test --silence-errors --libs missing-requires-private
+fi
+run_test --silence-errors --static --libs missing-requires-private
# Cflags.private should fail (verbosely, but the output isn't verified)
-ARGS="--silence-errors --static --cflags missing-requires-private"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --silence-errors --static --cflags missing-requires-private
# Cflags should fail (verbosely, but the output isn't verified)
-ARGS="--silence-errors --cflags missing-requires-private"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --silence-errors --cflags missing-requires-private
# get includedir var
-ARGS="--variable includedir missing-requires-private"
EXPECT_RETURN=0
RESULT="/usr/include/somedir"
-run_test
+run_test --variable includedir missing-requires-private
-# tests below are on an existing package, but with missing Requires; when
-# pkg-config outputs error, the actual error text isn't checked
+# tests below are on an existing package, but with missing Requires;
+# when pkg-config outputs error, the actual error text isn't checked
# package exists
-ARGS="missing-requires"
-EXPECT_RETURN=0
+EXPECT_RETURN=1
RESULT=""
-run_test
+run_test missing-requires
# Libs should fail
-ARGS="--silence-errors --libs missing-requires"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --silence-errors --libs missing-requires
# Cflags should fail
-ARGS="--silence-errors --cflags missing-requires"
EXPECT_RETURN=1
RESULT=""
-run_test
+run_test --silence-errors --cflags missing-requires
# get includedir var
-ARGS="--variable includedir missing-requires"
EXPECT_RETURN=0
RESULT="/usr/include/somedir"
-run_test
+run_test --variable includedir missing-requires
diff --git a/check/check-mixed-flags b/check/check-mixed-flags
new file mode 100755
index 0000000..84dba21
--- /dev/null
+++ b/check/check-mixed-flags
@@ -0,0 +1,79 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+RESULT="-DOTHER -I/other/include -L/other/lib -Wl,--as-needed -lother"
+run_test --cflags --libs other
+run_test --libs --cflags other
+run_test --cflags-only-I --cflags-only-other --libs-only-l --libs-only-L \
+ --libs-only-other other
+
+RESULT="-I/other/include -lother"
+run_test --cflags-only-I --libs-only-l other
+run_test --libs-only-l --cflags-only-I other
+
+RESULT="-DOTHER -lother"
+run_test --cflags-only-other --libs-only-l other
+run_test --libs-only-l --cflags-only-other other
+
+RESULT="-I/other/include -L/other/lib"
+run_test --cflags-only-I --libs-only-L other
+run_test --libs-only-L --cflags-only-I other
+
+RESULT="-DOTHER -L/other/lib"
+run_test --cflags-only-other --libs-only-L other
+run_test --libs-only-L --cflags-only-other other
+
+RESULT="-I/other/include -Wl,--as-needed"
+run_test --cflags-only-I --libs-only-other other
+run_test --libs-only-other --cflags-only-I other
+
+RESULT="-DOTHER -Wl,--as-needed"
+run_test --cflags-only-other --libs-only-other other
+run_test --libs-only-other --cflags-only-other other
+
+RESULT="-I/other/include -L/other/lib -lother"
+run_test --cflags-only-I --libs-only-L --libs-only-l other
+run_test --libs-only-l --libs-only-L --cflags-only-I other
+
+RESULT="-DOTHER -L/other/lib -lother"
+run_test --cflags-only-other --libs-only-L --libs-only-l other
+run_test --libs-only-l --libs-only-L --cflags-only-other other
+
+RESULT="-I/other/include -Wl,--as-needed -lother"
+run_test --cflags-only-I --libs-only-other --libs-only-l other
+run_test --libs-only-l --libs-only-other --cflags-only-I other
+
+RESULT="-DOTHER -Wl,--as-needed -lother"
+run_test --cflags-only-other --libs-only-other --libs-only-l other
+run_test --libs-only-l --libs-only-other --cflags-only-other other
+
+RESULT="-I/other/include -L/other/lib -Wl,--as-needed"
+run_test --cflags-only-I --libs-only-other --libs-only-L other
+run_test --libs-only-L --libs-only-other --cflags-only-I other
+
+RESULT="-DOTHER -L/other/lib -Wl,--as-needed"
+run_test --cflags-only-other --libs-only-other --libs-only-L other
+run_test --libs-only-L --libs-only-other --cflags-only-other other
+
+RESULT="-DOTHER -I/other/include -lother"
+run_test --cflags --libs-only-l other
+run_test --cflags-only-I --cflags-only-other --libs-only-l other
+
+RESULT="-DOTHER -I/other/include -L/other/lib"
+run_test --cflags --libs-only-L other
+run_test --cflags-only-I --cflags-only-other --libs-only-L other
+
+RESULT="-DOTHER -I/other/include -Wl,--as-needed"
+run_test --cflags --libs-only-other other
+run_test --cflags-only-I --cflags-only-other --libs-only-other other
+
+RESULT="-I/other/include -L/other/lib -Wl,--as-needed -lother"
+run_test --cflags-only-I --libs other
+run_test --cflags-only-I --libs-only-l --libs-only-L --libs-only-other other
+
+RESULT="-DOTHER -L/other/lib -Wl,--as-needed -lother"
+run_test --cflags-only-other --libs other
+run_test --cflags-only-other --libs-only-l --libs-only-L --libs-only-other other
diff --git a/check/check-non-l-flags b/check/check-non-l-flags
new file mode 100755
index 0000000..dc615e9
--- /dev/null
+++ b/check/check-non-l-flags
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+RESULT="-I/non-l/include -I/non-l-required/include"
+run_test --cflags non-l-required non-l
+run_test --cflags --static non-l-required non-l
+
+RESULT="/non-l.a /non-l-required.a -pthread"
+run_test --libs non-l-required non-l
+run_test --libs --static non-l-required non-l
diff --git a/check/check-path b/check/check-path
new file mode 100755
index 0000000..fecfc06
--- /dev/null
+++ b/check/check-path
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+set -e
+. ${srcdir}/common
+
+# PKG_CONFIG_PATH
+RESULT=""
+PKG_CONFIG_PATH="$srcdir/sub" run_test --exists sub1
+
+# default pkg-config path, making sure to resolve the variables fully
+eval pc_path="$pc_path"
+case ${MACHTYPE} in
+*-msys)
+ # Make sure path doesn't get mangled on MSYS
+ RESULT=$(echo $pc_path | sed 's,/,\\/,g')
+ ;;
+*)
+ RESULT=$pc_path
+ ;;
+esac
+unset PKG_CONFIG_LIBDIR
+run_test --variable=pc_path pkg-config
diff --git a/check/check-print-options b/check/check-print-options
new file mode 100755
index 0000000..a2a41e7
--- /dev/null
+++ b/check/check-print-options
@@ -0,0 +1,60 @@
+#! /bin/sh
+
+set -e
+. ${srcdir}/common
+
+# --version
+RESULT=$PACKAGE_VERSION
+run_test --version
+
+# --modversion
+RESULT=1.0.0
+run_test --modversion simple
+
+# --print-variables, make sure having no variables doesn't crash
+RESULT=""
+run_test --print-variables no-variables
+
+RESULT="exec_prefix
+prefix
+libdir
+includedir"
+run_test --print-variables simple
+
+# --print-provides
+RESULT="simple = 1.0.0"
+run_test --print-provides simple
+
+# --print-requires
+RESULT="public-dep >= 1"
+run_test --print-requires requires-test
+
+# --print-requires-private
+RESULT="private-dep >= 1"
+run_test --print-requires-private requires-test
+
+# --list-all, limit to a subdirectory
+RESULT="sub1 Subdirectory package 1 - Test package 1 for subdirectory
+sub2 Subdirectory package 2 - Test package 2 for subdirectory"
+PKG_CONFIG_LIBDIR="$srcdir/sub" run_test --list-all
+
+# Check handling when multiple incompatible options are set
+RESULT="Ignoring incompatible output option \"--modversion\"
+$PACKAGE_VERSION"
+run_test --version --modversion simple
+
+RESULT="Ignoring incompatible output option \"--version\"
+1.0.0"
+run_test --modversion --version simple
+
+# --print-requires/--print-requires-private allowed together
+RESULT="public-dep >= 1
+private-dep >= 1"
+run_test --print-requires --print-requires-private requires-test
+run_test --print-requires-private --print-requires requires-test
+
+# --exists and --atleast/exact/max-version can be mixed
+RESULT=""
+run_test --exists --atleast-version=1.0.0 simple
+run_test --exists --exact-version=1.0.0 simple
+run_test --exists --max-version=1.0.0 simple
diff --git a/check/check-requires-private b/check/check-requires-private
index e9ef2f2..dc69baf 100755
--- a/check/check-requires-private
+++ b/check/check-requires-private
@@ -5,27 +5,20 @@ set -e
. ${srcdir}/common
# expect cflags from requires-test and public-dep
-ARGS="--cflags requires-test"
RESULT="-I/requires-test/include -I/private-dep/include -I/public-dep/include"
-run_test
-
-# still expect those cflags for static linking case
-ARGS="--static --cflags requires-test"
-RESULT="-I/requires-test/include -I/private-dep/include -I/public-dep/include"
-run_test
+run_test --cflags requires-test
+run_test --static --cflags requires-test
# expect libs for just requires-test and public-dep
-ARGS="--libs requires-test"
-if [ "$list_indirect_deps" = "yes" ]; then
- RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib -lrequires-test -lprivate-dep -lpublic-dep"
-else
- RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
+RESULT="-L/requires-test/lib -L/public-dep/lib -lrequires-test -lpublic-dep"
+if [ "$list_indirect_deps" = no ]; then
+ run_test --libs requires-test
fi
-run_test
# expect libs for requires-test, public-dep and private-dep in static case
-ARGS="--static --libs requires-test"
-RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib -lrequires-test -lprivate-dep -lpublic-dep"
-run_test
-
-
+RESULT="-L/requires-test/lib -L/private-dep/lib -L/public-dep/lib \
+-lrequires-test -lprivate-dep -lpublic-dep"
+if [ "$list_indirect_deps" = yes ]; then
+ run_test --libs requires-test
+fi
+run_test --static --libs requires-test
diff --git a/check/check-requires-version b/check/check-requires-version
new file mode 100755
index 0000000..6b4e371
--- /dev/null
+++ b/check/check-requires-version
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+# Test != comparison fails
+RESULT=""
+EXPECT_RETURN=1 run_test --exists requires-version-1
+
+# Test >=, > and = succeed
+RESULT=""
+run_test --exists requires-version-2
+
+# Test <=, < and != succeed
+RESULT=""
+run_test --exists requires-version-3
diff --git a/check/check-sort-order b/check/check-sort-order
new file mode 100755
index 0000000..77c0806
--- /dev/null
+++ b/check/check-sort-order
@@ -0,0 +1,194 @@
+#! /bin/sh
+
+# These tests check that the order of the flags in .pc files are correct
+# after resolving the package list. There are two things that are
+# critical in the current algorithm: the ordering of packages on the
+# command line, the ordering of packages based on Requires and the place
+# in the pkg-config path the .pc file was found, with packages earlier
+# in the path getting higher priority. There is one other factor that
+# makes the output currently work correctly that's only implicitly
+# tested here: stripping of all duplicates from the output string.
+#
+# There are 3 sets of packages here:
+#
+# 1. A typical setup where highest level package is earliest in the path
+# and has a straight dependency chain. 3-1 -> 2-1 -> 1-1 with 3-1 in the
+# first part of the user supplied path, 2-1 in the second part, and 1-1
+# found from the system path.
+#
+# 2. A similar setup to 1 except that now both 3-2 and 2-2 depend on
+# 1-2. This has a subtle effect on the algorithm when combined with the
+# order of the command line arguments. It only currently works because
+# duplicates get strip out in (hopefully) the correct order, so 1-2's
+# flags come out in the appropriate spot even though it was in the
+# package list twice.
+#
+# 3. Reverse the order of requirements so that the system level package
+# (1-3) depends on something in the user's path (2-3), which depends on
+# something earlier in the user's path (3-3). This is pretty unusual
+# since the user is typically overriding something higher in the stack
+# rather than lower, but it does illustrate the path ordering vs.
+# dependency ordering.
+
+set -e
+
+. ${srcdir}/common
+
+order1="$srcdir/sort/sort:$srcdir/sort"
+order2="$srcdir/sort:$srcdir/sort/sort"
+
+export PKG_CONFIG_PATH
+PKG_CONFIG_PATH="$order1"
+
+# Check package set -1
+RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path3/include -I/path2/include \
+-I/path1/include"
+run_test --cflags sort-order-3-1
+run_test --cflags sort-order-3-1 sort-order-2-1
+run_test --cflags sort-order-2-1 sort-order-3-1
+run_test --cflags sort-order-3-1 sort-order-2-1 sort-order-1-1
+run_test --cflags sort-order-3-1 sort-order-1-1 sort-order-2-1
+run_test --cflags sort-order-2-1 sort-order-3-1 sort-order-1-1
+run_test --cflags sort-order-2-1 sort-order-1-1 sort-order-3-1
+run_test --cflags sort-order-1-1 sort-order-3-1 sort-order-2-1
+run_test --cflags sort-order-1-1 sort-order-2-1 sort-order-3-1
+
+RESULT="-L/path3/lib -L/path2/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
+run_test --libs sort-order-3-1
+run_test --libs sort-order-3-1 sort-order-2-1
+run_test --libs sort-order-2-1 sort-order-3-1
+run_test --libs sort-order-3-1 sort-order-2-1 sort-order-1-1
+run_test --libs sort-order-3-1 sort-order-1-1 sort-order-2-1
+run_test --libs sort-order-2-1 sort-order-3-1 sort-order-1-1
+run_test --libs sort-order-2-1 sort-order-1-1 sort-order-3-1
+run_test --libs sort-order-1-1 sort-order-3-1 sort-order-2-1
+run_test --libs sort-order-1-1 sort-order-2-1 sort-order-3-1
+
+# Check package set -2
+RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path3/include -I/path2/include \
+-I/path1/include"
+run_test --cflags sort-order-3-2
+run_test --cflags sort-order-3-2 sort-order-2-2
+run_test --cflags sort-order-2-2 sort-order-3-2
+run_test --cflags sort-order-3-2 sort-order-2-2 sort-order-1-2
+run_test --cflags sort-order-3-2 sort-order-1-2 sort-order-2-2
+run_test --cflags sort-order-2-2 sort-order-3-2 sort-order-1-2
+run_test --cflags sort-order-2-2 sort-order-1-2 sort-order-3-2
+run_test --cflags sort-order-1-2 sort-order-3-2 sort-order-2-2
+run_test --cflags sort-order-1-2 sort-order-2-2 sort-order-3-2
+
+RESULT="-L/path3/lib -L/path2/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
+run_test --libs sort-order-3-2
+run_test --libs sort-order-3-2 sort-order-2-2
+run_test --libs sort-order-2-2 sort-order-3-2
+run_test --libs sort-order-3-2 sort-order-2-2 sort-order-1-2
+run_test --libs sort-order-3-2 sort-order-1-2 sort-order-2-2
+run_test --libs sort-order-2-2 sort-order-3-2 sort-order-1-2
+run_test --libs sort-order-2-2 sort-order-1-2 sort-order-3-2
+run_test --libs sort-order-1-2 sort-order-3-2 sort-order-2-2
+run_test --libs sort-order-1-2 sort-order-2-2 sort-order-3-2
+
+# Check package set -3
+RESULT="-DPATH1 -DPATH2 -DPATH3 -I/path3/include -I/path2/include \
+-I/path1/include"
+run_test --cflags sort-order-1-3
+run_test --cflags sort-order-1-3 sort-order-2-3
+run_test --cflags sort-order-2-3 sort-order-1-3
+run_test --cflags sort-order-3-3 sort-order-2-3 sort-order-1-3
+run_test --cflags sort-order-3-3 sort-order-1-3 sort-order-2-3
+run_test --cflags sort-order-2-3 sort-order-3-3 sort-order-1-3
+run_test --cflags sort-order-2-3 sort-order-1-3 sort-order-3-3
+run_test --cflags sort-order-1-3 sort-order-3-3 sort-order-2-3
+run_test --cflags sort-order-1-3 sort-order-2-3 sort-order-3-3
+
+RESULT="-L/path3/lib -L/path2/lib -L/path1/lib -Wl,-O1 -lpath1 -Wl,-O2 \
+-lpath2 -Wl,-O3 -lpath3"
+run_test --libs sort-order-1-3
+run_test --libs sort-order-1-3 sort-order-2-3
+run_test --libs sort-order-2-3 sort-order-1-3
+run_test --libs sort-order-3-3 sort-order-2-3 sort-order-1-3
+run_test --libs sort-order-3-3 sort-order-1-3 sort-order-2-3
+run_test --libs sort-order-2-3 sort-order-3-3 sort-order-1-3
+run_test --libs sort-order-2-3 sort-order-1-3 sort-order-3-3
+run_test --libs sort-order-1-3 sort-order-3-3 sort-order-2-3
+run_test --libs sort-order-1-3 sort-order-2-3 sort-order-3-3
+
+# Switch pkg-config path order
+PKG_CONFIG_PATH="$order2"
+
+# Check package set -1
+RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path2/include -I/path3/include \
+-I/path1/include"
+run_test --cflags sort-order-3-1
+run_test --cflags sort-order-3-1 sort-order-2-1
+run_test --cflags sort-order-2-1 sort-order-3-1
+run_test --cflags sort-order-3-1 sort-order-2-1 sort-order-1-1
+run_test --cflags sort-order-3-1 sort-order-1-1 sort-order-2-1
+run_test --cflags sort-order-2-1 sort-order-3-1 sort-order-1-1
+run_test --cflags sort-order-2-1 sort-order-1-1 sort-order-3-1
+run_test --cflags sort-order-1-1 sort-order-3-1 sort-order-2-1
+run_test --cflags sort-order-1-1 sort-order-2-1 sort-order-3-1
+
+RESULT="-L/path2/lib -L/path3/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
+run_test --libs sort-order-3-1
+run_test --libs sort-order-3-1 sort-order-2-1
+run_test --libs sort-order-2-1 sort-order-3-1
+run_test --libs sort-order-3-1 sort-order-2-1 sort-order-1-1
+run_test --libs sort-order-3-1 sort-order-1-1 sort-order-2-1
+run_test --libs sort-order-2-1 sort-order-3-1 sort-order-1-1
+run_test --libs sort-order-2-1 sort-order-1-1 sort-order-3-1
+run_test --libs sort-order-1-1 sort-order-3-1 sort-order-2-1
+run_test --libs sort-order-1-1 sort-order-2-1 sort-order-3-1
+
+# Check package set -2
+RESULT="-DPATH3 -DPATH2 -DPATH1 -I/path2/include -I/path3/include \
+-I/path1/include"
+run_test --cflags sort-order-3-2
+run_test --cflags sort-order-3-2 sort-order-2-2
+run_test --cflags sort-order-2-2 sort-order-3-2
+run_test --cflags sort-order-3-2 sort-order-2-2 sort-order-1-2
+run_test --cflags sort-order-3-2 sort-order-1-2 sort-order-2-2
+run_test --cflags sort-order-2-2 sort-order-3-2 sort-order-1-2
+run_test --cflags sort-order-2-2 sort-order-1-2 sort-order-3-2
+run_test --cflags sort-order-1-2 sort-order-3-2 sort-order-2-2
+run_test --cflags sort-order-1-2 sort-order-2-2 sort-order-3-2
+
+RESULT="-L/path2/lib -L/path3/lib -L/path1/lib -Wl,-O3 -lpath3 -Wl,-O2 \
+-lpath2 -Wl,-O1 -lpath1"
+run_test --libs sort-order-3-2
+run_test --libs sort-order-3-2 sort-order-2-2
+run_test --libs sort-order-2-2 sort-order-3-2
+run_test --libs sort-order-3-2 sort-order-2-2 sort-order-1-2
+run_test --libs sort-order-3-2 sort-order-1-2 sort-order-2-2
+run_test --libs sort-order-2-2 sort-order-3-2 sort-order-1-2
+run_test --libs sort-order-2-2 sort-order-1-2 sort-order-3-2
+run_test --libs sort-order-1-2 sort-order-3-2 sort-order-2-2
+run_test --libs sort-order-1-2 sort-order-2-2 sort-order-3-2
+
+# Check package set -3
+RESULT="-DPATH1 -DPATH2 -DPATH3 -I/path2/include -I/path3/include \
+-I/path1/include"
+run_test --cflags sort-order-1-3
+run_test --cflags sort-order-1-3 sort-order-2-3
+run_test --cflags sort-order-2-3 sort-order-1-3
+run_test --cflags sort-order-3-3 sort-order-2-3 sort-order-1-3
+run_test --cflags sort-order-3-3 sort-order-1-3 sort-order-2-3
+run_test --cflags sort-order-2-3 sort-order-3-3 sort-order-1-3
+run_test --cflags sort-order-2-3 sort-order-1-3 sort-order-3-3
+run_test --cflags sort-order-1-3 sort-order-3-3 sort-order-2-3
+run_test --cflags sort-order-1-3 sort-order-2-3 sort-order-3-3
+
+RESULT="-L/path2/lib -L/path3/lib -L/path1/lib -Wl,-O1 -lpath1 -Wl,-O2 \
+-lpath2 -Wl,-O3 -lpath3"
+run_test --libs sort-order-1-3
+run_test --libs sort-order-1-3 sort-order-2-3
+run_test --libs sort-order-2-3 sort-order-1-3
+run_test --libs sort-order-3-3 sort-order-2-3 sort-order-1-3
+run_test --libs sort-order-3-3 sort-order-1-3 sort-order-2-3
+run_test --libs sort-order-2-3 sort-order-3-3 sort-order-1-3
+run_test --libs sort-order-2-3 sort-order-1-3 sort-order-3-3
+run_test --libs sort-order-1-3 sort-order-3-3 sort-order-2-3
+run_test --libs sort-order-1-3 sort-order-2-3 sort-order-3-3
diff --git a/check/check-sysroot b/check/check-sysroot
new file mode 100755
index 0000000..0820206
--- /dev/null
+++ b/check/check-sysroot
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+export PKG_CONFIG_SYSROOT_DIR=/sysroot
+
+RESULT=""
+run_test --cflags simple
+
+RESULT="-lsimple"
+if [ "$list_indirect_deps" = no ]; then
+ run_test --libs simple
+fi
+
+RESULT="-lsimple -lm"
+if [ "$list_indirect_deps" = yes ]; then
+ run_test --libs simple
+fi
+run_test --libs --static simple
+
+RESULT="-I/sysroot/public-dep/include"
+run_test --cflags public-dep
+
+RESULT="-L/sysroot/public-dep/lib -lpublic-dep"
+run_test --libs public-dep
diff --git a/check/check-tilde b/check/check-tilde
new file mode 100644
index 0000000..0ffc8f5
--- /dev/null
+++ b/check/check-tilde
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+# expect unescaped tilde from cflags
+RESULT='-I~'
+run_test --cflags tilde
+
+# expect unescaped tilde from libs
+RESULT='-L~'
+run_test --libs tilde
diff --git a/check/check-uninstalled b/check/check-uninstalled
new file mode 100755
index 0000000..dee7881
--- /dev/null
+++ b/check/check-uninstalled
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+set -e
+
+. ${srcdir}/common
+
+# Check to see if we find the uninstalled version
+RESULT=''
+run_test --uninstalled inst
+
+RESULT=''
+run_test --exists inst \>= 2.0
+
+RESULT='-I$(top_builddir)/include'
+run_test --cflags inst
+
+RESULT='-L$(top_builddir)/lib -linst'
+run_test --libs inst
+
+# Alter PKG_CONFIG_TOP_BUILD_DIR
+export PKG_CONFIG_TOP_BUILD_DIR='$(abs_top_builddir)'
+
+RESULT='-I$(abs_top_builddir)/include'
+run_test --cflags inst
+
+RESULT='-L$(abs_top_builddir)/lib -linst'
+run_test --libs inst
+
+unset PKG_CONFIG_TOP_BUILD_DIR
+
+# Check to see if we get the original back
+export PKG_CONFIG_DISABLE_UNINSTALLED=1
+
+RESULT=''
+EXPECT_RETURN=1 run_test --uninstalled inst
+
+RESULT=''
+EXPECT_RETURN=1 run_test --exists inst \>= 2.0
+
+RESULT='-I/inst/include'
+run_test --cflags inst
+
+RESULT='-L/inst/lib -linst'
+run_test --libs inst
+
+unset PKG_CONFIG_DISABLE_UNINSTALLED
diff --git a/check/check-version b/check/check-version
index 4254d65..a940c37 100755
--- a/check/check-version
+++ b/check/check-version
@@ -4,99 +4,94 @@ set -e
. ${srcdir}/common
+# --atleast-pkgconfig-version
+RESULT=""
+run_test --atleast-pkgconfig-version=$PACKAGE_VERSION
+
+EXPECT_RETURN=1
+RESULT=""
+run_test --atleast-pkgconfig-version=999
+
v1=0.9.9
v2=1.0.0
v3=1.0.1
# exact version testing
-ARGS="--exists --print-errors simple = $v1"
EXPECT_RETURN=1
RESULT="Requested 'simple = $v1' but version of Simple test is $v2"
-run_test
+run_test --print-errors simple = $v1
-ARGS="--exists --print-errors --exact-version=$v1 simple"
EXPECT_RETURN=1
RESULT="Requested 'simple = $v1' but version of Simple test is $v2"
-run_test
+run_test --print-errors --exact-version=$v1 simple
-ARGS="--exists --print-errors simple = $v2"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors simple = $v2
-ARGS="--exists --print-errors --exact-version=$v2 simple"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors --exact-version=$v2 simple
-ARGS="--exists --print-errors simple = $v3"
EXPECT_RETURN=1
RESULT="Requested 'simple = $v3' but version of Simple test is $v2"
-run_test
+run_test --print-errors simple = $v3
-ARGS="--exists --print-errors --exact-version=$v3 simple"
EXPECT_RETURN=1
RESULT="Requested 'simple = $v3' but version of Simple test is $v2"
-run_test
+run_test --print-errors --exact-version=$v3 simple
# atleast version testing
-ARGS="--exists --print-errors simple >= $v1"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors simple \>= $v1
-ARGS="--exists --print-errors --atleast-version=$v1 simple"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors --atleast-version=$v1 simple
-ARGS="--exists --print-errors simple >= $v2"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors simple \>= $v2
-ARGS="--exists --print-errors --atleast-version=$v2 simple"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors --atleast-version=$v2 simple
-ARGS="--exists --print-errors simple >= $v3"
EXPECT_RETURN=1
RESULT="Requested 'simple >= $v3' but version of Simple test is $v2"
-run_test
+run_test --print-errors simple \>= $v3
-ARGS="--exists --print-errors --atleast-version=$v3 simple"
EXPECT_RETURN=1
RESULT="Requested 'simple >= $v3' but version of Simple test is $v2"
-run_test
+run_test --print-errors --atleast-version=$v3 simple
# max version testing
-ARGS="--exists --print-errors simple <= $v1"
EXPECT_RETURN=1
RESULT="Requested 'simple <= $v1' but version of Simple test is $v2"
-run_test
+run_test --print-errors simple \<= $v1
-ARGS="--exists --print-errors --max-version=$v1 simple"
EXPECT_RETURN=1
RESULT="Requested 'simple <= $v1' but version of Simple test is $v2"
-run_test
+run_test --print-errors --max-version=$v1 simple
-ARGS="--exists --print-errors simple <= $v2"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors simple \<= $v2
-ARGS="--exists --print-errors --max-version=$v2 simple"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors --max-version=$v2 simple
-ARGS="--exists --print-errors simple <= $v3"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors simple \<= $v3
-ARGS="--exists --print-errors --max-version=$v3 simple"
EXPECT_RETURN=0
RESULT=""
-run_test
+run_test --print-errors --max-version=$v3 simple
+
+# mixing version compare testing is not allowed
+EXPECT_RETURN=0
+RESULT='Ignoring incompatible output option "--exact-version"'
+run_test --atleast-version=1.0.0 --exact-version=1.0.0 simple
diff --git a/check/check-whitespace b/check/check-whitespace
index b26ec3d..e4388ba 100755
--- a/check/check-whitespace
+++ b/check/check-whitespace
@@ -5,11 +5,9 @@ set -e
. ${srcdir}/common
# expect cflags from whitespace
-ARGS="--cflags whitespace"
RESULT='-Dlala=misc -I/usr/white\ space/include -I$(top_builddir) -Iinclude\ dir -Iother\ include\ dir'
-run_test
+run_test --cflags whitespace
# expect libs from whitespace
-ARGS="--libs whitespace"
-RESULT="-r:foo -L/usr/white\\ space/lib -lfoo\\ bar -lbar\\ baz"
-run_test
+RESULT="-L/usr/white\\ space/lib -lfoo\\ bar -lbar\\ baz -r:foo"
+run_test --libs whitespace
diff --git a/check/circular-1.pc b/check/circular-1.pc
new file mode 100644
index 0000000..3d999a0
--- /dev/null
+++ b/check/circular-1.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/circ1
+
+Name: Circular Requires test 1
+Description: Dummy package for testing circular Requires
+Version: 1.0.0
+Requires: circular-2
+Libs: -lcirc1
+Cflags: -I${includedir}
diff --git a/check/circular-2.pc b/check/circular-2.pc
new file mode 100644
index 0000000..8d8bd84
--- /dev/null
+++ b/check/circular-2.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/circ2
+
+Name: Circular Requires test 2
+Description: Dummy package for testing circular Requires
+Version: 1.0.0
+Requires: circular-3
+Libs: -lcirc2
+Cflags: -I${includedir}
diff --git a/check/circular-3.pc b/check/circular-3.pc
new file mode 100644
index 0000000..ad6555a
--- /dev/null
+++ b/check/circular-3.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/circ3
+
+Name: Circular Requires test 3
+Description: Dummy package for testing circular Requires
+Version: 1.0.0
+Requires: circular-1
+Libs: -lcirc3
+Cflags: -I${includedir}
diff --git a/check/common b/check/common
index fe061cc..1115c2e 100644
--- a/check/common
+++ b/check/common
@@ -15,17 +15,17 @@ export LC_ALL=C
run_test () {
set +e
- ${pkgconfig} $ARGS >/dev/null 2>&1
+ ${pkgconfig} "$@" >/dev/null 2>&1
R=$?
if [ "$R" -ne "${EXPECT_RETURN:-0}" ]; then
- ${pkgconfig} --print-errors $ARGS
- echo "${pkgconfig} $ARGS exited with $R (expected ${EXPECT_RETURN:-0})" 1>&2
+ ${pkgconfig} --print-errors "$@"
+ echo "${pkgconfig} $@ exited with $R (expected ${EXPECT_RETURN:-0})" 1>&2
exit 1
fi
- R=$(${pkgconfig} $ARGS 2>&1 | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]*$,,')
+ R=$(${pkgconfig} "$@" 2>&1 | sed -e 's,^[[:space:]]*,,' -e 's,[[:space:]]*$,,')
if [ "$R" != "$RESULT" ]; then
- echo "${pkgconfig} $ARGS :"
+ echo "${pkgconfig} $@ :"
echo "'$R' != '$RESULT'"
exit 1
fi
diff --git a/check/config.sh.in b/check/config.sh.in
index de00780..91f20a2 100644
--- a/check/config.sh.in
+++ b/check/config.sh.in
@@ -2,4 +2,14 @@
# Settings from the configure script
#
-export list_indirect_deps=@use_indirect_deps@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
+datarootdir=@datarootdir@
+datadir=@datadir@
+pc_path="@pc_path@"
+system_include_path="@system_include_path@"
+system_library_path="@system_library_path@"
+list_indirect_deps=@use_indirect_deps@
+PACKAGE_VERSION=@PACKAGE_VERSION@
diff --git a/check/flag-dup-1.pc b/check/flag-dup-1.pc
new file mode 100644
index 0000000..7e91151
--- /dev/null
+++ b/check/flag-dup-1.pc
@@ -0,0 +1,10 @@
+prefix=/path
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Flag duplicate test 1
+Description: Test package for checking stripping of duplicate flags
+Version: 1.0.0
+Libs: -L${libdir} -lpath1 -Wl,--whole-archive -lm --Wl,--no-whole-archive -Xlinker -R -Xlinker ${libdir}
+Cflags: -I${includedir} -DPATH1 -DFOO
diff --git a/check/flag-dup-2.pc b/check/flag-dup-2.pc
new file mode 100644
index 0000000..fe1b656
--- /dev/null
+++ b/check/flag-dup-2.pc
@@ -0,0 +1,11 @@
+prefix=/path
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Flag duplicate test 2
+Description: Test package for checking stripping of duplicate flags
+Version: 1.0.0
+Libs: -L${libdir} -lpath2 -Wl,--whole-archive -lm --Wl,--no-whole-archive -Xlinker -R -Xlinker ${libdir}
+Cflags: -I${includedir} -DPATH2 -DFOO
+Requires: flag-dup-1
diff --git a/check/gtk/atk.pc b/check/gtk/atk.pc
new file mode 100644
index 0000000..3097ab5
--- /dev/null
+++ b/check/gtk/atk.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Atk
+Description: Accessibility Toolkit
+Version: 2.2.0
+Requires: gobject-2.0
+Libs: -L${libdir} -latk-1.0
+Cflags: -I${includedir}/atk-1.0
diff --git a/check/gtk/cairo-gobject.pc b/check/gtk/cairo-gobject.pc
new file mode 100644
index 0000000..3d6bd62
--- /dev/null
+++ b/check/gtk/cairo-gobject.pc
@@ -0,0 +1,12 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: cairo-gobject
+Description: gobject functions for cairo graphics library
+Version: 1.10.2
+
+Requires: cairo gobject-2.0 glib-2.0
+Libs: -L${libdir} -lcairo-gobject
+Cflags: -I${includedir}/cairo
diff --git a/check/gtk/cairo.pc b/check/gtk/cairo.pc
new file mode 100644
index 0000000..a52375a
--- /dev/null
+++ b/check/gtk/cairo.pc
@@ -0,0 +1,13 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: cairo
+Description: Multi-platform 2D graphics library
+Version: 1.10.2
+
+Requires.private: gobject-2.0 glib-2.0 pixman-1 >= 0.18.4 fontconfig >= 2.2.95 freetype2 >= 9.7.3 libpng xrender >= 0.6 x11
+Libs: -L${libdir} -lcairo
+Libs.private: -lz -lz
+Cflags: -I${includedir}/cairo
diff --git a/check/gtk/fontconfig.pc b/check/gtk/fontconfig.pc
new file mode 100644
index 0000000..7040b72
--- /dev/null
+++ b/check/gtk/fontconfig.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Fontconfig
+Description: Font configuration and customization library
+Version: 2.8.0
+Libs: -L${libdir} -lfontconfig
+Libs.private: -lexpat -lfreetype
+Cflags: -I${includedir}
diff --git a/check/gtk/freetype2.pc b/check/gtk/freetype2.pc
new file mode 100644
index 0000000..f03ef87
--- /dev/null
+++ b/check/gtk/freetype2.pc
@@ -0,0 +1,12 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: FreeType 2
+Description: A free, high-quality, and portable font engine.
+Version: 13.1.7
+Requires:
+Libs: -L${libdir} -lfreetype
+Libs.private:
+Cflags: -I${includedir}/freetype2 -I${includedir}
diff --git a/check/gtk/gdk-3.0.pc b/check/gtk/gdk-3.0.pc
new file mode 100644
index 0000000..00be751
--- /dev/null
+++ b/check/gtk/gdk-3.0.pc
@@ -0,0 +1,12 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+targets=x11
+
+Name: GDK
+Description: GTK+ Drawing Kit
+Version: 3.2.4
+Requires: pango pangocairo gdk-pixbuf-2.0 cairo-gobject
+Libs: -L${libdir} -lgdk-3
+Cflags: -I${includedir}/gtk-3.0
diff --git a/check/gtk/gdk-pixbuf-2.0.pc b/check/gtk/gdk-pixbuf-2.0.pc
new file mode 100644
index 0000000..abcb01b
--- /dev/null
+++ b/check/gtk/gdk-pixbuf-2.0.pc
@@ -0,0 +1,19 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+gdk_pixbuf_binary_version=2.10.0
+gdk_pixbuf_binarydir=${libdir}/gdk-pixbuf-2.0/2.10.0
+gdk_pixbuf_moduledir=${gdk_pixbuf_binarydir}/loaders
+gdk_pixbuf_cache_file=${gdk_pixbuf_binarydir}/loaders.cache
+
+Name: GdkPixbuf
+Description: Image loading and scaling
+Version: 2.24.1
+Requires: gobject-2.0
+Requires.private: gmodule-no-export-2.0 libpng12
+Libs: -L${libdir} -lgdk_pixbuf-2.0
+Libs.private: -lm
+Cflags: -I${includedir}/gdk-pixbuf-2.0
+
diff --git a/check/gtk/gio-2.0.pc b/check/gtk/gio-2.0.pc
new file mode 100644
index 0000000..981f669
--- /dev/null
+++ b/check/gtk/gio-2.0.pc
@@ -0,0 +1,15 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+giomoduledir=${libdir}/gio/modules
+glib_compile_schemas=${exec_prefix}/bin/glib-compile-schemas
+
+Name: GIO
+Description: glib I/O library
+Version: 2.30.3
+Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0
+Libs: -L${libdir} -lgio-2.0
+Libs.private: -lz -lresolv
+Cflags:
diff --git a/check/gtk/glib-2.0.pc b/check/gtk/glib-2.0.pc
new file mode 100644
index 0000000..97249e4
--- /dev/null
+++ b/check/gtk/glib-2.0.pc
@@ -0,0 +1,15 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+glib_genmarshal=glib-genmarshal
+gobject_query=gobject-query
+glib_mkenums=glib-mkenums
+
+Name: GLib
+Description: C Utility Library
+Version: 2.30.3
+Libs: -L${libdir} -lglib-2.0
+Libs.private: -lrt
+Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
diff --git a/check/gtk/gmodule-no-export-2.0.pc b/check/gtk/gmodule-no-export-2.0.pc
new file mode 100644
index 0000000..aa2d824
--- /dev/null
+++ b/check/gtk/gmodule-no-export-2.0.pc
@@ -0,0 +1,14 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+gmodule_supported=true
+
+Name: GModule
+Description: Dynamic module loader for GLib
+Requires: glib-2.0
+Version: 2.30.3
+Libs: -L${libdir} -lgmodule-2.0 -pthread -lrt
+Libs.private: -ldl
+Cflags: -pthread
diff --git a/check/gtk/gobject-2.0.pc b/check/gtk/gobject-2.0.pc
new file mode 100644
index 0000000..5187bb7
--- /dev/null
+++ b/check/gtk/gobject-2.0.pc
@@ -0,0 +1,12 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: GObject
+Description: GLib Type, Object, Parameter and Signal Library
+Requires: glib-2.0,gthread-2.0
+Version: 2.30.3
+Libs: -L${libdir} -lgobject-2.0
+Libs.private: -lffi
+Cflags:
diff --git a/check/gtk/gthread-2.0.pc b/check/gtk/gthread-2.0.pc
new file mode 100644
index 0000000..e4e407b
--- /dev/null
+++ b/check/gtk/gthread-2.0.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: GThread
+Description: Thread support for GLib
+Requires: glib-2.0
+Version: 2.30.3
+Libs: -L${libdir} -lgthread-2.0 -pthread -lrt
+Cflags: -pthread
diff --git a/check/gtk/gtk+-3.0.pc b/check/gtk/gtk+-3.0.pc
new file mode 100644
index 0000000..b9e674f
--- /dev/null
+++ b/check/gtk/gtk+-3.0.pc
@@ -0,0 +1,15 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+targets=x11
+
+gtk_binary_version=3.0.0
+gtk_host=x86_64-redhat-linux-gnu
+
+Name: GTK+
+Description: GTK+ Graphical UI Library
+Version: 3.2.4
+Requires: gdk-3.0 atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0 pangoft2
+Libs: -L${libdir} -lgtk-3
+Cflags: -I${includedir}/gtk-3.0 -DGSEAL_ENABLE
diff --git a/check/gtk/kbproto.pc b/check/gtk/kbproto.pc
new file mode 100644
index 0000000..9de27cd
--- /dev/null
+++ b/check/gtk/kbproto.pc
@@ -0,0 +1,9 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: KBProto
+Description: KB extension headers
+Version: 1.0.5
+Cflags: -I${includedir}
diff --git a/check/gtk/libpng.pc b/check/gtk/libpng.pc
new file mode 100644
index 0000000..0417f85
--- /dev/null
+++ b/check/gtk/libpng.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libpng
+Description: Loads and saves PNG files
+Version: 1.2.49
+Libs: -L${libdir} -lpng12
+Libs.private: -lz -lm
+Cflags: -I${includedir}
diff --git a/check/gtk/libpng12.pc b/check/gtk/libpng12.pc
new file mode 100644
index 0000000..0417f85
--- /dev/null
+++ b/check/gtk/libpng12.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libpng
+Description: Loads and saves PNG files
+Version: 1.2.49
+Libs: -L${libdir} -lpng12
+Libs.private: -lz -lm
+Cflags: -I${includedir}
diff --git a/check/gtk/pango.pc b/check/gtk/pango.pc
new file mode 100644
index 0000000..2649103
--- /dev/null
+++ b/check/gtk/pango.pc
@@ -0,0 +1,13 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+pango_module_version=1.6.0
+
+Name: Pango
+Description: Internationalized text handling
+Version: 1.29.4
+Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0
+Libs: -L${libdir} -lpango-1.0
+Cflags: -I${includedir}/pango-1.0
diff --git a/check/gtk/pangocairo.pc b/check/gtk/pangocairo.pc
new file mode 100644
index 0000000..753cc79
--- /dev/null
+++ b/check/gtk/pangocairo.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Pango Cairo
+Description: Cairo rendering support for Pango
+Version: 1.29.4
+Requires: pango cairo
+Libs: -L${libdir} -lpangocairo-1.0
+Cflags: -I${includedir}/pango-1.0
diff --git a/check/gtk/pangoft2.pc b/check/gtk/pangoft2.pc
new file mode 100644
index 0000000..f3c3b2c
--- /dev/null
+++ b/check/gtk/pangoft2.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Pango FT2 and Pango Fc
+Description: Freetype 2.0 and fontconfig font support for Pango
+Version: 1.29.4
+Requires: pango freetype2 fontconfig
+Libs: -L${libdir} -lpangoft2-1.0
+Cflags: -I${includedir}/pango-1.0
diff --git a/check/gtk/pixman-1.pc b/check/gtk/pixman-1.pc
new file mode 100644
index 0000000..0aa414b
--- /dev/null
+++ b/check/gtk/pixman-1.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Pixman
+Description: The pixman library (version 1)
+Version: 0.24.4
+Cflags: -I${includedir}/pixman-1
+Libs: -L${libdir} -lpixman-1
+
diff --git a/check/gtk/renderproto.pc b/check/gtk/renderproto.pc
new file mode 100644
index 0000000..b65d331
--- /dev/null
+++ b/check/gtk/renderproto.pc
@@ -0,0 +1,9 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: RenderProto
+Description: Render extension headers
+Version: 0.11.1
+Cflags: -I${includedir}
diff --git a/check/gtk/x11.pc b/check/gtk/x11.pc
new file mode 100644
index 0000000..695b925
--- /dev/null
+++ b/check/gtk/x11.pc
@@ -0,0 +1,15 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+xthreadlib=-lpthread
+
+Name: X11
+Description: X Library
+Version: 1.4.3
+Requires: xproto kbproto
+Requires.private: xcb >= 1.1.92
+Cflags: -I${includedir}
+Libs: -L${libdir} -lX11
+Libs.private: -lpthread
diff --git a/check/gtk/xau.pc b/check/gtk/xau.pc
new file mode 100644
index 0000000..805a16f
--- /dev/null
+++ b/check/gtk/xau.pc
@@ -0,0 +1,11 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Xau
+Description: X authorization file management libary
+Version: 1.0.6
+Requires: xproto
+Cflags: -I${includedir}
+Libs: -L${libdir} -lXau
diff --git a/check/gtk/xcb.pc b/check/gtk/xcb.pc
new file mode 100644
index 0000000..035e3a2
--- /dev/null
+++ b/check/gtk/xcb.pc
@@ -0,0 +1,13 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+xcbproto_version=1.6
+
+Name: XCB
+Description: X-protocol C Binding
+Version: 1.7
+Requires.private: xau >= 0.99.2
+Libs: -L${libdir} -lxcb
+Libs.private:
+Cflags: -I${includedir}
diff --git a/check/gtk/xproto.pc b/check/gtk/xproto.pc
new file mode 100644
index 0000000..3657d22
--- /dev/null
+++ b/check/gtk/xproto.pc
@@ -0,0 +1,10 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+includex11dir=${includedir}/X11
+
+Name: Xproto
+Description: Xproto headers
+Version: 7.0.22
+Cflags: -I${includedir}
diff --git a/check/gtk/xrender.pc b/check/gtk/xrender.pc
new file mode 100644
index 0000000..c4a4854
--- /dev/null
+++ b/check/gtk/xrender.pc
@@ -0,0 +1,12 @@
+prefix=/gtk
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Xrender
+Description: X Render Library
+Version: 0.9.6
+Requires: xproto renderproto >= 0.9 x11
+Requires.private: x11
+Cflags: -I${includedir}
+Libs: -L${libdir} -lXrender
diff --git a/check/inst-uninstalled.pc b/check/inst-uninstalled.pc
new file mode 100644
index 0000000..3283a26
--- /dev/null
+++ b/check/inst-uninstalled.pc
@@ -0,0 +1,11 @@
+prefix=${pc_top_builddir}
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Uninstalled test package
+Description: Test package for checking -uninstalled behavior
+Version: 2.0.0
+Requires:
+Libs: -L${libdir} -linst
+Cflags: -I${includedir}
diff --git a/check/inst.pc b/check/inst.pc
new file mode 100644
index 0000000..64d8d58
--- /dev/null
+++ b/check/inst.pc
@@ -0,0 +1,11 @@
+prefix=/inst
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Installed test package
+Description: Test package for checking -uninstalled behavior
+Version: 1.0.0
+Requires:
+Libs: -L${libdir} -linst
+Cflags: -I${includedir}
diff --git a/check/no-variables.pc b/check/no-variables.pc
new file mode 100644
index 0000000..20bcaa6
--- /dev/null
+++ b/check/no-variables.pc
@@ -0,0 +1,3 @@
+Name: No Variables
+Description: Test package having no variables to check --print-variables
+Version: 4.2
diff --git a/check/non-l-required.pc b/check/non-l-required.pc
new file mode 100644
index 0000000..7e398e2
--- /dev/null
+++ b/check/non-l-required.pc
@@ -0,0 +1,5 @@
+Name: Non-l flags required test package
+Description: Test package for checking order of non-L Libs & Cflags
+Version: 1.0.0
+Libs: /non-l-required.a -pthread
+Cflags: -I/non-l-required/include
diff --git a/check/non-l.pc b/check/non-l.pc
new file mode 100644
index 0000000..cf7ea5e
--- /dev/null
+++ b/check/non-l.pc
@@ -0,0 +1,6 @@
+Name: Non-l flags test package
+Description: Test package for checking order of non-L Libs & Cflags
+Version: 1.0.0
+Requires: non-l-required
+Libs: /non-l.a
+Cflags: -I/non-l/include
diff --git a/check/other.pc b/check/other.pc
new file mode 100644
index 0000000..4f4f141
--- /dev/null
+++ b/check/other.pc
@@ -0,0 +1,10 @@
+prefix=/other
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Other Cflags and Libs test
+Description: Test package for testing variants of --cflags and --libs
+Version: 1.0.0
+Libs: -L${libdir} -Wl,--as-needed -lother
+Cflags: -I${includedir} -DOTHER
diff --git a/check/public-dep.pc b/check/public-dep.pc
index 66af831..e450e46 100644
--- a/check/public-dep.pc
+++ b/check/public-dep.pc
@@ -1,5 +1,6 @@
Name: Requires test package
Description: Dummy pkgconfig test package for testing Requires/Requires.private
Version: 1.0.0
+Requires.private:
Libs: -L/public-dep/lib -lpublic-dep
Cflags: -I/public-dep/include
diff --git a/check/requires-test.pc b/check/requires-test.pc
index ed836cf..e483db2 100644
--- a/check/requires-test.pc
+++ b/check/requires-test.pc
@@ -1,8 +1,8 @@
Name: Requires test package
Description: Dummy pkgconfig test package for testing Requires/Requires.private
Version: 1.0.0
-Requires: public-dep
-Requires.private: private-dep
+Requires: public-dep >= 1
+Requires.private: private-dep >= 1
Libs: -L/requires-test/lib -lrequires-test
Cflags: -I/requires-test/include
diff --git a/check/requires-version-1.pc b/check/requires-version-1.pc
new file mode 100644
index 0000000..5e1e4ea
--- /dev/null
+++ b/check/requires-version-1.pc
@@ -0,0 +1,4 @@
+Name: Requires version test package 1
+Description: Test version comparisons in Requires
+Version: 1.0.0
+Requires: public-dep != 1.0.0
diff --git a/check/requires-version-2.pc b/check/requires-version-2.pc
new file mode 100644
index 0000000..3f74571
--- /dev/null
+++ b/check/requires-version-2.pc
@@ -0,0 +1,5 @@
+Name: Requires version test package 2
+Description: Test version comparisons in Requires
+Version: 1.0.0
+Requires: public-dep >= 1 simple > 0
+Requires.private: private-dep = 1.0.0
diff --git a/check/requires-version-3.pc b/check/requires-version-3.pc
new file mode 100644
index 0000000..c781a7b
--- /dev/null
+++ b/check/requires-version-3.pc
@@ -0,0 +1,5 @@
+Name: Requires version test package 3
+Description: Test version comparisons in Requires
+Version: 1.0.0
+Requires: public-dep <= 1.0.0 simple < 999
+Requires.private: private-dep != 4.0
diff --git a/check/sort-order-1-1.pc b/check/sort-order-1-1.pc
new file mode 100644
index 0000000..adead0a
--- /dev/null
+++ b/check/sort-order-1-1.pc
@@ -0,0 +1,10 @@
+prefix=/path1
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 1-1
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O1 -lpath1
+Cflags: -I${includedir} -DPATH1
diff --git a/check/sort-order-1-2.pc b/check/sort-order-1-2.pc
new file mode 100644
index 0000000..85cc278
--- /dev/null
+++ b/check/sort-order-1-2.pc
@@ -0,0 +1,10 @@
+prefix=/path1
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 1-2
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O1 -lpath1
+Cflags: -I${includedir} -DPATH1
diff --git a/check/sort-order-1-3.pc b/check/sort-order-1-3.pc
new file mode 100644
index 0000000..a910756
--- /dev/null
+++ b/check/sort-order-1-3.pc
@@ -0,0 +1,11 @@
+prefix=/path1
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 1-3
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O1 -lpath1
+Cflags: -I${includedir} -DPATH1
+Requires: sort-order-2-3
diff --git a/check/sort/sort-order-2-1.pc b/check/sort/sort-order-2-1.pc
new file mode 100644
index 0000000..3baebdc
--- /dev/null
+++ b/check/sort/sort-order-2-1.pc
@@ -0,0 +1,11 @@
+prefix=/path2
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 2-1
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O2 -lpath2
+Cflags: -I${includedir} -DPATH2
+Requires: sort-order-1-1
diff --git a/check/sort/sort-order-2-2.pc b/check/sort/sort-order-2-2.pc
new file mode 100644
index 0000000..0991aa5
--- /dev/null
+++ b/check/sort/sort-order-2-2.pc
@@ -0,0 +1,11 @@
+prefix=/path2
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 2-2
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O2 -lpath2
+Cflags: -I${includedir} -DPATH2
+Requires: sort-order-1-2
diff --git a/check/sort/sort-order-2-3.pc b/check/sort/sort-order-2-3.pc
new file mode 100644
index 0000000..7230a26
--- /dev/null
+++ b/check/sort/sort-order-2-3.pc
@@ -0,0 +1,11 @@
+prefix=/path2
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 2-3
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O2 -lpath2
+Cflags: -I${includedir} -DPATH2
+Requires: sort-order-3-3
diff --git a/check/sort/sort/sort-order-3-1.pc b/check/sort/sort/sort-order-3-1.pc
new file mode 100644
index 0000000..03e0679
--- /dev/null
+++ b/check/sort/sort/sort-order-3-1.pc
@@ -0,0 +1,11 @@
+prefix=/path3
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 3-1
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O3 -lpath3
+Cflags: -I${includedir} -DPATH3
+Requires: sort-order-2-1
diff --git a/check/sort/sort/sort-order-3-2.pc b/check/sort/sort/sort-order-3-2.pc
new file mode 100644
index 0000000..0a1504f
--- /dev/null
+++ b/check/sort/sort/sort-order-3-2.pc
@@ -0,0 +1,11 @@
+prefix=/path3
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 3-2
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O3 -lpath3
+Cflags: -I${includedir} -DPATH3
+Requires: sort-order-2-2 sort-order-1-2
diff --git a/check/sort/sort/sort-order-3-3.pc b/check/sort/sort/sort-order-3-3.pc
new file mode 100644
index 0000000..e7bdcd6
--- /dev/null
+++ b/check/sort/sort/sort-order-3-3.pc
@@ -0,0 +1,10 @@
+prefix=/path3
+exec_prefix=${prefix}
+libdir="${exec_prefix}/lib"
+includedir="${prefix}/include"
+
+Name: Sort order Cflags and Libs test 3-3
+Description: Test package for testing flag sort order
+Version: 1.0.0
+Libs: -L${libdir} -Wl,-O3 -lpath3
+Cflags: -I${includedir} -DPATH3
diff --git a/check/sub/sub1.pc b/check/sub/sub1.pc
new file mode 100644
index 0000000..beac16b
--- /dev/null
+++ b/check/sub/sub1.pc
@@ -0,0 +1,5 @@
+Name: Subdirectory package 1
+Description: Test package 1 for subdirectory
+Version: 1.0.0
+Libs: -L/sub/lib -lsub1
+Cflags: -I/sub/include
diff --git a/check/sub/sub2.pc b/check/sub/sub2.pc
new file mode 100644
index 0000000..6a31909
--- /dev/null
+++ b/check/sub/sub2.pc
@@ -0,0 +1,5 @@
+Name: Subdirectory package 2
+Description: Test package 2 for subdirectory
+Version: 2.0.0
+Libs: -L/sub/lib -lsub2
+Cflags: -I/sub/include
diff --git a/check/tilde.pc b/check/tilde.pc
new file mode 100644
index 0000000..c3babc1
--- /dev/null
+++ b/check/tilde.pc
@@ -0,0 +1,5 @@
+Name: tilde
+Description: tilde test module
+Version: 1.0
+Libs: -L~
+Cflags: -I~