xserver: Branch 'master' - 2 commits
Aaron Plattner
aplattner at kemper.freedesktop.org
Thu Nov 23 01:38:55 EET 2006
configure.ac | 1 +
hw/xfree86/common/xf86Init.c | 26 ++++++++++++++++++++++++++
hw/xfree86/doc/man/Xorg.man.pre | 6 ++++++
include/xorg-config.h.in | 3 +++
4 files changed, 36 insertions(+)
New commits:
diff-tree 64de3baf85f6df274f71f736016f0848567cd9f6 (from 0a2a6e4070718b90af7ca0e047f028e0cabdfb9d)
Author: Aaron Plattner <aplattner at nvidia.com>
Date: Wed Nov 22 14:46:51 2006 -0800
Add a -showDefaultLibPath option.
A corollary to the previous change, this option prints $libdir.
diff --git a/configure.ac b/configure.ac
index 2108db4..590ab2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1383,6 +1383,7 @@ dnl has it in libc), or if libdl is need
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 5106acf..ff878d5 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
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 5803100..8645732 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 4a64522..b9643a2 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
diff-tree 0a2a6e4070718b90af7ca0e047f028e0cabdfb9d (from 61832cb94c8a4d62cddb92188caeed86519e9d62)
Author: Aaron Plattner <aplattner at nvidia.com>
Date: Fri Nov 17 18:27:23 2006 -0800
Add a -showDefaultModulePath option.
As discussed on the mailing list, people would rather have an X command-line
option to print the module path so installers can know where to put modules,
rather than the installers using `pkg-config --variable=moduledir xorg-server`,
since some distros choose not to install xorg-server.pc.
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 33351f2..5106acf 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -100,6 +100,7 @@
static void xf86PrintBanner(void);
static void xf86PrintMarkers(void);
+static void xf86PrintDefaultModulePath(void);
static void xf86RunVtInit(void);
#ifdef __UNIXOS2__
@@ -1376,6 +1377,11 @@ ddxProcessArgument(int argc, char **argv
xf86PrintBanner();
exit(0);
}
+ if (!strcmp(argv[i],"-showDefaultModulePath"))
+ {
+ xf86PrintDefaultModulePath();
+ exit(0);
+ }
/* Notice the -fp flag, but allow it to pass to the dix layer */
if (!strcmp(argv[i], "-fp"))
{
@@ -1625,6 +1631,7 @@ ddxUseMsg()
ErrorF("-ignoreABI make module ABI mismatches non-fatal\n");
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");
/* OS-specific usage */
xf86UseMsg();
ErrorF("\n");
@@ -1748,6 +1755,12 @@ xf86PrintMarkers()
}
static void
+xf86PrintDefaultModulePath(void)
+{
+ ErrorF("%s\n", DEFAULT_MODULE_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 b7fa990..5803100 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -426,6 +426,9 @@ Print out the server version, patchlevel
system/platform it was built on, and whether it includes module loader
support.
.TP 8
+.B \-showDefaultModulePath
+Print out the default module path the server was compiled with.
+.TP 8
.BI \-config " file"
Read the server configuration from
.IR file .
More information about the xorg-commit
mailing list