libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Libtool branch, master, updated. v2.4-25-g2a736ed


From: Ralf Wildenhues
Subject: [SCM] GNU Libtool branch, master, updated. v2.4-25-g2a736ed
Date: Wed, 10 Nov 2010 21:41:33 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  2a736edf3ee2432e204157f7d535afc09bb53e36 (commit)
      from  5ca9b3ec6b8be1cdd9713845b3e7cf389cc17ae4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2a736edf3ee2432e204157f7d535afc09bb53e36
Author: Ollie Wild <address@hidden>
Date:   Wed Nov 10 21:06:50 2010 +0100

    Modify --with-pic to support per-package configurations.
    
    * libltdl/m4/libtool.m4:  Modify --with-pic to accept a list of
    package names.  Modelled off --enable-shared.
    * tests/with-pic.at: New test.
    * Makefile.am (TESTSUITE_AT): Add tests/with-pic.at.
    * doc/libtool.texi (LT_INIT): Enhance documentation of
    --with-pic configure flag.
    * NEWS (New features): Mention that --with-pic now accepts a
    comma-separated list of package names.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                          |   12 +++++++++
 Makefile.am                        |    1 +
 NEWS                               |    6 ++++
 doc/libtool.texi                   |   17 ++++++++++--
 libltdl/m4/ltoptions.m4            |   19 ++++++++++++-
 tests/{pic_flag.at => with-pic.at} |   49 +++++++++++++++++-------------------
 6 files changed, 73 insertions(+), 31 deletions(-)
 copy tests/{pic_flag.at => with-pic.at} (50%)

diff --git a/ChangeLog b/ChangeLog
index 9c169e0..97b9448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-07  Ollie Wild  <address@hidden>
+
+       Modify --with-pic to support per-package configurations.
+       * libltdl/m4/libtool.m4:  Modify --with-pic to accept a list of
+       package names.  Modelled off --enable-shared.
+       * tests/with-pic.at: New test.
+       * Makefile.am (TESTSUITE_AT): Add tests/with-pic.at.
+       * doc/libtool.texi (LT_INIT): Enhance documentation of
+       --with-pic configure flag.
+       * NEWS (New features): Mention that --with-pic now accepts a
+       comma-separated list of package names.
+
 2010-11-10  Ralf Wildenhues  <address@hidden>
 
        Fix cwrapper test failure with --disable-static.
diff --git a/Makefile.am b/Makefile.am
index db2c0a9..66f38b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -502,6 +502,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/ctor.at \
                  tests/exceptions.at \
                  tests/early-libtool.at \
+                 tests/with-pic.at \
                  tests/no-executables.at \
                  tests/deplibs-ident.at \
                  tests/configure-iface.at \
diff --git a/NEWS b/NEWS
index d8d692e..6930274 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ NEWS - list of user-visible changes between releases of GNU 
Libtool
 
 New in 2.4.2 2010-12-??: git version 2.4.1a, Libtool team:
 
+* New features:
+
+  - The --with-pic configure option now supports a list of comma-separated
+    package names.  This can be used to build some static libraries with PIC
+    objects while building others with non-PIC objects.
+
 * Bug fixes:
 
   - The generic approximation of the command line length limit (when getconf is
diff --git a/doc/libtool.texi b/doc/libtool.texi
index 2f48a09..5c2570d 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -2042,9 +2042,10 @@ LT_PREREQ(address@hidden)
 @defmac LT_INIT (@var{options})
 @defmacx AC_PROG_LIBTOOL
 @defmacx AM_PROG_LIBTOOL
-Add support for the @option{--enable-shared} and @option{--disable-shared}
address@hidden address@hidden@code{LT_INIT} requires that
-you define the @file{Makefile} variable @code{top_builddir} in your
+Add support for the @option{--enable-shared}, @option{--disable-shared},
address@hidden, @option{--disable-static}, @option{--with-pic}, and
address@hidden @code{configure} address@hidden@code{LT_INIT} requires
+that you define the @file{Makefile} variable @code{top_builddir} in your
 @file{Makefile.in}.  Automake does this automatically, but Autoconf
 users should set it to the relative path to the top of your build
 directory (@file{../..}, for example).}  @code{AC_PROG_LIBTOOL} and
@@ -2086,6 +2087,16 @@ behaves similarly, but it uses @option{--enable-static} 
and
 The package name @samp{default} matches any packages that have not set
 their name in the @code{PACKAGE} environment variable.
 
+The @option{--with-pic} and @option{--without-pic} configure flags can be used
+to specify whether or not @command{libtool} uses PIC objects.  By default,
address@hidden uses PIC objects for shared libraries and non-PIC objects for
+static libraries.  The @option{--with-pic} option also accepts a 
comma-separated
+list of package names.  Specifying @address@hidden is the same
+as configuring every package in @var{pkgs} with @option{--with-pic} and every
+other package with the default configuration.  The package name @samp{default}
+is treated the same as for @option{--enable-shared} and
address@hidden
+
 This macro also sets the shell variable @code{LIBTOOL_DEPS}, that you
 can use to automatically update the libtool script if it becomes
 out-of-date.  In order to do that, add to your @file{configure.ac}:
diff --git a/libltdl/m4/ltoptions.m4 b/libltdl/m4/ltoptions.m4
index 17cfd51..5d9acd8 100644
--- a/libltdl/m4/ltoptions.m4
+++ b/libltdl/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])
diff --git a/tests/pic_flag.at b/tests/with-pic.at
similarity index 50%
copy from tests/pic_flag.at
copy to tests/with-pic.at
index fb39f7f..c01e5d7 100644
--- a/tests/pic_flag.at
+++ b/tests/with-pic.at
@@ -1,4 +1,4 @@
-# pic_flag.at -- override the pic_flag at configure time   -*- Autotest -*-
+# with-pic.at -- test the --with-pic flag -*- Autotest -*-
 
 #   Copyright (C) 2010 Free Software Foundation, Inc.
 #
@@ -21,36 +21,33 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ####
 
-AT_SETUP([override pic_flag at configure time])
+AT_SETUP([test --with-pic])
+eval `$LIBTOOL --config | $EGREP '^(pic_flag|FGREP)='`
 
-# Just try to configure the Libtool package with -fpic if we can compile
-# with it, for C and C++.
+AT_CHECK([test "z$pic_flag" != "z" || exit 77])
+AT_CHECK([test "$at_srcdir" != . || exit 77])
+
+CONFIGURE=$abs_top_srcdir/tests/demo/configure
+: ${MAKE=make}
 
-AT_DATA([foo.c],
-[[int data = 42;
-int func(void) { return data; }
-]])
+LT_AT_CONFIGURE([--disable-shared --with-pic=no], [$CONFIGURE])
+AT_CHECK([$MAKE], [], [stdout], [ignore])
+AT_CHECK([$FGREP -v "$pic_flag" stdout], [], [ignore], [ignore])
+$MAKE clean
 
-cp foo.c foo.cpp
-C_pic_flag='-fpic -DPIC'
-AT_CHECK([$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77],
-        [], [stdout], [stderr])
-# The configure test for the PIC flag also checks for warnings.
-AT_CHECK([grep fpic stdout stderr && exit 77], [1])
-AT_CHECK([[grep '[uU]nknown.*option' stdout stderr && exit 77]], [1])
+LT_AT_CONFIGURE([--disable-shared --with-pic=yes], [$CONFIGURE])
+AT_CHECK([$MAKE], [], [stdout], [ignore])
+AT_CHECK([$FGREP "$pic_flag" stdout], [], [ignore], [ignore])
+$MAKE clean
 
-CXX_pic_flag='-fpic -DPIC'
-if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else
-  CXX_pic_flag=
-fi
+LT_AT_CONFIGURE([--disable-shared --with-pic="demo,foo,bar"], [$CONFIGURE])
+AT_CHECK([$MAKE], [], [stdout], [ignore])
+AT_CHECK([$FGREP "$pic_flag" stdout], [], [ignore], [ignore])
+$MAKE clean
 
-AT_CHECK([test "$at_srcdir" != . || exit 77])
-LT_AT_CONFIGURE([lt_cv_prog_compiler_pic="$C_pic_flag" ]dnl
-               [lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag"],
-               ["$abs_top_srcdir"/configure])
-: ${MAKE=make}
+LT_AT_CONFIGURE([--disable-shared --with-pic="foo,bar"], [$CONFIGURE])
 AT_CHECK([$MAKE], [], [stdout], [ignore])
-AT_CHECK([if ./libtool --features | grep 'enable shared libraries'; then ]dnl
-        [  grep ' -fpic' stdout; else exit 77; fi], [], [ignore], [ignore])
+AT_CHECK([$FGREP -v "$pic_flag" stdout], [], [ignore], [ignore])
+$MAKE clean
 
 AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



reply via email to

[Prev in Thread] Current Thread [Next in Thread]