# object files.
OBJ_ROOT := .
+# What to pass as rpath flag to g++
+RPATH := @RPATH@
+
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1):
endif
ifdef SHARED_LIBRARY
- LD.Flags += -Wl,-rpath -Wl,$(LibDir)
+ LD.Flags += $(RPATH) -Wl,$(LibDir)
endif
ifdef TOOL_VERBOSE
ifneq ($(OS),Darwin)
ifdef TOOLNAME
ifdef EXAMPLE_TOOL
- LD.Flags += -Wl,-rpath -Wl,$(ExmplDir) -export-dynamic
+ LD.Flags += $(RPATH) -Wl,$(ExmplDir) -export-dynamic
else
- LD.Flags += -Wl,-rpath -Wl,$(ToolDir) -export-dynamic
+ LD.Flags += $(RPATH) -Wl,$(ToolDir) -export-dynamic
endif
endif
endif
dnl Determine if the compiler supports -fvisibility-inlines-hidden.
AC_CXX_USE_VISIBILITY_INLINES_HIDDEN
+dnl Determine linker rpath flag
+case $llvm_cv_os_type in
+ SunOS) RPATH="-Wl,-R" ;;
+ *) RPATH="-Wl,-rpath" ;;
+esac
+AC_SUBST(RPATH)
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 10: Specify the output files and generate it