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
|
#
# XWiimote - configure
# Written by David Herrmann, 2011
# Dedicated to the Public Domain
#
AC_PREREQ(2.68)
AC_INIT([xwiimote],
[2],
[http://github.com/dvdhrm/xwiimote/issues],
[xwiimote],
[http://dvdhrm.github.io/xwiimote])
AC_CONFIG_SRCDIR([lib/xwiimote.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(config.h)
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-xz no-dist-gzip tar-pax -Wall -Werror -Wno-portability])
AM_SILENT_RULES([yes])
# Don't add a default "-g -O2" if CFLAGS wasn't specified
: ${CFLAGS=""}
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_PREREQ(2.2)
LT_INIT
PKG_CHECK_MODULES([UDEV], [libudev])
AC_SUBST(UDEV_CFLAGS)
AC_SUBST(UDEV_LIBS)
PKG_CHECK_MODULES([NCURSES], [ncurses])
AC_SUBST(NCURSES_CFLAGS)
AC_SUBST(NCURSES_LIBS)
AC_MSG_CHECKING([whether to build with debugging on])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [whether to build with debugging on)])],
[debug="$enableval"],
[debug=no; AC_DEFINE([NDEBUG], [1], [No Debug])])
AM_CONDITIONAL([DEBUG], [test x$debug = xyes])
AC_MSG_RESULT([$debug])
#
# Check for doxygen
#
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
AC_ARG_WITH(doxygen,
AS_HELP_STRING([--with-doxygen],
[Use doxygen to generate documentation]),
[use_doxygen=$withval],
[use_doxygen=auto])
have_doxygen=no
if test ! "x$use_doxygen" = "xno" ; then
AC_PATH_PROG([DOXYGEN], [doxygen])
if test "x$DOXYGEN" = "x" ; then
if test "x$use_doxygen" = "xyes" ; then
AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
fi
else
have_doxygen=yes
fi
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
#
# Write configuration
#
AC_CONFIG_FILES([Makefile libxwiimote.pc doc/Doxyfile])
AC_OUTPUT
AC_MSG_NOTICE([Build configuration:
prefix: $prefix
exec-prefix: $exec_prefix
libdir: $libdir
includedir: $includedir
debug: $debug
doxygen: $have_doxygen
Run "${MAKE-make}" to start compilation process])
|