root/configure.ac

Revision 2100f14c612471084434b364501e3818c7f4144e, 3.2 kB (checked in by L. Donnie Smith <donnie.smith@…>, 2 years ago)

Various administrative updates

change email addresses
remove individual file changelogs (that's what version control is for)

  • Property mode set to 100644
Line 
1AC_INIT(CWiid,0.6.00,donnie.smith@gatech.edu)
2AC_CONFIG_HEADER(common/include/config.h)
3
4AC_PROG_CC
5AC_PROG_AWK
6AC_PROG_LEX
7if test "$LEX" != "flex"; then
8        AC_MSG_ERROR([flex not found])
9fi
10if test -z "`echo %%|$LEX -t|grep yypop_buffer_state`"; then
11        AC_MSG_ERROR([flex missing yypop_buffer_state - upgrade to version 2.5.33 or later])
12fi
13AC_PROG_YACC
14if test "$YACC" != "bison -y"; then
15        AC_MSG_ERROR([bison not found])
16fi
17
18AC_ARG_WITH(
19        [python],
20        [AS_HELP_STRING([--without-python],[compile without python support])],
21        [case $withval in
22                yes)
23                        REQUIRE_PYTHON=1
24                        PYTHON_NAME=python
25                ;;
26                no)
27                        REQUIRE_PYTHON=
28                        PYTHON_NAME=
29                ;;
30                *)
31                        REQUIRE_PYTHON=1
32                        PYTHON_NAME=$withval
33                ;;
34        esac],
35        [REQUIRE_PYTHON=1; PYTHON_NAME=python])
36if test $REQUIRE_PYTHON; then
37        AC_CHECK_PROGS([PYTHON],$PYTHON_NAME)
38        if test $REQUIRE_PYTHON -a ! $PYTHON; then
39                AC_MSG_ERROR([$PYTHON_NAME not found])
40        fi
41fi
42AC_SUBST(PYTHON)
43if test $PYTHON; then
44        PYTHON_VERSION=[`$PYTHON -c 'import sys; print sys.version[:3]'`]
45        AC_SUBST(PYTHON_VERSION)
46        AC_DEFINE([HAVE_PYTHON],1,[Define to 1 if python support is enabled])
47fi
48
49AC_CHECK_LIB([pthread], [pthread_create],,
50        AC_MSG_ERROR([pthread library not found]))
51AC_CHECK_LIB([bluetooth], [hci_devid],,
52        AC_MSG_ERROR([bluetooth library not found]))
53AC_CHECK_LIB([dl], [dlopen],,
54        AC_MSG_ERROR([dl lib not found]))
55#AC_CHECK_LIB([rt], [clock_gettime],,
56#       AC_MSG_ERROR([rt lib not found]))
57
58AC_HEADER_STDC
59AC_CHECK_HEADER([stdint.h],,
60        AC_MSG_ERROR([stdint.h not found]))
61AC_CHECK_HEADER([bluetooth/bluetooth.h],,
62        AC_MSG_ERROR([bluetooth/bluetooth.h not found]))
63AC_CHECK_HEADERS([bluetooth/l2cap.h bluetooth/hci.h],,
64        AC_MSG_ERROR([bluetooth headers not found]),
65        [#include <bluetooth/bluetooth.h>])
66AC_CHECK_HEADER([linux/input.h],,
67        AC_MSG_ERROR([linux/input.h not found]))
68AC_CHECK_HEADER([linux/uinput.h],,
69        AC_MSG_ERROR([linux/uinput.h]),
70        [#include <linux/input.h>])
71
72AC_ISC_POSIX
73
74AC_ARG_WITH(cwiid-config-dir,AC_HELP_STRING([--with-cwiid-config-dir],
75        [CWiid configuration directory, default to $(sysconfdir)/cwiid]))
76if test -z $with_cwiid_config_dir; then
77        CWIID_CONFIG_DIR='${sysconfdir}/cwiid'
78else
79        CWIID_CONFIG_DIR=$with_cwiid_config_dir
80fi
81AC_SUBST(CWIID_CONFIG_DIR)
82
83AC_ARG_WITH(cwiid-plugins-dir,AC_HELP_STRING([--with-cwiid-plugins-dir],
84        [CWiid plugins directory, default to $(libdir)/cwiid/plugins]))
85if test -n $with_cwiid_plugins_dir; then
86        CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins'
87else
88        CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir
89fi
90AC_SUBST(CWIID_PLUGINS_DIR)
91
92AC_ARG_WITH(ldconfig,AC_HELP_STRING([--disable-ldconfig],
93        [don't execute ldconfig after install]))
94if test "$enable_ldconfig" = "no"; then
95        LDCONFIG="#ldconfig"
96else
97        LDCONFIG="ldconfig"
98fi
99AC_SUBST(LDCONFIG)
100
101pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
102PKG_CHECK_MODULES([GTK], [$pkg_modules])
103AC_SUBST(GTK_CFLAGS)
104AC_SUBST(GTK_LIBS)
105
106AC_OUTPUT(
107        [Makefile]
108        [defs.mak]
109        [common/include/lib.mak]
110        [doc/Makefile]
111        [man/Makefile]
112        [libcwiid/Makefile]
113        [libcwiid/cwiid.pc]
114        [wmdemo/Makefile]
115        [wmgui/Makefile]
116        [wminput/Makefile]
117        [wminput/plugins/Makefile]
118        [wminput/plugins/ir_ptr/Makefile]
119        [wminput/plugins/acc/Makefile]
120        [wminput/plugins/nunchuk_acc/Makefile]
121        [wminput/plugins/led/Makefile]
122        [wminput/plugins/nunchuk_stick2btn/Makefile]
123        [lswm/Makefile]
124        [python/Makefile]
125        )
Note: See TracBrowser for help on using the browser.