configure: Add a --disable-rpath option to prevent libtool hardcoding rpath variables.

This commit is contained in:
Reece H. Dunn
2018-04-02 12:40:21 +01:00
parent 8847b44b23
commit d7aee052c2
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -9,6 +9,7 @@ The espeak-ng project is a fork of the espeak project.
### 1.49.3 - (In Development)
* Add a `--disable-rpath` option to prevent libtool hardcoding rpaths in the executable.
* Add more tests to check the various parts of espeak-ng.
* Various changes to clean up the codebase.
* Fix various compiler warnings (`-Winitialized`, `-Wmissing-prototypes`, `-Wreturn-type`,
+13
View File
@@ -14,6 +14,11 @@ dnl ================================================================
dnl configure arguments
dnl ================================================================
AC_ARG_ENABLE([rpath],
[AS_HELP_STRING([--enable-rpath], [set hardcoded rpaths in the executable @<:@default=yes@:>@])],
[],
[enable_rpath=yes])
AC_ARG_WITH([gradle],
[AS_HELP_STRING([--with-gradle], [specify the gradle program to use @<:@default=gradle@:>@])],
[GRADLE=$with_gradle],
@@ -310,6 +315,14 @@ dnl ================================================================
AC_CONFIG_FILES([Makefile espeak-ng.pc])
AC_OUTPUT
if test "$enable_rpath" = "yes" ; then
true
else
# See https://old-en.opensuse.org/openSUSE:Packaging_Guidelines#Removing_Rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
fi
AC_MSG_NOTICE([
Configuration for eSpeak NG complete.