[llvm-commits] [llvm] r116802 - in /llvm/trunk: CMakeLists.txt autoconf/configure.ac configure include/llvm/Config/config.h.cmake include/llvm/Config/config.h.in
Chandler Carruth
chandlerc at gmail.com
Tue Oct 19 01:21:25 PDT 2010
Author: chandlerc
Date: Tue Oct 19 03:21:25 2010
New Revision: 116802
URL: http://llvm.org/viewvc/llvm-project?rev=116802&view=rev
Log:
First step to allowing the resource directory of Clang to be adjusted for
strange packaging environments. The primary result of this is to expose
a (normally empty) CLANG_RESOURCE_DIR string in the autoconf and CMake builds.
This will in turn be used by a subsequent commit to Clang.
Regenerated configure and config.h.in thanks to Nick. =D
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/autoconf/configure.ac
llvm/trunk/configure
llvm/trunk/include/llvm/Config/config.h.cmake
llvm/trunk/include/llvm/Config/config.h.in
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=116802&r1=116801&r2=116802&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Oct 19 03:21:25 2010
@@ -80,6 +80,9 @@
CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
endif( MSVC )
+set(CLANG_RESOURCE_DIR "" CACHE STRING
+ "Relative directory from the Clang binary to its resource files.")
+
set(C_INCLUDE_DIRS "" CACHE STRING
"Colon separated list of directories clang will search for headers.")
Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=116802&r1=116801&r2=116802&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Tue Oct 19 03:21:25 2010
@@ -804,6 +804,13 @@
*) AC_MSG_ERROR([Invalid path for --with-ocaml-libdir. Provide full path]) ;;
esac
+AC_ARG_WITH(clang-resource-dir,
+ AS_HELP_STRING([--with-clang-resource-dir],
+ [Relative directory from the Clang binary for resource files]),,
+ withval="")
+AC_DEFINE_UNQUOTED(CLANG_RESOURCE_DIR,"$withval",
+ [Relative directory for resource files])
+
AC_ARG_WITH(c-include-dirs,
AS_HELP_STRING([--with-c-include-dirs],
[Colon separated list of directories clang will search for headers]),,
Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=116802&r1=116801&r2=116802&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Tue Oct 19 03:21:25 2010
@@ -1442,6 +1442,9 @@
--with-extra-options Specify additional options to compile LLVM with
--with-ocaml-libdir Specify install location for ocaml bindings (default
is stdlib)
+ --with-clang-resource-dir
+ Relative directory from the Clang binary for
+ resource files
--with-c-include-dirs Colon separated list of directories clang will
search for headers
--with-cxx-include-root Directory with the libstdc++ headers.
@@ -5279,6 +5282,20 @@
esac
+# Check whether --with-clang-resource-dir was given.
+if test "${with_clang_resource_dir+set}" = set; then
+ withval=$with_clang_resource_dir;
+else
+ withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CLANG_RESOURCE_DIR "$withval"
+_ACEOF
+
+
+
# Check whether --with-c-include-dirs was given.
if test "${with_c_include_dirs+set}" = set; then
withval=$with_c_include_dirs;
@@ -11450,7 +11467,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11453 "configure"
+#line 11470 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=116802&r1=116801&r2=116802&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Tue Oct 19 03:21:25 2010
@@ -12,6 +12,9 @@
/* Define if CBE is enabled for printf %a output */
#undef ENABLE_CBE_PRINTF_A
+/* Relative directory for resource files */
+#define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"
+
/* Directories clang will search for headers */
#define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}"
Modified: llvm/trunk/include/llvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=116802&r1=116801&r2=116802&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.in (original)
+++ llvm/trunk/include/llvm/Config/config.h.in Tue Oct 19 03:21:25 2010
@@ -3,6 +3,9 @@
#ifndef CONFIG_H
#define CONFIG_H
+/* Relative directory for resource files */
+#undef CLANG_RESOURCE_DIR
+
/* 32 bit multilib directory. */
#undef CXX_INCLUDE_32BIT_DIR
More information about the llvm-commits
mailing list