+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
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.
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,
# 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
continue
;;
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+
-Xcompiler)
prev=xcompiler
continue
$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