changeset 11949:47e1723a89d7

[gaim-migrate @ 14240] this should keep the test builds from breaking. In the absence of GMP, Sametime will be removed from the build committer: Tailor Script <tailor@pidgin.im>
author Christopher O'Brien <siege@pidgin.im>
date Wed, 02 Nov 2005 04:32:28 +0000
parents fd456a3275a8
children 2b9ca8861ca5
files configure.ac src/protocols/sametime/meanwhile/Makefile.am src/protocols/sametime/sametime.c
diffstat 3 files changed, 52 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Wed Nov 02 04:20:46 2005 +0000
+++ b/configure.ac	Wed Nov 02 04:32:28 2005 +0000
@@ -102,6 +102,51 @@
 AC_SYS_LARGEFILE
 
 
+dnl # Check for GMP. If it's not there, Sametime won't build
+have_gmp=yes
+GMP_LIBS=
+GMP_CFLAGS=
+
+# either auto-detect or specify the libgmp.a file for static linking
+withval="auto"
+AC_ARG_WITH(gmp-prefix,
+        [  --with-gmp-prefix[=auto]  prefix gmp was installed to])
+
+if test "$withval" = "auto" ; then
+        found_prefix=no
+
+        if test $found_prefix = "no" ; then
+           try_prefix=/usr
+           AC_CHECK_HEADER([$try_prefix/include/gmp.h], found_prefix="yes")
+        fi
+
+        if test $found_prefix = "no" ; then
+           try_prefix=/usr/local
+           AC_CHECK_HEADER([$try_prefix/include/gmp.h], found_prefix="yes")
+        fi
+
+        if test $found_prefix = "no" ; then
+           dnl AC_MSG_ERROR([GNU MP headers not found])
+	   have_gmp=no
+        fi
+
+elif test -n "$withval" ; then
+        try_prefix=$withval
+
+        AC_CHECK_HEADER([$try_prefix/include/gmp.h],,
+                [AC_MSG_ERROR([GNU MP headers not found])])
+
+else
+        dnl AC_MSG_ERROR([GNU MP headers not found, $withval])
+	have_gmp=no
+fi
+
+GMP_CFLAGS=-I$try_prefix/include
+
+AC_SUBST(GMP_CFLAGS)
+AC_SUBST(GMP_LIBS)
+
+
 
 dnl #######################################################################
 dnl # Check for Howl headers (for Bonjour)
@@ -237,7 +282,7 @@
 AM_CONDITIONAL(STATIC_MSN, test "x$static_msn" = "xyes")
 AM_CONDITIONAL(STATIC_NOVELL, test "x$static_novell" = "xyes")
 AM_CONDITIONAL(STATIC_OSCAR, test "x$static_oscar" = "xyes")
-AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes")
+AM_CONDITIONAL(STATIC_SAMETIME, test "x$static_sametime" = "xyes" -a "x$have_gmp" = "xyes")
 AM_CONDITIONAL(STATIC_SILC, test "x$static_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes")
 AM_CONDITIONAL(STATIC_SIMPLE, test "x$static_simple" = "xyes")
 AM_CONDITIONAL(STATIC_TOC, test "x$static_toc" = "xyes")
@@ -283,7 +328,7 @@
 AM_CONDITIONAL(DYNAMIC_MSN, test "x$dynamic_msn" = "xyes")
 AM_CONDITIONAL(DYNAMIC_NOVELL, test "x$dynamic_novell" = "xyes")
 AM_CONDITIONAL(DYNAMIC_OSCAR, test "x$dynamic_oscar" = "xyes")
-AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes")
+AM_CONDITIONAL(DYNAMIC_SAMETIME, test "x$dynamic_sametime" = "xyes" -a "x$have_gmp" = "xyes")
 AM_CONDITIONAL(DYNAMIC_SILC, test "x$dynamic_silc" = "xyes" -a "x$silcincludes" = "xyes" -a "x$silcclient" = "xyes")
 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes")
 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes")
--- a/src/protocols/sametime/meanwhile/Makefile.am	Wed Nov 02 04:20:46 2005 +0000
+++ b/src/protocols/sametime/meanwhile/Makefile.am	Wed Nov 02 04:32:28 2005 +0000
@@ -38,11 +38,14 @@
 	st_list.c
 
 AM_CFLAGS = \
-	$(GLIB_CFLAGS) \
+	$(GLIB_CFLAGS) $(GMP_CFLAGS) \
 	$(DEBUG_CFLAGS) \
 	-I$(top_srcdir)/src 
 
 libmeanwhile_la_SOURCES = $(MEANWHILESOURCES)
+
+libmeanwhile_la_LIBADD = $(GLIB_LIBS) $(GMP_LIBS)
+
 st =
 noinst_LTLIBRARIES = libmeanwhile.la
 
--- a/src/protocols/sametime/sametime.c	Wed Nov 02 04:20:46 2005 +0000
+++ b/src/protocols/sametime/sametime.c	Wed Nov 02 04:32:28 2005 +0000
@@ -5625,6 +5625,6 @@
 }
 
 
-GAIM_INIT_PLUGIN(meanwhile, mw_plugin_init, mw_plugin_info);
+GAIM_INIT_PLUGIN(sametime, mw_plugin_init, mw_plugin_info);
 /* The End. */