2 # Determine if the system can handle the -R option being passed to the linker.
4 # This macro is specific to LLVM.
6 AC_DEFUN([AC_LINK_USE_R],
7 [AC_CACHE_CHECK([for compiler -Wl,-R<path> option],[llvm_cv_link_use_r],
10 CFLAGS="$CFLAGS -Wl,-R."
11 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[int main() { return 0; }]])],
12 [llvm_cv_link_use_r=yes],[llvm_cv_link_use_r=no])
16 if test "$llvm_cv_link_use_r" = yes ; then
17 AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.])