diff --git a/Makefile.config.in b/Makefile.config.in index dd948bf1f36..6422559574b 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -86,6 +86,13 @@ PROJ_VERSION := 1.0 endif endif +INTERNAL_PREFIX := @INTERNAL_PREFIX@ +ifneq ($(INTERNAL_PREFIX),) +PROJ_internal_prefix := $(INTERNAL_PREFIX) +else +PROJ_internal_prefix := $(prefix) +endif + PROJ_bindir := $(PROJ_prefix)/bin PROJ_libdir := $(PROJ_prefix)/lib PROJ_datadir := $(PROJ_prefix)/share diff --git a/Makefile.rules b/Makefile.rules index 3816bbb1a1c..1c5effe65be 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1503,12 +1503,19 @@ install-local:: uninstall-local:: $(Echo) Uninstall circumvented with NO_INSTALL else -DestTool = $(DESTDIR)$(PROJ_bindir)/$(TOOLEXENAME) + +ifdef INTERNAL_TOOL +ToolBinDir = $(DESTDIR)$(PROJ_internal_prefix)/bin +else +ToolBinDir = $(DESTDIR)$(PROJ_bindir) +endif +DestTool = $(ToolBinDir)/$(TOOLEXENAME) install-local:: $(DestTool) -$(DestTool): $(ToolBuildPath) $(DESTDIR)$(PROJ_bindir) +$(DestTool): $(ToolBuildPath) $(Echo) Installing $(BuildMode) $(DestTool) + $(Verb) $(MKDIR) $(ToolBinDir) $(Verb) $(ProgInstall) $(ToolBuildPath) $(DestTool) uninstall-local:: @@ -1517,7 +1524,7 @@ uninstall-local:: # TOOLALIAS install. ifdef TOOLALIAS -DestToolAlias = $(DESTDIR)$(PROJ_bindir)/$(TOOLALIAS)$(EXEEXT) +DestToolAlias = $(ToolBinDir)/$(TOOLALIAS)$(EXEEXT) install-local:: $(DestToolAlias) @@ -2276,6 +2283,7 @@ printvars:: $(Echo) "LLVM_SRC_ROOT: " '$(LLVM_SRC_ROOT)' $(Echo) "LLVM_OBJ_ROOT: " '$(LLVM_OBJ_ROOT)' $(Echo) "PROJ_prefix : " '$(PROJ_prefix)' + $(Echo) "PROJ_internal_prefix : " '$(PROJ_internal_prefix)' $(Echo) "PROJ_bindir : " '$(PROJ_bindir)' $(Echo) "PROJ_libdir : " '$(PROJ_libdir)' $(Echo) "PROJ_etcdir : " '$(PROJ_etcdir)' diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 5503e3a307d..060ebac8d35 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -885,6 +885,12 @@ AC_ARG_ENABLE(libffi,AS_HELP_STRING( esac], llvm_cv_enable_libffi=no) +AC_ARG_WITH(internal-prefix, + AS_HELP_STRING([--with-internal-prefix], + [Installation directory for internal files]),, + withval="") +AC_SUBST(INTERNAL_PREFIX,[$withval]) + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 4: Check for programs we need and that they are the right version diff --git a/configure b/configure index c2c3f4c83fd..bf63d49e7d0 100755 --- a/configure +++ b/configure @@ -711,6 +711,7 @@ EXTRA_OPTIONS EXTRA_LD_OPTIONS CLANG_SRC_ROOT BINUTILS_INCDIR +INTERNAL_PREFIX NM ifGNUmake LN_S @@ -1451,6 +1452,7 @@ Optional Packages: plugin-api.h file for gold plugin. --with-bug-report-url Specify the URL where bug reports should be submitted (default=http://llvm.org/bugs/) + --with-internal-prefix Installation directory for internal files --with-tclinclude directory where tcl headers are --with-udis86= Use udis86 external x86 disassembler library --with-oprofile= @@ -5671,6 +5673,17 @@ fi +# Check whether --with-internal-prefix was given. +if test "${with_internal_prefix+set}" = set; then + withval=$with_internal_prefix; +else + withval="" +fi + +INTERNAL_PREFIX=$withval + + + { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then @@ -10476,7 +10489,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5