diff mbox

[google] Modify --with-pic to accept a list of library names

Message ID 20110131165638.C85211C6D12@hpgntab-ubiq73.eem.corp.google.com
State New
Headers show

Commit Message

Simon Baldwin Jan. 31, 2011, 4:56 p.m. UTC
Modify --with-pic to accept a list of library names.

Modify the --with-pic configuration option to accept a list of library names.
In this mode, the specified libraries are built with -fPIC, whereas all
other libraries are built in the default mode.

This is needed so that libgfortran.a can be included in shared libraries
without affecting the behavior of other static runtime libraries.

ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* ltoptions.m4: modify --with-pic to accept a list of library names.

libgomp/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

zlib/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libstdc++-v3/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libmudflap/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

boehm-gc/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libjava/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

gcc/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libobjc/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libgfortran/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libffi/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

libssp/ChangeLog.google:
2011-01-31  Simon Baldwin  <simonb@google.com>

	* configure: Rebuild.

Google ref: 39425, 35436, 23273

Comments

Diego Novillo Jan. 31, 2011, 5:20 p.m. UTC | #1
On Mon, Jan 31, 2011 at 11:56, Simon Baldwin <simonb@google.com> wrote:

> Index: ltoptions.m4
> ===================================================================
> --- ltoptions.m4        (revision 169440)
> +++ ltoptions.m4        (working copy)
> @@ -328,7 +328,22 @@ m4_define([_LT_WITH_PIC],
>  [AC_ARG_WITH([pic],
>     [AS_HELP_STRING([--with-pic],
>        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
> -    [pic_mode="$withval"],
> +    [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 pkg in "$withval"; do

Could you remove the quotes around $withval.  This prevents the
expansion of more than a single entry in --with-pic.  Ollie, I *think*
this is the bug you were referring to when I couldn't get
--with-pic=lib1,lib2,lib3 to work.  Is that right?


Thanks.  Diego.
Ollie Wild Jan. 31, 2011, 5:34 p.m. UTC | #2
On Mon, Jan 31, 2011 at 11:20 AM, Diego Novillo <dnovillo@google.com> wrote:
>
> Could you remove the quotes around $withval.  This prevents the
> expansion of more than a single entry in --with-pic.  Ollie, I *think*
> this is the bug you were referring to when I couldn't get
> --with-pic=lib1,lib2,lib3 to work.  Is that right?

Yes, that's correct.  There were other changes, but that's the important one.

Ollie
Ralf Wildenhues Jan. 31, 2011, 6:59 p.m. UTC | #3
* Ollie Wild wrote on Mon, Jan 31, 2011 at 06:34:30PM CET:
> On Mon, Jan 31, 2011 at 11:20 AM, Diego Novillo wrote:
> >
> > Could you remove the quotes around $withval.  This prevents the
> > expansion of more than a single entry in --with-pic.  Ollie, I *think*
> > this is the bug you were referring to when I couldn't get
> > --with-pic=lib1,lib2,lib3 to work.  Is that right?
> 
> Yes, that's correct.  There were other changes, but that's the important one.

Another item already fixed in upstream Libtool ...
Simon Baldwin Feb. 1, 2011, 10:48 a.m. UTC | #4
On 31 January 2011 18:20, Diego Novillo <dnovillo@google.com> wrote:
>
> On Mon, Jan 31, 2011 at 11:56, Simon Baldwin <simonb@google.com> wrote:
>
> > Index: ltoptions.m4
> > ===================================================================
> > --- ltoptions.m4        (revision 169440)
> > +++ ltoptions.m4        (working copy)
> > @@ -328,7 +328,22 @@ m4_define([_LT_WITH_PIC],
> >  [AC_ARG_WITH([pic],
> >     [AS_HELP_STRING([--with-pic],
> >        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
> > -    [pic_mode="$withval"],
> > +    [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 pkg in "$withval"; do
>
> Could you remove the quotes around $withval.  This prevents the
> expansion of more than a single entry in --with-pic.  Ollie, I *think*
> this is the bug you were referring to when I couldn't get
> --with-pic=lib1,lib2,lib3 to work.  Is that right?

Done.  Patch diff below.  PTAL.  Thanks.

*** ../39425.patch:1	Mon Jan 31 17:54:30 2011
--- ../39425.patch	Tue Feb  1 11:41:29 2011
***************
*** 86,92 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 86,92 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 132,138 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 132,138 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 178,184 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 178,184 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 278,284 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 278,284 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 324,330 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 324,330 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 370,376 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 370,376 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 425,431 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 425,431 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 471,477 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 471,477 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 526,532 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 526,532 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 572,578 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 572,578 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 618,624 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 618,624 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
***************
*** 664,670 ****
  +      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 pkg in "$withval"; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes
--- 664,670 ----
  +      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 pkg in $withval; do
  +	IFS="$lt_save_ifs"
  +	if test "X$pkg" = "X$p"; then
  +	  pic_mode=yes

--
Google UK Limited | Registered Office: Belgrave House, 76 Buckingham
Palace Road, London SW1W 9TQ | Registered in England Number: 3977902
Diego Novillo Feb. 1, 2011, 2:24 p.m. UTC | #5
On Tue, Feb 1, 2011 at 05:48, Simon Baldwin <simonb@google.com> wrote:

> *** ../39425.patch:1    Mon Jan 31 17:54:30 2011
> --- ../39425.patch      Tue Feb  1 11:41:29 2011
> ***************
> *** 86,92 ****
>  +      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 pkg in "$withval"; do
>  +     IFS="$lt_save_ifs"
>  +     if test "X$pkg" = "X$p"; then
>  +       pic_mode=yes
> --- 86,92 ----
>  +      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 pkg in $withval; do
>  +     IFS="$lt_save_ifs"
>  +     if test "X$pkg" = "X$p"; then
>  +       pic_mode=yes

OK.


Diego.
diff mbox

Patch

Index: libgomp/configure
===================================================================
--- libgomp/configure	(revision 169440)
+++ libgomp/configure	(working copy)
@@ -7684,7 +7684,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -11090,7 +11105,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11093 "configure"
+#line 11108 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11196,7 +11211,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11199 "configure"
+#line 11214 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: zlib/configure
===================================================================
--- zlib/configure	(revision 169440)
+++ zlib/configure	(working copy)
@@ -6961,7 +6961,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -10394,7 +10409,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10397 "configure"
+#line 10412 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10500,7 +10515,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10503 "configure"
+#line 10518 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: libstdc++-v3/configure
===================================================================
--- libstdc++-v3/configure	(revision 169440)
+++ libstdc++-v3/configure	(working copy)
@@ -8057,7 +8057,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -11490,7 +11505,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11493 "configure"
+#line 11508 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11596,7 +11611,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11599 "configure"
+#line 11614 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14958,7 +14973,7 @@  fi
     #
     # Fake what AC_TRY_COMPILE does.  XXX Look at redoing this new-style.
     cat > conftest.$ac_ext << EOF
-#line 14961 "configure"
+#line 14976 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -15326,7 +15341,7 @@  $as_echo "$glibcxx_cv_atomic_long_long" 
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15329 "configure"
+#line 15344 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15363,7 +15378,7 @@  $as_echo "$glibcxx_cv_atomic_bool" >&6; 
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15366 "configure"
+#line 15381 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15400,7 +15415,7 @@  $as_echo "$glibcxx_cv_atomic_short" >&6;
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15403 "configure"
+#line 15418 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15438,7 +15453,7 @@  $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15441 "configure"
+#line 15456 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -15514,7 +15529,7 @@  $as_echo "$as_me: WARNING: Performance o
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 15517 "configure"
+#line 15532 "configure"
 int main()
 {
   _Decimal32 d1;
Index: libmudflap/configure
===================================================================
--- libmudflap/configure	(revision 169440)
+++ libmudflap/configure	(working copy)
@@ -7709,7 +7709,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -11115,7 +11130,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11118 "configure"
+#line 11133 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11221,7 +11236,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11224 "configure"
+#line 11239 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: boehm-gc/configure
===================================================================
--- boehm-gc/configure	(revision 169440)
+++ boehm-gc/configure	(working copy)
@@ -7965,7 +7965,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -11398,7 +11413,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11401 "configure"
+#line 11416 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11504,7 +11519,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11507 "configure"
+#line 11522 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: libjava/configure
===================================================================
--- libjava/configure	(revision 169440)
+++ libjava/configure	(working copy)
@@ -9922,7 +9922,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -13355,7 +13370,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13358 "configure"
+#line 13373 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13461,7 +13476,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13464 "configure"
+#line 13479 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -19462,7 +19477,7 @@  if test "${enable_sjlj_exceptions+set}" 
   enableval=$enable_sjlj_exceptions; :
 else
   cat > conftest.$ac_ext << EOF
-#line 19465 "configure"
+#line 19480 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
Index: gcc/configure
===================================================================
--- gcc/configure	(revision 169440)
+++ gcc/configure	(working copy)
@@ -14162,7 +14162,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -17568,7 +17583,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17571 "configure"
+#line 17586 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -17674,7 +17689,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 17677 "configure"
+#line 17692 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: libobjc/configure
===================================================================
--- libobjc/configure	(revision 169440)
+++ libobjc/configure	(working copy)
@@ -7158,7 +7158,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -10591,7 +10606,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10594 "configure"
+#line 10609 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10697,7 +10712,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10700 "configure"
+#line 10715 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11480,7 +11495,7 @@  if test "${enable_sjlj_exceptions+set}" 
   enableval=$enable_sjlj_exceptions; :
 else
   cat > conftest.$ac_ext << EOF
-#line 11483 "configure"
+#line 11498 "configure"
 @interface Frob
 @end
 @implementation Frob
Index: libgfortran/configure
===================================================================
--- libgfortran/configure	(revision 169440)
+++ libgfortran/configure	(working copy)
@@ -7945,7 +7945,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -11378,7 +11393,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11381 "configure"
+#line 11396 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11484,7 +11499,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11487 "configure"
+#line 11502 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: libffi/configure
===================================================================
--- libffi/configure	(revision 169440)
+++ libffi/configure	(working copy)
@@ -7368,7 +7368,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -10774,7 +10789,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10777 "configure"
+#line 10792 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10880,7 +10895,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10883 "configure"
+#line 10898 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: libssp/configure
===================================================================
--- libssp/configure	(revision 169440)
+++ libssp/configure	(working copy)
@@ -7214,7 +7214,22 @@  fi
 
 # Check whether --with-pic was given.
 if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
+  withval=$with_pic; 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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
 else
   pic_mode=default
 fi
@@ -10647,7 +10662,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10650 "configure"
+#line 10665 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10753,7 +10768,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10756 "configure"
+#line 10771 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
Index: ltoptions.m4
===================================================================
--- ltoptions.m4	(revision 169440)
+++ ltoptions.m4	(working copy)
@@ -328,7 +328,22 @@  m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
     [AS_HELP_STRING([--with-pic],
 	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
+    [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 pkg in "$withval"; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$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])