2006-11-26 07:43:35 -07:00
|
|
|
dnl Copyright 2005 Red Hat, Inc.
|
|
|
|
dnl
|
|
|
|
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
dnl documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
dnl the above copyright notice appear in all copies and that both that
|
|
|
|
dnl copyright notice and this permission notice appear in supporting
|
|
|
|
dnl documentation, and that the name of Red Hat not be used in
|
|
|
|
dnl advertising or publicity pertaining to distribution of the software without
|
|
|
|
dnl specific, written prior permission. Red Hat makes no
|
|
|
|
dnl representations about the suitability of this software for any purpose. It
|
|
|
|
dnl is provided "as is" without express or implied warranty.
|
|
|
|
dnl
|
|
|
|
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
|
|
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
|
|
dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
|
|
dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
dnl PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to create configure.
|
|
|
|
|
|
|
|
AC_PREREQ([2.57])
|
2010-05-31 14:23:19 -06:00
|
|
|
AC_INIT(xinit,[1.2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit)
|
|
|
|
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
2006-11-26 07:43:35 -07:00
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2010-05-31 14:23:19 -06:00
|
|
|
# Require xorg-macros: XORG_DEFAULT_OPTIONS
|
|
|
|
m4_ifndef([XORG_MACROS_VERSION],
|
|
|
|
[m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
|
|
|
|
XORG_MACROS_VERSION(1.3)
|
|
|
|
XORG_DEFAULT_OPTIONS
|
|
|
|
|
2006-11-26 07:43:35 -07:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
AC_PROG_CC
|
2008-04-20 07:46:02 -06:00
|
|
|
AM_PROG_CC_C_O
|
2006-11-26 07:43:35 -07:00
|
|
|
XORG_PROG_RAWCPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PATH_PROG(SED,sed)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_FORK
|
|
|
|
|
2007-09-15 11:12:01 -06:00
|
|
|
AC_CHECK_FUNCS([killpg])
|
|
|
|
|
2006-11-26 07:43:35 -07:00
|
|
|
m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
|
|
|
|
|
2010-05-31 14:23:19 -06:00
|
|
|
|
2006-11-26 07:43:35 -07:00
|
|
|
# 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
|
2006-11-26 10:17:57 -07:00
|
|
|
DEFAULT_WM=fvwm
|
|
|
|
DEFAULT_XCONSOLE=xconsole
|
2006-11-26 07:43:35 -07:00
|
|
|
|
|
|
|
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"])
|
|
|
|
|
2006-11-26 10:17:57 -07:00
|
|
|
AC_ARG_WITH(wm,
|
|
|
|
AS_HELP_STRING([--with-wm=WM], [Path to default window manager]),
|
|
|
|
[WM="$withval"],
|
|
|
|
[WM="$DEFAULT_WM"])
|
|
|
|
|
|
|
|
AC_ARG_WITH(xconsole,
|
|
|
|
AS_HELP_STRING([--with-xconsole=XCONSOLE], [Path to xconsole]),
|
|
|
|
[XCONSOLE="$withval"],
|
|
|
|
[XCONSOLE="$DEFAULT_XCONSOLE"])
|
|
|
|
|
2010-05-31 14:23:19 -06:00
|
|
|
AC_ARG_WITH(xinitdir,
|
|
|
|
AS_HELP_STRING([--with-xinitdir=XINITDIR], [Path to xinitdir]),
|
|
|
|
[XINITDIR="$withval"],
|
|
|
|
[XINITDIR="$DEFAULT_XINITDIR"])
|
|
|
|
|
2008-06-18 14:31:51 -06:00
|
|
|
AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
|
|
|
|
AC_ARG_WITH(launchagents-dir, AS_HELP_STRING([--with-launchagents-dir=PATH], [Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]),
|
2008-04-20 07:46:02 -06:00
|
|
|
[ launchagentsdir="${withval}" ],
|
|
|
|
[ launchagentsdir="/Library/LaunchAgents" ])
|
2008-06-18 14:31:51 -06:00
|
|
|
AC_ARG_WITH(launchdaemons-dir, AS_HELP_STRING([--with-launchdaemons-dir=PATH], [Path to launchd's LaunchDaemonss directory (default: /Library/LaunchDaemons)]),
|
|
|
|
[ launchdaemonsdir="${withval}" ],
|
|
|
|
[ launchdaemonsdir="/Library/LaunchDaemons" ])
|
2010-05-31 14:23:19 -06:00
|
|
|
AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH], [Prefix to use for launchd identifiers (default: org.x)]),
|
|
|
|
[ launchdidprefix="${withval}" ],
|
|
|
|
[ launchdidprefix="org.x" ])
|
2008-04-20 07:46:02 -06:00
|
|
|
|
|
|
|
if test "x$LAUNCHD" = "xauto"; then
|
|
|
|
unset LAUNCHD
|
2009-05-03 07:17:37 -06:00
|
|
|
AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no])
|
2008-06-18 14:31:51 -06:00
|
|
|
fi
|
|
|
|
|
2009-05-03 07:17:37 -06:00
|
|
|
TIGER_LAUNCHD=no
|
2008-06-18 14:31:51 -06:00
|
|
|
if test "x$LAUNCHD" = "xyes" ; then
|
|
|
|
AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
|
2009-05-03 07:17:37 -06:00
|
|
|
case $host_os in
|
|
|
|
darwin8*)
|
|
|
|
TIGER_LAUNCHD=yes
|
|
|
|
;;
|
|
|
|
esac
|
2008-04-20 07:46:02 -06:00
|
|
|
else
|
|
|
|
launchagentsdir=""
|
2008-06-18 14:31:51 -06:00
|
|
|
launchdaemonsdir=""
|
2008-04-20 07:46:02 -06:00
|
|
|
fi
|
2010-05-31 14:23:19 -06:00
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(LAUNCHD_ID_PREFIX, "$launchdidprefix", [Prefix to use for launchd identifiers])
|
2008-04-20 07:46:02 -06:00
|
|
|
AC_SUBST([launchagentsdir])
|
2008-06-18 14:31:51 -06:00
|
|
|
AC_SUBST([launchdaemonsdir])
|
2010-05-31 14:23:19 -06:00
|
|
|
AC_SUBST([launchdidprefix])
|
2008-04-20 07:46:02 -06:00
|
|
|
AM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"])
|
2009-05-03 07:17:37 -06:00
|
|
|
AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"])
|
2008-04-20 07:46:02 -06:00
|
|
|
|
2006-11-26 07:43:35 -07:00
|
|
|
# Checks for pkg-config packages
|
|
|
|
PKG_CHECK_MODULES(XINIT, x11)
|
|
|
|
|
|
|
|
case $host_os in
|
|
|
|
*bsd*)
|
|
|
|
XINIT_CFLAGS="$XINIT_CFLAGS -DCSRG_BASED"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(XINIT_CFLAGS)
|
|
|
|
AC_SUBST(XINIT_LIBS)
|
|
|
|
|
|
|
|
AC_PATH_PROGS(MCOOKIE, [mcookie], [$MCOOKIE],
|
|
|
|
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/local/bin])
|
2006-11-26 10:17:57 -07:00
|
|
|
|
|
|
|
case $host_os in
|
|
|
|
*openbsd*)
|
2008-03-07 00:48:10 -07:00
|
|
|
MCOOKIE='/usr/sbin/openssl rand -hex 16'
|
2006-11-26 10:17:57 -07:00
|
|
|
;;
|
2008-06-18 14:31:51 -06:00
|
|
|
*solaris*)
|
|
|
|
MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '"
|
|
|
|
;;
|
2006-11-26 10:17:57 -07:00
|
|
|
esac
|
|
|
|
|
2006-11-26 07:43:35 -07:00
|
|
|
if test "x$MCOOKIE" != x ; then
|
|
|
|
STARTX_COOKIE_FLAGS='-DHAS_COOKIE_MAKER -DMK_COOKIE="$(MCOOKIE)"'
|
|
|
|
fi
|
|
|
|
AC_SUBST(STARTX_COOKIE_FLAGS)
|
|
|
|
|
2008-06-18 14:31:51 -06:00
|
|
|
# Additional substitutions in startx, xinitrc & man pages
|
2010-05-31 14:23:19 -06:00
|
|
|
ARCHMANDEFS=""
|
|
|
|
SHELL_CMD="/bin/sh"
|
|
|
|
XSERVERNAME="Xorg"
|
|
|
|
XCONFIGFILE="xorg.conf"
|
|
|
|
XCONFIGFILEMAN='${XCONFIGFILE} (__filemansuffix__)'
|
2006-11-26 07:43:35 -07:00
|
|
|
case $host_os in
|
2010-05-31 14:23:19 -06:00
|
|
|
cygwin*)
|
|
|
|
XSERVERNAME="XWin"
|
|
|
|
XCONFIGFILE="XWinrc"
|
|
|
|
;;
|
|
|
|
darwin*)
|
|
|
|
XSERVERNAME="Xquartz"
|
|
|
|
XCONFIGFILE="defaults"
|
|
|
|
XCONFIGFILEMAN='defaults (1)'
|
|
|
|
;;
|
2008-06-18 14:31:51 -06:00
|
|
|
*solaris*)
|
|
|
|
SHELL_CMD="/bin/ksh"
|
|
|
|
;;
|
|
|
|
*sco*)
|
2006-11-26 07:43:35 -07:00
|
|
|
SHELL_CMD="/bin/ksh"
|
|
|
|
ARCHMANDEFS="-D__SCOMAN__"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
AC_SUBST(SHELL_CMD)
|
|
|
|
AC_SUBST(ARCHMANDEFS)
|
2010-05-31 14:23:19 -06:00
|
|
|
AC_SUBST(XSERVERNAME)
|
|
|
|
AC_SUBST(XCONFIGFILE)
|
|
|
|
AC_SUBST(XCONFIGFILEMAN)
|
2006-11-26 07:43:35 -07:00
|
|
|
|
|
|
|
AC_SUBST(XRDB)
|
|
|
|
AC_SUBST(XMODMAP)
|
|
|
|
AC_SUBST(TWM)
|
|
|
|
AC_SUBST(XCLOCK)
|
|
|
|
AC_SUBST(XTERM)
|
|
|
|
AC_SUBST(XSERVER)
|
|
|
|
AC_SUBST(XAUTH)
|
|
|
|
AC_SUBST(XINIT)
|
2006-11-26 10:17:57 -07:00
|
|
|
AC_SUBST(WM)
|
|
|
|
AC_SUBST(XCONSOLE)
|
2006-11-26 07:43:35 -07:00
|
|
|
|
2010-05-31 14:23:19 -06:00
|
|
|
AC_SUBST(XINITDIR)
|
2006-11-26 07:43:35 -07:00
|
|
|
|
|
|
|
AC_OUTPUT([Makefile])
|
2008-06-18 14:31:51 -06:00
|
|
|
AC_OUTPUT([privileged_startx/Makefile])
|