Add a -showDefaultLibPath option.

A corollary to the previous change, this option prints $libdir.
This commit is contained in:
Aaron Plattner 2006-11-22 14:46:51 -08:00
parent 0a2a6e4070
commit 64de3baf85
4 changed files with 20 additions and 0 deletions

View File

@ -1383,6 +1383,7 @@ dnl has it in libc), or if libdl is needed to get it.
AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file])
AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path])
AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location])
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])

View File

@ -101,6 +101,7 @@
static void xf86PrintBanner(void);
static void xf86PrintMarkers(void);
static void xf86PrintDefaultModulePath(void);
static void xf86PrintDefaultLibraryPath(void);
static void xf86RunVtInit(void);
#ifdef __UNIXOS2__
@ -1382,6 +1383,11 @@ ddxProcessArgument(int argc, char **argv, int i)
xf86PrintDefaultModulePath();
exit(0);
}
if (!strcmp(argv[i],"-showDefaultLibPath"))
{
xf86PrintDefaultLibraryPath();
exit(0);
}
/* Notice the -fp flag, but allow it to pass to the dix layer */
if (!strcmp(argv[i], "-fp"))
{
@ -1632,6 +1638,7 @@ ddxUseMsg()
ErrorF("-isolateDevice bus_id restrict device resets to bus_id (PCI only)\n");
ErrorF("-version show the server version\n");
ErrorF("-showDefaultModulePath show the server default module path\n");
ErrorF("-showDefaultLibPath show the server default library path\n");
/* OS-specific usage */
xf86UseMsg();
ErrorF("\n");
@ -1760,6 +1767,12 @@ xf86PrintDefaultModulePath(void)
ErrorF("%s\n", DEFAULT_MODULE_PATH);
}
static void
xf86PrintDefaultLibraryPath(void)
{
ErrorF("%s\n", DEFAULT_LIBRARY_PATH);
}
static void
xf86RunVtInit(void)
{

View File

@ -429,6 +429,9 @@ support.
.B \-showDefaultModulePath
Print out the default module path the server was compiled with.
.TP 8
.B \-showDefaultLibPath
Print out the path libraries should be installed to.
.TP 8
.BI \-config " file"
Read the server configuration from
.IR file .

View File

@ -45,6 +45,9 @@
/* Path to loadable modules. */
#undef DEFAULT_MODULE_PATH
/* Path to installed libraries. */
#undef DEFAULT_LIBRARY_PATH
/* Path to server log file. */
#undef DEFAULT_LOGPREFIX