annotate mcabber/configure.ac @ 1718:e2c6f1357f82

mcabber.pc fixes
author Myhailo Danylenko <isbear@ukrpost.net>
date Mon, 15 Feb 2010 17:00:28 +0200
parents 7bdd9ed28684
children 681fa0bbf388
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
1 # -*- Autoconf -*-
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
2 # Process this file with autoconf to produce a configure script.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
3
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
4 AC_PREREQ(2.59)
1606
d7f26538c24c Bump version to 0.10.x
Mikael Berthe <mikael@lilotux.net>
parents: 1601
diff changeset
5 AC_INIT([mcabber],[0.10.0-dev],[mcabber@lilotux.net])
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
6 AM_INIT_AUTOMAKE
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1639
diff changeset
7 AC_CONFIG_SRCDIR([mcabber])
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1639
diff changeset
8 AM_CONFIG_HEADER(mcabber/config.h)
1670
efee21002ffb Install include/config.h
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1668
diff changeset
9 AC_CONFIG_HEADER(include/config.h)
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
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
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
13
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
14 # Checks for programs.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
15 AC_PROG_CC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
16 AC_PROG_INSTALL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
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
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
35 # Checks for header files.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
36 AC_HEADER_STDC
744
c3b76a1a07cb Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents: 742
diff changeset
37 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
38 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
39 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
40 AC_CHECK_HEADERS([unistd.h], , AC_MSG_ERROR([Missing header file]))
800
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
41 AC_VAR_TIMEZONE_EXTERNALS
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
42
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
43 # Checks for typedefs, structures, and compiler characteristics.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
44 AC_HEADER_STDBOOL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
45 AC_C_CONST
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
46 AC_C_INLINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
47 AC_TYPE_SIZE_T
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
48 AC_HEADER_TIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
49 AC_STRUCT_TM
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
50
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
51 # Checks for library functions.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
52 AC_FUNC_ERROR_AT_LINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
53 AC_FUNC_MALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
54 AC_FUNC_MEMCMP
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
55 AC_FUNC_REALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
56 AC_FUNC_SELECT_ARGTYPES
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
57 AC_TYPE_SIGNAL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
58 AC_FUNC_STRFTIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
59 AC_FUNC_VPRINTF
1497
35020a2ed115 Do not use srand()/rand() if better alternatives exist (mirabilos)
Mikael Berthe <mikael@lilotux.net>
parents: 1481
diff changeset
60 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
61 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
62 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
63 iswblank])
800
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
64
1089
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
65
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
66 AC_CHECK_DECLS([strptime],,,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
67 [#define _GNU_SOURCE
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
68 #include <time.h>])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
69
800
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
70 # Check for tm_gmtoff
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
71 MC_TM_GMTOFF
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
72
1454
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
73 # Check if we must provide a SIGWINCH handler
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
74 AC_ARG_ENABLE(sigwinch,
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
75 [ --enable-sigwinch compile with SIGWINCH handler],
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
76 [with_sigwinch=$enableval],
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
77 [with_sigwinch=$with_ext_funcs])
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
78 AC_MSG_RESULT($with_sigwinch)
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
79 if test "$with_sigwinch" = yes; then
1571
481b60da99c9 Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents: 1559
diff changeset
80 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
81 fi
6b98dc22946d Add optional SIGWINCH handler (Markus Hennecke)
Mikael Berthe <mikael@lilotux.net>
parents: 1448
diff changeset
82
1089
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
83 # Checks for libraries.
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
84
1411
4029e3447f2b Add a check for libcharset
Mikael Berthe <mikael@lilotux.net>
parents: 1407
diff changeset
85 AC_CHECK_LIB(charset, locale_charset)
4029e3447f2b Add a check for libcharset
Mikael Berthe <mikael@lilotux.net>
parents: 1407
diff changeset
86
1089
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
87 AC_CHECK_FUNC(initscr,,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
88 [
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
89 cf_ncurses="ncurses"
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
90 for lib in ncursesw ncurses
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
91 do
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
92 AC_CHECK_LIB($lib, waddnwstr,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
93 [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
94 done
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
95 AC_CHECK_LIB($cf_ncurses, initscr,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
96 [LIBS="$LIBS -l$cf_ncurses"
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
97 if test "$cf_ncurses" = ncursesw; then
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
98 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
99 [AC_CHECK_HEADERS([ncurses.h panel.h],,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
100 AC_MSG_ERROR([Missing header file]))])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
101 else
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
102 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
103 [AC_CHECK_HEADERS([ncurses.h panel.h],,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
104 AC_MSG_ERROR([Missing header file]))])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
105 fi
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
106 ],
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
107 [CF_CURSES_LIBS])
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
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
110 AC_CHECK_LIB([panelw], [new_panel],,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
111 AC_CHECK_LIB([panel], [new_panel])
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
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
114 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
115 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
116 else
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
117 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
118 fi
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
119
1386
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
120 AC_CACHE_CHECK([for ESCDELAY variable],
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
121 [mc_cv_ncurses_escdelay],
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
122 [AC_TRY_LINK([], [
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
123 extern int ESCDELAY;
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
124 ESCDELAY = 0;
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
125 ],
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
126 [mc_cv_ncurses_escdelay=yes],
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
127 [mc_cv_ncurses_escdelay=no])
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
128 ])
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
129 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
130 AC_DEFINE([HAVE_ESCDELAY], 1,
1386
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
131 [Define if ncurses has ESCDELAY variable])
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
132 fi
8e763c2c331f Add option 'escdelay'
Mikael Berthe <mikael@lilotux.net>
parents: 1382
diff changeset
133
1607
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
134 AC_ARG_ENABLE(modules, [ --enable-modules enable dynamic modules loading],
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
135 enable_modules=$enableval)
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
136 if test "x$enable_modules" = "xyes"; then
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
137 AC_DEFINE(MODULES_ENABLE, 1, [Define if you want dynamic modules loading])
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
138 gmodule_module=gmodule
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
139 else
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
140 gmodule_module=''
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
141 fi
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
142
73
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
143 # Check for glib
1521
33f8f795abd2 Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents: 1499
diff changeset
144 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
145 [AC_DEFINE([HAVE_GLIB_REGEX], 1,
1523
da91b601bc77 Fix previous changeset
Mikael Berthe <mikael@lilotux.net>
parents: 1521
diff changeset
146 [Define if GLib has regex support])],
da91b601bc77 Fix previous changeset
Mikael Berthe <mikael@lilotux.net>
parents: 1521
diff changeset
147 [AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),
1607
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
148 [g_list_append], ["$gmodule_module"])],
14690e624e9d Add modules
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1606
diff changeset
149 [g_regex_new "$gmodule_module"])
1521
33f8f795abd2 Check for regex support in glib
Mikael Berthe <mikael@lilotux.net>
parents: 1499
diff changeset
150
1601
3efc92a48945 Add pkg check for the Loudmouth library
Mikael Berthe <mikael@lilotux.net>
parents: 1598
diff changeset
151 # Check for loudmouth
1609
af5bdd167b04 Lower Loudmouth version requirement
Mikael Berthe <mikael@lilotux.net>
parents: 1607
diff changeset
152 PKG_CHECK_MODULES(LOUDMOUTH, loudmouth-1.0 >= 1.4.2)
1598
a087125d8fc8 Replace libjabber with loudmouth
franky
parents: 1596
diff changeset
153 AC_SUBST(LOUDMOUTH_CFLAGS)
a087125d8fc8 Replace libjabber with loudmouth
franky
parents: 1596
diff changeset
154 AC_SUBST(LOUDMOUTH_LIBS)
a087125d8fc8 Replace libjabber with loudmouth
franky
parents: 1596
diff changeset
155
1639
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
156 # Check for libidn
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
157 AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
158 [Support IDN (needs GNU Libidn)]),
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
159 libidn=$withval, libidn=yes)
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
160 if test "$libidn" != "no" ; then
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
161 PKG_CHECK_MODULES(LIBIDN, libidn >= 0.0.0, [libidn=yes], [libidn=no])
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
162 if test "$libidn" != "yes" ; then
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
163 libidn=no
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
164 AC_MSG_WARN([Libidn not found])
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
165 else
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
166 libidn=yes
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
167 AC_DEFINE(HAVE_LIBIDN, 1, [Define to 1 if you want Libidn.])
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
168 fi
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
169 fi
d9913c1b35e7 Add support for libidn
Mikael Berthe <mikael@lilotux.net>
parents: 1609
diff changeset
170
1040
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
171 # Check for gpgme
1456
5e99e802656c Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents: 1454
diff changeset
172 AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--disable-gpgme], [disable GPGME support]),
1040
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
173 [ if test x"$enableval" = x"no"; then
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
174 enable_gpgme=no
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
175 fi
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
176 ])
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
177
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
178 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
179 AM_PATH_GPGME(1.0.0, AC_DEFINE([HAVE_GPGME], 1,
1040
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
180 [Define if you use GPGME to support OpenPGP]))
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
181 fi
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
182
1300
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
183 # Check for otr
1456
5e99e802656c Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents: 1454
diff changeset
184 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
185 enable_otr=$enableval, otr="")
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
186 if test "x$enable_otr" = "xyes"; then
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
187 # Look for libgcrypt and libotr
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
188 AM_PATH_LIBGCRYPT(1.2.2, [
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
189 AM_PATH_LIBOTR(3.1.0, ,
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
190 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
191 ], 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
192 )
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
193 fi
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
194
1590
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
195 # Check for Enchant stuff
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
196 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
197 enable_enchant=$enableval, enchant="")
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
198 # Check for Aspell stuff
1456
5e99e802656c Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents: 1454
diff changeset
199 AC_ARG_ENABLE(aspell, [ --enable-aspell enable aspell support],
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
200 enable_aspell=$enableval, aspell="")
1590
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
201
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
202 if test "x$enable_enchant" = "xyes"; then
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
203 PKG_CHECK_MODULES(ENCHANT, [enchant],
1606
d7f26538c24c Bump version to 0.10.x
Mikael Berthe <mikael@lilotux.net>
parents: 1601
diff changeset
204 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
205 )
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
206 else
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
207 if test "x$enable_aspell" = "xyes"; then
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
208 AC_CHECK_HEADERS(aspell.h, [ have_aspell_includes=yes ])
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
209 if test "x$have_aspell_includes" = "xyes"; then
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
210 AC_CHECK_LIB(aspell, new_aspell_config, [ have_aspell_libs=yes ])
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
211 if test "x$have_aspell_libs" = "xyes"; then
1606
d7f26538c24c Bump version to 0.10.x
Mikael Berthe <mikael@lilotux.net>
parents: 1601
diff changeset
212 AC_DEFINE([WITH_ASPELL], 1, [Define if you want aspell support])
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
213 LIBS="$LIBS -laspell"
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
214 else
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
215 enable_aspell=no
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
216 fi
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
217 else
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
218 enable_aspell=no
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
219 fi
1590
8d1bcc83ae32 Add support for spellchecking with Enchant (caolan)
Mikael Berthe <mikael@lilotux.net>
parents: 1586
diff changeset
220 fi
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
221 fi
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
222
1571
481b60da99c9 Workaround for missing iswblank() on Solaris 8 & 9 (Sebastian Kayser)
Mikael Berthe <mikael@lilotux.net>
parents: 1559
diff changeset
223 AC_DEFINE([BUILD_JABBER], 1, [build with jabber support])
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
224
882
c3c2f7a0c5d5 autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents: 881
diff changeset
225 # Export $datadir to the source tree.
c3c2f7a0c5d5 autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents: 881
diff changeset
226 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
227 AC_DEFINE_DIR(DATA_DIR, datadir, [Data files directory])
868
cefdaeb42e67 Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents: 821
diff changeset
228 fi
cefdaeb42e67 Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents: 821
diff changeset
229
1676
96b5484423af Use $prefix/lib/mcabber as default modules_dir
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1671
diff changeset
230 # Export $libexecdir to the source tree
96b5484423af Use $prefix/lib/mcabber as default modules_dir
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1671
diff changeset
231 AC_DEFINE_DIR(PKGLIB_DIR, "${libdir}/${PACKAGE}", [Modules directory])
96b5484423af Use $prefix/lib/mcabber as default modules_dir
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1671
diff changeset
232
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
233 AC_ARG_ENABLE(debug,
1456
5e99e802656c Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents: 1454
diff changeset
234 [AC_HELP_STRING(--enable-debug, add development compilation options)],
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
235 debug=$enableval, debug="")
1040
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
236 if test x"${debug}" = x"yes"; then
1423
757ebe4df0b9 Replace DEBUG_ENABLE with ENABLE_DEBUG
Mikael Berthe <mikael@lilotux.net>
parents: 1412
diff changeset
237 AC_DEFINE_UNQUOTED([ENABLE_DEBUG],[1],[Devel compilation options])
821
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
238 if test "x$GCC" = "xyes"; then
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
239 if test "$gccvernum" -ge "400"; then
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
240 CFLAGS="$CFLAGS -Wextra"
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
241 else
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
242 CFLAGS="$CFLAGS -W"
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
243 fi
1332
bde2dc51c06b Improve changeset 486b4feeddb8
Mikael Berthe <mikael@lilotux.net>
parents: 1323
diff changeset
244 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
245 fi # gcc
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
246 CFLAGS="$CFLAGS -g"
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
247 else
1169
36450491b884 Change -O2 flag as suggested by Myhailo
Mikael Berthe <mikael@lilotux.net>
parents: 1152
diff changeset
248 CFLAGS="-O2 $CFLAGS"
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
249 fi
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
250
781
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
251 AC_ARG_ENABLE(hgcset,
1456
5e99e802656c Fix case in configure help message
Mikael Berthe <mikael@lilotux.net>
parents: 1454
diff changeset
252 [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
253 hgcset=$enableval, hgcset="yes")
1426
a64778f5f26b Implement FIFO named command pipe
Mikael Berthe <mikael@lilotux.net>
parents: 1423
diff changeset
254 AM_CONDITIONAL(HGCSET, [test x$hgcset = xyes])
781
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
255 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
256 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
257 fi
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
258
1309
887f8801418c Only compile otr.c if libotr is available
franky@veqlargh.fs
parents: 1300
diff changeset
259 AM_CONDITIONAL([OTR], [test x$libotr_found = xyes])
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1639
diff changeset
260 AM_CONDITIONAL([INSTALL_HEADERS], [test x$enable_modules = xyes])
1309
887f8801418c Only compile otr.c if libotr is available
franky@veqlargh.fs
parents: 1300
diff changeset
261
924
a07bd351008b Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents: 923
diff changeset
262 # 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
263 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
264
1668
41c26b7d2890 Install mcabber headers
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1639
diff changeset
265 AC_CONFIG_FILES([mcabber/Makefile
1671
411269409f34 Add in-tree beep example module
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1670
diff changeset
266 modules/Makefile
411269409f34 Add in-tree beep example module
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1670
diff changeset
267 modules/beep/Makefile
233
65c564e957a8 [/trunk] Changeset 246 by mikael
mikael
parents: 231
diff changeset
268 doc/Makefile
1559
0674abda9a8f Add Franky's mcabber user guide
Mikael Berthe <mikael@lilotux.net>
parents: 1555
diff changeset
269 doc/guide/Makefile
903
c4f164c4b0d3 Help files installation
Mikael Berthe <mikael@lilotux.net>
parents: 890
diff changeset
270 doc/help/Makefile
1712
7bdd9ed28684 Add .pc file
Myhailo Danylenko <isbear@ukrpost.net>
parents: 1676
diff changeset
271 mcabber.pc
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
272 Makefile])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
273 AC_OUTPUT