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.
This commit is contained in:
parent
a25e5e99dd
commit
ee1a237685
@ -98,8 +98,6 @@ AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus],
|
|||||||
[], [enable_opus=no])
|
[], [enable_opus=no])
|
||||||
AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes])
|
AM_CONDITIONAL(XRDP_OPUS, [test x$enable_opus = xyes])
|
||||||
|
|
||||||
AM_CONDITIONAL(GOT_PREFIX, test "x${prefix}" != "xNONE"])
|
|
||||||
|
|
||||||
# checking for openssl
|
# checking for openssl
|
||||||
AC_CHECK_HEADER([openssl/rc4.h], [],
|
AC_CHECK_HEADER([openssl/rc4.h], [],
|
||||||
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
|
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
|
||||||
|
@ -28,11 +28,6 @@ EXTRA_LIBS += -ljpeg
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if GOT_PREFIX
|
|
||||||
EXTRA_INCLUDES += -I$(prefix)/include
|
|
||||||
EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
|
-DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \
|
||||||
-DXRDP_SBIN_PATH=\"${sbindir}\" \
|
-DXRDP_SBIN_PATH=\"${sbindir}\" \
|
||||||
|
@ -11,11 +11,6 @@ else
|
|||||||
EXTRA_DEFINES = -DXRDP_NODEBUG
|
EXTRA_DEFINES = -DXRDP_NODEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if GOT_PREFIX
|
|
||||||
EXTRA_INCLUDES += -I$(prefix)/include
|
|
||||||
EXTRA_FLAGS += -L$(prefix)/lib -Wl,-rpath -Wl,$(prefix)/lib
|
|
||||||
endif
|
|
||||||
|
|
||||||
if XRDP_RFXCODEC
|
if XRDP_RFXCODEC
|
||||||
EXTRA_DEFINES += -DXRDP_RFXCODEC
|
EXTRA_DEFINES += -DXRDP_RFXCODEC
|
||||||
EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include
|
EXTRA_INCLUDES += -I$(top_srcdir)/librfxcodec/include
|
||||||
|
Loading…
Reference in New Issue
Block a user