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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
AC_INIT(src)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(irssi, 0.7.19)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h)
GNOME_INIT
GNOME_SUPPORT_CHECKS
AC_ARG_WITH(proplist,
[ --with-proplist Specify libPropList location],
proplist_dir=$withval)
AC_ARG_WITH(socks,
[ --with-socks Build with socks support],
if test x$withval = xyes; then
want_socks=yes
else
if test "x$withval" = xno; then
want_socks=no
else
want_socks=yes
fi
fi,
want_socks=no)
AC_ARG_WITH(imlib,
[ --with-imlib Build with imlib support],
if test x$withval = xyes; then
want_imlib=yes
else
if test "x$withval" = xno; then
want_imlib=no
else
want_imlib=yes
fi
fi,
want_imlib=yes)
AC_ARG_WITH(gnome-panel,
[ --with-gnome-panel Build with gnome panel applet support],
if test x$withval = xyes; then
want_gnome_panel=yes
else
if test "x$withval" = xno; then
want_gnome_panel=no
else
want_gnome_panel=yes
fi
fi,
want_gnome_panel=yes)
AC_ARG_WITH(textui,
[ --with-textui Build irssi-text],
if test x$withval = xyes; then
want_textui=yes
else
if test "x$withval" = xno; then
want_textui=no
else
want_textui=yes
fi
fi,
want_textui=yes)
AC_ARG_WITH(bot,
[ --with-bot Build irssi-bot],
if test x$withval = xyes; then
want_irssibot=yes
else
if test "x$withval" = xno; then
want_irssibot=no
else
want_irssibot=yes
fi
fi,
want_irssibot=yes)
AC_ARG_WITH(plugins,
[ --with-plugins Build plugins],
if test x$withval = xyes; then
want_plugins=yes
else
if test "x$withval" = xno; then
want_plugins=no
else
want_plugins=yes
fi
fi,
want_plugins=yes)
AC_ARG_WITH(servertest,
[ --with-servertest Build servertest],
if test x$withval = xyes; then
want_servertest=yes
else
if test "x$withval" = xno; then
want_servertest=no
else
want_servertest=yes
fi
fi,
want_servertest=no)
AC_ARG_ENABLE(memdebug,
[ --enable-memdebug Enable memory debugging],
if test x$enableval = xyes; then
want_memdebug=yes
else
if test "x$enableval" = xno; then
want_memdebug=no
else
want_memdebug=yes
fi
fi,
want_memdebug=no)
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 Enable IPv6 support],
if test x$enableval = xyes; then
want_ipv6=yes
else
if test "x$enableval" = xno; then
want_ipv6=no
else
want_ipv6=yes
fi
fi,
want_ip6=no)
AC_ARG_ENABLE(gtk-hebrew,
[ --enable-gtk-hebrew Enable Hebrew support],
if test "x$enableval" = xno; then
want_gtk_hebrew=no
HEBREW_LIBS=""
else
AC_DEFINE(GTK_HEBREW)
AC_DEFINE_UNQUOTED(GTK_HEBREW_RC, "$enableval")
HEBREW_LIBS="-lfribidi"
want_gtk_hebrew=yes
fi,
want_gtk_hebrew=no)
dnl **
dnl ** just some generic stuff...
dnl **
AC_CHECK_FUNCS(mkfifo)
AC_CHECK_LIB(socket, socket, [
PROG_LIBS="$PROG_LIBS -lsocket"
])
AC_CHECK_LIB(nsl, inet_addr, [
PROG_LIBS="$PROG_LIBS -lnsl"
], -lsocket)
# gcc specific options
if test "x$ac_cv_prog_gcc" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
dnl **
dnl ** check for libPropList
dnl **
if test "x$proplist_dir" = "x"; then
proplib=
else
proplib=-L$proplist_dir/lib
fi
AC_CHECK_LIB(PropList, PLSave, [
PROG_LIBS="$PROG_LIBS $proplib -lPropList"
if test "x$proplist_dir" != "x"; then
CFLAGS="$CFLAGS -I$proplist_dir/include"
fi
], [
echo "ERROR: Irssi needs libPropList for configuration file handling."
echo "Go get it from http://xlife.dhs.org/irssi/download.php"
AC_ERROR(["libPropList not found"])
], $PROG_LIBS $proplib -lPropList)
dnl **
dnl ** check for socks
dnl **
if test "x$want_socks" = "xyes"; then
AC_CHECK_LIB(socks, connect, [
PROG_LIBS="$PROG_LIBS -lsocks"
AC_CHECK_HEADER(socks.h, [
AC_DEFINE(HAVE_SOCKS_H)
CFLAGS="$CFLAGS -DSOCKS"
AC_MSG_RESULT(["socks5 library found, building with it"])
], [
AC_MSG_RESULT(["socks4 library found, building with it"])
CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
])
])
fi
dnl **
dnl ** check for gnome
dnl **
if test "x$want_gnome" = "xyes"; then
if test "x$GNOME_LIBS" = "x"; then
want_gnome="no";
fi
fi
if test "x$want_gnome" = "xyes"; then
AC_DEFINE(HAVE_GTK)
AC_DEFINE(HAVE_GNOME)
AC_DEFINE(HAVE_IMLIB)
GUI_CFLAGS="$GNOME_INCLUDEDIR"
dnl **
dnl ** check for gnome panel applet library
dnl **
if test "x$want_gnome_panel" = "xyes"; then
AC_CHECK_LIB(panel_applet, applet_widget_init, [
GUI_LIBS="$GNOME_LIBDIR $GNOMEGNORBA_LIBS -lpanel_applet"
AC_DEFINE(HAVE_GNOME_PANEL)
], [
GUI_LIBS="$GNOME_LIBDIR $GNOMEUI_LIBS"
want_gnome_panel="no"
], $GNOME_LIBDIR $GNOMEGNORBA_LIBS -lpanel_applet)
else
GUI_LIBS="$GNOME_LIBDIR $GNOMEUI_LIBS"
fi
else
want_gnome_panel="no"
AC_DEFINE(HAVE_GTK)
AM_PATH_GTK(1.2.0)
if test "x$GTK_LIBS" != "x"; then
GUI_CFLAGS="$GTK_CFLAGS"
GUI_LIBS="$GTK_LIBS"
if test "x$want_imlib" = "xyes"; then
AM_PATH_GDK_IMLIB(, [define_imlib=true])
if test x$define_imlib = xtrue; then
AC_DEFINE(HAVE_IMLIB)
GUI_CFLAGS="$GUI_CFLAGS $GDK_IMLIB_CFLAGS"
GUI_LIBS="$GDK_IMLIB_LIBS"
fi
fi
GUI_LIBS="$GUI_LIBS ../lib-popt/libpopt.a"
fi
fi
if test "x$GUI_LIBS" != "x"; then
GUI_LIBS="$GUI_LIBS $HEBREW_LIBS $PROG_LIBS"
fi
AC_SUBST(GUI_LIBS)
AC_SUBST(GUI_CFLAGS)
dnl **
dnl ** gui-text checks
dnl **
AM_PATH_GLIB(1.2.0,,, gmodule)
PROG_LIBS="$PROG_LIBS $GLIB_LIBS ../lib-popt/libpopt.a"
AC_SUBST(PROG_LIBS)
dnl **
dnl ** curses checks
dnl **
if test "x$want_textui" = "xyes"; then
AC_CHECK_CURSES
if test "x$ncurses_version" != "x"; then
AC_CHECK_LIB(ncurses, use_default_colors, [
AC_DEFINE(HAVE_NCURSES_USE_DEFAULT_COLORS)
],, $CURSES_LIBS)
AC_CHECK_LIB(ncurses, idcok, [
AC_DEFINE(HAVE_CURSES_IDCOK)
],, $CURSES_LIBS)
else
AC_CHECK_LIB(curses, idcok, [
AC_DEFINE(HAVE_CURSES_IDCOK)
],, $CURSES_LIBS)
fi
else
has_curses=false
fi
AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true)
dnl ** check what we want to build
AM_CONDITIONAL(BUILD_IRSSIBOT, test "$want_irssibot" = "xyes")
AM_CONDITIONAL(BUILD_PLUGINS, test "x$want_plugins" = "xyes")
AM_CONDITIONAL(BUILD_SERVERTEST, test "x$want_servertest" = "xyes")
AM_CONDITIONAL(BUILD_GNOMEUI, test "x$GUI_LIBS" != "x")
AM_CONDITIONAL(HAVE_GNOME, test "x$want_gnome" = "xyes")
AM_CONDITIONAL(HAVE_GNOME_PANEL, test "x$want_gnome_panel" = "xyes")
dnl **
dnl ** memory debugging
dnl **
if test "x$want_memdebug" = "xyes"; then
AC_DEFINE(MEM_DEBUG)
fi
AM_CONDITIONAL(BUILD_MEMDEBUG, test "x$want_memdebug" = "xyes")
dnl **
dnl ** IPv6 support
dnl **
if test "x$want_ipv6" = "xyes"; then
AC_DEFINE(HAVE_IPV6)
fi
dnl **
dnl ** internationalization support
dnl **
ALL_LINGUAS="pl"
AM_GNU_GETTEXT
AC_OUTPUT(
Makefile
po/Makefile.in
intl/Makefile
macros/Makefile
src/Makefile
src/irc-base/Makefile
src/irc-extra/Makefile
src/ui-common/Makefile
src/gui-none/Makefile
src/gui-text/Makefile
src/gui-gnome/Makefile
src/gui-gnome/help/Makefile
src/gui-gnome/help/C/Makefile
src/gui-gnome/pixmaps/Makefile
src/lib-config/Makefile
src/lib-nongui/Makefile
src/lib-popt/Makefile
src/settings/Makefile
servertest/Makefile
docs/Makefile
docs/help/Makefile
plugins/Makefile
plugins/sample/Makefile
plugins/speech/Makefile
plugins/sound/Makefile
plugins/proxy/Makefile
plugins/external/Makefile
plugins/bot/Makefile
stamp.h
irssi.spec)
|