summaryrefslogtreecommitdiff
path: root/autoconf/configure.ac
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-02-03 07:10:08 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-02-03 07:10:08 +0000
commite2be5d5fd8bd8d353567ad02d61bdf32b9dfa66c (patch)
treea6a7dd5819becf2d3a39da9e76c0cc25a87419f4 /autoconf/configure.ac
parent55a683d7f03b0acaf7807545fd7be319498277ff (diff)
downloadllvm-e2be5d5fd8bd8d353567ad02d61bdf32b9dfa66c.tar.gz
llvm-e2be5d5fd8bd8d353567ad02d61bdf32b9dfa66c.tar.bz2
llvm-e2be5d5fd8bd8d353567ad02d61bdf32b9dfa66c.tar.xz
Add the ability to pass the path to binutils source to configure. This is
needed to build the LLVM gold plugin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/configure.ac')
-rw-r--r--autoconf/configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 3a218eaeb9..680cc1ddd9 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -514,6 +514,24 @@ case "$withval" in
*) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;;
esac
+dnl Allow linking of LLVM with GPLv3 binutils code.
+AC_ARG_WITH(binutils-include,
+ AS_HELP_STRING([--with-binutils-include],
+ [Specify path to binutils/include/ containing plugin-api.h file for gold plugin.]),,
+ withval=default)
+case "$withval" in
+ default) WITH_BINUTILS_INCDIR=default ;;
+ /* | [[A-Za-z]]:[[\\/]]*) WITH_BINUTILS_INCDIR=$withval ;;
+ *) AC_MSG_ERROR([Invalid path for --with-binutils-include. Provide full path]) ;;
+esac
+if test "x$WITH_BINUTILS_INCDIR" != xdefault ; then
+ AC_SUBST(BINUTILS_INCDIR,$WITH_BINUTILS_INCDIR)
+ if test ! -f "$WITH_BINUTILS_INCDIR/plugin-api.h"; then
+ echo "$WITH_BINUTILS_INCDIR/plugin-api.h"
+ AC_MSG_ERROR([Invalid path to directory containing plugin-api.h.]);
+ fi
+fi
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 4: Check for programs we need and that they are the right version