]> git.wh0rd.org Git - elf2flt.git/commitdiff
I'm lazy and having to set 4 configure options when I could just set 1 is a
authorDavid McCullough <davidm@snapgear.com>
Thu, 13 Mar 2008 04:38:28 +0000 (04:38 +0000)
committerDavid McCullough <davidm@snapgear.com>
Thu, 13 Mar 2008 04:38:28 +0000 (04:38 +0000)
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 <vapier@gentoo.org>
configure.in

index d6e9d44fed9f95de7a4cead2a08428136a495b4a..42be556d84e9a61f12178974f67308da83277802 100644 (file)
@@ -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=<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)