-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
109 lines (81 loc) · 2.41 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
AC_INIT([tumblefile], [1.2], [[email protected]], [tumblefile])
AC_PREREQ(2.59)
AC_CONFIG_SRCDIR([src/main.cc])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.9 gnu no-define])
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_ISC_POSIX
AC_PROG_CXX
AC_PROG_CC
GNOME_CXX_WARNINGS
GNOME_DEBUG_CHECK
GNOME_MAINTAINER_MODE_DEFINES
# *************************************
# Compiler and platform check
# *************************************
if test "${GXX}" != "yes" ; then
AC_MSG_ERROR([This program relies on g++ to be compiled])
fi
AC_MSG_CHECKING([for a supported version of g++])
gxx_version=`${CXX} --version | head -n 1`
case "${gxx_version}" in
*4.*)
AC_MSG_RESULT([ok (${gxx_version})])
;;
*)
AC_MSG_RESULT([no (${gxx_version})])
AC_MSG_ERROR([g++ version 4.* is required])
;;
esac
AC_CANONICAL_HOST
AC_LANG_CPLUSPLUS
# *************************************
# Internationalization support
# *************************************
# To add a new language, add language code xx to po/LINGUAS
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=tumblefile
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
[The domain to use with gettext])
AM_GLIB_GNU_GETTEXT
TUMBLEFILE_LOCALEDIR=[${datadir}/locale]
AC_SUBST(TUMBLEFILE_LOCALEDIR)
# *************************************
# Library checks
# *************************************
PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 >= 2.16.0])
AC_SUBST([GTKMM_CFLAGS])
AC_SUBST([GTKMM_LIBS])
PKG_CHECK_MODULES([GIOMM], [giomm-2.4 >= 2.16.0])
AC_SUBST([GIOMM_CFLAGS])
AC_SUBST([GIOMM_LIBS])
# *************************************
# LIBS and CFLAGS definitions
# *************************************
TUMBLEFILE_LIBS="$GIOMM_LIBS $GTKMM_LIBS"
TUMBLEFILE_CFLAGS="$GIOMM_CFLAGS $GTKMM_CFLAGS"
AC_SUBST(TUMBLEFILE_LIBS)
AC_SUBST(TUMBLEFILE_CFLAGS)
# *************************************
# Prepare for make
# *************************************
# Allow 'make install'.
AC_PROG_INSTALL
# Generate the files:
AC_CONFIG_FILES([
Makefile
data/Makefile
data/tumblefile.desktop.in
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/scalable/Makefile
po/Makefile.in
src/Makefile
])
AC_OUTPUT
AC_MSG_NOTICE([Configuration complete.])