From 14bcd9c87df27ee64e17c22ba01194c6011f4a02 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Fri, 26 Jun 2015 22:33:16 +0200 Subject: [PATCH] Fix binary relocation support --- src/Makefile.am | 4 ++++ src/utils.c | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index d9df1653..8cefea6d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,6 +27,10 @@ lib_LTLIBRARIES = libgeany.la geany_SOURCES = main.c geany_LDADD = libgeany.la $(GTK_LIBS) $(GTHREAD_LIBS) $(INTLLIBS) +if ENABLE_BINRELOC +geany_LDFLAGS = -Wl,-rpath='$$ORIGIN/../lib' +endif + geany_includedir = $(includedir)/geany geany_include_HEADERS = \ app.h \ diff --git a/src/utils.c b/src/utils.c index 4fc9f16a..d1ec0dcc 100644 --- a/src/utils.c +++ b/src/utils.c @@ -33,6 +33,7 @@ #include "dialogs.h" #include "document.h" #include "prefs.h" +#include "prefix.h" #include "sciwrappers.h" #include "spawn.h" #include "support.h"