1 AC_INIT(wmhdplop, 0.9.11)
2 AC_CONFIG_SRCDIR(wmhdplop.c)
4 AM_CONFIG_HEADER(config.h)
8 ISODATE=`date +%Y-%m-%d`
18 AC_DEFINE(ENABLE_HDDTEMP_QUERY,[],[enable queries to hddtemp])
19 AC_DEFINE(_GNU_SOURCE,[],[uses GNU extensions])
22 if test x$GCC = xyes; then
23 CFLAGS="-O3 -fomit-frame-pointer -ffast-math -Wall -W";
29 if test x$no_x = xyes; then
30 echo "You need to supply the path to the X headers and libraries with --x-includes=dir and --x-libraries=dir";
34 LIBS="${X_PRE_LIBS} ${X_LIBS} -lX11 -lXext ${LIBS} ${X_EXTRA_LIBS}"
35 CFLAGS="$CFLAGS $X_CFLAGS"
37 dnl Checks for library functions.
38 AC_CHECK_HEADERS(linux/hdreg.h)
40 AC_CHECK_PROG([IMLIB2_CONFIG_IN_PATH],[imlib2-config],[yes],[no])
41 if test "x$IMLIB2_CONFIG_IN_PATH" = "xno"; then
42 AC_ERROR([imlib2-config not found in PATH.. You need to install Imlib2 (and its developpement package)])
44 IMLIB2_CFLAGS=$(imlib2-config --cflags)
45 IMLIB2_LIBS=$(imlib2-config --libs)
46 AC_SUBST(IMLIB2_CFLAGS)
49 YELLOW="\\033\\1331;33m"
52 dnl Checks for the gkrellm plugin
54 AC_ARG_ENABLE(gkrellm,
55 [ --enable-gkrellm build the gkrellm plugin (requires gtk2 and gkrellm developpement files) (Default is yes)
56 --disable-gkrellm do not build the gkrellm plugin],
57 [ if test "x$enableval" = "xno" ; then
59 echo you disabled the gkhdplop gkrellm plugin
61 ], [build_gkhdplop="yes"])
64 if test "x$build_gkhdplop" = "xno"; then
65 echo gkhdplop disabled...
67 echo building with GKHDPLOP, checking for gtk2..
68 pkg_modules="gtk+-2.0 >= 2.0.0"
69 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
70 GTK2_CFLAGS=$PACKAGE_CFLAGS;
71 GTK2_LIBS=$PACKAGE_LIBS;
74 SAVECPPFLAGS="$CPPFLAGS"
75 CPPFLAGS="$CFLAGS $GTK2_CFLAGS"
76 AC_CHECK_HEADERS([gkrellm2/gkrellm.h], [ok=1], [ok=0])
77 if test "x$ok" = "x0"; then
78 echo -e "${YELLOW}gkrellm2/gkrellm.h header not found or unusable${RESET}... cannot build gkhdplop.so"
81 GKHDPLOP="gkhdplop.so"
83 CPPFLAGS="$SAVECPPFLAGS"
90 echo "- - - - - - - - - - - - - - - -"
91 echo -e "${YELLOW}wmhdplop will be built${RESET}"
92 if test "x$build_gkhdplop" = "xno"; then
93 echo -e "${YELLOW}gkhdplop.so will NOT be built${RESET}"
95 echo -e "${YELLOW}gkhdplop.so will be built${RESET}"
96 echo "Check that the plugin is working properly before installing it with:"
97 echo " gkrellm -p ./gkhdplop.so"
98 echo "and then install the gkrellm plugin with:"
99 echo " mv ./gkhdplop.so ~/.gkrellm2/plugins"