-
Notifications
You must be signed in to change notification settings - Fork 83
/
configure.ac
121 lines (93 loc) · 4.22 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
110
111
112
113
114
115
116
117
118
119
120
121
# -------------------------------------------------------------------------------
# Autoconf/automake.
# -------------------------------------------------------------------------------
AC_PREREQ([2.5])
AC_INIT([clipit], [1.4.5], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/main.c])
AM_CONFIG_HEADER([config.h])
# -------------------------------------------------------------------------------
# pkg-config.
# -------------------------------------------------------------------------------
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
if test x$HAVE_PKG_CONFIG = xno ; then
AC_MSG_ERROR([Requirement not met: pkg-config not installed])
fi
PKG_PROG_PKG_CONFIG
# -------------------------------------------------------------------------------
# Gettext.
# -------------------------------------------------------------------------------
GETTEXT_PACKAGE=clipit
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package])
ALL_LINGUAS="ca cs da de es es_ES et fr hr hu it ja nb pl pl pt_BR ro ru sv tr zh_CN"
AM_GLIB_GNU_GETTEXT()
IT_PROG_INTLTOOL([0.40.0], [no-xml])
clipitlocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(clipitlocaledir)
# -------------------------------------------------------------------------------
# Config options.
# -------------------------------------------------------------------------------
AM_MAINTAINER_MODE([disable])
# -------------------------------------------------------------------------------
# Main settings.
# -------------------------------------------------------------------------------
# prefix=/usr
# -------------------------------------------------------------------------------
# Checks for programs.
# -------------------------------------------------------------------------------
AC_PROG_CC()
AC_PROG_INSTALL()
AC_PROG_MAKE_SET()
# -------------------------------------------------------------------------------
# Checks for libraries.
# -------------------------------------------------------------------------------
AC_ARG_WITH([gtk3], AS_HELP_STRING([--with-gtk3], [Build with the GTK+ 3 interface]))
if test "x$with_gtk3" = "xyes"; then
PKG_CHECK_MODULES([GTK], [gtk+-3.0])
APPINDICATOR_MODULE="ayatana-appindicator3-0.1"
else
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.10])
APPINDICATOR_MODULE="ayatana-appindicator-0.1"
fi
# -------------------------------------------------------------------------------
# Application indicator.
# -------------------------------------------------------------------------------
APPINDICATOR_REQUIRED_VERSION=0.2.4
AC_ARG_ENABLE([appindicator],
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS($APPINDICATOR_MODULE= >= $APPINDICATOR_REQUIRED_VERSION,
[enable_appindicator="yes"],
[enable_appindicator="no"])
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_MODULES(APPINDICATOR,
[$APPINDICATOR_MODULE >= $APPINDICATOR_REQUIRED_VERSION],
[AC_DEFINE(HAVE_APPINDICATOR, 1, [Have AppIndicator])])
fi
AM_CONDITIONAL(HAVE_APPINDICATOR, test x$enable_appindicator = xyes)
AC_SUBST(APPINDICATOR_CFLAGS)
AC_SUBST(APPINDICATOR_LIBS)
AC_SUBST(X11_LIBS, -lX11)
AM_PATH_GLIB_2_0(2.14.0, [], AC_MSG_ERROR(Requirement not met: glib >= 2.14.0))
# -------------------------------------------------------------------------------
# Checks for header files.
# -------------------------------------------------------------------------------
AC_CHECK_HEADERS([stdlib.h string.h])
# -------------------------------------------------------------------------------
# Checks for typedefs, structures, and compiler characteristics.
# -------------------------------------------------------------------------------
AC_C_CONST()
# -------------------------------------------------------------------------------
# Checks for library functions.
# -------------------------------------------------------------------------------
AC_TYPE_SIGNAL()
AC_CONFIG_FILES([Makefile
doc/Makefile
src/Makefile
data/Makefile])
AC_OUTPUT([po/Makefile.in])