Project:
Gfire
Code Location:
http://my-svn.assembla.com/svn/gfire/trunk/trunk
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# # Most of this configure script was ripped from gaim-netsoul, # thank you guys!!! # # Get Gfire version m4_define(gfire_version, regexp(m4_include(VERSION), [\([0-9a-zA-Z.-]+\)], [\1])) m4_define(gfire_version_patch, regexp(gfire_version, [\([0-9]+\).\([0-9]+\).\([0-9]+\)], [\3])) m4_define(gfire_version_minor, regexp(gfire_version, [\([0-9]+\).\([0-9]+\).\([0-9]+\)], [\2])) m4_define(gfire_version_major, regexp(gfire_version, [\([0-9]+\).\([0-9]+\).\([0-9]+\)], [\1])) m4_define(gfire_version_suffix, regexp(gfire_version, [\([0-9]+\).\([0-9]+\).\([0-9]+\)-?\([a-zA-Z0-9]+\)], [\4])) m4_define(gfire_revision, m4_include(REV)) AC_PREREQ(2.50) AC_INIT([Gfire], [gfire_version], [support@gfireproject.org]) AC_CONFIG_SRCDIR([src/gfire.c]) AM_INIT_AUTOMAKE([gfire], [gfire_version], "") m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PATH_PROG(sedpath, sed) AC_CONFIG_MACRO_DIR([m4]) # # Define Gfire header # AH_TOP([ #ifndef _GFIRE_CONFIG_H #define _GFIRE_CONFIG_H ]) AH_BOTTOM([#endif]) AC_DEFINE_UNQUOTED([GFIRE_VERSION_SUFFIX], ["gfire_version_suffix"], [Gfire version suffix]) AC_DEFINE([GFIRE_VERSION_PATCH], [gfire_version_patch], [Gfire patch version]) AC_DEFINE([GFIRE_VERSION_MINOR], [gfire_version_minor], [Gfire minor version]) AC_DEFINE([GFIRE_VERSION_MAJOR], [gfire_version_major], [Gfire major version]) AC_DEFINE_UNQUOTED([GFIRE_VERSION_STRING], ["gfire_version"], [Gfire version string]) AC_DEFINE([GFIRE_REVISION], [gfire_revision], [Gfire revision version]) # # Check C compiler # CFLAGS_save="$CFLAGS" AC_PROG_CC CFLAGS="$CFLAGS_save" # # Setup libtool # AC_DISABLE_STATIC AM_PROG_LIBTOOL LIBTOOL="$LIBTOOL --silent" AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Compile with debugging support.]), enable_debug="$enableval", enable_debug=no) if test x$enable_debug != xno; then DEBUG_CFLAGS="$DEBUG_CFLAGS -g" AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) if test x$enable_debug = xverbose; then AC_DEFINE(DEBUG_VERBOSE, 1, [Define if verbose debugging is enabled.]) fi fi AC_SUBST(DEBUG_CFLAGS) if test "x$GCC"="xyes"; then CFLAGS="$CFLAGS -Wall -D_FILE_OFFSET_BITS=64" fi AC_SUBST(CFLAGS) # # Check for Pidgin # PKG_CHECK_MODULES(PURPLE, purple, [AC_DEFINE(HAVE_PURPLE, 1, [Define if we've found libpurple.])]) AC_SUBST(PURPLE_CFLAGS) AC_SUBST(PURPLE_LIBS) # # Check for GTK+ and other dependencies # AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [Don't compile with GTK+ support. (no server browser, no game manager)]), enable_gtk="$enableval", enable_gtk=yes) AC_ARG_ENABLE(libnotify, AS_HELP_STRING([--enable-libnotify], [Compile with libnotify support. (depends on GTK flag)]), enable_libnotify="$enableval", enable_libnotify=no) if test x$enable_gtk = xyes; then PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.14.0, AC_DEFINE(HAVE_GTK, 1, [Define if we've support for GTK+]), AC_MSG_ERROR([ *** GTK+ 2.0 is required to build Gfire; please make sure you have *** the GTK+ development headers installed. The latest version of GTK is *** always available at http://www.gtk.org])) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) if test x$enable_libnotify = xyes; then PKG_CHECK_MODULES(LIBNOTIFY, libnotify >= 0.3.2, AC_DEFINE(HAVE_LIBNOTIFY, 1, [Define if we've support for libnotify]), AC_MSG_ERROR([ *** You have requested to build Gfire with libnotify support. You do not have it; *** please make sure you have the libnotify development headers installed. *** The latest version of libnotify is always available at http://galago-project.org])) AC_SUBST(LIBNOTIFY_CFLAGS) AC_SUBST(LIBNOTIFY_LIBS) fi fi AM_CONDITIONAL(GTK, test "x$enable_gtk" = "xyes") AC_ARG_ENABLE(dbus-status, AS_HELP_STRING([--enable-dbus-status], [Enable status change for other IM clients (currently only kmess).]), enable_dbus_status="$enableval", enable_dbus_status=no) if test $enable_dbus_status = "yes"; then PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1, AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if we've support for dbus-glib]), AC_MSG_ERROR([ *** Glib DBus bindings are required to build Gfire with your current configure flags; *** please make sure you have the GLib DBus development headers installed. *** The latest version of GLib is always available at http://www.gtk.org])) AC_SUBST(DBUS_GLIB_CFLAGS) AC_SUBST(DBUS_GLIB_LIBS) AC_DEFINE([USE_DBUS_STATUS_CHANGE], [1], [Use DBus status change if defined]) fi AM_PATH_GLIB_2_0(2.18.0,, AC_MSG_ERROR([ *** GLib 2.0 is required to build Gfire; please make sure you have *** the GLib development headers installed. The latest version of GLib is *** always available at http://www.gtk.org]), gthread) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) # # Internationalisation support # AC_ARG_ENABLE(nls, AS_HELP_STRING([--disable-nls], [disable installation of translation files]), enable_nls="$enableval", enable_nls=yes) if test x$enable_nls = xyes; then AC_PROG_INTLTOOL GETTEXT_PACKAGE="$PACKAGE" AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used]) ALL_LINGUAS="cs de ee es fr pl ro sk sv" AM_GLIB_GNU_GETTEXT fi AM_CONDITIONAL(INSTALL_NLS, test "x$enable_nls" = "xyes") # # Game detection wanted? # AC_ARG_ENABLE(game-detection, AS_HELP_STRING([--disable-game-detection], [Disable game detection. e.g. use this if you intend to build Gfire for embedded devices/servers.]), enable_game_detection="$enableval", enable_game_detection=yes) if test x$enable_game_detection = xyes; then AC_DEFINE([USE_GAME_DETECTION], [1], [Support game detection]) fi AM_CONDITIONAL(GAME_DETECTION, test "x$enable_game_detection" = "xyes") # # Update notifications wanted? # AC_ARG_ENABLE(update-notify, AS_HELP_STRING([--disable-update-notify], [Disable notifications on new available versions of Gfire. Use this if you intend to build Gfire for a package.]), enable_update_notify="$enableval", enable_update_notify=yes) if test x$enable_update_notify = xyes; then AC_DEFINE([UPDATE_NOTIFY], [1], [Show notifications about newer versions]) fi # # Check if plugins are enabled # want_plugins=yes AM_CONDITIONAL(PLUGINS, test "x$want_plugins" = "xyes") # # Finish up # AM_CONFIG_HEADER(gfire_config.h) AC_CONFIG_FILES([ Makefile src/Makefile data/Makefile pixmaps/Makefile po/Makefile.in ]) AC_OUTPUT echo; echo "Configuration complete." echo; echo "Debugging enabled.............: $enable_debug" echo "GTK enabled...................: $enable_gtk" echo "libnotify enabled.............: $enable_libnotify" echo "DBus status change enabled....: $enable_dbus_status" echo "Game detection enabled........: $enable_game_detection" echo "Notify on new version.........: $enable_update_notify" echo "NLS enabled...................: $enable_nls" echo; purplelibdir=$(pkg-config purple --variable=libdir) purplepfxdir=$(pkg-config purple --variable=prefix) echo "Libpurple package prefix......: $purplepfxdir" echo "Libpurple package libdir......: $purplelibdir" echo "Install prefix................: $prefix" gfld=`eval echo $libdir` gfld=`eval echo $gfld` echo "Install libdir................: $gfld" echo -n "Purple libdir detected........: " if test -d "$gfld/purple-2"; then echo "yes" else echo "no!" echo; echo "We did not detect a libpurple directory off of the \"install libdir\": $gfld/purple-2" echo; echo "This is not a fatal error, as we cannot detect all cases. For most" echo "users though, we should be able to detect this directory. The compile" echo "will not fail, however the install may put files in the wrong place." echo; echo "The libpurple package libdir and prefix is where libpurple believes itself to" echo "be installed. The Install prefix and libdir should match them." echo "use ./configure --prefix=$purplepfxdir to fix this," echo "and if necessary use: ./configure --prefix=$purplepfxdir --libdir=$purplelibdir" fi echo; echo "Type make to compile."
