annotate finch/libgnt/configure.ac @ 20879:bc1e6ea98445

Try to fix msgfmt detection *again*. If this doesn't work, we'll probably have to start writing our own macros for this junk, which I greatly desire to NOT do.
author Ethan Blanton <elb@pidgin.im>
date Thu, 11 Oct 2007 17:29:39 +0000
parents 382392c529cc
children 1b342bc8c154
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 dnl Process this file with autoconf to produce a configure script.
16686
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
2 AC_PREREQ([2.50])
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
3
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
4 # UPDATING VERSION NUMBERS FOR RELEASES
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
5 #
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
6 # gnt_micro_version += 1
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
7 #
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
8 # If any functions have been added to libgnt:
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
9 # gnt_micro_version = 0
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
10 # gnt_minor_version += 1
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
11 # gnt_lt_current += 1
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
12 #
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
13 # If backwards compatibility has been broken in libgnt:
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
14 # gnt_micro_version = 0
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
15 # gnt_minor_version = 0
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
16 # gnt_major_version += 1;
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
17 # gnt_lt_current += 1
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
18 #
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
19 # gnt_version_suffix should be similar to one of the following:
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
20 # For beta releases: [beta2]
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
21 # For code under development: [devel]
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
22 # For production releases: []
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
23 #
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
24 # Make sure to update ../../configure.ac with libgnt version changes.
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
25 #
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
26
19372
382392c529cc New API has been added. Bump the minor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19180
diff changeset
27 m4_define([gnt_lt_current], [2])
18078
19e6c7249c20 Bump the major for libgnt for the awesome workspace support.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16686
diff changeset
28 m4_define([gnt_major_version], [2])
19372
382392c529cc New API has been added. Bump the minor.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 19180
diff changeset
29 m4_define([gnt_minor_version], [2])
16686
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
30 m4_define([gnt_micro_version], [0])
18078
19e6c7249c20 Bump the major for libgnt for the awesome workspace support.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 16686
diff changeset
31 m4_define([gnt_version_suffix], [devel])
16686
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
32 m4_define([gnt_version],
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
33 [gnt_major_version.gnt_minor_version.gnt_micro_version])
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
34 m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
35
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
36 AC_INIT([libgnt], [gnt_display_version], [devel@pidgin.im])
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 AC_CANONICAL_SYSTEM
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 AM_CONFIG_HEADER(config.h)
19173
e9151f52a4f1 Allows libgnt to pull in needed scripts for a standalone build.
Eric Polino <aluink@pidgin.im>
parents: 19168
diff changeset
39 AC_CONFIG_AUX_DIR([.])
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41
16686
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
42 GNT_MAJOR_VERSION=gnt_major_version
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
43 GNT_MINOR_VERSION=gnt_minor_version
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
44 GNT_MICRO_VERSION=gnt_micro_version
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
45 GNT_VERSION=[gnt_display_version]
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
46 AC_SUBST(GNT_MAJOR_VERSION)
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
47 AC_SUBST(GNT_MINOR_VERSION)
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
48 AC_SUBST(GNT_MICRO_VERSION)
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
49 AC_SUBST(GNT_VERSION)
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
50
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
51 GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
a081abf60514 I've put the libgnt so versioning stuff into finch/libgnt/configure.ac,
Richard Laager <rlaager@wiktel.com>
parents: 16182
diff changeset
52 AC_SUBST(GNT_LT_VERSION_INFO)
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 AC_PATH_PROG(sedpath, sed)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
55
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
56 dnl Storing configure arguments
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
57 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
58
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
59 dnl Checks for programs.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 AC_PROG_CC
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 AC_DISABLE_STATIC
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62 AM_PROG_LIBTOOL
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 LIBTOOL="$LIBTOOL --silent"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64 AC_PROG_INSTALL
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 dnl we don't use autobreak on cygwin!!
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 dnl AC_CYGWIN
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 dnl Checks for header files.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 AC_HEADER_STDC
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 AC_HEADER_SYS_WAIT
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 dnl Checks for typedefs, structures, and compiler characteristics.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 AC_C_CONST
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 AC_STRUCT_TM
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 AC_C_BIGENDIAN
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 dnl Checks for library functions.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 AC_TYPE_SIGNAL
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 AC_FUNC_STRFTIME
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 dnl to prevent the g_stat()/g_unlink() crash,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 AC_SYS_LARGEFILE
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 AC_MSG_CHECKING(for the %z format string in strftime())
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 AC_TRY_RUN([
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 #ifdef HAVE_SYS_TIME_H
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 #include <sys/time.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 #endif
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 #include <time.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 #include <stdio.h>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 int main()
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101 {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 char buf[6];
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 time_t t = time(NULL);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 return 1;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 return !((buf[0] == '-' || buf[0] == '+') &&
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 (buf[1] >= '0' && buf[1] <= '9') &&
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 (buf[2] >= '0' && buf[2] <= '9') &&
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 (buf[3] >= '0' && buf[3] <= '9') &&
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 (buf[4] >= '0' && buf[4] <= '9')
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 );
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 ],
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 AC_MSG_RESULT(yes)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 [Define to 1 if you have a strftime() that supports the %z format string.])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 ],
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123 [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
124 AC_MSG_RESULT(no)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 ],
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126 [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127 # Fallback for Cross Compiling...
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 # This will enable the compatibility code.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 AC_MSG_RESULT(no)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130 ]
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 )
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 AC_CHECK_HEADER(sys/utsname.h)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 AC_CHECK_FUNC(uname)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 if test "x$enable_debug" = "xyes" ; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 enable_fatal_asserts="yes"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 if test "x$enable_fatal_asserts" = "xyes" ; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 if test "x$enable_deprecated" = "xno"; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 if test "x$GCC" = "xyes"; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 dnl We enable -Wall later.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153 dnl This leads to warnings we don't want.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156 dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157 dnl
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 dnl Future Possibilities
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159 dnl
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 dnl Consider adding -Wbad-function-cast.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
161 dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
162 dnl We'd need an intermediate variable.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 dnl
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
164 dnl Consider adding -Wfloat-equal.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 dnl This leads to warnings with Perl.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166 dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
167 dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
168 dnl
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 dnl This is likely non-trivial.
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
171 dnl
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
172 for newflag in \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
173 "-Waggregate-return" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
174 "-Wcast-align" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
175 "-Wdeclaration-after-statement" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
176 "-Werror-implicit-function-declaration" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177 "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
178 "-Winit-self" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179 "-Wmissing-declarations" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180 "-Wmissing-prototypes" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181 "-Wnested-externs" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
182 "-Wpointer-arith" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
183 "-Wundef" \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184 ; do
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 orig_CFLAGS="$CFLAGS"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
186 CFLAGS="$CFLAGS $newflag"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
187 AC_MSG_CHECKING(for $newflag option to gcc)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
188 AC_TRY_COMPILE([], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
189 int main() {return 0;}
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
190 ], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
191 AC_MSG_RESULT(yes)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
192 CFLAGS="$orig_CFLAGS"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
193 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
194 ], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
195 AC_MSG_RESULT(no)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
196 CFLAGS="$orig_CFLAGS"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
197 ])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
198 done
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
199
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
200 if test "x$enable_fortify" = "xyes"; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
201 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
202 AC_TRY_COMPILE([#include <features.h>], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
203 int main() {
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
204 #if !(__GNUC_PREREQ (4, 1) \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
205 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
206 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
207 && __GNUC_MINOR__ == 4 \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
208 && (__GNUC_PATCHLEVEL__ > 2 \
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
209 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
210 #error No FORTIFY_SOURCE support
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
211 #endif
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
212 return 0;
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
213 }
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
214 ], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
215 AC_MSG_RESULT(yes)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
216 DEBUG_CFLAGS="$DEBUG_CFLAGS -D_FORTIFY_SOURCE=2"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
217 ], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
218 AC_MSG_RESULT(no)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
219 ])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
220 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
221
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
222 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
223 CFLAGS="-g $CFLAGS"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
224 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
225 AC_SUBST(CFLAGS)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
226
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
227 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0],,
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
228 [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
229 AC_MSG_ERROR([
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
230 *** GLib 2.0 is required to build LibGNT; please make sure you have the GLib
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
231 *** development headers installed. The latest version of GLib is
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
232 *** always available at http://www.gtk.org/.])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
233 ])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
234 AC_SUBST(GLIB_CFLAGS)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
235 AC_SUBST(GLIB_LIBS)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
236
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
237
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
238 AC_MSG_CHECKING(for me pot o' gold)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
239 AC_MSG_RESULT(no)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
240 AC_CHECK_FUNCS(gethostid lrand48)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
241 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
242 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
243 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
244 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
245 AC_CHECK_HEADERS(termios.h)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
246 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
247 #AC_VAR_TIMEZONE_EXTERNALS
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
248
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
249 GNT_CFLAGS=
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
250 GNT_LIBS=
16125
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
251 AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
252 [compile finch against the ncurses includes in DIR])],
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
253 [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
254 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
255 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
256
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
257 # If ncursesw is not found, look for plain old ncurses
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
258 if test "x$enable_gnt" = "xno"; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
259 AC_CHECK_LIB(ncurses, initscr, [[GNT_LIBS="-lncurses"] [enable_gnt=yes]], [enable_gnt=no])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
260 AC_CHECK_LIB(panel, update_panels, [[GNT_LIBS="$GNT_LIBS -lpanel"] [enable_gnt=yes]], [enable_gnt=no])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
261 AC_DEFINE(NO_WIDECHAR, [1], [Define to 1 if you do not have ncursesw.])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
262 else
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
263 dnl # Some distros put the headers in ncursesw/, some don't
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
264 found_ncurses_h=no
16125
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
265 for location in $ac_ncurses_includes /usr/include/ncursesw /usr/include
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
266 do
16125
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
267 f="$location/ncurses.h"
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
268 AC_CHECK_HEADER($f,[
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
269 AC_MSG_CHECKING([if $f supports wide characters])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
270 AC_TRY_COMPILE([
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
271 #define _XOPEN_SOURCE_EXTENDED
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
272 #include <$f>
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
273 ], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
274 #ifndef get_wch
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
275 # error get_wch not found!
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
276 #endif
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
277 ], [
16125
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
278 dir=$location
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
279 if test x"$dir" != x"." ; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
280 GNT_CFLAGS="-I$dir/"
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
281 else
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
282 GNT_CFLAGS=""
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
283 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
284
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
285 found_ncurses_h=yes
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
286 AC_MSG_RESULT([yes])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
287 break
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
288 ], [
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
289 AC_MSG_RESULT([no])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
290 ])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
291 ])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
292 done
16125
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
293 if test x"$found_ncurses_h" != "xyes"; then
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
294 enable_gnt="no"
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
295 fi
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
296 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
297 AC_SUBST(GNT_CFLAGS)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
298 AC_SUBST(GNT_LIBS)
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
299
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
300 if test "x$enable_gnt" = "xno"; then
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
301 AC_MSG_ERROR([
16125
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
302 *** You need ncursesw or ncurses and its header files.])
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
303 fi
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
304
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
305 dnl Check for libxml
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
306 have_libxml=yes
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
307 PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
308 AC_MSG_RESULT(no)
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
309 have_libxml=no
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
310 ])
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
311 AC_SUBST(LIBXML_CFLAGS)
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
312 AC_SUBST(LIBXML_LIBS)
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
313
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
314 if test "x$have_libxml" = "xno"; then
5f204f55af09 Add a utility function to create widgets from an XML description.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 15818
diff changeset
315 AC_DEFINE(NO_LIBXML, 1, [Do not have libxml2.])
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
316 fi
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
317
19168
f63e38e33811 Some lines to the auto-thingies to aid in libgnt building standalone
Eric Polino <aluink@pidgin.im>
parents: 18078
diff changeset
318 AM_CONDITIONAL(PURPLE_AVAILABLE, false)
f63e38e33811 Some lines to the auto-thingies to aid in libgnt building standalone
Eric Polino <aluink@pidgin.im>
parents: 18078
diff changeset
319
15818
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
320 AC_OUTPUT([Makefile
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
321 gnt.pc
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
322 wms/Makefile
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
323 ])
0e3a8505ebbe renamed gaim-text to finch
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
324