comparison configure.ac @ 17806:980a104267da

Patch from Pekka Riikonen to update the SILC protocol plugin to work with SILC Toolkit 1.1 I added the fallback to SILC Toolkit 1.0 support (silc10 protocol directory) and configure.ac adjustments, any problems with this are 100% my fault.
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 09 Jun 2007 17:31:28 +0000
parents 6f54b1e84610
children 9f7eabc5e42d bb2e5f6ff2b4 7577706bde9c
comparison
equal deleted inserted replaced
17805:ba1b50f114f6 17806:980a104267da
645 dnl ####################################################################### 645 dnl #######################################################################
646 AC_ARG_WITH(silc-includes, [AC_HELP_STRING([--with-silc-includes=DIR], [compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"]) 646 AC_ARG_WITH(silc-includes, [AC_HELP_STRING([--with-silc-includes=DIR], [compile the SILC plugin against includes in DIR])], [ac_silc_includes="$withval"], [ac_silc_includes="no"])
647 AC_ARG_WITH(silc-libs, [AC_HELP_STRING([--with-silc-libs=DIR], [compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"]) 647 AC_ARG_WITH(silc-libs, [AC_HELP_STRING([--with-silc-libs=DIR], [compile the SILC plugin against the SILC libs in DIR])], [ac_silc_libs="$withval"], [ac_silc_libs="no"])
648 SILC_CFLAGS="" 648 SILC_CFLAGS=""
649 SILC_LIBS="" 649 SILC_LIBS=""
650 have_silc="no"
650 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then 651 if test -n "$with_silc_includes" || test -n "$with_silc_libs"; then
651 silc_manual_check="yes" 652 silc_manual_check="yes"
652 else 653 else
653 silc_manual_check="no" 654 silc_manual_check="no"
654 fi 655 fi
655 if test "x$silc_manual_check" = "xno"; then 656 if test "x$silc_manual_check" = "xno"; then
656 PKG_CHECK_MODULES(SILC, silcclient, [ 657 PKG_CHECK_MODULES(SILC, [silcclient >= 1.1], [
657 have_silc="yes" 658 have_silc="yes"
658 silcincludes="yes" 659 silcincludes="yes"
659 silcclient="yes" 660 silcclient="yes"
660 ], [ 661 ], [
661 AC_MSG_RESULT(no) 662 AC_MSG_RESULT(no)
662 have_silc="no" 663 have_silc="no"
663 ]) 664 ])
664 dnl If silcclient.pc wasn't found, check for just silc.pc
665 if test "x$have_silc" = "xno"; then 665 if test "x$have_silc" = "xno"; then
666 PKG_CHECK_MODULES(SILC, silc, [ 666 PKG_CHECK_MODULES(SILC, silcclient, [
667 have_silc="yes" 667 have_silc="yes"
668 silcincludes="yes" 668 silc10includes="yes"
669 silcclient="yes" 669 silc10client="yes"
670 ], [ 670 ], [
671 AC_MSG_RESULT(no) 671 AC_MSG_RESULT(no)
672 have_silc="no" 672 have_silc="no"
673 ]) 673 ])
674 dnl If silcclient.pc wasn't found, check for just silc.pc
675 if test "x$have_silc" = "xno"; then
676 PKG_CHECK_MODULES(SILC, silc, [
677 have_silc="yes"
678 silc10includes="yes"
679 silc10client="yes"
680 ], [
681 AC_MSG_RESULT(no)
682 have_silc="no"
683 ])
684 fi
674 fi 685 fi
675 else 686 else
676 if test "$ac_silc_includes" != "no"; then 687 if test "$ac_silc_includes" != "no"; then
677 SILC_CFLAGS="-I$ac_silc_includes" 688 SILC_CFLAGS="-I$ac_silc_includes"
678 fi 689 fi
679 CPPFLAGS_save="$CPPFLAGS" 690 CPPFLAGS_save="$CPPFLAGS"
680 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS" 691 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
681 AC_CHECK_HEADER(silcincludes.h, [silcincludes=yes]) 692 AC_CHECK_HEADER(silc.h, [silcincludes=yes])
682 CPPFLAGS="$CPPFLAGS_save" 693 CPPFLAGS="$CPPFLAGS_save"
683 694
684 if test "$ac_silc_libs" != "no"; then 695 if test "$ac_silc_libs" != "no"; then
685 SILC_LIBS="-L$ac_silc_libs" 696 SILC_LIBS="-L$ac_silc_libs"
686 fi 697 fi
687 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL" 698 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
688 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS) 699 AC_CHECK_LIB(silcclient, silc_client_init, [silcclient=yes], , $SILC_LIBS)
700
701 if test "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes"; then
702 have_silc="yes"
703 else
704 CPPFLAGS_save="$CPPFLAGS"
705 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
706 AC_CHECK_HEADER(silcincludes.h, [silc10includes=yes])
707 CPPFLAGS="$CPPFLAGS_save"
708
709 SILC_LIBS="$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL"
710 AC_CHECK_LIB(silcclient, silc_client_init, [silc10client=yes], , $SILC_LIBS)
711 if test "x$silc10includes" = "xyes" -a "x$silc10client" = "xyes"; then
712 have_silc="yes"
713 fi
714 fi
689 fi 715 fi
690 AC_SUBST(SILC_LIBS) 716 AC_SUBST(SILC_LIBS)
691 AC_SUBST(SILC_CFLAGS) 717 AC_SUBST(SILC_CFLAGS)
692 dnl SILC Toolkit >= 1.0.1 has a new MIME API 718 dnl SILC Toolkit >= 1.0.1 has a new MIME API
693 if test "x$silcclient" = "xyes"; then 719 if test "x$silcclient" = "xyes"; then
720 AC_DEFINE(HAVE_SILCMIME_H, 1, [Define if we have silcmime.h])
721 elif test "x$silc10client" = "xyes"; then
694 CPPFLAGS_save="$CPPFLAGS" 722 CPPFLAGS_save="$CPPFLAGS"
695 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS" 723 CPPFLAGS="$CPPFLAGS $SILC_CFLAGS"
696 AC_MSG_CHECKING(for silcmime.h) 724 AC_MSG_CHECKING(for silcmime.h)
697 AC_TRY_COMPILE([ 725 AC_TRY_COMPILE([
698 #include <silcincludes.h> 726 #include <silcincludes.h>
793 fi 821 fi
794 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then 822 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
795 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'` 823 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/bonjour//'`
796 fi 824 fi
797 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 825 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
798 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'` 826 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc/silc10/'`
827 fi
828 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
829 STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc10//'`
799 fi 830 fi
800 AC_SUBST(STATIC_PRPLS) 831 AC_SUBST(STATIC_PRPLS)
801 STATIC_LINK_LIBS= 832 STATIC_LINK_LIBS=
802 extern_init= 833 extern_init=
803 load_proto= 834 load_proto=
811 load_proto="$load_proto purple_init_aim_plugin();" 842 load_proto="$load_proto purple_init_aim_plugin();"
812 load_proto="$load_proto purple_init_icq_plugin();" 843 load_proto="$load_proto purple_init_icq_plugin();"
813 else 844 else
814 if test "x$i" = "xsilc"; then 845 if test "x$i" = "xsilc"; then
815 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.a" 846 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.a"
847 elif test "x$i" = "xsilc10"; then
848 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.a"
816 else 849 else
817 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.a" 850 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.a"
818 fi 851 fi
819 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();" 852 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
820 load_proto="$load_proto purple_init_${i}_plugin();" 853 load_proto="$load_proto purple_init_${i}_plugin();"
830 aim) static_oscar=yes ;; 863 aim) static_oscar=yes ;;
831 icq) static_oscar=yes ;; 864 icq) static_oscar=yes ;;
832 qq) static_qq=yes ;; 865 qq) static_qq=yes ;;
833 sametime) static_sametime=yes ;; 866 sametime) static_sametime=yes ;;
834 silc) static_silc=yes ;; 867 silc) static_silc=yes ;;
868 silc10) static_silc=yes ;;
835 simple) static_simple=yes ;; 869 simple) static_simple=yes ;;
836 toc) static_toc=yes ;; 870 toc) static_toc=yes ;;
837 yahoo) static_yahoo=yes ;; 871 yahoo) static_yahoo=yes ;;
838 zephyr) static_zephyr=yes ;; 872 zephyr) static_zephyr=yes ;;
839 *) echo "Invalid static protocol $i!!" ; exit ;; 873 *) echo "Invalid static protocol $i!!" ; exit ;;
846 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") 880 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
847 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes") 881 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
848 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") 882 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
849 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes") 883 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
850 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes") 884 AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
851 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes") 885 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$have_silc" = "xyes")
852 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes") 886 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
853 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes") 887 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes")
854 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes") 888 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
855 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes") 889 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
856 AC_SUBST(STATIC_LINK_LIBS) 890 AC_SUBST(STATIC_LINK_LIBS)
866 fi 900 fi
867 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then 901 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
868 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` 902 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
869 fi 903 fi
870 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 904 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
871 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'` 905 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc/silc10/'`
906 fi
907 if test "x$silc10includes" != "xyes" -o "x$silc10client" != "xyes"; then
908 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc10//'`
872 fi 909 fi
873 AC_SUBST(DYNAMIC_PRPLS) 910 AC_SUBST(DYNAMIC_PRPLS)
874 for i in $DYNAMIC_PRPLS ; do 911 for i in $DYNAMIC_PRPLS ; do
875 case $i in 912 case $i in
876 bonjour) dynamic_bonjour=yes ;; 913 bonjour) dynamic_bonjour=yes ;;
883 aim) dynamic_oscar=yes ;; 920 aim) dynamic_oscar=yes ;;
884 icq) dynamic_oscar=yes ;; 921 icq) dynamic_oscar=yes ;;
885 qq) dynamic_qq=yes ;; 922 qq) dynamic_qq=yes ;;
886 sametime) dynamic_sametime=yes ;; 923 sametime) dynamic_sametime=yes ;;
887 silc) dynamic_silc=yes ;; 924 silc) dynamic_silc=yes ;;
925 silc10) dynamic_silc=yes ;;
888 simple) dynamic_simple=yes ;; 926 simple) dynamic_simple=yes ;;
889 toc) dynamic_toc=yes ;; 927 toc) dynamic_toc=yes ;;
890 yahoo) dynamic_yahoo=yes ;; 928 yahoo) dynamic_yahoo=yes ;;
891 zephyr) dynamic_zephyr=yes ;; 929 zephyr) dynamic_zephyr=yes ;;
892 *) echo "Invalid dynamic protocol $i!!" ; exit ;; 930 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
899 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes") 937 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes")
900 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes") 938 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes")
901 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes") 939 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes")
902 AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes") 940 AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes")
903 AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes" -a "x$have_meanwhile" = "xyes") 941 AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes" -a "x$have_meanwhile" = "xyes")
904 AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes") 942 AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$have_silc" = "xyes")
905 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes") 943 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes")
906 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes") 944 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes")
907 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes") 945 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes")
908 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes") 946 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes")
909 947
2098 libpurple/protocols/null/Makefile 2136 libpurple/protocols/null/Makefile
2099 libpurple/protocols/oscar/Makefile 2137 libpurple/protocols/oscar/Makefile
2100 libpurple/protocols/qq/Makefile 2138 libpurple/protocols/qq/Makefile
2101 libpurple/protocols/sametime/Makefile 2139 libpurple/protocols/sametime/Makefile
2102 libpurple/protocols/silc/Makefile 2140 libpurple/protocols/silc/Makefile
2141 libpurple/protocols/silc10/Makefile
2103 libpurple/protocols/simple/Makefile 2142 libpurple/protocols/simple/Makefile
2104 libpurple/protocols/toc/Makefile 2143 libpurple/protocols/toc/Makefile
2105 libpurple/protocols/yahoo/Makefile 2144 libpurple/protocols/yahoo/Makefile
2106 libpurple/protocols/zephyr/Makefile 2145 libpurple/protocols/zephyr/Makefile
2107 libpurple/tests/Makefile 2146 libpurple/tests/Makefile