1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(wmbattery.c, 2.51)
3 AC_CONFIG_HEADER(config.h)
5 AC_CONFIG_AUX_DIR(autoconf)
7 dnl Checks for the apm device other than /proc/apm.
8 AC_CHECK_FILES(/dev/apm)
10 dnl Checks for programs.
16 if test "x${no_x}" = "xyes"; then
17 AC_MSG_ERROR(Can't find X windows include files and libraries)
19 if test "x${x_includes}" != "x"; then
20 CPPFLAGS="$CPPFLAGS -I`echo ${x_includes}`"
22 if test "x${x_libraries}" != "x"; then
23 LIBS="$LIBS -L`echo ${x_libraries}`"
26 dnl Checks for libraries.
27 AC_CHECK_LIB(X11, XOpenDisplay)
28 AC_CHECK_LIB(Xext, XShapeCombineMask)
29 AC_CHECK_LIB(Xpm, XpmReadFileToPixmap)
30 AC_CHECK_LIB(apm, apm_read)
32 dnl Checks for header files.
34 AC_CHECK_HEADERS(X11/xpm.h)
35 AC_CHECK_HEADERS(X11/extensions/shape.h)
36 AC_CHECK_HEADERS(getopt.h)
37 dnl FreeBSD needs apm_bios.h
38 AC_CHECK_HEADERS(machine/apm_bios.h)
39 dnl NetBSD and OpenBSD need apmvar.h
40 AC_CHECK_HEADERS(i386/apmvar.h)
42 dnl Checks for typedefs, structures, and compiler characteristics.
45 dnl Checks for library functions.
46 AC_PROG_GCC_TRADITIONAL
48 AC_CHECK_FUNCS(strdup)
50 AC_OUTPUT(makeinfo:autoconf/makeinfo.in)