[vlc-devel] commit: config_GetLibDir: return arch-dep package directory ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Feb 14 19:50:23 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 14 20:48:59 2010 +0200| [dda9df40911dd0db4d8bf868d778caf959bf8155] | committer: Rémi Denis-Courmont 

config_GetLibDir: return arch-dep package directory

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

 include/vlc_configuration.h |    1 +
 src/Makefile.am             |    3 ++-
 src/config/dirs.c           |    2 +-
 src/config/dirs_macos.c     |    5 +++++
 src/config/dirs_xdg.c       |   10 ++++++++++
 src/libvlccore.sym          |    1 +
 src/win32/dirs.c            |    5 +++++
 7 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 4360fad..e9f88f0 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -215,6 +215,7 @@ VLC_EXPORT( void,   config_ResetAll, ( vlc_object_t * ) );
 VLC_EXPORT( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) LIBVLC_USED );
 VLC_EXPORT(char *, config_GetDataDir, ( vlc_object_t * ) LIBVLC_USED);
 #define config_GetDataDir(a) config_GetDataDir(VLC_OBJECT(a))
+VLC_EXPORT(const char *, config_GetLibDir, ( void ) LIBVLC_USED);
 VLC_EXPORT(const char *, config_GetConfDir, ( void ) LIBVLC_USED);
 
 typedef enum vlc_userdir
diff --git a/src/Makefile.am b/src/Makefile.am
index 8468da0..05e3f14 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -192,7 +192,8 @@ libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
 	-DSYSCONFDIR=\"$(sysconfdir)\" \
 	-DDATA_PATH=\"$(vlcdatadir)\" \
 	-DLIBDIR=\"$(libdir)\" \
-	-DPLUGIN_PATH=\"$(vlclibdir)/modules\"
+	-DPKGLIBDIR=\"$(vlclibdir)\" \
+	-DPLUGIN_PATH=PKGLIBDIR\"/modules\"
 libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
 	-no-undefined \
 	-export-symbols $(srcdir)/libvlccore.sym \
diff --git a/src/config/dirs.c b/src/config/dirs.c
index 189cc08..22a5bdc 100644
--- a/src/config/dirs.c
+++ b/src/config/dirs.c
@@ -32,7 +32,7 @@
 
 #undef config_GetDataDir
 /**
- * Determines the shared data directory
+ * Determines the shared architecture-independent data directory
  *
  * @return a string or NULL. Use free() to release.
  */
diff --git a/src/config/dirs_macos.c b/src/config/dirs_macos.c
index 25fbd70..0a563d8 100644
--- a/src/config/dirs_macos.c
+++ b/src/config/dirs_macos.c
@@ -59,6 +59,11 @@ char *config_GetDataDirDefault (void)
     return datadir;
 }
 
+const char *config_GetLibDir (void)
+{
+    abort ();
+}
+
 static char *config_GetHomeDir (void)
 {
     const char *home = getenv ("HOME");
diff --git a/src/config/dirs_xdg.c b/src/config/dirs_xdg.c
index 0f0d3e9..8dd92cf 100644
--- a/src/config/dirs_xdg.c
+++ b/src/config/dirs_xdg.c
@@ -47,6 +47,16 @@ char *config_GetDataDirDefault (void)
 }
 
 /**
+ * Determines the architecture-dependent data directory
+ *
+ * @return a string (always succeeds).
+ */
+const char *config_GetLibDir (void)
+{
+    return PKGLIBDIR;
+}
+
+/**
  * Determines the system configuration directory.
  *
  * @return a string (always succeeds).
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index d620078..85da6f3 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -55,6 +55,7 @@ config_ExistIntf
 config_FindConfig
 config_GetConfDir
 config_GetDataDir
+config_GetLibDir
 config_GetFloat
 config_GetUserDir
 config_GetInt
diff --git a/src/win32/dirs.c b/src/win32/dirs.c
index 1053b3a..519de2a 100644
--- a/src/win32/dirs.c
+++ b/src/win32/dirs.c
@@ -49,6 +49,11 @@ char *config_GetDataDirDefault( void )
     return strdup (psz_vlcpath);
 }
 
+const char *config_GetLibDir (void)
+{
+    abort ();
+}
+
 const char *config_GetConfDir (void)
 {
     static char appdir[PATH_MAX] = "";




More information about the vlc-devel mailing list