| 1 |
dnl /usr/share/aclocal/guidod-cvs/patch_libtool_on_darwin_zsh_overquoting.m4 |
| 2 |
dnl @synopsis PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING |
| 3 |
dnl |
| 4 |
dnl libtool 1.4.x has a bug on darwin where the "zsh" is installed as |
| 5 |
dnl the bourne shell replacement. Of course, the zsh is called in a |
| 6 |
dnl compatibility mode but there is a common problem with it, probably |
| 7 |
dnl a bug of zsh. Newer darwin systems have a "bash" installed now, but |
| 8 |
dnl the configure-default will be "zsh" in most systems still. |
| 9 |
dnl |
| 10 |
dnl The bug revelas itself as an overquoted statement in the libtool |
| 11 |
dnl cmds-spec for sharedlib creation on testing for "module" builds. |
| 12 |
dnl Later libtool has gone rid of it by simply removing the quotes at |
| 13 |
dnl that point . Here we maintain the original style and simply remove |
| 14 |
dnl the extra escape character, i.e. we look for "archive_cmds" and |
| 15 |
dnl replace a sequence of triple-backslash-and-doublequote with |
| 16 |
dnl single-backslash-and-doublequote. |
| 17 |
dnl |
| 18 |
dnl @category Misc |
| 19 |
dnl @author Guido U. Draheim <[email protected]> |
| 20 |
dnl @version 2003-03-23 |
| 21 |
dnl @license GPLWithACException |
| 22 |
|
| 23 |
AC_DEFUN([PATCH_LIBTOOL_ON_DARWIN_ZSH_OVERQUOTING], |
| 24 |
[# libtool-1.4 specific, on zsh target the final requoting does one too much |
| 25 |
case "$host_os" in |
| 26 |
darwin*) |
| 27 |
if grep "1.92" libtool >/dev/null ; then |
| 28 |
AC_MSG_RESULT(patching libtool on .so-sharedlib creation (zsh overquoting)) |
| 29 |
test -f libtool.old || (mv libtool libtool.old && cp libtool.old libtool) |
| 30 |
sed -e '/archive_cmds=/s:[[\\]][[\\]][[\\]]*":\\":g' libtool >libtool.new |
| 31 |
(test -s libtool.new || rm libtool.new) 2>/dev/null |
| 32 |
test -f libtool.new && mv libtool.new libtool # not 2>/dev/null !! |
| 33 |
test -f libtool || mv libtool.old libtool |
| 34 |
fi |
| 35 |
;; |
| 36 |
esac |
| 37 |
]) |
| 38 |
|