[PATCH v2 1/2] configure: Change DEFAULT_LOGPREFIX to really be a filename prefix

Hans de Goede hdegoede at redhat.com
Wed Mar 26 04:24:49 PDT 2014


Rather then a full path prefix, this is a preparation patch for adding
support for logging to another location when not running as root.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 configure.ac                    | 5 +++--
 hw/xfree86/common/xf86Globals.c | 2 +-
 include/xorg-config.h.in        | 5 ++++-
 include/xwin-config.h.in        | 3 ---
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index a75ba8f..d278c6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2042,7 +2042,7 @@ if test "x$XORG" = xyes; then
 	XF86CONFIGDIR="xorg.conf.d"
 	AC_SUBST(XF86CONFIGDIR)
 	CONFIGFILE="$sysconfdir/$XF86CONFIGFILE"
-	LOGPREFIX="$logdir/Xorg."
+	LOGPREFIX="Xorg."
 	AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
 	AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
 	AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
@@ -2055,7 +2055,8 @@ if test "x$XORG" = xyes; then
 	AC_DEFINE_DIR(__XCONFIGDIR__, XF86CONFIGDIR, [Name of configuration directory])
 	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_DIR(DEFAULT_LOGDIR, logdir, [Default log location])
+	AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default logfile prefix])
 	AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
 	if test "x$VGAHW" = xyes; then
 		AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module])
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 7df7a80..984c39b 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -143,7 +143,7 @@ const char *xf86ConfigFile = NULL;
 const char *xf86ConfigDir = NULL;
 const char *xf86ModulePath = DEFAULT_MODULE_PATH;
 MessageType xf86ModPathFrom = X_DEFAULT;
-const char *xf86LogFile = DEFAULT_LOGPREFIX;
+const char *xf86LogFile = DEFAULT_LOGDIR "/" DEFAULT_LOGPREFIX;
 MessageType xf86LogFileFrom = X_DEFAULT;
 Bool xf86LogFileWasOpened = FALSE;
 serverLayoutRec xf86ConfigLayout = { NULL, };
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 77a1aae..4e2a45b 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -45,7 +45,10 @@
 /* Path to installed libraries. */
 #undef DEFAULT_LIBRARY_PATH
 
-/* Path to server log file. */
+/* Default log location */
+#undef DEFAULT_LOGDIR
+
+/* Default logfile prefix */
 #undef DEFAULT_LOGPREFIX
 
 /* Building DRI-capable DDX. */
diff --git a/include/xwin-config.h.in b/include/xwin-config.h.in
index 176c019..a5e6b17 100644
--- a/include/xwin-config.h.in
+++ b/include/xwin-config.h.in
@@ -26,8 +26,5 @@
 /* Vendor web address for support */
 #undef __VENDORDWEBSUPPORT__
 
-/* Default log location */
-#undef DEFAULT_LOGDIR
-
 /* Whether we should re-locate the root to where the executable lives */
 #undef RELOCATE_PROJECTROOT
-- 
1.9.0



More information about the xorg-devel mailing list