summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-08-21 03:01:44 +0000
committerBrian Cameron <bcameron@src.gnome.org>2008-08-21 03:01:44 +0000
commit56dc1e7905713562dc20364a1e7f1b49a48a715b (patch)
treeb100ade80843f6a8f31d28cb16ddddc3901b1a2f
parentca6e0bfa314b1fc31cb029ba187e43e4eedf8811 (diff)
downloadgdm-56dc1e7905713562dc20364a1e7f1b49a48a715b.tar.gz
Simplify the Solaris OS checks. Make it easy to insert Distribution
2008-08-20 Brian Cameron <brian.cameron@sun.com> * configure.ac: Simplify the Solaris OS checks. * data/Makefile.am, data/Xsession.in: Make it easy to insert Distribution specific scripting into the Xsession script. * data/Xsession.common, data/Xsession.solaris: Provide Solaris and default script. Patch by Takao Fujiwara <Takao.Fujiwara@sun.com> and Brian Cameron <Brian.Cameron@sun.com>. Fixes bugs #509141 and #547549. svn path=/trunk/; revision=6400
-rw-r--r--ChangeLog10
-rw-r--r--configure.ac44
-rw-r--r--data/Makefile.am10
-rw-r--r--data/Xsession.common1
-rwxr-xr-xdata/Xsession.in44
-rw-r--r--data/Xsession.solaris33
6 files changed, 77 insertions, 65 deletions
diff --git a/ChangeLog b/ChangeLog
index 67164e42..a0b1e656 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-08-20 Brian Cameron <brian.cameron@sun.com>
+
+ * configure.ac: Simplify the Solaris OS checks.
+ * data/Makefile.am, data/Xsession.in: Make it easy to insert
+ Distribution specific scripting into the Xsession script.
+ * data/Xsession.common, data/Xsession.solaris: Provide Solaris
+ and default script. Patch by Takao Fujiwara <Takao.Fujiwara@sun.com>
+ and Brian Cameron <Brian.Cameron@sun.com>. Fixes bugs #509141
+ and #547549.
+
2008-08-20 William Jon McCann <jmccann@redhat.com>
* gui/simple-greeter/gdm-greeter-panel.c
diff --git a/configure.ac b/configure.ac
index ba4ea32a..12a860a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -685,6 +685,16 @@ else
fi
AC_SUBST(GDMCHOOSER)
+dnl ---------------------------------------------------------------------------
+dnl - Check OS
+dnl ---------------------------------------------------------------------------
+
+os_solaris=no
+case "$host" in
+ *solaris*) os_solaris=yes
+ ;;
+esac
+AM_CONDITIONAL(OS_SOLARIS, test x$os_solaris = xyes)
dnl ---------------------------------------------------------------------------
dnl - Check for TCP Wrappers for XDMCP access control
@@ -695,15 +705,13 @@ if test x$with_tcp_wrappers = xno ; then
else
AC_MSG_CHECKING([whether to use TCP wrappers])
LIBWRAP_PATH=""
- case "$host" in
- *-*-solaris*)
+ if test x$os_solaris = xyes ; then
if test -f /usr/sfw/lib/libwrap.so; then
LIBWRAP_PATH=/usr/sfw/lib/libwrap.so
echo "Found $LIBWRAP_PATH" 1>&5
fi
LIBWRAP_LIBS="-L/usr/sfw/lib -R/usr/sfw/lib -lwrap"
- ;;
- *)
+ else
for I in $LDFLAGS $LIBS -L/usr/lib; do
case "$I" in
-L*)
@@ -717,8 +725,7 @@ else
;;
esac
done
- ;;
- esac
+ fi
if test -n "$LIBWRAP_PATH"; then
AC_MSG_RESULT(yes)
@@ -742,11 +749,7 @@ else
fi
fi
- case "$host" in
- *-*-solaris*)
- # No need for extra libwrap checking.
- ;;
- *)
+ if test x$os_solaris != xyes ; then
if test -n "$LIBWRAP_PATH"; then
AC_CHECK_LIB(wrap, hosts_ctl, [
LIBWRAP_LIBS="-lwrap"], [
@@ -781,8 +784,7 @@ LIBS="$OLD_LIBS"
AC_MSG_RESULT(no)
fi
fi
- ;;
- esac
+ fi
fi
AC_SUBST(LIBWRAP_LIBS)
@@ -807,10 +809,9 @@ if test "x$XINPUT_LIBS" = x; then
save_LIBS="$LIBS"
for xinputpath in $x_libraries /usr/X11R6/lib /usr/openwin/lib; do
LIBS="-L$xinputpath -lXi"
- case "$host" in
- *solaris*) XINPUT_RPATH_FLAGS="-R$xinputpath"
- ;;
- esac
+ if test x$os_solaris = xyes ; then
+ XINPUT_RPATH_FLAGS="-R$xinputpath"
+ fi
AC_MSG_CHECKING(for -lXi in $xinputpath)
AC_TRY_LINK([], [XOpenDevice()], [
AC_MSG_RESULT(yes)
@@ -851,8 +852,7 @@ fi
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
if test ! x$with_xinerama = xno ; then
- case "$host" in
- *-*-solaris*)
+ if test x$os_solaris = xyes ; then
# Check for solaris
use_solaris_xinerama=yes
AC_CHECK_LIB(Xext, XineramaGetInfo,
@@ -872,8 +872,7 @@ if test ! x$with_xinerama = xno ; then
fi
AC_MSG_CHECKING(for Xinerama support on Solaris)
AC_MSG_RESULT($use_solaris_xinerama);
- ;;
- *)
+ else
# Check for XFree
use_xfree_xinerama=yes
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
@@ -890,8 +889,7 @@ if test ! x$with_xinerama = xno ; then
use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
AC_MSG_CHECKING(for Xinerama support on XFree86)
AC_MSG_RESULT($use_xfree_xinerama);
- ;;
- esac
+ fi
fi
AC_SUBST(XINERAMA_LIBS)
diff --git a/data/Makefile.am b/data/Makefile.am
index 8d25b34c..2938279e 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -13,9 +13,17 @@ postlogindir = $(gdmconfdir)/PostLogin
workingdir = $(GDM_WORKING_DIR)
xauthdir = $(GDM_XAUTH_DIR)
+if OS_SOLARIS
+ DISTRO_XSESSION=$(srcdir)/Xsession.solaris
+else
+ DISTRO_XSESSION=$(srcdir)/Xsession.common
+endif
+
Xsession: $(srcdir)/Xsession.in
sed -e 's,[@]XSESSION_SHELL[@],$(XSESSION_SHELL),g' \
-e 's,[@]libexecdir[@],$(libexecdir),g' \
+ -e '/^# @DISTRO_XSESSION@/r $(DISTRO_XSESSION)' \
+ -e 's,[@]DISTRO_XSESSION[@],Distribution configuration section,g' \
<$(srcdir)/Xsession.in >Xsession
Init: $(srcdir)/Init.in
@@ -77,6 +85,8 @@ EXTRA_DIST = \
gdm.schemas.in.in \
gdm.conf-custom.in \
Xsession.in \
+ Xsession.common \
+ Xsession.solaris \
gdm \
gdm-autologin \
Init.in \
diff --git a/data/Xsession.common b/data/Xsession.common
new file mode 100644
index 00000000..a2db2c4e
--- /dev/null
+++ b/data/Xsession.common
@@ -0,0 +1 @@
+# There is no special configuration for this distro.
diff --git a/data/Xsession.in b/data/Xsession.in
index 89f88937..7d693841 100755
--- a/data/Xsession.in
+++ b/data/Xsession.in
@@ -3,7 +3,6 @@
# This is SORT OF LIKE an X session, but not quite. You get a command as the
# first argument (it could be multiple words, so run it with "eval"). As a
# special case, the command can be:
-# failsafe - Run an xterm only
# default - Run the appropriate Xclients startup (see the code below)
# custom - Run ~/.xsession and if that's not available run 'default'
#
@@ -26,10 +25,6 @@
command="$@"
-if [ -z "$command" ] ; then
- command=failsafe
-fi
-
# this will go into the .xsession-errors along with all other echo's
# good for debugging where things went wrong
echo "$0: Beginning session setup..."
@@ -77,16 +72,6 @@ gdmwhich () {
zenity=`gdmwhich zenity`
-if [ x"$command" = xfailsafe ] ; then
- if [ -n "$zenity" ] ; then
- disptext=`gettextfunc "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window."`
- "$zenity" --info --text "$disptext"
- else
- echo "$0: Starting the failsafe xterm session."
- fi
- exec xterm -geometry 80x24+0+0
-fi
-
# Note: ~/.xsession-errors is now done in the daemon so that it
# works for ALL sessions (except ones named 'Failsafe')
@@ -192,14 +177,6 @@ if [ -n "$GDM_LANG" ]; then
fi
fi
-# Normalize all LC_* settings to $LANG
-for var in "LC_ALL" "LC_CTYPE" "LC_NUMERIC" "LC_TIME" "LC_COLLATE" "LC_MONETARY" "LC_MESSAGES" \
- "LC_PAPER" "LC_NAME" "LC_ADDRESS" "LC_TELEPHONE" "LC_MEASUREMENT" "LC_IDENTIFICATION" ; do
- if eval "[ -n \"\$$var\" -a \"\$$var\" != \"\$LANG\" ]" ; then
- unset $var
- fi
-done
-
# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for i in /etc/X11/xinit/xinitrc.d/* ; do
@@ -209,27 +186,10 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
done
fi
+# @DISTRO_XSESSION@
#
-# To determine the character set used for filenames with
-# glib's g_filename_to/from_utf8() functions, we set the
-# environment variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES.
-#
-# G_BROKEN_FILENAMES, when set, lets the functions take the
-# character set for the current locale for filename's encoding.
+# End of Distribution configuration section.
#
-# G_FILENAME_ENCODING, which is introduced to glib 2.3.x and later, may be
-# set to a comma-separated list of character set names.
-# The special token "@locale" is taken to mean the character set
-# for the current locale. The first character set from the list is taken
-# as the filename encoding.
-#
-# If G_FILENAME_ENCODING is not set, but G_BROKEN_FILENAMES is, the
-# character set of the current locale is taken as the filename encoding.
-
-G_BROKEN_FILENAMES=yes
-export G_BROKEN_FILENAMES
-# G_FILENAME_ENCODING=@locale
-# export G_FILENAME_ENCODING
#Startup Input methods (IIIM->XIM)
if [ -f /etc/iiim/xsession ]; then
diff --git a/data/Xsession.solaris b/data/Xsession.solaris
new file mode 100644
index 00000000..81ea431e
--- /dev/null
+++ b/data/Xsession.solaris
@@ -0,0 +1,33 @@
+#
+# To determine the character set used for filenames with
+# glib's g_filename_to/from_utf8() functions, we set the
+# environment variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES.
+#
+# G_BROKEN_FILENAMES, when set, lets the functions take the
+# character set for the current locale for filename's encoding.
+#
+# G_FILENAME_ENCODING, which is introduced to glib 2.3.x and later, may be
+# set to a comma-separated list of character set names.
+# The special token "@locale" is taken to mean the character set
+# for the current locale. The first character set from the list is taken
+# as the filename encoding.
+#
+# If G_FILENAME_ENCODING is not set, but G_BROKEN_FILENAMES is, the
+# character set of the current locale is taken as the filename encoding.
+
+G_BROKEN_FILENAMES=yes
+export G_BROKEN_FILENAMES
+# G_FILENAME_ENCODING=@locale
+# export G_FILENAME_ENCODING
+
+export VTE_CJK_WIDTH=1
+
+if [ "x$LANG" = "xzh" ] ; then
+ export LANGUAGE=zh:zh_CN.EUC
+fi
+
+#Startup Input methods (SCIM->XIM)
+if [ -f /etc/scim/xsession ]; then
+ . /etc/scim/xsession
+fi
+