annotate mcabber/configure.ac @ 1309:887f8801418c

Only compile otr.c if libotr is available
author franky@veqlargh.fs
date Mon, 10 Sep 2007 19:52:43 +0200
parents 0d4a1699accb
children 486b4feeddb8
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)
1251
034576e929b2 Post-0.9.3 changes
Mikael Berthe <mikael@lilotux.net>
parents: 1248
diff changeset
5 AC_INIT([mcabber],[0.9.4-dev],[mcabber@lilotux.net])
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
6 AM_INIT_AUTOMAKE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
7 AC_CONFIG_SRCDIR([src])
145
417880d6eea2 [/trunk] Changeset 157 by mikael
mikael
parents: 82
diff changeset
8 AM_CONFIG_HEADER(config.h)
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
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
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
12
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
13 # Checks for programs.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
14 AC_PROG_CC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
15 AC_PROG_INSTALL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
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"
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
27 fi
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
28
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
29 # Checks for header files.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
30 AC_HEADER_STDC
744
c3b76a1a07cb Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents: 742
diff changeset
31 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
32 stdlib.h string.h strings.h sys/socket.h sys/time.h \
928
dcd6d23d7a13 configure: check for presence of wchar.h and wctype.h
Mikael Berthe <mikael@lilotux.net>
parents: 926
diff changeset
33 syslog.h termios.h unistd.h getopt.h wchar.h wctype.h])
926
8a31dd49130d configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents: 924
diff changeset
34 AC_CHECK_HEADERS([getopt.h], , AC_MSG_ERROR([Missing header file]))
800
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
35 AC_VAR_TIMEZONE_EXTERNALS
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
36
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
37 # Checks for typedefs, structures, and compiler characteristics.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
38 AC_HEADER_STDBOOL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
39 AC_C_CONST
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
40 AC_C_INLINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
41 AC_TYPE_SIZE_T
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
42 AC_HEADER_TIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
43 AC_STRUCT_TM
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
44
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
45 # Checks for library functions.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
46 AC_FUNC_ERROR_AT_LINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
47 AC_FUNC_MALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
48 AC_FUNC_MEMCMP
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
49 AC_FUNC_REALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
50 AC_FUNC_SELECT_ARGTYPES
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
51 AC_TYPE_SIGNAL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
52 AC_FUNC_STRFTIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
53 AC_FUNC_VPRINTF
744
c3b76a1a07cb Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents: 742
diff changeset
54 AC_CHECK_FUNCS([alarm bzero gethostbyname gethostname inet_ntoa isascii \
c3b76a1a07cb Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents: 742
diff changeset
55 memmove memset modf select setlocale socket strcasecmp \
1211
56f7f504b4ba Add an autoconf check for vsnprintf() (Suggested by Till Maas)
Mikael Berthe <mikael@lilotux.net>
parents: 1179
diff changeset
56 strchr strdup strncasecmp strrchr strstr strcasestr vsnprintf])
800
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
57
1089
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
58
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
59 AC_CHECK_DECLS([strptime],,,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
60 [#define _GNU_SOURCE
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
61 #include <time.h>])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
62
800
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
63 # Check for tm_gmtoff
103764a87777 Improve autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 788
diff changeset
64 MC_TM_GMTOFF
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
65
1089
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
66 # Checks for libraries.
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_FUNC(initscr,,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
69 [
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
70 cf_ncurses="ncurses"
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
71 for lib in ncursesw ncurses
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
72 do
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
73 AC_CHECK_LIB($lib, waddnwstr,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
74 [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
75 done
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
76 AC_CHECK_LIB($cf_ncurses, initscr,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
77 [LIBS="$LIBS -l$cf_ncurses"
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
78 if test "$cf_ncurses" = ncursesw; then
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
79 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
80 [AC_CHECK_HEADERS([ncurses.h panel.h],,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
81 AC_MSG_ERROR([Missing header file]))])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
82 else
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
83 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
84 [AC_CHECK_HEADERS([ncurses.h panel.h],,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
85 AC_MSG_ERROR([Missing header file]))])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
86 fi
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_CURSES_LIBS])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
89 ])
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
90
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
91 AC_CHECK_LIB([panelw], [new_panel],,
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
92 AC_CHECK_LIB([panel], [new_panel])
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
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
95 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
96 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
97 else
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
98 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
99 fi
a61c3311a5bb Hopefully fix unicode detection on BSD systems
Mikael Berthe <mikael@lilotux.net>
parents: 1040
diff changeset
100
73
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
101 # Check for glib
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
102 AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),[g_list_append])
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
103
1040
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
104 # Check for gpgme
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
105 AC_ARG_ENABLE(gpgme, AC_HELP_STRING([--disable-gpgme], [Disable GPGME support]),
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
106 [ if test x"$enableval" = x"no"; then
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
107 enable_gpgme=no
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
108 fi
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
109 ])
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
110
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
111 if test x"${enable_gpgme}" != x"no"; then
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
112 AM_PATH_GPGME(1.0.0, AC_DEFINE(HAVE_GPGME, 1,
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
113 [Define if you use GPGME to support OpenPGP]))
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
114 fi
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
115
1300
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
116 # Check for otr
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
117 AC_ARG_ENABLE(otr, [ --enable-otr Enable OTR (Off-the-Record) messaging support],
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
118 enable_otr=$enableval, otr="")
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
119 if test "x$enable_otr" = "xyes"; then
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
120 # Look for libgcrypt and libotr
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
121 AM_PATH_LIBGCRYPT(1.2.2, [
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
122 AM_PATH_LIBOTR(3.1.0, ,
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
123 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
124 ], 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
125 )
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
126 fi
0d4a1699accb Add OTR check to autoconf
Mikael Berthe <mikael@lilotux.net>
parents: 1253
diff changeset
127
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
128 AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL
742
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
129 or GnuTLS],
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
130 [with_ssl=$withval])
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
131
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
132 if test "$with_ssl" != "no"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
133 AC_ARG_WITH(openssl,
742
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
134 [ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
135 library in DIR (optional)],
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
136 [with_openssl=$withval])
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
137
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
138 if test -z "$with_openssl"; then
742
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
139 for ac_dir in /usr/local /usr; do
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
140 if test -f "$ac_dir/include/openssl/ssl.h"; then
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
141 with_openssl=$ac_dir
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
142 break;
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
143 fi
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
144 done
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
145 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
146
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
147 AC_MSG_CHECKING(for OpenSSL)
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
148
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
149 if test -n "$with_openssl" -a "$with_openssl" != "no"; then
742
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
150 if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
151 CFLAGS="$CFLAGS -I${with_openssl}"
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
152 AC_DEFINE([HAVE_OPENSSL], [], [OpenSSL])
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
153 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
154 AC_CHECK_LIB(crypto, main)
742
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
155 AC_CHECK_LIB(ssl, main)
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
156 else
742
76e00324c404 Indentation changes
Mikael Berthe <mikael@lilotux.net>
parents: 741
diff changeset
157 AC_MSG_RESULT([not found or disabled])
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
158
1253
eb38963e082f Add gnutls suppport
Mikael Berthe <mikael@lilotux.net>
parents: 1251
diff changeset
159 AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [
eb38963e082f Add gnutls suppport
Mikael Berthe <mikael@lilotux.net>
parents: 1251
diff changeset
160 CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS"
eb38963e082f Add gnutls suppport
Mikael Berthe <mikael@lilotux.net>
parents: 1251
diff changeset
161 LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra -lgnutls-openssl"
eb38963e082f Add gnutls suppport
Mikael Berthe <mikael@lilotux.net>
parents: 1251
diff changeset
162 AC_DEFINE([HAVE_GNUTLS], [], [GNU TLS])
eb38963e082f Add gnutls suppport
Mikael Berthe <mikael@lilotux.net>
parents: 1251
diff changeset
163 ])
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
164 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
165 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
166
1179
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
167 # Check for Aspell stuff
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
168 AC_ARG_ENABLE(aspell, [ --enable-aspell Enable aspell support],
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
169 enable_aspell=$enableval, aspell="")
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
170 if test "x$enable_aspell" = "xyes"; then
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
171 AC_CHECK_HEADERS(aspell.h, [ have_aspell_includes=yes ])
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
172 if test "x$have_aspell_includes" = "xyes"; then
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
173 AC_CHECK_LIB(aspell, new_aspell_config, [ have_aspell_libs=yes ])
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
174 if test "x$have_aspell_libs" = "xyes"; then
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
175 AC_DEFINE(WITH_ASPELL, 1, [define if you want aspell support])
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
176 LIBS="$LIBS -laspell"
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
177 else
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
178 enable_aspell=no
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
179 fi
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
180 else
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
181 enable_aspell=no
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
182 fi
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
183 fi
0f7e0346d9cb Add aspell support
entragian <entragian@o2.pl>
parents: 1169
diff changeset
184
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
185 AC_DEFINE(BUILD_JABBER, 1, [build with jabber support])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
186
882
c3c2f7a0c5d5 autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents: 881
diff changeset
187 # Export $datadir to the source tree.
c3c2f7a0c5d5 autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents: 881
diff changeset
188 if test x"${datadir}" != x""; then
c3c2f7a0c5d5 autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents: 881
diff changeset
189 AC_DEFINE_DIR(DATA_DIR, "${datadir}", [Data files directory])
868
cefdaeb42e67 Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents: 821
diff changeset
190 fi
cefdaeb42e67 Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents: 821
diff changeset
191
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
192 AC_ARG_ENABLE(debug,
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
193 [AC_HELP_STRING(--enable-debug, Add development compilation options)],
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
194 debug=$enableval, debug="")
1040
b6c6734a781b Add libgpgme detection
Mikael Berthe <mikael@lilotux.net>
parents: 1039
diff changeset
195 if test x"${debug}" = x"yes"; then
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
196 AC_DEFINE_UNQUOTED([DEBUG_ENABLE],[1],[Devel compilation options])
821
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
197 if test "x$GCC" = "xyes"; then
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
198 if test "$gccvernum" -ge "400"; then
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
199 CFLAGS="$CFLAGS -Wextra"
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
200 else
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
201 CFLAGS="$CFLAGS -W"
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
202 fi
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
203 CFLAGS="$CFLAGS -Wno-unused-parameter -pedantic -std=gnu99 -O0"
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
204 fi # gcc
8c64874c449e More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents: 813
diff changeset
205 CFLAGS="$CFLAGS -g"
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
206 else
1169
36450491b884 Change -O2 flag as suggested by Myhailo
Mikael Berthe <mikael@lilotux.net>
parents: 1152
diff changeset
207 CFLAGS="-O2 $CFLAGS"
741
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
208 fi
8ed8c32d3164 Add a debug option
Mikael Berthe <mikael@lilotux.net>
parents: 674
diff changeset
209
781
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
210 AC_ARG_ENABLE(hgcset,
1216
8645b5166040 Use Mercurial changeset by default
Mikael Berthe <mikael@lilotux.net>
parents: 1211
diff changeset
211 [AC_HELP_STRING(--disable-hgcset, Do not use Mercurial changeset value)],
8645b5166040 Use Mercurial changeset by default
Mikael Berthe <mikael@lilotux.net>
parents: 1211
diff changeset
212 hgcset=$enableval, hgcset="yes")
781
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
213 AM_CONDITIONAL(HGCSET, test x$hgcset = xyes)
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
214 if test "${hgcset}" = "yes"; then
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
215 AC_DEFINE(ENABLE_HGCSET, 1, [Use Mercurial changeset])
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
216 fi
d3af6877a7df Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents: 778
diff changeset
217
1309
887f8801418c Only compile otr.c if libotr is available
franky@veqlargh.fs
parents: 1300
diff changeset
218 AM_CONDITIONAL([OTR], [test x$libotr_found = xyes])
887f8801418c Only compile otr.c if libotr is available
franky@veqlargh.fs
parents: 1300
diff changeset
219
924
a07bd351008b Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents: 923
diff changeset
220 # 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
221 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
222
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
223 AC_CONFIG_FILES([connwrap/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
224 libjabber/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
225 src/Makefile
233
65c564e957a8 [/trunk] Changeset 246 by mikael
mikael
parents: 231
diff changeset
226 doc/Makefile
903
c4f164c4b0d3 Help files installation
Mikael Berthe <mikael@lilotux.net>
parents: 890
diff changeset
227 doc/help/Makefile
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
228 Makefile])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
229 AC_OUTPUT