Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (66 sloc) 2.09 KB
AC_INIT(CWiid,0.5.01,wiimote@abstrakraft.org)
AC_PROG_CC
AC_PROG_AWK
AC_PROG_LEX
if test "$LEX" != "flex"; then
AC_MSG_ERROR([flex not found])
fi
if test -z "`echo %%|$LEX -t --noyywrap|grep yypop_buffer_state`"; then
AC_MSG_ERROR([flex missing yypop_buffer_state - upgrade to version 2.5.33 or later])
fi
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_ERROR([bison not found])
fi
AC_CHECK_LIB([pthread], [pthread_create],,
AC_MSG_ERROR([pthread library not found]))
AC_CHECK_LIB([bluetooth], [hci_devid],,
AC_MSG_ERROR([bluetooth library not found]))
AC_CHECK_LIB([dl], [dlopen],,
AC_MSG_ERROR([dl lib not found]))
#AC_CHECK_LIB([rt], [clock_gettime],,
# AC_MSG_ERROR([rt lib not found]))
AC_HEADER_STDC
AC_CHECK_HEADER([bluetooth/bluetooth.h],,
AC_MSG_ERROR([bluetooth/bluetooth.h not found]))
AC_CHECK_HEADERS([bluetooth/l2cap.h bluetooth/hci.h],,
AC_MSG_ERROR([bluetooth headers not found]),
[#include <bluetooth/bluetooth.h>])
AC_CHECK_HEADER([linux/input.h],,
AC_MSG_ERROR([linux/input.h not found]))
AC_CHECK_HEADER([linux/uinput.h],,
AC_MSG_ERROR([linux/uinput.h]),
[#include <linux/input.h>])
AC_ISC_POSIX
AC_ARG_WITH(cwiid-config-dir,AC_HELP_STRING([--with-cwiid-config-dir],
[CWiid configuration directory, default to $(sysconfdir)/cwiid]))
if test -z $with_cwiid_config_dir; then
CWIID_CONFIG_DIR='${sysconfdir}/cwiid'
else
CWIID_CONFIG_DIR=$with_cwiid_config_dir
fi
AC_SUBST(CWIID_CONFIG_DIR)
AC_ARG_WITH(cwiid-plugins-dir,AC_HELP_STRING([--with-cwiid-plugins-dir],
[CWiid plugins directory, default to $(libdir)/cwiid/plugins]))
if test -n $with_cwiid_plugins_dir; then
CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins'
else
CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir
fi
AC_SUBST(CWIID_PLUGINS_DIR)
pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
AC_OUTPUT(
[Makefile]
[common/include/defs.mak]
[wiimote/Makefile]
[wmdemo/Makefile]
[wmgui/Makefile]
[wminput/Makefile]
[wminput/plugins/Makefile]
[wminput/plugins/ir_ptr/Makefile]
[wminput/plugins/acc/Makefile]
[wminput/plugins/nunchuk_acc/Makefile]
)
Something went wrong with that request. Please try again.