Stop abusing cpp as generic macro processor in the build system.

ok naddy@
This commit is contained in:
matthieu 2017-07-26 21:14:54 +00:00
parent 7c70a5feaf
commit e1e9d732f3
20 changed files with 160 additions and 355 deletions

View File

@ -259,15 +259,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@
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@

View File

@ -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) > $@

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
! $OpenBSD: Xresources.cpp,v 1.1 2016/10/23 08:30:37 matthieu Exp $
! $OpenBSD: Xresources.in,v 1.1 2017/07/26 21:14:54 matthieu Exp $
!
!
!
@ -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
#endif
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 */**//
#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 */
XHASHifndef bpp1
#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

View File

@ -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

View File

@ -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@

View File

@ -1,8 +1,10 @@
XCOMM!SHELL_CMD
XCOMM
XCOMM $OpenBSD: Xsession.cpp,v 1.2 2016/11/11 15:58:35 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

View File

@ -1,10 +0,0 @@
XCOMM!/bin/sh
XCOMM
XCOMM $OpenBSD: Xstartup.cpp,v 1.1 2016/10/23 08:30:37 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

View File

@ -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

View File

@ -1,32 +0,0 @@
! $OpenBSD: xenodm-config.cpp,v 1.1 2016/10/23 08:30:37 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

View File

@ -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

112
app/xenodm/configure vendored
View File

@ -681,9 +681,6 @@ LINT_FALSE
LINT_TRUE
LINT_FLAGS
LINT
TRADITIONALCPPFLAGS
RAWCPPFLAGS
RAWCPP
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@ -17969,107 +17966,6 @@ AM_BACKSLASH='\'
for ac_prog in cpp
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_RAWCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
case $RAWCPP in
[\\/]* | ?:[\\/]*)
ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib"
for as_dir in $as_dummy
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RAWCPP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
RAWCPP=$ac_cv_path_RAWCPP
if test -n "$RAWCPP"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RAWCPP" >&5
$as_echo "$RAWCPP" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$RAWCPP" && break
done
test -n "$RAWCPP" || RAWCPP="${CPP}"
# Check for flag to avoid builtin definitions - assumes unix is predefined,
# which is not the best choice for supporting other OS'es, but covers most
# of the ones we need for now.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -undef" >&5
$as_echo_n "checking if $RAWCPP requires -undef... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Does cpp redefine unix ?
_ACEOF
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS=-undef
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
# under Cygwin unix is still defined even with -undef
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS="-undef -ansi"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with -ansi" >&5
$as_echo "yes, with -ansi" >&6; }
else
as_fn_error $? "${RAWCPP} defines unix with or without -undef. I don't know what to do." "$LINENO" 5
fi
fi
rm -f conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5
$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Does cpp preserve "whitespace"?
_ACEOF
if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
else
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
TRADITIONALCPPFLAGS="-traditional"
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." "$LINENO" 5
fi
fi
rm -f conftest.$ac_ext
@ -20209,7 +20105,7 @@ fi
ac_config_files="$ac_config_files Makefile config/Makefile greeter/Makefile include/Makefile man/Makefile xenodm/Makefile"
ac_config_files="$ac_config_files Makefile config/Makefile greeter/Makefile include/Makefile man/Makefile xenodm/Makefile config/Xreset config/Xresources config/Xservers config/Xsession config/Xstartup config/xenodm-config"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -21234,6 +21130,12 @@ do
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"xenodm/Makefile") CONFIG_FILES="$CONFIG_FILES xenodm/Makefile" ;;
"config/Xreset") CONFIG_FILES="$CONFIG_FILES config/Xreset" ;;
"config/Xresources") CONFIG_FILES="$CONFIG_FILES config/Xresources" ;;
"config/Xservers") CONFIG_FILES="$CONFIG_FILES config/Xservers" ;;
"config/Xsession") CONFIG_FILES="$CONFIG_FILES config/Xsession" ;;
"config/Xstartup") CONFIG_FILES="$CONFIG_FILES config/Xstartup" ;;
"config/xenodm-config") CONFIG_FILES="$CONFIG_FILES config/xenodm-config" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac

View File

@ -42,7 +42,6 @@ m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
XORG_PROG_RAWCPP
XORG_WITH_LINT
# Checks for typedefs, structures, and compiler characteristics.
@ -328,5 +327,11 @@ AC_CONFIG_FILES([Makefile
greeter/Makefile
include/Makefile
man/Makefile
xenodm/Makefile])
xenodm/Makefile
config/Xreset
config/Xresources
config/Xservers
config/Xsession
config/Xstartup
config/xenodm-config])
AC_OUTPUT

View File

@ -1,26 +0,0 @@
# -*- Makefile -*-
# Rules for generating files using the C pre-processor
# (Replaces CppFileTarget from Imake)
SED = sed
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/\@\@$$/\\/'
.cpp:
$(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@

View File

@ -215,15 +215,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@
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@

View File

@ -181,15 +181,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@
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@

View File

@ -235,15 +235,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@
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@

View File

@ -237,15 +237,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@
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@