summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-10-01 22:33:38 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-10-03 05:33:31 -0700
commit9a54c588a5a5f2722987f70318b15ffd7d46bdf5 (patch)
treeef6cb050ae8a88cea890ee5f8ecee97f507ab759 /check
parent0a5d54d091a421b00dd2c80bc3cf4b51f1d63740 (diff)
downloadpkg-config-9a54c588a5a5f2722987f70318b15ffd7d46bdf5.tar.gz
check: Test all variants of --cflags and --libs
Make sure that the --*-only-* variants of --cflags and --libs do the right thing. This should probably be extended to cover a chain of packages to get the ordering right, but this is good for now.
Diffstat (limited to 'check')
-rw-r--r--check/Makefile.am3
-rwxr-xr-xcheck/check-cflags9
-rwxr-xr-xcheck/check-libs12
-rw-r--r--check/other.pc10
4 files changed, 33 insertions, 1 deletions
diff --git a/check/Makefile.am b/check/Makefile.am
index b077726..89b188e 100644
--- a/check/Makefile.am
+++ b/check/Makefile.am
@@ -37,4 +37,5 @@ EXTRA_DIST = \
sub/sub1.pc \
sub/sub2.pc \
inst.pc \
- inst-uninstalled.pc
+ inst-uninstalled.pc \
+ other.pc
diff --git a/check/check-cflags b/check/check-cflags
index 2f8b5bd..e5dde65 100755
--- a/check/check-cflags
+++ b/check/check-cflags
@@ -9,3 +9,12 @@ run_test --cflags simple
RESULT=""
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
diff --git a/check/check-libs b/check/check-libs
index 37d09b1..2f837fa 100755
--- a/check/check-libs
+++ b/check/check-libs
@@ -13,3 +13,15 @@ run_test --libs simple
RESULT=""
run_test --libs fields-blank
+
+RESULT="-Wl,--as-needed -L/other/lib -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
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