]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
tests: skip with-pic test when no "real" pic flag is used.
authorPeter Rosin <peda@lysator.liu.se>
Wed, 19 Sep 2012 09:53:02 +0000 (11:53 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Wed, 19 Sep 2012 09:53:02 +0000 (11:53 +0200)
* tests/with-pic.at: Windows uses "-DDLL_EXPORT -DPIC" as the pic
"flag", but never applies it to static libraries. Cater for this
and skip if no "real" pic flag is in use.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
tests/with-pic.at

index cee5e32819be86f86749571143bdf021c9215ac0..915acf598e6d2d768321fc6f8261cc1def7b5a9f 100644 (file)
 AT_SETUP([test --with-pic])
 eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='`
 
-AT_CHECK([test -n "$pic_flag" || exit 77])
+real_pic=false
+case " $pic_flag " in
+[*" "[^" "-]* | *" "-[^D]*]) real_pic=: ;;
+esac
+AT_CHECK([$real_pic || exit 77])
 AT_CHECK([test . != "$at_srcdir" || exit 77])
 
 CONFIGURE=$abs_top_srcdir/tests/demo/configure