summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-01-26 22:34:27 -0800
committerPavel Roskin <plroskin@gmail.com>2016-01-26 22:36:59 -0800
commitee1a2376854b3cf025cf69b11ea28863df1f12b2 (patch)
tree723ceb2d89d7c110ebf01f8d29e1d98d5332acd5
parenta25e5e99dd2f6d8d553ee602024713707463fd4e (diff)
downloadxrdp-proprietary-ee1a2376854b3cf025cf69b11ea28863df1f12b2.tar.gz
xrdp-proprietary-ee1a2376854b3cf025cf69b11ea28863df1f12b2.zip
Remove GOT_PREFIX, it's a broken hack of limited utility
To add flags to the compiler, CFLAGS, CPPFLAGS or LDFLAGS can be used on the configure command line. The need to add flags depends on the location of the headers and libraries of the dependencies, which is orthogonal to the directory where xrdp will be installed. The implementation in configure.ac has a stray closing bracket, making GOT_PREFIX true even if --prefix is not passed. The implementation is inconsistent - the only affected makefiles are for xrdp and libxrdp. Changing rpath manually is wrong in most cases. Libtool should be able to set rpath correctly on its own. Using $(prefix)/lib ignores the libdir setting. For many 64-bit systems, /usr/lib is used for 32-bit libraries. Adding 32-bit libraries to the rpath slows down 64-bit executables, as the dynamic loader searches for libraries in a wrong directory. There is no way to disable GOT_PREFIX if --prefix has to be passed. Fedora RPM patches configure.ac and needs to rerun autoconf and automake after that.
-rw-r--r--configure.ac2
-rw-r--r--libxrdp/Makefile.am5
-rw-r--r--xrdp/Makefile.am5
3 files changed, 0 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 24ef13c4..12c298e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,8 +98,6 @@ AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus],
[], [enable_opus=no])
AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes])
-AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
-
# checking for openssl
AC_CHECK_HEADER([openssl/rc4.h], [],
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
diff --git a/libxrdp/Makefile.am b/libxrdp/Makefile.am
index ec92f8be..5435343b 100644
--- a/libxrdp/Makefile.am
+++ b/libxrdp/Makefile.am
@@ -28,11 +28,6 @@ EXTRA_LIBS += -ljpeg
endif
endif
-if GOT_PREFIX
-EXTRA_INCLUDES += -I$(prefix)/include
-EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib
-endif
-
AM_CFLAGS = \
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
-DXRDP_SBIN_PATH=\"${sbindir}\" \
diff --git a/xrdp/Makefile.am b/xrdp/Makefile.am
index 8a8b36eb..8014761a 100644
--- a/xrdp/Makefile.am
+++ b/xrdp/Makefile.am
@@ -11,11 +11,6 @@ else
EXTRA_DEFINES = -DXRDP_NODEBUG
endif
-if GOT_PREFIX
-EXTRA_INCLUDES += -I$(prefix)/include
-EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib
-endif
-
if XRDP_RFXCODEC
EXTRA_DEFINES += -DXRDP_RFXCODEC
EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include