configure.ac

branch
release-2.1.0
changeset 18142
dd801770f372
parent 18125
eea59bddef90
parent 17675
e7069bf1de1a
child 18164
1e86dedf48be
equal deleted inserted replaced
18141:77cd035b2231 18142:dd801770f372
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=
804 for i in $STATIC_PRPLS ; do 835 for i in $STATIC_PRPLS ; do
805 dnl Ugly special case for "libsilcpurple.a": 836 dnl Ugly special case for "libsilcpurple.a":
806 if test "x$i" = "xsilc"; then 837 dnl ... and Ugly special case for multi-protocol oscar
807 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib${i}purple.a" 838 if test \( "x$i" = "xoscar" -o "x$i" = "xaim" -o "x$i" = "xicq" \) -a "x$static_oscar" != "xyes"; then
839 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/oscar/liboscar.a"
840 extern_init="$extern_init extern gboolean purple_init_aim_plugin();"
841 extern_init="$extern_init extern gboolean purple_init_icq_plugin();"
842 load_proto="$load_proto purple_init_aim_plugin();"
843 load_proto="$load_proto purple_init_icq_plugin();"
808 else 844 else
809 STATIC_LINK_LIBS="$STATIC_LINK_LIBS protocols/$i/lib$i.a" 845 if test "x$i" = "xsilc"; then
810 fi 846 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib${i}purple.a"
811 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();" 847 elif test "x$i" = "xsilc10"; then
812 load_proto="$load_proto purple_init_${i}_plugin();" 848 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/libsilcpurple.a"
849 else
850 STATIC_LINK_LIBS="$STATIC_LINK_LIBS \$(top_builddir)/libpurple/protocols/$i/lib$i.a"
851 fi
852 extern_init="$extern_init extern gboolean purple_init_${i}_plugin();"
853 load_proto="$load_proto purple_init_${i}_plugin();"
854 fi
813 case $i in 855 case $i in
814 bonjour) static_bonjour=yes ;; 856 bonjour) static_bonjour=yes ;;
815 gg) static_gg=yes ;; 857 gg) static_gg=yes ;;
816 irc) static_irc=yes ;; 858 irc) static_irc=yes ;;
817 jabber) static_jabber=yes ;; 859 jabber) static_jabber=yes ;;
821 aim) static_oscar=yes ;; 863 aim) static_oscar=yes ;;
822 icq) static_oscar=yes ;; 864 icq) static_oscar=yes ;;
823 qq) static_qq=yes ;; 865 qq) static_qq=yes ;;
824 sametime) static_sametime=yes ;; 866 sametime) static_sametime=yes ;;
825 silc) static_silc=yes ;; 867 silc) static_silc=yes ;;
868 silc10) static_silc=yes ;;
826 simple) static_simple=yes ;; 869 simple) static_simple=yes ;;
827 toc) static_toc=yes ;; 870 toc) static_toc=yes ;;
828 yahoo) static_yahoo=yes ;; 871 yahoo) static_yahoo=yes ;;
829 zephyr) static_zephyr=yes ;; 872 zephyr) static_zephyr=yes ;;
830 *) echo "Invalid static protocol $i!!" ; exit ;; 873 *) echo "Invalid static protocol $i!!" ; exit ;;
837 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes") 880 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
838 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes") 881 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
839 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes") 882 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
840 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes") 883 AM_CONDITIONAL(STATIC_QQ, test "x$static_qq" = "xyes")
841 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")
842 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")
843 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes") 886 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
844 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes") 887 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes")
845 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes") 888 AM_CONDITIONAL(STATIC_YAHOO, test "x$static_yahoo" = "xyes")
846 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes") 889 AM_CONDITIONAL(STATIC_ZEPHYR, test "x$static_zephyr" = "xyes")
847 AC_SUBST(STATIC_LINK_LIBS) 890 AC_SUBST(STATIC_LINK_LIBS)
857 fi 900 fi
858 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then 901 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
859 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` 902 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
860 fi 903 fi
861 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 904 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
862 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//'`
863 fi 909 fi
864 AC_SUBST(DYNAMIC_PRPLS) 910 AC_SUBST(DYNAMIC_PRPLS)
865 for i in $DYNAMIC_PRPLS ; do 911 for i in $DYNAMIC_PRPLS ; do
866 case $i in 912 case $i in
867 bonjour) dynamic_bonjour=yes ;; 913 bonjour) dynamic_bonjour=yes ;;
874 aim) dynamic_oscar=yes ;; 920 aim) dynamic_oscar=yes ;;
875 icq) dynamic_oscar=yes ;; 921 icq) dynamic_oscar=yes ;;
876 qq) dynamic_qq=yes ;; 922 qq) dynamic_qq=yes ;;
877 sametime) dynamic_sametime=yes ;; 923 sametime) dynamic_sametime=yes ;;
878 silc) dynamic_silc=yes ;; 924 silc) dynamic_silc=yes ;;
925 silc10) dynamic_silc=yes ;;
879 simple) dynamic_simple=yes ;; 926 simple) dynamic_simple=yes ;;
880 toc) dynamic_toc=yes ;; 927 toc) dynamic_toc=yes ;;
881 yahoo) dynamic_yahoo=yes ;; 928 yahoo) dynamic_yahoo=yes ;;
882 zephyr) dynamic_zephyr=yes ;; 929 zephyr) dynamic_zephyr=yes ;;
883 *) echo "Invalid dynamic protocol $i!!" ; exit ;; 930 *) echo "Invalid dynamic protocol $i!!" ; exit ;;
890 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes") 937 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes")
891 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes") 938 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes")
892 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes") 939 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes")
893 AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes") 940 AM_CONDITIONAL(DYNAMIC_QQ, test "x$dynamic_qq" = "xyes")
894 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")
895 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")
896 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes") 943 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes")
897 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes") 944 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes")
898 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes") 945 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes")
899 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes") 946 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes")
900 947
2089 libpurple/protocols/null/Makefile 2136 libpurple/protocols/null/Makefile
2090 libpurple/protocols/oscar/Makefile 2137 libpurple/protocols/oscar/Makefile
2091 libpurple/protocols/qq/Makefile 2138 libpurple/protocols/qq/Makefile
2092 libpurple/protocols/sametime/Makefile 2139 libpurple/protocols/sametime/Makefile
2093 libpurple/protocols/silc/Makefile 2140 libpurple/protocols/silc/Makefile
2141 libpurple/protocols/silc10/Makefile
2094 libpurple/protocols/simple/Makefile 2142 libpurple/protocols/simple/Makefile
2095 libpurple/protocols/toc/Makefile 2143 libpurple/protocols/toc/Makefile
2096 libpurple/protocols/yahoo/Makefile 2144 libpurple/protocols/yahoo/Makefile
2097 libpurple/protocols/zephyr/Makefile 2145 libpurple/protocols/zephyr/Makefile
2098 libpurple/tests/Makefile 2146 libpurple/tests/Makefile

mercurial