m4_define(gnome_platform, 2) m4_define(gnome_minor, 32) m4_define(gnome_micro, 1) dnl gnome_sub is an optional sub-version which will not be advertised to the user dnl It allows to release a 2.30.1.1 which is just a better 2.30.1 dnl Leave empty if not needed m4_define(gnome_sub, ) m4_define(gnome_version, [gnome_platform.gnome_minor.gnome_micro]m4_ifval(gnome_sub, .gnome_sub)), AC_INIT([gnome-desktop], gnome_version, [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-desktop]) AC_CONFIG_SRCDIR([libgnome-desktop]) AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2 tar-ustar]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") # Before making a release, the LT_VERSION string should be modified. # The string is of the form C:R:A. # - If interfaces have been changed or added, but binary compatibility has # been preserved, change to C+1:0:A+1 # - If binary compatibility has been broken (eg removed or changed interfaces) # change to C+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A LT_VERSION=18:5:1 AC_SUBST(LT_VERSION) AM_MAINTAINER_MODE IT_PROG_INTLTOOL([0.40.0]) AC_ISC_POSIX AC_PROG_CC AC_STDC_HEADERS AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL PKG_PROG_PKG_CONFIG GNOME_PLATFORM=gnome_platform GNOME_MINOR=gnome_minor GNOME_MICRO=gnome_micro GNOME_DISTRIBUTOR="GNOME.Org" GNOME_DATE=`date +"%Y-%m-%d"` AC_ARG_WITH(gnome_distributor, [ --with-gnome-distributor=DISTRIBUTOR Specify name of GNOME distributor]) if test "x$with_gnome_distributor" != x ; then GNOME_DISTRIBUTOR=$with_gnome_distributor fi AC_ARG_ENABLE([date-in-gnome-version], [AS_HELP_STRING([--disable-date-in-gnome-version],[do not put the build date in gnome-version.xml])], [],[enable_date_in_gnome_version=yes]) if test "$enable_date_in_gnome_version" = "no"; then GNOME_DATE= GNOME_DATE_COMMENT_START="" else GNOME_DATE_COMMENT_START= GNOME_DATE_COMMENT_END= fi AC_SUBST(GNOME_PLATFORM) AC_SUBST(GNOME_MINOR) AC_SUBST(GNOME_MICRO) AC_SUBST(GNOME_DISTRIBUTOR) AC_SUBST(GNOME_DATE) AC_SUBST(GNOME_DATE_COMMENT_START) AC_SUBST(GNOME_DATE_COMMENT_END) GNOME_COMMON_INIT GNOME_DEBUG_CHECK GNOME_COMPILE_WARNINGS([maximum]) GNOME_MAINTAINER_MODE_DEFINES # As a special favour for vuntz, support --disable-deprecations AC_ARG_ENABLE([deprecations], [AS_HELP_STRING([--disable-deprecations],[don't warn about deprecated usages])], [],[enable_deprecations=yes]) if test "$enable_deprecations" = "no"; then DISABLE_DEPRECATED="" AC_SUBST([DISABLE_DEPRECATED]) fi # Should we build gnome-about or the shared desktop docs? Useful for people who # need to build two gnome-desktop using two different versions of GTK+ AC_ARG_ENABLE([gnome-about], [AS_HELP_STRING([--disable-gnome-about],[don't build gnome-about])], [],[enable_gnome_about=yes]) AM_CONDITIONAL(GNOME_ABOUT_ENABLED, test "x$enable_gnome_about" = "xyes") AC_ARG_ENABLE([desktop-docs], [AS_HELP_STRING([--disable-desktop-docs],[don't build desktop-wide help documents])], [],[enable_desktop_docs=yes]) AM_CONDITIONAL(DESKTOP_DOCS_ENABLED, test "x$enable_desktop_docs" = "xyes") # Path to the pnp.ids file -- to know if we use one shipped with another # package, or an internal file AC_ARG_WITH(pnp-ids-path, [AC_HELP_STRING([--with-pnp-ids-path], [Specify the path to pnp.ids @<:@default=(internal)@:>@])],, [with_pnp_ids_path="\${pnpdatadir}/pnp.ids"]) AM_CONDITIONAL(USE_INTERNAL_PNP_IDS, test "x$with_pnp_ids_path" = "x\${pnpdatadir}/pnp.ids") PNP_IDS=$with_pnp_ids_path AC_SUBST(PNP_IDS) if test "x$with_pnp_ids_path" = "x\${pnpdatadir}/pnp.ids"; then EXTERNAL_PNP_IDS="no (internal)" else EXTERNAL_PNP_IDS="$with_pnp_ids_path" fi dnl If you add a version number here, you *must* add an AC_SUBST line for dnl it too, or it will never make it into the spec file! GDK_PIXBUF_REQUIRED=2.4.0 GTK_REQUIRED=2.18.0 GLIB_REQUIRED=2.19.1 GCONF_REQUIRED=2.0.0 STARTUP_NOTIFICATION_REQUIRED=0.5 XRANDR_REQUIRED=1.2 AC_SUBST(GTK_REQUIRED) AC_SUBST(GLIB_REQUIRED) AC_SUBST(GDK_PIXBUF_REQUIRED) AC_SUBST(GCONF_REQUIRED) AC_SUBST(STARTUP_NOTIFICATION_REQUIRED) AC_SUBST(XRANDR_REQUIRED) AC_MSG_CHECKING(for libstartup-notification) if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_REQUIRED libstartup-notification-1.0; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if the startup-notification package is present]) have_startup_notification=yes STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0 else AC_MSG_RESULT(no) have_startup_notification=no STARTUP_NOTIFICATION_PACKAGE= fi AC_SUBST(STARTUP_NOTIFICATION_PACKAGE) dnl we need x11 for GnomeBG PKG_CHECK_MODULES(XLIB, x11, X11_PACKAGE=x11, [X11_PACKAGE= AC_PATH_XTRA if test "x$no_x" = xyes; then AC_MSG_ERROR("no (requires X development libraries)") else XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" XLIB_CFLAGS=$X_CFLAGS fi]) AC_SUBST(X11_PACKAGE) AC_SUBST(XLIB_CFLAGS) AC_SUBST(XLIB_LIBS) dnl Checks for X's RANDR extension AC_MSG_CHECKING(for xrandr) if $PKG_CONFIG --atleast-version $XRANDR_REQUIRED xrandr; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_RANDR, 1, [Define if the xrandr-$XRANDR_REQUIRED library is present]) have_randr=yes RANDR_PACKAGE=xrandr else AC_MSG_RESULT(no) have_randr=no RANDR_PACKAGE= fi AC_SUBST(RANDR_PACKAGE) dnl pkg-config dependency checks PKG_CHECK_MODULES(GNOME_DESKTOP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED $STARTUP_NOTIFICATION_PACKAGE $RANDR_PACKAGE) dnl for gnome-about AM_PATH_PYTHON dnl gnome-doc-utils stuff GNOME_DOC_INIT dnl Language Support GETTEXT_PACKAGE=gnome-desktop-2.0 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext translation domain]) AC_SUBST(GETTEXT_PACKAGE) AM_GLIB_GNU_GETTEXT dnl Don't use AC_PROG_AWK since we need the full pathname. AC_PATH_PROGS(AWK, mawk gawk nawk awk, ) AC_PATH_PROGS(PERL, perl5 perl) dnl define a MAINT-like variable REBUILD which is set if Perl dnl and awk are found, so autogenerated sources can be rebuilt AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes) REBUILD=\# if test "x$enable_rebuilds" = "xyes" && \ test -n "$PERL" && \ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \ test -n "$AWK" ; then REBUILD= fi AC_SUBST(REBUILD) # check for gtk-doc GTK_DOC_CHECK([1.4]) AC_CONFIG_FILES([ Makefile gnome-about/Makefile gnome-about/gnome-about.desktop.in gnome-about/headers/Makefile libgnome-desktop/Makefile libgnome-desktop/libgnome/Makefile libgnome-desktop/libgnomeui/Makefile libgnome-desktop/gnome-desktop-2.0.pc libgnome-desktop/gnome-desktop-2.0-uninstalled.pc docs/Makefile docs/reference/Makefile docs/reference/gnome-desktop/Makefile gnome-version.xml.in po/Makefile.in pixmaps/Makefile desktop-docs/Makefile desktop-docs/fdl/Makefile desktop-docs/gpl/Makefile desktop-docs/lgpl/Makefile man/Makefile ]) AC_OUTPUT dnl --------------------------------------------------------------------------- dnl - Show summary dnl --------------------------------------------------------------------------- echo " gnome-desktop $VERSION `echo gnome-desktop $VERSION | sed "s/./=/g"` prefix: ${prefix} exec_prefix: ${exec_prefix} libdir: ${libdir} bindir: ${bindir} sbindir: ${sbindir} sysconfdir: ${sysconfdir} localstatedir: ${localstatedir} datadir: ${datadir} source code location: ${srcdir} compiler: ${CC} cflags: ${CFLAGS} Maintainer mode: ${USE_MAINTAINER_MODE} Warn about deprecations: ${enable_deprecations} GNOME Distributor: ${GNOME_DISTRIBUTOR} Build gnome-about: ${enable_gnome_about} Build desktop-wide docs: ${enable_desktop_docs} Date in gnome-version.xml: ${enable_date_in_gnome_version} Use external pnp.ids: ${EXTERNAL_PNP_IDS} Startup notification support: ${have_startup_notification} XRandr support: ${have_randr} Build gtk-doc documentation: ${enable_gtk_doc} "