summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2006-11-22 14:46:51 -0800
committerAaron Plattner <aplattner@nvidia.com>2006-11-22 14:46:51 -0800
commit64de3baf85f6df274f71f736016f0848567cd9f6 (patch)
tree03d48badce505a36979c18d8657939f7674f8088
parent0a2a6e4070718b90af7ca0e047f028e0cabdfb9d (diff)
Add a -showDefaultLibPath option.
A corollary to the previous change, this option prints $libdir.
-rw-r--r--configure.ac1
-rw-r--r--hw/xfree86/common/xf86Init.c13
-rw-r--r--hw/xfree86/doc/man/Xorg.man.pre3
-rw-r--r--include/xorg-config.h.in3
4 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2108db4d3..590ab2ad0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 5106acfe3..ff878d59c 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -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");
@@ -1761,6 +1768,12 @@ xf86PrintDefaultModulePath(void)
}
static void
+xf86PrintDefaultLibraryPath(void)
+{
+ ErrorF("%s\n", DEFAULT_LIBRARY_PATH);
+}
+
+static void
xf86RunVtInit(void)
{
int i;
diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre
index 580310018..86457321c 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -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 .
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 4a64522a7..b9643a2a4 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -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