From 8ea93a8a7d53c8ba521f9cb42106b868037c61df Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 25 Nov 2016 13:25:27 +0100 Subject: octphy: multi-trx support: fix AC_CHECK order The header file octphy/octvc1/gsm/octvc1_gsm_default.h is not visible to the configure script when the octphy header files are referenced via --with-octsdr-2g instead having them installed in /usr/local/include. This results in a failed AC_CHECK_MEMBER check for tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn, even if header files with multi-trx support are used. The configure.ac script manipulates the CPPFLAGS in order to make the octphy include files visible to AC_CHECK_ and restores the original CPPFLAGS when done. This is required when --with-octsdr-2g is used. AC_CHECK_MEMBER is executed before the CPPFLAGS are manipulated. This causes no issues if the headers are properly installed to /usr/local/include, but does not work when --with-octsdr-2g is used. This commit moves the AC_CHECK_MEMBER command into the section where the manipulated CPPFLAGS are valid in order to fix the problem described above See also commit: f5494e84e898f947190466d30d5f932bac0fadf9 Change-Id: I7bdfa4449cd6061c395cce315b372c2833520e37 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1e8a4ec0..3fd6b8a1 100644 --- a/configure.ac +++ b/configure.ac @@ -70,12 +70,12 @@ AC_SUBST([OCTSDR2G_INCDIR], $octsdr2g_incdir) AC_MSG_RESULT([$enable_octphy]) AM_CONDITIONAL(ENABLE_OCTPHY, test "x$enable_octphy" = "xyes") if test "$enable_octphy" = "yes" ; then - AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], AC_DEFINE([OCTPHY_MULTI_TRX], [1], [Define to 1 if your octphy header files support multi-trx]), [], [[#include ]]) oldCPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$OCTSDR2G_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" AC_CHECK_HEADER([octphy/octvc1/gsm/octvc1_gsm_default.h],[], [AC_MSG_ERROR([octphy/octvc1/gsm/octvc1_gsm_default.h can not be found in $octsdr2g_incdir])], [#include ]) + AC_CHECK_MEMBER([tOCTVC1_GSM_TRX_CONFIG.usCentreArfcn], AC_DEFINE([OCTPHY_MULTI_TRX], [1], [Define to 1 if your octphy header files support multi-trx]), [], [#include ]) CPPFLAGS=$oldCPPFLAGS fi -- cgit v1.2.3