This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
[PATCH] Add --disable-multi-os-directory configure option
- From: Stewart Brodie <sbrodie at espial dot com>
- To: <libffi-discuss at sourceware dot org>
- Date: Thu, 20 Jun 2013 13:11:22 +0100
- Subject: [PATCH] Add --disable-multi-os-directory configure option
- References: <gemini dot mo8kb000r1iao05r2 dot sbrodie at espial dot com>
Stewart Brodie <sbrodie@espial.com> wrote:
>
> I've been trying to compile libffi (latest cloned from git earlier today)
> but hitting a problem with overriding where the library is installed.
> [ patch in original e-mail ]
I have since discovered that my patch only works if you build out-of-tree.
autoconf has put something strange in the configure script to detect when
$top_srcdir == $top_builddir and write completely different stuff out to the
Makefile, which doesn't pass the required parameters to the recursive makes
that it runs, as far as I can tell.
So I just added a configuration option instead, which always works.
The --disable-multi-os-directory option stops the configure script
from asking gcc whether it should override the library installation
directory.
---
configure.ac | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0dc0675..cc64876 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,6 +535,10 @@ AC_ARG_ENABLE(purify-safety,
AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and
want to suppress spurious messages.])
fi)
+AC_ARG_ENABLE(multi-os-directory,
+[ --disable-multi-os-directory
+ disable use of gcc --print-multi-os-directory to
change the library installation directory])
+
# These variables are only ever used when we cross-build to X86_WIN32.
# And we only support this with GCC, so...
if test "x$GCC" = "xyes"; then
@@ -546,11 +550,13 @@ if test "x$GCC" = "xyes"; then
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
toolexeclibdir='$(libdir)'
fi
- multi_os_directory=`$CC -print-multi-os-directory`
- case $multi_os_directory in
- .) ;; # Avoid trailing /.
- ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
- esac
+ if test x"$enable_multi_os_directory" != x"no"; then
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+ esac
+ fi
AC_SUBST(toolexecdir)
else
toolexeclibdir='$(libdir)'
--
1.8.1.4
--
Stewart Brodie
Senior Software Engineer
Team Leader ANT Galio Browser
Espial UK