From: Thomas Tanner Date: Mon, 10 Apr 2000 18:39:30 +0000 (+0000) Subject: * NEWS: update X-Git-Tag: release-1-3d~187 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d604f0951bea3e92b205cdfab9597e05af32eae8;p=thirdparty%2Flibtool.git * 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 --- diff --git a/ChangeLog b/ChangeLog index c98f9bd3a..986385029 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-04-11 Thomas Tanner + + * 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 * ltmain.in (tmpdir): Do not accept an existing directory, and diff --git a/NEWS b/NEWS index b2f8c70cc..47c3a7c65 100644 --- 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. diff --git a/libtool.m4 b/libtool.m4 index c380eae85..954a806cb 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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, diff --git a/ltconfig.in b/ltconfig.in index 413d10f4f..e41004a90 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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 diff --git a/ltmain.in b/ltmain.in index e344fbf33..31b24fb47 100644 --- 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