changeset 2688:6bc124afaba7

Enhancement: update rpath of libjclang so that libclang is found automatically
author mcimadamore
date Wed, 06 Sep 2017 11:15:35 +0100
parents c3c319ed215a
children 86a5c80f467f
files common/autoconf/flags.m4 common/autoconf/generated-configure.sh common/autoconf/spec.gmk.in
diffstat 3 files changed, 24 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/flags.m4	Mon Aug 28 13:38:28 2017 +0100
+++ b/common/autoconf/flags.m4	Wed Sep 06 11:15:35 2017 +0100
@@ -446,10 +446,14 @@
     SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
   fi
 
+  CLANG_LIB_DIR='$(subst -L,,$(LIBCLANG_LDFLAGS))'
+  SET_JCLANG_LIBRARY_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN -Wl,-rpath,$CLANG_LIB_DIR"
+
   AC_SUBST(C_FLAG_REORDER)
   AC_SUBST(CXX_FLAG_REORDER)
   AC_SUBST(SET_EXECUTABLE_ORIGIN)
   AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
+  AC_SUBST(SET_JCLANG_LIBRARY_ORIGIN)
   AC_SUBST(SET_SHARED_LIBRARY_NAME)
   AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
   AC_SUBST(SHARED_LIBRARY_FLAGS)
--- a/common/autoconf/generated-configure.sh	Mon Aug 28 13:38:28 2017 +0100
+++ b/common/autoconf/generated-configure.sh	Wed Sep 06 11:15:35 2017 +0100
@@ -778,6 +778,7 @@
 SHARED_LIBRARY_FLAGS
 SET_SHARED_LIBRARY_MAPFILE
 SET_SHARED_LIBRARY_NAME
+SET_JCLANG_LIBRARY_ORIGIN
 SET_SHARED_LIBRARY_ORIGIN
 SET_EXECUTABLE_ORIGIN
 CXX_FLAG_REORDER
@@ -1104,6 +1105,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -1398,6 +1400,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1650,6 +1653,15 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1787,7 +1799,7 @@
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1940,6 +1952,7 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -5232,7 +5245,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1502822879
+DATE_WHEN_GENERATED=1504689547
 
 ###############################################################################
 #
@@ -50264,6 +50277,10 @@
     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
   fi
 
+  CLANG_LIB_DIR='$(subst -L,,$(LIBCLANG_LDFLAGS))'
+  SET_JCLANG_LIBRARY_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN -Wl,-rpath,$CLANG_LIB_DIR"
+
+
 
 
 
--- a/common/autoconf/spec.gmk.in	Mon Aug 28 13:38:28 2017 +0100
+++ b/common/autoconf/spec.gmk.in	Wed Sep 06 11:15:35 2017 +0100
@@ -520,6 +520,7 @@
 # Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
 # (Note absence of := assignment, because we do not want to evaluate the macro body here)
 SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
+SET_JCLANG_LIBRARY_ORIGIN=@SET_JCLANG_LIBRARY_ORIGIN@
 SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
 
 # Different OS:es have different ways of naming shared libraries.