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

config_GetLibDir: return arch-dep package directory

parent 4ad069f6
...@@ -215,6 +215,7 @@ VLC_EXPORT( void, config_ResetAll, ( vlc_object_t * ) ); ...@@ -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( module_config_t *, config_FindConfig,( vlc_object_t *, const char * ) LIBVLC_USED );
VLC_EXPORT(char *, config_GetDataDir, ( vlc_object_t * ) LIBVLC_USED); VLC_EXPORT(char *, config_GetDataDir, ( vlc_object_t * ) LIBVLC_USED);
#define config_GetDataDir(a) config_GetDataDir(VLC_OBJECT(a)) #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); VLC_EXPORT(const char *, config_GetConfDir, ( void ) LIBVLC_USED);
typedef enum vlc_userdir typedef enum vlc_userdir
......
...@@ -192,7 +192,8 @@ libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \ ...@@ -192,7 +192,8 @@ libvlccore_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlccore` \
-DSYSCONFDIR=\"$(sysconfdir)\" \ -DSYSCONFDIR=\"$(sysconfdir)\" \
-DDATA_PATH=\"$(vlcdatadir)\" \ -DDATA_PATH=\"$(vlcdatadir)\" \
-DLIBDIR=\"$(libdir)\" \ -DLIBDIR=\"$(libdir)\" \
-DPLUGIN_PATH=\"$(vlclibdir)/modules\" -DPKGLIBDIR=\"$(vlclibdir)\" \
-DPLUGIN_PATH=PKGLIBDIR\"/modules\"
libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \ libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlccore` $(AM_LDFLAGS) \
-no-undefined \ -no-undefined \
-export-symbols $(srcdir)/libvlccore.sym \ -export-symbols $(srcdir)/libvlccore.sym \
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#undef config_GetDataDir #undef config_GetDataDir
/** /**
* Determines the shared data directory * Determines the shared architecture-independent data directory
* *
* @return a string or NULL. Use free() to release. * @return a string or NULL. Use free() to release.
*/ */
......
...@@ -59,6 +59,11 @@ char *config_GetDataDirDefault (void) ...@@ -59,6 +59,11 @@ char *config_GetDataDirDefault (void)
return datadir; return datadir;
} }
const char *config_GetLibDir (void)
{
abort ();
}
static char *config_GetHomeDir (void) static char *config_GetHomeDir (void)
{ {
const char *home = getenv ("HOME"); const char *home = getenv ("HOME");
......
...@@ -46,6 +46,16 @@ char *config_GetDataDirDefault (void) ...@@ -46,6 +46,16 @@ char *config_GetDataDirDefault (void)
return strdup (DATA_PATH); return strdup (DATA_PATH);
} }
/**
* Determines the architecture-dependent data directory
*
* @return a string (always succeeds).
*/
const char *config_GetLibDir (void)
{
return PKGLIBDIR;
}
/** /**
* Determines the system configuration directory. * Determines the system configuration directory.
* *
......
...@@ -55,6 +55,7 @@ config_ExistIntf ...@@ -55,6 +55,7 @@ config_ExistIntf
config_FindConfig config_FindConfig
config_GetConfDir config_GetConfDir
config_GetDataDir config_GetDataDir
config_GetLibDir
config_GetFloat config_GetFloat
config_GetUserDir config_GetUserDir
config_GetInt config_GetInt
......
...@@ -49,6 +49,11 @@ char *config_GetDataDirDefault( void ) ...@@ -49,6 +49,11 @@ char *config_GetDataDirDefault( void )
return strdup (psz_vlcpath); return strdup (psz_vlcpath);
} }
const char *config_GetLibDir (void)
{
abort ();
}
const char *config_GetConfDir (void) const char *config_GetConfDir (void)
{ {
static char appdir[PATH_MAX] = ""; static char appdir[PATH_MAX] = "";
......
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