configure.ac revision a73027ba
1a73027baSmrgdnl Copyright 2005 Red Hat, Inc. 2a73027baSmrgdnl 3a73027baSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 4a73027baSmrgdnl documentation for any purpose is hereby granted without fee, provided that 5a73027baSmrgdnl the above copyright notice appear in all copies and that both that 6a73027baSmrgdnl copyright notice and this permission notice appear in supporting 7a73027baSmrgdnl documentation, and that the name of Red Hat not be used in 8a73027baSmrgdnl advertising or publicity pertaining to distribution of the software without 9a73027baSmrgdnl specific, written prior permission. Red Hat makes no 10a73027baSmrgdnl representations about the suitability of this software for any purpose. It 11a73027baSmrgdnl is provided "as is" without express or implied warranty. 12a73027baSmrgdnl 13a73027baSmrgdnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 14a73027baSmrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 15a73027baSmrgdnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 16a73027baSmrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 17a73027baSmrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 18a73027baSmrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 19a73027baSmrgdnl PERFORMANCE OF THIS SOFTWARE. 20a73027baSmrgdnl 21a73027baSmrgdnl Process this file with autoconf to create configure. 22a73027baSmrg 23a73027baSmrgAC_PREREQ([2.57]) 24a73027baSmrgAC_INIT(xinit,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit) 25a73027baSmrgAM_INIT_AUTOMAKE([dist-bzip2]) 26a73027baSmrgAM_MAINTAINER_MODE 27a73027baSmrg 28a73027baSmrgAM_CONFIG_HEADER(config.h) 29a73027baSmrg 30a73027baSmrgAC_PROG_CC 31a73027baSmrgAM_PROG_CC_C_O 32a73027baSmrgXORG_PROG_RAWCPP 33a73027baSmrgAC_PROG_INSTALL 34a73027baSmrgAC_PATH_PROG(SED,sed) 35a73027baSmrgAC_CANONICAL_HOST 36a73027baSmrg 37a73027baSmrgAC_TYPE_SIGNAL 38a73027baSmrgAC_FUNC_FORK 39a73027baSmrg 40a73027baSmrgAC_CHECK_FUNCS([killpg]) 41a73027baSmrg 42a73027baSmrgm4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))]) 43a73027baSmrg 44a73027baSmrg# Build options 45a73027baSmrgDEFAULT_XRDB=xrdb 46a73027baSmrgDEFAULT_XMODMAP=xmodmap 47a73027baSmrgDEFAULT_TWM=twm 48a73027baSmrgDEFAULT_XCLOCK=xclock 49a73027baSmrgDEFAULT_XTERM=xterm 50a73027baSmrg# You always want to specify the full path to the X server 51a73027baSmrgDEFAULT_XSERVER=${bindir}/X 52a73027baSmrgDEFAULT_XAUTH=xauth 53a73027baSmrgDEFAULT_XINIT=xinit 54a73027baSmrg 55a73027baSmrgAC_ARG_WITH(xrdb, 56a73027baSmrg AS_HELP_STRING([--with-xrdb=XRDB], [Path to xrdb]), 57a73027baSmrg [XRDB="$withval"], 58a73027baSmrg [XRDB="$DEFAULT_XRDB"]) 59a73027baSmrg 60a73027baSmrgAC_ARG_WITH(xmodmap, 61a73027baSmrg AS_HELP_STRING([--with-xmodmap=XMODMAP], [Path to xmodmap]), 62a73027baSmrg [XMODMAP="$withval"], 63a73027baSmrg [XMODMAP="$DEFAULT_XMODMAP"]) 64a73027baSmrg 65a73027baSmrgAC_ARG_WITH(twm, 66a73027baSmrg AS_HELP_STRING([--with-twm=TWM], [Path to twm]), 67a73027baSmrg [TWM="$withval"], 68a73027baSmrg [TWM="$DEFAULT_TWM"]) 69a73027baSmrg 70a73027baSmrgAC_ARG_WITH(xclock, 71a73027baSmrg AS_HELP_STRING([--with-xclock=XCLOCK], [Path to xclock]), 72a73027baSmrg [XCLOCK="$withval"], 73a73027baSmrg [XCLOCK="$DEFAULT_XCLOCK"]) 74a73027baSmrg 75a73027baSmrgAC_ARG_WITH(xterm, 76a73027baSmrg AS_HELP_STRING([--with-xterm=XTERM], [Path to xterm]), 77a73027baSmrg [XTERM="$withval"], 78a73027baSmrg [XTERM="$DEFAULT_XTERM"]) 79a73027baSmrg 80a73027baSmrgAC_ARG_WITH(xserver, 81a73027baSmrg AS_HELP_STRING([--with-xserver=XSERVER], [Path to default X server]), 82a73027baSmrg [XSERVER="$withval"], 83a73027baSmrg [XSERVER="$DEFAULT_XSERVER"]) 84a73027baSmrg 85a73027baSmrgAC_ARG_WITH(xauth, 86a73027baSmrg AS_HELP_STRING([--with-xauth=XAUTH], [Path to xauth]), 87a73027baSmrg [XAUTH="$withval"], 88a73027baSmrg [XAUTH="$DEFAULT_XAUTH"]) 89a73027baSmrg 90a73027baSmrgAC_ARG_WITH(xinit, 91a73027baSmrg AS_HELP_STRING([--with-xinit=XINIT], [Path to xinit]), 92a73027baSmrg [XINIT="$withval"], 93a73027baSmrg [XINIT="$DEFAULT_XINIT"]) 94a73027baSmrg 95a73027baSmrgAC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto]) 96a73027baSmrgAC_ARG_WITH(launchagents-dir, AS_HELP_STRING([--with-launchagents-dir=PATH], [Path to launchd's LaunchAgents directory (default: /Library/LaunchAgents)]), 97a73027baSmrg [ launchagentsdir="${withval}" ], 98a73027baSmrg [ launchagentsdir="/Library/LaunchAgents" ]) 99a73027baSmrgAC_ARG_WITH(launchdaemons-dir, AS_HELP_STRING([--with-launchdaemons-dir=PATH], [Path to launchd's LaunchDaemonss directory (default: /Library/LaunchDaemons)]), 100a73027baSmrg [ launchdaemonsdir="${withval}" ], 101a73027baSmrg [ launchdaemonsdir="/Library/LaunchDaemons" ]) 102a73027baSmrg 103a73027baSmrgif test "x$LAUNCHD" = "xauto"; then 104a73027baSmrg unset LAUNCHD 105a73027baSmrg case $host_os in 106a73027baSmrg darwin8*) 107a73027baSmrg LAUNCHD=no 108a73027baSmrg ;; 109a73027baSmrg *) 110a73027baSmrg AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no]) 111a73027baSmrg ;; 112a73027baSmrg esac 113a73027baSmrgfi 114a73027baSmrg 115a73027baSmrgif test "x$LAUNCHD" = "xyes" ; then 116a73027baSmrg AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available]) 117a73027baSmrgelse 118a73027baSmrg launchagentsdir="" 119a73027baSmrg launchdaemonsdir="" 120a73027baSmrgfi 121a73027baSmrgAC_SUBST([launchagentsdir]) 122a73027baSmrgAC_SUBST([launchdaemonsdir]) 123a73027baSmrgAM_CONDITIONAL(LAUNCHD, [test "x$LAUNCHD" = "xyes"]) 124a73027baSmrg 125a73027baSmrg# Checks for pkg-config packages 126a73027baSmrgPKG_CHECK_MODULES(XINIT, x11) 127a73027baSmrg 128a73027baSmrgcase $host_os in 129a73027baSmrg *bsd*) 130a73027baSmrg XINIT_CFLAGS="$XINIT_CFLAGS -DCSRG_BASED" 131a73027baSmrg ;; 132a73027baSmrgesac 133a73027baSmrg 134a73027baSmrgAC_SUBST(XINIT_CFLAGS) 135a73027baSmrgAC_SUBST(XINIT_LIBS) 136a73027baSmrg 137a73027baSmrgAC_PATH_PROGS(MCOOKIE, [mcookie], [$MCOOKIE], 138a73027baSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/local/bin]) 139a73027baSmrg 140a73027baSmrgcase $host_os in 141a73027baSmrg *openbsd*) 142a73027baSmrg MCOOKIE='/usr/sbin/openssl rand -hex 16' 143a73027baSmrg ;; 144a73027baSmrg *solaris*) 145a73027baSmrg MCOOKIE="/usr/bin/od -X -A n -N 16 /dev/urandom | /usr/bin/tr -d ' '" 146a73027baSmrg ;; 147a73027baSmrgesac 148a73027baSmrg 149a73027baSmrgif test "x$MCOOKIE" != x ; then 150a73027baSmrg STARTX_COOKIE_FLAGS='-DHAS_COOKIE_MAKER -DMK_COOKIE="$(MCOOKIE)"' 151a73027baSmrgfi 152a73027baSmrgAC_SUBST(STARTX_COOKIE_FLAGS) 153a73027baSmrg 154a73027baSmrg# Additional substitutions in startx, xinitrc & man pages 155a73027baSmrgcase $host_os in 156a73027baSmrg *solaris*) 157a73027baSmrg SHELL_CMD="/bin/ksh" 158a73027baSmrg ARCHMANDEFS="" 159a73027baSmrg ;; 160a73027baSmrg *sco*) 161a73027baSmrg SHELL_CMD="/bin/ksh" 162a73027baSmrg ARCHMANDEFS="-D__SCOMAN__" 163a73027baSmrg ;; 164a73027baSmrg *) 165a73027baSmrg SHELL_CMD="/bin/sh" 166a73027baSmrg ARCHMANDEFS="" 167a73027baSmrg ;; 168a73027baSmrgesac 169a73027baSmrgAC_SUBST(SHELL_CMD) 170a73027baSmrgAC_SUBST(ARCHMANDEFS) 171a73027baSmrg 172a73027baSmrgAC_SUBST(XRDB) 173a73027baSmrgAC_SUBST(XMODMAP) 174a73027baSmrgAC_SUBST(TWM) 175a73027baSmrgAC_SUBST(XCLOCK) 176a73027baSmrgAC_SUBST(XTERM) 177a73027baSmrgAC_SUBST(XSERVER) 178a73027baSmrgAC_SUBST(XAUTH) 179a73027baSmrgAC_SUBST(XINIT) 180a73027baSmrg 181a73027baSmrg# Defines which X servers are listed in help output in xinit.c 182a73027baSmrg# Cheat, lie, and assume all the world is Xorg for now 183a73027baSmrgAC_DEFINE(XORG, 1, [Define if you have Xorg X server]) 184a73027baSmrg 185a73027baSmrgXORG_MANPAGE_SECTIONS 186a73027baSmrgXORG_RELEASE_VERSION 187a73027baSmrg 188a73027baSmrgAC_OUTPUT([Makefile]) 189a73027baSmrgAC_OUTPUT([privileged_startx/Makefile]) 190