From 45e82fcafb3e05e66ec61da891383bd78b4ab57c Mon Sep 17 00:00:00 2001 From: David McCullough Date: Thu, 13 Mar 2008 04:38:28 +0000 Subject: [PATCH] I'm lazy and having to set 4 configure options when I could just set 1 is a pain. So --with-binutils-build-dir allows you to set the base tree of the compiled binutils directory and will setup reasonable defaults for the flags (if they haven't already been set): --with-libbfd --with-libiberty --with-bfd-include-dir --with-binutils-include-dir Signed-off-by: Mike Frysinger --- configure.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.in b/configure.in index d6e9d44..42be556 100644 --- a/configure.in +++ b/configure.in @@ -37,6 +37,12 @@ AC_ARG_WITH(binutils-ldscript-dir, [ ac_binutils_ldscript_dir=NONE ] ) +AC_ARG_WITH(binutils-build-dir, + [ --with-binutils-build-dir= path to compiled binutils tree ], + [ ac_binutils_build_dir=$withval ], + [ ac_binutils_build_dir=NONE ] +) + AC_ARG_ENABLE(got-check, [ --disable-got-check - disable check for GOT (needed on H8) ], [ got_check=$enableval ], @@ -56,6 +62,13 @@ dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL +if test "$ac_binutils_build_dir" != "NONE"; then + test "$ac_libbfd" = "NONE" && ac_libbfd="$ac_binutils_build_dir/bfd/libbfd.a" + test "$ac_libiberty" = "NONE" && ac_libiberty="$ac_binutils_build_dir/libiberty/libiberty.a" + test "$ac_bfd_include_dir" = "NONE" && ac_bfd_include_dir="$ac_binutils_build_dir/bfd" + test "$ac_binutils_include_dir" = "NONE" && ac_binutils_include_dir="$ac_binutils_build_dir/include" +fi + dnl Checks for libraries. if test "$ac_libiberty" = "NONE"; then AC_CHECK_LIB(iberty, objalloc_create) -- 2.39.5