vlc | branch: master | Rémi Denis-Courmont <r...@remlab.net> | Mon Mar  5 
23:31:00 2018 +0200| [5ad48005639464f2d1ea62273f7515ed20146e2c] | committer: 
Rémi Denis-Courmont

posix: add libdir, libexecdir and pkglibexecdir

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ad48005639464f2d1ea62273f7515ed20146e2c
---

 include/vlc_configuration.h | 8 +++++++-
 src/Makefile.am             | 4 +++-
 src/posix/dirs.c            | 8 ++++++--
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 1be4867f12..cfcd393921 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -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;
 
 /**
diff --git a/src/Makefile.am b/src/Makefile.am
index 46b29d67d9..d41f24a0c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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
diff --git a/src/posix/dirs.c b/src/posix/dirs.c
index 69ce7a07d2..9ecec2dc0e 100644
--- a/src/posix/dirs.c
+++ b/src/posix/dirs.c
@@ -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));
 

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to