author | Mikael Berthe <mikael@lilotux.net> |
Thu, 11 May 2017 14:35:35 +0200 | |
changeset 2315 | 1cfe6df4f7e6 |
parent 2302 | 245ec6d73380 |
child 2316 | 90b3e9876641 |
permissions | -rw-r--r-- |
68 | 1 |
# -*- Autoconf -*- |
2 |
# Process this file with autoconf to produce a configure script. |
|
3 |
||
4 |
AC_PREREQ(2.59) |
|
2302 | 5 |
AC_INIT([mcabber],[1.0.6-dev],[mcabber@lilotux.net]) |
2077
f81b4a97afaa
Add XC_AUTOMAKE from Daniel Stenberg and use subdir-objects
Mikael Berthe <mikael@lilotux.net>
parents:
2076
diff
changeset
|
6 |
XC_AUTOMAKE |
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1639
diff
changeset
|
7 |
AC_CONFIG_SRCDIR([mcabber]) |
2084 | 8 |
AC_CONFIG_HEADERS([mcabber/config.h]) |
9 |
AC_CONFIG_HEADERS([include/config.h]) |
|
68 | 10 |
|
1671
411269409f34
Add in-tree beep example module
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1670
diff
changeset
|
11 |
AC_PROG_LIBTOOL |
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
12 |
AC_PROG_RANLIB |
68 | 13 |
|
14 |
# Checks for programs. |
|
15 |
AC_PROG_CC |
|
16 |
AC_PROG_INSTALL |
|
17 |
||
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
18 |
if test "x$GCC" = "xyes"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
19 |
dnl Get gcc version |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
20 |
AC_MSG_CHECKING([gcc version]) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
21 |
gccver=$($CC -dumpversion) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
22 |
gccvermajor=$(echo $gccver | cut -d . -f1) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
23 |
gccverminor=$(echo $gccver | cut -d . -f2) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
24 |
gccvernum=$(expr $gccvermajor "*" 100 + $gccverminor) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
25 |
AC_MSG_RESULT($gccver) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
26 |
|
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
27 |
CFLAGS="$CFLAGS -Wall" |
1332
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
28 |
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
|
29 |
DBGCFLAGS="-fgnu89-inline" |
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
30 |
fi |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
31 |
fi |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
32 |
|
1583
c431fa9e2876
Use AC_SYS_LARGEFILE in configure.ac
Mikael Berthe <mikael@lilotux.net>
parents:
1571
diff
changeset
|
33 |
AC_SYS_LARGEFILE |
c431fa9e2876
Use AC_SYS_LARGEFILE in configure.ac
Mikael Berthe <mikael@lilotux.net>
parents:
1571
diff
changeset
|
34 |
|
1880
668657be02ba
Honour libidn build flags
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1849
diff
changeset
|
35 |
PKG_PROG_PKG_CONFIG |
668657be02ba
Honour libidn build flags
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1849
diff
changeset
|
36 |
|
68 | 37 |
# Checks for header files. |
38 |
AC_HEADER_STDC |
|
744
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
39 |
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
|
40 |
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
|
41 |
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
|
42 |
AC_CHECK_HEADERS([unistd.h], , AC_MSG_ERROR([Missing header file])) |
800 | 43 |
AC_VAR_TIMEZONE_EXTERNALS |
68 | 44 |
|
45 |
# Checks for typedefs, structures, and compiler characteristics. |
|
46 |
AC_HEADER_STDBOOL |
|
47 |
AC_C_CONST |
|
48 |
AC_C_INLINE |
|
49 |
AC_TYPE_SIZE_T |
|
50 |
AC_HEADER_TIME |
|
51 |
AC_STRUCT_TM |
|
52 |
||
53 |
# Checks for library functions. |
|
54 |
AC_FUNC_ERROR_AT_LINE |
|
55 |
AC_FUNC_MALLOC |
|
56 |
AC_FUNC_MEMCMP |
|
57 |
AC_FUNC_REALLOC |
|
58 |
AC_FUNC_SELECT_ARGTYPES |
|
59 |
AC_TYPE_SIGNAL |
|
60 |
AC_FUNC_STRFTIME |
|
61 |
AC_FUNC_VPRINTF |
|
1497
35020a2ed115
Do not use srand()/rand() if better alternatives exist (mirabilos)
Mikael Berthe <mikael@lilotux.net>
parents:
1481
diff
changeset
|
62 |
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
|
63 |
isascii memmove memset modf select setlocale socket strcasecmp \ |
1571
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
64 |
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
|
65 |
iswblank]) |
800 | 66 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
67 |
|
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
68 |
AC_CHECK_DECLS([strptime],,, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
69 |
[#define _GNU_SOURCE |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
70 |
#include <time.h>]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
71 |
|
800 | 72 |
# Check for tm_gmtoff |
73 |
MC_TM_GMTOFF |
|
68 | 74 |
|
1454
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
75 |
# Check if we must provide a SIGWINCH handler |
2229
773590bd2a8a
autoconf: Display the result of the --enable-sigwinch check
Mikael Berthe <mikael@lilotux.net>
parents:
2179
diff
changeset
|
76 |
AC_MSG_CHECKING([if we use our own SIGWINCH handler]) |
1454
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
77 |
AC_ARG_ENABLE(sigwinch, |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
78 |
AC_HELP_STRING([--enable-sigwinch], [compile with SIGWINCH handler]), |
1454
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
79 |
[with_sigwinch=$enableval], |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
80 |
[with_sigwinch=$with_ext_funcs]) |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
81 |
if test "$with_sigwinch" = yes; then |
2229
773590bd2a8a
autoconf: Display the result of the --enable-sigwinch check
Mikael Berthe <mikael@lilotux.net>
parents:
2179
diff
changeset
|
82 |
AC_MSG_RESULT($with_sigwinch) |
1571
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
83 |
AC_DEFINE([USE_SIGWINCH], [], [Provide own SIGWINCH handler]) |
2229
773590bd2a8a
autoconf: Display the result of the --enable-sigwinch check
Mikael Berthe <mikael@lilotux.net>
parents:
2179
diff
changeset
|
84 |
else |
773590bd2a8a
autoconf: Display the result of the --enable-sigwinch check
Mikael Berthe <mikael@lilotux.net>
parents:
2179
diff
changeset
|
85 |
AC_MSG_RESULT(no) |
1454
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
86 |
fi |
6b98dc22946d
Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents:
1448
diff
changeset
|
87 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
88 |
# Checks for libraries. |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
89 |
|
1411
4029e3447f2b
Add a check for libcharset
Mikael Berthe <mikael@lilotux.net>
parents:
1407
diff
changeset
|
90 |
AC_CHECK_LIB(charset, locale_charset) |
4029e3447f2b
Add a check for libcharset
Mikael Berthe <mikael@lilotux.net>
parents:
1407
diff
changeset
|
91 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
92 |
AC_CHECK_FUNC(initscr,, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
93 |
[ |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
94 |
cf_ncurses="ncurses" |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
95 |
for lib in ncursesw ncurses |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
96 |
do |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
97 |
AC_CHECK_LIB($lib, waddnwstr, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
98 |
[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
|
99 |
done |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
100 |
AC_CHECK_LIB($cf_ncurses, initscr, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
101 |
[LIBS="$LIBS -l$cf_ncurses" |
2269
766666eb6928
Link with the tinfo library
Mikael Berthe <mikael@lilotux.net>
parents:
2260
diff
changeset
|
102 |
|
766666eb6928
Link with the tinfo library
Mikael Berthe <mikael@lilotux.net>
parents:
2260
diff
changeset
|
103 |
AC_CHECK_LIB(tinfo, tgetent, [LIBS="$LIBS -ltinfo"]) |
766666eb6928
Link with the tinfo library
Mikael Berthe <mikael@lilotux.net>
parents:
2260
diff
changeset
|
104 |
|
1089
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
105 |
if test "$cf_ncurses" = ncursesw; then |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
106 |
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
|
107 |
[AC_CHECK_HEADERS([ncurses.h panel.h],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
108 |
AC_MSG_ERROR([Missing header file]))]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
109 |
else |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
110 |
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
|
111 |
[AC_CHECK_HEADERS([ncurses.h panel.h],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
112 |
AC_MSG_ERROR([Missing header file]))]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
113 |
fi |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
114 |
], |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
115 |
[CF_CURSES_LIBS]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
116 |
]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
117 |
|
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
118 |
AC_CHECK_LIB([panelw], [new_panel],, |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
119 |
AC_CHECK_LIB([panel], [new_panel]) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
120 |
) |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
121 |
|
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
122 |
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
|
123 |
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
|
124 |
else |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
125 |
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
|
126 |
fi |
a61c3311a5bb
Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents:
1040
diff
changeset
|
127 |
|
1386 | 128 |
AC_CACHE_CHECK([for ESCDELAY variable], |
129 |
[mc_cv_ncurses_escdelay], |
|
130 |
[AC_TRY_LINK([], [ |
|
131 |
extern int ESCDELAY; |
|
132 |
ESCDELAY = 0; |
|
133 |
], |
|
134 |
[mc_cv_ncurses_escdelay=yes], |
|
135 |
[mc_cv_ncurses_escdelay=no]) |
|
136 |
]) |
|
137 |
if test "$mc_cv_ncurses_escdelay" = yes; then |
|
1571
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
138 |
AC_DEFINE([HAVE_ESCDELAY], 1, |
1386 | 139 |
[Define if ncurses has ESCDELAY variable]) |
140 |
fi |
|
141 |
||
1833
760affbebb96
Enable modules by default
Mikael Berthe <mikael@lilotux.net>
parents:
1827
diff
changeset
|
142 |
AC_ARG_ENABLE(modules, AC_HELP_STRING([--disable-modules], |
760affbebb96
Enable modules by default
Mikael Berthe <mikael@lilotux.net>
parents:
1827
diff
changeset
|
143 |
[disable dynamic modules loading]), |
1607 | 144 |
enable_modules=$enableval) |
1833
760affbebb96
Enable modules by default
Mikael Berthe <mikael@lilotux.net>
parents:
1827
diff
changeset
|
145 |
if test "x$enable_modules" != "xno"; then |
1607 | 146 |
AC_DEFINE(MODULES_ENABLE, 1, [Define if you want dynamic modules loading]) |
147 |
gmodule_module=gmodule |
|
148 |
else |
|
149 |
gmodule_module='' |
|
150 |
fi |
|
151 |
||
73 | 152 |
# Check for glib |
1521
33f8f795abd2
Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents:
1499
diff
changeset
|
153 |
AM_PATH_GLIB_2_0(2.14.0, |
1571
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
154 |
[AC_DEFINE([HAVE_GLIB_REGEX], 1, |
1523 | 155 |
[Define if GLib has regex support])], |
156 |
[AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]), |
|
1607 | 157 |
[g_list_append], ["$gmodule_module"])], |
158 |
[g_regex_new "$gmodule_module"]) |
|
1521
33f8f795abd2
Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents:
1499
diff
changeset
|
159 |
|
1601
3efc92a48945
Add pkg check for the Loudmouth library
Mikael Berthe <mikael@lilotux.net>
parents:
1598
diff
changeset
|
160 |
# Check for loudmouth |
1609
af5bdd167b04
Lower Loudmouth version requirement
Mikael Berthe <mikael@lilotux.net>
parents:
1607
diff
changeset
|
161 |
PKG_CHECK_MODULES(LOUDMOUTH, loudmouth-1.0 >= 1.4.2) |
2248
377b6a52b25f
Prepare for loudmouth with sha256 support (>=1.5.3)
franky
parents:
2244
diff
changeset
|
162 |
PKG_CHECK_MODULES(LOUDMOUTH_SHA256, [loudmouth-1.0 >= 1.5.3], |
377b6a52b25f
Prepare for loudmouth with sha256 support (>=1.5.3)
franky
parents:
2244
diff
changeset
|
163 |
AC_DEFINE([LOUDMOUTH_USES_SHA256], 1, |
377b6a52b25f
Prepare for loudmouth with sha256 support (>=1.5.3)
franky
parents:
2244
diff
changeset
|
164 |
[loudmouth is now using a new digest] |
377b6a52b25f
Prepare for loudmouth with sha256 support (>=1.5.3)
franky
parents:
2244
diff
changeset
|
165 |
), |
377b6a52b25f
Prepare for loudmouth with sha256 support (>=1.5.3)
franky
parents:
2244
diff
changeset
|
166 |
[] |
2269
766666eb6928
Link with the tinfo library
Mikael Berthe <mikael@lilotux.net>
parents:
2260
diff
changeset
|
167 |
) |
1598 | 168 |
|
2086 | 169 |
# Check for lm_ssl_set_cipher_list in loudmouth |
170 |
AC_CHECK_LIB(loudmouth-1, lm_ssl_set_cipher_list, |
|
171 |
AC_DEFINE([HAVE_LM_SSL_CIPHER_LIST], 1, |
|
172 |
[Define that loudmouth has lm_ssl_cipher_list] |
|
173 |
) |
|
174 |
) |
|
2089
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
175 |
# Check for lm_ssl_set_cipher_list in loudmouth |
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
176 |
AC_CHECK_LIB(loudmouth-1, lm_ssl_set_ca, |
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
177 |
AC_DEFINE([HAVE_LM_SSL_CA], 1, |
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
178 |
[Define that loudmouth has lm_ssl_ca] |
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
179 |
) |
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
180 |
) |
91a8f3740a1a
Added setting "ssl_ca" to set additional certificates to trust
franky
parents:
2086
diff
changeset
|
181 |
|
2086 | 182 |
|
1639 | 183 |
# Check for libidn |
184 |
AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]], |
|
185 |
[Support IDN (needs GNU Libidn)]), |
|
186 |
libidn=$withval, libidn=yes) |
|
187 |
if test "$libidn" != "no" ; then |
|
188 |
PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no]) |
|
189 |
if test "$libidn" != "yes" ; then |
|
190 |
libidn=no |
|
191 |
AC_MSG_WARN([Libidn not found]) |
|
192 |
else |
|
193 |
libidn=yes |
|
194 |
AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you want Libidn.]) |
|
195 |
fi |
|
196 |
fi |
|
197 |
||
1040 | 198 |
# Check for gpgme |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
199 |
AC_ARG_ENABLE(gpgme, |
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
200 |
AC_HELP_STRING([--disable-gpgme], [disable GPGME support]), |
1040 | 201 |
[ if test x"$enableval" = x"no"; then |
202 |
enable_gpgme=no |
|
203 |
fi |
|
204 |
]) |
|
205 |
||
206 |
if test x"${enable_gpgme}" != x"no"; then |
|
1571
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
207 |
AM_PATH_GPGME(1.0.0, AC_DEFINE([HAVE_GPGME], 1, |
1040 | 208 |
[Define if you use GPGME to support OpenPGP])) |
209 |
fi |
|
210 |
||
1300
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
211 |
# Check for otr |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
212 |
AC_ARG_ENABLE(otr, |
2076
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
213 |
AC_HELP_STRING([--enable-otr], |
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
214 |
[enable OTR (Off-the-Record) messaging support]), |
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
215 |
enable_otr=$enableval, |
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
216 |
otr="") |
1300
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
217 |
if test "x$enable_otr" = "xyes"; then |
2150
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
218 |
# Look for libotr |
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
219 |
AM_PATH_LIBOTR(4.0.0, [ |
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
220 |
AC_DEFINE([HAVE_LIBOTR], 1, [Define if you use libotr]) |
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
221 |
], [ |
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
222 |
AM_PATH_LIBOTR(3.1.0, [ |
2076
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
223 |
AC_DEFINE([HAVE_LIBOTR], 1, [Define if you use libotr]) |
2150
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
224 |
AC_DEFINE([HAVE_LIBOTR3], 1, [Define if you use libotr v3]) |
2076
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
225 |
], [ |
2150
392cf37d5966
Get rid of the libgcrypt explicit dependency
Mikael Berthe <mikael@lilotux.net>
parents:
2097
diff
changeset
|
226 |
AC_MSG_ERROR(libotr 3.1.0 or newer is required.) |
2076
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
227 |
]) |
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
228 |
]) |
1300
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
229 |
fi |
0d4a1699accb
Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents:
1253
diff
changeset
|
230 |
|
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
231 |
# Check for Enchant stuff |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
232 |
AC_ARG_ENABLE(enchant, |
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
233 |
AC_HELP_STRING([--enable-enchant], [enable enchant support]), |
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
234 |
enable_enchant=$enableval, enchant="") |
1179 | 235 |
# Check for Aspell stuff |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
236 |
AC_ARG_ENABLE(aspell, |
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
237 |
AC_HELP_STRING([--enable-aspell], [enable aspell support]), |
1179 | 238 |
enable_aspell=$enableval, aspell="") |
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
239 |
|
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
240 |
if test "x$enable_enchant" = "xyes"; then |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
241 |
PKG_CHECK_MODULES(ENCHANT, [enchant], |
1606 | 242 |
AC_DEFINE(WITH_ENCHANT, 1, [Define if you want enchant support]) |
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
243 |
) |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
244 |
else |
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
245 |
if test "x$enable_aspell" = "xyes"; then |
1179 | 246 |
AC_CHECK_HEADERS(aspell.h, [ have_aspell_includes=yes ]) |
247 |
if test "x$have_aspell_includes" = "xyes"; then |
|
248 |
AC_CHECK_LIB(aspell, new_aspell_config, [ have_aspell_libs=yes ]) |
|
249 |
if test "x$have_aspell_libs" = "xyes"; then |
|
1606 | 250 |
AC_DEFINE([WITH_ASPELL], 1, [Define if you want aspell support]) |
1179 | 251 |
LIBS="$LIBS -laspell" |
252 |
else |
|
253 |
enable_aspell=no |
|
254 |
fi |
|
255 |
else |
|
256 |
enable_aspell=no |
|
257 |
fi |
|
1590
8d1bcc83ae32
Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents:
1586
diff
changeset
|
258 |
fi |
1179 | 259 |
fi |
260 |
||
882
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
261 |
# Export $datadir to the source tree. |
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
262 |
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
|
263 |
AC_DEFINE_DIR(DATA_DIR, datadir, [Data files directory]) |
868
cefdaeb42e67
Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents:
821
diff
changeset
|
264 |
fi |
cefdaeb42e67
Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents:
821
diff
changeset
|
265 |
|
1676
96b5484423af
Use $prefix/lib/mcabber as default modules_dir
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1671
diff
changeset
|
266 |
# Export $libexecdir to the source tree |
2260
972dd83d1c18
configure.ac: Default modules directory not set correctly on OpenBSD
Tim van der Molen <tim@openbsd.org>
parents:
2257
diff
changeset
|
267 |
pkglibdir=${libdir}/${PACKAGE} |
972dd83d1c18
configure.ac: Default modules directory not set correctly on OpenBSD
Tim van der Molen <tim@openbsd.org>
parents:
2257
diff
changeset
|
268 |
AC_DEFINE_DIR(PKGLIB_DIR, pkglibdir, [Modules directory]) |
1676
96b5484423af
Use $prefix/lib/mcabber as default modules_dir
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1671
diff
changeset
|
269 |
|
741 | 270 |
AC_ARG_ENABLE(debug, |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
271 |
AC_HELP_STRING([--enable-debug], [add development compilation options]), |
741 | 272 |
debug=$enableval, debug="") |
1040 | 273 |
if test x"${debug}" = x"yes"; then |
1423
757ebe4df0b9
Replace DEBUG_ENABLE with ENABLE_DEBUG
Mikael Berthe <mikael@lilotux.net>
parents:
1412
diff
changeset
|
274 |
AC_DEFINE_UNQUOTED([ENABLE_DEBUG],[1],[Devel compilation options]) |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
275 |
if test "x$GCC" = "xyes"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
276 |
if test "$gccvernum" -ge "400"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
277 |
CFLAGS="$CFLAGS -Wextra" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
278 |
else |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
279 |
CFLAGS="$CFLAGS -W" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
280 |
fi |
1332
bde2dc51c06b
Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents:
1323
diff
changeset
|
281 |
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
|
282 |
fi # gcc |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
283 |
CFLAGS="$CFLAGS -g" |
741 | 284 |
else |
1169
36450491b884
Change -O2 flag as suggested by Myhailo
Mikael Berthe <mikael@lilotux.net>
parents:
1152
diff
changeset
|
285 |
CFLAGS="-O2 $CFLAGS" |
741 | 286 |
fi |
287 |
||
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
288 |
AC_ARG_ENABLE(hgcset, |
1834
d3d4d1c1cb00
Fix previous changeset (760affbebb96)
Mikael Berthe <mikael@lilotux.net>
parents:
1833
diff
changeset
|
289 |
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
|
290 |
hgcset=$enableval, hgcset="yes") |
1426
a64778f5f26b
Implement FIFO named command pipe
Mikael Berthe <mikael@lilotux.net>
parents:
1423
diff
changeset
|
291 |
AM_CONDITIONAL(HGCSET, [test x$hgcset = xyes]) |
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
292 |
if test "${hgcset}" = "yes"; then |
1571
481b60da99c9
Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents:
1559
diff
changeset
|
293 |
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
|
294 |
fi |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
295 |
|
1309
887f8801418c
Only compile otr.c if libotr is available
franky@veqlargh.fs
parents:
1300
diff
changeset
|
296 |
AM_CONDITIONAL([OTR], [test x$libotr_found = xyes]) |
1837
a09eddfdb6e8
Fix (again...) changeset 760affbebb96
Mikael Berthe <mikael@lilotux.net>
parents:
1834
diff
changeset
|
297 |
AM_CONDITIONAL([INSTALL_HEADERS], [test x$enable_modules != xno]) |
1309
887f8801418c
Only compile otr.c if libotr is available
franky@veqlargh.fs
parents:
1300
diff
changeset
|
298 |
|
1749
7ee390513463
Use api version for module checks
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1741
diff
changeset
|
299 |
# Prepare some config.h variables |
2302 | 300 |
AC_DEFINE([MCABBER_BRANCH], "dev", [Mcabber branch]) |
1749
7ee390513463
Use api version for module checks
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1741
diff
changeset
|
301 |
AC_DEFINE([MCABBER_VERSION], "AC_PACKAGE_VERSION", [Mcabber version string]) |
7ee390513463
Use api version for module checks
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1741
diff
changeset
|
302 |
|
924
a07bd351008b
Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents:
923
diff
changeset
|
303 |
# 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
|
304 |
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
|
305 |
|
1668
41c26b7d2890
Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1639
diff
changeset
|
306 |
AC_CONFIG_FILES([mcabber/Makefile |
1671
411269409f34
Add in-tree beep example module
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1670
diff
changeset
|
307 |
modules/Makefile |
411269409f34
Add in-tree beep example module
Myhailo Danylenko <isbear@ukrpost.net>
parents:
1670
diff
changeset
|
308 |
modules/beep/Makefile |
1827 | 309 |
modules/xttitle/Makefile |
1941
2256d0626730
Modularize fifo system (Myhailo Danylenko)
Mikael Berthe <mikael@lilotux.net>
parents:
1933
diff
changeset
|
310 |
modules/fifo/Makefile |
1974 | 311 |
modules/urlregex/Makefile |
233 | 312 |
doc/Makefile |
1559
0674abda9a8f
Add Franky's mcabber user guide
Mikael Berthe <mikael@lilotux.net>
parents:
1555
diff
changeset
|
313 |
doc/guide/Makefile |
903 | 314 |
doc/help/Makefile |
1712 | 315 |
mcabber.pc |
68 | 316 |
Makefile]) |
317 |
AC_OUTPUT |
|
2076
9fb1ccf291cc
Switch to libotr v4 API
Myhailo Danylenko <isbear@ukrpost.net>
parents:
2060
diff
changeset
|
318 |
dnl vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... |