diff configure.ac @ 8378:2b68c423357e

[gaim-migrate @ 9105] " For people and systems which have libzephyr installed (e.g Debian), this will allow the zephyr plugin to optionally be linked against it, instead of building and linking in the libzephyr that comes with gaim. Why? 1) A gaim binary package can be compiled against a locally installed libzephyr.a, and use either unkerberized or kerberized zephyr depending on which version of the zephyr shared libraries is installed. 2) It reduces the build speed and size of the zephyr plugin (on Debian x86, from 6.5 MB to ~ 300 kb) Also, I added a zephyr icon (a blue Z), that's similar to the icons used by Windows and MacOS zephyr clients at MIT." --Arun A Tharuvai someone will have to tell me how to fix the win32 makefiles, and i'm not sure he patched enough to get his icon to be actually used. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 01 Mar 2004 18:08:42 +0000
parents 35db601609e3
children 2729ef2df189
line wrap: on
line diff
--- a/configure.ac	Mon Mar 01 18:01:11 2004 +0000
+++ b/configure.ac	Mon Mar 01 18:08:42 2004 +0000
@@ -185,6 +185,9 @@
 AC_ARG_ENABLE(sm,      [  --disable-sm            compile without X session management support],,enable_sm=yes)
 AC_ARG_WITH(krb4,      [  --with-krb4=PREFIX      Compile Zephyr plugin with Kerberos 4 support],kerberos="$withval",kerberos="no")
 
+AC_ARG_WITH(zephyr,    [  --with-zephyr=PREFIX    Compile Zephyr plugin against external libzephyr],zephyr="$withval",zephyr="no")
+AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
+
 if test "$enable_debug" = yes ; then
 	DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
 	AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
@@ -1000,6 +1003,35 @@
 	LDFLAGS="$orig_LDFLAGS"
 fi
 
+dnl checks for an external libzephyr
+AC_SUBST(ZEPHYR_CFLAGS)
+AC_SUBST(ZEPHYR_LDFLAGS)
+AC_SUBST(ZEPHYR_LIBS)
+if test "$zephyr" != "no" ; then
+	if test "$zephyr" != "yes" ; then 
+		ZEPHYR_CFLAGS="-I${zephyr}/include" 
+		ZEPHYR_LDFLAGS="-L${zephyr}/lib"
+	elif test -d /usr/athena/include/zephyr ; then
+		ZEPHYR_CFLAGS="-I/usr/athena/include"
+	elif test -d /usr/include/zephyr ; then
+ 		ZEPHYR_CFLAGS="-I/usr/include"
+ 	elif test -d /usr/local/include/zephyr ; then
+ 		ZEPHYR_CFLAGS="-I/usr/local/include"
+	fi
+	AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.]) 
+	AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
+	orig_LDFLAGS="$LDFLAGS"
+	LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
+	AC_CHECK_LIB(zephyr, ZInitialize,
+			  [ZEPHYR_LIBS="-lzephyr"],
+			  [AC_ERROR(Zephyr libraries not found)],
+			  -lzephyr)
+	orig_LIBS="$LIBS"
+	LIBS="$orig_LIBS"
+	LDFLAGS="$orig_LDFLAGS"
+fi
+
+
 AC_MSG_CHECKING(for me pot o' gold)
 AC_MSG_RESULT(no)
 AC_CHECK_FUNCS(gethostid lrand48)
@@ -1067,6 +1099,9 @@
 echo Build with NAS support........ : $enable_nas
 echo Build with GtkSpell support... : $enable_gtkspell
 echo
+echo Use kerberos 4 with zephyr.... : $kerberos
+echo Use external libzephyr........ : $zephyr
+echo
 echo Use XScreenSaver Extension.... : $enable_xss
 echo Use X Session Management...... : $enable_sm
 echo Use startup notification.......: $enable_startup_notification