2014-09-20 04:23:18 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2019-11-01 15:30:00 +00:00
|
|
|
AC_INIT([wmbattery], [2.54], [wmaker-dev@googlegroups.com])
|
2014-09-20 04:23:18 +00:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
|
|
|
AC_CONFIG_AUX_DIR(autoconf)
|
|
|
|
|
2014-10-05 15:30:05 +00:00
|
|
|
dnl Checks for the apm device other than /proc/apm.
|
|
|
|
AC_CHECK_FILES(/dev/apm)
|
|
|
|
|
2014-09-20 04:23:18 +00:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
dnl Locate X11.
|
|
|
|
AC_PATH_X
|
|
|
|
if test "x${no_x}" = "xyes"; then
|
|
|
|
AC_MSG_ERROR(Can't find X windows include files and libraries)
|
|
|
|
fi
|
|
|
|
if test "x${x_includes}" != "x"; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I`echo ${x_includes}`"
|
|
|
|
fi
|
|
|
|
if test "x${x_libraries}" != "x"; then
|
|
|
|
LIBS="$LIBS -L`echo ${x_libraries}`"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
2019-10-27 19:55:46 +00:00
|
|
|
PKG_CHECK_MODULES([Xlib], [x11])
|
|
|
|
PKG_CHECK_MODULES([Xext], [xext])
|
|
|
|
PKG_CHECK_MODULES([libXpm], [xpm])
|
2014-09-20 04:23:18 +00:00
|
|
|
AC_CHECK_LIB(apm, apm_read)
|
2019-10-28 22:06:38 +00:00
|
|
|
AC_ARG_ENABLE(hal, AS_HELP_STRING([--enable-hal], [enable hal]),
|
|
|
|
[], [enable_hal=no])
|
|
|
|
AS_IF([test x$enable_hal != xno], [
|
2019-10-28 22:06:39 +00:00
|
|
|
PKG_CHECK_MODULES([hal], [hal])
|
2019-10-28 22:06:38 +00:00
|
|
|
AC_SUBST(USE_HAL, 1)
|
|
|
|
])
|
|
|
|
AC_ARG_ENABLE(upower, AS_HELP_STRING([--disable-upower], [disable upower]),
|
|
|
|
[], [enable_upower=yes])
|
|
|
|
AS_IF([test x$enable_upower != xno], [
|
2019-10-28 22:06:39 +00:00
|
|
|
PKG_CHECK_MODULES([upower], [upower-glib])
|
2019-10-28 22:06:38 +00:00
|
|
|
AC_SUBST(USE_UPOWER, 1)
|
|
|
|
])
|
2020-05-02 03:19:55 +00:00
|
|
|
AC_ARG_ENABLE(envsys, AS_HELP_STRING([--enable-envsys], [enable envsys]),
|
|
|
|
[], [enable_envsys=no])
|
|
|
|
AS_IF([test x$enable_envsys != xno], [
|
|
|
|
AC_CHECK_HEADERS(sys/envsys.h)
|
|
|
|
AC_CHECK_HEADERS(prop/proplib.h)
|
|
|
|
AC_SUBST(USE_ENVSYS, 1)
|
|
|
|
])
|
2014-09-20 04:23:18 +00:00
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_CHECK_HEADERS(getopt.h)
|
2014-10-05 15:30:05 +00:00
|
|
|
dnl FreeBSD needs apm_bios.h
|
|
|
|
AC_CHECK_HEADERS(machine/apm_bios.h)
|
|
|
|
dnl NetBSD and OpenBSD need apmvar.h
|
|
|
|
AC_CHECK_HEADERS(i386/apmvar.h)
|
2014-09-20 04:23:18 +00:00
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS(strdup)
|
|
|
|
|
2019-10-27 19:55:42 +00:00
|
|
|
AC_OUTPUT(Makefile)
|