diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2010-10-19 08:21:25 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2010-10-19 08:21:25 +0000 |
| commit | ffae4a66fa9de885382c48c725b1039593975986 (patch) | |
| tree | 85c0b8be26437cbfc2754fd86c5468359e5d9ba0 /llvm | |
| parent | 3e64de950427cb1506cce08cc388a22b6047557c (diff) | |
| download | bcm5719-llvm-ffae4a66fa9de885382c48c725b1039593975986.tar.gz bcm5719-llvm-ffae4a66fa9de885382c48c725b1039593975986.zip | |
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
llvm-svn: 116802
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | llvm/autoconf/configure.ac | 7 | ||||
| -rwxr-xr-x | llvm/configure | 19 | ||||
| -rw-r--r-- | llvm/include/llvm/Config/config.h.cmake | 3 | ||||
| -rw-r--r-- | llvm/include/llvm/Config/config.h.in | 3 |
5 files changed, 34 insertions, 1 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 19257201fc0..4c182ff3859 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -80,6 +80,9 @@ else( MSVC ) 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.") diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac index dca8333254a..ec360527db3 100644 --- a/llvm/autoconf/configure.ac +++ b/llvm/autoconf/configure.ac @@ -804,6 +804,13 @@ case "$withval" in *) 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]),, diff --git a/llvm/configure b/llvm/configure index 34031375dd7..e76a0b32f3f 100755 --- a/llvm/configure +++ b/llvm/configure @@ -1442,6 +1442,9 @@ Optional Packages: --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 @@ echo "$as_me: error: Invalid path for --with-ocaml-libdir. Provide full path" >& 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 @@ else 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 diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake index 5e0fa1ea9a1..26a39b224e4 100644 --- a/llvm/include/llvm/Config/config.h.cmake +++ b/llvm/include/llvm/Config/config.h.cmake @@ -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}" diff --git a/llvm/include/llvm/Config/config.h.in b/llvm/include/llvm/Config/config.h.in index 1aeb5ce3376..1cc0c7bc767 100644 --- a/llvm/include/llvm/Config/config.h.in +++ b/llvm/include/llvm/Config/config.h.in @@ -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 |

