aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-13 13:16:09 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-10-13 13:16:09 +0100
commit4a1b4aef7c9aee2b936a27f9b1d86a9ae7b36b06 (patch)
tree8813633989e3e7f23ae5bc93f1b183569debcbfb
parent178d7a834cb3bc89a9fa51600125e4160ad39f28 (diff)
downloadpaludis-4a1b4aef7c9aee2b936a27f9b1d86a9ae7b36b06.tar.gz
paludis-4a1b4aef7c9aee2b936a27f9b1d86a9ae7b36b06.tar.xz
And make the linking work
-rw-r--r--configure.ac15
-rw-r--r--paludis/Makefile.am.m448
2 files changed, 43 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 599b5e1..3224c8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1320,19 +1320,16 @@ for r in e fake ; do
fi
done
-enable_virtuals_repository=
-if echo $repositories | tr ' ' '\n' | grep '^virtuals$' >/dev/null ; then
- AC_DEFINE_UNQUOTED([ENABLE_VIRTUALS_REPOSITORY], [1], [Enable virtuals repository])
- enable_virtuals_repository=yes
-fi
-AM_CONDITIONAL([ENABLE_VIRTUALS_REPOSITORY], test "x$enable_virtuals_repository" = "xyes")
-
AC_DEFUN([REPOSITORY_GROUP_IF], [
+enable_$1_repository=
if echo $repositories | tr ' ' '\n' | grep '^$1$' >/dev/null ; then
+ enable_$1_repository=yes
AC_DEFINE_UNQUOTED([REPOSITORY_GROUP_IF_$1], [$1], [The $1 repository])
+ AC_DEFINE_UNQUOTED(ENABLE_[]m4_translit($1, [a-z], [A-Z])_REPOSITORY, [1], [Enable $1 repository])
else
AC_DEFINE_UNQUOTED([REPOSITORY_GROUP_IF_$1], [], [Do not have the $1 repository])
fi
+AM_CONDITIONAL(ENABLE_[]m4_translit($1, [a-z], [A-Z])_REPOSITORY, test "x$enable_$1_repository" = "xyes")
])
m4_foreach(reponame, [ALL_REPOSITORIES_m4], [
@@ -1377,11 +1374,15 @@ AC_SUBST([ALL_ENVIRONMENTS])
AC_SUBST([BUILD_ENVIRONMENTS])
AC_DEFUN([ENVIRONMENT_GROUP_IF], [
+enable_$1_environment=
if echo $environments | tr ' ' '\n' | grep '^$1$' >/dev/null ; then
+ enable_$1_environment=yes
AC_DEFINE_UNQUOTED([ENVIRONMENT_GROUP_IF_$1], [$1], [The $1 environment])
+ AC_DEFINE_UNQUOTED(ENABLE_[]m4_translit($1, [a-z], [A-Z])_ENVIRONMENT, [1], [Enable $1 environment])
else
AC_DEFINE_UNQUOTED([ENVIRONMENT_GROUP_IF_$1], [], [Do not have the $1 environment])
fi
+AM_CONDITIONAL(ENABLE_[]m4_translit($1, [a-z], [A-Z])_ENVIRONMENT, test "x$enable_$1_environment" = "xyes")
])
m4_foreach(envname, [ALL_ENVIRONMENTS_m4], [
diff --git a/paludis/Makefile.am.m4 b/paludis/Makefile.am.m4
index d174108..26415a0 100644
--- a/paludis/Makefile.am.m4
+++ b/paludis/Makefile.am.m4
@@ -103,21 +103,43 @@ libpaludissohooks_TEST_@PALUDIS_PC_SLOT@_la_LDFLAGS = -rpath /nowhere -version-i
libpaludissohooks_TEST_@PALUDIS_PC_SLOT@_la_LIBADD = libpaludis_@PALUDIS_PC_SLOT@.la
+repositories_libadd =
+
+define(`condrepo', `
+if ENABLE_`'translit($1,`a-z',`A-Z')_REPOSITORY
+repositories_libadd += $(top_builddir)/paludis/repositories/$1/libpaludis$1repository.la
+endif
+')
+
+condrepo(accounts)
+condrepo(cran)
+condrepo(dummy)
+condrepo(e)
+condrepo(fake)
+condrepo(gems)
+condrepo(unavailable)
+condrepo(unpackaged)
+condrepo(unwritten)
+condrepo(virtuals)
+
+environments_libadd =
+
+define(`condenv', `
+if ENABLE_`'translit($1,`a-z',`A-Z')_ENVIRONMENT
+environments_libadd += $(top_builddir)/paludis/environments/$1/libpaludis`'translit($1,_,)environment.la
+endif
+')
+
+condenv(dummy)
+condenv(no_config)
+condenv(paludis)
+condenv(portage)
+condenv(test)
+
libpaludis_@PALUDIS_PC_SLOT@_la_LIBADD = \
$(top_builddir)/paludis/selinux/libpaludisselinux_@PALUDIS_PC_SLOT@.la \
- $(top_builddir)/paludis/repositories/accounts/libpaludisaccountsrepository.la \
- $(top_builddir)/paludis/repositories/cran/libpaludiscranrepository.la \
- $(top_builddir)/paludis/repositories/e/libpaludiserepository.la \
- $(top_builddir)/paludis/repositories/fake/libpaludisfakerepository.la \
- $(top_builddir)/paludis/repositories/gems/libpaludisgemsrepository.la \
- $(top_builddir)/paludis/repositories/unavailable/libpaludisunavailablerepository.la \
- $(top_builddir)/paludis/repositories/unpackaged/libpaludisunpackagedrepository.la \
- $(top_builddir)/paludis/repositories/unwritten/libpaludisunwrittenrepository.la \
- $(top_builddir)/paludis/repositories/virtuals/libpaludisvirtualsrepository.la \
- $(top_builddir)/paludis/environments/no_config/libpaludisnoconfigenvironment.la \
- $(top_builddir)/paludis/environments/paludis/libpaludispaludisenvironment.la \
- $(top_builddir)/paludis/environments/portage/libpaludisportageenvironment.la \
- $(top_builddir)/paludis/environments/test/libpaludistestenvironment.la \
+ $(repositories_libadd) \
+ $(environments_libadd) \
$(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la \
@DYNAMIC_LD_LIBS@ \
$(PTHREAD_LIBS)