summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2017-07-26 21:14:56 +0000
committerMatthieu Herrb <matthieu@herrb.eu>2020-07-14 15:52:38 +0200
commitc2a3d5ffb4b9ea0ab86de1e696143a693ea9e1af (patch)
tree10f3f4f1008ba3d05bf7e0b1440fb407d9216e57 /config
parent813ae2f4a736817142bd15bc12c166ded92e7bb8 (diff)
Stop abusing cpp as generic macro processor in the build system.
ok naddy@
Diffstat (limited to 'config')
-rw-r--r--config/Makefile.am21
-rw-r--r--config/Makefile.in85
-rw-r--r--config/Xreset.cpp5
-rw-r--r--config/Xreset.in7
-rw-r--r--config/Xresources.in (renamed from config/Xresources.cpp)114
-rw-r--r--config/Xservers.cpp12
-rw-r--r--config/Xservers.in12
-rw-r--r--config/Xsession.in (renamed from config/Xsession.cpp)22
-rw-r--r--config/Xstartup.cpp10
-rw-r--r--config/Xstartup.in13
-rw-r--r--config/xenodm-config.cpp32
-rw-r--r--config/xenodm-config.in22
12 files changed, 147 insertions, 208 deletions
diff --git a/config/Makefile.am b/config/Makefile.am
index 63c21bb..5af005d 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -1,7 +1,5 @@
#
-include $(top_srcdir)/cpprules.in
-
xenodmscriptdir = $(XENODMSCRIPTDIR)
xenodmconfigdir = $(XENODMCONFIGDIR)
@@ -25,25 +23,6 @@ pixmapdir = $(XENODM_PIXMAPDIR)
dist_pixmap_DATA = OpenBSD_15bpp.xpm OpenBSD_1bpp.xpm \
OpenBSD_4bpp.xpm OpenBSD_8bpp.xpm
-BUILT_SOURCES = Xservers xenodm-config Xreset Xresources Xsession Xstartup
CLEANFILES = $(BUILT_SOURCES) Xservers
-EXTRA_DIST = Xservers.cpp \
- xenodm-config.cpp Xreset.cpp Xresources.cpp Xsession.cpp Xstartup.cpp
-
-# Defines used when cpp'ing config files to replace settings in the files
-
-XPMDEFINES = -DXPM -DBITMAPDIR=$(XENODM_PIXMAPDIR) -DXENODM_PIXMAP=$(XENODM_PIXMAP) \
- -DXENODM_BWPIXMAP=$(XENODM_BWPIXMAP)
-
-CPP_FILES_FLAGS = -DBINDIR="$(bindir)" -DDEFAULTVT="$(DEFAULTVT)" \
- -DUTMP_FILE="$(UTMP_FILE)" -DWTMP_FILE="$(WTMP_FILE)" \
- -DXENODMDIR="$(XENODMLIBDIR)" -DXENODMLOGDIR="$(XENODMLOGDIR)" \
- -DXENODMXAUTHDIR="$(XENODMXAUTHDIR)" \
- -DXENODMCONFIGDIR="$(XENODMCONFIGDIR)" \
- -DXENODMSCRIPTDIR="$(XENODMSCRIPTDIR)" \
- $(XPMDEFINES) -DSHELL_CMD="$(SHELL_CMD)"
-
-Xservers: $(srcdir)/Xservers.cpp
- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.cpp | $(CPP_SED_MAGIC) > $@
diff --git a/config/Makefile.in b/config/Makefile.in
index 9c77ccb..b87f2b7 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -16,10 +16,6 @@
#
-# -*- Makefile -*-
-# Rules for generating files using the C pre-processor
-# (Replaces CppFileTarget from Imake)
-
VPATH = @srcdir@
am__make_dryrun = \
@@ -57,10 +53,12 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+subdir = config
DIST_COMMON = README $(dist_pixmap_DATA) $(dist_xenodmscript_SCRIPTS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/cpprules.in
-subdir = config
+ $(srcdir)/Xreset.in $(srcdir)/Xresources.in \
+ $(srcdir)/Xservers.in $(srcdir)/Xsession.in \
+ $(srcdir)/Xstartup.in $(srcdir)/xenodm-config.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -70,7 +68,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = Xreset Xresources Xservers Xsession Xstartup \
+ xenodm-config
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -218,15 +217,12 @@ PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
-RAWCPP = @RAWCPP@
-RAWCPPFLAGS = @RAWCPPFLAGS@
-SED = sed
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SHELL_CMD = @SHELL_CMD@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@
-TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@
UTMP_FILE = @UTMP_FILE@
VERSION = @VERSION@
WTMP_FILE = @WTMP_FILE@
@@ -307,22 +303,6 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUFFIXES = .cpp
-WCHAR32_FLAGS = -DWCHAR32=@WCHAR32@
-
-# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
-# to cpp, because that trick does not work on all ANSI C preprocessors.
-# Delete line numbers from the cpp output (-P is not portable, I guess).
-# Allow XCOMM to be preceded by whitespace and provide a means of generating
-# output lines with trailing backslashes.
-# Allow XHASH to always be substituted, even in cases where XCOMM isn't.
-CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
- -e '/^\#line *[0-9][0-9]* *.*$$/d' \
- -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \
- -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
- -e '/^[ ]*XHASH/s/XHASH/\#/' \
- -e '/\@\@$$/s/\@\@$$/\\/'
-
xenodmscriptdir = $(XENODMSCRIPTDIR)
xenodmconfigdir = $(XENODMCONFIGDIR)
xenodmconfig_DATA = \
@@ -344,30 +324,11 @@ pixmapdir = $(XENODM_PIXMAPDIR)
dist_pixmap_DATA = OpenBSD_15bpp.xpm OpenBSD_1bpp.xpm \
OpenBSD_4bpp.xpm OpenBSD_8bpp.xpm
-BUILT_SOURCES = Xservers xenodm-config Xreset Xresources Xsession Xstartup
CLEANFILES = $(BUILT_SOURCES) Xservers
-EXTRA_DIST = Xservers.cpp \
- xenodm-config.cpp Xreset.cpp Xresources.cpp Xsession.cpp Xstartup.cpp
-
-
-# Defines used when cpp'ing config files to replace settings in the files
-XPMDEFINES = -DXPM -DBITMAPDIR=$(XENODM_PIXMAPDIR) -DXENODM_PIXMAP=$(XENODM_PIXMAP) \
- -DXENODM_BWPIXMAP=$(XENODM_BWPIXMAP)
-
-CPP_FILES_FLAGS = -DBINDIR="$(bindir)" -DDEFAULTVT="$(DEFAULTVT)" \
- -DUTMP_FILE="$(UTMP_FILE)" -DWTMP_FILE="$(WTMP_FILE)" \
- -DXENODMDIR="$(XENODMLIBDIR)" -DXENODMLOGDIR="$(XENODMLOGDIR)" \
- -DXENODMXAUTHDIR="$(XENODMXAUTHDIR)" \
- -DXENODMCONFIGDIR="$(XENODMCONFIGDIR)" \
- -DXENODMSCRIPTDIR="$(XENODMSCRIPTDIR)" \
- $(XPMDEFINES) -DSHELL_CMD="$(SHELL_CMD)"
-
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
+all: all-am
.SUFFIXES:
-.SUFFIXES: .cpp
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/cpprules.in $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -388,7 +349,6 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
-$(top_srcdir)/cpprules.in:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
@@ -398,6 +358,18 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+Xreset: $(top_builddir)/config.status $(srcdir)/Xreset.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Xresources: $(top_builddir)/config.status $(srcdir)/Xresources.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Xservers: $(top_builddir)/config.status $(srcdir)/Xservers.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Xsession: $(top_builddir)/config.status $(srcdir)/Xsession.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+Xstartup: $(top_builddir)/config.status $(srcdir)/Xstartup.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+xenodm-config: $(top_builddir)/config.status $(srcdir)/xenodm-config.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-dist_xenodmscriptSCRIPTS: $(dist_xenodmscript_SCRIPTS)
@$(NORMAL_INSTALL)
@list='$(dist_xenodmscript_SCRIPTS)'; test -n "$(xenodmscriptdir)" || list=; \
@@ -556,15 +528,13 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
+check: check-am
all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
for dir in "$(DESTDIR)$(xenodmscriptdir)" "$(DESTDIR)$(xenodmscriptdir)" "$(DESTDIR)$(pixmapdir)" "$(DESTDIR)$(xenodmconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
+install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
@@ -595,7 +565,6 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
@@ -666,7 +635,7 @@ uninstall-am: uninstall-dist_pixmapDATA \
uninstall-dist_xenodmscriptSCRIPTS uninstall-xenodmconfigDATA \
uninstall-xenodmscriptSCRIPTS
-.MAKE: all check install install-am install-strip
+.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
@@ -684,12 +653,6 @@ uninstall-am: uninstall-dist_pixmapDATA \
uninstall-xenodmconfigDATA uninstall-xenodmscriptSCRIPTS
-.cpp:
- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
-
-Xservers: $(srcdir)/Xservers.cpp
- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $(srcdir)/Xservers.cpp | $(CPP_SED_MAGIC) > $@
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/config/Xreset.cpp b/config/Xreset.cpp
deleted file mode 100644
index e890814..0000000
--- a/config/Xreset.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-XCOMM!/bin/sh
-XCOMM Deregister a login. (Derived from TakeConsole as follows:)
-XCOMM
-BINDIR/sessreg -d -w WTMP_FILE -u UTMP_FILE \
- -x XENODMCONFIGDIR/Xservers -l $DISPLAY -h "" $USER
diff --git a/config/Xreset.in b/config/Xreset.in
new file mode 100644
index 0000000..a3949e4
--- /dev/null
+++ b/config/Xreset.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Deregister a login. (Derived from TakeConsole as follows:)
+#
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+@bindir@/sessreg -d -w @WTMP_FILE@ -u @UTMP_FILE@ \
+ -x @XENODMCONFIGDIR@/Xservers -l $DISPLAY -h "" $USER
diff --git a/config/Xresources.cpp b/config/Xresources.in
index 25cde57..18bc610 100644
--- a/config/Xresources.cpp
+++ b/config/Xresources.in
@@ -6,25 +6,25 @@
!
-#define BS \ /* cpp can be trickier than m4 */
-#define NLBS \n\ /* don't remove these comments */
-xlogin*login.translations: #override BS
- Ctrl<Key>R: abort-display()NLBS
- <Key>F1: set-session-argument(failsafe) finish-field()NLBS
- <Key>Left: move-backward-character()NLBS
- <Key>Right: move-forward-character()NLBS
- <Key>Home: move-to-begining()NLBS
- <Key>End: move-to-end()NLBS
- Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()NLBS
- <Key>KP_Enter: set-session-argument() finish-field()NLBS
- Ctrl<Key>Return: set-session-argument(failsafe) finish-field()NLBS
+
+
+xlogin*login.translations: #override \
+ Ctrl<Key>R: abort-display()\n\
+ <Key>F1: set-session-argument(failsafe) finish-field()\n\
+ <Key>Left: move-backward-character()\n\
+ <Key>Right: move-forward-character()\n\
+ <Key>Home: move-to-begining()\n\
+ <Key>End: move-to-end()\n\
+ Ctrl<Key>KP_Enter: set-session-argument(failsafe) finish-field()\n\
+ <Key>KP_Enter: set-session-argument() finish-field()\n\
+ Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
<Key>Return: set-session-argument() finish-field()
xlogin*greeting: CLIENTHOST
xlogin*namePrompt: \040\040\040\040\040\040\040Login:
xlogin*fail: Login incorrect or forbidden
-XHASHif WIDTH > 800
+#if WIDTH > 800
xlogin*greetFont: -adobe-helvetica-bold-o-normal--24-240-75-75-p-138-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
xlogin*promptFont: -adobe-helvetica-bold-r-normal--18-180-75-75-p-103-iso8859-1
@@ -33,7 +33,7 @@ xlogin*greetFace: DejaVu Sans Condensed-22:bold:italic:dpi=75
xlogin*face: DejaVu Sans Condensed-16:dpi=75
xlogin*promptFace: DejaVu Sans Condensed-16:bold:dpi=75
xlogin*failFace: DejaVu Sans Condensed-16:bold:dpi=75
-XHASHelse
+#else
xlogin*greetFont: -adobe-helvetica-bold-o-normal--17-120-100-100-p-92-iso8859-1
xlogin*font: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
xlogin*promptFont: -adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1
@@ -42,33 +42,33 @@ xlogin*greetFace: DejaVu Sans Condensed-18:bold:italic:dpi=75
xlogin*face: DejaVu Sans Condensed-12:dpi=75
xlogin*promptFace: DejaVu Sans Condensed-12:bold:dpi=75
xlogin*failFace: DejaVu Sans Condensed-12:bold:dpi=75
-XHASHendif
-
-XHASHif !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15))
-XHASH if PLANES < 4
-XHASH ifndef bpp1
-XHASH define bpp1
-XHASH endif
-XHASH else
-XHASH if PLANES > 4
-XHASH if PLANES > 8
-XHASH ifndef bpp15
-XHASH define bpp15
-XHASH endif
-XHASH else
-XHASH ifndef bpp8
-XHASH define bpp8
-XHASH endif bpp8
-XHASH endif
-XHASH else
-XHASH ifndef bpp4
-XHASH define bpp4
-XHASH endif
-XHASH endif
-XHASH endif
-XHASHendif //**/* If manual override */**//
-
-XHASHifndef bpp1
+#endif
+
+#if !(defined(bpp1) || defined(bpp4) || defined(bpp8) || defined(bpp15))
+# if PLANES < 4
+# ifndef bpp1
+# define bpp1
+# endif
+# else
+# if PLANES > 4
+# if PLANES > 8
+# ifndef bpp15
+# define bpp15
+# endif
+# else
+# ifndef bpp8
+# define bpp8
+# endif bpp8
+# endif
+# else
+# ifndef bpp4
+# define bpp4
+# endif
+# endif
+# endif
+#endif /* If manual override */
+
+#ifndef bpp1
xlogin*borderWidth: 1
xlogin*frameWidth: 2
xlogin*innerFramesWidth: 0
@@ -83,11 +83,11 @@ xlogin*shdColor: #667788
! 'Welcome to..' text color
xlogin*greetColor: #fef886
-XHASHif defined(bpp4) || defined(bpp8) || defined(bpp15)
+#if defined(bpp4) || defined(bpp8) || defined(bpp15)
! flood fill
xlogin*background: #798a99
xlogin*inpColor: #99aab9
-XHASHendif
+#endif
xlogin*failColor: #aa0000
! 'Login:' and 'Password:'
@@ -95,7 +95,7 @@ xlogin*failColor: #aa0000
! border/shadow
*Background: #000000
-XHASHelse
+#else
xlogin*borderWidth: 3
xlogin*frameWidth: 5
xlogin*innerFramesWidth: 1
@@ -107,19 +107,19 @@ xlogin*failColor: white
xlogin*promptColor: white
*Foreground: white
*Background: black
-XHASHendif
-XHASHifdef bpp1
-xlogin*logoFileName: BITMAPDIR/**//OpenBSD_1bpp.xpm
-XHASHendif
-XHASHifdef bpp4
-xlogin*logoFileName: BITMAPDIR/**//OpenBSD_4bpp.xpm
-XHASHendif
-XHASHifdef bpp8
-xlogin*logoFileName: BITMAPDIR/**//OpenBSD_8bpp.xpm
-XHASHendif
-XHASHifdef bpp15
-xlogin*logoFileName: BITMAPDIR/**//OpenBSD_15bpp.xpm
-XHASHendif
+#endif
+#ifdef bpp1
+xlogin*logoFileName: @XENODM_PIXMAPDIR@/OpenBSD_1bpp.xpm
+#endif
+#ifdef bpp4
+xlogin*logoFileName: @XENODM_PIXMAPDIR@/OpenBSD_4bpp.xpm
+#endif
+#ifdef bpp8
+xlogin*logoFileName: @XENODM_PIXMAPDIR@/OpenBSD_8bpp.xpm
+#endif
+#ifdef bpp15
+xlogin*logoFileName: @XENODM_PIXMAPDIR@/OpenBSD_15bpp.xpm
+#endif
xlogin*useShape: true
xlogin*logoPadding: 10
diff --git a/config/Xservers.cpp b/config/Xservers.cpp
deleted file mode 100644
index b6089ef..0000000
--- a/config/Xservers.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-XCOMM
-XCOMM Xservers file, workstation prototype
-XCOMM
-XCOMM This file should contain an entry to start the server on the
-XCOMM local display; if you have more than one display (not screen),
-XCOMM you can add entries to the list (one per line). If you also
-XCOMM have some X terminals connected which do not support XDMCP,
-XCOMM you can add them here as well. Each X terminal line should
-XCOMM look like:
-XCOMM XTerminalName:0 foreign
-XCOMM
-:0 local BINDIR/X :0 DEFAULTVT
diff --git a/config/Xservers.in b/config/Xservers.in
new file mode 100644
index 0000000..68b3197
--- /dev/null
+++ b/config/Xservers.in
@@ -0,0 +1,12 @@
+#
+# Xservers file, workstation prototype
+#
+# This file should contain an entry to start the server on the
+# local display; if you have more than one display (not screen),
+# you can add entries to the list (one per line). If you also
+# have some X terminals connected which do not support XDMCP,
+# you can add them here as well. Each X terminal line should
+# look like:
+# XTerminalName:0 foreign
+#
+@DEF_SERVER_LINE@ @DEFAULTVT@
diff --git a/config/Xsession.cpp b/config/Xsession.in
index 81c99ba..1a1b6ab 100644
--- a/config/Xsession.cpp
+++ b/config/Xsession.in
@@ -1,8 +1,10 @@
-XCOMM!SHELL_CMD
-XCOMM
-XCOMM $OpenBSD: Xsession.cpp,v 1.14 2015/10/17 08:25:11 matthieu Exp $
+#!@SHELL_CMD@
+#
+# $OpenBSD: Xsession.in,v 1.1 2017/07/26 21:14:54 matthieu Exp $
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
-XCOMM redirect errors to a file in user's home directory if we can
+# redirect errors to a file in user's home directory if we can
errfile="$HOME/.xsession-errors"
if ( umask 077 && cp /dev/null "$errfile" 2> /dev/null )
@@ -20,7 +22,7 @@ else
done
fi
-XCOMM if we have private ssh key(s), start ssh-agent and add the key(s)
+# if we have private ssh key(s), start ssh-agent and add the key(s)
id1=$HOME/.ssh/identity
id2=$HOME/.ssh/id_dsa
id3=$HOME/.ssh/id_rsa
@@ -47,13 +49,13 @@ case $# in
1)
case $1 in
failsafe)
- BINDIR/xterm -geometry 80x24-0-0
+ @bindir@/xterm -geometry 80x24-0-0
do_exit
;;
esac
esac
-XCOMM The startup script is not intended to have arguments.
+# The startup script is not intended to have arguments.
startup=$HOME/.xsession
resources=$HOME/.Xresources
@@ -66,9 +68,9 @@ if [ -s "$startup" ]; then
fi
else
if [ -f "$resources" ]; then
- BINDIR/xrdb -load "$resources"
+ @XRDB_PROGRAM@ -load "$resources"
fi
- BINDIR/xterm &
- BINDIR/fvwm
+ @bindir@/xterm &
+ @bindir@/fvwm
fi
do_exit
diff --git a/config/Xstartup.cpp b/config/Xstartup.cpp
deleted file mode 100644
index dd9bfe4..0000000
--- a/config/Xstartup.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-XCOMM!/bin/sh
-XCOMM
-XCOMM $OpenBSD: Xstartup.cpp,v 1.5 2011/11/15 20:53:45 matthieu Exp $
-XCOMM
-if [ -f /etc/nologin ]; then
- /usr/X11R6/bin/xmessage -file /etc/nologin -timeout 30 -center
- exit 1
-fi
-exec BINDIR/sessreg -a -w WTMP_FILE -u UTMP_FILE \
- -x XENODMCONFIGDIR/Xservers -l $DISPLAY -h "" $USER
diff --git a/config/Xstartup.in b/config/Xstartup.in
new file mode 100644
index 0000000..7cad65f
--- /dev/null
+++ b/config/Xstartup.in
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# $OpenBSD: Xstartup.in,v 1.1 2017/07/26 21:14:54 matthieu Exp $
+#
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+
+if [ -f /etc/nologin ]; then
+ /usr/X11R6/bin/xmessage -file /etc/nologin -timeout 30 -center
+ exit 1
+fi
+exec @bindir@/sessreg -a -w @WTMP_FILE@ -u @UTMP_FILE@ \
+ -x @XENODMCONFIGDIR@/Xservers -l $DISPLAY -h "" $USER
diff --git a/config/xenodm-config.cpp b/config/xenodm-config.cpp
deleted file mode 100644
index b4ead86..0000000
--- a/config/xenodm-config.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-! $OpenBSD: xenodm-config.cpp,v 1.5 2012/10/07 15:55:28 matthieu Exp $
-!
-!
-!
-!
-!
-#ifndef XENODMCONFIGDIR
-#define XENODMCONFIGDIR XENODMDIR
-#endif
-#ifndef XENODMSCRIPTDIR
-#define XENODMSCRIPTDIR XENODMDIR
-#endif
-DisplayManager.authDir: XENODMXAUTHDIR
-DisplayManager.errorLogFile: XENODMLOGDIR/xenodm.log
-DisplayManager.keyFile: XENODMCONFIGDIR/xenodm-keys
-DisplayManager.servers: XENODMCONFIGDIR/Xservers
-DisplayManager*resources: XENODMCONFIGDIR/Xresources
-! All displays should use authorization, but we cannot be sure
-! X terminals may not be configured that way, so they will require
-! individual resource settings.
-DisplayManager*authorize: true
-!
-DisplayManager*startup: XENODMSCRIPTDIR/Xstartup
-DisplayManager*session: XENODMSCRIPTDIR/Xsession
-DisplayManager*reset: XENODMSCRIPTDIR/Xreset
-DisplayManager*authComplain: true
-! The following three resources set up display :0 as the console.
-DisplayManager._0.setup: XENODMSCRIPTDIR/Xsetup_0
-DisplayManager._0.startup: XENODMSCRIPTDIR/GiveConsole
-DisplayManager._0.reset: XENODMSCRIPTDIR/TakeConsole
-
-DisplayManager.*.authName: MIT-MAGIC-COOKIE-1
diff --git a/config/xenodm-config.in b/config/xenodm-config.in
new file mode 100644
index 0000000..0ca1b5d
--- /dev/null
+++ b/config/xenodm-config.in
@@ -0,0 +1,22 @@
+! $OpenBSD: xenodm-config.in,v 1.1 2017/07/26 21:14:54 matthieu Exp $
+!
+DisplayManager.authDir: @XENODMXAUTHDIR@
+DisplayManager.errorLogFile: @XENODMLOGDIR@/xenodm.log
+DisplayManager.keyFile: @XENODMCONFIGDIR@/xenodm-keys
+DisplayManager.servers: @XENODMCONFIGDIR@/Xservers
+DisplayManager*resources: @XENODMCONFIGDIR@/Xresources
+! All displays should use authorization, but we cannot be sure
+! X terminals may not be configured that way, so they will require
+! individual resource settings.
+DisplayManager*authorize: true
+!
+DisplayManager*startup: @XENODMSCRIPTDIR@/Xstartup
+DisplayManager*session: @XENODMSCRIPTDIR@/Xsession
+DisplayManager*reset: @XENODMSCRIPTDIR@/Xreset
+DisplayManager*authComplain: true
+! The following three resources set up display :0 as the console.
+DisplayManager._0.setup: @XENODMSCRIPTDIR@/Xsetup_0
+DisplayManager._0.startup: @XENODMSCRIPTDIR@/GiveConsole
+DisplayManager._0.reset: @XENODMSCRIPTDIR@/TakeConsole
+
+DisplayManager.*.authName: MIT-MAGIC-COOKIE-1