AC_PREREQ(2.60) AC_INIT(gnome-system-tools, 2.30.0, http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-system-tools) AC_CONFIG_SRCDIR(src/common/gst-tool.c) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) IT_PROG_INTLTOOL([0.35.0]) AM_CONFIG_HEADER(config.h) GNOME_DOC_INIT AM_MAINTAINER_MODE dnl Checking the above AC_CONFIG_SRCDIR(src/common/gst-tool.c) AM_PROG_LIBTOOL AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC AC_PROG_INSTALL AC_PROG_MAKE_SET dnl glib-genmarshal AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) STB_REQUIRED=2.9.4 LIBOOBS_REQUIRED=2.29.91 GTK_REQUIRED=2.16 GLIB_REQUIRED=2.15.2 GCONF_REQUIRED=2.2.0 DBUS_REQUIRED=0.32 POLICYKIT_GTK_REQUIRED=0.92 dnl ===================================================== dnl Cracklib checking dnl ===================================================== dnl AC_CHECK_LIB(crack, FascistCheck, ,[ dnl AC_MSG_WARN() dnl AC_MSG_WARN(---------- Building without cracklib is not recommended. ----------) dnl AC_MSG_WARN() dnl AC_MSG_WARN(-- If you are looking for cracklib you can try :) dnl AC_MSG_WARN(-- http://www.users.dircon.co.uk/~crypto/) dnl AC_MSG_WARN(-- or :) dnl AC_MSG_WARN(-- http://www.rpmfind.net/linux/rpm2html/search.php?query=cracklib) dnl AC_MSG_WARN(-- or :) dnl AC_MSG_WARN(-- apt-get install cracklib2-dev) dnl AC_MSG_WARN()]) dnl if test x"$HAVE_LIBCRACK" = xyes ; then dnl AC_CHECK_HEADER(crack.h, ,[ dnl AC_MSG_ERROR(cracklib crack.h header file not found.)]) dnl fi dnl GST_CRACK_LIB_LOCATION="/usr/lib/" dnl AC_ARG_WITH(cracklib-dict, dnl [ --with-cracklib-dict[=DIR] specify a cracklib dir ],[ dnl if test "$withval" != "no"; then dnl GST_CRACK_LIB_LOCATION=$withval dnl fi dnl ]) dnl AC_SUBST(GST_CRACK_LIB_LOCATION) dnl GST_CRACK_LIB_CFLAGS="-DGST_CRACK_LIB_DICT_PATH=\"\\\"\$(GST_CRACK_LIB_LOCATION)\\\"\"" dnl AC_SUBST(GST_CRACK_LIB_CFLAGS) dnl ===================================================== dnl END: Cracklib checking dnl ===================================================== dnl ===================================================== dnl Check for Module versions dnl ===================================================== PKG_CHECK_MODULES(GST_DEPENDS,[ gtk+-2.0 >= $GTK_REQUIRED gmodule-export-2.0 pango gconf-2.0 >= $GCONF_REQUIRED liboobs-1 >= $LIBOOBS_REQUIRED system-tools-backends-2.0 >= $STB_REQUIRED ]) PKG_CHECK_MODULES(DBUS,[ dbus-1 >= $DBUS_REQUIRED ]) DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_API_SUBJECT_TO_CHANGE" AC_SUBST(DBUS_LIBS) AC_SUBST(DBUS_CFLAGS) dnl PolicyKit-GTK support have_polkit=no AC_ARG_ENABLE(polkit-gtk, AS_HELP_STRING([--enable-polkit-gtk],[Enable PolicyKit support using polkit-gtk (default yes)]), [], [enable_polkit_gtk=yes]) if test "x$enable_polkit_gtk" = "xyes"; then PKG_CHECK_MODULES(POLKIT_GTK,[polkit-gtk-1 >= $POLICYKIT_GTK_REQUIRED], have_polkit=yes) if test "$have_polkit" = "yes"; then AC_DEFINE(HAVE_POLKIT, [1], [whether polkit-gtk was found]) else AC_MSG_ERROR([PolicyKit support requested but polkit-gtk not found]) fi fi AC_SUBST(POLKIT_LIBS) AC_SUBST(POLKIT_CFLAGS) AM_CONDITIONAL(HAVE_POLKIT, test x$have_polkit = xyes) dnl ===================================================== dnl END: Check for Module versions dnl ===================================================== dnl ===================================================== dnl Check for GST Modules to build dnl ===================================================== AC_ARG_ENABLE(network, [ --enable-network Enable build network module (default yes)], , enable_network=yes) AC_ARG_ENABLE(services, [ --enable-services Enable build services module (default yes)], , enable_services=yes) AC_ARG_ENABLE(time, [ --enable-time Enable build time module (default yes)], , enable_time=yes) AC_ARG_ENABLE(users, [ --enable-users Enable build users module (default yes)], , enable_users=yes) AC_ARG_ENABLE(shares, [ --enable-shares Enable build shares module (default yes)], , enable_shares=yes) AC_ARG_ENABLE(nautilus, [ --enable-nautilus Enable build nautilus shares module (default yes)], , enable_nautilus=yes) AM_CONDITIONAL(BUILD_NETWORK, test x$enable_network = xyes) AM_CONDITIONAL(BUILD_SERVICES, test x$enable_services = xyes) AM_CONDITIONAL(BUILD_TIME, test x$enable_time = xyes) AM_CONDITIONAL(BUILD_USERS, test x$enable_users = xyes) AM_CONDITIONAL(BUILD_SHARES, test x$enable_shares = xyes) AM_CONDITIONAL(BUILD_NAUTILUS, test x$enable_nautilus = xyes) dnl ===================================================== dnl END: Check for GST Modules to build dnl ===================================================== dnl ======================================================== dnl Translations dnl ======================================================== GETTEXT_PACKAGE=gnome-system-tools AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package name]) AM_GLIB_GNU_GETTEXT # AM_GNOME_GETTEXT above substs $DATADIRNAME # this is the directory where the *.{mo,gmo} files are installed gnomelocaledir='${prefix}/${DATADIRNAME}/locale' AC_SUBST(gnomelocaledir) dnl ======================================================== dnl END : Translations dnl ======================================================== dnl ===================================================== dnl GCONF dnl ===================================================== AC_PATH_PROG(GCONFTOOL, gconftool-2, no) if test x"$GCONFTOOL" = xno; then AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) fi AM_GCONF_SOURCE_2 dnl ===================================================== dnl END: GCONF dnl ===================================================== dnl ===================================================== dnl GST_LIBS & GST_CFLAGS dnl ===================================================== #### gcc warning flags (taken from PolicyKit-gnome) if test "x$GCC" = "xyes"; then changequote(,)dnl case " $CFLAGS " in *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall" ;; esac case " $CFLAGS " in *[\ \ ]-Wchar-subscripts[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wchar-subscripts" ;; esac case " $CFLAGS " in *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; esac case " $CFLAGS " in *[\ \ ]-Wnested-externs[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wnested-externs" ;; esac case " $CFLAGS " in *[\ \ ]-Wpointer-arith[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wpointer-arith" ;; esac case " $CFLAGS " in *[\ \ ]-Wcast-align[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wcast-align" ;; esac case " $CFLAGS " in *[\ \ ]-Wsign-compare[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wsign-compare" ;; esac case " $CFLAGS " in *[\ \ ]-Wformat[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wformat" ;; esac case " $CFLAGS " in *[\ \ ]-Wformat-security[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wformat-security" ;; esac changequote([,])dnl fi dnl GST_DEPRECATED_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED" GST_DEPRECATED_FLAGS="" GST_LIBS="$GST_DEPENDS_LIBS $POLKIT_GTK_LIBS" GST_CFLAGS="$GST_DEPENDS_CFLAGS $POLKIT_GTK_CFLAGS $GST_DEPRECATED_FLAGS" GST_TOOL_LIBS="\$(top_builddir)/src/common/libsetuptool.a $GST_LIBS" GST_TOOL_CFLAGS="-I\$(top_srcdir)/src/common $GST_CFLAGS" GST_TOOL_CLEANFILES="\$(desktop) \$(desktop).in" GST_TOOL_EXTRA_DIST="\$(toolpixmaps) \$(desktop).in.in" GST_TOOL_DEPENDENCIES="\$(top_builddir)/src/common/libsetuptool.a" AC_SUBST(GST_LIBS) AC_SUBST(GST_CFLAGS) AC_SUBST(GST_TOOL_LIBS) AC_SUBST(GST_TOOL_CFLAGS) AC_SUBST(GST_TOOL_CLEANFILES) AC_SUBST(GST_TOOL_EXTRA_DIST) AC_SUBST(GST_TOOL_DEPENDENCIES) dnl ================================== dnl END: GST_LIBS & GST_FLAGS dnl ================================== dnl ================================== dnl GIO dnl ================================== PKG_CHECK_MODULES(GIO,[ gio-2.0 >= $GLIB_REQUIRED ]) AC_SUBST(GIO_LIBS) AC_SUBST(GIO_CFLAGS) dnl ================================== dnl END: GIO dnl ================================== dnl ================================== dnl LIBIW DETECTION dnl ================================== GST_IW_LIBS= AC_CHECK_HEADER(iwlib.h, [ enable_libiw=yes AC_DEFINE(HAVE_LIBIW_H, "", [whether libiw is available]) AC_HAVE_LIBRARY(iw, [GST_IW_LIBS="-liw"]) ]) AM_CONDITIONAL(HAVE_LIBIW_H, test x$enable_libiw = xyes) AC_SUBST(GST_IW_LIBS) dnl ================================== dnl END: LIBIW DETECTION dnl ================================== dnl =========================== dnl NAUTILUS EXTENSION dnl =========================== if test "x$enable_nautilus" = "xyes"; then PKG_CHECK_MODULES(NAUTILUS,[ libnautilus-extension >= 2.9.3 liboobs-1 >= $LIBOOBS_REQUIRED gio-2.0 >= $GLIB_REQUIRED ]) fi AC_SUBST(NAUTILUS_LIBS) AC_SUBST(NAUTILUS_CFLAGS) dnl Determine the install dir for nautilus extension. NAUTILUSDIR=`pkg-config --variable=extensiondir libnautilus-extension` AC_SUBST(NAUTILUSDIR) dnl =========================== dnl END: NAUTILUS EXTENSION dnl =========================== AC_OUTPUT([ Makefile doc/Makefile doc/network/Makefile doc/services/Makefile doc/services/nl/Makefile doc/shares/Makefile doc/time/Makefile doc/time/nl/Makefile doc/users/Makefile icons/Makefile icons/16x16/Makefile icons/16x16/apps/Makefile icons/22x22/Makefile icons/22x22/apps/Makefile icons/24x24/Makefile icons/24x24/apps/Makefile icons/32x32/Makefile icons/32x32/apps/Makefile icons/48x48/Makefile icons/48x48/apps/Makefile icons/48x48/devices/Makefile icons/scalable/Makefile icons/scalable/apps/Makefile interfaces/Makefile pixmaps/Makefile src/Makefile src/common/Makefile src/users/users.desktop.in src/users/Makefile src/network/network.desktop.in src/network/Makefile src/time/time.desktop.in src/time/Makefile src/time/e-map/Makefile src/services/services.desktop.in src/services/Makefile src/shares/shares.desktop.in src/shares/Makefile src/shares/nautilus/Makefile po/Makefile.in gnome-system-tools.pc ]) echo " Configuration (GST): Services tool: ${enable_services} Users tool: ${enable_users} Network tool: ${enable_network} Time tool: ${enable_time} Shares tool: ${enable_shares} Nautilus support: ${enable_nautilus} Use PolKit-GTK: ${have_polkit} Compiler: ${CC} "