AC_PREREQ(2.61)
AC_INIT(src/acpitool.cpp)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(acpitool, 0.5)

AC_CANONICAL_HOST

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)

# Checks for libraries.

# Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_HEADERS([unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_CHECK_FUNCS([strdup memset strtol])

AC_PROG_INSTALL

AC_OUTPUT(Makefile src/Makefile man/Makefile)

echo
echo " +-----------------------------------------------------------------------------------+"
echo " | Run make && make install when the configure script has finished without problems. |"
echo " +-----------------------------------------------------------------------------------+"
echo

