Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 694 lines (607 sloc) 21.481 kb
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(src)
4 AM_CONFIG_HEADER(config.h)
78dfb0a faq.html: Mention Emacs bindings on Gnome 2.8+.
zed authored
5 AM_INIT_AUTOMAKE(xchat, 2.4.4)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
6 AM_MAINTAINER_MODE
7 AC_PROG_CC
8 AC_PROG_CPP
9 AM_PROG_AS
10 AM_DISABLE_STATIC
11 AM_PROG_LIBTOOL
12
9c263ca New translations: hi, pa.
zed authored
13 ALL_LINGUAS="am az bg ca cs de el en_GB es et eu fi fr hi it ja ko lt lv mk ms nb nl no pa pt pt_BR ru sk sl sq sr sv uk vi wa zh_CN zh_TW"
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
14 AM_GNU_GETTEXT
15
7bfa0b1 *** empty log message ***
zed authored
16 dnl displaced from acconfig.h
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
17 AH_VERBATIM([OLD_PERL],[#undef OLD_PERL])
18 AH_VERBATIM([PREFIX],[#undef PREFIX])
700f097 configure.in: Add new config.h entries: XCHATLIBDIR, XCHATSHAREDIR.
zed authored
19 AH_VERBATIM([XCHATLIBDIR],[#undef XCHATLIBDIR])
20 AH_VERBATIM([XCHATSHAREDIR],[#undef XCHATSHAREDIR])
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
21 AH_VERBATIM([SOCKS],[#undef SOCKS])
22 AH_VERBATIM([USE_DEBUG],[#undef USE_DEBUG])
db81110 configure.in: Add sr to ALL_LINGUAS. Comment out gnome.
zed authored
23 dnl AH_VERBATIM([USE_GNOME],[#undef USE_GNOME])
c32a1cc xtext: use mit-shm for tinting image.
zed authored
24 AH_VERBATIM([USE_SHM],[#undef USE_SHM])
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
25 AH_VERBATIM([USE_IPV6],[#undef USE_IPV6])
26 AH_VERBATIM([USE_MMX],[#undef USE_MMX])
27 AH_VERBATIM([USE_OPENSSL],[#undef USE_OPENSSL])
28 AH_VERBATIM([USE_PLUGIN],[#undef USE_PLUGIN])
29 AH_VERBATIM([USE_XFT],[#undef USE_XFT])
30 AH_VERBATIM([USE_XLIB],[#undef USE_XLIB])
55ab1ef Checked in rehashed po files.
zed authored
31 AH_VERBATIM([USE_SIGACTION],[#undef USE_SIGACTION])
7bfa0b1 *** empty log message ***
zed authored
32 dnl AH_VERBATIM([USE_ZVT],[#undef USE_ZVT])
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
33 AH_VERBATIM([USING_FREEBSD],[#undef USING_FREEBSD])
34 AH_VERBATIM([USING_LINUX],[#undef USING_LINUX])
35 AH_VERBATIM([socklen_t],[#undef socklen_t])
36
37 AC_PATH_PROG(sedpath, sed)
38 if test "_$sedpath" = _; then
39 AC_MSG_ERROR("Cannot find sed: I need it\!")
40 fi
41
42 AC_PATH_PROG(unamepath, uname)
43 if test "_$unamepath" = _; then
44 system="unknown"
45 else
46 AC_MSG_CHECKING(system type)
47 system=`$unamepath -s`
48 AC_MSG_RESULT($system)
49 if test "$system" = "Linux"; then
50 AC_DEFINE(USING_LINUX)
51 fi
52 if test "$system" = "FreeBSD"; then
53 AC_DEFINE(USING_FREEBSD)
54 fi
55 fi
56
57 dnl *********************************************************************
58 dnl ** configure switches ***********************************************
59 dnl *********************************************************************
60
2786cd4 *** empty log message ***
zed authored
61 AC_ARG_ENABLE(memdebug,
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
62 [ --enable-memdebug enable use of Memory Debug (default: no)],
2786cd4 *** empty log message ***
zed authored
63 memdebug=$enableval, memdebug=no)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
64
65 AC_ARG_ENABLE(socks,
9534a45 servlist.c: Remove AbleNET, IRCDZone. Add insiderZ.DE, ChatSociety. U…
zed authored
66 [ --enable-socks link with SOCKS5 library (default: no)],
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
67 socks=$enableval, socks=no)
68
69 AC_ARG_ENABLE(ipv6,
70 [ --enable-ipv6 enable IPv6 (default: no)],
71 ipv6=$enableval, ipv6=no)
72
5b1af9a *** empty log message ***
zed authored
73 AC_ARG_ENABLE(xft,
74 [ --enable-xft enable use of Xft directly (default: no)],
75 xft=$enableval, xft=no)
76
debc48d *** empty log message ***
zed authored
77 AC_ARG_ENABLE(openssl,
78 [ --enable-openssl[=PATH] enable use of openSSL],
79 openssl=$enableval, openssl=yes)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
80
81 AC_ARG_ENABLE(gtkfe,
82 [ --disable-gtkfe disable building gtk frontend],
83 gtkfe=$enableval, gtkfe=yes)
84
85 AC_ARG_ENABLE(textfe,
710d0b9 add Comment[lt]. textfe off by default.
zed authored
86 [ --enable-textfe build the text frontend (default: no)],
87 textfe=$enableval, textfe=no)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
88
7bfa0b1 *** empty log message ***
zed authored
89 dnl AC_ARG_ENABLE(gnome,
90 dnl [ --disable-gnome disable use of gnome],
91 dnl gnome=$enableval, gnome=yes)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
92
7bfa0b1 *** empty log message ***
zed authored
93 dnl AC_ARG_ENABLE(zvt,
94 dnl [ --disable-zvt disable zvt/shelltab feature],
95 dnl zvt=$enableval, zvt=yes)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
96
97 AC_ARG_ENABLE(xlib,
98 [ --disable-xlib disable use of xlib (for non X11 systems)],
99 xlib=$enableval, xlib=yes)
100
101 AC_ARG_ENABLE(python,
102 [ --disable-python don't build the python plugin],
103 python=$enableval, python=yes)
104
105 AC_ARG_ENABLE(perl,
106 [ --disable-perl don't build the perl plugin],
107 perl=$enableval, perl=yes)
108
9c9c650 Brand new Perl plugin! (Lian Situ).
zed authored
109 AC_ARG_ENABLE(perl_old,
110 [ --disable-perl_old no backwards compatibility for perl plugin],
111 perl_old=$enableval, perl_old=yes)
112
1749e1b improve tcl detection
zed authored
113 AC_ARG_ENABLE(tcl,
114 [ --enable-tcl[=PATH] directory with Tcl config file: tclConfig.sh],
115 tcl=$enableval, tcl=yes)
08c40c7 *** empty log message ***
zed authored
116
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
117 AC_ARG_ENABLE(plugin,
118 [ --disable-plugin disable plugin support],
119 plugin=$enableval, plugin=yes)
120
121 AC_ARG_ENABLE(mmx,
122 [ --disable-mmx disable MMX assembly routines],
123 mmx=$enableval, mmx=yes)
124
c32a1cc xtext: use mit-shm for tinting image.
zed authored
125 AC_ARG_ENABLE(shm,
126 [ --enable-shm enable use of XShm for fast tinting (default: no)],
127 shm=$enableval, shm=no)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
128
129 dnl *********************************************************************
130 dnl ** DEBUG ************************************************************
131 dnl *********************************************************************
132
2786cd4 *** empty log message ***
zed authored
133 if test "$memdebug" = yes; then
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
134 AC_DEFINE(USE_DEBUG)
135 fi
136
137 dnl *********************************************************************
138 dnl ** GLIB *************************************************************
139 dnl *********************************************************************
140
141 AM_PATH_GLIB_2_0(2.0.3, glib=yes, glib=no)
142 if test "$glib" = no; then
143 AC_MSG_ERROR("Cannot find glib")
144 fi
145
146 COMMON_CFLAGS="$GLIB_CFLAGS"
147 COMMON_LIBS="$GLIB_LIBS"
148
149 dnl *********************************************************************
150 dnl ** GTK **************************************************************
151 dnl *********************************************************************
152
0d461db proto-irc.c: Merge strings.
zed authored
153 AM_PATH_GTK_2_0(2.4.0, havegtk=yes, havegtk=no)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
154
155 if test "$havegtk" = no; then
156 gtkfe=no
157 echo
158 echo Cannot find GTK\! Not building GTK FrontEnd.
159 echo
160 fi
161
162 if test "$gtkfe" != yes; then
163 gnome=no
164 zvt=no
165 COMMON_LIBS="$GLIB_LIBS"
166 COMMON_CFLAGS="$GLIB_CFLAGS"
167 fi
168
169 dnl *********************************************************************
170 dnl ** GNOME ************************************************************
171 dnl *********************************************************************
172
459e6a4 *** empty log message ***
zed authored
173 GUI_LIBS="$GUI_LIBS $GTK_LIBS"
174 GUI_CFLAGS="$GUI_CFLAGS $GTK_CFLAGS"
175
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
176 gnome=no
4247ca2 *** empty log message ***
zed authored
177 #if test "$gnome" = yes; then
178 # AC_PATH_PROG(pkgconfigpath, pkg-config)
179 # AC_MSG_CHECKING(Gnome2 compile flags)
180 # GNOME_CFLAGS="`$pkgconfigpath libgnome-2.0 --cflags 2>/dev/null`"
181 # if test "_$GNOME_CFLAGS" = _ ; then
182 # gnome=no
183 # AC_MSG_RESULT([Gnome not found, building without it.])
184 # else
185 # GNOME_VER="`$pkgconfigpath libgnome-2.0 --modversion`"
186 # GUI_LIBS="$GUI_LIBS `$pkgconfigpath libgnome-2.0 --libs`"
187 # GUI_CFLAGS="$GUI_CFLAGS $GNOME_CFLAGS"
188 # AC_DEFINE(USE_GNOME)
189 # AC_MSG_RESULT(ok)
190 # fi
191 #fi
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
192
193 dnl *********************************************************************
523ced2 text/plugin: Make unused args for print events NULL (previously only …
zed authored
194 dnl ** XFT **************************************************************
195 dnl *********************************************************************
196
197 if test "$xft" = yes; then
198 AC_PATH_PROG(pkgconfigpath, pkg-config)
199 if $pkgconfigpath xft --exists; then
200 GUI_CFLAGS="$GUI_CFLAGS `$pkgconfigpath xft --cflags`"
201 GUI_LIBS="$GUI_LIBS `$pkgconfigpath xft --libs`"
202 else
203 xft=no
204 oldCPPFLAGS=$CPPFLAGS
205 CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
206 AC_CHECK_HEADERS(X11/Xft/Xft.h, xft=yes)
207 CPPFLAGS=$oldCPPFLAGS
208 fi
209 if test "$xft" = yes; then
210 AC_DEFINE(USE_XFT)
211 fi
212 fi
213
214 dnl *********************************************************************
747557b Solaris changes: add "-L/usr/openwin/lib -lX11" and check libsocket b…
zed authored
215 dnl ** XLIB *************************************************************
216 dnl *********************************************************************
217
218 if test "$xlib" = yes; then
219 AC_DEFINE(USE_XLIB)
220 if test "$system" = "SunOS"; then
221 LIBS="$LIBS -L/usr/openwin/lib -lX11"
222 fi
c32a1cc xtext: use mit-shm for tinting image.
zed authored
223 else
224 shm=no
747557b Solaris changes: add "-L/usr/openwin/lib -lX11" and check libsocket b…
zed authored
225 fi
226
227 dnl *********************************************************************
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
228 dnl ** ZVT/SHELLTAB *****************************************************
229 dnl *********************************************************************
230
231 zvt=no
fed3d4a *** empty log message ***
zed authored
232 #if test "$zvt" = yes; then
233 # if test "$gnome" = no; then
234 # AC_PATH_PROG(gnomepath, gnome-config)
235 # fi
236 # AC_MSG_CHECKING(for zvt)
237 # if test "_$gnomepath" = "_"; then
238 # AC_MSG_RESULT([No gnome-config, can't do it.])
239 # zvt=no
240 # else
241 # GUI_LIBS="$GUI_LIBS `$gnomepath zvt --libs`"
242 # AC_DEFINE(USE_ZVT)
243 # AC_MSG_RESULT(yes)
244 # fi
245 #fi
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
246
247 dnl *********************************************************************
248 dnl ** PERL *************************************************************
249 dnl *********************************************************************
250
251 if test "$perl" = yes; then
252 AC_PATH_PROG(perlpath, perl)
253 AC_MSG_CHECKING(for Perl compile flags)
254 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
255 if test "_$PERL_CFLAGS" = _ ; then
256 AC_MSG_RESULT([not found, building without perl.])
257 perl=no
258 else
259 PERL_LDFLAGS=`$perlpath -MExtUtils::Embed -e ldopts |$sedpath 's/-lgdbm //'`
260 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-ldb //'`
261 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lndbm //'`
262 if test "$system" = "Linux"; then
263 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lnsl //'`
264 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lposix //'`
265 fi
266 PERL_LDFLAGS=`echo $PERL_LDFLAGS |$sedpath 's/-lc //'`
267 AC_MSG_RESULT(ok)
268
9c9c650 Brand new Perl plugin! (Lian Situ).
zed authored
269 # oldLIBS=$LIBS
270 # LIBS="$LIBS $PERL_LDFLAGS"
271 # AC_CHECK_FUNC(eval_pv)
272 # AC_CHECK_FUNC(call_pv)
273 # LIBS=$oldLIBS
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
274
4cf6f21 configure.in: Require perl 5.8.0, as 5.6.x tends to crash in newCONST…
zed authored
275 AC_MSG_CHECKING(for perl >= 5.8.0)
276 PERL_VER=`$perlpath -e 'print $]>= 5.008?"yes":"no"'`
9c9c650 Brand new Perl plugin! (Lian Situ).
zed authored
277 if test "$PERL_VER" = "yes"; then
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
278 AC_MSG_RESULT(yes)
9c9c650 Brand new Perl plugin! (Lian Situ).
zed authored
279 AC_MSG_CHECKING(if perl plugin will be backward compatible)
280 if test "$perl_old" = "yes"; then
281 AC_MSG_RESULT(yes)
282 AC_DEFINE(OLD_PERL)
283 else
284 AC_MSG_RESULT(no)
285 fi
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
286 else
287 AC_MSG_RESULT(no)
9c9c650 Brand new Perl plugin! (Lian Situ).
zed authored
288 echo "perl version too old, building without perl."
289 perl=no
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
290 fi
291 fi
292 fi
293
294 dnl *********************************************************************
295 dnl ** PYTHON ***********************************************************
296 dnl *********************************************************************
297
298 if test "$python" = yes; then
84a0b26 *** empty log message ***
zed authored
299 AC_PATH_PROG(pythonpath, python2)
300 if test "_$pythonpath" = _ ; then
301 AC_PATH_PROG(pythonpath, python)
302 fi
303 if test "_$pythonpath" = _ ; then
304 python=no
305 else
306 AC_MSG_CHECKING(Python version)
307 changequote(<<, >>)dnl
dfa1b1e Patch python checks [781333].
zed authored
308 PY_VER=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("VERSION")[0];'`
fbf6750 configure.in: python amd64 suse configure.in patch (Mads Martin Joerg…
zed authored
309 PY_LIB=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(standard_lib=1);'`
dfa1b1e Patch python checks [781333].
zed authored
310 PY_INC=`$pythonpath -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars("INCLUDEPY")[0];'`
84a0b26 *** empty log message ***
zed authored
311 $pythonpath -c "import sys; map(int,sys.version[:3].split('.')) >= [2,2] or sys.exit(1)"
312 changequote([, ])dnl
dfa1b1e Patch python checks [781333].
zed authored
313 AC_MSG_RESULT($PY_VER)
84a0b26 *** empty log message ***
zed authored
314 if test "$?" != "1"; then
315 AC_MSG_CHECKING(Python compile flags)
316 PY_PREFIX=`$pythonpath -c 'import sys; print sys.prefix'`
317 PY_EXEC_PREFIX=`$pythonpath -c 'import sys; print sys.exec_prefix'`
dfa1b1e Patch python checks [781333].
zed authored
318 if test -f $PY_INC/Python.h; then
319 PY_LIBS="-L$PY_LIB/config -lpython$PY_VER -lpthread -lutil"
320 PY_CFLAGS="-I$PY_INC"
84a0b26 *** empty log message ***
zed authored
321 AC_MSG_RESULT(ok)
322 else
323 python=no
324 AC_MSG_RESULT([Can't find Python.h])
325 fi
326 else
327 echo "Python too old. Only 2.2 or above is supported."
328 python=no
329 fi
330 fi
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
331 fi
332
333 dnl *********************************************************************
08c40c7 *** empty log message ***
zed authored
334 dnl ** TCL **************************************************************
335 dnl *********************************************************************
336
337 AC_MSG_CHECKING(for location of tclConfig.sh)
1749e1b improve tcl detection
zed authored
338 dirs="$tcl /lib /usr/lib /usr/tcl/lib /usr/local/lib /usr/local/tcl-8.4/lib /usr/local/tcl/lib /opt/lib"
08c40c7 *** empty log message ***
zed authored
339 found=0
1749e1b improve tcl detection
zed authored
340 if test "$tcl" != "no"; then
341 tcl=no
08c40c7 *** empty log message ***
zed authored
342 for try in $dirs; do
343 if test -f $try/tclConfig.sh; then
344 found=1
345 . $try/tclConfig.sh
346 TCL_LIBS="$TCL_LIB_SPEC $TCL_LIBS"
158c280 more tcl tweaks II
zed authored
347 TCL_CFLAGS="-I${TCL_PREFIX}/include $TCL_INCLUDE_SPEC"
348 tcl=yes
349 AC_MSG_RESULT($try/tclConfig.sh)
08c40c7 *** empty log message ***
zed authored
350 break
351 fi
352 done
353 if test "$found" -eq 0 ; then
354 AC_MSG_RESULT([tclConfig.sh not found - use the --enable-tcl option])
355 fi
356 fi
357
358 dnl *********************************************************************
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
359 dnl ** IPv6 *************************************************************
360 dnl *********************************************************************
361
4fb6120 check libsocket before getaddrinfo (might fix ipv6 build on solaris).
zed authored
362 dnl purely for Solaris
363 AC_CHECK_FUNC(select, ,
364 AC_CHECK_LIB(socket, select, ,
365 AC_CHECK_LIB(nsl, select, ,
366 AC_CHECK_LIB(inet, select, ,
367 AC_CHECK_LIB(cposix, select, ,
368 AC_CHECK_LIB(net, select, ,
369 AC_MSG_WARN(i can not find select. you might need to help me)))))))
747557b Solaris changes: add "-L/usr/openwin/lib -lX11" and check libsocket b…
zed authored
370 AC_CHECK_LIB(socket, select)
4fb6120 check libsocket before getaddrinfo (might fix ipv6 build on solaris).
zed authored
371
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
372 if test "$ipv6" = yes; then
373 AC_CHECK_FUNCS(getaddrinfo, have_getaddrinfo=yes)
374 AC_MSG_CHECKING(whether to enable IPv6 support)
375 if test "$have_getaddrinfo" = yes; then
376 AC_MSG_RESULT(yes)
377 AC_DEFINE(USE_IPV6)
378 else
379 ipv6=no
380 AC_MSG_RESULT(no)
381 fi
382 fi
383
384 dnl *********************************************************************
385 dnl ** OPENSSL **********************************************************
386 dnl *********************************************************************
387
08db2b6 Try pkg-config to find openssl.
zed authored
388 retry=no
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
389 if test "$openssl" != no; then
08db2b6 Try pkg-config to find openssl.
zed authored
390 AC_PATH_PROG(pkgconfigpath, pkg-config)
391 AC_MSG_CHECKING(for openssl through pkg-config)
392 if $pkgconfigpath openssl --exists; then
393 CPPFLAGS="$CPPFLAGS `$pkgconfigpath openssl --cflags`"
394 LIBS="$LIBS `$pkgconfigpath openssl --libs`"
395 AC_DEFINE(USE_OPENSSL)
396 AC_MSG_RESULT(yes)
397 openssl=yes
398 else
399 AC_MSG_RESULT(no)
400 retry=yes
401 fi
402 fi
403
404 if test "$retry" = "yes"; then
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
405 unset openssl_path ac_cv_lib_ssl_SSL_new ac_cv_header_openssl_ssl_h
406 if test "$openssl" != yes; then
407 openssl_path=$openssl
408 fi
409 openssl=no
410 SAVED_LIBS=$LIBS
411 LIBS="$LIBS -lcrypto"
412 if test -n "$openssl_path"; then
413 LIBS="-L$openssl_path/lib $LIBS"
414 fi
415 AC_CHECK_LIB(ssl, SSL_new, have_openssl=yes)
416 LIBS=$SAVED_LIBS
417 if test "$have_openssl" = yes; then
418 SAVED_CPPFLAGS=$CPPFLAGS
419 if test -n "$openssl_path"; then
420 CPPFLAGS="-I$openssl_path/include $CPPFLAGS"
421 fi
422 AC_CHECK_HEADERS(openssl/ssl.h, have_openssl_h=yes)
423 if test "$have_openssl_h" = yes; then
424 openssl=yes
425 AC_DEFINE(USE_OPENSSL)
426 LIBS="$LIBS -lssl -lcrypto"
427 if test -n "$openssl_path"; then
428 LIBS="-L$openssl_path/lib $LIBS"
429 fi
430 else
431 CPPFLAGS=$SAVED_CPPFLAGS
432 fi
433 fi
434 fi
435
436 dnl *********************************************************************
437 dnl ** PLUGIN ***********************************************************
438 dnl *********************************************************************
439
440 if test "$plugin" = yes; then
441 AC_CHECK_FUNCS(dlopen, have_dl=yes)
442 if test "$have_dl" != yes; then
443 AC_CHECK_LIB(dl, dlopen, have_dl=yes)
444 if test "$have_dl" = yes; then
445 LIBS="$LIBS -ldl"
446 fi
447 fi
448 if test "$have_dl" = yes; then
449 AC_DEFINE(USE_PLUGIN)
94c42d0 fix plugin loading on solaris with -Wl,--export-dynamic
zed authored
450 AC_PATH_PROG(pkgconfigpath, pkg-config)
7bfa0b1 *** empty log message ***
zed authored
451 dnl we just need the -Wl,--export-dynamic, but not -lgmodule-2.0
94c42d0 fix plugin loading on solaris with -Wl,--export-dynamic
zed authored
452 RDYNAMIC_FLAGS="`$pkgconfigpath gmodule-2.0 --libs | $sedpath 's/ -lgmodule-2.0//'`"
453 LIBS="$LIBS $RDYNAMIC_FLAGS"
eb077a3 *** empty log message ***
zed authored
454 VS="`ld --help | grep version-script 2> /dev/null`"
7bfa0b1 *** empty log message ***
zed authored
455 if test "$VS" != ""; then
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
456 GUI_LIBS="$GUI_LIBS -Wl,--version-script,\$(srcdir)/../version-script"
457 fi
458 else
459 plugin=no
460 fi
461 fi
462
463 dnl *********************************************************************
464 dnl ** CONDITIONALS *****************************************************
465 dnl *********************************************************************
466
467 AM_CONDITIONAL(USE_OPENSSL, test "x$openssl" = "xyes")
468 AM_CONDITIONAL(DO_TEXT, test "x$textfe" = "xyes")
469 AM_CONDITIONAL(DO_GTK, test "x$gtkfe" = "xyes")
470 AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes")
471 AM_CONDITIONAL(DO_PYTHON, test "x$python" = "xyes")
08c40c7 *** empty log message ***
zed authored
472 AM_CONDITIONAL(DO_TCL, test "x$tcl" = "xyes")
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
473 AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes")
474
475 dnl *********************************************************************
476 dnl ** SOCKS5 ***********************************************************
477 dnl *********************************************************************
478
479 if test "$socks" = yes; then
480 socks=no
481 AC_CHECK_LIB(socks5, SOCKSconnect, have_socks=yes)
482 if test "$have_socks" = yes; then
483 AC_CHECK_HEADERS(socks.h, have_socks_h=yes)
484 if test "$have_socks_h" = yes; then
485 socks=yes
486 AC_DEFINE(SOCKS)
487 LIBS="$LIBS -lsocks5"
488 fi
489 fi
490 fi
491
492 dnl *********************************************************************
c32a1cc xtext: use mit-shm for tinting image.
zed authored
493 dnl ** XShm *************************************************************
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
494 dnl *********************************************************************
495
c32a1cc xtext: use mit-shm for tinting image.
zed authored
496 if test "$shm" = yes; then
497 oldl=$LIBS
498 oldc=$CPPFLAGS
499 LIBS="$LIBS `$pkgconfigpath --libs-only-L xft`"
500 CPPFLAGS="$CPPFLAGS `$pkgconfigpath --cflags-only-I xft`"
501 shm=no
502 AC_CHECK_LIB(Xext, XShmAttach, shm=yes)
503 if test "$shm" = yes; then
504 shm=no
505 AC_CHECK_HEADERS(sys/ipc.h, shm=yes)
506 if test "$shm" = yes; then
507 shm=no
508 AC_CHECK_HEADERS(sys/shm.h, shm=yes)
509 fi
510 fi
511
523ced2 text/plugin: Make unused args for print events NULL (previously only …
zed authored
512 LIBS=$oldl
c32a1cc xtext: use mit-shm for tinting image.
zed authored
513 if test "$shm" = yes; then
fbf6750 configure.in: python amd64 suse configure.in patch (Mads Martin Joerg…
zed authored
514 GUI_LIBS="$GUI_LIBS `$pkgconfigpath --libs-only-L xft` -lX11 -lXext"
c32a1cc xtext: use mit-shm for tinting image.
zed authored
515 AC_DEFINE(USE_SHM)
516 else
517 CPPFLAGS=$oldc
518 fi
519 fi
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
520
521 dnl *********************************************************************
522 dnl ** MMX **************************************************************
523 dnl *********************************************************************
524
525 dnl we don't need mmx on *this* machine, just i386, because
526 dnl it's checked at runtime.
527 if test "$mmx" = "yes"; then
528 case $host_cpu in
529 i386|i486|i586|i686|i786|k6|k7)
530 mmx=yes
531 ;;
532 *)
533 mmx=no
534 esac
7bfa0b1 *** empty log message ***
zed authored
535 if test "$system" = "OpenBSD"; then
536 dnl openbsd fails because mmx_cmod doesn't prefix its symbols with underscore.
537 dnl xtext.o: Undefined symbol `_shade_ximage_15_mmx' referenced from text segment
538 mmx=no
539 fi
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
540 if test "$mmx" = "yes"; then
541 AC_DEFINE(USE_MMX)
542 fi
543 fi
544
545 AM_CONDITIONAL(USE_MMX, test "$mmx" = "yes")
546
547 dnl *********************************************************************
548 dnl ** GCC FLAGS ********************************************************
549 dnl *********************************************************************
550
551 dnl Only use -Wall and -pipe if we have gcc
552 if test "x$GCC" = "xyes"; then
553 if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
554 CFLAGS="$CFLAGS -Wall"
555 fi
556 if test "$system" = "Linux" -o "$system" = "FreeBSD"; then
557 if test -z "`echo "$CFLAGS" | grep "\-pipe" 2> /dev/null`" ; then
558 CFLAGS="$CFLAGS -pipe"
559 fi
560 fi
561 if test -z "`echo "$CFLAGS" | grep "\-g " 2> /dev/null`" ; then
562 CFLAGS="$CFLAGS -g"
563 fi
564 fi
565
566 dnl *********************************************************************
567 dnl ** FUNCTIONS/LIBS/CFLAGS ********************************************
568 dnl *********************************************************************
569
55ab1ef Checked in rehashed po files.
zed authored
570 AC_MSG_CHECKING(for modern sigaction)
571 dnl libc5 on linux and FreeBSD 3.x doesn't have siginfo_t
572 dnl and the sa_sigation field.
573 AC_TRY_COMPILE(
574 [#include <signal.h>],
575 [struct sigaction act;
576 siginfo_t *si;
577 act.sa_sigaction = 0;],
578 [
579 AC_MSG_RESULT(yes)
580 AC_DEFINE(USE_SIGACTION)
581 ],
582 AC_MSG_RESULT(no))
583
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
584 AC_PATH_PROG(gdkpixbufcsourcepath, gdk-pixbuf-csource)
585 AC_SUBST(gdkpixbufcsourcepath)
586 if test "$gtkfe" != no -a "_$gdkpixbufcsourcepath" = _; then
587 AC_MSG_ERROR("Cannot find gdk-pixbuf-csource: Install GTK+ 2.0\!")
588 fi
589
590 dnl if we don't have this, use g_snprintf instead
591 AC_CHECK_FUNCS(snprintf)
592 AC_CHECK_FUNCS(vsnprintf)
6b5aa04 exec_data(): use memrchr to avoid deadlock at embedded nulls. Check f…
zed authored
593 AC_CHECK_FUNCS(memrchr)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
594
595 AC_CHECK_FUNC(gethostbyname, ,
596 AC_CHECK_LIB(resolv, gethostbyname, ,
597 AC_CHECK_LIB(nsl, gethostbyname)))
598
599 AC_CHECK_FUNC(gethostname, , AC_CHECK_LIB(nsl, gethostname))
600
601 dnl necessary for IRIX
602 AC_CHECK_HEADERS(strings.h)
603
604 dnl Check for type in sys/socket.h - from Squid source (GPL)
605 AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, [
606 AC_EGREP_CPP([socklen_t[^a-zA-Z_0-9]], [#include <sys/types.h>
607 #include <sys/socket.h>
608 #if STDC_HEADERS
609 #include <stdlib.h>
610 #include <stddef.h>
611 #endif],
612 ac_cv_type_socklen_t=yes,
613 ac_cv_type_socklen_t=no)
614 ])
615 if test $ac_cv_type_socklen_t = no; then
616 AC_DEFINE(socklen_t, int)
617 fi
618
619 dnl freebsd needs this
620 LIBS="$LIBS $INTLLIBS"
3d173b5 *** empty log message ***
zed authored
621 CFLAGS="$CFLAGS $CPPFLAGS"
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
622
623 dnl make these visible to all Makefiles
624 AC_SUBST(GUI_LIBS)
625 AC_SUBST(GUI_CFLAGS)
626 AC_SUBST(COMMON_LIBS)
627 AC_SUBST(COMMON_CFLAGS)
628 AC_SUBST(PERL_CFLAGS)
629 AC_SUBST(PERL_LDFLAGS)
630 AC_SUBST(PY_CFLAGS)
631 AC_SUBST(PY_LIBS)
615cad4 more tcl detection tweaks
zed authored
632 AC_SUBST(TCL_LIBS)
633 AC_SUBST(TCL_CFLAGS)
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
634
635 PLUGIN_INCLUDES='-I$(top_srcdir)/plugins'
636 AC_SUBST(PLUGIN_INCLUDES)
637
638 if test "x${prefix}" = "xNONE"; then
639 AC_DEFINE_UNQUOTED(PREFIX, "${ac_default_prefix}")
700f097 configure.in: Add new config.h entries: XCHATLIBDIR, XCHATSHAREDIR.
zed authored
640 AC_DEFINE_UNQUOTED(XCHATLIBDIR, "${ac_default_prefix}/lib/xchat")
641 AC_DEFINE_UNQUOTED(XCHATSHAREDIR, "${ac_default_prefix}/share/xchat")
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
642 else
643 AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
700f097 configure.in: Add new config.h entries: XCHATLIBDIR, XCHATSHAREDIR.
zed authored
644 AC_DEFINE_UNQUOTED(XCHATLIBDIR, "${prefix}/lib/xchat")
645 AC_DEFINE_UNQUOTED(XCHATSHAREDIR, "${prefix}/share/xchat")
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
646 fi
647
7e82bfb configure.in: Put back xchatlibdir variable, since the Makefiles in p…
zed authored
648 dnl for plugins/xxx/Makefile.am
649 xchatlibdir=${libdir}/xchat
650 AC_SUBST(xchatlibdir)
651
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
652 AC_OUTPUT([
653 Makefile
654 src/Makefile
655 src/common/Makefile
656 src/fe-text/Makefile
657 src/fe-gtk/Makefile
658 src/pixmaps/Makefile
659 plugins/Makefile
660 plugins/python/Makefile
661 plugins/perl/Makefile
08c40c7 *** empty log message ***
zed authored
662 plugins/tcl/Makefile
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
663 intl/Makefile
664 po/Makefile.in
665 ])
666
667 echo
668 echo xchat $VERSION
669 echo
670 echo Building GTK+ Interface .... : $gtkfe
671 echo Building TEXT Interface .... : $textfe
672 echo
08c40c7 *** empty log message ***
zed authored
673 echo PLUGINS: Perl: $perl Python: $python TCL: $tcl
674 echo
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
675 echo mmx tinting ......... : $mmx
c32a1cc xtext: use mit-shm for tinting image.
zed authored
676 echo XShm tinting ........ : $shm\ plugin interface .... : $plugin
debc48d *** empty log message ***
zed authored
677 if test "$xft" = no; then
c32a1cc xtext: use mit-shm for tinting image.
zed authored
678 echo text backend ........ : pango\ nls/gettext ......... : $USE_NLS
debc48d *** empty log message ***
zed authored
679 else
c32a1cc xtext: use mit-shm for tinting image.
zed authored
680 echo text backend ........ : xft\ nls/gettext ......... : $USE_NLS
debc48d *** empty log message ***
zed authored
681 fi
08c40c7 *** empty log message ***
zed authored
682 echo openssl support ..... : $openssl\ ipv6 support ........ : $ipv6
95863e1 git-svn-id: https://xchat.svn.sourceforge.net/svnroot/xchat@2 893a96b…
zed authored
683 echo
684 echo The binary will be installed in $prefix/bin
685 echo
686
687 if test "$gtkfe" = no; then
688 echo Warning: The GTK \(GUI\) frontend will not be built.
689 echo
690 fi
691
692 echo configure complete, now type \'make\' and pray.
693 echo
Something went wrong with that request. Please try again.