configure.ac 2.43 KB
Newer Older
1
AC_PREREQ([2.63])
Bastien Nocera's avatar
Bastien Nocera committed
2

Zeeshan Ali's avatar
Zeeshan Ali committed
3
m4_define(gclib_version_major, 3)
Jonas Danielsson's avatar
Jonas Danielsson committed
4
m4_define(gclib_version_minor, 20)
Jonas Danielsson's avatar
Jonas Danielsson committed
5
m4_define(gclib_version_micro, 1)
Bastien Nocera's avatar
Bastien Nocera committed
6
7

AC_INIT([geocode-glib],
Jonas Danielsson's avatar
Jonas Danielsson committed
8
        [gclib_version_major.gclib_version_minor.gclib_version_micro],
9
10
        [http://bugzilla.gnome.org/enter_bug.cgi?product=geocode-glib],
        [geocode-glib])
Bastien Nocera's avatar
Bastien Nocera committed
11
12
13

AC_CONFIG_SRCDIR([geocode-glib/test-gcglib.c])
AC_CONFIG_HEADERS([config.h])
14
AC_CONFIG_MACRO_DIR([m4])
Bastien Nocera's avatar
Bastien Nocera committed
15

16
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip check-news])
Bastien Nocera's avatar
Bastien Nocera committed
17
18
19
20
21
22
23
24
25
26
27

# Before making a release, the GCLIB_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
GCLIB_LT_VERSION=0:0:0
AC_SUBST(GCLIB_LT_VERSION)

28
29
30
GCLIB_API_VERSION=1.0
AC_SUBST(GCLIB_API_VERSION)

31
AM_MAINTAINER_MODE([enable])
Bastien Nocera's avatar
Bastien Nocera committed
32
33
34
35

# 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
36
AM_SILENT_RULES([yes])
Bastien Nocera's avatar
Bastien Nocera committed
37

38
# Check for programs
Bastien Nocera's avatar
Bastien Nocera committed
39
40
AC_PROG_CC
AC_PROG_INSTALL
41
AC_LANG([C])
Bastien Nocera's avatar
Bastien Nocera committed
42
43

dnl Initialize libtool
44
45
LT_PREREQ([2.2])
LT_INIT([disable-static])
Bastien Nocera's avatar
Bastien Nocera committed
46

47
# i18n support
48
49
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
50

Bastien Nocera's avatar
Bastien Nocera committed
51
52
53
54
55
56
GETTEXT_PACKAGE=geocode-glib
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
					[The name of the gettext domain])

dnl gtk-doc checks
57
GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
Bastien Nocera's avatar
Bastien Nocera committed
58

59
60
AC_CHECK_LIB([m],[atan2])

Bastien Nocera's avatar
Bastien Nocera committed
61
62
dnl Requires for the library
PKG_CHECK_MODULES(GEOCODE,
63
		  gio-2.0 >= 2.44
64
		  json-glib-1.0 >= 0.99.2
65
		  libsoup-2.4 >= 2.42)
Bastien Nocera's avatar
Bastien Nocera committed
66
67
68
69
70
71
72
73
74
75
76

GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)

GOBJECT_INTROSPECTION_CHECK([0.6.3])

GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS
GNOME_MAINTAINER_MODE_DEFINES

77
78
79
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_MKENUMS)

Bastien Nocera's avatar
Bastien Nocera committed
80
81
82
83
84
85
86
87
88
89
if test "$GCC" = "yes" ; then
	CFLAGS="\
	-Wall \
	-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
	-Wnested-externs -Wpointer-arith \
	-Wcast-align -Wsign-compare -Wredundant-decls \
	-fno-strict-aliasing \
	$CFLAGS"
fi

90
91
AC_CONFIG_FILES([
          Makefile
92
	  geocode-glib-1.0.pc
Bastien Nocera's avatar
Bastien Nocera committed
93
94
95
96
	  docs/Makefile
	  docs/version.xml
	  geocode-glib/Makefile
	  po/Makefile.in
Jonas Danielsson's avatar
Jonas Danielsson committed
97
	  icons/Makefile
98
99
])
AC_OUTPUT
Bastien Nocera's avatar
Bastien Nocera committed
100