summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
Diffstat (limited to 'check')
-rw-r--r--check/Makefile.am1
-rwxr-xr-xcheck/check-relocatable7
-rw-r--r--check/pkgconfig/empty-prefix.pc10
3 files changed, 18 insertions, 0 deletions
diff --git a/check/Makefile.am b/check/Makefile.am
index f6d88e9..cf26019 100644
--- a/check/Makefile.am
+++ b/check/Makefile.am
@@ -99,6 +99,7 @@ EXTRA_DIST = \
gtk/xproto.pc \
gtk/xrender.pc \
tilde.pc \
+ pkgconfig/empty-prefix.pc \
pkgconfig/prefixdef.pc \
pkgconfig/prefixdef-expanded.pc \
pcfiledir.pc \
diff --git a/check/check-relocatable b/check/check-relocatable
index 589eddf..40c2c88 100755
--- a/check/check-relocatable
+++ b/check/check-relocatable
@@ -44,3 +44,10 @@ for pkg in prefixdef prefixdef-expanded; do
RESULT="-I/reloc/include -L/reloc/lib -lfoo"
run_test --dont-define-prefix --cflags --libs $pkg
done
+
+# Test prefix redefinition for .pc files with an empty prefix. In this
+# case, there should be no prefix adjustment to the other variables. The
+# result should be the same regardless of prefix redefinition.
+RESULT="-I/some/path/include -L/some/path/lib -lfoo"
+run_test --define-prefix --cflags --libs empty-prefix
+run_test --dont-define-prefix --cflags --libs empty-prefix
diff --git a/check/pkgconfig/empty-prefix.pc b/check/pkgconfig/empty-prefix.pc
new file mode 100644
index 0000000..9007250
--- /dev/null
+++ b/check/pkgconfig/empty-prefix.pc
@@ -0,0 +1,10 @@
+prefix=
+libdir=/some/path/lib
+includedir=/some/path/include
+
+Name: Empty prefix redefinition test
+Description: Test pkg-config empty prefix redefinition
+Version: 1.0.0
+Requires:
+Libs: -L${libdir} -lfoo
+Cflags: -I${includedir}