comparison configure.ac @ 13317:41747a38a1a8

[gaim-migrate @ 15686] SF Patch #1424846 from Matthew Luckie with changes by me This builds using a shared library version of libgadu. Wingaim still uses the in-tree copy of libgadu. I hope to get our win32 changes to libgadu merged upstream soon, so we can use the upstream codebase there too. For libgadu build instructions, see: http://gaim.sourceforge.net/faq2.php#libgadu committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 22 Feb 2006 02:54:20 +0000
parents 44a8d46ee3c1
children d5bfc701e1e5
comparison
equal deleted inserted replaced
13316:41c4b4aa523a 13317:41747a38a1a8
270 ]) 270 ])
271 CPPFLAGS="$CPPFLAGS_save" 271 CPPFLAGS="$CPPFLAGS_save"
272 fi 272 fi
273 273
274 274
275 dnl #######################################################################
276 dnl # Check for gadugadu client includes and libraries
277 dnl #######################################################################
278 AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [Compile the gadugadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
279 AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [Compile the gadugadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
280 GADU_CFLAGS=""
281 GADU_LIBS=""
282 if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
283 gadu_manual_check="yes"
284 else
285 gadu_manual_check="no"
286 fi
287 if test "x$gadu_manual_check" = "xno"; then
288 PKG_CHECK_MODULES(GADU, libgadu, [
289 gadu_includes="yes"
290 gadu_libs="yes"
291 ], [
292 AC_MSG_RESULT(no)
293 ])
294 else
295 if test "$ac_gadu_includes" != "no"; then
296 GADU_CFLAGS="-I$ac_gadu_includes"
297 fi
298 CPPFLAGS_save="$CPPFLAGS"
299 CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
300 AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
301 CPPFLAGS="$CPPFLAGS_save"
302
303 if test "$ac_gadu_libs" != "no"; then
304 GADU_LIBS="-L$ac_gadu_libs"
305 fi
306 GADU_LIBS="$GADU_LIBS -lgadu"
307 AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
308 fi
309
310 if test "x$gadu_libs" = "xyes"; then
311 AC_MSG_CHECKING(for libgadu GPL compatibility)
312 AC_TRY_COMPILE([], [
313 #include <libgadu.h>
314 int main()
315 {
316 #ifdef __GG_LIBGADU_HAVE_OPENSSL
317 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
318 #endif
319 return 0;
320 }
321 ], [
322 AC_MSG_RESULT(yes)
323 ], [
324 AC_MSG_RESULT(no)
325 echo
326 echo
327 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
328 echo "Please recompile libgadu using:"
329 echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
330 echo "Then rerun this ./configure"
331 echo
332 echo
333 GADU_LIBS=""
334 GADU_CFLAGS=""
335 gadu_libs=no
336 ])
337 fi
338
339 AC_SUBST(GADU_LIBS)
340 AC_SUBST(GADU_CFLAGS)
341
342
275 AC_ARG_ENABLE(distrib,,,enable_distrib=no) 343 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
276 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") 344 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
277 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) 345 AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes)
278 DYNAMIC_PRPLS=all 346 DYNAMIC_PRPLS=all
279 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="") 347 AC_ARG_WITH(static-prpls, [ --with-static-prpls link in certain protocols statically],[STATIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`],STATIC_PRPLS="")
290 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then 358 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
291 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'` 359 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
292 fi 360 fi
293 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 361 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
294 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'` 362 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'`
363 fi
364 if test "x$gadu_libs" != "xyes"; then
365 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/gg//'`
295 fi 366 fi
296 AC_SUBST(STATIC_PRPLS) 367 AC_SUBST(STATIC_PRPLS)
297 STATIC_LINK_LIBS= 368 STATIC_LINK_LIBS=
298 extern_init= 369 extern_init=
299 load_proto= 370 load_proto=
306 fi 377 fi
307 extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();" 378 extern_init="$extern_init extern gboolean gaim_init_${i}_plugin();"
308 load_proto="$load_proto gaim_init_${i}_plugin();" 379 load_proto="$load_proto gaim_init_${i}_plugin();"
309 case $i in 380 case $i in
310 bonjour) static_bonjour=yes ;; 381 bonjour) static_bonjour=yes ;;
311 gg) static_gg=yes ;; 382 gg) static_gg=yes ;;
312 irc) static_irc=yes ;; 383 irc) static_irc=yes ;;
313 jabber) static_jabber=yes ;; 384 jabber) static_jabber=yes ;;
314 msn) static_msn=yes ;; 385 msn) static_msn=yes ;;
315 novell) static_novell=yes ;; 386 novell) static_novell=yes ;;
316 oscar) static_oscar=yes ;; 387 oscar) static_oscar=yes ;;
350 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then 421 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
351 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` 422 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
352 fi 423 fi
353 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 424 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
354 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'` 425 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'`
426 fi
427 if test "x$gadu_libs" != "xyes"; then
428 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/gg//'`
355 fi 429 fi
356 AC_SUBST(DYNAMIC_PRPLS) 430 AC_SUBST(DYNAMIC_PRPLS)
357 for i in $DYNAMIC_PRPLS ; do 431 for i in $DYNAMIC_PRPLS ; do
358 case $i in 432 case $i in
359 bonjour) dynamic_bonjour=yes ;; 433 bonjour) dynamic_bonjour=yes ;;