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
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/main.c)
AM_INIT_AUTOMAKE(ratpoison, 0.0.6)
AM_CONFIG_HEADER(src/config.h)
dnl by default turn on debugging
AC_ARG_ENABLE(debug, [ --disable-debug Turn off debugging information], enable_debugging=no, enable_debugging=yes)
if test "$enable_debugging" = yes; then
AC_DEFINE(DEBUG)
fi
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"
AC_PROG_CC
dnl check for an x terminal emulator
AC_CHECK_PROG(result,$term_prog,yes,no)
if test $result = no; then
AC_MSG_ERROR([*** Can't find x terminal emulator \`$term_prog'])
fi
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_TYPE_SIGNAL
AC_OUTPUT(Makefile doc/Makefile src/Makefile)
|