backport fix for bug 2360 - Wrong -rpath setting includes DESTDIR SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Wed, 11 Sep 2019 17:23:00 +0300
branchSDL-1.2
changeset 130730f0aa5935c12
parent 13072 eb4b37ea05f6
child 13075 b4a4e1683304
backport fix for bug 2360 - Wrong -rpath setting includes DESTDIR

Marcus von Appen

The LT_LDFLAGS in Makefile.in contain the $(DESTDIR) in -rpath, which instructs libtool to take a wrong path into account for linking.

The issue arises, if DESTDIR is passed at build time and installation time.
-rpath only should use $(libdir) for both SDL 1.2 and SDL 2.x.

(default branch commit a153a5c6d)
Makefile.in
     1.1 --- a/Makefile.in	Wed Sep 11 17:23:00 2019 +0300
     1.2 +++ b/Makefile.in	Wed Sep 11 17:23:00 2019 +0300
     1.3 @@ -49,7 +49,7 @@
     1.4  LT_CURRENT  = @LT_CURRENT@
     1.5  LT_RELEASE  = @LT_RELEASE@
     1.6  LT_REVISION = @LT_REVISION@
     1.7 -LT_LDFLAGS  = -no-undefined -rpath $(DESTDIR)$(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
     1.8 +LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
     1.9  
    1.10  all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
    1.11