[PATCH:app/xinit] Use platform-specific X server names in man pages for cygwin & darwin

Alan Coopersmith alan.coopersmith at sun.com
Fri Oct 16 20:28:57 PDT 2009


Signed-off-by: Alan Coopersmith <alan.coopersmith at sun.com>
---
 configure.ac |   22 +++++++++++++++++-----
 cpprules.in  |    4 +++-
 startx.man   |   10 ++++++----
 xinit.man    |    2 ++
 4 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3e8ad50..419920f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,22 +170,34 @@ fi
 AC_SUBST(STARTX_COOKIE_FLAGS)
 
 # Additional substitutions in startx, xinitrc & man pages
+ARCHMANDEFS=""
+SHELL_CMD="/bin/sh"
+XSERVERNAME="Xorg"
+XCONFIGFILE="xorg.conf"
+XCONFIGFILEMAN='${XCONFIGFILE} (__filemansuffix__)'
 case $host_os in
+    cygwin*)
+	XSERVERNAME="XWin"
+	XCONFIGFILE="XWinrc"
+	;;
+    darwin*)
+	XSERVERNAME="Xquartz"
+	XCONFIGFILE="defaults"
+	XCONFIGFILEMAN='defaults (1)'
+	;;
     *solaris*)
 	SHELL_CMD="/bin/ksh"
-	ARCHMANDEFS=""
 	;;
     *sco*)
 	SHELL_CMD="/bin/ksh"
 	ARCHMANDEFS="-D__SCOMAN__"
 	;;
-    *)
-	SHELL_CMD="/bin/sh"
-	ARCHMANDEFS=""
-	;;
 esac
 AC_SUBST(SHELL_CMD)
 AC_SUBST(ARCHMANDEFS)
+AC_SUBST(XSERVERNAME)
+AC_SUBST(XCONFIGFILE)
+AC_SUBST(XCONFIGFILEMAN)
 
 AC_SUBST(XRDB)
 AC_SUBST(XMODMAP)
diff --git a/cpprules.in b/cpprules.in
index c04855b..18089de 100644
--- a/cpprules.in
+++ b/cpprules.in
@@ -23,7 +23,9 @@ MANDEFS =  \
 	-D__filemansuffix__=$(FILE_MAN_SUFFIX) \
 	-D__libmansuffix__=$(LIB_MAN_SUFFIX) \
 	-D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
-	-D__XSERVERNAME__=Xorg -D__XCONFIGFILE__=xorg.conf \
+	-D__XSERVERNAME__='$(XSERVERNAME)' \
+	-D__XCONFIGFILE__='$(XCONFIGFILE)' \
+	-D__XCONFIGFILEMAN__='$(XCONFIGFILEMAN)' \
 	-D__xinitdir__=$(XINITDIR) \
 	-D__bindir__=$(bindir) \
 	-DSHELL_CMD=$(SHELL_CMD) $(ARCHMANDEFS)
diff --git a/startx.man b/startx.man
index e730272..a4dede0 100644
--- a/startx.man
+++ b/startx.man
@@ -63,9 +63,9 @@ display device presents, or take advantage of a different server layout, as
 permitted by the
 .BR __XSERVERNAME__ (__appmansuffix__)
 server and specified in the
-.BR __XCONFIGFILE__ (__filemansuffix__)
-file.  Some examples of specifying server arguments follow; consult the
-manual page for your X server to determine which arguments are legal.
+.BR __XCONFIGFILEMAN__
+configuration.  Some examples of specifying server arguments follow; consult
+the manual page for your X server to determine which arguments are legal.
 .RS
 .PP
 startx -- -depth 16
@@ -217,5 +217,7 @@ Server to run if the user has no
 file.
 .SH "SEE ALSO"
 .BR xinit (__appmansuffix__),
+.BR X (__miscmansuffix__),
 .BR Xserver (__appmansuffix__),
-.BR __XSERVERNAME__ (__appmansuffix__)
+.BR __XSERVERNAME__ (__appmansuffix__),
+.BR __XCONFIGFILEMAN__
diff --git a/xinit.man b/xinit.man
index 538f926..31b93aa 100644
--- a/xinit.man
+++ b/xinit.man
@@ -192,6 +192,8 @@ server to run if \fI.xserverrc\fP does not exist
 .BR X (__miscmansuffix__),
 .BR startx (__appmansuffix__),
 .BR Xserver (__appmansuffix__),
+.BR __XSERVERNAME__ (__appmansuffix__),
+.BR __XCONFIGFILEMAN__,
 .BR xterm (__appmansuffix__)
 .SH AUTHOR
 Bob Scheifler, MIT Laboratory for Computer Science
-- 
1.5.6.5



More information about the xorg-devel mailing list