diff --git a/CHANGELOG.md b/CHANGELOG.md index f296bd43..f3e27c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`, diff --git a/configure.ac b/configure.ac index c086b4ee..f586f1d2 100644 --- a/configure.ac +++ b/configure.ac @@ -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.