]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* NEWS: update
authorThomas Tanner <tanner@ffii.org>
Mon, 10 Apr 2000 18:39:30 +0000 (18:39 +0000)
committerThomas Tanner <tanner@gmx.de>
Mon, 10 Apr 2000 18:39:30 +0000 (18:39 +0000)
* libtool.m4: add AC_LIBTOOL_PICMODE
* ltconfig.in: move pic_mode checks to ltmain.in
* ltmain.in: add -prefer-pic and -prefer-non-pic

ChangeLog
NEWS
libtool.m4
ltconfig.in
ltmain.in

index c98f9bd3af8c9422c56b8599b11421b360ab071d..986385029e4c449c8417851119a31ce4150a9a1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-04-11  Thomas Tanner  <tanner@ffii.org>
+
+       * NEWS: update
+       * libtool.m4: add AC_LIBTOOL_PICMODE
+       * ltconfig.in: move pic_mode checks to ltmain.in
+       * ltmain.in: add -prefer-pic and -prefer-non-pic
+       
 2000-03-29  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
 
        * ltmain.in (tmpdir): Do not accept an existing directory, and
diff --git a/NEWS b/NEWS
index b2f8c70ccf32f0752a6ab93e368c2df749315d25..47c3a7c655f16fcada61a02f6403c5365418b8c7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,8 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
 New in 1.3d: 2000-??-??; CVS version 1.3c, Libtool team:
 * New -no-install flag to avoid the use of executable wrapper scripts.
-* New --with-pic flag to control the generation of PIC/non-PIC code.
+* New --with-pic, -prefer-pic and -prefer-non-pic flags to control
+  the generation of PIC/non-PIC code.
 * New --build flag to ltconfig to help with build cross compilation
   environments is inherited from --build flag passed to configure.
 * Support for hardcoding run-time paths (-R) into libraries.
index c380eae8517fd90d9b0f2bf1b11b61fd72cacf1c..954a806cbc11c47400635f1f50c1eb2ebd3b56f5 100644 (file)
@@ -282,10 +282,17 @@ esac],
 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
 ])
 
-# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
+# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 AC_ENABLE_FAST_INSTALL(no)])
 
+# AC_LIBTOOL_PICMODE - implement the --with-pic flag
+# Usage: AC_LIBTOOL_PICMODE[(MODE)]
+#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
+#   `both'.
+AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)])
+
 
 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 AC_DEFUN(AC_PATH_TOOL_PREFIX,
index 413d10f4f3dae2f393bc7f5bd7a888a110c34034..e41004a905879bc7f57b6f98fedac718b2535c97 100755 (executable)
@@ -2015,16 +2015,6 @@ fi
 
 # Check whether we must set pic_mode to default
 test -z "$pic_flag" && pic_mode=default
-# On Cygwin there's no "real" PIC flag so we must build both object types
-case "$host_os" in
-cygwin* | mingw* | os2*)
-  pic_mode=default
-  ;;
-esac
-if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
-  # non-PIC code in shared libraries is not supported
-  pic_mode=default
-fi
 
 if test "x$enable_dlopen" != xyes; then
   enable_dlopen=unknown
index e344fbf3351ecd0753a280c551ac9dc41b9a8254..31b24fb47a4327e8bc1d2d37aa8aa8837814c305 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -316,6 +316,16 @@ if test -z "$show_help"; then
        continue
        ;;
 
+      -prefer-pic)
+       pic_mode=yes
+       continue
+       ;;
+
+      -prefer-non-pic)
+       pic_mode=no
+       continue
+       ;;
+
       -Xcompiler)
        prev=xcompiler
        continue
@@ -448,6 +458,17 @@ if test -z "$show_help"; then
     $run $rm $removelist
     trap "$run $rm $removelist; exit 1" 1 2 15
 
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case "$host_os" in
+    cygwin* | mingw* | os2*)
+      pic_mode=default
+      ;;
+    esac
+    if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
     if test "$compiler_c_o" = no; then