mirror of
https://github.com/clearlinux/linux-steam-integration.git
synced 2026-10-03 23:48:34 +00:00
Allow LD_PRELOAD libs to be configured at build time
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
@@ -57,6 +57,13 @@ AC_SUBST(STEAMBIN)
|
||||
AC_DEFINE_UNQUOTED(STEAM_BINARY, "$STEAMBIN",
|
||||
[The location of the real Steam binary])
|
||||
|
||||
# The LD_PRELOAD list required to integrate gracefully with the official Steam Runtime
|
||||
AC_ARG_WITH([preload-libs], AS_HELP_STRING([--with-preload-libs],
|
||||
[the preload libs to use with Steams own runtime]), [preloadlibs="${withval}"],
|
||||
[preloadlibs="/usr/\$LIB/libX11.so.6:/usr/\$LIB/libstdc++.so.6"])
|
||||
|
||||
AC_DEFINE_UNQUOTED([LSI_PRELOAD_LIBS], "$preloadlibs",
|
||||
[Libraries to preload with Steams runtime])
|
||||
|
||||
m4_define([gtk_required_version], [3.4.0])
|
||||
|
||||
@@ -88,6 +95,7 @@ AC_MSG_RESULT([
|
||||
New C++ ABI: ${use_new_abi}
|
||||
Real Steam binary: ${STEAMBIN}
|
||||
GTK+ Frontend: ${have_frontend}
|
||||
preload-libs: ${preloadlibs}
|
||||
|
||||
compiler: ${CC}
|
||||
cflags: ${CFLAGS}
|
||||
|
||||
+7
-1
@@ -19,6 +19,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
/* Mark a variable/argument as unused to skip warnings */
|
||||
#define __lsi_unused__ __attribute__((unused))
|
||||
|
||||
@@ -86,7 +88,11 @@ __lsi_inline__ static inline bool lsi_system_requires_preload(void)
|
||||
*/
|
||||
__lsi_inline__ static inline const char *lsi_preload_list(void)
|
||||
{
|
||||
return "/usr/$LIB/libX11.so.6:/usr/$LIB/libstdc++.so.6";
|
||||
/* Respect existing LD_PRELOAD in environment */
|
||||
if (getenv("LD_PRELOAD")) {
|
||||
return "$LD_PRELOAD:" LSI_PRELOAD_LIBS;
|
||||
}
|
||||
return LSI_PRELOAD_LIBS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user