AC_INIT([gchempaint], [0.8.5], [http://savannah.nongnu.org/bugs/?group=gchempaint]) AC_CONFIG_SRCDIR(src/main.cc) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE AC_CANONICAL_HOST AM_CONFIG_HEADER(gchempaint-config.h) GCP_VERSION_INFO=`echo $VERSION|awk -F . '{ print $1+$2":"$3":"$2 }'` AC_SUBST(GCP_VERSION_INFO) AC_SUBST(CXXFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_DISABLE_STATIC AC_ISC_POSIX AC_PROG_CXX AC_HEADER_STDC AC_PROG_LIBTOOL GNOME_DOC_INIT PKG_PROG_PKG_CONFIG AC_CHECK_PROG(WHICH, which, yes) if test -z "$WHICH";then AC_MSG_FAILURE(The "which" utility is required by GChemPaint) fi GETTEXT_PACKAGE=AC_PACKAGE_NAME AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[Package name for internationalization]) AM_GLIB_GNU_GETTEXT IT_PROG_INTLTOOL([0.35.0]) AC_ARG_ENABLE( [update-databases], AC_HELP_STRING( [--enable-update-databases], [ enable (or disable) the running of the update-desktop-database and update-mime-database utilities (mostly useful for package maintainers) @<:@default=yes@:>@ ] ), [ if test "x$enableval" != "xno"; then AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no]) AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no]) else UPDATE_DESKTOP_DATABASE=no UPDATE_MIME_DATABASE=no fi ], [ AC_PATH_PROG([UPDATE_DESKTOP_DATABASE], [update-desktop-database], [no]) AC_PATH_PROG([UPDATE_MIME_DATABASE], [update-mime-database], [no]) ] ) AM_CONDITIONAL([WITH_UPDATE_MIME], [test "x$UPDATE_MIME_DATABASE" != "xno"]) AM_CONDITIONAL([WITH_UPDATE_DESKTOP], [test "x$UPDATE_DESKTOP_DATABASE" != "xno"]) dnl install desktop files for kde if needed AC_ARG_WITH( [kde-mime-dir], AC_HELP_STRING( [--with-kde-mime-dir], [ path to KDE's directory containing MIME .desktop files (automatically detected via kde-config) @<:@default=auto or ${datadir}/mimelnk@:>@ ] ), [KDEMIMEDIR=$withval], [ AC_PATH_PROG([KDECONFIG], [kde-config], [no]) if test "x$KDECONFIG" != "xno"; then KDEMIMEDIR="`$KDECONFIG --install mime`" else KDEMIMEDIR="${datadir}/mimelnk" fi ] ) AC_MSG_CHECKING([for KDE MIME files (.desktop) installation location]) AC_MSG_RESULT([$KDEMIMEDIR]) AM_CONDITIONAL([WITH_KDE_MIME], [test "x$KDEMIMEDIR" != "xno"]) AC_SUBST(KDEMIMEDIR) 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 LIBGLADE_REQUIRED_VERSION=2.4.0 GTK_REQUIRED_VERSION=2.8.0 LIBGNOMEUI_REQUIRED_VERSION=2.6.0 GNOME_VFS_MODULE_VERSION=2.6.0 GNOME_PRINT_REQUIRED_VERSION=2.6.0 GNOME_CHEMISTRY_UTILS_REQUIRED_VERSION=0.8.0 SHARED_MIME_INFO_REQUIRED_VERSION=0.12 REQUIREMENTS="\ gtk+-2.0 >= $GTK_REQUIRED_VERSION \ libglade-2.0 >= $LIBGLADE_REQUIRED_VERSION \ libgnomeprintui-2.2 >= $GNOME_PRINT_REQUIRED_VERSION \ libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED_VERSION \ gnome-vfs-module-2.0 >= $GNOME_VFS_MODULE_VERSION \ gcu >= $GNOME_CHEMISTRY_UTILS_REQUIRED_VERSION" if test "$update_databases" = "yes"; then REQUIREMENTS="$REQUIREMENTS shared-mime-info >= $SHARED_MIME_INFO_REQUIRED_VERSION"; fi PKG_CHECK_MODULES([GCP], [$REQUIREMENTS]) GCP_CFLAGS="$GCP_CFLAGS -Wall" AC_SUBST(GCP_CFLAGS) AC_SUBST(GCP_LIBS) AC_ARG_WITH( [goffice-plugins-dir], AC_HELP_STRING( [--with-goffice-plugins-dir], [path to GOffice plugins directory @<:@default=auto@:>@] ), [GOFFICE_PLUGINS_DIR=$withval], [GOFFICE_PLUGINS_DIR=`$PKG_CONFIG --variable=GOffice_plugins_dir libgoffice-0.4`] ) AC_SUBST(GOFFICE_PLUGINS_DIR) AC_CHECK_LIB(gnomeprint-2-2, gnome_print_pango_layout, [gp_has_pango=yes], [gp_has_pango=no]) if test $gp_has_pango = yes; then AC_DEFINE_UNQUOTED(GP_HAS_PANGO, 1, [libgnomeprint-2.2 has gnome_print_pango_layout]) need_pango_print=no else need_pango_print=yes fi AM_CONDITIONAL(NEED_PANGO_PRINT, test $need_pango_print = yes) AC_ARG_VAR([GDK_PIXBUF_CSOURCE], [The gdk-pixbuf-csource executable.]) AC_PATH_PROG([GDK_PIXBUF_CSOURCE], [gdk-pixbuf-csource], [no]) if test "x$GDK_PIXBUF_CSOURCE" = "xno"; then AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK 2.0]) fi AC_LANG(C++) AC_MSG_CHECKING([for std::vector::data usability]) AC_TRY_COMPILE( [#include ], [std::vector v; int *x=v.data();], [ AC_DEFINE([HAVE_VECTOR_DATA], [1], [Define to 1 if std::vector::data can be used.]) AC_MSG_RESULT([yes]) ], [AC_MSG_RESULT([no])] ) AC_OUTPUT([ Makefile libgcpcanvas/Makefile lib/Makefile src/Makefile po/Makefile.in help/Makefile plugins/Makefile plugins/selection/Makefile plugins/templates/Makefile plugins/atoms/Makefile plugins/bonds/Makefile plugins/cycles/Makefile plugins/arrows/Makefile plugins/text/Makefile goffice/Makefile templates/Makefile themes/Makefile ui/Makefile ])