mirror of
				https://github.com/RangeNetworks/openbts.git
				synced 2025-11-04 05:43:14 +00:00 
			
		
		
		
	build: insert autofoo for usrp transceiver and options
Usage: ./configure --with-usrp1 Enable non-UHD USRP1 support through the gnuradio-based driver. Requires gnuradio (libusrp) to be installed. ./configure --with-resample Enable host-based 400ksps to 270.833ksps resampling. Only supported for UHD devices. If not enabled, the GSM sample rate is requested directly from the device. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2681 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
		@@ -21,7 +21,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
include $(top_srcdir)/Makefile.common
 | 
					include $(top_srcdir)/Makefile.common
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if UHD
 | 
				
			||||||
 | 
					AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(UHD_CFLAGS)
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USRP_CFLAGS)
 | 
					AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(USRP_CFLAGS)
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
AM_CXXFLAGS = -ldl -lpthread
 | 
					AM_CXXFLAGS = -ldl -lpthread
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#rev2dir = $(datadir)/usrp/rev2
 | 
					#rev2dir = $(datadir)/usrp/rev2
 | 
				
			||||||
@@ -42,12 +46,17 @@ COMMON_SOURCES = \
 | 
				
			|||||||
	radioClock.cpp \
 | 
						radioClock.cpp \
 | 
				
			||||||
	sigProcLib.cpp \
 | 
						sigProcLib.cpp \
 | 
				
			||||||
	Transceiver.cpp \
 | 
						Transceiver.cpp \
 | 
				
			||||||
	USRPDevice.cpp \
 | 
					 | 
				
			||||||
	DummyLoad.cpp
 | 
						DummyLoad.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if RESAMPLE
 | 
				
			||||||
 | 
					libtransceiver_la_SOURCES = \
 | 
				
			||||||
 | 
						$(COMMON_SOURCES) \
 | 
				
			||||||
 | 
						radioIOResamp.cpp
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
libtransceiver_la_SOURCES = \
 | 
					libtransceiver_la_SOURCES = \
 | 
				
			||||||
	$(COMMON_SOURCES) \
 | 
						$(COMMON_SOURCES) \
 | 
				
			||||||
	radioIO.cpp
 | 
						radioIO.cpp
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
noinst_PROGRAMS = \
 | 
					noinst_PROGRAMS = \
 | 
				
			||||||
	USRPping \
 | 
						USRPping \
 | 
				
			||||||
@@ -68,22 +77,31 @@ noinst_HEADERS = \
 | 
				
			|||||||
USRPping_SOURCES = USRPping.cpp
 | 
					USRPping_SOURCES = USRPping.cpp
 | 
				
			||||||
USRPping_LDADD = \
 | 
					USRPping_LDADD = \
 | 
				
			||||||
	libtransceiver.la \
 | 
						libtransceiver.la \
 | 
				
			||||||
	$(COMMON_LA) $(SQLITE_LA) \
 | 
						$(COMMON_LA) $(SQLITE_LA)
 | 
				
			||||||
	$(USRP_LIBS)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
transceiver_SOURCES = runTransceiver.cpp
 | 
					transceiver_SOURCES = runTransceiver.cpp
 | 
				
			||||||
transceiver_LDADD = \
 | 
					transceiver_LDADD = \
 | 
				
			||||||
	libtransceiver.la \
 | 
						libtransceiver.la \
 | 
				
			||||||
	$(GSM_LA) \
 | 
						$(GSM_LA) \
 | 
				
			||||||
	$(COMMON_LA) $(SQLITE_LA) \
 | 
						$(COMMON_LA) $(SQLITE_LA)
 | 
				
			||||||
	$(USRP_LIBS)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
sigProcLibTest_SOURCES = sigProcLibTest.cpp
 | 
					sigProcLibTest_SOURCES = sigProcLibTest.cpp
 | 
				
			||||||
sigProcLibTest_LDADD = \
 | 
					sigProcLibTest_LDADD = \
 | 
				
			||||||
	libtransceiver.la \
 | 
						libtransceiver.la \
 | 
				
			||||||
	$(GSM_LA) \
 | 
						$(GSM_LA) \
 | 
				
			||||||
	$(COMMON_LA) $(SQLITE_LA) \
 | 
						$(COMMON_LA) $(SQLITE_LA)
 | 
				
			||||||
	$(USRP_LIBS)
 | 
					
 | 
				
			||||||
 | 
					if UHD
 | 
				
			||||||
 | 
					libtransceiver_la_SOURCES += UHDDevice.cpp
 | 
				
			||||||
 | 
					transceiver_LDADD += $(UHD_LIBS)
 | 
				
			||||||
 | 
					USRPping_LDADD += $(UHD_LIBS)
 | 
				
			||||||
 | 
					sigProcLibTest_LDADD += $(UHD_LIBS)
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					libtransceiver_la_SOURCES += USRPDevice.cpp
 | 
				
			||||||
 | 
					transceiver_LDADD += $(USRP_LIBS)
 | 
				
			||||||
 | 
					USRPping_LDADD += $(USRP_LIBS)
 | 
				
			||||||
 | 
					sigProcLibTest_LDADD += $(USRP_LIBS)
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MOSTLYCLEANFILES +=
 | 
					MOSTLYCLEANFILES +=
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										45
									
								
								configure.ac
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								configure.ac
									
									
									
									
									
								
							@@ -57,19 +57,40 @@ AC_TYPE_SIZE_T
 | 
				
			|||||||
AC_HEADER_TIME
 | 
					AC_HEADER_TIME
 | 
				
			||||||
AC_C_BIGENDIAN
 | 
					AC_C_BIGENDIAN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Defines USRP_CFLAGS, USRP_INCLUDEDIR, and USRP_LIBS
 | 
					AC_ARG_WITH(usrp1, [
 | 
				
			||||||
PKG_CHECK_MODULES(USRP, usrp > 3.1)
 | 
					    AS_HELP_STRING([--with-usrp1],
 | 
				
			||||||
# Check whether we have libusrp >= 3.2
 | 
					        [enable USRP1 gnuradio based transceiver])
 | 
				
			||||||
PKG_CHECK_EXISTS(usrp >= 3.2, libusrp_3_2=yes, libusrp_3_2=no)
 | 
					])
 | 
				
			||||||
if test "x$libusrp_3_2" = "xyes";then
 | 
					 | 
				
			||||||
    AC_DEFINE(HAVE_LIBUSRP_3_2, 1, Define to 1 if you have libusrp >= 3.2)
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
# Check whether we have libusrp >= 3.3
 | 
					 | 
				
			||||||
PKG_CHECK_EXISTS(usrp >= 3.3, libusrp_3_3=yes, libusrp_3_3=no)
 | 
					 | 
				
			||||||
if test "x$libusrp_3_3" = "xyes";then
 | 
					 | 
				
			||||||
    AC_DEFINE(HAVE_LIBUSRP_3_3, 1, Define to 1 if you have libusrp >= 3.3)
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AC_ARG_WITH(resamp, [
 | 
				
			||||||
 | 
					    AS_HELP_STRING([--with-resamp],
 | 
				
			||||||
 | 
					        [enable resampling for non-52MHz devices])
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AS_IF([test "x$with_usrp1" = "xyes"], [
 | 
				
			||||||
 | 
					    # Defines USRP_CFLAGS, USRP_INCLUDEDIR, and USRP_LIBS
 | 
				
			||||||
 | 
					    PKG_CHECK_MODULES(USRP, usrp > 3.1)
 | 
				
			||||||
 | 
					    # Check whether we have libusrp >= 3.2
 | 
				
			||||||
 | 
					    PKG_CHECK_EXISTS(usrp >= 3.2, libusrp_3_2=yes, libusrp_3_2=no)
 | 
				
			||||||
 | 
					    if test "x$libusrp_3_2" = "xyes";then
 | 
				
			||||||
 | 
					        AC_DEFINE(HAVE_LIBUSRP_3_2, 1, Define to 1 if you have libusrp >= 3.2)
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    # Check whether we have libusrp >= 3.3
 | 
				
			||||||
 | 
					    PKG_CHECK_EXISTS(usrp >= 3.3, libusrp_3_3=yes, libusrp_3_3=no)
 | 
				
			||||||
 | 
					    if test "x$libusrp_3_3" = "xyes";then
 | 
				
			||||||
 | 
					        AC_DEFINE(HAVE_LIBUSRP_3_3, 1, Define to 1 if you have libusrp >= 3.3)
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					],
 | 
				
			||||||
 | 
					    [PKG_CHECK_MODULES(UHD, uhd)
 | 
				
			||||||
 | 
					    AC_DEFINE(USE_UHD, 1, Define to 1 if using UHD)
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AS_IF([test "x$with_resamp" = "xyes"], [
 | 
				
			||||||
 | 
					    AC_DEFINE(RESAMPLE, 1, Define to 1 for resampling)
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AM_CONDITIONAL(RESAMPLE, [test "x$with_resamp" = "xyes"])
 | 
				
			||||||
 | 
					AM_CONDITIONAL(UHD, [test "x$with_usrp1" != "xyes"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Defines OSIP_CFLAGS, OSIP_INCLUDEDIR, and OSIP_LIBS
 | 
					# Defines OSIP_CFLAGS, OSIP_INCLUDEDIR, and OSIP_LIBS
 | 
				
			||||||
PKG_CHECK_MODULES(OSIP, libosip2)
 | 
					PKG_CHECK_MODULES(OSIP, libosip2)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user