Mercurial > hg
annotate mcabber/configure.ac @ 801:d8e0a1ce3e8a
Define WAIT_ANY if needed.
(Not defined in Cygwin for example)
author | Soren Andersen <somian@pobox.com> |
---|---|
date | Mon, 10 Apr 2006 23:21:47 +0200 |
parents | 103764a87777 |
children | 8c45ec4bf9bc |
rev | line source |
---|---|
68 | 1 # -*- Autoconf -*- |
2 # Process this file with autoconf to produce a configure script. | |
3 | |
4 AC_PREREQ(2.59) | |
788 | 5 AC_INIT([mcabber],[0.7.6-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 CFLAGS="$CFLAGS -Wall" | |
13 | |
14 # Checks for programs. | |
15 AC_PROG_CXX | |
16 AC_PROG_CC | |
17 AC_PROG_INSTALL | |
18 | |
19 # Checks for libraries. | |
20 AC_CHECK_LIB([ncurses], [initscr]) | |
21 AC_CHECK_LIB([panel], [new_panel]) | |
22 | |
237 | 23 AC_CHECK_DECLS([strptime],,, |
24 [#define _GNU_SOURCE | |
25 #include <time.h>]) | |
26 | |
68 | 27 # Checks for header files. |
28 AC_HEADER_STDC | |
744
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
29 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
|
30 stdlib.h string.h strings.h sys/socket.h sys/time.h \ |
742 | 31 syslog.h termios.h unistd.h ncurses.h panel.h getopt.h]) |
800 | 32 AC_VAR_TIMEZONE_EXTERNALS |
68 | 33 |
34 # Checks for typedefs, structures, and compiler characteristics. | |
35 AC_HEADER_STDBOOL | |
36 AC_C_CONST | |
37 AC_C_INLINE | |
38 AC_TYPE_SIZE_T | |
39 AC_HEADER_TIME | |
40 AC_STRUCT_TM | |
41 | |
42 # Checks for library functions. | |
43 AC_FUNC_ERROR_AT_LINE | |
44 AC_FUNC_MALLOC | |
45 AC_FUNC_MEMCMP | |
46 AC_FUNC_REALLOC | |
47 AC_FUNC_SELECT_ARGTYPES | |
48 AC_TYPE_SIGNAL | |
49 AC_FUNC_STRFTIME | |
50 AC_FUNC_VPRINTF | |
744
c3b76a1a07cb
Fix wrapping error introduced in changeset 76e00324c404
Mikael Berthe <mikael@lilotux.net>
parents:
742
diff
changeset
|
51 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
|
52 memmove memset modf select setlocale socket strcasecmp \ |
800 | 53 strchr strdup strncasecmp strrchr strstr strcasestr]) |
54 | |
55 # Check for tm_gmtoff | |
56 MC_TM_GMTOFF | |
68 | 57 |
73 | 58 # Check for glib |
59 AM_PATH_GLIB_2_0(2.0.0, , AC_MSG_ERROR([glib is required]),[g_list_append]) | |
60 | |
69 | 61 AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL |
742 | 62 or GnuTLS], |
63 [with_ssl=$withval]) | |
69 | 64 |
65 if test "$with_ssl" != "no"; then | |
66 AC_ARG_WITH(openssl, | |
742 | 67 [ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL |
68 library in DIR (optional)], | |
69 [with_openssl=$withval]) | |
69 | 70 |
71 if test -z "$with_openssl"; then | |
742 | 72 for ac_dir in /usr/local /usr; do |
73 if test -f "$ac_dir/include/openssl/ssl.h"; then | |
74 with_openssl=$ac_dir | |
75 break; | |
76 fi | |
77 done | |
69 | 78 fi |
79 | |
80 AC_MSG_CHECKING(for OpenSSL) | |
81 | |
82 if test -n "$with_openssl" -a "$with_openssl" != "no"; then | |
742 | 83 if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi |
84 CFLAGS="$CFLAGS -I${with_openssl}" | |
85 AC_DEFINE([HAVE_OPENSSL], [], [OpenSSL]) | |
86 AC_MSG_RESULT([found in $with_openssl]) | |
87 AC_CHECK_LIB(crypto, main, [ | |
88 AC_CHECK_LIB(crypto, SSLeay_add_all_algorithms, [ | |
89 AC_DEFINE([HAVE_SSLEAY], [], [SSLeay]) | |
90 ]) | |
91 ]) | |
92 AC_CHECK_LIB(ssl, main) | |
69 | 93 else |
742 | 94 AC_MSG_RESULT([not found or disabled]) |
69 | 95 |
778
a22665116104
Comment out gnutls in autoconf, as it doesn't work currently
Mikael Berthe <mikael@lilotux.net>
parents:
744
diff
changeset
|
96 # 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
|
97 # 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
|
98 # 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
|
99 # 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
|
100 # ]) |
69 | 101 fi |
102 fi | |
103 | |
68 | 104 AC_DEFINE(BUILD_JABBER, 1, [build with jabber support]) |
105 | |
741 | 106 AC_ARG_ENABLE(debug, |
107 [AC_HELP_STRING(--enable-debug, Add development compilation options)], | |
108 debug=$enableval, debug="") | |
109 if test "${debug}" = "yes"; then | |
110 AC_DEFINE_UNQUOTED([DEBUG_ENABLE],[1],[Devel compilation options]) | |
111 CFLAGS="$CFLAGS -Wextra -Wno-unused-parameter -pedantic -std=gnu99 -O0 -g" | |
112 else | |
113 CFLAGS="$CFLAGS -O2" | |
114 fi | |
115 | |
781
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
116 AC_ARG_ENABLE(hgcset, |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
117 [AC_HELP_STRING(--enable-hgcset, Add Mercurial changeset)], |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
118 hgcset=$enableval, hgcset="") |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
119 AM_CONDITIONAL(HGCSET, test x$hgcset = xyes) |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
120 if test "${hgcset}" = "yes"; then |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
121 AC_DEFINE(ENABLE_HGCSET, 1, [Use Mercurial changeset]) |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
122 fi |
d3af6877a7df
Add --enable-hgcset to configure script
Mikael Berthe <mikael@lilotux.net>
parents:
778
diff
changeset
|
123 |
68 | 124 AC_CONFIG_FILES([connwrap/Makefile |
125 libjabber/Makefile | |
126 src/Makefile | |
233 | 127 doc/Makefile |
68 | 128 Makefile]) |
129 AC_OUTPUT |