Mercurial > pidgin
comparison plugins/crazychat/configure.ac @ 11223:d424c3bbac8d
[gaim-migrate @ 13356]
commiting crazychat again
committer: Tailor Script <tailor@pidgin.im>
author | Charlie Stockman <chuckleberry> |
---|---|
date | Wed, 10 Aug 2005 05:45:17 +0000 |
parents | ed017b9c532d |
children | a23b55e23754 |
comparison
equal
deleted
inserted
replaced
11222:480183b6a191 | 11223:d424c3bbac8d |
---|---|
1 # -*- Autoconf -*- | 1 dnl Process this file with autoconf to produce a configure script. |
2 # Process this file with autoconf to produce a configure script. | 2 AC_INIT([gaim], [1.4.0], [gaim-devel@lists.sourceforge.net]) |
3 | 3 AC_CANONICAL_SYSTEM |
4 AC_PREREQ(2.57) | 4 AM_CONFIG_HEADER(config.h) |
5 AC_INIT(src/crazychat.c) | 5 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
6 AM_INIT_AUTOMAKE(CrazyChat, 0.0.1) | 6 |
7 AC_CONFIG_HEADER([config.h]) | 7 AC_PREREQ([2.50]) |
8 | 8 |
9 # Checks for programs. | 9 AC_PATH_PROG(sedpath, sed) |
10 AC_PROG_CXX | 10 |
11 dnl Storing configure arguments | |
12 AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments]) | |
13 | |
14 dnl Checks for programs. | |
11 AC_PROG_CC | 15 AC_PROG_CC |
12 AC_PROG_CPP | 16 AC_DISABLE_STATIC |
13 AM_PROG_CC_STDC | 17 AM_PROG_LIBTOOL |
14 AC_HEADER_STDC | 18 LIBTOOL="$LIBTOOL --silent" |
15 AC_PROG_INSTALL | 19 AC_PROG_INSTALL |
16 AC_DISABLE_STATIC | |
17 AC_PROG_LIBTOOL | |
18 | 20 |
19 # Check for debug | 21 # Check for debug |
20 AC_ARG_ENABLE(debug, | 22 AC_ARG_ENABLE(debug, |
21 [AC_HELP_STRING([--enable-debug], [enable debugging])], | 23 [AC_HELP_STRING([--enable-debug], [enable debugging])], |
22 [case "${enableval}" in | 24 [case "${enableval}" in |
36 *) AC_MSG_ERROR(bad value ${enableval} for --disable-qt) ;; | 38 *) AC_MSG_ERROR(bad value ${enableval} for --disable-qt) ;; |
37 esac | 39 esac |
38 test -z "${enableval}" || qt=true],[qt=false]) | 40 test -z "${enableval}" || qt=true],[qt=false]) |
39 AM_CONDITIONAL(DISABLE_QT, test x$qt = xtrue) | 41 AM_CONDITIONAL(DISABLE_QT, test x$qt = xtrue) |
40 | 42 |
43 # Check for disabling Quicktime | |
44 AC_ARG_ENABLE(md, | |
45 [AC_HELP_STRING([--disable-models], [disable Model Loading and Drawing])], | |
46 [case "${enableval}" in | |
47 yes) md=true ;; | |
48 no) md=false ;; | |
49 *) AC_MSG_ERROR(bad value ${enableval} for --disable-models) ;; | |
50 esac | |
51 test -z "${enableval}" || md=true],[md=false]) | |
52 AM_CONDITIONAL(DISABLE_MODELS, test x$qt = xtrue) | |
53 | |
54 | |
41 # before gettexting, in case iconv matters | 55 # before gettexting, in case iconv matters |
42 case "$host_os" in | 56 case "$host_os" in |
43 darwin*) | 57 darwin*) |
44 AC_MSG_CHECKING([for fink]) | 58 AC_MSG_CHECKING([for fink]) |
45 if test -d /sw; then | 59 if test -d /sw; then |
46 AC_MSG_RESULT([found, adding /sw to search paths]) | 60 AC_MSG_RESULT([found, adding /sw to search paths]) |
47 CFLAGS="$CFLAGS -I/sw/include" | 61 CFLAGS="$CFLAGS -I/sw/include" |
48 else | 62 else |
49 AC_MSG_RESULT([not found]) | 63 AC_MSG_RESULT([not found]) |
50 fi | 64 fi |
51 ;; | 65 ;; |
52 *) | 66 *) |
53 ;; | 67 ;; |
54 esac | 68 esac |
55 | 69 |
56 # Checks for libraries. | 70 ALL_LINGUAS="am az bg ca cs da de en_AU en_CA en_GB es et fi fr he hi hu it ja ka ko lt mk my_MM nb nl nn pa pl pt_BR pt ro ru sk sl sq sr sr@Latn sv tr uk vi zh_CN zh_TW" |
57 AC_PATH_X | 71 AM_GNU_GETTEXT_VERSION(0.10.40) |
72 AM_GNU_GETTEXT | |
73 | |
74 dnl we don't use autobreak on cygwin!! | |
75 dnl AC_CYGWIN | |
76 | |
77 dnl Checks for header files. | |
78 AC_HEADER_STDC | |
79 AC_HEADER_SYS_WAIT | |
80 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h) | |
81 | |
82 dnl Checks for typedefs, structures, and compiler characteristics. | |
83 AC_C_CONST | |
84 AC_STRUCT_TM | |
85 | |
86 dnl Checks for library functions. | |
87 AC_TYPE_SIGNAL | |
88 AC_FUNC_STRFTIME | |
89 AC_CHECK_FUNCS(strdup strstr atexit) | |
90 dnl Checks for getopt in standard library | |
91 AC_CHECK_FUNCS(getopt_long,, | |
92 [ | |
93 AC_LIBOBJ(getopt) | |
94 AC_LIBOBJ(getopt1) | |
95 ]) | |
96 | |
97 dnl Check for inet_aton | |
98 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , | |
99 [AC_ERROR(inet_aton not found)])]) | |
100 AC_CHECK_LIB(nsl, gethostent) | |
101 AC_CHECK_FUNC(socket, , | |
102 [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])]) | |
103 dnl If all goes well, by this point the previous two checks will have | |
104 dnl pulled in -lsocket and -lnsl if we need them. | |
105 AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE([HAVE_GETADDRINFO], [1], | |
106 [Define to 1 if you have the getaddrinfo function.])], | |
107 [AC_CHECK_LIB(socket, getaddrinfo, | |
108 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) | |
109 | |
110 dnl Check for socklen_t (in Unix98) | |
111 AC_MSG_CHECKING(for socklen_t) | |
112 AC_TRY_COMPILE([ | |
113 #include <sys/types.h> | |
114 #include <sys/socket.h> | |
115 socklen_t x; | |
116 ], [], | |
117 [ | |
118 AC_MSG_RESULT(yes) | |
119 ], [ | |
120 AC_TRY_COMPILE([ | |
121 #include <sys/types.h> | |
122 #include <sys/socket.h> | |
123 int accept(int, struct sockaddr *, size_t *); | |
124 ], [], [ | |
125 AC_MSG_RESULT(size_t) | |
126 AC_DEFINE(socklen_t, size_t, [socklen_t size]) | |
127 ], [ | |
128 AC_MSG_RESULT(int) | |
129 AC_DEFINE(socklen_t, int, [socklen_t size]) | |
130 ]) | |
131 ]) | |
132 | |
133 dnl to prevent the g_stat()/g_unlink() crash, | |
134 dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac | |
135 AC_SYS_LARGEFILE | |
136 | |
137 dnl Check for SILC client includes and libraries | |
138 AC_ARG_WITH(silc-includes, [ --with-silc-includes=DIR | |
139 Compile the SILC plugin against includes in DIR ], [ac_silc_includes="$withval"], [ac_silc_includes="no"]) | |
140 AC_ARG_WITH(silc-libs, [ --with-silc-libs=DIR Compile the SILC plugin against the SILC libs in DIR], [ac_silc_libs="$withval"], [ac_silc_libs="no"]) | |
141 SILC_CFLAGS="" | |
142 SILC_LIBS="" | |
143 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then | |
144 silc_manual_check="yes" | |
145 else | |
146 silc_manual_check="no" | |
147 fi | |
148 if test "x$silc_manual_check" = "xno"; then | |
149 PKG_CHECK_MODULES(SILC, silcclient, [ | |
150 have_silc="yes" | |
151 silcincludes="yes" | |
152 silcclient="yes" | |
153 ], have_silc="no") | |
154 dnl If silcclient.pc wasn't found, check for just silc.pc | |
155 if test "x$have_silc" = "xno"; then | |
156 PKG_CHECK_MODULES(SILC, silc, [ | |
157 have_silc="yes" | |
158 silcincludes="yes" | |
159 silcclient="yes" | |
160 ], have_silc="no") | |
161 fi | |
162 else | |
163 if test "$ac_silc_includes" != "no"; then | |
164 SILC_CFLAGS="-I$ac_silc_includes" | |
165 fi | |
166 CPPFLAGS_save="$CPPFLAGS" | |
167 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS" | |
168 AC_CHECK_HEADER(silcincludes.h, [silcincludes=yes]) | |
169 CPPFLAGS="$CPPFLAGS_save" | |
170 | |
171 if test "$ac_silc_libs" != "no"; then | |
172 SILC_LIBS="-L$ac_silc_libs" | |
173 fi | |
174 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread -ldl" | |
175 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS) | |
176 fi | |
177 AC_SUBST(SILC_LIBS) | |
178 AC_SUBST(SILC_CFLAGS) | |
179 | |
180 AC_ARG_ENABLE(distrib,,,enable_distrib=no) | |
181 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") | |
182 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) | |
183 DYNAMIC_PRPLS=all | |
184 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="") | |
185 if test "x$STATIC_PRPLS" != "x" -a "x$DYNAMIC_PRPLS" = "xall"; then | |
186 DYNAMIC_PRPLS="" | |
187 fi | |
188 | |
189 if test "x$STATIC_PRPLS" = "xall" ; then | |
190 STATIC_PRPLS="gg irc jabber msn napster novell oscar silc yahoo zephyr" | |
191 fi | |
192 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then | |
193 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'` | |
194 fi | |
195 AC_SUBST(STATIC_PRPLS) | |
196 STATIC_LINK_LIBS= | |
197 extern_init= | |
198 load_proto= | |
199 for i in $STATIC_PRPLS ; do | |
200 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" | |
201 extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();" | |
202 load_proto="$load_proto gaim_init_${i}_plugin();" | |
203 case $i in | |
204 gg) static_gg=yes ;; | |
205 irc) static_irc=yes ;; | |
206 jabber) static_jabber=yes ;; | |
207 msn) static_msn=yes ;; | |
208 napster) static_napster=yes ;; | |
209 novell) static_novell=yes ;; | |
210 oscar) static_oscar=yes ;; | |
211 rendezvous) static_rendezvous=yes ;; | |
212 silc) static_silc=yes ;; | |
213 toc) static_toc=yes ;; | |
214 trepia) static_trepia=yes ;; | |
215 yahoo) static_yahoo=yes ;; | |
216 zephyr) static_zephyr=yes ;; | |
217 *) echo "Invalid static protocol $i!!" ; exit ;; | |
218 esac | |
219 done | |
220 AM_CONDITIONAL(STATIC_GG, test "x$static_gg" = "xyes") | |
221 AM_CONDITIONAL(STATIC_IRC, test "x$static_irc" = "xyes") | |
222 AM_CONDITIONAL(STATIC_JABBER, test "x$static_jabber" = "xyes") | |
223 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") | |
224 AM_CONDITIONAL(STATIC_NAPSTER, test "x$static_napster" = "xyes") | |
225 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes") | |
226 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") | |
227 AM_CONDITIONAL(STATIC_RENDEZVOUS, test "x$static_rendezvous" = "xyes") | |
228 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes") | |
229 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes") | |
230 AM_CONDITIONAL(STATIC_TREPIA, test "x$static_trepia" = "xyes") | |
231 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes") | |
232 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes") | |
233 AC_SUBST(STATIC_LINK_LIBS) | |
234 AC_DEFINE_UNQUOTED(STATIC_PROTO_INIT, $extern_init void static_proto_init() { $load_proto }, | |
235 [Loads static protocol plugin module initialization functions.]) | |
236 | |
237 AC_ARG_WITH(dynamic_prpls, [ --with-dynamic-prpls specify which protocols to build dynamically],[DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`]) | |
238 if test "x$DYNAMIC_PRPLS" = "xall" ; then | |
239 DYNAMIC_PRPLS="gg irc jabber msn napster novell oscar silc yahoo zephyr" | |
240 fi | |
241 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then | |
242 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'` | |
243 fi | |
244 AC_SUBST(DYNAMIC_PRPLS) | |
245 for i in $DYNAMIC_PRPLS ; do | |
246 case $i in | |
247 gg) dynamic_gg=yes ;; | |
248 irc) dynamic_irc=yes ;; | |
249 jabber) dynamic_jabber=yes ;; | |
250 msn) dynamic_msn=yes ;; | |
251 napster) dynamic_napster=yes ;; | |
252 novell) dynamic_novell=yes ;; | |
253 oscar) dynamic_oscar=yes ;; | |
254 rendezvous) dynamic_rendezvous=yes ;; | |
255 silc) dynamic_silc=yes ;; | |
256 toc) dynamic_toc=yes ;; | |
257 trepia) dynamic_trepia=yes ;; | |
258 yahoo) dynamic_yahoo=yes ;; | |
259 zephyr) dynamic_zephyr=yes ;; | |
260 *) echo "Invalid dynamic protocol $i!!" ; exit ;; | |
261 esac | |
262 done | |
263 AM_CONDITIONAL(DYNAMIC_GG, test "x$dynamic_gg" = "xyes") | |
264 AM_CONDITIONAL(DYNAMIC_IRC, test "x$dynamic_irc" = "xyes") | |
265 AM_CONDITIONAL(DYNAMIC_JABBER, test "x$dynamic_jabber" = "xyes") | |
266 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes") | |
267 AM_CONDITIONAL(DYNAMIC_NAPSTER, test "x$dynamic_napster" = "xyes") | |
268 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes") | |
269 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes") | |
270 AM_CONDITIONAL(DYNAMIC_RENDEZVOUS, test "x$dynamic_rendezvous" = "xyes") | |
271 AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes") | |
272 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes") | |
273 AM_CONDITIONAL(DYNAMIC_TREPIA, test "x$dynamic_trepia" = "xyes") | |
274 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes") | |
275 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes") | |
276 | |
277 AC_ARG_ENABLE(audio, [ --disable-audio compile without libao/libaudiofile for sound playing],,enable_audio=yes) | |
278 AC_ARG_ENABLE(nas, [ --enable-nas enable NAS (Network Audio System) support],,enable_nas=no) | |
279 AC_ARG_ENABLE(plugins, [ --disable-plugins compile without plugin support],,enable_plugins=yes) | |
280 AC_ARG_ENABLE(perl, [ --disable-perl compile without perl scripting],,enable_perl=yes) | |
281 AC_ARG_ENABLE(tcl, [ --disable-tcl compile without Tcl scripting],,enable_tcl=yes) | |
282 AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tclConfig.sh]) | |
283 AC_ARG_ENABLE(tk, [ --disable-tk compile without Tcl support for Tk],,enable_tk=yes) | |
284 AC_ARG_WITH(tkconfig, [ --with-tkconfig=DIR directory containing tkConfig.sh]) | |
285 AC_ARG_ENABLE(gtkspell, [ --disable-gtkspell compile without GtkSpell automatic spell checking],,enable_gtkspell=yes) | |
286 AC_ARG_ENABLE(debug, [ --enable-debug compile with debugging support],,enable_debug=no) | |
287 AC_ARG_ENABLE(deprecated, [ --disable-deprecated compile without deprecated API usage],,enable_deprecated=yes) | |
288 AC_ARG_ENABLE(screensaver, [ --disable-screensaver compile without X screensaver extension],,enable_xss=yes) | |
289 AC_ARG_ENABLE(sm, [ --disable-sm compile without X session management support],,enable_sm=yes) | |
290 AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no") | |
291 AC_ARG_WITH(zephyr, [ --with-zephyr=PREFIX Compile Zephyr plugin against external libzephyr],zephyr="$withval",zephyr="no") | |
292 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") | |
293 | |
294 AC_CHECK_HEADER(sys/utsname.h) | |
295 AC_CHECK_FUNC(uname) | |
296 | |
297 if test "$enable_debug" = yes ; then | |
298 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) | |
299 fi | |
300 | |
301 if test "x$enable_deprecated" = no; then | |
302 DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" | |
303 fi | |
304 | |
305 if test "x$GCC" = "xyes"; then | |
306 CFLAGS="$CFLAGS -Wall -g3" | |
307 fi | |
308 AC_SUBST(CFLAGS) | |
58 | 309 |
59 AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([ | 310 AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([ |
60 *** GLib 2.0 is required to build CrazyChat; please make sure you have the GLib | 311 *** GLib 2.0 is required to build Gaim; please make sure you have the GLib |
61 *** development headers installed. The latest version of GLib is | 312 *** development headers installed. The latest version of GLib is |
62 *** always available at http://www.gtk.org/.])) | 313 *** always available at http://www.gtk.org/.])) |
63 AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([ | 314 AM_PATH_GTK_2_0(2.0.0,,AC_MSG_ERROR([ |
64 *** GTK+ 2.0 is required to build CrazyChat; please make sure you have the GTK+ | 315 *** GTK+ 2.0 is required to build Gaim; please make sure you have the GTK+ |
65 *** development headers installed. The latest version of GTK+ is | 316 *** development headers installed. The latest version of GTK+ is |
66 *** always available at http://www.gtk.org/.])) | 317 *** always available at http://www.gtk.org/.])) |
67 AM_PATH_GTKGLEXT_1_0(1.0.0,,AC_MSG_ERROR([ | 318 dnl charlie addition for crazychat |
319 AM_PATH_GTKGLEXT_1_0(1.0.0,[echo "$GTKGLEXT_LIBS"],AC_MSG_ERROR([ | |
68 *** gtkglext is required to build CrazyChat; please make sure you have the | 320 *** gtkglext is required to build CrazyChat; please make sure you have the |
69 *** gtkglext development headers installed.])) | 321 *** gtkglext development headers installed.])) |
70 | 322 |
71 AC_CHECK_LIB([pthread], [pthread_create]) | 323 AC_PATH_PROG(gaimpath, gaim) |
72 | 324 AC_SUBST(GTK_CFLAGS) |
73 # Checks for header files. | 325 AC_SUBST(GLIB_CFLAGS) |
74 AC_HEADER_STDC | 326 dnl charlie, gtkglext |
75 AC_HEADER_SYS_WAIT | 327 AC_SUBST(GTKGLEXT_CFLAGS) |
76 AC_CHECK_HEADERS([assert.h arpa/inet.h fcntl.h langinfo.h libintl.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) | 328 |
77 | 329 dnl charlie |
78 # Checks for typedefs, structures, and compiler characteristics. | 330 |
79 AC_C_CONST | 331 AC_PATH_XTRA |
80 AC_TYPE_SIZE_T | 332 # We can't assume that $x_libraries will be set, because autoconf does not |
81 AC_HEADER_TIME | 333 # set it in the case when the X libraries are in a standard place. |
82 AC_STRUCT_TM | 334 # Ditto for $x_includes |
83 AC_C_VOLATILE | 335 if test X"$x_libraries" = X"" ; then |
84 | 336 x_libpath_add= |
85 # Checks for library functions. | 337 else |
86 AC_CHECK_FUNCS([gettimeofday memset]) | 338 x_libpath_add="-L$x_libraries" |
87 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , | 339 fi |
88 [AC_ERROR(inet_aton not found)])]) | 340 if test X"$x_includes" = X"" ; then |
89 | 341 x_incpath_add= |
90 # Output to Makefile | 342 else |
343 x_incpath_add="-I$x_includes" | |
344 fi | |
345 | |
346 dnl ####################################################################### | |
347 dnl # Check for startup notification | |
348 dnl ####################################################################### | |
349 AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification compile without startup notification support],,enable_startup_notification=yes) | |
350 | |
351 if test "x$enable_startup_notification" = "xyes"; then | |
352 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5, | |
353 [ | |
354 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.]) | |
355 echo "Building with libstartup-notification" | |
356 enable_startup_notification=yes | |
357 ], | |
358 [ | |
359 echo "Building without libstartup-notification" | |
360 enable_startup_notification=no | |
361 ]) | |
362 | |
363 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) | |
364 AC_SUBST(STARTUP_NOTIFICATION_LIBS) | |
365 fi | |
366 | |
367 | |
368 dnl ####################################################################### | |
369 dnl # Check for stuff needed by the evolution integration plugin. | |
370 dnl ####################################################################### | |
371 build_gevo=no | |
372 AC_ARG_ENABLE(gevolution, [ --disable-gevolution compile without the Gaim-Evolution plugin],,enable_gevolution=yes) | |
373 | |
374 if test "x$enable_gevolution" = "xyes"; then | |
375 evo_deps="libxml-2.0 libebook-1.2 libedata-book-1.2" | |
376 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, build_gevo=yes, build_gevo=no) | |
377 if test "x$build_gevo" = "xno"; then | |
378 evo_deps="libxml-2.0 libebook-1.0 libedata-book-1.0" | |
379 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, build_gevo=yes, build_gevo=no) | |
380 fi | |
381 | |
382 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) | |
383 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) | |
384 fi | |
385 | |
386 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$build_gevo" = "xyes") | |
387 | |
388 dnl ####################################################################### | |
389 dnl # Check for XScreenSaver | |
390 dnl ####################################################################### | |
391 if test "x$enable_xss" = "xyes" ; then | |
392 old_LIBS="$LIBS" | |
393 LIBS="$LIBS $GTK_LIBS $x_libpath_add" | |
394 XSS_LIBS="no" | |
395 XSS_HEADERS="no" | |
396 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) | |
397 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) | |
398 if test \! "$XSS_LIBS" = "no"; then | |
399 oldCPPFLAGS="$CPPFLAGS" | |
400 CPPFLAGS="$CPPFLAGS $x_incpath_add" | |
401 AC_TRY_COMPILE([ | |
402 #include <X11/Xlib.h> | |
403 #include <X11/extensions/scrnsaver.h> | |
404 ],[],[ | |
405 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])],[enable_xss=no] | |
406 ) | |
407 CPPFLAGS="$oldCPPFLAGS" | |
408 else | |
409 XSS_LIBS="" | |
410 enable_xss=no | |
411 fi | |
412 LIBS="$old_LIBS" | |
413 else | |
414 XSS_LIBS="" | |
415 enable_xss=no | |
416 fi | |
417 AC_SUBST(XSS_LIBS) | |
418 | |
419 | |
420 dnl ####################################################################### | |
421 dnl # Check for X session management libs | |
422 dnl ####################################################################### | |
423 if test "x$enable_sm" = "xyes"; then | |
424 enable_sm=no | |
425 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) | |
426 if test "$found_sm_lib" = "true"; then | |
427 oldCPPFLAGS="$CPPFLAGS" | |
428 CPPFLAGS="$CPPFLAGS $x_incpath_add" | |
429 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) | |
430 CPPFLAGS="$oldCPPFLAGS" | |
431 fi | |
432 else | |
433 SM_LIBS="" | |
434 enable_sm=no | |
435 fi | |
436 AC_SUBST(SM_LIBS) | |
437 if test "$enable_sm" = "yes"; then | |
438 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) | |
439 fi | |
440 | |
441 | |
442 AC_DEFUN([GC_TM_GMTOFF], | |
443 [AC_REQUIRE([AC_STRUCT_TM])dnl | |
444 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, | |
445 [AC_TRY_COMPILE([#include <sys/types.h> | |
446 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], | |
447 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) | |
448 if test "$ac_cv_struct_tm_gmtoff" = yes; then | |
449 AC_DEFINE(HAVE_TM_GMTOFF, 1, [tm_gmtoff is available.]) | |
450 fi | |
451 ]) | |
452 | |
453 GC_TM_GMTOFF | |
454 | |
455 | |
456 dnl ####################################################################### | |
457 dnl # Check for Perl support | |
458 dnl ####################################################################### | |
459 if test "$enable_perl" = yes ; then | |
460 AC_PATH_PROG(perlpath, perl) | |
461 AC_MSG_CHECKING(for Perl compile flags) | |
462 PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null` | |
463 if test "_$PERL_CFLAGS" = _ ; then | |
464 AC_MSG_RESULT([not found, building without perl.]) | |
465 enable_perl = no | |
466 else | |
467 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'` | |
468 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'` | |
469 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'` | |
470 if test "$system" = "Linux"; then | |
471 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'` | |
472 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'` | |
473 fi | |
474 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'` | |
475 AC_MSG_RESULT(ok) | |
476 | |
477 oldLIBS="$LIBS" | |
478 LIBS="$LIBS $PERL_LIBS" | |
479 AC_MSG_CHECKING(for libperl) | |
480 AC_CHECK_FUNCS(perl_run, [], enable_perl=no) | |
481 LIBS="$oldLIBS" | |
482 | |
483 oldCPPFLAGS="$CPPFLAGS" | |
484 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS" | |
485 AC_CHECK_HEADERS(EXTERN.h) | |
486 AC_CHECK_HEADERS(perl.h, [], enable_perl=no, | |
487 [#if HAVE_EXTERN_H | |
488 # include <EXTERN.h> | |
489 #endif]) | |
490 CPPFLAGS="$oldCPPFLAGS" | |
491 fi | |
492 fi | |
493 | |
494 if test "$enable_perl" = yes ; then | |
495 AC_PROG_PERL_MODULES(ExtUtils::MakeMaker, , have_makemaker=no) | |
496 | |
497 if test "x$have_makemaker" = "xno"; then | |
498 enable_perl=no | |
499 PERL_CFLAGS= | |
500 PERL_LIBS= | |
501 AM_CONDITIONAL(USE_PERL, false) | |
502 AC_MSG_WARN(Compiling perl requires ExtUtils::MakeMaker) | |
503 else | |
504 AC_SUBST(PERL_CFLAGS) | |
505 AC_SUBST(PERL_LIBS) | |
506 AM_CONDITIONAL(USE_PERL, test "x$enable_perl" = "xyes") | |
507 | |
508 dnl This is almost definitely wrong, but in case there's | |
509 dnl something I'm missing, I'll leave it in. | |
510 AC_CHECK_FUNCS(Perl_eval_pv) | |
511 | |
512 AC_MSG_CHECKING(for old perl) | |
513 PERL_OLD=`$perlpath -e 'if($]<5.006){printf"yes\n";}else{printf"no\n";}'` | |
514 | |
515 if test "x$PERL_OLD" = "xyes"; then | |
516 AC_DEFINE(OLD_PERL, 1, [Define if old perl is installed.]) | |
517 AC_MSG_RESULT(yes) | |
518 else | |
519 AC_MSG_RESULT(no) | |
520 fi | |
521 | |
522 if test "x$prefix" != "xNONE"; then | |
523 prefix=`eval echo $prefix` | |
524 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix" | |
525 fi | |
526 | |
527 AC_ARG_WITH(perl-lib, | |
528 [ --with-perl-lib=[site|vendor|DIR] Specify where to install the | |
529 Perl libraries for gaim. Default is site.], | |
530 [ | |
531 if test "x$withval" = xsite; then | |
532 PERL_MM_PARAMS="" | |
533 elif test "x$withval" = xvendor; then | |
534 if test -z "`$perlpath -v | grep '5\.0'`"; then | |
535 PERL_MM_PARAMS="INSTALLDIRS=vendor" | |
536 else | |
537 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`" | |
538 fi | |
539 else | |
540 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$withval" | |
541 fi | |
542 ]) | |
543 | |
544 AC_SUBST(PERL_MM_PARAMS) | |
545 | |
546 AC_MSG_CHECKING(for DynaLoader.a) | |
547 DYNALOADER_A=`echo $PERL_LDFLAGS | $perlpath -pe 's/^(.* )*([[^ ]]*DynaLoader\.a).*/\2/'` | |
548 | |
549 dnl Don't check libperl.a if dynaloader.a wasn't found. | |
550 if test -n "$DYNALOADER_A"; then | |
551 AC_MSG_RESULT(yes) | |
552 | |
553 dnl Find either libperl.a or libperl.so | |
554 AC_MSG_CHECKING(for libperl.a or libperl.so) | |
555 LIBPERL_A=`echo "$PERL_LDFLAGS -L/usr/lib"|$perlpath -e 'foreach (split(/ /, <STDIN>)) { if (/^-L(.*)/) { my $dir=$1; if (\`ls $dir/libperl.so* 2>/dev/null\`) { print "-lperl"; last; }; if (-e "$dir/libperl.a") { print "$dir/libperl.a"; last } } };'` | |
556 if test -z "$LIBPERL_A"; then | |
557 AC_MSG_RESULT(no) | |
558 DYNALOADER_A= | |
559 else | |
560 AC_MSG_RESULT(yes) | |
561 | |
562 if test "$LIBPERL_A" = "-lperl"; then | |
563 LIBPERL_A= | |
564 fi | |
565 fi | |
566 | |
567 PERL_LIBS=`echo $PERL_LIBS | $perlpath -pe 's/^(.* )*[[^ ]]*DynaLoader\.a/\1libperl_dynaloader.la/'` | |
568 | |
569 if test -n "$LIBPERL_A"; then | |
570 PERL_LIBS=`echo $PERL_LDFLAGS | $sedpath -e 's/-lperl /libperl_orig.la /' -e 's/-lperl$/libperl_orig.la$/'` | |
571 fi | |
572 | |
573 AC_SUBST(DYNALOADER_A) | |
574 AC_SUBST(LIBPERL_A) | |
575 else | |
576 AC_MSG_RESULT(no) | |
577 fi | |
578 fi | |
579 else | |
580 PERL_CFLAGS= | |
581 PERL_LIBS= | |
582 AM_CONDITIONAL(USE_PERL, false) | |
583 fi | |
584 | |
585 dnl ####################################################################### | |
586 dnl # SSL support | |
587 dnl # | |
588 dnl # Thanks go to Evolution for the checks. | |
589 dnl ####################################################################### | |
590 | |
591 dnl These two are inverses of each other <-- stolen from evolution! | |
592 | |
593 AC_ARG_ENABLE(gnutls, | |
594 [ --enable-gnutls=[yes,no] Attempt to use GNUTLS for SSL support (preferred) [default=yes]], | |
595 [enable_gnutls="$enableval"], | |
596 [enable_gnutls="yes"]) | |
597 | |
598 AC_ARG_ENABLE(nss, | |
599 [ --enable-nss=[yes,no,static] Attempt to use Mozilla libnss for SSL support [default=yes]], | |
600 [enable_nss="$enableval"], | |
601 [enable_nss="yes"]) | |
602 | |
603 msg_ssl="None" | |
604 | |
605 dnl # | |
606 dnl # Check for GNUTLS if it's specified. | |
607 dnl # | |
608 if test "x$enable_gnutls" != "xno"; then | |
609 enable_gnutls="no" | |
610 prefix=`eval echo $prefix` | |
611 | |
612 AC_ARG_WITH(gnutls-includes, | |
613 [ --with-gnutls-includes=PREFIX Location of GNUTLS includes.], | |
614 [ with_gnutls_includes="$withval" ], | |
615 [ with_gnutls_includes="$prefix/include" ]) | |
616 | |
617 have_gnutls_includes="no" | |
618 | |
619 if test "x$with_gnutls_includes" != "xno"; then | |
620 CPPFLAGS_save="$CPPFLAGS" | |
621 | |
622 AC_MSG_CHECKING(for GNUTLS includes) | |
623 AC_MSG_RESULT("") | |
624 | |
625 CPPFLAGS="$CPPFLAGS -I$with_gnutls_includes" | |
626 AC_CHECK_HEADERS(gnutls/gnutls.h, [ gnutls_includes="yes" ]) | |
627 CPPFLAGS="$CPPFLAGS_save" | |
628 | |
629 if test "x$gnutls_includes" != "xno" -a \ | |
630 "x$gnutls_includes" != "x"; then | |
631 have_gnutls_includes="yes" | |
632 | |
633 GNUTLS_CFLAGS="-I$with_gnutls_includes" | |
634 else | |
635 GNUTLS_CFLAGS="" | |
636 fi | |
637 else | |
638 AC_MSG_CHECKING(for GNUTLS includes) | |
639 AC_MSG_RESULT(no) | |
640 fi | |
641 | |
642 AC_ARG_WITH(gnutls-libs, | |
643 [ --with-gnutls-libs=PREFIX Location of GNUTLS libraries.], | |
644 [ with_gnutls_libs="$withval" ]) | |
645 | |
646 if test "x$with_gnutls_libs" != "xno" -a \ | |
647 "x$have_gnutls_includes" != "xno"; then | |
648 | |
649 LDFLAGS_save="$LDFLAGS" | |
650 | |
651 case $with_gnutls_libs in | |
652 ""|-L*) ;; | |
653 *) with_gnutls_libs="-L$with_gnutls_libs" ;; | |
654 esac | |
655 | |
656 AC_CACHE_CHECK([for GNUTLS libraries], gnutls_libs, | |
657 [ | |
658 LDFLAGS="$LDFLAGS $with_gnutls_libs -lgnutls -lgcrypt" | |
659 AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no") | |
660 LDFLAGS="$LDFLAGS_save" | |
661 ]) | |
662 | |
663 if test "x$gnutls_libs" != "xno"; then | |
664 AC_DEFINE(HAVE_GNUTLS, 1, [Define if you have GNUTLS]) | |
665 AC_DEFINE(HAVE_SSL) | |
666 msg_gnutls="GNUTLS" | |
667 GNUTLS_LIBS="$with_gnutls_libs -lgnutls -lgcrypt" | |
668 | |
669 enable_gnutls="yes" | |
670 else | |
671 GNUTLS_CFLAGS="" | |
672 GNUTLS_LIBS="" | |
673 fi | |
674 else | |
675 AC_MSG_CHECKING(for GNUTLS libraries) | |
676 AC_MSG_RESULT(no) | |
677 fi | |
678 else | |
679 GNUTLS_CFLAGS="" | |
680 GNUTLS_LIBS="" | |
681 fi | |
682 | |
683 AC_SUBST(GNUTLS_CFLAGS) | |
684 AC_SUBST(GNUTLS_LIBS) | |
685 | |
686 AM_CONDITIONAL(USE_GNUTLS, test "x$enable_gnutls" = "xyes") | |
687 | |
688 | |
689 dnl # | |
690 dnl # Check for NSS if it's specified, or if GNUTLS checks failed. | |
691 dnl # | |
692 if test "x$enable_nss" != "xno"; then | |
693 | |
694 AC_ARG_WITH(nspr-includes, | |
695 [ --with-nspr-includes=PREFIX Specify location of Mozilla nspr4 includes.], | |
696 [with_nspr_includes="$withval"]) | |
697 | |
698 AC_ARG_WITH(nspr-libs, | |
699 [ --with-nspr-libs=PREFIX Specify location of Mozilla nspr4 libs.], | |
700 [with_nspr_libs="$withval"]) | |
701 | |
702 AC_ARG_WITH(nss-includes, | |
703 [ --with-nss-includes=PREFIX Specify location of Mozilla nss3 includes.], | |
704 [with_nss_includes="$withval"]) | |
705 | |
706 AC_ARG_WITH(nss-libs, | |
707 [ --with-nss-libs=PREFIX Specify location of Mozilla nss3 libs.], | |
708 [with_nss_libs="$withval"]) | |
709 | |
710 | |
711 if test -n "$with_nspr_includes" || test -n "$with_nspr_libs" || \ | |
712 test -n "$with_nss_includes" || test -n "$with_nss_libs" || | |
713 test "x$enable_nss" = "xstatic"; then | |
714 | |
715 nss_manual_check="yes" | |
716 else | |
717 nss_manual_check="no" | |
718 fi | |
719 | |
720 enable_nss="no" | |
721 | |
722 if test "x$nss_manual_check" = "xno"; then | |
723 PKG_CHECK_MODULES(NSS, mozilla-nss, have_nss="yes", have_nss="no") | |
724 | |
725 if test "x$have_nss" = "xyes"; then | |
726 mozilla_nspr="mozilla-nspr" | |
727 mozilla_nss="mozilla-nss" | |
728 | |
729 AC_DEFINE(HAVE_NSS, 1, [Define if you have Mozilla NSS]) | |
730 AC_DEFINE(HAVE_SSL, 1, [Define if you have SSL]) | |
731 | |
732 msg_nss="Mozilla NSS" | |
733 enable_nss="yes" | |
734 else | |
735 nss_manual_check="yes" | |
736 fi | |
737 fi | |
738 | |
739 if test "x$nss_manual_check" = "xyes"; then | |
740 mozilla_nss="" | |
741 have_nspr_includes="no" | |
742 | |
743 if test "x$with_nspr_includes" != "xno"; then | |
744 CPPFLAGS_save=$CPPFLAGS | |
745 | |
746 AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes) | |
747 AC_MSG_RESULT("") | |
748 | |
749 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes" | |
750 AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ]) | |
751 CPPFLAGS=$CPPFLAGS_save | |
752 | |
753 if test "x$moz_nspr_includes" != "xno" -a \ | |
754 "x$moz_nspr_includes" != "x"; then | |
755 | |
756 have_nspr_includes="yes" | |
757 NSPR_CFLAGS="-I$with_nspr_includes" | |
758 fi | |
759 else | |
760 AC_MSG_CHECKING(for Mozilla nspr4 includes) | |
761 AC_MSG_RESULT(no) | |
762 | |
763 enable_nss="no" | |
764 fi | |
765 | |
766 have_nspr_libs="no" | |
767 | |
768 if test "x$with_nspr_libs" != "xno" -a \ | |
769 "x$have_nspr_includes" != "xno"; then | |
770 | |
771 CFLAGS_save=$CFLAGS | |
772 LDFLAGS_save=$LDFLAGS | |
773 | |
774 if test "$enable_nss" = "static"; then | |
775 if test -z "$with_nspr_libs"; then | |
776 AC_MSG_ERROR( | |
777 [Static linkage requested, but path to nspr libraries not set.] | |
778 [Please specify the path to libnspr4.a] | |
779 [Example: --with-nspr-libs=/usr/lib]) | |
780 | |
781 enable_nss="no" | |
782 else | |
783 nsprlibs="-ldl $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB" | |
784 fi | |
785 else | |
786 nsprlibs="-ldl -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB" | |
787 fi | |
788 | |
789 AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs, | |
790 [ | |
791 LIBS_save=$LIBS | |
792 CFLAGS="$CFLAGS $NSPR_CFLAGS" | |
793 | |
794 LIBS="$nsprlibs" | |
795 | |
796 if test "x$with_nspr_libs" != "x"; then | |
797 LDFLAGS="$LDFLAGS -L$with_nspr_libs" | |
798 else | |
799 LDFLAGS="$LDFLAGS" | |
800 fi | |
801 | |
802 AC_TRY_LINK_FUNC(PR_Init, | |
803 [moz_nspr_libs="yes"], | |
804 [moz_nspr_libs="no"]) | |
805 | |
806 CFLAGS=$CFLAGS_save | |
807 LDFLAGS=$LDFLAGS_save | |
808 LIBS=$LIBS_save | |
809 ]) | |
810 | |
811 if test "x$moz_nspr_libs" != "xno"; then | |
812 have_nspr_libs="yes" | |
813 NSPR_LIBS="-L$with_nspr_libs $nsprlibs" | |
814 else | |
815 NSPR_CFLAGS="" | |
816 enable_nss="no" | |
817 fi | |
818 else | |
819 AC_MSG_CHECKING(for Mozilla nspr4 libraries) | |
820 AC_MSG_RESULT(no) | |
821 fi | |
822 | |
823 have_nss_includes="no" | |
824 | |
825 if test "x$with_nss_includes" != "xno" -a \ | |
826 "x$have_nspr_libs" != "xno"; then | |
827 | |
828 CPPFLAGS_save=$CPPFLAGS | |
829 | |
830 AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes) | |
831 AC_MSG_RESULT("") | |
832 | |
833 if test "x$with_nspr_includes" != "x"; then | |
834 CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes" | |
835 else | |
836 CPPFLAGS="$CPPFLAGS -I$with_nss_includes" | |
837 fi | |
838 | |
839 AC_CHECK_HEADERS(nss.h ssl.h smime.h, | |
840 [moz_nss_includes="yes"], | |
841 [moz_nss_includes="no"]) | |
842 | |
843 CPPFLAGS=$CPPFLAGS_save | |
844 | |
845 if test "x$moz_nss_includes" = "xyes"; then | |
846 have_nss_includes="yes" | |
847 NSS_CFLAGS="-I$with_nss_includes" | |
848 else | |
849 NSPR_CFLAGS="" | |
850 NSPR_LIBS="" | |
851 enable_nss="no" | |
852 fi | |
853 else | |
854 AC_MSG_CHECKING(for Mozilla nss3 includes) | |
855 AC_MSG_RESULT(no) | |
856 enable_nss="no" | |
857 fi | |
858 | |
859 if test "x$with_nss_libs" != "xno" -a \ | |
860 "x$have_nss_includes" != "xno"; then | |
861 | |
862 LDFLAGS_save=$LDFLAGS | |
863 | |
864 if test "$enable_nss" = "static"; then | |
865 if test -z "$with_nss_libs"; then | |
866 AC_MSG_ERROR( | |
867 [Static linkage requested, but path to nss libraries not set.] | |
868 [Please specify the path to libnss3.a] | |
869 [Example: --with-nspr-libs=/usr/lib/mozilla]) | |
870 enable_nss="no" | |
871 else | |
872 nsslibs="-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a" | |
873 | |
874 case "$host" in | |
875 *solaris*) | |
876 nsslibs="$nsslibs $with_nss_libs/libfreeb1.a" | |
877 ;; | |
878 esac | |
879 fi | |
880 else | |
881 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3" | |
882 fi | |
883 | |
884 AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs, | |
885 [ | |
886 LIBS_save=$LIBS | |
887 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs" | |
888 LIBS="$nsslibs $nsprlibs" | |
889 | |
890 AC_TRY_LINK_FUNC(NSS_Init, | |
891 [moz_nss_libs="yes"], | |
892 [moz_nss_libs="no"]) | |
893 | |
894 if test "x$moz_nss_libs" = "xno"; then | |
895 nsslibs="-lssl3 -lsmime3 -lnss3 -lsoftokn3" | |
896 LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs" | |
897 AC_TRY_LINK_FUNC(NSS_Init, | |
898 [moz_nss_libs="yes"], | |
899 [moz_nss_libs="no"]) | |
900 fi | |
901 | |
902 LDFLAGS=$LDFLAGS_save | |
903 LIBS=$LIBS_save | |
904 ]) | |
905 | |
906 if test "x$moz_nss_libs" != "xno"; then | |
907 AC_DEFINE(HAVE_NSS) | |
908 AC_DEFINE(HAVE_SSL) | |
909 | |
910 NSS_LIBS="-L$with_nss_libs $nsslibs" | |
911 | |
912 if test "$enable_nss" = "static"; then | |
913 msg_nss="Mozilla NSS (static)" | |
914 else | |
915 msg_nss="Mozilla NSS" | |
916 fi | |
917 | |
918 enable_nss="yes" | |
919 else | |
920 NSS_CFLAGS="" | |
921 NSPR_CFLAGS="" | |
922 NSPR_LIBS="" | |
923 enable_nss="no" | |
924 fi | |
925 else | |
926 AC_MSG_CHECKING(for Mozilla nss libraries) | |
927 AC_MSG_RESULT(no) | |
928 fi | |
929 | |
930 NSS_CFLAGS="$NSPR_CFLAGS $NSS_CFLAGS" | |
931 NSS_LIBS="$NSPR_LIBS $NSS_LIBS" | |
932 fi | |
933 | |
934 AC_SUBST(NSS_CFLAGS) | |
935 AC_SUBST(NSS_LIBS) | |
936 fi | |
937 | |
938 AM_CONDITIONAL(USE_NSS, test "x$enable_nss" = "xyes") | |
939 | |
940 if test "x$msg_nss" != "x" -a "x$msg_gnutls" != "x"; then | |
941 msg_ssl="$msg_nss and $msg_gnutls" | |
942 elif test "x$msg_nss" != "x"; then | |
943 msg_ssl=$msg_nss | |
944 elif test "x$msg_gnutls" != "x"; then | |
945 msg_ssl=$msg_gnutls | |
946 fi | |
947 | |
948 dnl Check for Tcl | |
949 if test "$enable_tcl" = yes; then | |
950 AC_MSG_CHECKING([for tclConfig.sh]) | |
951 TCLCONFIG=no | |
952 TCLCONFIGDIRS="/usr/lib \ | |
953 /usr/lib/tcl8.4 \ | |
954 /usr/lib/tcl8.3 \ | |
955 /usr/lib/tcl8.2 \ | |
956 /System/Library/Tcl/8.3 \ | |
957 /usr/local/lib" | |
958 for dir in $with_tclconfig $TCLCONFIGDIRS; do | |
959 if test -f $dir/tclConfig.sh; then | |
960 TCLCONFIG=$dir/tclConfig.sh | |
961 AC_MSG_RESULT([yes ($TCLCONFIG)]) | |
962 fi | |
963 done | |
964 if test "$TCLCONFIG" = "no"; then | |
965 AC_MSG_RESULT([no]) | |
966 enable_tcl=no | |
967 else | |
968 . $TCLCONFIG | |
969 AC_MSG_CHECKING([Tcl version compatability]) | |
970 if test "$TCL_MAJOR_VERSION" -ne 8 -o "$TCL_MINOR_VERSION" -lt 3; then | |
971 AC_MSG_RESULT([bad, $TCL_VERSION found but 8.3 or later required]) | |
972 enable_tcl=no | |
973 else | |
974 AC_MSG_RESULT([ok, $TCL_VERSION]) | |
975 eval "TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"" | |
976 AC_MSG_CHECKING([for Tcl linkability]) | |
977 oldCPPFLAGS=$CPPFLAGS | |
978 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" | |
979 oldLIBS=$LIBS | |
980 LIBS="$LIBS $TCL_LIB_SPEC" | |
981 AC_TRY_LINK([#include <tcl.h>], | |
982 [Tcl_Interp *interp; Tcl_Init(interp)], | |
983 [AC_MSG_RESULT([yes]);enable_tcl=yes], | |
984 [AC_MSG_RESULT([no]);enable_tcl=no]) | |
985 CPPFLAGS="$oldCPPFLAGS" | |
986 LIBS="$oldLIBS" | |
987 fi | |
988 fi | |
989 fi | |
990 | |
991 if test "$enable_tcl" = yes; then | |
992 AM_CONDITIONAL(USE_TCL, true) | |
993 TCL_LIBS=$TCL_LIB_SPEC | |
994 AC_SUBST(TCL_LIBS) | |
995 AC_DEFINE(HAVE_TCL, [1], [Compile with support for the Tcl toolkit]) | |
996 TCL_CFLAGS="$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" | |
997 if test "x$GCC" = "xyes"; then | |
998 TCL_CFLAGS="$TCL_CFLAGS -fno-strict-aliasing" | |
999 fi | |
1000 AC_SUBST(TCL_CFLAGS) | |
1001 else | |
1002 AM_CONDITIONAL(USE_TCL, false) | |
1003 fi | |
1004 | |
1005 dnl Check for Tk | |
1006 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then | |
1007 AC_MSG_CHECKING([for tkConfig.sh]) | |
1008 TKCONFIG=no | |
1009 TKCONFIGDIRS="/usr/lib \ | |
1010 /usr/lib/tk8.4 \ | |
1011 /usr/lib/tk8.3 \ | |
1012 /usr/lib/tk8.2 \ | |
1013 /usr/local/lib" | |
1014 for dir in $with_tkconfig $TKCONFIGDIRS; do | |
1015 if test -f $dir/tkConfig.sh; then | |
1016 TKCONFIG=$dir/tkConfig.sh | |
1017 AC_MSG_RESULT([yes ($TKCONFIG)]) | |
1018 fi | |
1019 done | |
1020 if test "$TKCONFIG" = "no"; then | |
1021 AC_MSG_RESULT([no]) | |
1022 enable_tk=no | |
1023 else | |
1024 . $TKCONFIG | |
1025 eval "TK_LIB_SPEC=\"$TK_LIB_SPEC\"" | |
1026 AC_MSG_CHECKING([for Tk linkability]) | |
1027 oldCPPFLAGS=$CPPFLAGS | |
1028 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS" | |
1029 oldLIBS=$LIBS | |
1030 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" | |
1031 AC_TRY_LINK([#include <tk.h>], [Tcl_Interp *interp; Tcl_Init(interp); Tk_Init(interp);], | |
1032 [AC_MSG_RESULT([yes]);enable_tk=yes], | |
1033 [AC_MSG_RESULT([no]);enable_tk=no]) | |
1034 CPPFLAGS="$oldCPPFLAGS" | |
1035 LIBS="$oldLIBS" | |
1036 fi | |
1037 else | |
1038 enable_tk=no | |
1039 fi | |
1040 | |
1041 if test "$enable_tk" = yes; then | |
1042 AM_CONDITIONAL(USE_TK, true) | |
1043 AC_DEFINE(HAVE_TK, [1], [Compile with support for the Tk toolkit]) | |
1044 TK_LIBS=$TK_LIB_SPEC | |
1045 AC_SUBST(TK_LIBS) | |
1046 else | |
1047 AM_CONDITIONAL(USE_TK, false) | |
1048 fi | |
1049 | |
1050 dnl Thanks, Evan. | |
1051 if test "$enable_gtkspell" = yes ; then | |
1052 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, , enable_gtkspell=no) | |
1053 if test "$enable_gtkspell" = "yes" ; then | |
1054 AC_SUBST(GTKSPELL_CFLAGS) | |
1055 AC_SUBST(GTKSPELL_LIBS) | |
1056 AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?]) | |
1057 fi | |
1058 fi | |
1059 | |
1060 if test "$enable_nas" = yes ; then | |
1061 AC_DEFINE(USE_NAS_AUDIO, 1, [Define if we have NAS sound support.]) | |
1062 SOUND_LIBS="$SOUND_LIBS -laudio -lXt" | |
1063 fi | |
1064 | |
1065 if test "$enable_audio" = yes ; then | |
1066 GAIM_PATH_AO(found_ao_lib=true) | |
1067 | |
1068 AM_PATH_AUDIOFILE([0.2.0], found_af_lib=true) | |
1069 | |
1070 if test "$found_ao_lib" = "true" -a "$found_af_lib" = "true"; then | |
1071 SOUND_LIBS="$SOUND_LIBS $AO_LIBS $AUDIOFILE_LIBS" | |
1072 AC_SUBST(SOUND_LIBS) | |
1073 AC_DEFINE(USE_AO, 1, [Define if we're using libao and libaudiofile for sound playing]) | |
1074 enable_audio=yes | |
1075 else | |
1076 enable_audio=no | |
1077 fi | |
1078 else | |
1079 enable_audio=no | |
1080 fi | |
1081 | |
1082 if test "$ac_cv_cygwin" = yes ; then | |
1083 LDADD="$LDADD -static" | |
1084 AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.]) | |
1085 fi | |
1086 | |
1087 AC_SUBST(DEBUG_CFLAGS) | |
1088 AC_SUBST(LDADD) | |
1089 AC_SUBST(LIBS) | |
1090 | |
1091 if test "x$enable_plugins" = "xyes" ; then | |
1092 AC_DEFINE(GAIM_PLUGINS, 1, [Define if plugins are enabled.]) | |
1093 AM_CONDITIONAL(PLUGINS, test "x$enable_plugins" = "xyes") | |
1094 else | |
1095 AM_CONDITIONAL(PLUGINS, false) | |
1096 enable_plugins=no | |
1097 enable_prpls=no | |
1098 fi | |
1099 | |
1100 if test "x$enable_prpls" = "xyes" ; then | |
1101 AM_CONDITIONAL(PRPLS, test "x$enable_plugins" = "xyes") | |
1102 else | |
1103 AM_CONDITIONAL(PRPLS, false) | |
1104 enable_prpls=no | |
1105 fi | |
1106 | |
1107 dnl checks for icqlib | |
1108 AC_CHECK_HEADERS(asm/byteorder.h byteswap.h endian.h machine/endian.h arpa/nameser_compat.h) | |
1109 AC_CHECK_FUNCS(bswap_32 bswap_16) | |
1110 AC_C_BIGENDIAN | |
1111 | |
1112 dnl checks for jabber | |
1113 dnl AC_CHECK_SIZEOF(short) | |
1114 AC_CHECK_FUNCS(snprintf connect) | |
1115 | |
1116 dnl checks for zephyr | |
1117 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.]) | |
1118 AC_SUBST(KRB4_CFLAGS) | |
1119 AC_SUBST(KRB4_LDFLAGS) | |
1120 AC_SUBST(KRB4_LIBS) | |
1121 if test "$kerberos" != "no" ; then | |
1122 if test "$kerberos" != "yes" ; then | |
1123 KRB4_CFLAGS="-I${kerberos}/include" | |
1124 if test -d "$kerberos/include/kerberosIV" ; then | |
1125 KRB4_CFLAGS="$KRB4_CFLAGS -I${kerberos}/include/kerberosIV" | |
1126 fi | |
1127 KRB4_LDFLAGS="-L${kerberos}/lib" | |
1128 elif test -d /usr/local/include/kerberosIV ; then | |
1129 KRB4_CFLAGS="-I/usr/local/include/kerberosIV" | |
1130 elif test -d /usr/include/kerberosIV ; then | |
1131 KRB4_CFLAGS="-I/usr/include/kerberosIV" | |
1132 fi | |
1133 AC_DEFINE(ZEPHYR_USES_KERBEROS, 1, [Define if kerberos should be used in Zephyr.]) | |
1134 | |
1135 orig_LDFLAGS="$LDFLAGS" | |
1136 LDFLAGS="$LDFLAGS $KRB4_LDFLAGS" | |
1137 AC_CHECK_LIB(krb4, krb_rd_req, | |
1138 [KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"], | |
1139 [AC_CHECK_LIB(krb, krb_rd_req, | |
1140 [KRB4_LIBS="-lkrb -ldes"], | |
1141 [AC_ERROR(Kerberos 4 libraries not found)], | |
1142 -ldes)], | |
1143 -ldes425 -lkrb5 -lk5crypto -lcom_err) | |
1144 orig_LIBS="$LIBS" | |
1145 LIBS="$LIBS $KRB4_LIBS" | |
1146 AC_CHECK_FUNCS(krb_set_key krb_rd_req krb_get_lrealm) | |
1147 AC_CHECK_FUNCS(krb_get_err_text krb_log) | |
1148 LIBS="$orig_LIBS" | |
1149 LDFLAGS="$orig_LDFLAGS" | |
1150 fi | |
1151 | |
1152 dnl checks for an external libzephyr | |
1153 AC_SUBST(ZEPHYR_CFLAGS) | |
1154 AC_SUBST(ZEPHYR_LDFLAGS) | |
1155 AC_SUBST(ZEPHYR_LIBS) | |
1156 if test "$zephyr" != "no" ; then | |
1157 if test "$zephyr" != "yes" ; then | |
1158 ZEPHYR_CFLAGS="-I${zephyr}/include" | |
1159 ZEPHYR_LDFLAGS="-L${zephyr}/lib" | |
1160 elif test -d /usr/athena/include/zephyr ; then | |
1161 ZEPHYR_CFLAGS="-I/usr/athena/include" | |
1162 elif test -d /usr/include/zephyr ; then | |
1163 ZEPHYR_CFLAGS="-I/usr/include" | |
1164 elif test -d /usr/local/include/zephyr ; then | |
1165 ZEPHYR_CFLAGS="-I/usr/local/include" | |
1166 fi | |
1167 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.]) | |
1168 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") | |
1169 orig_LDFLAGS="$LDFLAGS" | |
1170 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS" | |
1171 AC_CHECK_LIB(zephyr, ZInitialize, | |
1172 [ZEPHYR_LIBS="-lzephyr"], | |
1173 [AC_ERROR(Zephyr libraries not found)], | |
1174 -lzephyr) | |
1175 orig_LIBS="$LIBS" | |
1176 LIBS="$orig_LIBS" | |
1177 LDFLAGS="$orig_LDFLAGS" | |
1178 fi | |
1179 | |
1180 AM_BINRELOC | |
1181 | |
1182 AC_MSG_CHECKING(for me pot o' gold) | |
1183 AC_MSG_RESULT(no) | |
1184 AC_CHECK_FUNCS(gethostid lrand48) | |
1185 AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf) | |
1186 AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h) | |
1187 AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h) | |
1188 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) | |
1189 AC_CHECK_HEADERS(termios.h) | |
1190 AC_VAR_TIMEZONE_EXTERNALS | |
1191 | |
1192 dnl ####################################################################### | |
1193 dnl # Doxygen Stuff | |
1194 dnl ####################################################################### | |
1195 AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation with doxygen],,enable_doxygen=yes) | |
1196 AC_ARG_ENABLE(dot, [ --enable-dot enable graphs in doxygen via 'dot'],,enable_dot=yes) | |
1197 | |
1198 if test "x$enable_doxygen" = xyes; then | |
1199 AC_CHECK_PROG(DOXYGEN, doxygen, true, false) | |
1200 if test $DOXYGEN = false; then | |
1201 AC_MSG_WARN([*** doxygen not found, docs will not be available]) | |
1202 enable_doxygen=no | |
1203 else | |
1204 AC_DEFINE_UNQUOTED(HAVE_DOXYGEN, 1, [whether or not we have doxygen]) | |
1205 | |
1206 if test "x$enable_dot" = xyes; then | |
1207 AC_CHECK_PROG(DOT, dot, true, false) | |
1208 | |
1209 if test $DOT = false; then | |
1210 enable_dot = no; | |
1211 AC_MSG_WARN([*** dot not found, graphs will not be available]) | |
1212 else | |
1213 AC_DEFINE_UNQUOTED(HAVE_DOT, 1, [whether or not we have dot]) | |
1214 fi | |
1215 else | |
1216 AC_MSG_WARN([*** dot not found, graphs will not be available]) | |
1217 fi | |
1218 fi | |
1219 else | |
1220 enable_dot="no" | |
1221 fi | |
1222 | |
1223 if test "x$enable_doxygen" = xyes; then | |
1224 AM_CONDITIONAL(HAVE_DOXYGEN, true) | |
1225 else | |
1226 AM_CONDITIONAL(HAVE_DOXYGEN, false) | |
1227 fi | |
1228 | |
1229 AC_SUBST(enable_doxygen) | |
1230 AC_SUBST(enable_dot) | |
1231 | |
1232 AC_CONFIG_COMMANDS_PRE([ | |
1233 if test -e VERSION; then | |
1234 cp -p VERSION VERSION.ac-save | |
1235 fi | |
1236 ]) | |
1237 | |
1238 AC_CONFIG_COMMANDS_POST([ | |
1239 cmp VERSION VERSION.ac-save || touch -r VERSION.ac-save VERSION | |
1240 rm -f VERSION.ac-save | |
1241 ]) | |
1242 | |
91 AC_OUTPUT([Makefile | 1243 AC_OUTPUT([Makefile |
92 src/Makefile | 1244 Doxyfile |
93 ]) | 1245 gaim.apspec |
1246 doc/Makefile | |
1247 doc/gaim.1 | |
1248 doc/gaim-remote.1 | |
1249 intl/Makefile | |
1250 pixmaps/Makefile | |
1251 pixmaps/smileys/Makefile | |
1252 pixmaps/smileys/default/Makefile | |
1253 pixmaps/smileys/none/Makefile | |
1254 pixmaps/status/Makefile | |
1255 pixmaps/status/default/Makefile | |
1256 plugins/Makefile | |
1257 plugins/docklet/Makefile | |
1258 plugins/crazychat/Makefile | |
1259 plugins/gevolution/Makefile | |
1260 plugins/gaim-remote/Makefile | |
1261 plugins/gestures/Makefile | |
1262 plugins/perl/Makefile | |
1263 plugins/perl/common/Makefile.PL | |
1264 plugins/ssl/Makefile | |
1265 plugins/tcl/Makefile | |
1266 plugins/ticker/Makefile | |
1267 po/Makefile.in | |
1268 sounds/Makefile | |
1269 src/Makefile | |
1270 src/protocols/Makefile | |
1271 src/protocols/gg/Makefile | |
1272 src/protocols/irc/Makefile | |
1273 src/protocols/jabber/Makefile | |
1274 src/protocols/msn/Makefile | |
1275 src/protocols/napster/Makefile | |
1276 src/protocols/novell/Makefile | |
1277 src/protocols/oscar/Makefile | |
1278 src/protocols/rendezvous/Makefile | |
1279 src/protocols/silc/Makefile | |
1280 src/protocols/toc/Makefile | |
1281 src/protocols/trepia/Makefile | |
1282 src/protocols/yahoo/Makefile | |
1283 src/protocols/zephyr/Makefile | |
1284 gaim.pc | |
1285 gaim.spec | |
1286 ]) | |
1287 | |
1288 echo | |
1289 echo $PACKAGE $VERSION | |
1290 | |
1291 echo | |
1292 echo Build Protocol Plugins........ : $enable_prpls | |
1293 echo Protocols to link statically.. : $STATIC_PRPLS | |
1294 echo Protocols to build dynamically : $DYNAMIC_PRPLS | |
1295 echo | |
1296 echo UI Library.................... : GTK 2.x | |
1297 echo SSL Library/Libraries......... : $msg_ssl | |
1298 echo | |
1299 echo Build with Plugin support..... : $enable_plugins | |
1300 echo Build with Perl support....... : $enable_perl | |
1301 echo Build with Tcl support........ : $enable_tcl | |
1302 echo Build with Tk support......... : $enable_tk | |
1303 echo Build with Audio support...... : $enable_audio | |
1304 echo Build with NAS support........ : $enable_nas | |
1305 echo Build with GtkSpell support... : $enable_gtkspell | |
1306 echo | |
1307 echo Use kerberos 4 with zephyr.... : $kerberos | |
1308 echo Use external libzephyr........ : $zephyr | |
1309 echo | |
1310 echo Use XScreenSaver Extension.... : $enable_xss | |
1311 echo Use X Session Management...... : $enable_sm | |
1312 echo Use startup notification.......: $enable_startup_notification | |
1313 echo | |
1314 echo Print debugging messages...... : $enable_debug | |
1315 echo | |
1316 eval eval echo Gaim will be installed in $bindir. | |
1317 if test "x$gaimpath" != "x" ; then | |
1318 echo Warning: You have an old copy of gaim at $gaimpath. | |
1319 fi | |
1320 echo | |
1321 echo configure complete, now type \'make\' | |
1322 echo |