annotate console/libgnt/configure.ac @ 14983:8186cb621d2b

[gaim-migrate @ 17762] GTK+ Theme selection will now choose the system-wide theme if the installer is being run by the admin user. Also, the theme checkboxes can now be all unselected and we wont mess with the current theme selection. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Fri, 17 Nov 2006 01:11:18 +0000
parents ca36763497d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 dnl Process this file with autoconf to produce a configure script.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
2 AC_INIT([libgnt], [0.0.0dev], [gaim-devel@lists.sourceforge.net])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 AC_CANONICAL_SYSTEM
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4 AM_CONFIG_HEADER(config.h)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 AC_PREREQ([2.50])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 AC_PATH_PROG(sedpath, sed)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 dnl Storing configure arguments
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 dnl Checks for programs.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 AC_PROG_CC
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 AC_DISABLE_STATIC
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 AM_PROG_LIBTOOL
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 LIBTOOL="$LIBTOOL --silent"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 AC_PROG_INSTALL
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21 dnl we don't use autobreak on cygwin!!
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 dnl AC_CYGWIN
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24 dnl Checks for header files.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 AC_HEADER_STDC
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26 AC_HEADER_SYS_WAIT
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27 AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29 dnl Checks for typedefs, structures, and compiler characteristics.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30 AC_C_CONST
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
31 AC_STRUCT_TM
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
32
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
33 AC_C_BIGENDIAN
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
34
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35 dnl Checks for library functions.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 AC_TYPE_SIGNAL
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 AC_FUNC_STRFTIME
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 AC_CHECK_FUNCS(strdup strstr atexit setlocale)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
40 dnl to prevent the g_stat()/g_unlink() crash,
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
41 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42 AC_SYS_LARGEFILE
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
43
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
44 dnl FreeBSD doesn't have libdl, dlopen is provided by libc
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
45 AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
46
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
47 AC_MSG_CHECKING(for the %z format string in strftime())
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
48 AC_TRY_RUN([
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
49 #ifdef HAVE_SYS_TIME_H
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
50 #include <sys/time.h>
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
51 #endif
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
52 #include <time.h>
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
53 #include <stdio.h>
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
54
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
55 int main()
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
56 {
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57 char buf[6];
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
58 time_t t = time(NULL);
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
59
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
60 if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
61 return 1;
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
62
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
63 fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
64
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
65 return !((buf[0] == '-' || buf[0] == '+') &&
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
66 (buf[1] >= '0' && buf[1] <= '9') &&
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
67 (buf[2] >= '0' && buf[2] <= '9') &&
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
68 (buf[3] >= '0' && buf[3] <= '9') &&
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
69 (buf[4] >= '0' && buf[4] <= '9')
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
70 );
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
71 }
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72 ],
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
73 [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
74 AC_MSG_RESULT(yes)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
75 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76 [Define to 1 if you have a strftime() that supports the %z format string.])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
77 ],
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
78 [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
79 AC_MSG_RESULT(no)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 ],
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
81 [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
82 # Fallback for Cross Compiling...
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
83 # This will enable the compatibility code.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
84 AC_MSG_RESULT(no)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
85 ]
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
86 )
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
87
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
88
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
89 AC_CHECK_HEADER(sys/utsname.h)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
90 AC_CHECK_FUNC(uname)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
91
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
92 if test "x$enable_debug" = "xyes" ; then
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
93 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
94 enable_fatal_asserts="yes"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
95 fi
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
96
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
97 if test "x$enable_fatal_asserts" = "xyes" ; then
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
98 AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
99 fi
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
100
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
101 if test "x$enable_deprecated" = "xno"; then
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
102 DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
103 fi
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
104
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
105 if test "x$GCC" = "xyes"; then
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
106 dnl We enable -Wall later.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
107 dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
108 dnl This leads to warnings we don't want.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
109 CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
110
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
111 dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
112 dnl
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
113 dnl Future Possibilities
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
114 dnl
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
115 dnl Consider adding -Wbad-function-cast.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
116 dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
117 dnl We'd need an intermediate variable.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
118 dnl
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
119 dnl Consider adding -Wfloat-equal.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
120 dnl This leads to warnings with Perl.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
121 dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
122 dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
123 dnl
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
124 dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
125 dnl This is likely non-trivial.
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
126 dnl
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
127 for newflag in \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
128 "-Waggregate-return" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
129 "-Wcast-align" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
130 "-Wdeclaration-after-statement" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
131 "-Werror-implicit-function-declaration" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
132 "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
133 "-Winit-self" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
134 "-Wmissing-declarations" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
135 "-Wmissing-prototypes" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
136 "-Wnested-externs" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
137 "-Wpointer-arith" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
138 "-Wundef" \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
139 ; do
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
140 orig_CFLAGS="$CFLAGS"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
141 CFLAGS="$CFLAGS $newflag"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
142 AC_MSG_CHECKING(for $newflag option to gcc)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
143 AC_TRY_COMPILE([], [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
144 int main() {return 0;}
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
145 ], [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
146 AC_MSG_RESULT(yes)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
147 CFLAGS="$orig_CFLAGS"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
148 DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
149 ], [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
150 AC_MSG_RESULT(no)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
151 CFLAGS="$orig_CFLAGS"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
152 ])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
153 done
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
154
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
155 if test "x$enable_fortify" = "xyes"; then
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
156 AC_MSG_CHECKING(for FORTIFY_SOURCE support)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
157 AC_TRY_COMPILE([#include <features.h>], [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
158 int main() {
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
159 #if !(__GNUC_PREREQ (4, 1) \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
160 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
161 || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
162 && __GNUC_MINOR__ == 4 \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
163 && (__GNUC_PATCHLEVEL__ > 2 \
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
164 || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
165 #error No FORTIFY_SOURCE support
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
166 #endif
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
167 return 0;
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
168 }
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
169 ], [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
170 AC_MSG_RESULT(yes)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
171 DEBUG_CFLAGS="$DEBUG_CFLAGS -D_FORTIFY_SOURCE=2"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
172 ], [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
173 AC_MSG_RESULT(no)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
174 ])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
175 fi
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
176
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
177 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
178 CFLAGS="-g $CFLAGS"
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
179 fi
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
180 AC_SUBST(CFLAGS)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
181
14228
c18bdf510325 [gaim-migrate @ 16910]
Stu Tomlinson <stu@nosnilmot.com>
parents: 13918
diff changeset
182 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0],,
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
183 [
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
184 AC_MSG_ERROR([
14477
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
185 *** GLib 2.0 is required to build LibGNT; please make sure you have the GLib
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
186 *** development headers installed. The latest version of GLib is
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
187 *** always available at http://www.gtk.org/.])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
188 ])
14228
c18bdf510325 [gaim-migrate @ 16910]
Stu Tomlinson <stu@nosnilmot.com>
parents: 13918
diff changeset
189 AC_SUBST(GLIB_CFLAGS)
c18bdf510325 [gaim-migrate @ 16910]
Stu Tomlinson <stu@nosnilmot.com>
parents: 13918
diff changeset
190 AC_SUBST(GLIB_LIBS)
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
191
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
192
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
193 AC_MSG_CHECKING(for me pot o' gold)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
194 AC_MSG_RESULT(no)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
195 AC_CHECK_FUNCS(gethostid lrand48)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
196 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
197 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
198 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
199 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
200 AC_CHECK_HEADERS(termios.h)
14419
b50aa149e09d [gaim-migrate @ 17127]
Ethan Blanton <elb@pidgin.im>
parents: 14417
diff changeset
201 #AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
202 #AC_VAR_TIMEZONE_EXTERNALS
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
203
14477
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
204 GNT_CFLAGS=
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
205 GNT_LIBS=
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
206 AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
207 AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
208
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
209 # If ncursesw is not found, look for plain old ncurses
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
210 if test "x$enable_gnt" = "xno"; then
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
211 AC_CHECK_LIB(ncurses, initscr, [[GNT_LIBS="-lncurses"] [enable_gnt=yes]], [enable_gnt=no])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
212 AC_CHECK_LIB(panel, update_panels, [[GNT_LIBS="$GNT_LIBS -lpanel"] [enable_gnt=yes]], [enable_gnt=no])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
213 AC_DEFINE(NO_WIDECHAR, [1], [Define to 1 if you do not have ncursesw.])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
214 else
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
215 dnl # Some distros put the headers in ncursesw/, some don't
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
216 found_ncurses_h=no
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
217 for f in /usr/include/ncursesw/ncurses.h /usr/include/ncurses.h
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
218 do
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
219 AC_CHECK_HEADER($f,[
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
220 AC_MSG_CHECKING([if $f supports wide characters])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
221 AC_TRY_COMPILE([
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
222 #define _XOPEN_SOURCE_EXTENDED
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
223 #include <$f>
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
224 ], [
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
225 #ifndef get_wch
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
226 # error get_wch not found!
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
227 #endif
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
228 ], [
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
229 dir=`dirname $f`
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
230 if test x"$dir" != x"." ; then
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
231 GNT_CFLAGS="-I$dir/"
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
232 else
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
233 GNT_CFLAGS=""
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
234 fi
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
235
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
236 found_ncurses_h=yes
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
237 AC_MSG_RESULT([yes])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
238 break
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
239 ], [
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
240 AC_MSG_RESULT([no])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
241 ])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
242 ])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
243 done
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
244 fi
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
245 AC_SUBST(GNT_CFLAGS)
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
246 AC_SUBST(GNT_LIBS)
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
247
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
248 if test "x$enable_gnt" = "xno"; then
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
249 AC_MSG_ERROR([
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
250 *** You need ncursesw or ncurses.])
ca36763497d9 [gaim-migrate @ 17195]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14419
diff changeset
251 fi
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
252
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
253 AC_OUTPUT([Makefile
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
254 gnt.pc
14382
7b590ba06651 [gaim-migrate @ 17088]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 14230
diff changeset
255 wms/Makefile
13891
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
256 ])
da1046158b3b [gaim-migrate @ 16374]
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
257