diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2012-10-01 22:33:38 -0700 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2012-10-03 05:33:31 -0700 |
commit | 9a54c588a5a5f2722987f70318b15ffd7d46bdf5 (patch) | |
tree | ef6cb050ae8a88cea890ee5f8ecee97f507ab759 | |
parent | 0a5d54d091a421b00dd2c80bc3cf4b51f1d63740 (diff) | |
download | pkg-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.
-rw-r--r-- | check/Makefile.am | 3 | ||||
-rwxr-xr-x | check/check-cflags | 9 | ||||
-rwxr-xr-x | check/check-libs | 12 | ||||
-rw-r--r-- | check/other.pc | 10 |
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 |