Mercurial > hg
annotate mcabber/configure.ac @ 1023:94d9a3cbb211
Remove useless message
Doing /info was noisy with a server without private storage support.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 18 Nov 2006 15:48:49 +0100 |
parents | d530e5fb506a |
children | f7ef8003fc35 |
rev | line source |
---|---|
68 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.59) | |
969 | 5 AC_INIT([mcabber],[0.8.3-dev],[mcabber@lilotux.net]) |
68 | 6 AM_INIT_AUTOMAKE |
7 AC_CONFIG_SRCDIR([src]) | |
145 | 8 AM_CONFIG_HEADER(config.h) |
68 | 9 |
10 AC_PROG_RANLIB | |
11 | |
12 # Checks for programs. | |
13 AC_PROG_CC | |
14 AC_PROG_INSTALL | |
15 | |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
16 if test "x$GCC" = "xyes"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
17 dnl Get gcc version |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
18 AC_MSG_CHECKING([gcc version]) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
19 gccver=$($CC -dumpversion) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
20 gccvermajor=$(echo $gccver | cut -d . -f1) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
21 gccverminor=$(echo $gccver | cut -d . -f2) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
22 gccvernum=$(expr $gccvermajor "*" 100 + $gccverminor) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
23 AC_MSG_RESULT($gccver) |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
24 |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
25 CFLAGS="$CFLAGS -Wall" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
26 fi |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
27 |
68 | 28 # Checks for libraries. |
926
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
29 |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
30 AC_CHECK_FUNC(initscr,, |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
31 [ |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
32 cf_ncurses="ncurses" |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
33 for lib in ncursesw ncurses |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
34 do |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
35 AC_CHECK_LIB($lib, waddnwstr, [cf_ncurses="$lib"; break]) |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
36 done |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
37 AC_CHECK_LIB($cf_ncurses, initscr, |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
38 [LIBS="$LIBS -l$cf_ncurses" |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
39 if test "$cf_ncurses" = ncursesw; then |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
40 AC_CHECK_HEADERS([ncursesw/ncurses.h ncursesw/panel.h],, |
948
388b43cea2c5
Fix configure on Slackware
Mikael Berthe <mikael@lilotux.net>
parents:
946
diff
changeset
|
41 [AC_CHECK_HEADERS([ncurses.h panel.h],, |
388b43cea2c5
Fix configure on Slackware
Mikael Berthe <mikael@lilotux.net>
parents:
946
diff
changeset
|
42 AC_MSG_ERROR([Missing header file]))]) |
926
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
43 else |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
44 AC_CHECK_HEADERS([ncurses/ncurses.h ncurses/panel.h],, |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
45 [AC_CHECK_HEADERS([ncurses.h panel.h],, |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
46 AC_MSG_ERROR([Missing header file]))]) |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
47 fi |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
48 ], |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
49 [CF_CURSES_LIBS]) |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
50 ]) |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
51 |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
52 AC_CHECK_LIB([panelw], [new_panel],, |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
53 AC_CHECK_LIB([panel], [new_panel]) |
8a31dd49130d
configure: Improve ncurses detection (use ncursesw if available)
Mikael Berthe <mikael@lilotux.net>
parents:
924
diff
changeset
|
54 ) |
68 | 55 |
237 | 56 AC_CHECK_DECLS([strptime],,, |
57 [#define _GNU_SOURCE | |
58 #include <time.h>]) | |
59 | |
68 | 60 # Checks for header files. |
61 AC_HEADER_STDC | |
744
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
62 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
|
63 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
|
64 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
|
65 AC_CHECK_HEADERS([getopt.h], , AC_MSG_ERROR([Missing header file])) |
800 | 66 AC_VAR_TIMEZONE_EXTERNALS |
68 | 67 |
68 # Checks for typedefs, structures, and compiler characteristics. | |
69 AC_HEADER_STDBOOL | |
70 AC_C_CONST | |
71 AC_C_INLINE | |
72 AC_TYPE_SIZE_T | |
73 AC_HEADER_TIME | |
74 AC_STRUCT_TM | |
75 | |
76 # Checks for library functions. | |
77 AC_FUNC_ERROR_AT_LINE | |
78 AC_FUNC_MALLOC | |
79 AC_FUNC_MEMCMP | |
80 AC_FUNC_REALLOC | |
81 AC_FUNC_SELECT_ARGTYPES | |
82 AC_TYPE_SIGNAL | |
83 AC_FUNC_STRFTIME | |
84 AC_FUNC_VPRINTF | |
744
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
85 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
|
86 memmove memset modf select setlocale socket strcasecmp \ |
800 | 87 strchr strdup strncasecmp strrchr strstr strcasestr]) |
88 | |
89 # Check for tm_gmtoff | |
90 MC_TM_GMTOFF | |
68 | 91 |
73 | 92 # Check for glib |
93 AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),[g_list_append]) | |
94 | |
69 | 95 AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL |
742 | 96 or GnuTLS], |
97 [with_ssl=$withval]) | |
69 | 98 |
99 if test "$with_ssl" != "no"; then | |
100 AC_ARG_WITH(openssl, | |
742 | 101 [ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL |
102 library in DIR (optional)], | |
103 [with_openssl=$withval]) | |
69 | 104 |
105 if test -z "$with_openssl"; then | |
742 | 106 for ac_dir in /usr/local /usr; do |
107 if test -f "$ac_dir/include/openssl/ssl.h"; then | |
108 with_openssl=$ac_dir | |
109 break; | |
110 fi | |
111 done | |
69 | 112 fi |
113 | |
114 AC_MSG_CHECKING(for OpenSSL) | |
115 | |
116 if test -n "$with_openssl" -a "$with_openssl" != "no"; then | |
742 | 117 if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi |
118 CFLAGS="$CFLAGS -I${with_openssl}" | |
119 AC_DEFINE([HAVE_OPENSSL], [], [OpenSSL]) | |
120 AC_MSG_RESULT([found in $with_openssl]) | |
976 | 121 AC_CHECK_LIB(crypto, main) |
742 | 122 AC_CHECK_LIB(ssl, main) |
69 | 123 else |
742 | 124 AC_MSG_RESULT([not found or disabled]) |
69 | 125 |
778
a22665116104
Comment out gnutls in autoconf, as it doesn't work currently
Mikael Berthe <mikael@lilotux.net>
parents:
744
diff
changeset
|
126 # AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [ |
a22665116104
Comment out gnutls in autoconf, as it doesn't work currently
Mikael Berthe <mikael@lilotux.net>
parents:
744
diff
changeset
|
127 # CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS" |
a22665116104
Comment out gnutls in autoconf, as it doesn't work currently
Mikael Berthe <mikael@lilotux.net>
parents:
744
diff
changeset
|
128 # LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra -lgnutls-openssl" |
a22665116104
Comment out gnutls in autoconf, as it doesn't work currently
Mikael Berthe <mikael@lilotux.net>
parents:
744
diff
changeset
|
129 # AC_DEFINE([HAVE_GNUTLS], [], [GNU TLS]) |
a22665116104
Comment out gnutls in autoconf, as it doesn't work currently
Mikael Berthe <mikael@lilotux.net>
parents:
744
diff
changeset
|
130 # ]) |
69 | 131 fi |
132 fi | |
133 | |
68 | 134 AC_DEFINE(BUILD_JABBER, 1, [build with jabber support]) |
135 | |
882
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
136 # Export $datadir to the source tree. |
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
137 if test x"${datadir}" != x""; then |
c3c2f7a0c5d5
autoconf: use datadir, not datarootdir
Mikael Berthe <mikael@lilotux.net>
parents:
881
diff
changeset
|
138 AC_DEFINE_DIR(DATA_DIR, "${datadir}", [Data files directory]) |
868
cefdaeb42e67
Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents:
821
diff
changeset
|
139 fi |
cefdaeb42e67
Add online /help command
Mikael Berthe <mikael@lilotux.net>
parents:
821
diff
changeset
|
140 |
741 | 141 AC_ARG_ENABLE(debug, |
142 [AC_HELP_STRING(--enable-debug, Add development compilation options)], | |
143 debug=$enableval, debug="") | |
144 if test "${debug}" = "yes"; then | |
145 AC_DEFINE_UNQUOTED([DEBUG_ENABLE],[1],[Devel compilation options]) | |
821
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
146 if test "x$GCC" = "xyes"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
147 if test "$gccvernum" -ge "400"; then |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
148 CFLAGS="$CFLAGS -Wextra" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
149 else |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
150 CFLAGS="$CFLAGS -W" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
151 fi |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
152 CFLAGS="$CFLAGS -Wno-unused-parameter -pedantic -std=gnu99 -O0" |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
153 fi # gcc |
8c64874c449e
More gcc configure checks
Mikael Berthe <mikael@lilotux.net>
parents:
813
diff
changeset
|
154 CFLAGS="$CFLAGS -g" |
741 | 155 else |
156 CFLAGS="$CFLAGS -O2" | |
157 fi | |
158 | |
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
159 AC_ARG_ENABLE(hgcset, |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
160 [AC_HELP_STRING(--enable-hgcset, Add Mercurial changeset)], |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
161 hgcset=$enableval, hgcset="") |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
162 AM_CONDITIONAL(HGCSET, test x$hgcset = xyes) |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
163 if test "${hgcset}" = "yes"; then |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
164 AC_DEFINE(ENABLE_HGCSET, 1, [Use Mercurial changeset]) |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
165 fi |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
166 |
924
a07bd351008b
Move _GNU_SOURCE define to the Makefile (Reimar Döffinger)
Mikael Berthe <mikael@lilotux.net>
parents:
923
diff
changeset
|
167 # 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
|
168 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
|
169 |
68 | 170 AC_CONFIG_FILES([connwrap/Makefile |
171 libjabber/Makefile | |
172 src/Makefile | |
233 | 173 doc/Makefile |
903 | 174 doc/help/Makefile |
68 | 175 Makefile]) |
176 AC_OUTPUT |