annotate mcabber/configure.ac @ 253:ff9ba796cabb 0.6.1

[/trunk] Changeset 266 by mikael * 0.6.1 release
author mikael
date Sat, 25 Jun 2005 08:49:09 +0000
parents c8df64f43625
children 719b87a693a9
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)
253
ff9ba796cabb [/trunk] Changeset 266 by mikael
mikael
parents: 237
diff changeset
5 AC_INIT([mcabber],[0.6.1],[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
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
10 AC_PROG_RANLIB
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
11
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
12 CFLAGS="$CFLAGS -Wall"
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_CXX
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
16 AC_PROG_CC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
17 AC_PROG_INSTALL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
18
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
19 # Checks for libraries.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
20 AC_CHECK_LIB([ncurses], [initscr])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
21 AC_CHECK_LIB([panel], [new_panel])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
22
237
c8df64f43625 [/trunk] Changeset 250 by mikael
mikael
parents: 233
diff changeset
23 AC_CHECK_DECLS([strptime],,,
c8df64f43625 [/trunk] Changeset 250 by mikael
mikael
parents: 233
diff changeset
24 [#define _GNU_SOURCE
c8df64f43625 [/trunk] Changeset 250 by mikael
mikael
parents: 233
diff changeset
25 #include <time.h>])
c8df64f43625 [/trunk] Changeset 250 by mikael
mikael
parents: 233
diff changeset
26
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
27 # Checks for header files.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
28 AC_HEADER_STDC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
29 AC_CHECK_HEADERS([arpa/inet.h fcntl.h locale.h netdb.h netinet/in.h stddef.h stdlib.h string.h strings.h sys/socket.h sys/time.h syslog.h termios.h unistd.h ncurses.h panel.h getopt.h])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
30
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
31 # Checks for typedefs, structures, and compiler characteristics.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
32 AC_HEADER_STDBOOL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
33 AC_C_CONST
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
34 AC_C_INLINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
35 AC_TYPE_SIZE_T
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
36 AC_HEADER_TIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
37 AC_STRUCT_TM
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
38
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
39 # Checks for library functions.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
40 AC_FUNC_ERROR_AT_LINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
41 AC_FUNC_MALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
42 AC_FUNC_MEMCMP
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
43 AC_FUNC_REALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
44 AC_FUNC_SELECT_ARGTYPES
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
45 AC_TYPE_SIGNAL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
46 AC_FUNC_STRFTIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
47 AC_FUNC_VPRINTF
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
48 AC_CHECK_FUNCS([alarm bzero gethostbyname gethostname inet_ntoa isascii memmove memset modf select setlocale socket strcasecmp strchr strdup strncasecmp strrchr strstr])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
49
73
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
50 # Check for glib
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
51 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
52
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
53 AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
54 or GnuTLS],
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
55 [with_ssl=$withval])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
56
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
57 if test "$with_ssl" != "no"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
58 AC_ARG_WITH(openssl,
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
59 [ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
60 library in DIR (optional)],
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
61 [with_openssl=$withval])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
62
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
63 if test -z "$with_openssl"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
64 for ac_dir in /usr/local /usr; do
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
65 if test -f "$ac_dir/include/openssl/ssl.h"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
66 with_openssl=$ac_dir
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
67 break;
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
68 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
69 done
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
70 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
71
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
72 AC_MSG_CHECKING(for OpenSSL)
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
73
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
74 if test -n "$with_openssl" -a "$with_openssl" != "no"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
75 if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
76 CFLAGS="$CFLAGS -I${with_openssl}"
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
77 AC_DEFINE([HAVE_OPENSSL], [], [OpenSSL])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
78 AC_MSG_RESULT([found in $with_openssl])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
79 AC_CHECK_LIB(crypto, main, [
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
80 AC_CHECK_LIB(crypto, SSLeay_add_all_algorithms, [
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
81 AC_DEFINE([HAVE_SSLEAY], [], [SSLeay])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
82 ])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
83 ])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
84 AC_CHECK_LIB(ssl, main)
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
85 else
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
86 AC_MSG_RESULT([not found or disabled])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
87
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
88 AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
89 CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS"
145
417880d6eea2 [/trunk] Changeset 157 by mikael
mikael
parents: 82
diff changeset
90 LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra -lgnutls-openssl"
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
91 AC_DEFINE([HAVE_GNUTLS], [], [GNU TLS])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
92 ])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
93 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
94 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
95
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
96 AC_DEFINE(BUILD_JABBER, 1, [build with jabber support])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
97
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
98 AC_CONFIG_FILES([connwrap/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
99 libjabber/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
100 src/Makefile
233
65c564e957a8 [/trunk] Changeset 246 by mikael
mikael
parents: 231
diff changeset
101 doc/Makefile
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
102 Makefile])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
103 AC_OUTPUT