Commit 5ad48005 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

posix: add libdir, libexecdir and pkglibexecdir

parent 264108c5
......@@ -278,11 +278,17 @@ typedef enum vlc_system_dir
data directory (e.g. /usr/local/data/vlc). */
VLC_PKG_LIB_DIR, /**< Package-specific architecture-dependent read-only
data directory (e.g. /usr/local/lib/vlc). */
VLC_PKG_LIBEXEC_DIR_RESERVED,
VLC_PKG_LIBEXEC_DIR, /**< Package-specific executable read-only directory
(e.g. /usr/local/libexec/vlc). */
VLC_PKG_INCLUDE_DIR_RESERVED,
VLC_SYSDATA_DIR, /**< Global architecture-independent read-only
data directory (e.g. /usr/local/data).
Available only on some platforms. */
VLC_LIB_DIR, /**< Global architecture-dependent read-only directory
(e.g. /usr/local/lib). */
VLC_LIBEXEC_DIR, /**< Global executable read-only directory
(e.g. /usr/local/libexec). */
VLC_INCLUDE_DIR_RESERVED,
} vlc_sysdir_t;
/**
......
......@@ -171,9 +171,11 @@ AM_CPPFLAGS = $(INCICONV) $(IDN_CFLAGS) \
-DMODULE_STRING=\"core\" \
-DSYSDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DLOCALEDIR=\"$(localedir)\" \
-DPKGDATADIR=\"$(pkgdatadir)\" \
-DPKGLIBDIR=\"$(pkglibdir)\"
-DPKGLIBDIR=\"$(pkglibdir)\" \
-DPKGLIBEXECDIR=\"$(pkglibexecdir)\"
AM_CFLAGS = $(CFLAGS_libvlccore)
if HAVE_DYNAMIC_PLUGINS
AM_CPPFLAGS += -DHAVE_DYNAMIC_PLUGINS
......
......@@ -48,8 +48,9 @@ VLC_WEAK char *config_GetLibDir(void)
char *config_GetSysPath(vlc_sysdir_t type, const char *filename)
{
static const char env_vars[][16] = {
[VLC_PKG_LIB_DIR] = "VLC_LIB_PATH",
[VLC_PKG_DATA_DIR] = "VLC_DATA_PATH",
[VLC_PKG_LIB_DIR] = "VLC_LIB_PATH",
[VLC_PKG_LIBEXEC_DIR] = "VLC_LIB_PATH",
};
if (type < ARRAY_SIZE(env_vars)) {
......@@ -66,9 +67,12 @@ char *config_GetSysPath(vlc_sysdir_t type, const char *filename)
return NULL; /* OOM */
static const char *const dirs[] = {
[VLC_PKG_LIB_DIR] = PKGLIBDIR,
[VLC_PKG_DATA_DIR] = PKGDATADIR,
[VLC_PKG_LIB_DIR] = PKGLIBDIR,
[VLC_PKG_LIBEXEC_DIR] = PKGLIBEXECDIR,
[VLC_SYSDATA_DIR] = SYSDATADIR,
[VLC_LIB_DIR] = LIBDIR,
[VLC_LIBEXEC_DIR] = LIBEXECDIR,
};
assert(type < ARRAY_SIZE(dirs));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment