libtool
[Top][All Lists]
Advanced

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

Re: pic-only option not working as expected


From: Ralf Wildenhues
Subject: Re: pic-only option not working as expected
Date: Sat, 22 Jan 2011 20:47:33 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

* John Calcote wrote on Sat, Jan 22, 2011 at 08:42:33PM CET:
> LT_INIT([disable-shared static pic-only])
> ...
> 
> While playing with these options, I noticed that the 'disable-shared'
> and 'static' options seem to have the desired effect, but the 'pic-only'
> option does not. Whether I use 'pic-only' or not, I get the following
> output from 'configure --help':

I was just going to get to this patch tomorrow.  I haven't retested it
and am on a run now.  Can you try it?  Jose reported this to me
off-list.

Thanks,
Ralf

    Fix LT_INIT([pic-only]) semantics.
    
    * libltdl/m4/ltoptions.m4 (_LT_WITH_PIC): Use the macro argument
    for setting the default for pic_mode.
    * tests/pic.at: New file, new test.
    * Makefile.am (TESTSUITE_AT): Update.
    Reports by Jose Marchesi, Luke Mewburn, and John Calcote.

diff --git a/Makefile.am b/Makefile.am
index 15d9404..3c8f213 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -510,6 +510,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/stresstest.at \
                  tests/cmdline_wrap.at \
                  tests/pic_flag.at \
+                 tests/pic.at \
                  tests/old-autotools.at \
                  tests/darwin.at \
                  tests/dumpbin-symbols.at \
diff --git a/libltdl/m4/ltoptions.m4 b/libltdl/m4/ltoptions.m4
index 5d9acd8..91876f0 100644
--- a/libltdl/m4/ltoptions.m4
+++ b/libltdl/m4/ltoptions.m4
@@ -344,7 +344,7 @@ m4_define([_LT_WITH_PIC],
       IFS="$lt_save_ifs"
       ;;
     esac],
-    [pic_mode=default])
+    [pic_mode=m4_default([$1], [default])])
 
 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
diff --git a/tests/pic.at b/tests/pic.at
new file mode 100644
index 0000000..545d9cc
--- /dev/null
+++ b/tests/pic.at
@@ -0,0 +1,38 @@
+# pic.at -- LT_INIT(pic)   -*- Autotest -*-
+
+#   Copyright (C) 2010 Free Software Foundation, Inc.
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([pic-only])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_CONFIG_MACRO_DIR([m4])
+LT_INIT([pic-only])
+AC_OUTPUT
+]])
+
+mkdir m4
+LT_AT_BOOTSTRAP([--install], [], [ignore], [ignore], [], [], [ignore])
+AT_CHECK([./libtool --config | grep pic_mode], [], [pic_mode=yes
+])
+
+AT_CLEANUP



reply via email to

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