author | Mikael Berthe <mikael@lilotux.net> |
Tue, 06 Oct 2009 21:32:30 +0200 | |
changeset 1593 | 06fdfff29175 |
parent 1590 | 8d1bcc83ae32 |
child 1596 | afa0d463854b |
permissions | -rw-r--r-- |
68 | 1 |
# -*- Autoconf -*- |
2 |
# Process this file with autoconf to produce a configure script. |
|
3 |
||
4 |
AC_PREREQ(2.59) |
|
1593
06fdfff29175
Ready for release 0.9.10
Mikael Berthe <mikael@lilotux.net>
parents:
1590
diff
changeset
|
5 |
AC_INIT([mcabber],[0.9.10],[mcabber@lilotux.net]) |
68 | 6 |
AM_INIT_AUTOMAKE |
7 |
AC_CONFIG_SRCDIR([src]) |
|
145 | 8 |
AM_CONFIG_HEADER(config.h) |
68 | 9 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
10 |
#AC_PROG_LIBTOOL |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
11 |
AC_PROG_RANLIB |
68 | 12 |
|
13 |
# Checks for programs. |
|
14 |
AC_PROG_CC |
|
15 |
AC_PROG_INSTALL |
|
16 |
||
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
17 |
if test "x$GCC" = "xyes"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
18 |
dnl Get gcc version |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
19 |
AC_MSG_CHECKING([gcc version]) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
20 |
gccver=$($CC -dumpversion) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
21 |
gccvermajor=$(echo $gccver | cut -d . -f1) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
22 |
gccverminor=$(echo $gccver | cut -d . -f2) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
23 |
gccvernum=$(expr $gccvermajor "*" 100 + $gccverminor) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
24 |
AC_MSG_RESULT($gccver) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
25 |
|
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
26 |
CFLAGS="$CFLAGS -Wall" |
1332
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
27 |
if test x"$gccvermajor" = x"4" -a x"$gccverminor" = x"2"; then |
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
28 |
DBGCFLAGS="-fgnu89-inline" |
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
29 |
fi |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
30 |
fi |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
31 |
|
1583
c431fa9e2876
Use AC_SYS_LARGEFILE in configure.ac
Mikael Berthe <mikael@lilotux.net>
parents:
1575
diff
changeset
|
32 |
AC_SYS_LARGEFILE |
c431fa9e2876
Use AC_SYS_LARGEFILE in configure.ac
Mikael Berthe <mikael@lilotux.net>
parents:
1575
diff
changeset
|
33 |
|
68 | 34 |
# Checks for header files. |
35 |
AC_HEADER_STDC |
|
744
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
36 |
AC_CHECK_HEADERS([arpa/inet.h fcntl.h locale.h netdb.h netinet/in.h stddef.h \ |
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
37 |
stdlib.h string.h strings.h sys/socket.h sys/time.h \ |
1499
1eb27a3bb457
Fix buggy check in configure.ac
Mikael Berthe <mikael@lilotux.net>
parents:
1497
diff
changeset
|
38 |
syslog.h termios.h wchar.h wctype.h localcharset.h]) |
1eb27a3bb457
Fix buggy check in configure.ac
Mikael Berthe <mikael@lilotux.net>
parents:
1497
diff
changeset
|
39 |
AC_CHECK_HEADERS([unistd.h], , AC_MSG_ERROR([Missing header file])) |
800 | 40 |
AC_VAR_TIMEZONE_EXTERNALS |
68 | 41 |
|
42 |
# Checks for typedefs, structures, and compiler characteristics. |
|
43 |
AC_HEADER_STDBOOL |
|
44 |
AC_C_CONST |
|
45 |
AC_C_INLINE |
|
46 |
AC_TYPE_SIZE_T |
|
47 |
AC_HEADER_TIME |
|
48 |
AC_STRUCT_TM |
|
49 |
||
50 |
# Checks for library functions. |
|
51 |
AC_FUNC_ERROR_AT_LINE |
|
52 |
AC_FUNC_MALLOC |
|
53 |
AC_FUNC_MEMCMP |
|
54 |
AC_FUNC_REALLOC |
|
55 |
AC_FUNC_SELECT_ARGTYPES |
|
56 |
AC_TYPE_SIGNAL |
|
57 |
AC_FUNC_STRFTIME |
|
58 |
AC_FUNC_VPRINTF |
|
1497
35020a2ed115
Do not use srand()/rand() if better alternatives exist (mirabilos)
Mikael Berthe <mikael@lilotux.net>
parents:
1481
diff
changeset
|
59 |
AC_CHECK_FUNCS([alarm arc4random bzero gethostbyname gethostname inet_ntoa \ |
35020a2ed115
Do not use srand()/rand() if better alternatives exist (mirabilos)
Mikael Berthe <mikael@lilotux.net>
parents:
1481
diff
changeset
|
60 |
isascii memmove memset modf select setlocale socket strcasecmp \ |
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
61 |
strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf \ |
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
62 |
iswblank]) |
800 | 63 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
64 |
|
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
65 |
AC_CHECK_DECLS([strptime],,, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
66 |
[#define _GNU_SOURCE |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
67 |
#include <time.h>]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
68 |
|
800 | 69 |
# Check for tm_gmtoff |
70 |
MC_TM_GMTOFF |
|
68 | 71 |
|
1454
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
72 |
# Check if we must provide a SIGWINCH handler |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
73 |
AC_ARG_ENABLE(sigwinch, |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
74 |
[ --enable-sigwinch compile with SIGWINCH handler], |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
75 |
[with_sigwinch=$enableval], |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
76 |
[with_sigwinch=$with_ext_funcs]) |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
77 |
AC_MSG_RESULT($with_sigwinch) |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
78 |
if test "$with_sigwinch" = yes; then |
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
79 |
AC_DEFINE([USE_SIGWINCH], [], [Provide own SIGWINCH handler]) |
1454
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
80 |
fi |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
81 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
82 |
# Checks for libraries. |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
83 |
|
1411
4029e3447f2b
Add a check for libcharset
Mikael Berthe <mikael@lilotux.net>
parents:
1407
diff
changeset
|
84 |
AC_CHECK_LIB(charset, locale_charset) |
4029e3447f2b
Add a check for libcharset
Mikael Berthe <mikael@lilotux.net>
parents:
1407
diff
changeset
|
85 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
86 |
AC_CHECK_FUNC(initscr,, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
87 |
[ |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
88 |
cf_ncurses="ncurses" |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
89 |
for lib in ncursesw ncurses |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
90 |
do |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
91 |
AC_CHECK_LIB($lib, waddnwstr, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
92 |
[cf_ncurses="$lib"; cf_ncurses_unicode="yes"; break]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
93 |
done |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
94 |
AC_CHECK_LIB($cf_ncurses, initscr, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
95 |
[LIBS="$LIBS -l$cf_ncurses" |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
96 |
if test "$cf_ncurses" = ncursesw; then |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
97 |
AC_CHECK_HEADERS([ncursesw/ncurses.h ncursesw/panel.h],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
98 |
[AC_CHECK_HEADERS([ncurses.h panel.h],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
99 |
AC_MSG_ERROR([Missing header file]))]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
100 |
else |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
101 |
AC_CHECK_HEADERS([ncurses/ncurses.h ncurses/panel.h],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
102 |
[AC_CHECK_HEADERS([ncurses.h panel.h],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
103 |
AC_MSG_ERROR([Missing header file]))]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
104 |
fi |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
105 |
], |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
106 |
[CF_CURSES_LIBS]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
107 |
]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
108 |
|
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
109 |
AC_CHECK_LIB([panelw], [new_panel],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
110 |
AC_CHECK_LIB([panel], [new_panel]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
111 |
) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
112 |
|
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
113 |
if test x"$cf_ncurses_unicode" = x"yes"; then |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
114 |
AC_DEFINE([HAVE_UNICODE], [], [Define if ncurses have unicode support]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
115 |
else |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
116 |
AC_MSG_WARN([Your ncurses installation does not support unicode]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
117 |
fi |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
118 |
|
1386 | 119 |
AC_CACHE_CHECK([for ESCDELAY variable], |
120 |
[mc_cv_ncurses_escdelay], |
|
121 |
[AC_TRY_LINK([], [ |
|
122 |
extern int ESCDELAY; |
|
123 |
ESCDELAY = 0; |
|
124 |
], |
|
125 |
[mc_cv_ncurses_escdelay=yes], |
|
126 |
[mc_cv_ncurses_escdelay=no]) |
|
127 |
]) |
|
128 |
if test "$mc_cv_ncurses_escdelay" = yes; then |
|
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
129 |
AC_DEFINE([HAVE_ESCDELAY], 1, |
1386 | 130 |
[Define if ncurses has ESCDELAY variable]) |
131 |
fi |
|
132 |
||
73 | 133 |
# Check for glib |
1521
33f8f795abd2
Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents:
1499
diff
changeset
|
134 |
AM_PATH_GLIB_2_0(2.14.0, |
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
135 |
[AC_DEFINE([HAVE_GLIB_REGEX], 1, |
1523 | 136 |
[Define if GLib has regex support])], |
137 |
[AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]), |
|
138 |
[g_list_append])], |
|
1521
33f8f795abd2
Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents:
1499
diff
changeset
|
139 |
[g_regex_new]) |
33f8f795abd2
Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents:
1499
diff
changeset
|
140 |
|
1040 | 141 |
# Check for gpgme |
1456
5e99e802656c
Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents:
1454
diff
changeset
|
142 |
AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--disable-gpgme], [disable GPGME support]), |
1040 | 143 |
[ if test x"$enableval" = x"no"; then |
144 |
enable_gpgme=no |
|
145 |
fi |
|
146 |
]) |
|
147 |
||
148 |
if test x"${enable_gpgme}" != x"no"; then |
|
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
149 |
AM_PATH_GPGME(1.0.0, AC_DEFINE([HAVE_GPGME], 1, |
1040 | 150 |
[Define if you use GPGME to support OpenPGP])) |
151 |
fi |
|
152 |
||
1300
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
153 |
# Check for otr |
1456
5e99e802656c
Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents:
1454
diff
changeset
|
154 |
AC_ARG_ENABLE(otr, [ --enable-otr enable OTR (Off-the-Record) messaging support], |
1300
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
155 |
enable_otr=$enableval, otr="") |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
156 |
if test "x$enable_otr" = "xyes"; then |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
157 |
# Look for libgcrypt and libotr |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
158 |
AM_PATH_LIBGCRYPT(1.2.2, [ |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
159 |
AM_PATH_LIBOTR(3.1.0, , |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
160 |
AC_MSG_ERROR(libotr 3.1.0 or newer is required.)) |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
161 |
], AC_MSG_ERROR(libgcrypt 1.2.2 or newer is required.) |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
162 |
) |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
163 |
fi |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
164 |
|
69 | 165 |
AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL |
742 | 166 |
or GnuTLS], |
167 |
[with_ssl=$withval]) |
|
69 | 168 |
|
169 |
if test "$with_ssl" != "no"; then |
|
170 |
AC_ARG_WITH(openssl, |
|
742 | 171 |
[ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL |
172 |
library in DIR (optional)], |
|
173 |
[with_openssl=$withval]) |
|
69 | 174 |
|
175 |
if test -z "$with_openssl"; then |
|
742 | 176 |
for ac_dir in /usr/local /usr; do |
177 |
if test -f "$ac_dir/include/openssl/ssl.h"; then |
|
178 |
with_openssl=$ac_dir |
|
179 |
break; |
|
180 |
fi |
|
181 |
done |
|
69 | 182 |
fi |
183 |
||
184 |
AC_MSG_CHECKING(for OpenSSL) |
|
185 |
||
186 |
if test -n "$with_openssl" -a "$with_openssl" != "no"; then |
|
742 | 187 |
if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi |
188 |
CFLAGS="$CFLAGS -I${with_openssl}" |
|
189 |
AC_DEFINE([HAVE_OPENSSL], [], [OpenSSL]) |
|
190 |
AC_MSG_RESULT([found in $with_openssl]) |
|
1025
804aebb39028
[BP-d530e5fb506a] Fix SSL on OS X
Mikael Berthe <mikael@lilotux.net>
parents:
1024
diff
changeset
|
191 |
AC_CHECK_LIB(crypto, main) |
742 | 192 |
AC_CHECK_LIB(ssl, main) |
69 | 193 |
else |
742 | 194 |
AC_MSG_RESULT([not found or disabled]) |
69 | 195 |
|
1586
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
196 |
PKG_PROG_PKG_CONFIG |
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
197 |
PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.0.0], |
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
198 |
have_gnutls=yes, have_gnutls=no) |
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
199 |
if test "$have_gnutls" = "yes"; then |
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
200 |
AC_DEFINE([HAVE_GNUTLS], 1, [GNU TLS]) |
1253 | 201 |
CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS" |
1586
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
202 |
LIBS="$LIBS $LIBGNUTLS_LIBS" |
590ade2780bd
Use pkg-config to detect GnuTLS instead of the m4 macros
Mikael Berthe <mikael@lilotux.net>
parents:
1583
diff
changeset
|
203 |
fi |
69 | 204 |
fi |
205 |
fi |
|
206 |
||
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
207 |
# Check for Enchant stuff |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
208 |
AC_ARG_ENABLE(enchant, [ --enable-enchant enable enchant support], |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
209 |
enable_enchant=$enableval, enchant="") |
1179 | 210 |
# Check for Aspell stuff |
1456
5e99e802656c
Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents:
1454
diff
changeset
|
211 |
AC_ARG_ENABLE(aspell, [ --enable-aspell enable aspell support], |
1179 | 212 |
enable_aspell=$enableval, aspell="") |
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
213 |
|
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
214 |
if test "x$enable_enchant" = "xyes"; then |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
215 |
PKG_CHECK_MODULES(ENCHANT, [enchant], |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
216 |
AC_DEFINE(WITH_ENCHANT, 1, [define if you want enchant support]) |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
217 |
) |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
218 |
else |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
219 |
if test "x$enable_aspell" = "xyes"; then |
1179 | 220 |
AC_CHECK_HEADERS(aspell.h, [ have_aspell_includes=yes ]) |
221 |
if test "x$have_aspell_includes" = "xyes"; then |
|
222 |
AC_CHECK_LIB(aspell, new_aspell_config, [ have_aspell_libs=yes ]) |
|
223 |
if test "x$have_aspell_libs" = "xyes"; then |
|
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
224 |
AC_DEFINE([WITH_ASPELL], 1, [define if you want aspell support]) |
1179 | 225 |
LIBS="$LIBS -laspell" |
226 |
else |
|
227 |
enable_aspell=no |
|
228 |
fi |
|
229 |
else |
|
230 |
enable_aspell=no |
|
231 |
fi |
|
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
232 |
fi |
1179 | 233 |
fi |
234 |
||
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
235 |
AC_DEFINE([BUILD_JABBER], 1, [build with jabber support]) |
68 | 236 |
|
882
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
237 |
# Export $datadir to the source tree. |
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
238 |
if test x"${datadir}" != x""; then |
1388
40371a7d49f4
Fix DATA_DIR in configure.ac (patch from "undet")
Mikael Berthe <mikael@lilotux.net>
parents:
1386
diff
changeset
|
239 |
AC_DEFINE_DIR(DATA_DIR, datadir, [Data files directory]) |
868
cefdaeb42e67
Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents:
821
diff
changeset
|
240 |
fi |
cefdaeb42e67
Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents:
821
diff
changeset
|
241 |
|
741 | 242 |
AC_ARG_ENABLE(debug, |
1456
5e99e802656c
Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents:
1454
diff
changeset
|
243 |
[AC_HELP_STRING(--enable-debug, add development compilation options)], |
741 | 244 |
debug=$enableval, debug="") |
1040 | 245 |
if test x"${debug}" = x"yes"; then |
1423
757ebe4df0b9
Replace DEBUG_ENABLE with ENABLE_DEBUG
Mikael Berthe <mikael@lilotux.net>
parents:
1412
diff
changeset
|
246 |
AC_DEFINE_UNQUOTED([ENABLE_DEBUG],[1],[Devel compilation options]) |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
247 |
if test "x$GCC" = "xyes"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
248 |
if test "$gccvernum" -ge "400"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
249 |
CFLAGS="$CFLAGS -Wextra" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
250 |
else |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
251 |
CFLAGS="$CFLAGS -W" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
252 |
fi |
1332
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
253 |
CFLAGS="$CFLAGS -Wno-unused-parameter -pedantic -std=gnu99 $DBGCFLAGS -O0" |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
254 |
fi # gcc |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
255 |
CFLAGS="$CFLAGS -g" |
741 | 256 |
else |
1169
36450491b884
Change -O2 flag as suggested by Myhailo
Mikael Berthe <mikael@lilotux.net>
parents:
1152
diff
changeset
|
257 |
CFLAGS="-O2 $CFLAGS" |
741 | 258 |
fi |
259 |
||
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
260 |
AC_ARG_ENABLE(hgcset, |
1456
5e99e802656c
Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents:
1454
diff
changeset
|
261 |
[AC_HELP_STRING(--disable-hgcset, do not use Mercurial changeset value)], |
1216
8645b5166040
Use Mercurial changeset by default
Mikael Berthe <mikael@lilotux.net>
parents:
1211
diff
changeset
|
262 |
hgcset=$enableval, hgcset="yes") |
1426
a64778f5f26b
Implement FIFO named command pipe
Mikael Berthe <mikael@lilotux.net>
parents:
1423
diff
changeset
|
263 |
AM_CONDITIONAL(HGCSET, [test x$hgcset = xyes]) |
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
264 |
if test "${hgcset}" = "yes"; then |
1575
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
265 |
AC_DEFINE([ENABLE_HGCSET], 1, [Use Mercurial changeset]) |
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
266 |
fi |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
267 |
|
1309
887f8801418c
Only compile otr.c if libotr is available
franky@veqlargh.fs
parents:
1300
diff
changeset
|
268 |
AM_CONDITIONAL([OTR], [test x$libotr_found = xyes]) |
887f8801418c
Only compile otr.c if libotr is available
franky@veqlargh.fs
parents:
1300
diff
changeset
|
269 |
|
924
a07bd351008b
Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents:
923
diff
changeset
|
270 |
# We need _GNU_SOURCE for strptime() and strcasestr() |
a07bd351008b
Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents:
923
diff
changeset
|
271 |
CFLAGS="$CFLAGS -D_GNU_SOURCE" |
a07bd351008b
Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents:
923
diff
changeset
|
272 |
|
68 | 273 |
AC_CONFIG_FILES([connwrap/Makefile |
274 |
libjabber/Makefile |
|
275 |
src/Makefile |
|
233 | 276 |
doc/Makefile |
1559
0674abda9a8f
Add Franky's mcabber user guide
Mikael Berthe <mikael@lilotux.net>
parents:
1555
diff
changeset
|
277 |
doc/guide/Makefile |
903 | 278 |
doc/help/Makefile |
68 | 279 |
Makefile]) |
280 |
AC_OUTPUT |