configure.ac 3.3 KB
Newer Older
1
AC_PREREQ([2.64])
2
AC_INIT([Devhelp],
3
        [3.27.91],
4
        [https://bugzilla.gnome.org/browse.cgi?product=devhelp],
5
        [devhelp],
6
        [https://wiki.gnome.org/Apps/Devhelp])
Johan Dahlin's avatar
Johan Dahlin committed
7

8 9 10
AX_REQUIRE_DEFINED([AX_IS_RELEASE])
AX_IS_RELEASE([git-directory])

11
# LT Version numbers, remember to change them just *before* a release.
Sébastien Wilmet's avatar
Sébastien Wilmet committed
12 13
# A good time to update it is for the GNOME x.y.90 version, at API freeze,
# so that packagers have the time to update the package.
14 15 16
#   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
#   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
#   (No interfaces changed:                   REVISION++)
Sébastien Wilmet's avatar
Sébastien Wilmet committed
17
LIBDEVHELP_LT_CURRENT=5
18 19 20 21
LIBDEVHELP_LT_REVISION=0
LIBDEVHELP_LT_AGE=0
LIBDEVHELP_LT_VERSION="$LIBDEVHELP_LT_CURRENT:$LIBDEVHELP_LT_REVISION:$LIBDEVHELP_LT_AGE"
AC_SUBST([LIBDEVHELP_LT_VERSION])
22

23
AC_CONFIG_HEADERS(config.h)
24 25
AC_CONFIG_SRCDIR(src/dh-main.c)
AC_CONFIG_MACRO_DIR([m4])
26

27
AM_INIT_AUTOMAKE([1.14 -Wall foreign no-define tar-ustar no-dist-gzip dist-xz -Wno-portability])
Johan Dahlin's avatar
Johan Dahlin committed
28

29 30 31
# Support silent build rules, requires at least automake-1.11. Disable
# by either passing --disable-silent-rules to configure or passing V=1
# to make
32
AM_SILENT_RULES([yes])
33

34
# Check for programs
Johan Dahlin's avatar
Johan Dahlin committed
35
AC_PROG_CC
36 37
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
Richard Hult's avatar
Richard Hult committed
38

39 40 41 42
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])

43 44 45
AX_REQUIRE_DEFINED([APPSTREAM_XML])
APPSTREAM_XML

46
AX_REQUIRE_DEFINED([GLIB_GSETTINGS])
Thomas Bechtold's avatar
Thomas Bechtold committed
47
GLIB_GSETTINGS
48

49
AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK])
50 51
GOBJECT_INTROSPECTION_CHECK([1.30.0])

52 53 54
AX_REQUIRE_DEFINED([YELP_HELP_INIT])
YELP_HELP_INIT

55 56
# Compile warnings. There can be deprecation warnings at any time, so disable
# -Werror by default with the [yes] argument.
57
AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS])
58
AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [yes])
Johan Dahlin's avatar
Johan Dahlin committed
59

Michael Catanzaro's avatar
Michael Catanzaro committed
60
LT_LIB_M
61

62 63
AX_REQUIRE_DEFINED([AX_PKG_CHECK_MODULES])
AX_PKG_CHECK_MODULES([DEVHELP],
64
		     [gio-2.0 >= 2.40  gtk+-3.0 >= 3.22  webkit2gtk-4.0 >= 2.19.2],
65
		     [gsettings-desktop-schemas])
66

67
# i18n stuff
68 69
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19.7])
70

71 72
GETTEXT_PACKAGE=devhelp
AC_SUBST(GETTEXT_PACKAGE)
Ross Burton's avatar
Ross Burton committed
73
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name for gettext])
74

Richard Hult's avatar
Richard Hult committed
75 76
AM_PATH_PYTHON([2.3],[],[no])

77 78 79 80 81 82 83 84 85 86
# Flatpak
AC_ARG_ENABLE([flatpak-build],
	      [AS_HELP_STRING([--enable-flatpak-build], [Enable Flatpak build mode])],
	      [flatpak_build=${enableval}],
	      [flatpak_build=no])

if test "x${flatpak_build}" = xyes; then
	AC_DEFINE([FLATPAK_BUILD], 1, [Whether Flatpak build mode is enabled])
fi

87
# GTK-Doc
88
AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
89
GTK_DOC_CHECK([1.25],[--flavour no-tmpl])
90

91 92 93
AX_REQUIRE_DEFINED([PKG_CHECK_VAR])
PKG_CHECK_VAR([WEBKITGTK_PREFIX], [webkit2gtk-4.0], [prefix])

94
AC_CONFIG_FILES([
95 96 97 98 99 100 101
	Makefile
	data/libdevhelp-3.0.pc
	data/Makefile
	data/org.gnome.Devhelp.desktop.in
	data/icons/Makefile
	docs/Makefile
	docs/reference/Makefile
102
	help/Makefile
103 104
	plugins/Makefile
	plugins/gedit-plugin/Makefile
105 106
	po/Makefile.in
	src/Makefile
107
	unit-tests/Makefile
Johan Dahlin's avatar
Johan Dahlin committed
108
])
109 110 111

AC_OUTPUT

112 113 114 115 116 117 118 119 120 121 122
# Print a summary of the configuration
echo "
Configuration:

	${PACKAGE_NAME} version ${PACKAGE_VERSION}

	Source code location:	${srcdir}
	Prefix:			${prefix}
	Compiler:		${CC}
	API documentation:	${enable_gtk_doc}
	GObject introspection:	${found_introspection}
123
	Flatpak build mode:	${flatpak_build}
124
"