-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
154 lines (125 loc) · 3.1 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#
# Most of this configure script was ripped from gaim or the
# gaim-encryption configure script, thanks guys ;)
#
AC_INIT([pidgin-libnotify], [0.14], [nothing])
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_PREREQ([2.50])
AC_PATH_PROG(sedpath, sed)
#
# Setup libtool
#
AM_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"
#
# Our header
#
AH_TOP([ /* our header */
#ifndef _KS_CONFIG_H
#define _KS_CONFIG_H
])
AH_BOTTOM([
#endif /* _KS_CONFIG_H */
])
#
# Setup gettext
#
AC_PROG_INTLTOOL
GETTEXT_PACKAGE=pidgin-libnotify
AC_SUBST(GETTEXT_PACKAGE)
ALL_LINGUAS="es fr it nl pl pt pt_BR sl hu zh_CN ro gl ru bg de sv"
AM_GLIB_GNU_GETTEXT
#
# Look for the C compiler
#
CFLAGS_save="$CFLAGS"
AC_PROG_CC
CFLAGS="$CFLAGS_save"
AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no)
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
fi
AC_ARG_ENABLE(deprecated, [ --disable-deprecated compile without deprecated API usage],,enable_deprecated=yes)
if test "x$enable_deprecated" = no; then
DEBUG_CFLAGS = "$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
fi
AC_SUBST(DEBUG_CFLAGS)
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall -g3"
fi
AC_SUBST(CFLAGS)
#
# Check for libnotify
#
PKG_CHECK_MODULES([LIBNOTIFY], libnotify >= 0.3.2)
PKG_CHECK_MODULES([LIBNOTIFY07], libnotify >= 0.7, [AC_DEFINE([LIBNOTIFY_07], 1, [libnotify 0.7 or newer is detected])], [ libnotify=old ])
AC_SUBST(LIBNOTIFY_CFLAGS)
AC_SUBST(LIBNOTIFY_LIBS)
#
# Check for GTK+
#
PKG_CHECK_MODULES(GTK, gtk+-2.0)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
#
# Check for libpurple
#
PKG_CHECK_MODULES(LIBPURPLE, purple >= 2.0.0,
[
AC_DEFINE(HAVE_LIBPURPLE, 1, [Define if we've found libpurple.])
])
AC_SUBST(LIBPURPLE_CFLAGS)
LIBPURPLE_LIBDIR=`pkg-config --variable=libdir purple`
LIBPURPLE_DATADIR=`pkg-config --variable=datadir purple`
AC_SUBST(LIBPURPLE_LIBDIR)
AC_SUBST(LIBPURPLE_DATADIR)
#
# Check for pidgin
#
PKG_CHECK_MODULES(PIDGIN, pidgin >= 2.0.0,
[
AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
])
AC_SUBST(PIDGIN_CFLAGS)
PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
AC_SUBST(PIDGIN_LIBDIR)
AC_SUBST(PIDGIN_DATADIR)
#
# Check if plugins are enabled
#
want_plugins=yes
AM_CONDITIONAL(PLUGINS, test "$want_plugins" = "yes")
#
# Version stuff
#
AC_CONFIG_COMMANDS_PRE([
if test -e VERSION; then
cp -p VERSION VERSION.ac-save
fi
])
AC_CONFIG_COMMANDS_POST([
cmp VERSION VERSION.ac-save || touch -r VERSION.ac-save VERSION
rm -f VERSION.ac-save
])
#
# Finish up
#
AC_OUTPUT([Makefile
VERSION
po/Makefile.in
src/Makefile
])
echo;
echo Configuration complete
echo;
echo Debugging enabled..............: $enable_debug
echo Deprecated API enabled.........: $enable_deprecated
#echo libpurple API..................: $LIBPURPLE_CFLAGS
#echo pidgin API.....................: $PIDGIN_CFLAGS
echo;
echo Type make to compile
echo Thank you for using pidgin-libnotify
echo;