wmclockmon: update change-log
[dockapps.git] / wmhdplop / configure.ac
blob52531384b7c82e3b9d26cc55d0d810202b924892
1 AC_INIT([wmhdplop], [0.9.12], [wmaker-dev@googlegroups.com])
2 AC_CONFIG_SRCDIR(wmhdplop.c)
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_HEADERS([config.h])
6 AC_SUBST(VERSION)
8 ISODATE=`date +%Y-%m-%d`
9 AC_SUBST(ISODATE)
11 AC_CANONICAL_HOST
13 AC_PROG_INSTALL
14 AC_PROG_CC
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";
25 dnl check for X
26 AC_PATH_X
27 AC_PATH_XTRA
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";
30   exit 1;
31 fi;
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"
42 RESET="\\033\\1330m"
44 dnl Checks for the gkrellm plugin
45 build_gkhdplop="yes"
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
50         build_gkhdplop="no"
51         echo you disabled the gkhdplop gkrellm plugin
52    fi
53  ], [build_gkhdplop="yes"])
55 GKHDPLOP=""
56 if test "x$build_gkhdplop" = "xno"; then
57   echo gkhdplop disabled...
58 else
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;
64   AC_SUBST(GTK2_CFLAGS)
65   AC_SUBST(GTK2_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"
71      build_gkhdplop="no"
72   else
73     GKHDPLOP="gkhdplop.so"
74   fi
75   CPPFLAGS="$SAVECPPFLAGS"
77 AC_SUBST(GKHDPLOP)
80 AC_CONFIG_FILES([Makefile])
81 AC_OUTPUT
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}"
87 else
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"