aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-01-27 16:14:37 -0600
committerTed Gould <ted@gould.cx>2012-01-27 16:14:37 -0600
commitdea1a71b60e0a099d7f8596c1b01d2399c0b9127 (patch)
tree8a627883e5535ea53054371d0e79b8a810825212
parentbc49dd8e9acfd1069e99999fd573609a404de869 (diff)
parentd006f9d8b40a0a6dd2da09cf41d939787d0505ea (diff)
downloadlibayatana-appindicator-dea1a71b60e0a099d7f8596c1b01d2399c0b9127.tar.gz
libayatana-appindicator-dea1a71b60e0a099d7f8596c1b01d2399c0b9127.tar.bz2
libayatana-appindicator-dea1a71b60e0a099d7f8596c1b01d2399c0b9127.zip
Update to trunk
-rw-r--r--Makefile.am5
-rw-r--r--bindings/mono/Makefile.am26
-rw-r--r--bindings/python/Makefile.am2
-rw-r--r--configure.ac30
-rw-r--r--src/appindicator3-0.1.pc.in2
5 files changed, 57 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 5920abe..e19101d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,9 +4,12 @@ SUBDIRS = \
src \
bindings \
example \
- tests \
docs
+if WANT_TESTS
+SUBDIRS += tests
+endif
+
EXTRA_DIST = \
m4/introspection.m4 \
gtk-doc.make \
diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am
index 9a899e1..5bb13ab 100644
--- a/bindings/mono/Makefile.am
+++ b/bindings/mono/Makefile.am
@@ -3,7 +3,9 @@ SUBDIRS = . examples
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = appindicator-sharp-0.1.pc
+if BUILD_MONO_TEST
TEST = AppIndicator.Test.dll
+endif
API = libappindicator-api.xml
MIDDLE_API = libappindicator-api.middle
@@ -40,16 +42,24 @@ CLEANFILES = \
$(API) \
$(MIDDLE_API) \
$(RAW_API) \
- $(TEST) \
$(DLLPOLICY) \
$(DLLPOLICY1) \
$(WRAPPER_FREE_BINDING) \
$(POLICY).config \
$(POLICY1).config
+if BUILD_MONO_TEST
+CLEANFILES += $(TEST)
+endif
+
DISTCLEANFILES = $(ASSEMBLY).config
+
+if BUILD_MONO_TEST
TEST_SOURCES = TestIndicator.cs
+endif
+
customs = ApplicationIndicator.custom
+
EXTRA_DIST = \
AssemblyInfo.cs \
$(RAW_API) \
@@ -60,13 +70,19 @@ EXTRA_DIST = \
$(ASSEMBLY_NAME).snk \
$(POLICY).config.in \
$(POLICY1).config.in \
- $(customs) \
- $(TEST_SOURCES)
+ $(customs)
+
+if BUILD_MONO_TEST
+EXTRA_DIST += $(TEST_SOURCES)
+endif
GACUTIL_FLAGS=-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib
references = $(GTK_SHARP_LIBS)
-test_references = $(GTK_SHARP_LIBS) $(NUNIT_LIBS) -r:$(ASSEMBLY)
+
+if BUILD_MONO_TEST
+test_references = $(GTK_SHARP_LIBS) $(NUNIT_LIBS) $(MONO_NUNIT_LIBS) -r:$(ASSEMBLY)
+endif
$(RAW_API): app-indicator.sources.xml $(WRAPPER_FREE_BINDING)
$(GAPI_PARSER) $(srcdir)/app-indicator.sources.xml
@@ -130,10 +146,12 @@ uninstall-local:
echo "$(GACUTIL) -u $(DLLPOLICY) $(GACUTIL_FLAGS)"; \
$(GACUTIL) -u $(POLICY) $(GACUTIL_FLAGS) || exit 1;
+if BUILD_MONO_TEST
$(TEST): $(ASSEMBLY) $(TEST_SOURCES)
$(CSC) -out:$(TEST) -target:library $(test_references) $(srcdir)/$(TEST_SOURCES)
all: $(TEST)
+endif
$(POLICY).config: $(POLICY).config.in Makefile
sed -e "s|@ASSEMBLY_NAME@|$(ASSEMBLY_NAME)|" \
diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index 0b606db..7febc11 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -19,7 +19,7 @@ pkgappindicator_PYTHON = __init__.py
appindicatordir = $(pkgpyexecdir)/appindicator
appindicator_LTLIBRARIES = _appindicator.la
-_appindicator_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_appindicator -lpyglib-2.0-python2.6
+_appindicator_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_appindicator
_appindicator_la_LIBADD = $(APPINDICATOR_PYTHON_LIBS) -L$(top_builddir)/src/.libs -lappindicator
_appindicator_la_SOURCES = appindicatormodule.c
nodist__appindicator_la_SOURCES = appindicator.c
diff --git a/configure.ac b/configure.ac
index d271627..fe2d754 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,25 @@ AC_SUBST(GAPI_CODEGEN)
AC_PATH_PROG(GAPI_FIXUP, gapi2-fixup, no)
AC_SUBST(GAPI_FIXUP)
-PKG_CHECK_MODULES(NUNIT, nunit >= 2.4.7)
+# Check for nunit
+AC_ARG_ENABLE([mono-test],
+ AC_HELP_STRING([--disable-mono-test], [Disable mono test]),,
+ [enable_mono_test=auto])
+
+if test x"$enable_mono_test" != x"no" ; then
+ PKG_CHECK_MODULES(NUNIT, nunit >= 2.4.7,
+ [have_nunit=yes],
+ [PKG_CHECK_MODULES(MONO_NUNIT, mono-nunit,
+ [have_nunit=yes],
+ [have_nunit=no])
+ ])
+ if test x${enable_mono_test} = xyes && test x${have_nunit} = xno; then
+ AC_MSG_ERROR([Mono test configured but nunit not found])
+ fi
+else
+ have_nunit=no
+fi
+AM_CONDITIONAL(BUILD_MONO_TEST, test x${have_nunit} = xyes)
###########################
# Check to see if we're local
@@ -189,6 +207,14 @@ PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
AC_SUBST(PYGTK_CODEGEN)
AC_MSG_RESULT($PYGTK_CODEGEN)
+#########################
+# Check if build tests
+#########################
+AC_ARG_ENABLE([tests],
+ AC_HELP_STRING([--disable-tests], [Disable tests]),,
+ [enable_tests=yes])
+AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
+
###########################
# Files
###########################
@@ -226,4 +252,6 @@ Libappindicator Configuration:
Prefix: $prefix
GTK+ Version: $with_gtk
+ Tests: $enable_tests
+ Mono tests: $have_nunit
])
diff --git a/src/appindicator3-0.1.pc.in b/src/appindicator3-0.1.pc.in
index 0ffe409..f59ac70 100644
--- a/src/appindicator3-0.1.pc.in
+++ b/src/appindicator3-0.1.pc.in
@@ -4,7 +4,7 @@ libdir=@libdir@
bindir=@bindir@
includedir=@includedir@
-Cflags: -I${includedir}/libappindicator-0.1
+Cflags: -I${includedir}/libappindicator3-0.1
Requires: dbusmenu-glib-0.4 gtk+-3.0
Libs: -L${libdir} -lappindicator3