libaspectbin_la_LDFLAGS = $(GTK_LIBS)
include_HEADERS = aspectbin.h
+if BUILD_LIBGLADE
+libaspectbin_la_SOURCES += aspectbin-libglade.c
+libaspectbin_la_CFLAGS += $(LIBGLADE_CFLAGS)
+libaspectbin_la_LDFLAGS += $(LIBGLADE_LIBS)
+endif
+
if BUILD_GLADEUI
libaspectbin_la_SOURCES += aspectbin-gladeui.c
libaspectbin_la_CFLAGS += $(GLADEUI_CFLAGS)
--- /dev/null
+/* AspectBin - A GTK+ container for packing with consrained aspect ratio.
+ * Copyright (C) 2009 Nick Bowler
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <glade/glade.h>
+#include <glade/glade-build.h>
+#include "aspectbin.h"
+
+void glade_module_register_widgets(void)
+{
+ glade_register_widget(ASPECT_BIN_TYPE, glade_standard_build_widget,
+ glade_standard_build_children,
+ NULL);
+ glade_provide("aspectbin");
+}
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
+AC_ARG_WITH([libglade],
+ [AS_HELP_STRING([--with-libglade],
+ [build support for libglade [default=yes]]
+ )],
+ [],
+ [with_libglade=yes])
+
AC_ARG_WITH([gladeui],
[AS_HELP_STRING([--with-gladeui],
[build support for Glade UI [default=yes]]
[],
[with_gladeui=yes])
+have_libglade=no
+if test x"$with_libglade" != x"no"; then
+PKG_CHECK_MODULES(LIBGLADE, [libglade-2.0 >= 2.6],
+ [have_libglade=yes], [have_libglade=no])
+AC_SUBST(LIBGLADE_LIBS)
+AC_SUBST(LIBGLADE_CFLAGS)
+fi
+
have_gladeui=no
if test x"$with_gladeui" != x"no"; then
PKG_CHECK_MODULES(GLADEUI, [gladeui-1.0 >= 3],
AC_MSG_WARN([Glade UI support will be built, but not installed.])
fi
+AM_CONDITIONAL([BUILD_LIBGLADE], [test x"$have_libglade" = x"yes"])
AM_CONDITIONAL([BUILD_GLADEUI], [test x"$have_gladeui" = x"yes"])
AM_CONDITIONAL([INST_GLADEUI], [test x"$have_gladeui_dirs" = x"yes"])