diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-10-08 11:18:28 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-10-08 11:49:33 +0100 |
commit | 8b5cf4ba620eccfdc63146f7fb7cb9524ccf4620 (patch) | |
tree | a129758bce027683e2d231d7f4faa4bf74bb953c | |
parent | 64a0d8635871b9f85e335d05c65765774c99c497 (diff) | |
download | telepathy-salut-8b5cf4ba620eccfdc63146f7fb7cb9524ccf4620.tar.gz |
Glue Wocky into the build system
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | lib/Makefile.am | 2 | ||||
-rw-r--r-- | lib/ext/Makefile.am | 16 | ||||
-rw-r--r-- | lib/gibber/Makefile.am | 4 | ||||
-rw-r--r-- | m4/ax_config_dir.m4 | 109 | ||||
-rw-r--r-- | src/Makefile.am | 34 |
6 files changed, 159 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index 33c1dae9..a36a057f 100644 --- a/configure.ac +++ b/configure.ac @@ -210,11 +210,19 @@ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [ HAVE_CHECK=no ] ) AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes") +AX_CONFIG_DIR([lib/ext/wocky]) +PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+"$PKG_CONFIG_PATH:"}${ac_abs_top_builddir}/lib/ext/wocky/wocky" +export PKG_CONFIG_PATH +PKG_CHECK_MODULES([WOCKY], [wocky >= 0.0.0]) +AC_SUBST([WOCKY_CFLAGS]) +AC_SUBST([WOCKY_LIBS]) + AC_SUBST(PACKAGE_STRING) AC_OUTPUT( Makefile \ docs/Makefile \ lib/Makefile \ + lib/ext/Makefile \ lib/gibber/Makefile \ lib/gibber/tests/Makefile \ lib/gibber/tests/inputs/Makefile \ diff --git a/lib/Makefile.am b/lib/Makefile.am index aad4b384..9755d06b 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1 +1 @@ -SUBDIRS=gibber +SUBDIRS=ext gibber diff --git a/lib/ext/Makefile.am b/lib/ext/Makefile.am new file mode 100644 index 00000000..48e4e2d5 --- /dev/null +++ b/lib/ext/Makefile.am @@ -0,0 +1,16 @@ +SUBDIRS = +DIST_SUBDIRS = wocky + +all-local: + @cd wocky && $(MAKE) + +clean-local: + if test -e wocky/Makefile ; then \ + cd wocky && $(MAKE) clean ; \ + fi + +uninstall-local: + @cd wocky/wocky && $(MAKE) uninstall + +install-data-local: + @cd wocky/wocky && $(MAKE) install diff --git a/lib/gibber/Makefile.am b/lib/gibber/Makefile.am index ee2ad282..c2cd533b 100644 --- a/lib/gibber/Makefile.am +++ b/lib/gibber/Makefile.am @@ -108,9 +108,9 @@ gibber-signals-marshal.list: $(HANDWRITTEN_SOURCES) Makefile.am } > $@ -AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @GLIB_CFLAGS@ @LIBXML2_CFLAGS@ @LIBSOUP_CFLAGS@ +AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @GLIB_CFLAGS@ @LIBXML2_CFLAGS@ @WOCKY_CFLAGS@ @LIBSOUP_CFLAGS@ -AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@ @LIBXML2_LIBS@ @LIBSOUP_LIBS@ +AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@ @LIBXML2_LIBS@ @WOCKY_LIBS@ @LIBSOUP_LIBS@ # rules for making the glib enum objects %-enumtypes.h: %.h Makefile.in diff --git a/m4/ax_config_dir.m4 b/m4/ax_config_dir.m4 new file mode 100644 index 00000000..0ba313fa --- /dev/null +++ b/m4/ax_config_dir.m4 @@ -0,0 +1,109 @@ +dnl Copied from Audacity 1.3.10 which itself is licensed under the GPL v2 or +dnl any later version + +dnl Function to configure a sub-library now, because we need to know the result +dnl of the configuration now in order to take decisions. +dnl We don't worry about whether the configuration worked or not - it is +dnl assumed that the next thing after this will be a package-specific check to +dnl see if the package is actually available. (Hint: use pkg-config and +dnl -uninstalled.pc files if available). +dnl code based on a simplification of _AC_OUTPUT_SUBDIRS in +dnl /usr/share/autoconf/autoconf/status.m4 which implements part of +dnl AC_CONFIG_SUBDIRS + +AC_DEFUN([AX_CONFIG_DIR], +[AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])] +[m4_append([_AC_LIST_SUBDIRS], [$1], [])] +[ + # Remove --cache-file and --srcdir arguments so they do not pile up. + ax_sub_configure_args= + ax_prev= + eval "set x $ac_configure_args" + shift + for ax_arg + do + if test -n "$ax_prev"; then + ax_prev= + continue + fi + case $ax_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ax_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ax_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ax_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) + case $ax_arg in + *\'*) ax_arg=`echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ax_sub_configure_args="$ax_sub_configure_args '$ax_arg'" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ax_arg="--prefix=$prefix" + case $ax_arg in + *\'*) ax_arg=`echo "$ax_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + ax_sub_configure_args="'$ax_arg' $ax_sub_configure_args" + + # Pass --silent + if test "$silent" = yes; then + ax_sub_configure_args="--silent $ax_sub_configure_args" + fi + + ax_popdir=`pwd` + AC_MSG_NOTICE([Configuring sources in $1]) + dnl for out-of-place builds srcdir and builddir will be different, and + dnl builddir may not exist, so we must create it + AS_MKDIR_P(["$1"]) + dnl and also set the variables. As this isn't autoconf, the following may be + dnl risky: + _AC_SRCDIRS(["$1"]) + cd "$1" + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f "configure.gnu"; then + ax_sub_configure=$ac_srcdir/configure.gnu + elif test -f "$ac_srcdir/configure"; then + ax_sub_configure=$ac_srcdir/configure + elif test -f "$ac_srcdir/configure.in"; then + # This should be Cygnus configure. + ax_sub_configure=$ac_aux_dir/configure + else + AC_MSG_WARN([no configuration information is in $1]) + ax_sub_configure= + fi + + # The recursion is here. + if test -n "$ax_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [[\\/]]* | ?:[[\\/]]* ) ax_sub_cache_file=$cache_file ;; + *) # Relative name. + ax_sub_cache_file=$ac_top_build_prefix$cache_file ;; + esac + + AC_MSG_NOTICE([running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ax_sub_cache_file --srcdir=$ac_srcdir]) + # The eval makes quoting arguments work. + eval "\$SHELL \"\$ax_sub_configure\" $ax_sub_configure_args \ + --cache-file=\"\$ax_sub_cache_file\" --srcdir=\"\$ax_srcdir\"" + fi + + cd "$ax_popdir" + AC_MSG_NOTICE([Done configuring in $1]) +]) + diff --git a/src/Makefile.am b/src/Makefile.am index 9e193070..59820346 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -155,17 +155,29 @@ noinst_LTLIBRARIES = libsalut-convenience.la \ libsalut-backend-avahi.la \ libsalut-backend-dummy.la -AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @DBUS_CFLAGS@ \ - @GLIB_CFLAGS@ @LIBXML2_CFLAGS@ \ - @TELEPATHY_GLIB_CFLAGS@ \ - @AVAHI_CFLAGS@ \ - -I $(top_srcdir) -I $(top_builddir) \ - -I $(top_srcdir)/lib -I $(top_builddir)/lib \ - -DG_LOG_DOMAIN=\"salut\" - -AM_LDFLAGS = $(GCOV_LIBS) @DBUS_LIBS@ \ - @TELEPATHY_GLIB_LIBS@ \ - @GLIB_LIBS@ @LIBXML2_LIBS@ @AVAHI_LIBS@ +AM_CFLAGS = \ + -I $(top_srcdir) -I $(top_builddir) \ + -I $(top_srcdir)/lib -I $(top_builddir)/lib \ + -DG_LOG_DOMAIN=\"salut\" \ + $(ERROR_CFLAGS) \ + $(GCOV_CFLAGS) \ + @LIBXML2_CFLAGS@ \ + @GLIB_CFLAGS@ \ + @WOCKY_CFLAGS@ \ + @DBUS_CFLAGS@ \ + @AVAHI_CFLAGS@ \ + @TELEPATHY_GLIB_CFLAGS@ \ + $(NULL) + +AM_LDFLAGS = \ + $(GCOV_LIBS) \ + @LIBXML2_LIBS@ \ + @GLIB_LIBS@ \ + @WOCKY_LIBS@ \ + @DBUS_LIBS@ \ + @AVAHI_LIBS@ \ + @TELEPATHY_GLIB_LIBS@ \ + $(NULL) # Teach it how to make libgibber.la $(top_builddir)/lib/gibber/libgibber.la: |