summaryrefslogtreecommitdiff
path: root/configure.in
blob: 13f7d611700d32caa4ae309d62a832a414f68c49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
dnl Process this file with autoconf to produce a configure script.
dnl Copyright (C) 2000, 2001 Shawn Betts <sabetts@users.sourceforge.net>
dnl
dnl This file is part of ratpoison.
dnl
dnl ratpoison is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl ratpoison is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
dnl $Id: configure.in,v 1.21 2001/09/07 05:22:01 sabetts Exp $

AC_INIT(src/main.c)
AM_INIT_AUTOMAKE(ratpoison, 1.0.1-cvs)

AM_CONFIG_HEADER(src/config.h)

AC_CANONICAL_HOST
AC_SUBST(host_os)

dnl by default turn off debugging
AC_MSG_CHECKING(whether to enable debugging)
AC_ARG_ENABLE(debug,
	[  --enable-debugging      build with extra debugging messages],
	[if test "x$enableval" != "xno"; then
		AC_DEFINE_UNQUOTED(DEBUG, 1, Define this to enable debugging messages)
	 	AC_MSG_RESULT(yes)
		CFLAGS="$CFLAGS -g"
	else
		AC_MSG_RESULT(no)
	fi],[AC_MSG_RESULT(no)])

AC_ARG_WITH(xterm, [ --with-xterm=PROG        set the x terminal emulator used by ratpoison ],
term_prog=$withval, term_prog="xterm")
AC_DEFINE_UNQUOTED(TERM_PROG,"$term_prog")

dnl Checks for programs.
CFLAGS="$CFLAGS -Wall -O2"
AC_CHECK_TOOL(CC, gcc)
AC_PROG_CC

dnl check for an x terminal emulator
AC_MSG_CHECKING(terminal emulator)
AC_MSG_RESULT($term_prog)

dnl Check for the X libs
AC_PATH_X
AC_PATH_XTRA

if test "x$no_x" = "xyes"; then
	AC_MSG_ERROR([*** Can't find X11 headers and libs])
fi

LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"

AC_CHECK_LIB(X11, XOpenDisplay,,
	AC_MSG_ERROR([*** Can't find libX11]))

dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.
AC_CHECK_FUNCS(getopt getopt_long)
AC_TYPE_SIGNAL

AC_OUTPUT(Makefile doc/Makefile src/Makefile)