1 AC_INIT([wmhdplop], [0.9.12], [wmaker-dev@googlegroups.com])
2 AC_CONFIG_SRCDIR(wmhdplop.c)
4 AC_CONFIG_HEADERS([config.h])
8 ISODATE=`date +%Y-%m-%d`
17 AC_DEFINE(ENABLE_HDDTEMP_QUERY,[],[enable queries to hddtemp])
18 AC_DEFINE(_GNU_SOURCE,[],[uses GNU extensions])
21 if test x$GCC = xyes; then
22 CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W";
28 if test x$no_x = xyes; then
29 echo "You need to supply the path to the X headers and libraries with --x-includes=dir and --x-libraries=dir";
33 LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 -lXext ${LIBS} ${X_EXTRA_LIBS}"
34 CFLAGS="$CFLAGS $X_CFLAGS"
36 dnl Checks for library functions.
37 AC_CHECK_HEADERS(linux/hdreg.h)
39 PKG_CHECK_MODULES([IMLIB2], [imlib2])
41 YELLOW="\\033\\1331;33m"
44 dnl Checks for the gkrellm plugin
46 AC_ARG_ENABLE(gkrellm,
47 [ --enable-gkrellm build the gkrellm plugin (requires gtk2 and gkrellm developpement files) (Default is yes)
48 --disable-gkrellm do not build the gkrellm plugin],
49 [ if test "x$enableval" = "xno" ; then
51 echo you disabled the gkhdplop gkrellm plugin
53 ], [build_gkhdplop="yes"])
56 if test "x$build_gkhdplop" = "xno"; then
57 echo gkhdplop disabled...
59 echo building with GKHDPLOP, checking for gtk2..
60 pkg_modules="gtk+-2.0 >= 2.0.0"
61 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
62 GTK2_CFLAGS=$PACKAGE_CFLAGS;
63 GTK2_LIBS=$PACKAGE_LIBS;
66 SAVECPPFLAGS="$CPPFLAGS"
67 CPPFLAGS="$CFLAGS $GTK2_CFLAGS"
68 AC_CHECK_HEADERS([gkrellm2/gkrellm.h], [ok=1], [ok=0])
69 if test "x$ok" = "x0"; then
70 echo -e "${YELLOW}gkrellm2/gkrellm.h header not found or unusable${RESET}... cannot build gkhdplop.so"
73 GKHDPLOP="gkhdplop.so"
75 CPPFLAGS="$SAVECPPFLAGS"
80 AC_CONFIG_FILES([Makefile])
83 echo "- - - - - - - - - - - - - - - -"
84 echo -e "${YELLOW}wmhdplop will be built${RESET}"
85 if test "x$build_gkhdplop" = "xno"; then
86 echo -e "${YELLOW}gkhdplop.so will NOT be built${RESET}"
88 echo -e "${YELLOW}gkhdplop.so will be built${RESET}"
89 echo "Check that the plugin is working properly before installing it with:"
90 echo " gkrellm -p ./gkhdplop.so"
91 echo "and then install the gkrellm plugin with:"
92 echo " mv ./gkhdplop.so ~/.gkrellm2/plugins"