blob: 3c6ed36d3447e47fd032e3b1d0c6f24ad6392fcd [file] [log] [blame]
AC_PREREQ([2.71])
AC_INIT([libpwm],[1.0-rc1],[linux-pwm@vger.kernel.org])
AC_CONFIG_SRCDIR([sysfs.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_USE_SYSTEM_EXTENSIONS
# support LFS
AC_SYS_LARGEFILE
AM_MAINTAINER_MODE
AM_INIT_AUTOMAKE([foreign])
LT_CURRENT=0
LT_REVISION=0
LT_AGE=0
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
#
# Checks for programs.
#
AC_PROG_CC
LT_INIT
have_usable_linux_pwm_h=yes
AC_CHECK_HEADER([linux/pwm.h], [
AC_CHECK_DECL([PWM_IOCTL_SETROUNDEDWF],, [have_usable_linux_pwm_h=no], [#include <linux/pwm.h>])
], [have_usable_linux_pwm_h=no])
AC_MSG_CHECKING([if system has a usable <linux/pwm.h>])
AS_IF(test "x$have_usable_linux_pwm_h" = "xyes", [
AC_DEFINE([HAVE_USABLE_LINUX_PWM_H], [1], [Define to 1 if the character device backend should be built])
AC_MSG_RESULT([yes])
], [AC_MSG_RESULT([no])])
AC_CONFIG_FILES([
Makefile
libpwm.pc
])
AC_OUTPUT