[MERGED] osmo-pcu[master]: lc15: further fixes regarding --with-litecell15

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Jun 11 09:44:36 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: lc15: further fixes regarding --with-litecell15
......................................................................


lc15: further fixes regarding --with-litecell15

The fix in 0fb294a8dd45a86b8f9eb93211b69b6dbf0a6853 was only partially
valid, as it unconditionally used $includedir, without any prefix.  This
polluted the include path with host include files in cross-compiling
builds.

Let's take a different approach and simply define LITECELL15_CFLAGS
(similar to what pkgconfig does), which makes the "-I" go away if no
--with-litecell15 has been specified.

Change-Id: I63393decfe42a24dab56c7654f716c1580416ab2
---
M configure.ac
M src/Makefile.am
2 files changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/configure.ac b/configure.ac
index 7b7f9c4..3b13469 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,15 +51,15 @@
                                 [enable code for Litecell 1.5 PHY [default=no]]),
                 [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"])
 AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])],
-			 [litecell15_incdir="$withval"],[litecell15_incdir="$includedir"])
-AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir)
+			 [litecell15_cflags="-I$withval"],[litecell15_cflags=""])
+AC_SUBST([LITECELL15_CFLAGS], $litecell15_cflags)
 AC_MSG_RESULT([$enable_lc15bts_phy])
 AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes")
 if test "$enable_litecell15" = "yes"; then
 	oldCPPFLAGS=$CPPFLAGS
-	CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS"
+	CPPFLAGS="$CPPFLAGS $LITECELL15_CFLAGS -I$srcdir/include $LIBOSMOCORE_CFLAGS"
 	AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[],
-			[AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])],
+			[AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found using $litecell15_cflags])],
 			[#include <nrw/litecell15/litecell15.h>])
 	CPPFLAGS=$oldCPPFLAGS
 fi
diff --git a/src/Makefile.am b/src/Makefile.am
index 97de06d..1543851 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -137,7 +137,7 @@
 endif
 
 if ENABLE_LC15BTS_PHY
-AM_CPPFLAGS += -I$(LITECELL15_INCDIR) -I$(srcdir)/osmo-bts-litecell15
+AM_CPPFLAGS += $(LITECELL15_CFLAGS) -I$(srcdir)/osmo-bts-litecell15
 
 EXTRA_DIST = \
 	osmo-bts-litecell15/lc15_l1_if.c \

-- 
To view, visit https://gerrit.osmocom.org/2874
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I63393decfe42a24dab56c7654f716c1580416ab2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list