Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gdm2/ChangeLog,v
retrieving revision 1.1384
diff -u -p -r1.1384 ChangeLog
--- ChangeLog	28 Mar 2006 01:43:59 -0000	1.1384
+++ ChangeLog	28 Mar 2006 15:54:28 -0000
@@ -1,3 +1,17 @@
+2006-03-28  Julio M. Merino Vidal  <jmmv@NetBSD.org>
+
+	* Makefile.am, README.install, acconfig.h, configure.ac,
+	  gdmsetup-security.in, config/Makefile.am, config/Xsession.in,
+	  config/gdm.conf.in, daemon/Makefile.am, daemon/gdm.c, daemon/gdm.h,
+	  daemon/gdm.in, daemon/gdmconfig.c, daemon/misc.c, daemon/server.c,
+	  daemon/slave.c, docs/C/gdm.xml, gui/Makefile.am, gui/gdmphotosetup.c,
+	  gui/gdmsetup.c, gui/gdmsetup.desktop.in, gui/greeter/Makefile.am,
+	  gui/greeter/gdmthemetester.in, gui/greeter/greeter.c,
+	  gui/modules/Makefile.am: Get rid of all EXPANDED_* variables from
+	  the build procedure.  Directory-related variables must only be
+	  expanded from the Makefiles so that they can be easily overriden
+	  during the installation phase.
+
 2006-03-27  Brian Cameron  <brian.cameron@sun.com>
 
 	* acconfig.h, configure.ac, config/Makefile.am, config/PostLogin,
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gdm2/Makefile.am,v
retrieving revision 1.44
diff -u -p -r1.44 Makefile.am
--- Makefile.am	13 Feb 2006 21:46:53 -0000	1.44
+++ Makefile.am	28 Mar 2006 15:54:28 -0000
@@ -31,10 +31,19 @@ EXTRA_DIST = \
 
 sbin_SCRIPTS = gdm-stop gdm-restart gdm-safe-restart
 
-install-data-local: gdmsetup-security
 if CONSOLE_HELPER
-	$(INSTALL_DATA) -D $(srcdir)/gdmsetup-pam $(DESTDIR)$(PAM_PREFIX)/pam.d/gdmsetup
-	$(INSTALL_DATA) -D gdmsetup-security $(DESTDIR)$(PAM_PREFIX)/security/console.apps/gdmsetup
+cappsdir = $(PAM_PREFIX)/security/console.apps
+capps_DATA = gdmsetup
+
+CLEANFILES = gdmsetup-security
+gdmsetup: $(srcdir)/gdmsetup-security.in
+	sed -e 's,[@]sbindir[@],$(sbindir),g' <$(srcdir)/gdmsetup-security.in >gdmsetup
+
+install-data-local:
+	$(mkinstalldirs) $(DESTDIR)$(PAM_PREFIX)/pam.d
+	$(INSTALL_DATA) $(srcdir)/gdmsetup-pam $(DESTDIR)$(PAM_PREFIX)/pam.d/gdmsetup
+else
+install-data-local:
 endif
 
 DISTCLEANFILES = \
Index: README.install
===================================================================
RCS file: /cvs/gnome/gdm2/README.install,v
retrieving revision 1.22
diff -u -p -r1.22 README.install
--- README.install	13 Feb 2006 21:37:12 -0000	1.22
+++ README.install	28 Mar 2006 15:54:28 -0000
@@ -45,7 +45,7 @@ pam.conf file is located if it is not in
 (sysconfdir or /etc).
 
 If you want accessibility to work and have AT programs like gok and
-gnopernicus installed to a different directory than EXPANDED_BINDIR,
+gnopernicus installed to a different directory than bindir,
 then use the --with-at-bindir configure option.
 
 For best a11y support on Linux, it is recommended use the
Index: acconfig.h
===================================================================
RCS file: /cvs/gnome/gdm2/acconfig.h,v
retrieving revision 1.35
diff -u -p -r1.35 acconfig.h
--- acconfig.h	28 Mar 2006 01:44:12 -0000	1.35
+++ acconfig.h	28 Mar 2006 15:54:28 -0000
@@ -1,11 +1,6 @@
 #undef PACKAGE
 #undef VERSION
-#undef AT_BINDIR
 #undef GETTEXT_PACKAGE
-#undef GDM_DEFAULTS_CONF
-#undef GDM_CUSTOM_CONF
-#undef GDM_OLD_CONF
-#undef GDM_USER_PATH
 #undef HALT_COMMAND
 #undef REBOOT_COMMAND
 #undef SOUND_PROGRAM
@@ -41,19 +36,6 @@
 #undef HAVE_XINERAMA
 #undef HAVE_XFREE_XINERAMA
 #undef HAVE_XINPUT
-#undef EXPANDED_AUTHDIR
-#undef EXPANDED_DATADIR
-#undef EXPANDED_BINDIR
-#undef EXPANDED_DMCONFDIR
-#undef EXPANDED_GDMCONFDIR
-#undef EXPANDED_LIBEXECDIR
-#undef EXPANDED_LIBDIR
-#undef EXPANDED_LOCALEDIR
-#undef EXPANDED_LOGDIR
-#undef EXPANDED_PIXMAPDIR
-#undef EXPANDED_SBINDIR
-#undef EXPANDED_SESSDIR
-#undef EXPANDED_SYSCONFSUBDIR
 #undef X_SERVER
 #undef X_SERVER_PATH
 #undef X_XNEST_PATH
Index: configure.ac
===================================================================
RCS file: /cvs/gnome/gdm2/configure.ac,v
retrieving revision 1.33
diff -u -p -r1.33 configure.ac
--- configure.ac	28 Mar 2006 01:44:12 -0000	1.33
+++ configure.ac	28 Mar 2006 15:54:28 -0000
@@ -20,25 +20,6 @@ LIBXML_REQUIRED=2.4.12
 LIBART_REQUIRED=2.3.11
 SCROLLKEEPER_REQUIRED=0.1.4
 
-# find the actual value for $prefix that we'll end up with
-REAL_PREFIX=
-if test "x$prefix" = "xNONE"; then
-  REAL_PREFIX=$ac_default_prefix
-else
-  REAL_PREFIX=$prefix
-fi
-old_prefix=$prefix
-prefix=$REAL_PREFIX
-
-REAL_EXEC_PREFIX=
-if test "x$exec_prefix" = "xNONE"; then
-  REAL_EXEC_PREFIX=$prefix
-else
-  REAL_EXEC_PREFIX=$exec_prefix
-fi
-old_exec_prefix=$exec_prefix
-exec_prefix=$REAL_EXEC_PREFIX
-
 dnl
 dnl Let the user configure where to look for the configuration files.
 dnl
@@ -123,11 +104,10 @@ if test x$withval != x; then
    AC_MSG_RESULT("PAM files will be installed in prefix ${withval}.")
 fi])
 if test x$withval != x; then
-	PAM_PREFIX_UNEXPANDED="$withval"
+	PAM_PREFIX="$withval"
 else
-	PAM_PREFIX_UNEXPANDED="$sysconfdir"
+	PAM_PREFIX='${sysconfdir}'
 fi
-PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED`
 AC_SUBST(PAM_PREFIX)
 
     
@@ -789,88 +769,24 @@ AC_SUBST(EXTRA_DYNAMIC_LIBS)
 AC_SUBST(EXTRA_SETUP_LIBS)
 
 #
-# Configuration file foo, we need to get expanded versions of a bunch of things
-# if you actually know how to code shell then fix this :-) 
-# Stolen mostly from GConf
-#
-
-DATADIR_TMP="$datadir"
-EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
-AC_SUBST(EXPANDED_DATADIR)
-AC_DEFINE_UNQUOTED(EXPANDED_DATADIR,"$EXPANDED_DATADIR")
-
-PIXMAPDIR_TMP="$datadir/pixmaps"
-EXPANDED_PIXMAPDIR=`eval echo $PIXMAPDIR_TMP`
-AC_SUBST(EXPANDED_PIXMAPDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_PIXMAPDIR,"$EXPANDED_PIXMAPDIR")
-
-# Only set EXPANDED_BINDIR if it is a value that is not in
-# the path already (/bin or /usr/bin)
-#
-BINDIR_TMP="$bindir"
-EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
-AC_SUBST(EXPANDED_BINDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_BINDIR,"$EXPANDED_BINDIR")
-
-SBINDIR_TMP="$sbindir"
-EXPANDED_SBINDIR=`eval echo $SBINDIR_TMP`
-AC_SUBST(EXPANDED_SBINDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_SBINDIR,"$EXPANDED_SBINDIR")
-
-LIBEXECDIR_TMP="$libexecdir"
-EXPANDED_LIBEXECDIR=`eval echo $LIBEXECDIR_TMP`
-AC_SUBST(EXPANDED_LIBEXECDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_LIBEXECDIR,"$EXPANDED_LIBEXECDIR")
-
-LIBDIR_TMP="$libdir"
-EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
-AC_SUBST(EXPANDED_LIBDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_LIBDIR,"$EXPANDED_LIBDIR")
-
-LOCALEDIR_TMP="$gdmconfdir"
-EXPANDED_LOCALEDIR=`eval echo $LOCALEDIR_TMP`
-AC_SUBST(EXPANDED_LOCALEDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_LOCALEDIR,"$EXPANDED_LOCALEDIR")
-
-AUTHDIR_TMP="$localstatedir/gdm"
-EXPANDED_AUTHDIR=`eval echo $AUTHDIR_TMP`
-AC_SUBST(EXPANDED_AUTHDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_AUTHDIR,"$EXPANDED_AUTHDIR")
-
-LOGDIR_TMP="$localstatedir/log/gdm"
-EXPANDED_LOGDIR=`eval echo $LOGDIR_TMP`
-AC_SUBST(EXPANDED_LOGDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_LOGDIR,"$EXPANDED_LOGDIR")
-
-DMCONFDIR_TMP="$dmconfdir"
-EXPANDED_DMCONFDIR=`eval echo $DMCONFDIR_TMP`
-AC_SUBST(EXPANDED_DMCONFDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_DMCONFDIR,"$EXPANDED_DMCONFDIR")
-
-GDMCONFDIR_TMP="$gdmconfdir"
-EXPANDED_GDMCONFDIR=`eval echo $GDMCONFDIR_TMP`
-AC_SUBST(EXPANDED_GDMCONFDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_GDMCONFDIR,"$EXPANDED_GDMCONFDIR")
-
-if test x$DMX_SUPPORT = xyes ; then
-	GDM_RECONNECT_PROXY=$EXPANDED_BINDIR/gdm-dmx-reconnect-proxy
-else
-	GDM_RECONNECT_PROXY=
-fi
-AC_SUBST(GDM_RECONNECT_PROXY)
+# Define some variables to represent the directories we use.
+#
+AC_SUBST(authdir, ${localstatedir}/gdm)
+AC_SUBST(gdmlocaledir, ${gdmconfdir})
+AC_SUBST(logdir, ${localstatedir}/log/gdm)
+AC_SUBST(pixmapdir, ${datadir}/pixmaps)
 
 withval=""
 AC_ARG_WITH(at-bindir,
-[  --with-at-bindir=<PATH>   PATH to Accessible Technology programs [default=EXPANDED_BINDIR]],)
+[  --with-at-bindir=<PATH>   PATH to Accessible Technology programs [default=BINDIR]],)
 
 if test x$withval != x; then
 	AT_BINDIR="$withval"
 else
-	AT_BINDIR=$EXPANDED_BINDIR
+	AT_BINDIR='${bindir}'
 fi
 
 AC_SUBST(AT_BINDIR)
-AC_DEFINE_UNQUOTED(AT_BINDIR,"$AT_BINDIR")
 
 withval=""
 AC_ARG_WITH(defaults_conf,
@@ -879,11 +795,10 @@ AC_ARG_WITH(defaults_conf,
 if test x$withval != x; then
 	GDM_DEFAULTS_CONF="$withval"
 else
-	GDM_DEFAULTS_CONF="$EXPANDED_DATADIR/gdm/defaults.conf"
+	GDM_DEFAULTS_CONF='${datadir}/gdm/defaults.conf'
 fi
 
 AC_SUBST(GDM_DEFAULTS_CONF)
-AC_DEFINE_UNQUOTED(GDM_DEFAULTS_CONF,"$GDM_DEFAULTS_CONF")
 
 withval=""
 AC_ARG_WITH(custom_conf,
@@ -892,15 +807,11 @@ AC_ARG_WITH(custom_conf,
 if test x$withval != x; then
 	GDM_CUSTOM_CONF="$withval"
 else
-	GDM_CUSTOM_CONF="$EXPANDED_GDMCONFDIR/custom.conf"
+	GDM_CUSTOM_CONF='${gdmconfdir}/custom.conf'
 fi
 
-GDM_OLD_CONF="$EXPANDED_GDMCONFDIR/gdm.conf"
-
 AC_SUBST(GDM_CUSTOM_CONF)
-AC_DEFINE_UNQUOTED(GDM_CUSTOM_CONF,"$GDM_CUSTOM_CONF")
-AC_SUBST(GDM_OLD_CONF)
-AC_DEFINE_UNQUOTED(GDM_OLD_CONF,"$GDM_OLD_CONF")
+AC_SUBST(GDM_OLD_CONF, '${gdmconfdir}/gdm.conf')
 
 AC_ARG_WITH(prefetch,
   [  --with-prefetch=[yes/no]  Install GDM library prefetch utility [default=no]],,
@@ -909,7 +820,7 @@ AC_ARG_WITH(prefetch,
 if test x$with_prefetch != xno ; then
 	GDMPREFETCH="gdmprefetch"
         GDMPREFETCHLIST="gdmprefetchlist"
-        GDMPREFETCHCMD="$EXPANDED_LIBDIR/gdmprefetch @$EXPANDED_GDMCONFDIR/gdmprefetchlist"
+        GDMPREFETCHCMD='${libdir}/gdmprefetch ${gdmconfdir}/gdmprefetchlist'
 fi
 AC_SUBST(GDMPREFETCH)
 AC_SUBST(GDMPREFETCHLIST)
@@ -935,7 +846,7 @@ fi
 if test x$enable_secureremote != xno ; then
        SSHDESKTOP="ssh.desktop"
         GDMSSHSESSION="gdm-ssh-session"
-        GDMSSHSESSIONCMD="$EXPANDED_LIBEXECDIR/gdm-ssh-session"
+        GDMSSHSESSIONCMD='${libexecdir}/gdm-ssh-session'
 fi
 AC_SUBST(SSHDESKTOP)
 AC_SUBST(GDMSSHSESSION)
@@ -1071,10 +982,18 @@ else
    X_CONFIG_OPTIONS="-audit 0"
 fi
 
-# Don't add EXPANDED_BINDIR to GDM_USER_PATH if it is already in the PATH.
+# Don't add bindir to GDM_USER_PATH if it is already in the PATH.
 # If it is /usr/bin, for example.
-if test "x$EXPANDED_BINDIR" != "x/bin" -a "x$EXPANDED_BINDIR" != "x/usr/bin"; then
-   GDM_USER_PATH="$GDM_USER_PATH:$EXPANDED_BINDIR"
+if test "x${bindir}" != 'x${exec_prefix}/bin' -a "x${exec_prefix}" = 'x${prefix}'; then
+    if ${prefix} != / -a ${prefix} != /bin; then
+        GDM_USER_PATH="$GDM_USER_PATH:${bindir}"
+    fi
+elif test "x${bindir}" != 'x${exec_prefix}/bin' -a "x${exec_prefix}" != 'x${prefix}'; then
+    if ${exec_prefix} != / -a ${exec_prefix} != /bin; then
+        GDM_USER_PATH="$GDM_USER_PATH:${bindir}"
+    fi
+elif test "x${bindir}" != 'x/bin'; then
+    GDM_USER_PATH="$GDM_USER_PATH:${bindir}"
 fi
 
 # You have to use /usr/openwin/bin/Xnest even if you are using the
@@ -1108,7 +1027,6 @@ AC_DEFINE_UNQUOTED(SUSPEND_COMMAND,"$SUS
 AC_SUBST(XSESSION_SHELL)
 AC_DEFINE_UNQUOTED(XSESSION_SHELL,"$XSESSION_SHELL")
 AC_SUBST(GDM_USER_PATH)
-AC_DEFINE_UNQUOTED(GDM_USER_PATH,"$GDM_USER_PATH")
 AC_SUBST(SOUND_PROGRAM)
 AC_DEFINE_UNQUOTED(SOUND_PROGRAM,"$SOUND_PROGRAM")
 
@@ -1122,11 +1040,6 @@ AC_DEFINE_UNQUOTED(X_SERVER,"$X_SERVER")
 AC_DEFINE_UNQUOTED(X_SERVER_PATH,"$X_SERVER_PATH")
 AC_DEFINE_UNQUOTED(X_CONFIG_OPTIONS,"$X_CONFIG_OPTIONS", Options used when launching xserver)
 
-SESSDIR_TMP="$EXPANDED_GDMCONFDIR/Sessions"
-EXPANDED_SESSDIR=`eval echo $SESSDIR_TMP`
-AC_SUBST(EXPANDED_SESSDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_SESSDIR,"$EXPANDED_SESSDIR")
-
 ## Stuff for debian/changelog.in
 #if test -e "debian/changelog"; then
 #  DEBIAN_DATESTAMP=`head -1 debian/changelog| sed -e 's/.*cvs.//' -e 's/).*//'`
@@ -1139,9 +1052,6 @@ AC_DEFINE_UNQUOTED(EXPANDED_SESSDIR,"$EX
 #AC_SUBST(DEBIAN_DATESTAMP)
 #AC_SUBST(DEBIAN_DATE)
 
-prefix=$old_prefix
-exec_prefix=$old_exec_prefix
-
 AC_OUTPUT([
 Makefile
 daemon/Makefile
@@ -1152,10 +1062,7 @@ gui/greeter/themes/Makefile
 gui/greeter/themes/circles/Makefile
 gui/greeter/themes/happygnome/Makefile
 gui/greeter/themes/happygnome-list/Makefile
-gui/greeter/gdmthemetester
 gui/modules/Makefile
-gui/modules/AccessKeyMouseEvents
-gui/modules/AccessDwellMouseEvents
 utils/Makefile
 pixmaps/Makefile
 pixmaps/16x16/Makefile
@@ -1175,18 +1082,14 @@ docs/ko/Makefile
 docs/zh_CN/Makefile
 docs/zh_HK/Makefile
 docs/zh_TW/Makefile
-config/gdm.conf
-config/Xsession
 config/Init
 config/PreSession
 config/PostSession
 config/gdmprefetchlist
 config/ssh.desktop
-daemon/gdm
 gdm-stop
 gdm-restart
 gdm-safe-restart
-gdmsetup-security
 gdm.spec
 ])
 
@@ -1208,14 +1111,15 @@ echo ""
 
 dnl <= Prefixes =>
 echo "prefix : $prefix"
-echo "sysconf "`eval echo $EXPANDED_SYSCONFDIR`
-echo "gdmconf dir : "`eval echo $EXPANDED_GDMCONFDIR`
-echo "dmconf dir : "`eval echo $EXPANDED_DMCONFDIR`
-echo "bin dir : $EXPANDED_BINDIR"
-echo "sbin dir : $EXPANDED_SBINDIR"
+echo "sysconf : $sysconfdir"
+echo "sysconfsubdir : $sysconfsubdir"
+echo "gdmconf dir : $gdmconfdir"
+echo "dmconf dir : $dmconfdir"
+echo "bin dir : $bindir"
+echo "sbin dir : $sbindir"
 echo "PAM prefix : $PAM_PREFIX"
-echo "data dir : "`eval echo $EXPANDED_DATADIR`
-echo "X server : "`eval echo $X_SERVER`
+echo "data dir : $datadir"
+echo "X server : $X_SERVER"
 echo ""
 
 dnl <= TCP Wrappers support? =>
Index: gdmsetup-security.in
===================================================================
RCS file: /cvs/gnome/gdm2/gdmsetup-security.in,v
retrieving revision 1.3
diff -u -p -r1.3 gdmsetup-security.in
--- gdmsetup-security.in	11 Mar 2005 00:15:04 -0000	1.3
+++ gdmsetup-security.in	28 Mar 2006 15:54:28 -0000
@@ -1,5 +1,5 @@
 USER=root
-PROGRAM=@EXPANDED_SBINDIR@/gdmsetup
+PROGRAM=@sbindir@/gdmsetup
 SESSION=true
 FALLBACK=false
 
Index: config/Makefile.am
===================================================================
RCS file: /cvs/gnome/gdm2/config/Makefile.am,v
retrieving revision 1.65
diff -u -p -r1.65 Makefile.am
--- config/Makefile.am	28 Mar 2006 01:44:14 -0000	1.65
+++ config/Makefile.am	28 Mar 2006 15:54:29 -0000
@@ -36,6 +36,41 @@ EXTRA_DIST = \
 	gdmprefetchlist.in \
 	extract-shell.sh
 
+CLEANFILES = Xsession gdm.conf ssh.desktop
+
+Xsession: $(srcdir)/Xsession.in
+	sed	-e 's,[@]XSESSION_SHELL[@],$(XSESSION_SHELL),g' \
+		-e 's,[@]libexecdir[@],$(libexecdir),g' \
+		<$(srcdir)/Xsession.in >Xsession
+
+gdm.conf: $(srcdir)/gdm.conf.in
+	sed	-e 's,[@]GDMPREFETCHCMD[@],$(GDMPREFETCHCMD),g' \
+		-e 's,[@]GDM_USER_PATH[@],$(GDM_USER_PATH),g' \
+		-e 's,[@]HALT_COMMAND[@],$(HALT_COMMAND),g' \
+		-e 's,[@]REBOOT_COMMAND[@],$(REBOOT_COMMAND),g' \
+		-e 's,[@]SOUND_PROGRAM[@],$(SOUND_PROGRAM),g' \
+		-e 's,[@]SUSPEND_COMMAND[@],$(SUSPEND_COMMAND),g' \
+		-e 's,[@]XEVIE_OPTION[@],$(XEVIE_OPTION),g' \
+		-e 's,[@]X_CONFIG_OPTIONS[@],$(X_CONFIG_OPTIONS),g' \
+		-e 's,[@]X_SERVER[@],$(X_SERVER),g' \
+		-e 's,[@]X_XNEST_CONFIG_OPTIONS[@],$(X_XNEST_CONFIG_OPTIONS),g' \
+		-e 's,[@]X_XNEST_PATH[@],$(X_XNEST_PATH),g' \
+		-e 's,[@]authdir[@],$(authdir),g' \
+		-e 's,[@]datadir[@],$(datadir),g' \
+		-e 's,[@]dmconfdir[@],$(dmconfdir),g' \
+		-e 's,[@]gdmconfdir[@],$(gdmconfdir),g' \
+		-e 's,[@]libdir[@],$(libdir),g' \
+		-e 's,[@]libexecdir[@],$(libexecdir),g' \
+		-e 's,[@]localedir[@],$(libexecdir),g' \
+		-e 's,[@]logdir[@],$(logdir),g' \
+		-e 's,[@]pixmapdir[@],$(pixmapdir),g' \
+		-e 's,[@]sbindir[@],$(sbindir),g' \
+		<$(srcdir)/gdm.conf.in >gdm.conf
+
+ssh.desktop: $(srcdir)/ssh.desktop.in
+	sed	-e 's,[@]GDMSSHSESSIONCMD[@],$(GDMSSHSESSIONCMD),g' \
+		<$(srcdir)/ssh.desktop.in >ssh.desktop
+
 gettextfoo.h: XKeepsCrashing Xsession.in
 	cat $^ | $(srcdir)/extract-shell.sh > gettextfoo.h
 
Index: config/Xsession.in
===================================================================
RCS file: /cvs/gnome/gdm2/config/Xsession.in,v
retrieving revision 1.19
diff -u -p -r1.19 Xsession.in
--- config/Xsession.in	15 Feb 2006 21:57:40 -0000	1.19
+++ config/Xsession.in	28 Mar 2006 15:54:29 -0000
@@ -42,8 +42,8 @@ test -f /etc/xprofile && . /etc/xprofile
 test -f "$HOME/.xprofile" && . "$HOME/.xprofile"
 
 # Translation stuff
-if [ -x "@EXPANDED_LIBEXECDIR@/gdmtranslate" ] ; then
-  gdmtranslate="@EXPANDED_LIBEXECDIR@/gdmtranslate"
+if [ -x "@libexecdir@/gdmtranslate" ] ; then
+  gdmtranslate="@libexecdir@/gdmtranslate"
 else
   gdmtranslate=
 fi
Index: config/gdm.conf.in
===================================================================
RCS file: /cvs/gnome/gdm2/config/gdm.conf.in,v
retrieving revision 1.152
diff -u -p -r1.152 gdm.conf.in
--- config/gdm.conf.in	28 Mar 2006 01:44:14 -0000	1.152
+++ config/gdm.conf.in	28 Mar 2006 15:54:29 -0000
@@ -53,19 +53,19 @@ TimedLoginDelay=30
 
 # The GDM configuration program that is run from the login screen, you should
 # probably leave this alone.
-#Configurator=@EXPANDED_SBINDIR@/gdmsetup --disable-sound --disable-crash-dialog
+#Configurator=@sbindir@/gdmsetup --disable-sound --disable-crash-dialog
 
 # The chooser program.  Must output the chosen host on stdout, probably you
 # should leave this alone.
-#Chooser=@EXPANDED_LIBEXECDIR@/gdmchooser
+#Chooser=@libexecdir@/gdmchooser
 
 # The greeter for local (non-xdmcp) logins.  Change gdmlogin to gdmgreeter to
 # get the new graphical greeter.
-#Greeter=@EXPANDED_LIBEXECDIR@/gdmlogin
+#Greeter=@libexecdir@/gdmlogin
 
 # The greeter for xdmcp logins, usually you want a less graphically intensive
 # greeter here so it's better to leave this with gdmlogin
-#RemoteGreeter=@EXPANDED_LIBEXECDIR@/gdmlogin
+#RemoteGreeter=@libexecdir@/gdmlogin
 
 # Launch the greeter with an additional list of colon separated GTK+ modules.
 # This is useful for enabling additional feature support e.g. GNOME
@@ -73,7 +73,7 @@ TimedLoginDelay=30
 # security holes
 #AddGtkModules=false
 # By default, these are the accessibility modules.
-#GtkModulesList=gail:atk-bridge:@EXPANDED_LIBDIR@/gtk-2.0/modules/libdwellmouselistener:@EXPANDED_LIBDIR@/gtk-2.0/modules/libkeymouselistener
+#GtkModulesList=gail:atk-bridge:@libdir@/gtk-2.0/modules/libdwellmouselistener:@libdir@/gtk-2.0/modules/libkeymouselistener
 
 # Default path to set.  The profile scripts will likely override this value.
 # This value will be overridden with the value from /etc/default/login if it
@@ -98,40 +98,40 @@ Group=gdm
 # To try to kill all clients started at greeter time or in the Init script.
 # does not always work, only if those clients have a window of their own.
 #KillInitClients=true
-LogDir=@EXPANDED_LOGDIR@
+LogDir=@logdir@
 # You should probably never change this value unless you have a weird setup.
 PidFile=/var/run/gdm.pid
 
 # Note that a post login script is run before a PreSession script.  It is run
 # after the login is successful and before any setup is run on behalf of the
 # user.
-PostLoginScriptDir=@EXPANDED_GDMCONFDIR@/PostLogin/
-PreSessionScriptDir=@EXPANDED_GDMCONFDIR@/PreSession/
-PostSessionScriptDir=@EXPANDED_GDMCONFDIR@/PostSession/
-DisplayInitDir=@EXPANDED_GDMCONFDIR@/Init
+PostLoginScriptDir=@gdmconfdir@/PostLogin/
+PreSessionScriptDir=@gdmconfdir@/PreSession/
+PostSessionScriptDir=@gdmconfdir@/PostSession/
+DisplayInitDir=@gdmconfdir@/Init
 # Distributions:  If you have some script that runs an X server in say VGA
 # mode, allowing a login, could you please send it to me?
 #FailsafeXServer=
 # if X keeps crashing on us we run this script.  The default one does a bunch
 # of cool stuff to figure out what to tell the user and such and can run an X
 # configuration program.
-XKeepsCrashing=@EXPANDED_GDMCONFDIR@/XKeepsCrashing
+XKeepsCrashing=@gdmconfdir@/XKeepsCrashing
 # Reboot, Halt and suspend commands, you can add different commands separated
 # by a semicolon.  GDM will use the first one it can find.
 #RebootCommand=@REBOOT_COMMAND@
 #HaltCommand=@HALT_COMMAND@
 #SuspendCommand=@SUSPEND_COMMAND@
 # Probably should not touch the below this is the standard setup.
-ServAuthDir=@EXPANDED_AUTHDIR@
+ServAuthDir=@authdir@
 # This is our standard startup script.  A bit different from a normal X
 # session, but it shares a lot of stuff with that.  See the provided default
 # for more information.
-BaseXsession=@EXPANDED_GDMCONFDIR@/Xsession
+BaseXsession=@gdmconfdir@/Xsession
 # This is a directory where .desktop files describing the sessions live.  It is
 # really a PATH style variable since 2.4.4.2 to allow actual interoperability
 # with KDM.  Note that <dmconfdir>/Sessions is there for backwards
 # compatibility reasons with 2.4.4.x.
-#SessionDesktopDir=/etc/X11/sessions/:@EXPANDED_DMCONFDIR@/Sessions/:@EXPANDED_DATADIR@/gdm/BuiltInSessions/:@EXPANDED_DATADIR@/xsessions/
+#SessionDesktopDir=/etc/X11/sessions/:@dmconfdir@/Sessions/:@datadir@/gdm/BuiltInSessions/:@datadir@/xsessions/
 # This is the default .desktop session.  One of the ones in SessionDesktopDir
 #DefaultSession=gnome.desktop
 # Better leave this blank and HOME will be used.  You can use syntax ~/ below
@@ -273,13 +273,13 @@ Enable=false
 # But if you supply something here, the output of this script will be sent as
 # status of this host so that the chooser can display it.  You could for
 # example send load, or mail details for some user, or some such.
-#Willing=@EXPANDED_GDMCONFDIR@/Xwilling
+#Willing=@gdmconfdir@/Xwilling
 
 [gui]
 # The specific gtkrc file we use.  It should be the full path to the gtkrc that
 # we need.  Unless you need a specific gtkrc that doesn't correspond to a
 # specific theme, then just use the GtkTheme key.
-#GtkRC=@EXPANDED_DATADIR@/themes/Default/gtk-2.0/gtkrc
+#GtkRC=@datadir@/themes/Default/gtk-2.0/gtkrc
 
 # The GTK+ theme to use for the GUI.
 #GtkTheme=Default
@@ -323,7 +323,7 @@ Enable=false
 # greeter.
 Browser=false
 # The default picture in the browser.
-#DefaultFace=@EXPANDED_PIXMAPDIR@/nobody.png
+#DefaultFace=@pixmapdir@/nobody.png
 # User ID's less than the MinimalUID value will not be included in the face
 # browser or in the gdmselection list for Automatic/Timed login.  They will not
 # be displayed regardless of the settings for Include and Exclude.
@@ -346,16 +346,16 @@ Browser=false
 # non-empty value.
 #IncludeAll=false
 # If user or user.png exists in this dir it will be used as his picture.
-#GlobalFaceDir=@EXPANDED_DATADIR@/pixmaps/faces/
+#GlobalFaceDir=@datadir@/pixmaps/faces/
 
 # File which contains the locale we show to the user.  Likely you want to use
 # the one shipped with GDM and edit it.  It is not a standard locale.alias
 # file, although GDM will be able to read a standard locale.alias file as well.
-#LocaleFile=@EXPANDED_LOCALEDIR@/locale.alias
+#LocaleFile=@gdmlocaledir@/locale.alias
 # Logo shown in the standard greeter.
-#Logo=@EXPANDED_PIXMAPDIR@/gdm-foot-logo.png
+#Logo=@pixmapdir@/gdm-foot-logo.png
 # Logo shown on file chooser button in gdmsetup (do not modify this value).
-#ChooserButtonLogo=@EXPANDED_PIXMAPDIR@/gdm-foot-logo.png
+#ChooserButtonLogo=@pixmapdir@/gdm-foot-logo.png
 # The standard greeter should shake if a user entered the wrong username or
 # password.  Kind of cool looking
 #Quiver=true
@@ -438,7 +438,7 @@ GraphicalThemedColor=#76848F
 # and specify just one theme.
 #GraphicalTheme=circles
 #GraphicalThemes=circles/:happygnome
-GraphicalThemeDir=@EXPANDED_DATADIR@/gdm/themes/
+GraphicalThemeDir=@datadir@/gdm/themes/
 GraphicalThemeRand=false
 
 # If InfoMsgFile points to a file, the greeter will display the contents of the
@@ -477,9 +477,9 @@ PreFetchProgram=@GDMPREFETCHCMD@
 # or selects Run XDMCP chooser from the system menu
 [chooser]
 # Default image for hosts.
-#DefaultHostImg=@EXPANDED_PIXMAPDIR@/nohost.png
+#DefaultHostImg=@pixmapdir@/nohost.png
 # Directory with host images, they are named by the hosts: host or host.png.
-HostImageDir=@EXPANDED_DATADIR@/hosts/
+HostImageDir=@datadir@/hosts/
 # Time we scan for hosts (well only the time we tell the user we are scanning
 # actually, we continue to listen even after this has expired).
 #ScanTime=4
Index: daemon/Makefile.am
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/Makefile.am,v
retrieving revision 1.36
diff -u -p -r1.36 Makefile.am
--- daemon/Makefile.am	28 Mar 2006 01:44:16 -0000	1.36
+++ daemon/Makefile.am	28 Mar 2006 15:54:29 -0000
@@ -6,9 +6,22 @@ INCLUDES = \
 	-I.						\
 	-I..						\
 	-I$(top_srcdir)/vicious-extensions		\
+	-DAUTHDIR=\"$(authdir)\"			\
+	-DBINDIR=\"$(bindir)\"				\
+	-DDATADIR=\"$(datadir)\"			\
+	-DDMCONFDIR=\"$(dmconfdir)\"			\
 	-DGDMCONFDIR=\"$(gdmconfdir)\"			\
+	-DGDMLOCALEDIR=\"$(gdmlocaledir)\"		\
+	-DGDM_DEFAULTS_CONF=\"$(GDM_DEFAULTS_CONF)\"	\
+	-DGDM_CUSTOM_CONF=\"$(GDM_CUSTOM_CONF)\"	\
+	-DGDM_OLD_CONF=\"$(GDM_OLD_CONF)\"		\
+	-DGDM_USER_PATH=\"$(GDM_USER_PATH)\"		\
+	-DLIBDIR=\"$(libdir)\"				\
+	-DLIBEXECDIR=\"$(libexecdir)\"			\
+	-DLOGDIR=\"$(logdir)\"				\
+	-DPIXMAPDIR=\"$(pixmapdir)\"			\
+	-DSBINDIR=\"$(sbindir)\"			\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\"	\
-	-DLOCALEDIR=\"$(datadir)/locale\"		\
 	$(GUI_CFLAGS)					\
 	$(DAEMON_CFLAGS)				\
 	-DPAM_PREFIX=\"$(PAM_PREFIX)\"			\
@@ -83,5 +96,9 @@ gdm_binary_LDADD = \
 	-lpopt
 
 sbin_SCRIPTS = gdm
+CLEANFILES = gdm
+
+gdm: $(srcdir)/gdm.in
+	sed -e 's,[@]sbindir[@],$(sbindir),g' <$(srcdir)/gdm.in >gdm
 
 EXTRA_DIST = gdm.in
Index: daemon/gdm.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/gdm.c,v
retrieving revision 1.250
diff -u -p -r1.250 gdm.c
--- daemon/gdm.c	28 Mar 2006 01:44:16 -0000	1.250
+++ daemon/gdm.c	28 Mar 2006 15:54:30 -0000
@@ -471,9 +471,9 @@ deal_with_x_crashes (GdmDisplay *d)
 
 		    /* some promised variables */
 		    g_setenv ("XLOG", xlog, TRUE);
-		    g_setenv ("BINDIR", EXPANDED_BINDIR, TRUE);
-		    g_setenv ("SBINDIR", EXPANDED_SBINDIR, TRUE);
-		    g_setenv ("LIBEXECDIR", EXPANDED_LIBEXECDIR, TRUE);
+		    g_setenv ("BINDIR", BINDIR, TRUE);
+		    g_setenv ("SBINDIR", SBINDIR, TRUE);
+		    g_setenv ("LIBEXECDIR", LIBEXECDIR, TRUE);
 		    g_setenv ("SYSCONFDIR", GDMCONFDIR, TRUE);
 
 		    /* To enable gettext stuff in the script */
@@ -539,7 +539,7 @@ deal_with_x_crashes (GdmDisplay *d)
     /* if we have "open" we can talk to the user, not as user
      * friendly as the above script, but getting there */
     if ( ! just_abort &&
-	g_access (EXPANDED_LIBEXECDIR "/gdmopen", X_OK) == 0) {
+	g_access (LIBEXECDIR "/gdmopen", X_OK) == 0) {
 	    /* Shit if we knew what the program was to tell the user,
 	     * the above script would have been defined and we'd run
 	     * it for them */
Index: daemon/gdm.h
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/gdm.h,v
retrieving revision 1.214
diff -u -p -r1.214 gdm.h
--- daemon/gdm.h	28 Mar 2006 01:44:16 -0000	1.214
+++ daemon/gdm.h	28 Mar 2006 15:54:30 -0000
@@ -185,7 +185,7 @@ enum {
  */
 
 /* Configuration constants */
-#define GDM_KEY_CHOOSER "daemon/Chooser=" EXPANDED_LIBEXECDIR "/gdmchooser"
+#define GDM_KEY_CHOOSER "daemon/Chooser=" LIBEXECDIR "/gdmchooser"
 #define GDM_KEY_AUTOMATIC_LOGIN_ENABLE "daemon/AutomaticLoginEnable=false"
 #define GDM_KEY_AUTOMATIC_LOGIN "daemon/AutomaticLogin="
 /* The SDTLOGIN feature is Solaris specific, and causes the Xserver to be
@@ -197,15 +197,15 @@ enum {
 #else
 #define GDM_KEY_ALWAYS_RESTART_SERVER "daemon/AlwaysRestartServer=false"
 #endif
-#define GDM_KEY_GREETER "daemon/Greeter=" EXPANDED_LIBEXECDIR "/gdmlogin"
-#define GDM_KEY_REMOTE_GREETER "daemon/RemoteGreeter=" EXPANDED_LIBEXECDIR "/gdmlogin"
+#define GDM_KEY_GREETER "daemon/Greeter=" LIBEXECDIR "/gdmlogin"
+#define GDM_KEY_REMOTE_GREETER "daemon/RemoteGreeter=" LIBEXECDIR "/gdmlogin"
 #define GDM_KEY_ADD_GTK_MODULES "daemon/AddGtkModules=false"
 #define GDM_KEY_GTK_MODULES_LIST "daemon/GtkModulesList="
 #define GDM_KEY_GROUP "daemon/Group=gdm"
 #define GDM_KEY_HALT "daemon/HaltCommand=" HALT_COMMAND
 #define GDM_KEY_DISPLAY_INIT_DIR "daemon/DisplayInitDir=" GDMCONFDIR "/Init"
 #define GDM_KEY_KILL_INIT_CLIENTS "daemon/KillInitClients=true"
-#define GDM_KEY_LOG_DIR "daemon/LogDir=" EXPANDED_LOGDIR
+#define GDM_KEY_LOG_DIR "daemon/LogDir=" LOGDIR
 #define GDM_KEY_PATH "daemon/DefaultPath=" GDM_USER_PATH
 #define GDM_KEY_PID_FILE "daemon/PidFile=/var/run/gdm.pid"
 #define GDM_KEY_POSTSESSION "daemon/PostSessionScriptDir=" GDMCONFDIR "/PostSession/"
@@ -215,8 +215,8 @@ enum {
 #define GDM_KEY_X_KEEPS_CRASHING "daemon/XKeepsCrashing=" GDMCONFDIR "/XKeepsCrashing"
 #define GDM_KEY_REBOOT  "daemon/RebootCommand=" REBOOT_COMMAND
 #define GDM_KEY_ROOT_PATH "daemon/RootPath=/sbin:/usr/sbin:" GDM_USER_PATH
-#define GDM_KEY_SERV_AUTHDIR "daemon/ServAuthDir=" EXPANDED_AUTHDIR
-#define GDM_KEY_SESSION_DESKTOP_DIR "daemon/SessionDesktopDir=/etc/X11/sessions/:" EXPANDED_DMCONFDIR "/Sessions/:" EXPANDED_DATADIR "/gdm/BuiltInSessions/:" EXPANDED_DATADIR "/xsessions/"
+#define GDM_KEY_SERV_AUTHDIR "daemon/ServAuthDir=" AUTHDIR
+#define GDM_KEY_SESSION_DESKTOP_DIR "daemon/SessionDesktopDir=/etc/X11/sessions/:" DMCONFDIR "/Sessions/:" DATADIR "/gdm/BuiltInSessions/:" DATADIR "/xsessions/"
 #define GDM_KEY_BASE_XSESSION "daemon/BaseXsession=" GDMCONFDIR "/Xsession"
 #define GDM_KEY_DEFAULT_SESSION "daemon/DefaultSession=gnome.desktop"
 #define GDM_KEY_SUSPEND "daemon/SuspendCommand=" SUSPEND_COMMAND
@@ -293,7 +293,7 @@ enum {
 #define GDM_KEY_XDMCP_PROXY_RECONNECT "xdmcp/ProxyReconnect="
 
 #define GDM_KEY_GTK_THEME "gui/GtkTheme=Default"
-#define GDM_KEY_GTKRC "gui/GtkRC=" EXPANDED_DATADIR "/themes/Default/gtk-2.0/gtkrc"
+#define GDM_KEY_GTKRC "gui/GtkRC=" DATADIR "/themes/Default/gtk-2.0/gtkrc"
 #define GDM_KEY_MAX_ICON_WIDTH "gui/MaxIconWidth=128"
 #define GDM_KEY_MAX_ICON_HEIGHT "gui/MaxIconHeight=128"
 
@@ -305,14 +305,14 @@ enum {
 #define GDM_KEY_EXCLUDE "greeter/Exclude=bin,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,gdm,postgres,pvm,rpm,nfsnobody,pcap"
 #define GDM_KEY_INCLUDE_ALL "greeter/IncludeAll=false"
 #define GDM_KEY_MINIMAL_UID "greeter/MinimalUID=100"
-#define GDM_KEY_DEFAULT_FACE "greeter/DefaultFace=" EXPANDED_PIXMAPDIR "/nobody.png"
-#define GDM_KEY_GLOBAL_FACE_DIR "greeter/GlobalFaceDir=" EXPANDED_DATADIR "/pixmaps/faces/"
-#define GDM_KEY_LOCALE_FILE "greeter/LocaleFile=" EXPANDED_LOCALEDIR "/locale.alias"
-#define GDM_KEY_LOGO "greeter/Logo=" EXPANDED_PIXMAPDIR "/gdm-foot-logo.png"
-#define GDM_KEY_CHOOSER_BUTTON_LOGO "greeter/ChooserButtonLogo=" EXPANDED_PIXMAPDIR "/gdm-foot-logo.png"
+#define GDM_KEY_DEFAULT_FACE "greeter/DefaultFace=" PIXMAPDIR "/nobody.png"
+#define GDM_KEY_GLOBAL_FACE_DIR "greeter/GlobalFaceDir=" DATADIR "/pixmaps/faces/"
+#define GDM_KEY_LOCALE_FILE "greeter/LocaleFile=" GDMLOCALEDIR "/locale.alias"
+#define GDM_KEY_LOGO "greeter/Logo=" PIXMAPDIR "/gdm-foot-logo.png"
+#define GDM_KEY_CHOOSER_BUTTON_LOGO "greeter/ChooserButtonLogo=" PIXMAPDIR "/gdm-foot-logo.png"
 #define GDM_KEY_QUIVER "greeter/Quiver=true"
 #define GDM_KEY_SYSTEM_MENU "greeter/SystemMenu=true"
-#define GDM_KEY_CONFIGURATOR "daemon/Configurator=" EXPANDED_SBINDIR "/gdmsetup --disable-sound --disable-crash-dialog"
+#define GDM_KEY_CONFIGURATOR "daemon/Configurator=" SBINDIR "/gdmsetup --disable-sound --disable-crash-dialog"
 #define GDM_KEY_CONFIG_AVAILABLE "greeter/ConfigAvailable=true"
 #define GDM_KEY_CHOOSER_BUTTON "greeter/ChooserButton=true"
 #define GDM_KEY_TITLE_BAR "greeter/TitleBar=true"
@@ -357,7 +357,7 @@ enum {
 #define GDM_KEY_GRAPHICAL_THEME "greeter/GraphicalTheme=circles"
 #define GDM_KEY_GRAPHICAL_THEMES "greeter/GraphicalThemes=circles"
 #define GDM_KEY_GRAPHICAL_THEME_RAND "greeter/GraphicalThemeRand=false"
-#define GDM_KEY_GRAPHICAL_THEME_DIR "greeter/GraphicalThemeDir=" EXPANDED_DATADIR "/gdm/themes/"
+#define GDM_KEY_GRAPHICAL_THEME_DIR "greeter/GraphicalThemeDir=" DATADIR "/gdm/themes/"
 #define GDM_KEY_GRAPHICAL_THEMED_COLOR "greeter/GraphicalThemedColor=#76848F"
 
 #define GDM_KEY_INFO_MSG_FILE "greeter/InfoMsgFile="
@@ -374,8 +374,8 @@ enum {
 #define GDM_KEY_SOUND_PROGRAM "daemon/SoundProgram=" SOUND_PROGRAM
 
 #define GDM_KEY_SCAN_TIME "chooser/ScanTime=4"
-#define GDM_KEY_DEFAULT_HOST_IMG "chooser/DefaultHostImg=" EXPANDED_PIXMAPDIR "/nohost.png"
-#define GDM_KEY_HOST_IMAGE_DIR "chooser/HostImageDir=" EXPANDED_DATADIR "/hosts/"
+#define GDM_KEY_DEFAULT_HOST_IMG "chooser/DefaultHostImg=" PIXMAPDIR "/nohost.png"
+#define GDM_KEY_HOST_IMAGE_DIR "chooser/HostImageDir=" DATADIR "/hosts/"
 #define GDM_KEY_HOSTS "chooser/Hosts="
 #define GDM_KEY_MULTICAST "chooser/Multicast=true"
 #define GDM_KEY_MULTICAST_ADDR "chooser/MulticastAddr=ff02::1"
Index: daemon/gdm.in
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/gdm.in,v
retrieving revision 1.5
diff -u -p -r1.5 gdm.in
--- daemon/gdm.in	11 Mar 2005 00:15:05 -0000	1.5
+++ daemon/gdm.in	28 Mar 2006 15:54:30 -0000
@@ -23,5 +23,5 @@ then
     fi
 fi
 
-exec @EXPANDED_SBINDIR@/gdm-binary "$@"
+exec @sbindir@/gdm-binary "$@"
 
Index: daemon/gdmconfig.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/gdmconfig.c,v
retrieving revision 1.24
diff -u -p -r1.24 gdmconfig.c
--- daemon/gdmconfig.c	28 Mar 2006 01:44:16 -0000	1.24
+++ daemon/gdmconfig.c	28 Mar 2006 15:54:31 -0000
@@ -2193,7 +2194,7 @@ static gboolean
 is_in_trusted_pic_dir (const char *path)
 {
         /* our own pixmap dir is trusted */
-        if (strncmp (path, EXPANDED_PIXMAPDIR, sizeof (EXPANDED_PIXMAPDIR)) == 0)
+        if (strncmp (path, PIXMAPDIR, sizeof (PIXMAPDIR)) == 0)
                 return TRUE;
 
         return FALSE;
Index: daemon/misc.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/misc.c,v
retrieving revision 1.112
diff -u -p -r1.112 misc.c
--- daemon/misc.c	7 Feb 2006 23:57:25 -0000	1.112
+++ daemon/misc.c	28 Mar 2006 15:54:31 -0000
@@ -581,7 +581,7 @@ gdm_text_message_dialog (const char *msg
     if ( ! gdm_get_value_bool (GDM_KEY_CONSOLE_NOTIFY))
 		return FALSE;
 
-	if (g_access (EXPANDED_LIBEXECDIR "/gdmopen", X_OK) != 0)
+	if (g_access (LIBEXECDIR "/gdmopen", X_OK) != 0)
 		return FALSE;
 
 	if (msg[0] == '-') {
@@ -606,7 +606,7 @@ gdm_text_message_dialog (const char *msg
 			g_setenv ("UNSAFE_TO_TRANSLATE", "yes", TRUE);
 		}
 		
-		argv[0] = EXPANDED_LIBEXECDIR "/gdmopen";
+		argv[0] = LIBEXECDIR "/gdmopen";
 		argv[1] = "-l";
 		argv[2] = "/bin/sh";
 		argv[3] = "-c";
@@ -628,7 +628,7 @@ gdm_text_message_dialog (const char *msg
 	} else {
 		char *argv[6];
 
-		argv[0] = EXPANDED_LIBEXECDIR "/gdmopen";
+		argv[0] = LIBEXECDIR "/gdmopen";
 		argv[1] = "-l";
 		argv[2] = "/bin/sh";
 		argv[3] = "-c";
@@ -659,7 +659,7 @@ gdm_text_yesno_dialog (const char *msg, 
     if ( ! gdm_get_value_bool (GDM_KEY_CONSOLE_NOTIFY))
 		return FALSE;
 	
-	if (g_access (EXPANDED_LIBEXECDIR "/gdmopen", X_OK) != 0)
+	if (g_access (LIBEXECDIR "/gdmopen", X_OK) != 0)
 		return FALSE;
 
 	if (ret != NULL)
@@ -688,7 +688,7 @@ gdm_text_yesno_dialog (const char *msg, 
 			g_setenv ("UNSAFE_TO_TRANSLATE", "yes", TRUE);
 		}
 
-		argv[0] = EXPANDED_LIBEXECDIR "/gdmopen";
+		argv[0] = LIBEXECDIR "/gdmopen";
 		argv[1] = "-l";
 		argv[2] = "/bin/sh";
 		argv[3] = "-c";
@@ -732,7 +732,7 @@ gdm_text_yesno_dialog (const char *msg, 
 
 		VE_IGNORE_EINTR (close (tempfd));
 
-		argv[0] = EXPANDED_LIBEXECDIR "/gdmopen";
+		argv[0] = LIBEXECDIR "/gdmopen";
 		argv[1] = "-l";
 		argv[2] = "/bin/sh";
 		argv[3] = "-c";
Index: daemon/server.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/server.c,v
retrieving revision 1.130
diff -u -p -r1.130 server.c
--- daemon/server.c	18 Jan 2006 23:32:50 -0000	1.130
+++ daemon/server.c	28 Mar 2006 15:54:31 -0000
@@ -336,7 +337,7 @@ static gboolean
 busy_ask_user (GdmDisplay *disp)
 {
     /* if we have "open" we can talk to the user */
-    if (g_access (EXPANDED_LIBEXECDIR "/gdmopen", X_OK) == 0) {
+    if (g_access (LIBEXECDIR "/gdmopen", X_OK) == 0) {
 	    char *error = g_strdup_printf
 		    (C_(N_("There already appears to be an X server "
 			   "running on display %s.  Should another "
Index: daemon/slave.c
===================================================================
RCS file: /cvs/gnome/gdm2/daemon/slave.c,v
retrieving revision 1.319
diff -u -p -r1.319 slave.c
--- daemon/slave.c	6 Mar 2006 21:40:26 -0000	1.319
+++ daemon/slave.c	28 Mar 2006 15:54:33 -0000
@@ -1747,7 +1747,7 @@ run_config (GdmDisplay *display, struct 
 				 "location."));
 
 		argv = ve_split
-			(EXPANDED_LIBEXECDIR
+			(LIBEXECDIR
 			 "/gdmsetup --disable-sound --disable-crash-dialog");
 		if (g_access (argv[0], X_OK) == 0)
 			VE_IGNORE_EINTR (execv (argv[0], argv));
@@ -2586,11 +2586,11 @@ gdm_slave_greeter (void)
 		if (strstr (command, "gdmlogin") != NULL) {
 			/* in case it is gdmlogin that's crashing
 			   try the themed greeter for luck */
-			command = EXPANDED_LIBEXECDIR "/gdmgreeter";
+			command = LIBEXECDIR "/gdmgreeter";
 		} else {
 			/* in all other cases, try the gdmlogin (standard greeter)
 			   proggie */
-			command = EXPANDED_LIBEXECDIR "/gdmlogin";
+			command = LIBEXECDIR "/gdmlogin";
 		}
 	}
 
@@ -2613,13 +2613,13 @@ gdm_slave_greeter (void)
 
 	gdm_error (_("%s: Cannot start greeter trying default: %s"),
 		   "gdm_slave_greeter",
-		   EXPANDED_LIBEXECDIR "/gdmlogin");
+		   LIBEXECDIR "/gdmlogin");
 
 	g_setenv ("GDM_WHACKED_GREETER_CONFIG", "true", TRUE);
 
-	exec_command (EXPANDED_LIBEXECDIR "/gdmlogin", NULL);
+	exec_command (LIBEXECDIR "/gdmlogin", NULL);
 
-	VE_IGNORE_EINTR (execl (EXPANDED_LIBEXECDIR "/gdmlogin", EXPANDED_LIBEXECDIR "/gdmlogin", NULL));
+	VE_IGNORE_EINTR (execl (LIBEXECDIR "/gdmlogin", LIBEXECDIR "/gdmlogin", NULL));
 
 	gdm_error_box (d,
 		       GTK_MESSAGE_ERROR,
@@ -3119,7 +3119,7 @@ find_prog (const char *name)
 		"/usr/openwin/bin/",
 		"/usr/local/bin/",
 		"/opt/gnome/bin/",
-		EXPANDED_BINDIR "/",
+		BINDIR "/",
 		NULL
 	};
 
Index: docs/C/gdm.xml
===================================================================
RCS file: /cvs/gnome/gdm2/docs/C/gdm.xml,v
retrieving revision 1.123
diff -u -p -r1.123 gdm.xml
--- docs/C/gdm.xml	21 Mar 2006 00:21:40 -0000	1.123
+++ docs/C/gdm.xml	28 Mar 2006 15:54:35 -0000
@@ -709,7 +709,7 @@
         To use this feature, configure GDM with the
         <command>--with-prefetch</command> option.  This will cause GDM to
         install the <command>gdmprefetch</command> program to the
-        EXPANDED_LIBEXEC directory, install the
+        <filename>libexecdir</filename> directory, install the
         <filename>gdmprefetchlist</filename> to the
         <filename>&lt;etc&gt;/gdm</filename> directory, and set the
         <filename>PreFetchProgram</filename> configuration variable so that the
@@ -4602,7 +4602,7 @@ Answers:
 
       <para>
         The GDM package provides the following different commands in
-        EXPANDED_BINDIR intended to be used by the end-user:
+        <filename>bindir</filename> intended to be used by the end-user:
       </para>
 
       <sect3 id="gdmxnestchoosercommandline">
@@ -4978,7 +4978,7 @@ remote-flexi  - In remote (XDMCP) &amp; 
 
       <para>
         The GDM package provides the following different commands in
-        EXPANDED_SBINDIR intended to be used by the root user:
+        <filename>sbindir</filename> intended to be used by the root user:
       </para>
 
       <sect3 id="gdmcommandline">
@@ -5132,7 +5132,8 @@ remote-flexi  - In remote (XDMCP) &amp; 
 
       <para>
         The GDM package provides the following different commands in
-        EXPANDED_LIBEXECDIR intended to be used by the gdm daemon process.
+        <filename>libexecdir</filename> intended to be used by the gdm
+        daemon process.
       </para>
 
       <sect3 id="gdmgreeterlogincommandline">
Index: gui/Makefile.am
===================================================================
RCS file: /cvs/gnome/gdm2/gui/Makefile.am,v
retrieving revision 1.86
diff -u -p -r1.86 Makefile.am
--- gui/Makefile.am	28 Mar 2006 01:44:19 -0000	1.86
+++ gui/Makefile.am	28 Mar 2006 15:54:35 -0000
@@ -3,9 +3,15 @@ SUBDIRS = . greeter modules faces
 ## Process this file with automake to produce makefile.in
 DEFS = @DEFS@ \
 	-DPREFIX=\"@prefix@\" \
+	-DAUTHDIR=\"@authdir@\" \
 	-DDATADIR=\"@datadir@\" \
+	-DDMCONFDIR=\"@dmconfdir@\" \
+	-DGDMLOCALEDIR=\"@gdmlocaledir@\" \
+	-DGDM_GLADE_DIR=\"@datadir@/gdm\" \
 	-DLIBDIR=\"@libdir@\" \
-	-DGDM_GLADE_DIR=\"@datadir@/gdm\"
+	-DLIBEXECDIR=\"@libexecdir@\" \
+	-DPIXMAPDIR=\"@pixmapdir@\" \
+	-DSBINDIR=\"@sbindir@\"
 
 INCLUDES = \
 	-I.						\
@@ -205,6 +211,12 @@ System_in_files = \
 	gdmflexiserver.desktop.in	\
 	gdmflexiserver-xnest.desktop.in
 System_DATA = $(System_in_files:.desktop.in=.desktop)
+
+CLEANFILES = gdmsetup.desktop
+
+gdmsetup.desktop: $(srcdir)/gdmsetup.desktop.in
+	sed -e 's,[@]sbindir[@],$(sbindir),g' <$(srcdir)/gdmsetup.desktop.in \
+		>gdmsetup.desktop
 
 @INTLTOOL_DESKTOP_RULE@
 
Index: gui/gdmphotosetup.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmphotosetup.c,v
retrieving revision 1.59
diff -u -p -r1.59 gdmphotosetup.c
--- gui/gdmphotosetup.c	28 Mar 2006 01:44:19 -0000	1.59
+++ gui/gdmphotosetup.c	28 Mar 2006 15:54:35 -0000
@@ -264,9 +264,9 @@ browse_button_cb (GtkWidget *widget, gpo
 						      facedir, NULL);
 	} else {
 		gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (file_dialog),
-						     EXPANDED_DATADIR "/pixmaps");
+						     DATADIR "/pixmaps");
 		gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (file_dialog),
-						      EXPANDED_DATADIR "/pixmaps", NULL);
+						      DATADIR "/pixmaps", NULL);
 	}
 
 	filter = gtk_file_filter_new ();
Index: gui/gdmsetup.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmsetup.c,v
retrieving revision 1.112
diff -u -p -r1.112 gdmsetup.c
--- gui/gdmsetup.c	28 Mar 2006 01:44:19 -0000	1.112
+++ gui/gdmsetup.c	28 Mar 2006 15:54:36 -0000
@@ -923,15 +923,15 @@ combobox_timeout (GtkWidget *combo_box)
 		new_key_val = NULL;
 
 		if (selected == LOCAL_PLAIN_WITH_FACE) {		
-			new_key_val = g_strdup (EXPANDED_LIBEXECDIR "/gdmlogin");
+			new_key_val = g_strdup (LIBEXECDIR "/gdmlogin");
 			browser_val = TRUE;
 		} 
 		else if (selected == LOCAL_THEMED) {
-			new_key_val = g_strdup (EXPANDED_LIBEXECDIR "/gdmgreeter");
+			new_key_val = g_strdup (LIBEXECDIR "/gdmgreeter");
 			browser_val = gdm_config_get_bool (GDM_KEY_BROWSER);
 		}
 		else {  /* Plain style */
-			new_key_val = g_strdup (EXPANDED_LIBEXECDIR "/gdmlogin");
+			new_key_val = g_strdup (LIBEXECDIR "/gdmlogin");
 			browser_val = FALSE;
 		}		
 		
@@ -963,7 +963,7 @@ combobox_timeout (GtkWidget *combo_box)
 				free_new_val = FALSE;
 			}
 			else if (selected == REMOTE_PLAIN_WITH_FACE) {
-				new_key_val = g_strdup (EXPANDED_LIBEXECDIR "/gdmlogin");
+				new_key_val = g_strdup (LIBEXECDIR "/gdmlogin");
 				gdm_setup_config_set_bool (GDM_KEY_BROWSER, TRUE);
 			}
 			else {
@@ -972,10 +972,10 @@ combobox_timeout (GtkWidget *combo_box)
 				selected_text = gtk_combo_box_get_active_text (GTK_COMBO_BOX (combo_box));
 				
 				if (strcmp (ve_sure_string (selected_text), _("Themed")) == 0) {
-					new_key_val = g_strdup (EXPANDED_LIBEXECDIR "/gdmgreeter");
+					new_key_val = g_strdup (LIBEXECDIR "/gdmgreeter");
 				}
 				else {
-					new_key_val = g_strdup (EXPANDED_LIBEXECDIR "/gdmlogin");
+					new_key_val = g_strdup (LIBEXECDIR "/gdmlogin");
 					gdm_setup_config_set_bool (GDM_KEY_BROWSER, FALSE);
 				}
 				g_free (selected_text);
@@ -2665,9 +2665,9 @@ setup_greeter_combobox (const char *name
 
 	if (greetval != NULL &&
 	    strcmp (ve_sure_string (greetval),
-	    EXPANDED_LIBEXECDIR "/gdmlogin --disable-sound --disable-crash-dialog") == 0) {
+	    LIBEXECDIR "/gdmlogin --disable-sound --disable-crash-dialog") == 0) {
 		g_free (greetval);
-		greetval = g_strdup (EXPANDED_LIBEXECDIR "/gdmlogin");
+		greetval = g_strdup (LIBEXECDIR "/gdmlogin");
 	}
 
 	/* Set initial state of local style combo box. */
@@ -2886,10 +2886,10 @@ acc_modules_toggled (GtkWidget *toggle, 
 		modules_list = strings_list_add (modules_list, "atk-bridge",
 			GDM_DELIMITER_MODULES);
 		modules_list = strings_list_add (modules_list,
-			EXPANDED_LIBDIR "/gtk-2.0/modules/libkeymouselistener",
+			LIBDIR "/gtk-2.0/modules/libkeymouselistener",
 			GDM_DELIMITER_MODULES);
 		modules_list = strings_list_add (modules_list,
-			EXPANDED_LIBDIR "/gtk-2.0/modules/libdwellmouselistener",
+			LIBDIR "/gtk-2.0/modules/libdwellmouselistener",
 			GDM_DELIMITER_MODULES);
 		add_gtk_modules = TRUE;
 	}
@@ -3134,7 +3134,7 @@ get_theme_dir (void)
 	if (theme_dir == NULL ||
 	    theme_dir[0] == '\0' ||
 	    g_access (theme_dir, R_OK) != 0) {
-		theme_dir = g_strdup (EXPANDED_DATADIR "/gdm/themes/");
+		theme_dir = g_strdup (DATADIR "/gdm/themes/");
 	}
 
 	return theme_dir;
@@ -5602,7 +5602,7 @@ hookup_plain_background (void)
 
         if (ve_string_empty (background_filename)) {
                 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (image_filechooser),
-                        EXPANDED_PIXMAPDIR);
+                        PIXMAPDIR);
 	} else {
                 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (image_filechooser),
 			background_filename);
@@ -5736,7 +5736,7 @@ hookup_plain_logo (void)	
 
 	if (ve_string_empty (logo_filename)) {
 		gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (logo_button),
-			EXPANDED_PIXMAPDIR);
+			PIXMAPDIR);
 	} else {
 		gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (logo_button),
 			logo_filename);
@@ -5877,7 +5877,7 @@ hookup_remote_plain_background (void)
 
         if (ve_string_empty (background_filename)) {
                 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (image_filechooser),
-                        EXPANDED_PIXMAPDIR);
+                        PIXMAPDIR);
         } else {
                 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (image_filechooser),
 			background_filename);
@@ -6012,7 +6012,7 @@ hookup_remote_plain_logo (void)	
 		
         if (ve_string_empty (logo_filename))
                 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (logo_button),
-                        EXPANDED_PIXMAPDIR);
+                        PIXMAPDIR);
         else
                 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (logo_button), logo_filename);
 
Index: gui/gdmsetup.desktop.in
===================================================================
RCS file: /cvs/gnome/gdm2/gui/gdmsetup.desktop.in,v
retrieving revision 1.13
diff -u -p -r1.13 gdmsetup.desktop.in
--- gui/gdmsetup.desktop.in	16 Mar 2006 02:33:30 -0000	1.13
+++ gui/gdmsetup.desktop.in	28 Mar 2006 15:54:36 -0000
@@ -3,7 +3,7 @@ Encoding=UTF-8
 _Name=Login Window
 _GenericName=Login Window Preferences
 _Comment=Configure the login window (GNOME Display Manager)
-TryExec=@EXPANDED_SBINDIR@/gdmsetup
+TryExec=@sbindir@/gdmsetup
 Exec=gdmsetup
 Icon=gdm-setup
 StartupNotify=true
Index: gui/greeter/Makefile.am
===================================================================
RCS file: /cvs/gnome/gdm2/gui/greeter/Makefile.am,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile.am
--- gui/greeter/Makefile.am	28 Mar 2006 01:44:21 -0000	1.35
+++ gui/greeter/Makefile.am	28 Mar 2006 15:54:36 -0000
@@ -6,8 +6,15 @@ INCLUDES = \
 	-I$(top_srcdir)/gui				\
 	-I$(top_srcdir)/daemon				\
 	-I$(top_srcdir)/vicious-extensions		\
+	-DAUTHDIR=\""$(authdir)"\"		 	\
+	-DDATADIR=\""$(datadir)"\"		 	\
+	-DDMCONFDIR=\""$(dmconfdir)"\"		 	\
 	-DGDM_CONFIG_FILE=\"$(gdmconfdir)/gdm.conf\"	\
+	-DGDMLOCALEDIR=\""$(gdmlocaledir)"\"		\
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" 	\
+	-DLIBEXECDIR=\""$(libexecdir)"\" 		\
+	-DSBINDIR=\""$(sbindir)"\"		 	\
+	-DPIXMAPDIR=\""$(pixmapdir)"\"		 	\
 	$(GUI_CFLAGS)					\
 	$(GREETER_CFLAGS)
 
@@ -24,6 +31,12 @@ libexec_PROGRAMS = \
 
 bin_SCRIPTS = \
 	gdmthemetester
+
+CLEANFILES = gdmthemetester
+
+gdmthemetester: $(srcdir)/gdmthemetester.in
+	sed -e 's,[@]libexecdir[@],$(libexecdir),g' \
+		<$(srcdir)/gdmthemetester.in >gdmthemetester
 
 gdmgreeter_SOURCES =  \
 	greeter.c \
Index: gui/greeter/gdmthemetester.in
===================================================================
RCS file: /cvs/gnome/gdm2/gui/greeter/gdmthemetester.in,v
retrieving revision 1.2
diff -u -p -r1.2 gdmthemetester.in
--- gui/greeter/gdmthemetester.in	23 Mar 2005 17:37:34 -0000	1.2
+++ gui/greeter/gdmthemetester.in	28 Mar 2006 15:54:36 -0000
@@ -26,7 +26,7 @@ echo
 
 XNEST=`gdmwhich Xnest`
 GDMXNEST=`gdmwhich gdmXnest`
-GDMGREETER="@EXPANDED_LIBEXECDIR@/gdmgreeter"
+GDMGREETER="@libexecdir@/gdmgreeter"
 
 if [ x$XNEST = x ]; then
 	echo "ERROR: Xnest not found"
@@ -106,4 +106,4 @@ fi
 # This may not be necessary
 sleep 1
 
-@EXPANDED_LIBEXECDIR@/gdmgreeter
+@libexecdir@/gdmgreeter
Index: gui/greeter/greeter.c
===================================================================
RCS file: /cvs/gnome/gdm2/gui/greeter/greeter.c,v
retrieving revision 1.119
diff -u -p -r1.119 greeter.c
--- gui/greeter/greeter.c	28 Mar 2006 01:44:21 -0000	1.119
+++ gui/greeter/greeter.c	28 Mar 2006 15:54:36 -0000
@@ -1308,7 +1308,7 @@ main (int argc, char *argv[])
       gtk_dialog_run (GTK_DIALOG (dialog));
       gtk_widget_destroy (dialog);
 
-      execl (EXPANDED_LIBEXECDIR "/gdmlogin", EXPANDED_LIBEXECDIR "/gdmlogin", NULL);
+      execl (LIBEXECDIR "/gdmlogin", LIBEXECDIR "/gdmlogin", NULL);
       execlp ("gdmlogin", "gdmlogin", NULL);
 
       dialog = ve_hig_dialog_new (NULL /* parent */,
Index: gui/modules/Makefile.am
===================================================================
RCS file: /cvs/gnome/gdm2/gui/modules/Makefile.am,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.am
--- gui/modules/Makefile.am	28 Mar 2006 01:44:25 -0000	1.10
+++ gui/modules/Makefile.am	28 Mar 2006 15:54:36 -0000
@@ -49,6 +49,16 @@ EXTRA_DIST = \
 	AccessKeyMouseEvents.in \
 	AccessDwellMouseEvents.in
 
+CLEANFILES = AccessKeyMouseEvents AccessDwellMouseEvents
+
+AccessKeyMouseEvents: $(srcdir)/AccessKeyMouseEvents.in
+	sed -e 's,[@]AT_BINDIR[@],$(AT_BINDIR),g' \
+		<$(srcdir)/AccessKeyMouseEvents.in >AccessKeyMouseEvents
+
+AccessDwellMouseEvents: $(srcdir)/AccessDwellMouseEvents.in
+	sed -e 's,[@]AT_BINDIR[@],$(AT_BINDIR),g' \
+		<$(srcdir)/AccessDwellMouseEvents.in >AccessDwellMouseEvents
+
 uninstall-hook: 
 	rm -f $(DESTDIR)$(moduleconfdir)/AccessKeyMouseEvents \
 	$(DESTDIR)$(moduleconfdir)/factory-AccessKeyMouseEvents \
