changeset 598:c763eeec336f

[gaim-migrate @ 608] more rips from X-Chat. lots of cool stuff. --enable-panel instead of --enable-gnome. --disable-gnome if you don't want gnome bits. and messages after ./configure to say what's going on. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 03 Aug 2000 22:50:13 +0000
parents 3a24fd19ff5f
children ddce1742f173
files acconfig.h configure.in
diffstat 2 files changed, 67 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/acconfig.h	Thu Aug 03 19:27:42 2000 +0000
+++ b/acconfig.h	Thu Aug 03 22:50:13 2000 +0000
@@ -5,6 +5,7 @@
 #undef HAVE_STPCPY
 #undef HAVE_LIBSM
 #undef USE_APPLET
+#undef USE_GNOME
 #undef DEBUG
 #undef GAIM_PLUGINS
 #undef USE_PERL
--- a/configure.in	Thu Aug 03 19:27:42 2000 +0000
+++ b/configure.in	Thu Aug 03 22:50:13 2000 +0000
@@ -34,35 +34,63 @@
 
 AC_ARG_ENABLE(distrib,,,enable_distrib=no)
 AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
-AC_ARG_ENABLE(debug,   [  --enable-debug          compile with debugging support],,enable_debug=no)
-AC_ARG_ENABLE(gnome,   [  --enable-gnome          compile as a GNOME applet],,enable_gnome=$enable_distrib)
-AM_CONDITIONAL(GNOMEAPPLET, test "x$enable_gnome" = "xyes")
+AC_ARG_ENABLE(gnome,   [  --disable-gnome         compile without Gnome bits],enable_gnome=no,enable_gnome=yes)
+AC_ARG_ENABLE(panel,   [  --enable-panel          compile as a GNOME applet],,enable_panel=$enable_distrib)
+AM_CONDITIONAL(GNOMEAPPLET, test "x$enable_panel" = "xyes")
 AC_ARG_ENABLE(esd,     [  --disable-esd           Turn off ESD (default=auto)],enable_esd=no,enable_esd=yes)
 AC_ARG_ENABLE(nas,     [  --enable-nas            Enable NAS (Network Audio System) support],,enable_nas=no)
 AC_ARG_ENABLE(plugins, [  --disable-plugins       compile with out plugin support],enable_plugins=no,enable_plugins=yes)
 AC_ARG_ENABLE(perl,    [  --disable-perl          compile without perl scripting],enable_perl=no,enable_perl=yes)
+AC_ARG_ENABLE(debug,   [  --enable-debug          compile with debugging support],,enable_debug=no)
 AM_CONDITIONAL(PLUGINS, test x$enable_plugins = xyes)
 AC_ARG_ENABLE(,,,)
 
 if test "$enable_debug" = yes ; then
-dnl	someone please tell me what -d does
-dnl	CFLAGS="$CFLAGS -Wall -d -g"
 	CFLAGS="$CFLAGS -Wall -g"
 	AC_DEFINE(DEBUG)
 fi
 
-AM_PATH_GLIB(1.2.0)
-AM_PATH_GTK(1.2.0,,,gthread)
-LIBS="$LIBS $GTK_LIBS"
 CFLAGS="$CFLAGS -I../libfaim -I../libfaim/faim"
 LDADD="$LDADD -L../libfaim -lfaim -pthread"
 
 if test "x$enable_gnome" = "xyes" ; then
-	GNOME_INIT(applets)
-	GNOME_X_CHECKS
-        CFLAGS="$CFLAGS $GNOME_INCLUDEDIR"
-	AC_DEFINE(USE_APPLET)
-	LIBS="$LIBS $GNOME_LIBDIR $GNOME_APPLETS_LIBS"
+	if test "x$enable_panel" = "xyes" ; then
+		GNOME_INIT(gnomeui applets)
+		GNOME_X_CHECKS
+		CFLAGS="$CFLAGS $GNOME_INCLUDEDIR"
+		AC_DEFINE(USE_APPLET)
+		AC_DEFINE(USE_GNOME)
+		LIBS="$LIBS $GTK_LIBS $GNOME_LIBDIR $GNOME_APPLETS_LIBS $GNOMEUI_LIBS"
+		AC_PATH_PROG(gaimpath, gaim_applet)
+	else
+		AC_PATH_PROG(gnomepath, gnome-config)
+		AC_MSG_CHECKING(for Gnome compile flags)
+		GNOME_CFLAGS=`$gnomepath gnomeui --cflags 2>/dev/null`
+		if test "x$GNOME_CFLAGS" = "x" ; then
+			enable_gnome=no
+			AC_MSG_RESULT([Gnome not found, building without it.])
+		else
+			GNOME_VER=`$gnomepath --version |$sedpath 's/gnome-libs //' 2>/dev/null`
+			GNOME_MAJOR=`echo $GNOME_VER |$sedpath 's/\([[0-9]*]*\).\([[0-9]*]*\).\([[0-9]*]*\)/\1/' 2>/dev/null`
+			if test "x$GNOME_MAJOR" = "x0" ; then
+				enable_gnome = no
+				AC_MSG_RESULT([old Gnome found, building without it.])
+			else
+				AC_MSG_RESULT(ok)
+				CFLAGS="$CFLAGS $GNOME_CFLAGS"
+				LIBS="$LIBS `$gnomepath gnomeui --libs 2>/dev/null`"
+				AC_DEFINE(USE_GNOME)
+				AC_PATH_PROG(gaimpath, gaim)
+			fi
+		fi
+	fi
+fi
+
+if test "x$enable_gnome" != "xyes" ; then
+	AM_PATH_GLIB(1.2.0)
+	AM_PATH_GTK(1.2.0,,,gthread)
+	LIBS="$LIBS $GTK_LIBS"
+	AC_PATH_PROG(gaimpath, gaim)
 fi
 
 CFLAGS="$CFLAGS $GTK_CFLAGS"
@@ -111,6 +139,8 @@
         	CFLAGS="$CFLAGS $ESD_CFLAGS"
 		AC_DEFINE(ESD_SOUND)
                 LDADD="$LDADD $ESD_LIBS"
+	else
+		enable_esd = no
         fi
 fi
 
@@ -137,3 +167,26 @@
            m4/Makefile
 	   gaim.spec
           ])
+
+echo
+echo $PACKAGE $VERSION
+
+echo
+echo Build with GNOME bits...... : $enable_gnome
+echo Build as GNOME applet...... : $enable_panel
+echo
+echo Build with Plugin support.. : $enable_plugins
+echo Build with Perl support.... : $enable_perl
+echo
+echo Build with ESD............. : $enable_esd
+echo Build with NAS............. : $enable_nas
+echo
+echo Print debugging messages... : $enable_debug
+echo
+echo Gaim will be installed in $prefix/bin.
+if test "x$gaimpath" != "x" ; then
+	echo Warning: You have an old copy of gaim at $gaimpath.
+fi
+echo
+echo configure complete, now type \'make\'
+echo