1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([wmbattery], [2.54], [wmaker-dev@googlegroups.com])
3 AC_CONFIG_HEADER(config.h)
4 AC_CONFIG_AUX_DIR(autoconf)
6 dnl Checks for the apm device other than /proc/apm.
7 AC_CHECK_FILES(/dev/apm)
9 dnl Checks for programs.
15 if test "x${no_x}" = "xyes"; then
16 AC_MSG_ERROR(Can't find X windows include files and libraries)
18 if test "x${x_includes}" != "x"; then
19 CPPFLAGS="$CPPFLAGS -I`echo ${x_includes}`"
21 if test "x${x_libraries}" != "x"; then
22 LIBS="$LIBS -L`echo ${x_libraries}`"
25 dnl Checks for libraries.
26 PKG_CHECK_MODULES([Xlib], [x11])
27 PKG_CHECK_MODULES([Xext], [xext])
28 PKG_CHECK_MODULES([libXpm], [xpm])
29 AC_CHECK_LIB(apm, apm_read)
30 AC_ARG_ENABLE(hal, AS_HELP_STRING([--enable-hal], [enable hal]),
32 AS_IF([test x$enable_hal != xno], [
33 PKG_CHECK_MODULES([hal], [hal])
36 AC_ARG_ENABLE(upower, AS_HELP_STRING([--disable-upower], [disable upower]),
37 [], [enable_upower=yes])
38 AS_IF([test x$enable_upower != xno], [
39 PKG_CHECK_MODULES([upower], [upower-glib])
40 AC_SUBST(USE_UPOWER, 1)
43 dnl Checks for header files.
45 AC_CHECK_HEADERS(getopt.h)
46 dnl FreeBSD needs apm_bios.h
47 AC_CHECK_HEADERS(machine/apm_bios.h)
48 dnl NetBSD and OpenBSD need apmvar.h
49 AC_CHECK_HEADERS(i386/apmvar.h)
51 dnl Checks for typedefs, structures, and compiler characteristics.
54 dnl Checks for library functions.
55 AC_PROG_GCC_TRADITIONAL
57 AC_CHECK_FUNCS(strdup)