configure.ac 4.37 KB
Newer Older
1 2 3
# Copyright (C) 2010-2012 Richard Hughes <richard@hughsie.com>
AC_PREREQ(2.63)

Richard Hughes's avatar
Richard Hughes committed
4
AC_INIT([gnome-software],[3.15.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-software])
5
AC_CONFIG_SRCDIR(src)
Matthias Clasen's avatar
Matthias Clasen committed
6
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar serial-tests])
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

# enable nice build output on automake1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_PROG_CC
AC_PROG_INSTALL
LT_INIT
AM_PROG_CC_C_O
IT_PROG_INTLTOOL([0.35.0])
#YELP_HELP_INIT

#GNOME_DOC_INIT

dnl ---------------------------------------------------------------------------
dnl - Extra verbose warning switches
dnl ---------------------------------------------------------------------------

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
GNOME_COMPILE_WARNINGS([maximum],[
	-Wmissing-declarations
	-Wcast-align
	-Wwrite-strings
	-Wreturn-type
	-Wformat-nonliteral
	-Wmissing-format-attribute
	-Wclobbered
	-Wempty-body
	-Wignored-qualifiers
	-Wsign-compare
	-Wtype-limits
	-Wuninitialized
	-Waggregate-return
	-Wdeclaration-after-statement
	-Wshadow
	-Wno-strict-aliasing
	-Winline
	-Wmissing-parameter-type
	-Woverride-init
])
47 48 49 50 51 52

dnl ---------------------------------------------------------------------------
dnl - gettext stuff
dnl ---------------------------------------------------------------------------
GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
Matthias Klumpp's avatar
Matthias Klumpp committed
53
AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [gnome-software])
54

55
AM_PATH_GLIB_2_0(2.39.1, :, AC_MSG_ERROR([GLib is required]), gobject gmodule gio)
56 57 58 59 60 61
AM_GLIB_GNU_GETTEXT
GLIB_GSETTINGS

dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
62
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.14.1 gio-unix-2.0)
63
PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2 >= 1.0.0)
64
PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.3.2)
65
PKG_CHECK_MODULES(SQLITE, sqlite3)
66
PKG_CHECK_MODULES(SOUP, libsoup-2.4)
67
PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.11.5)
68
PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0)
69 70 71 72 73
AC_ARG_ENABLE(man,
              [AS_HELP_STRING([--enable-man],
                              [generate man pages [default=auto]])],,
              enable_man=maybe)
AS_IF([test "$enable_man" != no], [
Matthias Clasen's avatar
Matthias Clasen committed
74 75
  AC_PATH_PROG([XSLTPROC], [xsltproc])
  AS_IF([test -z "$XSLTPROC"], [
76
    AS_IF([test "$enable_man" = yes], [
Matthias Clasen's avatar
Matthias Clasen committed
77
      AC_MSG_ERROR([xsltproc is required for --enable-man])
78 79 80 81 82
    ])
    enable_man=no
  ])
])
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
83

84 85 86 87 88 89
AC_ARG_ENABLE(dogtail,
              [AS_HELP_STRING([--enable-dogtail],
                              [test using dogtail [default=yes]])],,
              enable_dogtail=yes)
AM_CONDITIONAL(ENABLE_DOGTAIL, test "$enable_dogtail" != no)

90 91
# this refers to the gnome-software plugin API version
# this is not in any way related to a package or soname version
92
GS_PLUGIN_API_VERSION=7
93 94 95
AC_SUBST(GS_PLUGIN_API_VERSION)
AC_DEFINE_UNQUOTED([GS_PLUGIN_API_VERSION], "$GS_PLUGIN_API_VERSION", [the plugin API version])

Matthias Clasen's avatar
Matthias Clasen committed
96 97
GLIB_TESTS

98 99 100 101 102 103
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
po/Makefile.in
104
data/appdata/Makefile
Matthias Clasen's avatar
Matthias Clasen committed
105
data/featured.ini
Richard Hughes's avatar
Richard Hughes committed
106
data/Makefile
107
data/modulesets/Makefile
108
data/icons/Makefile
109 110 111 112 113 114 115 116
data/icons/hicolor/Makefile
data/icons/hicolor/16x16/Makefile
data/icons/hicolor/22x22/Makefile
data/icons/hicolor/24x24/Makefile
data/icons/hicolor/32x32/Makefile
data/icons/hicolor/48x48/Makefile
data/icons/hicolor/256x256/Makefile
data/icons/hicolor/scalable/Makefile
Kalev Lember's avatar
Kalev Lember committed
117 118 119 120 121 122 123
data/icons/HighContrast/Makefile
data/icons/HighContrast/16x16/Makefile
data/icons/HighContrast/22x22/Makefile
data/icons/HighContrast/24x24/Makefile
data/icons/HighContrast/32x32/Makefile
data/icons/HighContrast/48x48/Makefile
data/icons/HighContrast/256x256/Makefile
124
src/Makefile
125
src/plugins/Makefile
Matthias Clasen's avatar
Matthias Clasen committed
126
tests/Makefile
127 128 129 130 131 132
])
AC_OUTPUT

dnl ==========================================================================
echo "
                    gnome-software $VERSION
133
                  ==========================
134 135 136 137 138 139

        prefix:                    ${prefix}
        datadir:                   ${datadir}
        compiler:                  ${CC}
        cflags:                    ${CFLAGS}
        cppflags:                  ${CPPFLAGS}
140
        Dogtail:                   ${enable_dogtail}
141 142
"