# -*-m4-*- Process this file with autoconf to produce a configure script. ###################################################################### # # General system tests required for building platform independent # stuff. # # AC_INIT([Bubbling Load Monitor], 2.0.7, bubblemon-list@nongnu.org, bubblemon) AC_CONFIG_SRCDIR(src/bubblemon.h) AM_INIT_AUTOMAKE([1.5]) AC_PREREQ(2.61) AM_CONFIG_HEADER(config.h) AC_PROG_INTLTOOL([0.35]) AC_PROG_CC AM_PROG_CC_STDC AC_ISC_POSIX AC_HEADER_STDC # Find some more or less non-standard data types AC_CHECK_TYPE(u_int32_t, unsigned int) AC_CHECK_TYPE(u_int16_t, unsigned short int) AC_CHECK_TYPE(u_int8_t, unsigned char) # Find out whether we are on a big-endian system AC_C_BIGENDIAN # For i18n and l10n ALL_LINGUAS="sv fr pl de ko fi da sh pt ro es no hu it is ru ca pt_BR" # Check if the user wants all languages to be compiled AC_ARG_WITH( all-linguas, [ --with-all-linguas Compile support for all avaliable languages], all_linguas=yes) if test "x$all_linguas" = "xyes"; then LINGUAS=$ALL_LINGUAS fi AC_MSG_CHECKING(what languages to include) AC_MSG_RESULT($LINGUAS) GETTEXT_PACKAGE=bubblemon AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext wants to know...]) AC_SUBST(GETTEXT_PACKAGE) # For i18n and l10n (continued) AM_GNU_GETTEXT([external]) # Where do we put locale information? if test "x$prefix" = "xNONE"; then LOCALEDIR=$ac_default_prefix/share/locale else LOCALEDIR=$prefix/share/locale fi AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Where language files get installed]) ###################################################################### # # Bubblemon specific tests # # # Check if the user wants to enable profiling AC_ARG_ENABLE( profiling, [ --enable-profiling Pass profiling options to the compiler], profiling=yes) if test "x$profiling" = "xyes"; then AC_MSG_CHECKING(what profiling flags to pass to the compiler) profilingFLAGS="-pg" CFLAGS="$CFLAGS $profilingFLAGS" AC_MSG_RESULT($profilingFLAGS) AC_DEFINE([ENABLE_PROFILING], [], [Build a bubblemon that bubbles a lot for a minute and then exits]) AC_MSG_WARN() AC_MSG_WARN(You have enabled profiling by specifying the --enable-profiling switch.) AC_MSG_WARN(Please don't install the applet the usual way; read the file PROFILING) AC_MSG_WARN(for instructions.) AC_MSG_WARN() fi ############################## # GNOME 2.x specific tests # Versions required LIBPANEL_REQUIRED=2.0.0 LIBGTOP_REQUIRED=2.0.0 # We need the panel for the applets build_gpanel=false; PKG_CHECK_MODULES(GNOME_APPLETS, [libpanelapplet-2.0 >= $LIBPANEL_REQUIRED], build_gpanel=true, AC_MSG_ERROR([GNOME2 panel not found.])) AC_SUBST(GNOME_APPLETS_CFLAGS) AC_SUBST(GNOME_APPLETS_LIBS) # Check for gtop2 libs build_gtop_applets=false PKG_CHECK_MODULES(GTOP_APPLETS, [libgtop-2.0 >= $LIBGTOP_REQUIRED], build_gtop_applets=true, AC_MSG_ERROR([libgtop not found.])) AC_SUBST(GTOP_APPLETS_CFLAGS) AC_SUBST(GTOP_APPLETS_LIBS) AM_CONDITIONAL(BUILD_GTOP_APPLETS, $build_gtop_applets) # The gnome2 panel is resizable AC_DEFINE([HAVE_CHANGE_PIXEL_SIZE], [], [Whether the GNOME Panel can change size]) ###################################################################### # # Output our test results # # AC_OUTPUT([ Makefile m4/Makefile po/Makefile.in po/Makefile src/Makefile gnome/Makefile pixmaps/Makefile packaging/Makefile packaging/bubblemon.spec man/Makefile man/bubblemon-gnome2.1 man/hu/Makefile man/hu/bubblemon-gnome2.1 man/sv/Makefile man/sv/bubblemon-gnome2.1 ])