Cygwin/X: Look for system.Xwinrc in SYSCONFDIR/X11

Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11)
Rename sample system.Xwinrc file not to have a X11R6 path in it's name
Add makefile install rule for system.XWinrc

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Yaakov Selkowitz 2010-02-01 17:11:54 +00:00 committed by Jon TURNEY
parent 34269a90ea
commit 11252ed82e
5 changed files with 11 additions and 4 deletions

View File

@ -1825,6 +1825,7 @@ AC_MSG_RESULT([$XWIN])
if test "x$XWIN" = xyes; then
PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no])
AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [Location of system.XWinrc])
AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
AC_CHECK_TOOL(WINDRES, windres)

View File

@ -190,12 +190,14 @@ XWinrc.$(FILE_MAN_SUFFIX): XWinrc.man
EXTRAMANDEFS = -D__logdir__=$(logdir) -D__sysconfdir__=$(sysconfdir) -D__datadir__=$(datadir)
xwinconfigdir = $(sysconfdir)/X11
xwinconfig_DATA = system.XWinrc
include $(top_srcdir)/cpprules.in
EXTRA_DIST = \
$(GLX_EXTRAS) \
$(MAN_SRCS) \
_usr_X11R6_lib_X11_system.XWinrc \
X.ico \
XWin.rc \
xlaunch/config.cc \

View File

@ -1,7 +1,7 @@
# XWin Server Resource File - EXAMPLE
# Earle F. Philhower, III
# Place in ~/.XWinrc or in /usr/X11R6/lib/X11/system.XWinrc
# Place in ~/.XWinrc or in /etc/X11/system.XWinrc
# Keywords are case insensitive, comments legal pretty much anywhere
# you can have an end-of-line

View File

@ -723,7 +723,7 @@ winIconIsOverride(unsigned hiconIn)
/*
* Try and open ~/.XWinrc and /usr/X11R6/lib/X11/system.XWinrc
* Try and open ~/.XWinrc and system.XWinrc
* Load it into prefs structure for use by other functions
*/
void
@ -763,7 +763,7 @@ LoadPreferences (void)
#ifdef RELOCATE_PROJECTROOT
snprintf(buffer, sizeof(buffer), "%s\\system.XWinrc", winGetBaseDir());
#else
strncpy(buffer, PROJECTROOT"/lib/X11/system.XWinrc", sizeof(buffer));
strncpy(buffer, SYSCONFDIR"/X11/system.XWinrc", sizeof(buffer));
#endif
buffer[sizeof(buffer)-1] = 0;
prefFile = fopen (buffer, "r");

View File

@ -28,3 +28,7 @@
/* Vendor web address for support */
#undef __VENDORDWEBSUPPORT__
/* Location of system.XWinrc */
#undef SYSCONFDIR