summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2005-11-15 04:05:59 +0000
committerKevin E Martin <kem@kem.org>2005-11-15 04:05:59 +0000
commit0a06386696875638e9e9b6e47e95affbf542e25d (patch)
tree11ff35717894f8c0f75a9f333e994f5d6adf7c93
parent549c55ea15e60b9aca5da1ed6f18564f1e69cd26 (diff)
Make the programs used in the xinit scripts configurable.
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.am12
-rw-r--r--configure.ac60
3 files changed, 77 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8be9baf..c2e1fb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
+
+ * Makefile.am:
+ * configure.ac:
+ Make the programs used in the xinit scripts configurable.
+
2005-11-09 Alan Coopersmith <alan.coopersmith@sun.com>
* configure.ac:
diff --git a/Makefile.am b/Makefile.am
index 26f0c0b..366cae1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,8 +73,18 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man
xinitrcdir = $(XINITDIR)
+PROGCPPDEFS = \
+ -DXRDB=@XRDB@ \
+ -DXMODMAP=@XMODMAP@ \
+ -DTWM=@TWM@ \
+ -DXCLOCK=@XCLOCK@ \
+ -DXTERM=@XTERM@ \
+ -DXSERVER=@XSERVER@ \
+ -DXAUTH=@XAUTH@ \
+ -DXINIT=@XINIT@
+
SCRIPTDEFS = \
- -DXINITDIR=$(XINITDIR) -DBINDIR=$(bindir) -DLIBDIR=$(libdir) \
+ -DXINITDIR=$(XINITDIR) $(PROGCPPDEFS) -DLIBDIR=$(libdir) \
-DSHELL_CMD=$(SHELL_CMD) $(STARTX_COOKIE_FLAGS)
xinitrc: xinitrc.cpp
diff --git a/configure.ac b/configure.ac
index e89500b..9dd2428 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,57 @@ AC_CANONICAL_HOST
AC_TYPE_SIGNAL
AC_FUNC_FORK
+# Build options
+DEFAULT_XRDB=xrdb
+DEFAULT_XMODMAP=xmodmap
+DEFAULT_TWM=twm
+DEFAULT_XCLOCK=xclock
+DEFAULT_XTERM=xterm
+# You always want to specify the full path to the X server
+DEFAULT_XSERVER=${bindir}/X
+DEFAULT_XAUTH=xauth
+DEFAULT_XINIT=xinit
+
+AC_ARG_WITH(xrdb,
+ AS_HELP_STRING([--with-xrdb=XRDB], [Path to xrdb]),
+ [XRDB="$withval"],
+ [XRDB="$DEFAULT_XRDB"])
+
+AC_ARG_WITH(xmodmap,
+ AS_HELP_STRING([--with-xmodmap=XMODMAP], [Path to xmodmap]),
+ [XMODMAP="$withval"],
+ [XMODMAP="$DEFAULT_XMODMAP"])
+
+AC_ARG_WITH(twm,
+ AS_HELP_STRING([--with-twm=TWM], [Path to twm]),
+ [TWM="$withval"],
+ [TWM="$DEFAULT_TWM"])
+
+AC_ARG_WITH(xclock,
+ AS_HELP_STRING([--with-xclock=XCLOCK], [Path to xclock]),
+ [XCLOCK="$withval"],
+ [XCLOCK="$DEFAULT_XCLOCK"])
+
+AC_ARG_WITH(xterm,
+ AS_HELP_STRING([--with-xterm=XTERM], [Path to xterm]),
+ [XTERM="$withval"],
+ [XTERM="$DEFAULT_XTERM"])
+
+AC_ARG_WITH(xserver,
+ AS_HELP_STRING([--with-xserver=XSERVER], [Path to default X server]),
+ [XSERVER="$withval"],
+ [XSERVER="$DEFAULT_XSERVER"])
+
+AC_ARG_WITH(xauth,
+ AS_HELP_STRING([--with-xauth=XAUTH], [Path to xauth]),
+ [XAUTH="$withval"],
+ [XAUTH="$DEFAULT_XAUTH"])
+
+AC_ARG_WITH(xinit,
+ AS_HELP_STRING([--with-xinit=XINIT], [Path to xinit]),
+ [XINIT="$withval"],
+ [XINIT="$DEFAULT_XINIT"])
+
# Checks for pkg-config packages
PKG_CHECK_MODULES(XINIT, x11)
@@ -70,6 +121,15 @@ esac
AC_SUBST(SHELL_CMD)
AC_SUBST(ARCHMANDEFS)
+AC_SUBST(XRDB)
+AC_SUBST(XMODMAP)
+AC_SUBST(TWM)
+AC_SUBST(XCLOCK)
+AC_SUBST(XTERM)
+AC_SUBST(XSERVER)
+AC_SUBST(XAUTH)
+AC_SUBST(XINIT)
+
# Defines which X servers are listed in help output in xinit.c
# Cheat, lie, and assume all the world is Xorg for now
AC_DEFINE(XORG, 1, [Define if you have Xorg X server])