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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(xbindkeys, 1.8.7, hocwp@free.fr)
AC_PREREQ(2.54)
AC_COPYRIGHT(Copyright (C) Philippe Brochard <hocwp@free.fr>)
# Automake
AM_INIT_AUTOMAKE()
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([xbindkeys.c])
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_AWK
dnl Checks for libraries.
dnl there are none here...see the X libraries section below!
dnl Checks for header files.
AC_PATH_X
AC_PATH_XTRA
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
dnl Checks for X libraries.
LIBS_saved="$LIBS"
LIBS=
AC_CHECK_LIB(X11, XCreateWindow,, [
AC_MSG_WARN([Xbindkeys depends on the X11 libraries!])
], $LIBS_saved $X_LIBS)
X_LIBS="$X_LIBS $LIBS"
LIBS="$LIBS_saved"
dnl disable fork+exec start
use_fork=yes
AC_ARG_ENABLE( fork,
[ --disable-fork No fork+exec to launch program (Use a system call instead)],
use_fork="${enableval}")
FORK_FLAG=""
if test "$use_fork" = yes; then
FORK_FLAG="-DFORK_FLAG=1"
fi
AC_SUBST(FORK_FLAG)
dnl disable xbindkeys_show install
use_tk=yes
AC_ARG_ENABLE(tk,
[ --disable-tk Do not install xbindkeys_show (prevent tk dependency)],
use_tk="${enableval}")
AM_CONDITIONAL(TK, test x$use_tk = xyes)
dnl disable guile config file
use_guile=yes
AC_ARG_ENABLE( guile,
[ --disable-guile Disable scheme/guile configuration file style ],
use_guile="${enableval}")
GUILE_FLAG=""
if test "$use_guile" = yes; then
GUILE_FLAGS
GUILE_FLAG="-DGUILE_FLAG=1"
fi
AM_CONDITIONAL(GUILE, test x$use_guile = xyes)
AC_SUBST(GUILE_FLAG)
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([strcasecmp strchr strrchr strstr strtol])
dnl final output
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
|