Debian Codegraph @

configure.ac

raw ◀ ▶
Source reconstructed at patch state 0 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 # ChangeLog:
2 # 2007-07-28 L. Donnie Smith <[email protected]>
3 # * added config.h header
4 # * added with-python argument and associated logic
5 #
6 # 2007-05-30 L. Donnie Smith <[email protected]>
7 # * added python/Makefile
8 # * added PYTHON_VERSION variable
9 #
10 # 2007-04-09 L. Donnie Smith <[email protected]>
11 # * updated for libcwiid rename
12 #
13 # 2007-04-04 L. Donnie Smith <[email protected]>
14 # * removed --noyywrap from lex
15 #
16 # 2007-04-01 L. Donnie Smith <[email protected]>
17 # * added lswm/Makefile
18 # * moved defs.mak
19 #
20 # 2007-03-19 L. Donnie Smith <[email protected]>
21 # * added --disable-ldconfig
22 #
23 # 2007-03-01 L. Donnie Smith <[email protected]>
24 # * Initial ChangeLog
25 # * Check for stdint.h
26
27 AC_INIT(CWiid,0.6.00,[email protected])
28 AC_CONFIG_HEADER(common/include/config.h)
29
30 AC_PROG_CC
31 AC_PROG_AWK
32 AC_PROG_LEX
33 if test "$LEX" != "flex"; then
34 AC_MSG_ERROR([flex not found])
35 fi
36 if test -z "`echo %%|$LEX -t|grep yypop_buffer_state`"; then
37 AC_MSG_ERROR([flex missing yypop_buffer_state - upgrade to version 2.5.33 or later])
38 fi
39 AC_PROG_YACC
40 if test "$YACC" != "bison -y"; then
41 AC_MSG_ERROR([bison not found])
42 fi
43
44 AC_ARG_WITH(
45 [python],
46 [AS_HELP_STRING([--without-python],[compile without python support])],
47 [case $withval in
48 yes)
49 REQUIRE_PYTHON=1
50 PYTHON_NAME=python3
51 ;;
52 no)
53 REQUIRE_PYTHON=
54 PYTHON_NAME=
55 ;;
56 *)
57 REQUIRE_PYTHON=1
58 PYTHON_NAME=$withval
59 ;;
60 esac],
61 [REQUIRE_PYTHON=1; PYTHON_NAME=python3])
62 if test $REQUIRE_PYTHON; then
63 AC_CHECK_PROGS([PYTHON],$PYTHON_NAME)
64 if test $REQUIRE_PYTHON -a ! $PYTHON; then
65 AC_MSG_ERROR([$PYTHON_NAME not found])
66 fi
67 fi
68 AC_SUBST(PYTHON)
69 if test $PYTHON; then
70 PYTHON_VERSION=[`$PYTHON -c 'import sys; print (sys.version[:3])'`]
71 AC_SUBST(PYTHON_VERSION)
72 AC_DEFINE([HAVE_PYTHON],1,[Define to 1 if python support is enabled])
73 fi
74
75 AC_CHECK_LIB([pthread], [pthread_create],,
76 AC_MSG_ERROR([pthread library not found]))
77 AC_CHECK_LIB([bluetooth], [hci_devid],,
78 AC_MSG_ERROR([bluetooth library not found]))
79 AC_CHECK_LIB([dl], [dlopen],,
80 AC_MSG_ERROR([dl lib not found]))
81 #AC_CHECK_LIB([rt], [clock_gettime],,
82 # AC_MSG_ERROR([rt lib not found]))
83
84 AC_HEADER_STDC
85 AC_CHECK_HEADER([stdint.h],,
86 AC_MSG_ERROR([stdint.h not found]))
87 AC_CHECK_HEADER([bluetooth/bluetooth.h],,
88 AC_MSG_ERROR([bluetooth/bluetooth.h not found]))
89 AC_CHECK_HEADERS([bluetooth/l2cap.h bluetooth/hci.h],,
90 AC_MSG_ERROR([bluetooth headers not found]),
91 [#include <bluetooth/bluetooth.h>])
92 AC_CHECK_HEADER([linux/input.h],,
93 AC_MSG_ERROR([linux/input.h not found]))
94 AC_CHECK_HEADER([linux/uinput.h],,
95 AC_MSG_ERROR([linux/uinput.h]),
96 [#include <linux/input.h>])
97
98 AC_ISC_POSIX
99
100 AC_ARG_WITH(cwiid-config-dir,AC_HELP_STRING([--with-cwiid-config-dir],
101 [CWiid configuration directory, default to $(sysconfdir)/cwiid]))
102 if test -z $with_cwiid_config_dir; then
103 CWIID_CONFIG_DIR='${sysconfdir}/cwiid'
104 else
105 CWIID_CONFIG_DIR=$with_cwiid_config_dir
106 fi
107 AC_SUBST(CWIID_CONFIG_DIR)
108
109 AC_ARG_WITH(cwiid-plugins-dir,AC_HELP_STRING([--with-cwiid-plugins-dir],
110 [CWiid plugins directory, default to $(libdir)/cwiid/plugins]))
111 if test -n $with_cwiid_plugins_dir; then
112 CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins'
113 else
114 CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir
115 fi
116 AC_SUBST(CWIID_PLUGINS_DIR)
117
118 AC_ARG_WITH(ldconfig,AC_HELP_STRING([--disable-ldconfig],
119 [don't execute ldconfig after install]))
120 if test "$enable_ldconfig" = "no"; then
121 LDCONFIG="#ldconfig"
122 else
123 LDCONFIG="ldconfig"
124 fi
125 AC_SUBST(LDCONFIG)
126
127 pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
128 PKG_CHECK_MODULES([GTK], [$pkg_modules])
129 AC_SUBST(GTK_CFLAGS)
130 AC_SUBST(GTK_LIBS)
131
132 AC_OUTPUT(
133 [Makefile]
134 [defs.mak]
135 [common/include/lib.mak]
136 [doc/Makefile]
137 [man/Makefile]
138 [libcwiid/Makefile]
139 [libcwiid/cwiid.pc]
140 [wmdemo/Makefile]
141 [wmgui/Makefile]
142 [wminput/Makefile]
143 [wminput/plugins/Makefile]
144 [wminput/plugins/ir_ptr/Makefile]
145 [wminput/plugins/acc/Makefile]
146 [wminput/plugins/nunchuk_acc/Makefile]
147 [wminput/plugins/led/Makefile]
148 [wminput/plugins/nunchuk_stick2btn/Makefile]
149 [lswm/Makefile]
150 [python/Makefile]
151 )
152