Skip to content
Snippets Groups Projects
Commit 22386831 authored by Simon McVittie's avatar Simon McVittie
Browse files

Add 'examples/' from commit '70bf2784'

git-subtree-dir: examples
git-subtree-mainline: f23f5300
git-subtree-split: 70bf2784
parents f23f5300 70bf2784
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
*.a
*.la
*.lo
*.o
.deps/
.dirstamp
.libs/
/Makefile
/Makefile.in
/aclocal.m4
/autom4te.cache/
/build-aux/
/capsule-shim.mk
/config.log
/config.status
/configure
/libtool
/m4/
/preconfigure.log
/shim/*.so.*.c
/shim/*.so.*.map
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = -std=c99 -D_GNU_SOURCE -Wall -Werror
AM_CFLAGS += $(CAPSULE_CFLAGS)
CAPSULE_SONAMES := libGL.so.1
CAPSULE_VERSION_libGL.so.1 := 1
AM_CAPSULE_MKSTUBLIB_FLAGS := --ext-dlopen --ext-dlsym
lib_LTLIBRARIES = libGL.la
nodist_libGL_la_SOURCES = shim/libGL.so.1.c
libGL_la_LDFLAGS = $(shim_ldflags_libGL.so.1)
libGL_la_LIBADD = $(CAPSULE_LIBS)
CLEANFILES = $(nodist_libGL_la_SOURCES) \
$(nodist_libGL_la_SOURCES:.c=.map)
BUILT_SOURCES = $(nodist_libGL_la_SOURCES)
include @CAPSULE_MKINC@/disabled.mk
include @CAPSULE_MKINC@/capsule-shim.mk
This is a libcapsule based proxy library.
Its purpose is to allow a library (libGL.so.1) to be loaded from a
foreign filesystem tree (usually /host, but configurable at compile
time) without exposing any other libraries from that tree to the
program using it.
You can export the symbols of more than one library via the proxy:
To do so, add a line containing the SONAME (libFOO.so.X)
of each extra library to shim/libGL.so.c.shared and rebuild.
You can also prevent a library from the foreign tree from being loaded
at all (at least as a result of being a dependency of libGL.so.1).
To achieve this, add a line containing the SONAME (libFOO.so.X)
of the excluded library to shim/libGL.so.c.excluded and rebuild.
The generated library will have the same name as the main proxy target
(libGL.so.1). You can control the exact version number (cf libfoo.x.y.z)
by setting CAPSULE_VERSION_libGL.so.1 in Makefile.am
To make the generated library override dlopen() and/or dlsym() for
callers outside the capsule, pass --ext-dlopen and/or --ext-dlsym to
capsule-mkstublib by setting the AM_CAPSULE_MKSTUBLIB_FLAGS variable in
Makefile.am. If libcapsule's standard implementations of those functions
are not suitable, copy capsule/_ext_dlopen.h, capsule/_ext_dlsym.h
from libcapsule's development files into shim/capsule/, modify them
as necessary, and add them to EXTRA_DIST in Makefile.am.
Similarly, if libcapsule's standard implementation of dlopen() for
callers inside the capsule is not suitable, copy and modify
capsule/_int_dlopen.h.
AC_PREREQ([2.60])
AC_INIT([libgl-proxy], [1])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
dnl don't kvetch about gnu makefile syntax
dnl and don't require ChangeLog &co if they don't exist
AM_INIT_AUTOMAKE([-Wno-portability foreign])
AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
LT_INIT
PKG_CHECK_MODULES([CAPSULE], [capsule])
PKG_CHECK_VAR([CAPSULE_MKINC], [capsule], [makeinc])
PKG_CHECK_VAR([CAPSULE_MKSTUBLIB_TOOL], [capsule], [CAPSULE_MKSTUBLIB_TOOL])
PKG_CHECK_VAR([CAPSULE_SYMBOLS_TOOL], [capsule], [CAPSULE_SYMBOLS_TOOL])
AC_ARG_WITH([runtime-tree],
[AS_HELP_STRING([--with-runtime-tree=PATH],
[Where to find encapsulated libraries at runtime [/]])],
[], [with_runtime_tree=${CAPSULE_RUNTIME_TREE:-${CAPSULE_TREE:-/}}])
AS_CASE([$with_runtime_tree],
[/*],
[],
[AC_MSG_ERROR([--with-runtime-tree requires an absolute path argument])])
AC_SUBST([CAPSULE_RUNTIME_TREE], [$with_runtime_tree])
AC_ARG_WITH([search-tree],
[AS_HELP_STRING([--with-search-tree=PATH],
[Where to find encapsulated libraries when updating symbols list [/]])],
[], [with_search_tree=${CAPSULE_SEARCH_TREE:-${CAPSULE_TREE:-/}}])
AS_CASE([$with_search_tree],
[/*],
[],
[AC_MSG_ERROR([--with-search-tree requires an absolute path argument])])
AC_SUBST([CAPSULE_SEARCH_TREE], [$with_search_tree])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
libX11-xcb.so.1
libX11.so.6
libXau.so.6
libXdamage.so.1
libXdmcp.so.6
libXext.so.6
libXfixes.so.3
libXxf86vm.so.1
libBrokenLocale.so.1
libanl.so.1
libc.so.6
libcidn.so.1
libcrypt.so.1
libdl.so.2
libm.so.6
libmvec.so.1
libnsl.so.1
libpthread.so.0
libresolv.so.2
librt.so.1
libthread_db.so.1
libutil.so.1
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-glx.so.0
libxcb-present.so.0
libxcb-sync.so.1
libxcb-xfixes.so.0
libxcb.so.1
libX11-xcb.so.1
libX11.so.6
libXau.so.6
libXdamage.so.1
libXdmcp.so.6
libXext.so.6
libXfixes.so.3
libXxf86vm.so.1
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-glx.so.0
libxcb-present.so.0
libxcb-sync.so.1
libxcb-xfixes.so.0
libxcb.so.1
This diff is collapsed.
libX11-xcb.so.1
libX11.so.6
libXau.so.6
libXdamage.so.1
libXdmcp.so.6
libXext.so.6
libXfixes.so.3
libXxf86vm.so.1
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-glx.so.0
libxcb-present.so.0
libxcb-sync.so.1
libxcb-xfixes.so.0
libxcb.so.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment