configure.ac 6.45 KB
Newer Older
Matthias Clasen's avatar
Matthias Clasen committed
1 2 3 4 5 6 7
AC_PREREQ([2.69])


dnl ***********************************************************************
dnl Define Versioning Information
dnl ***********************************************************************
m4_define([major_version],[0])
Matthias Clasen's avatar
0.22.0  
Matthias Clasen committed
8 9
m4_define([minor_version],[22])
m4_define([micro_version],[0])
Matthias Clasen's avatar
Matthias Clasen committed
10 11 12 13 14 15 16 17 18
m4_define([package_version],[major_version.minor_version.micro_version])
m4_define([bug_report_url],[https://bugzilla.gnome.org/enter_bug.cgi?product=recipes])
m4_define([api_version],[major_version])

AX_IS_RELEASE([micro-version])

dnl ***********************************************************************
dnl Initialize autoconf
dnl ***********************************************************************
Matthias Clasen's avatar
Matthias Clasen committed
19
AC_INIT([gnome-recipes],[package_version],[bug_report_url])
Matthias Clasen's avatar
Matthias Clasen committed
20
AC_CONFIG_HEADERS([config.h])
Matthias Clasen's avatar
Matthias Clasen committed
21
AC_CONFIG_SRCDIR([configure.ac])
Matthias Clasen's avatar
Matthias Clasen committed
22
AC_CONFIG_AUX_DIR([build-aux])
Matthias Clasen's avatar
Matthias Clasen committed
23 24
AC_CONFIG_MACRO_DIRS([m4])
AC_SUBST([ACLOCAL_AMFLAGS], "-I m4 -I libgd")
Matthias Clasen's avatar
Matthias Clasen committed
25 26
AC_CANONICAL_HOST

27 28 29 30 31 32 33 34
dnl ***********************************************************************
dnl Add extra debugging with --enable-debug and --enable-compile-warnings
dnl ***********************************************************************
AX_CHECK_ENABLE_DEBUG([no],[]
                      [G_DISABLE_ASSERT G_DISABLE_CHECKS G_DISABLE_CAST_CHECKS])

AC_USE_SYSTEM_EXTENSIONS

Matthias Clasen's avatar
Matthias Clasen committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

dnl ***********************************************************************
dnl Make version information available to autoconf files
dnl ***********************************************************************
AC_SUBST([MAJOR_VERSION],major_version)
AC_SUBST([MINOR_VERSION],minor_version)
AC_SUBST([MICRO_VERSION],micro_version)
AC_SUBST([API_VERSION],api_version)


dnl ***********************************************************************
dnl Initialize automake
dnl ***********************************************************************
AM_SILENT_RULES([yes])
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability])
AM_MAINTAINER_MODE([enable])
AX_GENERATE_CHANGELOG


dnl ***********************************************************************
dnl Internationalization
dnl ***********************************************************************
GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name])

Matthias Clasen's avatar
Matthias Clasen committed
61
AM_GNU_GETTEXT_VERSION([0.19.7])
Matthias Clasen's avatar
Matthias Clasen committed
62 63 64 65 66 67 68 69 70 71 72 73
AM_GNU_GETTEXT([external])


dnl ***********************************************************************
dnl Check for required programs
dnl ***********************************************************************
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_SED
AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources])
Matthias Clasen's avatar
Matthias Clasen committed
74
AC_PATH_PROG([APPSTREAM_UTIL],[appstream-util])
Matthias Clasen's avatar
Matthias Clasen committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
PKG_PROG_PKG_CONFIG([0.22])
GLIB_GSETTINGS
GOBJECT_INTROSPECTION_CHECK([1.42.0])

VAPIGEN_CHECK



AX_COMPILER_FLAGS


dnl ***********************************************************************
dnl Ensure C11 is Supported
dnl ***********************************************************************
AX_CHECK_COMPILE_FLAG([-std=gnu11],
                      [CFLAGS="$CFLAGS -std=gnu11"],
                      [AC_MSG_ERROR([C compiler cannot compile GNU C11 code])])



95 96 97 98 99 100 101 102
dnl ***********************************************************************
dnl Build options
dnl ***********************************************************************
AC_ARG_ENABLE(gspell,
              [AS_HELP_STRING([--enable-gspell],
                              [Use gspell for spell-checking])],,
              [enable_gspell="yes"])

103
if test "x$enable_gspell" = xyes; then
104
        GSPELL_DEP=gspell-1
105 106 107 108
        AC_DEFINE([ENABLE_GSPELL], [1], [Define to 1 if gspell is used])
        GSPELL_VERSION="$($PKG_CONFIG --modversion gspell-1)"
        AC_SUBST([GSPELL_VERSION])
        AC_DEFINE_UNQUOTED([GSPELL_VERSION], ["${GSPELL_VERSION}"], [The version of gspell])
109 110
fi

111 112 113 114 115 116
AC_ARG_ENABLE(autoar,
              [AS_HELP_STRING([--enable-autoar],
                              [Use gnome-autoar for export/import support])],,
              [enable_autoar="yes"])
if test "x$enable_autoar" = xyes; then
        AUTOAR_DEP=gnome-autoar-0
117 118 119 120
        AC_DEFINE([ENABLE_AUTOAR], [1], [Define to 1 if gnome-autoar is used])
        AUTOAR_VERSION="$($PKG_CONFIG --modversion $AUTOAR_DEP)"
        AC_SUBST([AUTOAR_VERSION])
        AC_DEFINE_UNQUOTED([AUTOAR_VERSION], ["${AUTOAR_VERSION}"], [The version of gnome-autoar])
121 122 123
fi
AM_CONDITIONAL(USE_AUTOAR, test "x$enable_autoar" = xyes)

124 125 126 127 128 129 130 131 132 133 134
AC_ARG_ENABLE(canberra,
              [AS_HELP_STRING([--enable-canberra],
                              [Use libcanberra for sound support])],,
              [enable_canberra="yes"])
if test "x$enable_canberra" = xyes; then
        CANBERRA_DEP=libcanberra
        AC_DEFINE([ENABLE_CANBERRA], [1], [Define to 1 if libcanberra is used])
        CANBERRA_VERSION="$($PKG_CONFIG --modversion $CANBERRA_DEP)"
        AC_SUBST([CANBERRA_VERSION])
        AC_DEFINE_UNQUOTED([CANBERRA_VERSION], ["${CANBERRA_VERSION}"], [The version of libcanberra])
fi
135

Matthias Clasen's avatar
Matthias Clasen committed
136 137 138
dnl ***********************************************************************
dnl Check for required packages
dnl ***********************************************************************
139 140
PKG_CHECK_MODULES(RECIPES, [gmodule-2.0
                            gio-2.0 >= 2.42
Matthias Clasen's avatar
Matthias Clasen committed
141
                            gtk+-3.0 >= 3.22
142
                            $AUTOAR_DEP
143 144
                            $GSPELL_DEP
                            $CANBERRA_DEP])
Matthias Clasen's avatar
Matthias Clasen committed
145

Matthias Clasen's avatar
Matthias Clasen committed
146
LIBGD_INIT([tagged-entry static])
Matthias Clasen's avatar
Matthias Clasen committed
147

Matthias Clasen's avatar
Matthias Clasen committed
148 149 150 151 152 153 154 155 156 157 158 159
dnl ***********************************************************************
dnl Initialize Libtool
dnl ***********************************************************************
LT_PREREQ([2.2])
LT_INIT


dnl ***********************************************************************
dnl Process .in Files
dnl ***********************************************************************
AC_CONFIG_FILES([
	Makefile
Matthias Clasen's avatar
Matthias Clasen committed
160
        libgd/Makefile
Matthias Clasen's avatar
Matthias Clasen committed
161
	src/Makefile
162
	tools/Makefile
Matthias Clasen's avatar
Matthias Clasen committed
163
	data/Makefile
164
	tests/Makefile
Matthias Clasen's avatar
Matthias Clasen committed
165
	po/Makefile.in
166
	po-data/Makefile.in
Matthias Clasen's avatar
Matthias Clasen committed
167 168 169 170 171 172 173 174 175 176 177
],[],
[API_VERSION='$API_VERSION'])
AC_OUTPUT

echo ""
echo " ${PACKAGE} - ${VERSION}"
echo ""
echo " Options"
echo ""
echo "  Prefix ............................... : ${prefix}"
echo "  Libdir ............................... : ${libdir}"
178
echo "  Export/Import ........................ : ${enable_autoar}"
179
echo "  Spell checking ....................... : ${enable_gspell}"
180
echo "  Sound ................................ : ${enable_canberra}"
Matthias Clasen's avatar
Matthias Clasen committed
181
echo ""