about summary refs log tree commit diff
path: root/m4/ltoptions.m4
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-08-07 14:23:24 +0200
committerMichael Biebl <biebl@debian.org>2012-08-07 14:23:24 +0200
commit7f1d08cf21e97f5e60d4636bb1e6c287c34ee2df (patch)
tree25da3ad8d884f15bde3c263281680a5fc3ea80e0 /m4/ltoptions.m4
parent867254ea7c2b193fecf8cd36cc6e5dc53c290d92 (diff)
Imported Upstream version 0.9.5.96 upstream/0.9.5.96
Diffstat (limited to 'm4/ltoptions.m4')
-rw-r--r--m4/ltoptions.m419
1 files changed, 17 insertions, 2 deletions
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 17cfd51c..5d9acd8e 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for lt_pkg in $withval; do
+	IFS="$lt_save_ifs"
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
     [pic_mode=default])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])