annotate mcabber/configure.ac @ 230:d33075ba7533 0.6.0

[/trunk] Changeset 242 by mikael * Version 0.6.0 * Initial changelog
author mikael
date Tue, 07 Jun 2005 18:35:37 +0000
parents 417880d6eea2
children 193c08454aac
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)
230
d33075ba7533 [/trunk] Changeset 242 by mikael
mikael
parents: 145
diff changeset
5 AC_INIT([mcabber],[0.6.0],[bmikael@lists.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
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
23 # Checks for header files.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
24 AC_HEADER_STDC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
25 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
26
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
27 # Checks for typedefs, structures, and compiler characteristics.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
28 AC_HEADER_STDBOOL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
29 AC_C_CONST
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
30 AC_C_INLINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
31 AC_TYPE_SIZE_T
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
32 AC_HEADER_TIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
33 AC_STRUCT_TM
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
34
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
35 # Checks for library functions.
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
36 AC_FUNC_ERROR_AT_LINE
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
37 AC_FUNC_MALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
38 AC_FUNC_MEMCMP
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
39 AC_FUNC_REALLOC
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
40 AC_FUNC_SELECT_ARGTYPES
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
41 AC_TYPE_SIGNAL
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
42 AC_FUNC_STRFTIME
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
43 AC_FUNC_VPRINTF
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
44 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
45
73
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
46 # Check for glib
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 69
diff changeset
47 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
48
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
49 AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
50 or GnuTLS],
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
51 [with_ssl=$withval])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
52
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
53 if test "$with_ssl" != "no"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
54 AC_ARG_WITH(openssl,
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
55 [ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
56 library in DIR (optional)],
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
57 [with_openssl=$withval])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
58
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
59 if test -z "$with_openssl"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
60 for ac_dir in /usr/local /usr; do
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
61 if test -f "$ac_dir/include/openssl/ssl.h"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
62 with_openssl=$ac_dir
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
63 break;
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
64 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
65 done
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
66 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
67
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
68 AC_MSG_CHECKING(for OpenSSL)
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
70 if test -n "$with_openssl" -a "$with_openssl" != "no"; then
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
71 if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
72 CFLAGS="$CFLAGS -I${with_openssl}"
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
73 AC_DEFINE([HAVE_OPENSSL], [], [OpenSSL])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
74 AC_MSG_RESULT([found in $with_openssl])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
75 AC_CHECK_LIB(crypto, main, [
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
76 AC_CHECK_LIB(crypto, SSLeay_add_all_algorithms, [
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
77 AC_DEFINE([HAVE_SSLEAY], [], [SSLeay])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
78 ])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
79 ])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
80 AC_CHECK_LIB(ssl, main)
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
81 else
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
82 AC_MSG_RESULT([not found or disabled])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
83
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
84 AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
85 CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS"
145
417880d6eea2 [/trunk] Changeset 157 by mikael
mikael
parents: 82
diff changeset
86 LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra -lgnutls-openssl"
69
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
87 AC_DEFINE([HAVE_GNUTLS], [], [GNU TLS])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
88 ])
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
89 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
90 fi
c5a5707f495d [/trunk] Changeset 83 by mikael
mikael
parents: 68
diff changeset
91
68
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
92 AC_DEFINE(BUILD_JABBER, 1, [build with jabber support])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
93
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
94 AC_CONFIG_FILES([connwrap/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
95 libjabber/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
96 src/Makefile
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
97 Makefile])
e2216836ac64 [/trunk] Changeset 82 by mikael
mikael
parents:
diff changeset
98 AC_OUTPUT