diff m4/ltoptions.m4 @ 20:dd5b333a7960

Regenerate Autotools files myself with Ron's patch
author Adam Chlipala <adam@chlipala.net>
date Sat, 23 Jun 2012 09:58:31 -0400
parents a40cf9c8d615
children
line wrap: on
line diff
--- a/m4/ltoptions.m4	Sun Jun 17 20:41:54 2012 +0200
+++ b/m4/ltoptions.m4	Sat Jun 23 09:58:31 2012 -0400
@@ -326,9 +326,24 @@
 # 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])