fixeria has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-trx/+/30792 )
Change subject: configure.ac: allow building without cloning submodules ......................................................................
configure.ac: allow building without cloning submodules
The MS TRX was intentionally added [1] as an optional feature, which requires a git submodule to be present in order to build libtrxcon. This feature can be enabled by passing --with-mstrx to the configure.
But autoconf/automake is a mess. Despite in the root Makefile.am we are adding full submodule path to the SUBDIRS *conditionally*, the configure script would still fail if the submodule is not fetched:
Makefile.am:32: error: required directory ./osmocom-bb/src/host/trxcon does not exist
It would not even enter that directory if it's present, but somehow it's still required to exist. For the end user this means that cloning the submodule becomes a *necessary* step in order to build osmo-trx from source, even when the MS TRX is not really needed.
The fact that we're unconditionally requiring the submodule, which is meant to be used by an optional feature feels wrong to me. It's also unusual for osmocom projects to require submodules, so it may (and already did) cause build failures when cloning as usual.
Let's work this problem around by defining LIBTRXCON_DIR variable in configure.ac and using it in the root Makefile.am. If the MS TRX is not enabled explicitly, make autoconf/automake happy by assigning LIBTRXCON_DIR the submodule's root directory, which is always present but empty if the submodule is not fetched.
Change-Id: I02ae2b37c82ae2f55e7d9bd92e226f2b8b023968 Related: [1] b7253c6fdc88a3e2e0c8b441dc3c34dfb1c15d24 Related: OS#5599, OS#5846 --- M Makefile.am M configure.ac 2 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/92/30792/2