summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gsm-receiver/Makefile.am11
-rw-r--r--gsm-receiver/Makefile.common34
-rw-r--r--gsm-receiver/Makefile.swig117
-rw-r--r--gsm-receiver/Makefile.swig.gen.t258
-rwxr-xr-xgsm-receiver/bootstrap7
-rw-r--r--gsm-receiver/config/Makefile.am83
-rw-r--r--gsm-receiver/config/acx_pthread.m4147
-rw-r--r--gsm-receiver/config/ax_boost_date_time.m434
-rw-r--r--gsm-receiver/config/ax_boost_filesystem.m445
-rw-r--r--gsm-receiver/config/ax_boost_iostreams.m439
-rw-r--r--gsm-receiver/config/ax_boost_program_options.m435
-rw-r--r--gsm-receiver/config/ax_boost_python.m492
-rw-r--r--gsm-receiver/config/ax_boost_regex.m435
-rw-r--r--gsm-receiver/config/ax_boost_serialization.m438
-rw-r--r--gsm-receiver/config/ax_boost_signals.m435
-rw-r--r--gsm-receiver/config/ax_boost_system.m440
-rw-r--r--gsm-receiver/config/ax_boost_test_exec_monitor.m435
-rw-r--r--gsm-receiver/config/ax_boost_thread.m472
-rw-r--r--gsm-receiver/config/ax_boost_unit_test_framework.m436
-rw-r--r--gsm-receiver/config/ax_boost_wserialization.m446
-rw-r--r--gsm-receiver/config/gr_boost.m4111
-rw-r--r--gsm-receiver/config/gr_doxygen.m413
-rw-r--r--gsm-receiver/config/gr_fortran.m432
-rw-r--r--gsm-receiver/config/gr_omnithread.m49
-rw-r--r--gsm-receiver/config/gr_python.m4135
-rw-r--r--gsm-receiver/config/gr_scripting.m42
-rw-r--r--gsm-receiver/config/gr_set_md_cpu.m418
-rw-r--r--gsm-receiver/config/gr_standalone.m4119
-rw-r--r--gsm-receiver/config/gr_subversion.m4 (renamed from gsm-receiver/config/gr_x86_64.m4)31
-rw-r--r--gsm-receiver/config/lf_cc.m41
-rw-r--r--gsm-receiver/config/lf_cxx.m454
-rw-r--r--gsm-receiver/config/pkg.m4246
-rw-r--r--gsm-receiver/config/usrp_fusb_tech.m482
-rw-r--r--gsm-receiver/config/usrp_libusb.m481
-rw-r--r--gsm-receiver/config/usrp_sdcc.m472
-rw-r--r--gsm-receiver/configure.ac83
-rwxr-xr-xgsm-receiver/py-compile36
-rw-r--r--gsm-receiver/src/lib/Makefile.am96
-rw-r--r--gsm-receiver/src/lib/Makefile.swig.gen258
-rw-r--r--gsm-receiver/src/lib/decoder/Makefile.am2
-rw-r--r--gsm-receiver/src/lib/decoder/a5-1-2.h3
-rw-r--r--gsm-receiver/src/lib/decoder/gsmstack.c6
-rw-r--r--gsm-receiver/src/lib/decoder/openbtsstuff/Makefile.am2
-rw-r--r--gsm-receiver/src/lib/decoder/sch.c2
-rw-r--r--gsm-receiver/src/lib/gsm_receiver_cf.cc3
-rw-r--r--gsm-receiver/src/lib/gsm_receiver_cf.h5
46 files changed, 2042 insertions, 699 deletions
diff --git a/gsm-receiver/Makefile.am b/gsm-receiver/Makefile.am
index 734941a..d5b9a30 100644
--- a/gsm-receiver/Makefile.am
+++ b/gsm-receiver/Makefile.am
@@ -1,13 +1,14 @@
+ACLOCAL_AMFLAGS = -I config
+
include $(top_srcdir)/Makefile.common
-SUBDIRS = src config
-DIST_SUBDIRS = src config
+SUBDIRS = config src
+DIST_SUBDIRS = config src
EXTRA_DIST = \
- configure \
- gsm-receiver.pc.in \
+ bootstrap configure config.h.in \
+ Makefile.swig Makefile.swig.gen.t \
config.h.in
-# bootstrap
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gsm-receiver.pc
diff --git a/gsm-receiver/Makefile.common b/gsm-receiver/Makefile.common
index abaac15..4941eaa 100644
--- a/gsm-receiver/Makefile.common
+++ b/gsm-receiver/Makefile.common
@@ -1,6 +1,6 @@
# -*- Makefile -*-
#
-# Copyright 2004,2006 Free Software Foundation, Inc.
+# Copyright 2004,2006,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,13 +20,19 @@
# Boston, MA 02110-1301, USA.
#
+# these flags are used when compiling non-SWIG-wrapper files
+# when going into non-SWIG libraries
+AM_CXXFLAGS = @autoconf_default_CXXFLAGS@
+
+AM_CPPFLAGS = \
+ $(STD_DEFINES_AND_INCLUDES) \
+ $(PYTHON_CPPFLAGS) \
+ $(CPPUNIT_INCLUDES) \
+ $(GNURADIO_CORE_CPPFLAGS)
+
#!! remove this
TCH_DECODER_INCLUDEDIR = $(top_srcdir)/src/lib/decoder/openbtsstuff
-MAIN_INCLUDEDIR = $(top_srcdir)/src/lib
-DECODER_INCLUDEDIR = $(top_srcdir)/src/lib/decoder
-DECODER_LA = $(top_builddir)/src/lib/decoder/libdecoder.la
-
STD_DEFINES_AND_INCLUDES = \
-I$(DECODER_INCLUDEDIR) \
-I$(MAIN_INCLUDEDIR) \
@@ -34,6 +40,11 @@ STD_DEFINES_AND_INCLUDES = \
$(LIBOSMOCORE_CFLAGS) \
-I$(TCH_DECODER_INCLUDEDIR)
+
+#MAIN_INCLUDEDIR = $(top_srcdir)/src/lib
+#DECODER_INCLUDEDIR = $(top_srcdir)/src/lib/decoder
+#DECODER_LA = $(top_builddir)/src/lib/decoder/libdecoder.la
+
# includes
grincludedir = $(includedir)/gnuradio
@@ -47,12 +58,17 @@ swigincludedir = $(grincludedir)/swig
grpythondir = $(pythondir)/gnuradio
grpyexecdir = $(pyexecdir)/gnuradio
-# swig flags
-SWIGPYTHONFLAGS = -fvirtual -python -modern
-SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig -I$(GNURADIO_CORE_INCLUDEDIR)
-
# Don't assume that make predefines $(RM), because BSD make does
# not. We define it now in configure.ac using AM_PATH_PROG, but now
# here have to add a -f to be like GNU make.
RM=$(RM_PROG) -f
+STAMPS =
+MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT
+
+# Don't distribute the files defined in the varialbe 'no_dist_files'
+dist-hook:
+ @for file in $(no_dist_files); do \
+ echo $(RM) $(distdir)/$$file; \
+ $(RM) $(distdir)/$$file;
+ done;
diff --git a/gsm-receiver/Makefile.swig b/gsm-receiver/Makefile.swig
new file mode 100644
index 0000000..9e14835
--- /dev/null
+++ b/gsm-receiver/Makefile.swig
@@ -0,0 +1,117 @@
+# -*- Makefile -*-
+#
+# Copyright 2009 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+## This makefile should be included using
+## include $(top_srcdir)/Makefile.swig
+## in Makefile.am's which require SWIG wrapping / compilation.
+## For just installing .i files, this Makefile is not required.
+
+## swig flags
+## -w511 turns off keyword argument warning
+## "-outdir $(builddir)" writes all generated output files to
+## the local builddir (which should always be '.')
+## In some older autotools, $(builddir) is not defined, so
+## just use '.' instead.
+
+SWIG_PYTHON_FLAGS = \
+ -fvirtual \
+ -python \
+ -modern \
+ -keyword \
+ -w511 \
+ -outdir .
+
+## standard swig flags used by most components
+
+STD_SWIG_PYTHON_ARGS = \
+ $(SWIG_PYTHON_FLAGS) \
+ $(STD_DEFINES_AND_INCLUDES) \
+ $(WITH_SWIG_INCLUDES) \
+ $(WITH_INCLUDES)
+
+## standard SWIG LD flags for library creation
+
+STD_SWIG_LA_LD_FLAGS = \
+ $(PYTHON_LDFLAGS) \
+ -module \
+ -avoid-version \
+ $(NO_UNDEFINED)
+
+## standard SWIG library additions for library creation
+
+STD_SWIG_LA_LIB_ADD = \
+ -lstdc++
+
+## standard SWIG CXXFLAGS
+## This allows for code to be compiled with "-O1" instead of "-g -O2"
+## for some systems, avoiding some optimization issues.
+
+STD_SWIG_CXX_FLAGS = @swig_CXXFLAGS@
+
+## SWIG suffix for automake to know about
+
+SUFFIXES = .i
+
+## Create $(srcdir)/Makefile.swig.gen, containing all of the rules
+## for running SWIG to generate or re-generate outputs. SWIG file
+## names are to be defined in TOP_SWIG_IFILES, and must include the
+## full path to the file and full filename including extension. This
+## Makefile addition will be made only if either it does not exist or
+## if the top-level template has been modified.
+
+generate-makefile-swig $(srcdir)/Makefile.swig.gen: $(top_srcdir)/Makefile.swig.gen.t
+## recreate $(srcdir)/Makefile.swig.gen only if ...
+ @do_recreate=0; \
+ if test -f $(srcdir)/Makefile.swig.gen; then \
+## the file exists and can be removed; or ...
+ if $(RM) $(srcdir)/Makefile.swig.gen 2>/dev/null; then \
+ if touch $(srcdir)/Makefile.swig.gen 2>/dev/null; then \
+ do_recreate=1; \
+ fi; \
+ fi; \
+ else \
+## the file doesn't exist, but can be created (e.g., by touching it).
+ if touch $(srcdir)/Makefile.swig.gen 2>/dev/null; then \
+ do_recreate=1; \
+ fi; \
+ fi; \
+ if test "$$do_recreate" == "1"; then \
+ echo "Regenerating $(srcdir)/Makefile.swig.gen"; \
+ for TFILE in $(TOP_SWIG_IFILES); do \
+## retrieve just the filename, without path or extension
+ TNAME=`python -c "import os.path as op; (dN, fN) = op.split ('$$TFILE'); (fbN, fE) = op.splitext (fN); print fbN;"`; \
+## Replace the @-named strings in the template Makefile for SWIG.
+ $(SED) -e 's|@NAME@|'$$TNAME'|g;' < $(top_srcdir)/Makefile.swig.gen.t >> $(srcdir)/Makefile.swig.gen; \
+ echo "" >> $(srcdir)/Makefile.swig.gen; \
+ done; \
+ else \
+ echo "Cannot recreate $(srcdir)/Makefile.swig.gen because the directory or file is write-protected."; \
+ exit -1; \
+ fi;
+
+swig_built_sources =
+
+## include the built Makefile.swig.gen, always the one from the
+## srcdir; this must be included as the last item, because it depends
+## on variables defined above.
+
+include $(srcdir)/Makefile.swig.gen
diff --git a/gsm-receiver/Makefile.swig.gen.t b/gsm-receiver/Makefile.swig.gen.t
new file mode 100644
index 0000000..c15a817
--- /dev/null
+++ b/gsm-receiver/Makefile.swig.gen.t
@@ -0,0 +1,258 @@
+# -*- Makefile -*-
+#
+# Copyright 2009 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+# Makefile.swig.gen for @NAME@.i
+
+## Default install locations for these files:
+##
+## Default location for the Python directory is:
+## ${prefix}/lib/python${python_version}/site-packages/[category]/@NAME@
+## Default location for the Python exec directory is:
+## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/@NAME@
+##
+## The following can be overloaded to change the install location, but
+## this has to be done in the including Makefile.am -before-
+## Makefile.swig is included.
+
+@NAME@_pythondir_category ?= gnuradio/@NAME@
+@NAME@_pylibdir_category ?= $(@NAME@_pythondir_category)
+@NAME@_pythondir = $(pythondir)/$(@NAME@_pythondir_category)
+@NAME@_pylibdir = $(pyexecdir)/$(@NAME@_pylibdir_category)
+
+## SWIG headers are always installed into the same directory.
+
+@NAME@_swigincludedir = $(swigincludedir)
+
+## This is a template file for a "generated" Makefile addition (in
+## this case, "Makefile.swig.gen"). By including the top-level
+## Makefile.swig, this file will be used to generate the SWIG
+## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
+## SWIG .i files to generated wrappings for; there can be more than 1
+## so long as the names are unique (no sorting is done on the
+## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
+## file will generate .cc, .py, and possibly .h files -- meaning that
+## all of these files will have the same base name (that provided for
+## the SWIG .i file).
+##
+## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
+## right thing. For more info, see <
+## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
+
+## Stamps used to ensure parallel make does the right thing. These
+## are removed by "make clean", but otherwise unused except during the
+## parallel built. These will not be included in a tarball, because
+## the SWIG-generated files will be removed from the distribution.
+
+STAMPS += $(DEPDIR)/@NAME@-generate-*
+
+## Other cleaned files: dependency files generated by SWIG or this Makefile
+
+MOSTLYCLEANFILES += $(DEPDIR)/*.S*
+
+## Add the .py and .cc files to the list of SWIG built sources. The
+## .h file is sometimes built, but not always ... so that one has to
+## be added manually by the including Makefile.am .
+
+swig_built_sources += @NAME@.py @NAME@.cc
+
+## Various SWIG variables. These can be overloaded in the including
+## Makefile.am by setting the variable value there, then including
+## Makefile.swig .
+
+@NAME@_swiginclude_HEADERS = \
+ @NAME@.i \
+ $(@NAME@_swiginclude_headers)
+
+@NAME@_pylib_LTLIBRARIES = \
+ _@NAME@.la
+
+_@NAME@_la_SOURCES = \
+ @NAME@.cc \
+ $(@NAME@_la_swig_sources)
+
+_@NAME@_la_LIBADD = \
+ $(STD_SWIG_LA_LIB_ADD) \
+ $(@NAME@_la_swig_libadd)
+
+_@NAME@_la_LDFLAGS = \
+ $(STD_SWIG_LA_LD_FLAGS) \
+ $(@NAME@_la_swig_ldflags)
+
+_@NAME@_la_CXXFLAGS = \
+ $(STD_SWIG_CXX_FLAGS) \
+ $(@NAME@_la_swig_cxxflags)
+
+@NAME@_python_PYTHON = \
+ @NAME@.py \
+ $(@NAME@_python)
+
+## Entry rule for running SWIG
+
+@NAME@.h @NAME@.py @NAME@.cc: @NAME@.i
+## This rule will get called only when MAKE decides that one of the
+## targets needs to be created or re-created, because:
+##
+## * The .i file is newer than any or all of the generated files;
+##
+## * Any or all of the .cc, .h, or .py files does not exist and is
+## needed (in the case this file is not needed, the rule for it is
+## ignored); or
+##
+## * Some SWIG-based dependecy of the .cc file isn't met and hence the
+## .cc file needs be be regenerated. Explanation: Because MAKE
+## knows how to handle dependencies for .cc files (regardless of
+## their name or extension), then the .cc file is used as a target
+## instead of the .i file -- but with the dependencies of the .i
+## file. It is this last reason why the line:
+##
+## if test -f $@; then :; else
+##
+## cannot be used in this case: If a .i file dependecy is not met,
+## then the .cc file needs to be rebuilt. But if the stamp is newer
+## than the .cc file, and the .cc file exists, then in the original
+## version (with the 'test' above) the internal MAKE call will not
+## be issued and hence the .cc file will not be rebuilt.
+##
+## Once execution gets to here, it should always proceed no matter the
+## state of a stamp (as discussed in link above). The
+## $(DEPDIR)/@NAME@-generate stuff is used to allow for parallel
+## builds to "do the right thing". The stamp has no relationship with
+## either the target files or dependency file; it is used solely for
+## the protection of multiple builds during a given call to MAKE.
+##
+## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
+## (15). At a caught signal, the quoted command will be issued before
+## exiting. In this case, remove any stamp, whether temporary of not.
+## The trap is valid until the process exits; the process includes all
+## commands appended via "\"s.
+##
+ trap 'rm -rf $(DEPDIR)/@NAME@-generate-*' 1 2 13 15; \
+##
+## Create a temporary directory, which acts as a lock. The first
+## process to create the directory will succeed and issue the MAKE
+## command to do the actual work, while all subsequent processes will
+## fail -- leading them to wait for the first process to finish.
+##
+ if mkdir $(DEPDIR)/@NAME@-generate-lock 2>/dev/null; then \
+##
+## This code is being executed by the first process to succeed in
+## creating the directory lock.
+##
+## Remove the stamp associated with this filename.
+##
+ rm -f $(DEPDIR)/@NAME@-generate-stamp; \
+##
+## Tell MAKE to run the rule for creating this stamp.
+##
+ $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/@NAME@-generate-stamp WHAT=$<; \
+##
+## Now that the .cc, .h, and .py files have been (re)created from the
+## .i file, future checking of this rule during the same MAKE
+## execution will come back that the rule doesn't need to be executed
+## because none of the conditions mentioned at the start of this rule
+## will be positive. Remove the the directory lock, which frees up
+## any waiting process(es) to continue.
+##
+ rmdir $(DEPDIR)/@NAME@-generate-lock; \
+ else \
+##
+## This code is being executed by any follower processes while the
+## directory lock is in place.
+##
+## Wait until the first process is done, testing once per second.
+##
+ while test -d $(DEPDIR)/@NAME@-generate-lock; do \
+ sleep 1; \
+ done; \
+##
+## Succeed if and only if the first process succeeded; exit this
+## process returning the status of the generated stamp.
+##
+ test -f $(DEPDIR)/@NAME@-generate-stamp; \
+ exit $$?; \
+ fi;
+
+$(DEPDIR)/@NAME@-generate-stamp:
+## This rule will be called only by the first process issuing the
+## above rule to succeed in creating the lock directory, after
+## removing the actual stamp file in order to guarantee that MAKE will
+## execute this rule.
+##
+## Call SWIG to generate the various output files; special
+## post-processing on 'mingw32' host OS for the dependency file.
+##
+ if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(@NAME@_swig_args) \
+ -MD -MF $(DEPDIR)/@NAME@.Std \
+ -module @NAME@ -o @NAME@.cc $(WHAT); then \
+ if test $(host_os) = mingw32; then \
+ $(RM) $(DEPDIR)/@NAME@.Sd; \
+ $(SED) 's,\\\\,/,g' < $(DEPDIR)/@NAME@.Std \
+ > $(DEPDIR)/@NAME@.Sd; \
+ $(RM) $(DEPDIR)/@NAME@.Std; \
+ $(MV) $(DEPDIR)/@NAME@.Sd $(DEPDIR)/@NAME@.Std; \
+ fi; \
+ else \
+ $(RM) $(DEPDIR)/@NAME@.S*; exit 1; \
+ fi;
+##
+## Mess with the SWIG output .Std dependency file, to create a
+## dependecy file valid for the input .i file: Basically, simulate the
+## dependency file created for libraries by GNU's libtool for C++,
+## where all of the dependencies for the target are first listed, then
+## each individual dependency is listed as a target with no further
+## dependencies.
+##
+## (1) remove the current dependency file
+##
+ $(RM) $(DEPDIR)/@NAME@.d
+##
+## (2) Copy the whole SWIG file:
+##
+ cp $(DEPDIR)/@NAME@.Std $(DEPDIR)/@NAME@.d
+##
+## (3) all a carriage return to the end of the dependency file.
+##
+ echo "" >> $(DEPDIR)/@NAME@.d
+##
+## (4) from the SWIG file, remove the first line (the target); remove
+## trailing " \" and " " from each line. Append ":" to each line,
+## followed by 2 carriage returns, then append this to the end of
+## the dependency file.
+##
+ $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/@NAME@.Std | \
+ awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/@NAME@.d
+##
+## (5) remove the SWIG-generated file
+##
+ $(RM) $(DEPDIR)/@NAME@.Std
+##
+## Create the stamp for this filename generation, to signal success in
+## executing this rule; allows other threads waiting on this process
+## to continue.
+##
+ touch $(DEPDIR)/@NAME@-generate-stamp
+
+# KLUDGE: Force runtime include of a SWIG dependency file. This is
+# not guaranteed to be portable, but will probably work. If it works,
+# we have accurate dependencies for our swig stuff, which is good.
+
+@am__include@ @am__quote@./$(DEPDIR)/@NAME@.d@am__quote@
diff --git a/gsm-receiver/bootstrap b/gsm-receiver/bootstrap
index 7e0a2eb..f3be4d5 100755
--- a/gsm-receiver/bootstrap
+++ b/gsm-receiver/bootstrap
@@ -25,8 +25,5 @@ rm -fr config.cache autom4te*.cache
aclocal -I config
autoconf
autoheader
-libtoolize --automake
-automake --add-missing
-if test ! -d debug; then
- mkdir debug
-fi
+libtoolize --automake -c -f
+automake --add-missing -c -f -Wno-portability
diff --git a/gsm-receiver/config/Makefile.am b/gsm-receiver/config/Makefile.am
index 1c99d68..5858d22 100644
--- a/gsm-receiver/config/Makefile.am
+++ b/gsm-receiver/config/Makefile.am
@@ -25,46 +25,57 @@ include $(top_srcdir)/Makefile.common
m4datadir = $(datadir)/aclocal
# List your m4 macros here
-m4macros = \
- acx_pthread.m4 \
- bnv_have_qt.m4 \
- cppunit.m4 \
- gr_boost.m4 \
+m4macros = \
+ acx_pthread.m4 \
+ ax_boost_base.m4 \
+ ax_boost_date_time.m4 \
+ ax_boost_filesystem.m4 \
+ ax_boost_iostreams.m4 \
+ ax_boost_program_options.m4 \
+ ax_boost_python.m4 \
+ ax_boost_regex.m4 \
+ ax_boost_serialization.m4 \
+ ax_boost_signals.m4 \
+ ax_boost_system.m4 \
+ ax_boost_test_exec_monitor.m4 \
+ ax_boost_thread.m4 \
+ ax_boost_unit_test_framework.m4 \
+ ax_boost_wserialization.m4 \
+ bnv_have_qt.m4 \
+ cppunit.m4 \
gr_check_createfilemapping.m4 \
- gr_check_usrp.m4 \
- gr_check_mc4020.m4 \
- gr_check_shm_open.m4 \
- gr_doxygen.m4 \
- gr_gprof.m4 \
+ gr_check_mc4020.m4 \
+ gr_check_shm_open.m4 \
+ gr_check_usrp.m4 \
+ gr_doxygen.m4 \
+ gr_fortran.m4 \
+ gr_gprof.m4 \
+ gr_lib64.m4 \
gr_libgnuradio_core_extra_ldflags.m4 \
- gr_no_undefined.m4 \
- gr_omnithread.m4 \
- gr_pwin32.m4 \
- gr_python.m4 \
- gr_require_mc4020.m4 \
- gr_scripting.m4 \
- gr_set_md_cpu.m4 \
- gr_swig.m4 \
- gr_sysv_shm.m4 \
- gr_x86_64.m4 \
- lf_cc.m4 \
- lf_cxx.m4 \
- lf_warnings.m4 \
- lf_x11.m4 \
- mkstemp.m4 \
- onceonly.m4 \
- pkg.m4 \
- usrp_fusb_tech.m4 \
- usrp_libusb.m4 \
- usrp_sdcc.m4
+ gr_no_undefined.m4 \
+ gr_omnithread.m4 \
+ gr_pwin32.m4 \
+ gr_python.m4 \
+ gr_require_mc4020.m4 \
+ gr_scripting.m4 \
+ gr_set_md_cpu.m4 \
+ gr_standalone.m4 \
+ gr_subversion.m4 \
+ gr_swig.m4 \
+ gr_sysv_shm.m4 \
+ lf_cc.m4 \
+ lf_cxx.m4 \
+ lf_warnings.m4 \
+ lf_x11.m4 \
+ mkstemp.m4 \
+ onceonly.m4 \
+ pkg.m4 \
+ usrp_fusb_tech.m4 \
+ usrp_libusb.m4 \
+ usrp_sdcc.m4
# Don't install m4 macros anymore
# m4data_DATA = $(m4macros)
-EXTRA_DIST = $(m4macros) \
- libtool.m4 \
- lt~obsolete.m4 \
- ltsugar.m4 \
- ltversion.m4 \
- ltoptions.m4
+EXTRA_DIST = $(m4macros)
diff --git a/gsm-receiver/config/acx_pthread.m4 b/gsm-receiver/config/acx_pthread.m4
index d318ab0..eb09f5a 100644
--- a/gsm-receiver/config/acx_pthread.m4
+++ b/gsm-receiver/config/acx_pthread.m4
@@ -1,6 +1,84 @@
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://www.gnu.org/software/ac-archive/htmldoc/acx_pthread.html
-dnl
+# ===========================================================================
+# http://autoconf-archive.cryp.to/acx_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC to any special C compiler that is needed for
+# multi-threaded programs (defaults to the value of CC otherwise). (This
+# is necessary on AIX to use the special cc_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also link it with them as well. e.g. you should link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threads programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# LAST MODIFICATION
+#
+# 2008-04-12
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Macro Archive. When you make and
+# distribute a modified version of the Autoconf Macro, you may extend this
+# special exception to the GPL to apply to your modified version as well.
+
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
@@ -37,9 +115,10 @@ fi
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all.
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
@@ -56,21 +135,23 @@ acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -m
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
+# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthread or
+ # tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
- acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+ acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
;;
esac
@@ -87,6 +168,13 @@ for flag in $acx_pthread_flags; do
PTHREAD_CFLAGS="$flag"
;;
+ pthread-config)
+ AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
@@ -133,43 +221,40 @@ if test "x$acx_pthread_ok" = xyes; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- # Detect AIX lossage: threads are created detached by default
- # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
- AC_MSG_CHECKING([for joinable pthread attribute])
- AC_TRY_LINK([#include <pthread.h>],
- [int attr=PTHREAD_CREATE_JOINABLE;],
- ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
- if test x"$ok" = xunknown; then
- AC_TRY_LINK([#include <pthread.h>],
- [int attr=PTHREAD_CREATE_UNDETACHED;],
- ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
- fi
- if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
- AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
- [Define to the necessary symbol if this constant
- uses a non-standard name on your system.])
- fi
- AC_MSG_RESULT(${ok})
- if test x"$ok" = xunknown; then
- AC_MSG_WARN([we do not know how to create joinable pthreads])
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_MSG_CHECKING([for joinable pthread attribute])
+ attr_name=unknown
+ for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
+ [attr_name=$attr; break])
+ done
+ AC_MSG_RESULT($attr_name)
+ if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+ AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
- *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+ *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+ *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
- # More AIX lossage: must compile with cc_r
- AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+ # More AIX lossage: must compile with xlc_r or cc_r
+ if test x"$GCC" != xyes; then
+ AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+ else
+ PTHREAD_CC=$CC
+ fi
else
PTHREAD_CC="$CC"
fi
diff --git a/gsm-receiver/config/ax_boost_date_time.m4 b/gsm-receiver/config/ax_boost_date_time.m4
new file mode 100644
index 0000000..7b3f0fe
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_date_time.m4
@@ -0,0 +1,34 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_DATE_TIME
+#
+# DESCRIPTION
+#
+# Test for date_time library from the Boost C++ libraries.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_DATE_TIME_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_DATE_TIME
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_DATE_TIME],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_date_time],
+ [@%:@include <boost/date_time/gregorian/gregorian_types.hpp>],
+ [using namespace boost::gregorian; date d(2002,Jan,10); return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_filesystem.m4 b/gsm-receiver/config/ax_boost_filesystem.m4
new file mode 100644
index 0000000..bcb3fa4
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_filesystem.m4
@@ -0,0 +1,45 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_FILESYSTEM
+#
+# DESCRIPTION
+#
+# Test for Filesystem library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_FILESYSTEM_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_FILESYSTEM
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_FILESYSTEM],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+
+ dnl depends on boost_system
+ AC_REQUIRE([AX_BOOST_SYSTEM])
+ axbf_LDFLAGS_SAVED=$LDFLAGS
+ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LIB"
+
+ _AX_BOOST_CHECK([boost_filesystem],
+ [@%:@include <boost/filesystem/path.hpp>],
+ [using namespace boost::filesystem;
+ path my_path( "foo/bar/data.txt" );
+ return 0;])
+
+ LDFLAGS=$axbf_LDFLAGS_SAVED
+])
diff --git a/gsm-receiver/config/ax_boost_iostreams.m4 b/gsm-receiver/config/ax_boost_iostreams.m4
new file mode 100644
index 0000000..181b1e7
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_iostreams.m4
@@ -0,0 +1,39 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_IOSTREAMS
+#
+# DESCRIPTION
+#
+# Test for IOStreams library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_IOSTREAMS_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_IOSTREAMS
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_IOSTREAMS],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_iostreams],
+ [@%:@include <boost/iostreams/filtering_stream.hpp>
+ @%:@include <boost/range/iterator_range.hpp>],
+ [std::string input = "Hello World!";
+ namespace io = boost::iostreams;
+ io::filtering_istream in(boost::make_iterator_range(input));
+ return 0;])
+
+])
diff --git a/gsm-receiver/config/ax_boost_program_options.m4 b/gsm-receiver/config/ax_boost_program_options.m4
new file mode 100644
index 0000000..3829373
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_program_options.m4
@@ -0,0 +1,35 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_PROGRAM_OPTIONS
+#
+# DESCRIPTION
+#
+# Test for program options library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_PROGRAM_OPTIONS
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_program_options],
+ [@%:@include <boost/program_options.hpp>],
+ [boost::program_options::options_description generic("Generic options");
+ return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_python.m4 b/gsm-receiver/config/ax_boost_python.m4
new file mode 100644
index 0000000..3c6c666
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_python.m4
@@ -0,0 +1,92 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ax_boost_python.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_BOOST_PYTHON
+#
+# DESCRIPTION
+#
+# This macro checks to see if the Boost.Python library is installed. It
+# also attempts to guess the currect library name using several attempts.
+# It tries to build the library name using a user supplied name or suffix
+# and then just the raw library.
+#
+# If the library is found, HAVE_BOOST_PYTHON is defined and
+# BOOST_PYTHON_LIB is set to the name of the library.
+#
+# This macro calls AC_SUBST(BOOST_PYTHON_LIB).
+#
+# In order to ensure that the Python headers are specified on the include
+# path, this macro requires AX_PYTHON to be called.
+#
+# LAST MODIFICATION
+#
+# 2008-04-12
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Michael Tindal
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Macro Archive. When you make and
+# distribute a modified version of the Autoconf Macro, you may extend this
+# special exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_BOOST_PYTHON],
+[AC_REQUIRE([AX_PYTHON])dnl
+AC_CACHE_CHECK(whether the Boost::Python library is available,
+ac_cv_boost_python,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ CPPFLAGS_SAVE=$CPPFLAGS
+ if test x$PYTHON_INCLUDE_DIR != x; then
+ CPPFLAGS=-I$PYTHON_INCLUDE_DIR $CPPFLAGS
+ fi
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
+ #include <boost/python/module.hpp>
+ using namespace boost::python;
+ BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]],
+ [[return 0;]]),
+ ac_cv_boost_python=yes, ac_cv_boost_python=no)
+ AC_LANG_RESTORE
+ CPPFLAGS=$CPPFLAGS_SAVE
+])
+if test "$ac_cv_boost_python" = "yes"; then
+ AC_LANG_PUSH([C++])
+ AC_DEFINE(HAVE_BOOST_PYTHON,,[define if the Boost::Python library is available])
+ ax_python_lib=boost_python
+ AC_ARG_WITH([boost-python],AS_HELP_STRING([--with-boost-python],[specify the boost python library or suffix to use]),
+ [if test "x$with_boost_python" != "xno"; then
+ ax_python_lib=$with_boost_python
+ ax_boost_python_lib=boost_python-$with_boost_python
+ fi])
+ for ax_lib in $ax_python_lib $ax_boost_python_lib boost_python; do
+ AC_CHECK_LIB($ax_lib, exit, [BOOST_PYTHON_LIB=$ax_lib break])
+ done
+ AC_SUBST(BOOST_PYTHON_LIB)
+ AC_LANG_POP([C++])
+fi
+])dnl
diff --git a/gsm-receiver/config/ax_boost_regex.m4 b/gsm-receiver/config/ax_boost_regex.m4
new file mode 100644
index 0000000..32b5313
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_regex.m4
@@ -0,0 +1,35 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_REGEX
+#
+# DESCRIPTION
+#
+# Test for Regex library from the Boost C++ libraries. The macro requires
+# a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_REGEX_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_REGEX
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_REGEX],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_regex],
+ [@%:@include <boost/regex.hpp>],
+ [boost::regex r(); return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_serialization.m4 b/gsm-receiver/config/ax_boost_serialization.m4
new file mode 100644
index 0000000..78c9500
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_serialization.m4
@@ -0,0 +1,38 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_SERIALIZATION
+#
+# DESCRIPTION
+#
+# Test for Serialization library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_SERIALIZATION_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_SERIALIZATION
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_SERIALIZATION],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_serialization],
+ [@%:@include <fstream>
+ @%:@include <boost/archive/text_oarchive.hpp>
+ @%:@include <boost/archive/text_iarchive.hpp>],
+ [std::ofstream ofs("filename");
+ boost::archive::text_oarchive oa(ofs);
+ return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_signals.m4 b/gsm-receiver/config/ax_boost_signals.m4
new file mode 100644
index 0000000..3c49717
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_signals.m4
@@ -0,0 +1,35 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_SIGNALS
+#
+# DESCRIPTION
+#
+# Test for Signals library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_SIGNALS_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_SIGNALS
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_SIGNALS],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_signals],
+ [@%:@include <boost/signal.hpp>],
+ [boost::signal<void ()> sig; return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_system.m4 b/gsm-receiver/config/ax_boost_system.m4
new file mode 100644
index 0000000..cb73f25
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_system.m4
@@ -0,0 +1,40 @@
+# ===========================================================================
+# started with this: http://autoconf-archive.cryp.to/ax_boost_system.html,
+# virtually nothing left
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_BOOST_SYSTEM
+#
+# DESCRIPTION
+#
+# Test for System library from the Boost C++ libraries. The macro requires
+# a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_SYSTEM_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_SYSTEM
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_SYSTEM],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_system],
+ [@%:@include <boost/system/error_code.hpp>],
+ [boost::system::system_category])
+])
diff --git a/gsm-receiver/config/ax_boost_test_exec_monitor.m4 b/gsm-receiver/config/ax_boost_test_exec_monitor.m4
new file mode 100644
index 0000000..2c30c0b
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_test_exec_monitor.m4
@@ -0,0 +1,35 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_TEST_EXEC_MONITOR
+#
+# DESCRIPTION
+#
+# Test for Test_Exec_Monitor library from the Boost C++ libraries. The
+# macro requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_TEST_EXEC_MONITOR
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Dodji Seketeli <dodji@seketeli.org>
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_test_exec_monitor],
+ [@%:@include <boost/test/test_tools.hpp>],
+ [int i=1 ; BOOST_REQUIRE(i==1); ; return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_thread.m4 b/gsm-receiver/config/ax_boost_thread.m4
new file mode 100644
index 0000000..4df2322
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_thread.m4
@@ -0,0 +1,72 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_THREAD
+#
+# DESCRIPTION
+#
+# Test for Thread library from the Boost C++ libraries.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_THREAD_LIB)
+# AC_SUBST(BOOST_CXXFLAGS)
+#
+# And sets:
+#
+# HAVE_BOOST_THREAD
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Michael Tindal
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+
+AC_DEFUN([AX_BOOST_THREAD],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ AC_REQUIRE([ACX_PTHREAD])
+ _AX_BOOST_WITH([boost_thread])
+
+ if test "$want_boost" = "yes"; then
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ CPPFLAGS_SAVED="$CPPFLAGS"
+ LDFLAGS_SAVED="$LDFLAGS"
+ CXXFLAGS_SAVED="$CXXFLAGS"
+
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS $PTHREAD_LIBS"
+ CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+
+ AC_CACHE_CHECK(whether the boost::thread includes are available,
+ ax_cv_boost_thread,
+ [AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
+ [[boost::thread_group thrds;
+ return 0;]]),
+ ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
+ AC_LANG_POP([C++])
+ ])
+
+ if test "$ax_cv_boost_thread" = "yes"; then
+ BOOST_CXXFLAGS="$PTHREAD_CFLAGS"
+ AC_SUBST(BOOST_CXXFLAGS)
+ _AX_BOOST_CHECK_LIB([boost_thread])
+ if test "$link_ok" = "yes" && test -n "$PTHREAD_LIBS"; then
+ BOOST_THREAD_LIB="$BOOST_THREAD_LIB $PTHREAD_LIBS"
+ fi
+ fi
+
+ CPPFLAGS="$CPPFLAGS_SAVED"
+ LDFLAGS="$LDFLAGS_SAVED"
+ CXXFLAGS="$CXXFLAGS_SAVED"
+ fi
+])
diff --git a/gsm-receiver/config/ax_boost_unit_test_framework.m4 b/gsm-receiver/config/ax_boost_unit_test_framework.m4
new file mode 100644
index 0000000..73affcc
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_unit_test_framework.m4
@@ -0,0 +1,36 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_UNIT_TEST_FRAMEWORK
+#
+# DESCRIPTION
+#
+# Test for Unit_Test_Framework library from the Boost C++ libraries. The
+# macro requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_UNIT_TEST_FRAMEWORK
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+ _AX_BOOST_CHECK([boost_unit_test_framework],
+ [@%:@include <boost/test/unit_test.hpp>],
+ [using boost::unit_test::test_suite;
+ test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" );
+ return 0;])
+])
diff --git a/gsm-receiver/config/ax_boost_wserialization.m4 b/gsm-receiver/config/ax_boost_wserialization.m4
new file mode 100644
index 0000000..f384988
--- /dev/null
+++ b/gsm-receiver/config/ax_boost_wserialization.m4
@@ -0,0 +1,46 @@
+#
+# SYNOPSIS
+#
+# AX_BOOST_WSERIALIZATION
+#
+# DESCRIPTION
+#
+# Test for WSerialization library from the Boost C++ libraries. The macro
+# requires a preceding call to AX_BOOST_BASE.
+#
+# This macro calls:
+#
+# AC_SUBST(BOOST_WSERIALIZATION_LIB)
+#
+# And sets:
+#
+# HAVE_BOOST_WSERIALIZATION
+#
+# COPYLEFT
+#
+# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
+# Copyright (c) 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved.
+
+AC_DEFUN([AX_BOOST_WSERIALIZATION],
+[
+ AC_REQUIRE([AX_BOOST_BASE])
+
+ dnl depends on BOOST_SERIALIZATION
+ AC_REQUIRE([AX_BOOST_SERIALIZATION])
+ axbws_LDFLAGS_SAVED=$LDFLAGS
+ LDFLAGS="$LDFLAGS $BOOST_SERIALIZATION_LIB"
+
+ _AX_BOOST_CHECK([boost_wserialization],
+ [@%:@include <fstream>
+ @%:@include <boost/archive/text_oarchive.hpp>
+ @%:@include <boost/archive/text_iarchive.hpp>],
+ [std::ofstream ofs("filename");
+ boost::archive::text_oarchive oa(ofs);
+ return 0;])
+
+ LDFLAGS=$axbf_LDFLAGS_SAVED
+])
diff --git a/gsm-receiver/config/gr_boost.m4 b/gsm-receiver/config/gr_boost.m4
deleted file mode 100644
index 0664d36..0000000
--- a/gsm-receiver/config/gr_boost.m4
+++ /dev/null
@@ -1,111 +0,0 @@
-dnl
-dnl Copyright 2004,2005 Free Software Foundation, Inc.
-dnl
-dnl This file is part of GNU Radio
-dnl
-dnl GNU Radio is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
-dnl
-dnl GNU Radio is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with GNU Radio; see the file COPYING. If not, write to
-dnl the Free Software Foundation, Inc., 51 Franklin Street,
-dnl Boston, MA 02110-1301, USA.
-dnl
-
-dnl This tries to do the "right thing" to locate the boost include files.
-dnl If the user explicitly specified --with-boost-include-dir=<foo>
-dnl we believe them and use it. Otherwise,
-dnl
-dnl We look for boost/shared_ptr.hpp in the "normal places". That is,
-dnl wherever AC_CHECK_HEADER looks. If the boost includes are in /usr/local/include
-dnl this step will find them.
-dnl
-dnl Otherwise, we check to see if the boost stuff was installed in a version-specific
-dnl directory under /usr/local/include. These look like: /usr/local/include/boost-1_33_1
-dnl If there's more than one version installed, we select the
-dnl lexicographically greatest one.
-dnl
-dnl If none of these work, we bail.
-
-AC_DEFUN([GR_REQUIRE_BOOST_INCLUDES],
-[
- AC_LANG_PUSH(C++)
- gr_boost_include_dir=
- AC_ARG_WITH([boost-include-dir],
- AC_HELP_STRING([--with-boost-include-dir=<path>],
- [path to boost c++ include files]),
- [
- # "yes" and "no" are bogus answers
- if test x"$with_boost_include_dir" = xyes ||
- test x"$with_boost_include_dir" = xno; then
- gr_boost_include_dir=
- else
- gr_boost_include_dir=$with_boost_include_dir
- fi
- ])
- echo "gr_boost_include_dir = $gr_boost_include_dir"
- if test x$gr_boost_include_dir != x; then
- #
- # If the user specified a directory, then we use it
- #
- OLD_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$gr_boost_include_dir"
- AC_CHECK_HEADER([boost/shared_ptr.hpp],
- [BOOST_CFLAGS="-I$gr_boost_include_dir"],
- [AC_MSG_ERROR(
- [Failed to locate boost/shared_ptr.hpp.
-Try using --with-boost-include-dir=<path>,
-E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1])])
- CPPFLAGS=$OLD_CPPFLAGS
- else
- #
- # Otherwise we check in the default places
- #
- AC_CHECK_HEADER([boost/shared_ptr.hpp],
- [BOOST_CFLAGS=""],
- [ # Nope, look for latest version if any in $prefix/include/boost-*
-
- # Wipe out cached value. KLUDGE: AC should have API for this
- unset AS_TR_SH([ac_cv_header_boost/shared_ptr.hpp])
-
- boost_last_match(){
- #echo "boost_last_match: [$]*"
- pattern="[$]1"
- shift
- if test "[$]pattern" = "[$]1"
- then
- LM=''
- else
- shift `expr [$]# - 1`
- LM=[$]1
- fi
- #echo "LM(1)='[$]LM'"
- }
-
- pattern="/usr/local/include/boost-*"
- boost_last_match "$pattern" $pattern
- #echo "LM(2)='$LM'"
-
- OLD_CPPFLAGS=$CPP_FLAGS
- CPPFLAGS="$CPPFLAGS -I$LM"
- AC_CHECK_HEADER([boost/shared_ptr.hpp],
- [BOOST_CFLAGS="-I$LM"],
- [AC_MSG_ERROR(
- [Failed to locate boost/shared_ptr.hpp.
-Try using --with-boost-include-dir=<path>,
-E.g., --with-boost-include-dir=/usr/local/include/boost-1_33_1])])
- CPPFLAGS=$OLD_CPPFLAGS
- ])
-
- fi
- unset boost_last_match LM
- AC_LANG_POP
- AC_SUBST(BOOST_CFLAGS)
-])
diff --git a/gsm-receiver/config/gr_doxygen.m4 b/gsm-receiver/config/gr_doxygen.m4
index 4670c29..15ece8b 100644
--- a/gsm-receiver/config/gr_doxygen.m4
+++ b/gsm-receiver/config/gr_doxygen.m4
@@ -20,10 +20,10 @@ dnl Boston, MA 02110-1301, USA.
dnl
AC_DEFUN([GR_CHECK_DOXYGEN],[
- AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (no)])
- AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
- AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
- AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX doc generation with doxygen (no)], [], [ enable_latex_docs=no])
+ AC_ARG_ENABLE(doxygen,
+ AC_HELP_STRING([--enable-doxygen],
+ [enable documentation generation with doxygen (no)]))
+ AC_ARG_ENABLE(dot, AC_HELP_STRING([--enable-dot],[use 'dot' to generate graphs in doxygen (auto)]))
if test "x$enable_doxygen" = xyes; then
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
@@ -53,7 +53,8 @@ AC_DEFUN([GR_CHECK_DOXYGEN],[
enable_dot=yes
fi
AC_SUBST(enable_dot)
- AC_SUBST(enable_html_docs)
- AC_SUBST(enable_latex_docs)
+ AC_SUBST(enable_xml_docs, YES)
+ AC_SUBST(enable_html_docs, YES)
+ AC_SUBST(enable_latex_docs, NO)
AC_SUBST(generate_docs)
])
diff --git a/gsm-receiver/config/gr_fortran.m4 b/gsm-receiver/config/gr_fortran.m4
new file mode 100644
index 0000000..b5b0470
--- /dev/null
+++ b/gsm-receiver/config/gr_fortran.m4
@@ -0,0 +1,32 @@
+dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([GR_FORTRAN],[
+ dnl if you want to generate a different table of interpolator taps, you need fortran.
+ dnl we default to off, since almost no one wants to do this.
+ AC_ARG_ENABLE(fortran, AC_HELP_STRING([--enable-fortran],[enable fortran (no)]),
+ [], [enable_fortran=no])
+ AM_CONDITIONAL(ENABLE_FORTRAN, test "x$enable_fortran" = xyes)
+
+ if test "x$enable_fortran" = xyes
+ then
+ AC_PROG_F77
+ AC_F77_LIBRARY_LDFLAGS
+ fi
+])
diff --git a/gsm-receiver/config/gr_omnithread.m4 b/gsm-receiver/config/gr_omnithread.m4
index b5e4090..054f078 100644
--- a/gsm-receiver/config/gr_omnithread.m4
+++ b/gsm-receiver/config/gr_omnithread.m4
@@ -1,6 +1,6 @@
# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*-
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003,2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,8 +21,9 @@ AC_DEFUN([GR_OMNITHREAD],
[
# Check first for POSIX
ACX_PTHREAD(
- [ ot_posix="yes"
- AC_DEFINE(OMNITHREAD_POSIX,[1],[Define to 1 to enable pthread])
+ [ AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.])
+ ot_posix="yes"
+ DEFINES="$DEFINES -DOMNITHREAD_POSIX=1"
],[
# If no POSIX support found, then check for NT threads
AC_MSG_CHECKING([for NT threads])
@@ -34,7 +35,7 @@ AC_DEFUN([GR_OMNITHREAD],
],
[
ot_nt="yes"
- AC_DEFINE(OMNITHREAD_NT,[1],[Define to 1 to enable NT thread])
+ DEFINES="$DEFINES -DOMNITHREAD_NT=1"
],
[AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])]
)
diff --git a/gsm-receiver/config/gr_python.m4 b/gsm-receiver/config/gr_python.m4
index 5816b27..6c862bb 100644
--- a/gsm-receiver/config/gr_python.m4
+++ b/gsm-receiver/config/gr_python.m4
@@ -22,27 +22,43 @@ dnl
# PYTHON_DEVEL()
#
# Checks for Python and tries to get the include path to 'Python.h'.
-# It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) output variables.
+# It sets the $(PYTHON_CPPFLAGS), $(PYTHON_LDFLAGS) and $(pythondir) output variables,
#
AC_DEFUN([PYTHON_DEVEL],[
AC_REQUIRE([AM_PATH_PYTHON])
AC_REQUIRE([AC_CANONICAL_HOST])
- # For Fedora Core 5 and 6, see ticket:39 in Trac
- if test -f '/etc/redhat-release'; then
- if (echo $pyexecdir | grep -q lib64); then
- pythondir="$pyexecdir"
- fi
- fi
+ AC_ARG_WITH(pythondir,
+ AC_HELP_STRING([--with-pythondir=DIR],
+ [python installation directory (cross-compiling) [[default=$prefix/lib/python2.5/site-packages]]]),
+ [with_pythondir=${withval}],[with_pythondir=${prefix}/lib/python2.5/site-packages])
- # Check for Python include path
- AC_MSG_CHECKING([for Python include path])
- if test -z "$PYTHON" ; then
- AC_MSG_ERROR([cannot find Python path])
- fi
+ # if we're cross-compiling, asking the host python about any of
+ # this is completely useless...
+
+ if test x$cross_compiling != xno
+ then
+ pythondir=$with_pythondir
+ pyexecdir=$with_pythondir
+ AC_SUBST(PYTHON_CPPFLAGS)
+ AC_SUBST(PYTHON_LDFLAGS)
+ else
+
+ # For Fedora Core 5 and 6, see ticket:39 in Trac
+ if test -f '/etc/redhat-release'; then
+ if (echo $pyexecdir | grep -q lib64); then
+ pythondir="$pyexecdir"
+ fi
+ fi
- # ask distutils which include path we should use
- python_cmd='
+ # Check for Python include path
+ AC_MSG_CHECKING([for Python include path])
+ if test -z "$PYTHON" ; then
+ AC_MSG_ERROR([cannot find Python path])
+ fi
+
+ # ask distutils which include path we should use
+ python_cmd='
import distutils.sysconfig
import os
path = distutils.sysconfig.get_python_inc(plat_specific=False)
@@ -50,30 +66,30 @@ if os.sep == "\\":
path = path.replace("\\", "/")
print path
'
- python_path=`$PYTHON -c "$python_cmd"`
- AC_MSG_RESULT([$python_path])
- if test -z "$python_path" ; then
- AC_MSG_ERROR([cannot find Python include path])
- fi
+ python_path=`$PYTHON -c "$python_cmd"`
+ AC_MSG_RESULT([$python_path])
+ if test -z "$python_path" ; then
+ AC_MSG_ERROR([cannot find Python include path])
+ fi
- AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path])
+ AC_SUBST(PYTHON_CPPFLAGS,[-I$python_path])
- # Check for Python headers usability
- python_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
- AC_CHECK_HEADERS([Python.h], [],
- [AC_MSG_ERROR([cannot find usable Python headers])])
- CPPFLAGS="$python_save_CPPFLAGS"
+ # Check for Python headers usability
+ python_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+ AC_CHECK_HEADERS([Python.h], [],
+ [AC_MSG_ERROR([cannot find usable Python headers])])
+ CPPFLAGS="$python_save_CPPFLAGS"
- # Only set this on mingw and cygwin hosts, (only implemented
- # for mingw host, for crosscompiling you need to trick this)
+ # Only set this on mingw and cygwin hosts, (only implemented
+ # for mingw host, for crosscompiling you need to trick this)
- PYTHON_LDFLAGS=""
- case $host_os in
- *mingw* | *cygwin* )
- AC_MSG_CHECKING([for Python LDFLAGS])
+ PYTHON_LDFLAGS=""
+ case $host_os in
+ *mingw* | *cygwin* )
+ AC_MSG_CHECKING([for Python LDFLAGS])
- python_cmd='
+ python_cmd='
import distutils.sysconfig
import os
path = distutils.sysconfig.get_config_var("LIBPL")
@@ -82,30 +98,31 @@ if path == None:
if os.sep == "\\":
path = path.replace("\\", "/")
print path
-'
- python_stdlib_path=`$PYTHON -c "$python_cmd"`
-
- python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"`
- libpython_name="python$PYTHON_VERSION"
-
- # Standard install of python for win32 has libpython24.a
- # instead of libpython2.4.a so we check for the library
- # without the dot in the version number.
-
- python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"`
- if test -n "$python_stdlib_filename" ; then
- libpython_name="python$python_version_nodot"
- fi
-
- PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name"
- AC_MSG_RESULT($PYTHON_LDFLAGS)
- # Replace all backslashes in PYTHON Paths with forward slashes
- pythondir=`echo $pythondir |sed 's,\\\\,/,g'`
- pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'`
- pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'`
- pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'`
- ;;
- esac
-
- AC_SUBST([PYTHON_LDFLAGS])
+'
+ python_stdlib_path=`$PYTHON -c "$python_cmd"`
+
+ python_version_nodot=`echo $PYTHON_VERSION | sed "s,\.,,"`
+ libpython_name="python$PYTHON_VERSION"
+
+ # Standard install of python for win32 has libpython24.a
+ # instead of libpython2.4.a so we check for the library
+ # without the dot in the version number.
+
+ python_stdlib_filename=`find $python_stdlib_path -type f -name libpython$python_version_nodot.* -print | sed "1q"`
+ if test -n "$python_stdlib_filename" ; then
+ libpython_name="python$python_version_nodot"
+ fi
+
+ PYTHON_LDFLAGS="-L$python_stdlib_path -l$libpython_name"
+ AC_MSG_RESULT($PYTHON_LDFLAGS)
+ # Replace all backslashes in PYTHON Paths with forward slashes
+ pythondir=`echo $pythondir |sed 's,\\\\,/,g'`
+ pkgpythondir=`echo $pkgpythondir |sed 's,\\\\,/,g'`
+ pyexecdir=`echo $pyexecdir |sed 's,\\\\,/,g'`
+ pkgpyexecdir=`echo $pkgpyexecdir |sed 's,\\\\,/,g'`
+ ;;
+ esac
+
+ AC_SUBST(PYTHON_LDFLAGS)
+ fi
])
diff --git a/gsm-receiver/config/gr_scripting.m4 b/gsm-receiver/config/gr_scripting.m4
index 86870e7..e030a81 100644
--- a/gsm-receiver/config/gr_scripting.m4
+++ b/gsm-receiver/config/gr_scripting.m4
@@ -24,7 +24,7 @@ AC_DEFUN([GR_SCRIPTING],[
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_LIBTOOL])
- SWIG_PROG(1.3.23)
+ SWIG_PROG(1.3.31)
SWIG_ENABLE_CXX
SWIG_PYTHON
])
diff --git a/gsm-receiver/config/gr_set_md_cpu.m4 b/gsm-receiver/config/gr_set_md_cpu.m4
index ebc1fad..b9c570e 100644
--- a/gsm-receiver/config/gr_set_md_cpu.m4
+++ b/gsm-receiver/config/gr_set_md_cpu.m4
@@ -1,5 +1,5 @@
dnl
-dnl Copyright 2003 Free Software Foundation, Inc.
+dnl Copyright 2003,2008 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -28,17 +28,17 @@ AC_DEFUN([GR_SET_MD_CPU],[
AC_MSG_CHECKING([for machine dependent speedups])
case "$cf_with_md_cpu" in
- x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;;
- x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;;
-# sparc) MD_CPU=sparc ;;
- *) MD_CPU=generic ;;
+ x86 | i[[3-7]]86) MD_CPU=x86 MD_SUBCPU=x86 ;;
+ x86_64) MD_CPU=x86 MD_SUBCPU=x86_64 ;;
+ powerpc*) MD_CPU=powerpc ;;
+ *) MD_CPU=generic ;;
esac
AC_MSG_RESULT($MD_CPU)
AC_SUBST(MD_CPU)
AC_SUBST(MD_SUBCPU)
- AM_CONDITIONAL(MD_CPU_x86, test $MD_CPU = x86)
- AM_CONDITIONAL(MD_SUBCPU_x86_64, test $MD_SUBCPU = x86_64)
- AM_CONDITIONAL(MD_CPU_generic, test $MD_CPU = generic)
+ AM_CONDITIONAL(MD_CPU_x86, test "$MD_CPU" = "x86")
+ AM_CONDITIONAL(MD_SUBCPU_x86_64, test "$MD_SUBCPU" = "x86_64")
+ AM_CONDITIONAL(MD_CPU_powerpc, test "$MD_CPU" = "powerpc")
+ AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic")
])
-
diff --git a/gsm-receiver/config/gr_standalone.m4 b/gsm-receiver/config/gr_standalone.m4
new file mode 100644
index 0000000..44d9235
--- /dev/null
+++ b/gsm-receiver/config/gr_standalone.m4
@@ -0,0 +1,119 @@
+dnl
+dnl Copyright 2008,2009 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License along
+dnl with this program; if not, write to the Free Software Foundation, Inc.,
+dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+dnl
+
+dnl
+dnl GR_STANDALONE([package],[version])
+dnl
+dnl Handles the bulk of the configure.ac work for an out-of-tree build
+dnl
+dnl N.B., this is an m4_define because if it were an AC_DEFUN it would
+dnl get called too late to be useful.
+
+m4_define([GR_STANDALONE],
+[
+ AC_CONFIG_SRCDIR([config/gr_standalone.m4])
+ AM_CONFIG_HEADER(config.h)
+
+ AC_CANONICAL_BUILD
+ AC_CANONICAL_HOST
+ AC_CANONICAL_TARGET
+
+ AM_INIT_AUTOMAKE
+
+ dnl Remember if the user explicity set CXXFLAGS
+ if test -n "${CXXFLAGS}"; then
+ user_set_cxxflags=yes
+ fi
+
+ LF_CONFIGURE_CC
+ LF_CONFIGURE_CXX
+ GR_LIB64 dnl check for lib64 suffix after choosing compilers
+
+ dnl The three macros above are known to override CXXFLAGS if the user
+ dnl didn't specify them. Though I'm sure somebody thought this was
+ dnl a good idea, it makes it hard to use other than -g -O2 when compiling
+ dnl selected files. Thus we "undo" the damage here...
+ dnl
+ dnl If the user specified CXXFLAGS, we use them. Otherwise when compiling
+ dnl the output of swig use use -O1 if we're using g++.
+ dnl See Makefile.common for the rest of the magic.
+ if test "$user_set_cxxflags" != yes; then
+ autoconf_default_CXXFLAGS="$CXXFLAGS"
+ if test "$GXX" = yes; then
+ case "$host_cpu" in
+ powerpc*)
+ dnl "-O1" is broken on the PPC for some reason
+ dnl (at least as of g++ 4.1.1)
+ swig_CXXFLAGS="-g1 -O2 -Wno-strict-aliasing -Wno-parentheses"
+ ;;
+ *)
+ swig_CXXFLAGS="-g -O1 -Wno-strict-aliasing -Wno-parentheses"
+ ;;
+ esac
+ fi
+ fi
+ AC_SUBST(autoconf_default_CXXFLAGS)
+ AC_SUBST(swig_CXXFLAGS)
+
+ dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
+ if test x${PKG_CONFIG_PATH} = x; then
+ PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
+ else
+ PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
+ fi
+ export PKG_CONFIG_PATH
+
+ LF_SET_WARNINGS
+ GR_SET_GPROF
+ GR_SET_PROF
+ AM_PROG_AS
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+ AC_PATH_PROG([RM_PROG], [rm])
+
+ AC_LIBTOOL_WIN32_DLL
+ AC_ENABLE_SHARED dnl do build shared libraries
+ AC_DISABLE_STATIC dnl don't build static libraries
+ m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
+ dnl GR_FORTRAN
+
+ GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
+ GR_SCRIPTING dnl Locate python, SWIG, etc
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+ AC_C_INLINE
+ AC_TYPE_SIZE_T
+ AC_HEADER_TIME
+ AC_C_BIGENDIAN
+
+ dnl Check for Mingw support
+ GR_PWIN32
+
+ AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
+ AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
+
+ PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
+ LIBS="$LIBS $GNURADIO_CORE_LIBS"
+])
diff --git a/gsm-receiver/config/gr_x86_64.m4 b/gsm-receiver/config/gr_subversion.m4
index 3f56c06..849d7a9 100644
--- a/gsm-receiver/config/gr_x86_64.m4
+++ b/gsm-receiver/config/gr_subversion.m4
@@ -1,5 +1,5 @@
dnl
-dnl Copyright 2005 Free Software Foundation, Inc.
+dnl Copyright 2007 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -19,21 +19,18 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
-# GR_X86_64()
+# GR_SUBVERSION()
#
-# Checks to see if we're on a x86_64 machine, and if so, ensure
-# that libdir ends in "64"
-#
-AC_DEFUN([GR_X86_64],[
- AC_REQUIRE([AC_CANONICAL_HOST])
- if test "$host_cpu" = "x86_64"; then
- AC_MSG_CHECKING([libdir for lib64 suffix])
- t=${libdir##*/lib}
- if test "$t" != 64 && test -d /lib64 && ! test -L /lib64; then
- libdir=${libdir}64
- AC_MSG_RESULT([no. Setting libdir to $libdir])
- else
- AC_MSG_RESULT([yes])
- fi
- fi
+# Test for presence of subversion, and create variables for
+# current repository version and last changed date.
+
+AC_DEFUN([GR_SUBVERSION],[
+ AC_PATH_PROG([SVN],[svn])
+ if test "$SVN" != "" -a -d .svn ; then
+ SVNVERSION=`$SVN info . | grep '^Revision' | cut -f 2- -d ' '`
+ SVNDATE=`$SVN info . | grep 'Last Changed Date' | cut -f 4-6 -d ' '`
+ fi
+
+ AC_SUBST(SVNVERSION)
+ AC_SUBST(SVNDATE)
])
diff --git a/gsm-receiver/config/lf_cc.m4 b/gsm-receiver/config/lf_cc.m4
index b9d1c9c..b75e1a4 100644
--- a/gsm-receiver/config/lf_cc.m4
+++ b/gsm-receiver/config/lf_cc.m4
@@ -36,7 +36,6 @@ AC_DEFUN([LF_CONFIGURE_CC],[
AC_REQUIRE([AC_PROG_CPP])dnl
AC_REQUIRE([AC_AIX])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_MINIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
])
diff --git a/gsm-receiver/config/lf_cxx.m4 b/gsm-receiver/config/lf_cxx.m4
index c581c9b..dfc6bfb 100644
--- a/gsm-receiver/config/lf_cxx.m4
+++ b/gsm-receiver/config/lf_cxx.m4
@@ -37,11 +37,6 @@ AC_DEFUN([LF_CONFIGURE_CXX],[
# -----------------------------------------------------------------------
# This macro tests the C++ compiler for various portability problem.
-# 1. Defines CXX_HAS_NO_BOOL if the compiler does not support the bool
-# data type
-# 2. Defines CXX_HAS_BUGGY_FOR_LOOPS if the compiler has buggy
-# scoping for the for-loop
-# 3. Defines USE_ASSERT if the user wants to use assertions
# -----------------------------------------------------------------------
@@ -56,32 +51,6 @@ AC_DEFUN([LF_CXX_PORTABILITY],[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
- dnl Check whether we have bool
- AC_MSG_CHECKING(whether C++ has bool)
- AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
- [ AC_MSG_RESULT(yes) ],
- [ AC_MSG_RESULT(no)
- AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool type]) ],
- [ AC_MSG_WARN(Don't cross-compile)]
- )
-
- dnl Test whether C++ has buggy for-loops
- AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops)
- AC_TRY_COMPILE([#include <iostream.h>], [
- for (int i=0;i<10;i++) { }
- for (int i=0;i<10;i++) { }
-], [ AC_MSG_RESULT(no) ],
- [ AC_MSG_RESULT(yes)
- AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is broken]) ])
-
- dnl Test whether the user wants to enable assertions
- AC_MSG_CHECKING(whether user wants assertions)
- AC_ARG_ENABLE(assert,
- [ --disable-assert don't use cpp.h assert],
- [ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't doit!)])
- AC_MSG_RESULT(no) ],
- [ AC_MSG_RESULT(yes) ],
- )
dnl Test whether C++ has std::isnan
AC_MSG_CHECKING(whether C++ has std::isnan)
@@ -96,26 +65,3 @@ AC_DEFUN([LF_CXX_PORTABILITY],[
AC_LANG_RESTORE
])
-AH_BOTTOM([// Workaround for compilers with buggy for-loop scoping
-// That's quite a few compilers actually including recent versions of
-// Dec Alpha cxx, HP-UX CC and SGI CC.
-// The trivial "if" statement provides the correct scoping to the
-// for loop
-
-#ifdef CXX_HAS_BUGGY_FOR_LOOPS
-#undef for
-#define for if(1) for
-#endif
-])
-
-AH_BOTTOM([// If the C++ compiler we use doesn't have bool, then
-// the following is a near-perfect work-around.
-// You must make sure your code does not depend on "int" and "bool"
-// being two different types, in overloading for instance.
-
-#ifdef CXX_HAS_NO_BOOL
-#define bool int
-#define true 1
-#define false 0
-#endif
-])
diff --git a/gsm-receiver/config/pkg.m4 b/gsm-receiver/config/pkg.m4
index 770f062..80bdfed 100644
--- a/gsm-receiver/config/pkg.m4
+++ b/gsm-receiver/config/pkg.m4
@@ -1,68 +1,188 @@
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN([PKG_CHECK_MODULES], [
- succeeded=no
-
- if test -z "$PKG_CONFIG"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
- fi
-
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- dnl If PKG_CONFIG_PATH is not already set, add /usr/local/lib/pkgconfig.
- dnl If it's set, assume the user knows what they're doing.
- dnl This should help avoid failures while looking for fftw3f
- if test -z "$PKG_CONFIG_PATH"; then
- export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
- fi
-
- PKG_CONFIG_MIN_VERSION=0.9.0
- if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
- AC_MSG_CHECKING(for $2)
-
- if $PKG_CONFIG --exists "$2" ; then
- AC_MSG_RESULT(yes)
- succeeded=yes
-
- AC_MSG_CHECKING($1_CFLAGS)
- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
- AC_MSG_RESULT($$1_CFLAGS)
-
- AC_MSG_CHECKING($1_LIBS)
- $1_LIBS=`$PKG_CONFIG --libs "$2"`
- AC_MSG_RESULT($$1_LIBS)
-
- AC_MSG_CHECKING($1_INCLUDEDIR)
- $1_INCLUDEDIR=`$PKG_CONFIG --variable=includedir "$2"`
- AC_MSG_RESULT($$1_INCLUDEDIR)
- else
- $1_CFLAGS=""
- $1_LIBS=""
- ## If we have a custom action on failure, don't print errors, but
- ## do set a variable so people can do so.
- $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
- ifelse([$4], ,echo $$1_PKG_ERRORS,)
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+# Copyright © 2008 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.18])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+# E.g.,
+# PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+# defines:
+#
+# GSTUFF_LIBS
+# GSTUFF_CFLAGS
+# GSTUFF_INCLUDEDIR
+# GSTUFF_CPPFLAGS # the -I, -D and -U's out of CFLAGS
+#
+# see pkg-config man page also defines GSTUFF_PKG_ERRORS on error
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_INCLUDEDIR], [includedir for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+
+if test x$cross_compiling = xyes
+then
+ _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2])
+else
+ _PKG_CONFIG([$1][_LIBS], [libs --static], [$2])
+fi
+
+_PKG_CONFIG([$1][_INCLUDEDIR], [variable=includedir], [$2])
+
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
- AC_SUBST($1_CFLAGS)
- AC_SUBST($1_LIBS)
- AC_SUBST($1_INCLUDEDIR)
- else
- echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
- echo "*** See http://www.freedesktop.org/software/pkgconfig"
- fi
- fi
+_PKG_TEXT
- if test $succeeded = yes; then
- ifelse([$3], , :, [$3])
- else
- ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
- fi
-])
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ $1[]_INCLUDEDIR=$pkg_cv_[]$1[]_INCLUDEDIR
+ $1[]_CPPFLAGS=""
+ for flag in $$1[]_CFLAGS; do
+ case $flag in
+ -I* | -D* | -U*) $1[]_CPPFLAGS="$$1[]_CPPFLAGS $flag" ;;
+ esac
+ done
+ pkg_cv_[]$1[]_CPPFLAGS=$$1[]_CPPFLAGS
+ AC_SUBST($1[]_CPPFLAGS)
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
diff --git a/gsm-receiver/config/usrp_fusb_tech.m4 b/gsm-receiver/config/usrp_fusb_tech.m4
index b5a930b..db85724 100644
--- a/gsm-receiver/config/usrp_fusb_tech.m4
+++ b/gsm-receiver/config/usrp_fusb_tech.m4
@@ -1,5 +1,5 @@
dnl
-dnl Copyright 2003 Free Software Foundation, Inc.
+dnl Copyright 2003,2008 Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Radio
dnl
@@ -19,38 +19,56 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
-AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_ARG_WITH(fusb-tech,
- [ --with-fusb-tech=OS set fast usb technique (auto)],
- [cf_with_fusb_tech="$withval"],
- [cf_with_fusb_tech="$host_os"])
-
-
- AC_CHECK_HEADER([linux/usbdevice_fs.h],
- [x_have_usbdevice_fs_h=yes],
- [x_have_usbdevice_fs_h=no])
-
- AC_MSG_CHECKING([for fast usb technique to use])
- case "$cf_with_fusb_tech" in
- linux*) if test x${x_have_usbdevice_fs_h} = xyes;
- then
- FUSB_TECH=linux
- else
- FUSB_TECH=generic
- fi ;;
+# $1 is $enable_usrp:
+# yes : do these tests
+# no : do not do these tests
+# "" : do these tests
- darwin*) FUSB_TECH=darwin ;;
- cygwin*|win*|mingw*) FUSB_TECH=win32 ;;
- *) FUSB_TECH=generic ;;
- esac
+AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
+ AC_ARG_WITH([fusb-tech],
+ AC_HELP_STRING([--with-fusb-tech=OS],
+ [Set fast USB technique (default=auto)]),
+ [cf_with_fusb_tech="$withval"],
+ [cf_with_fusb_tech="$host_os"])
+ if test [x]$1 != xno; then
+ case "$cf_with_fusb_tech" in
+ linux*)
+ AC_CHECK_HEADER([linux/usbdevice_fs.h],
+ [x_have_usbdevice_fs_h=yes],
+ [x_have_usbdevice_fs_h=no])
+ if test x${x_have_usbdevice_fs_h} = xyes; then
+ FUSB_TECH=linux
+ else
+ FUSB_TECH=generic
+ fi
+ ;;
+ darwin*)
+ FUSB_TECH=darwin
+ ;;
+ cygwin*|win*|mingw*)
+ FUSB_TECH=win32
+ ;;
+ *bsd*)
+ AC_MSG_CHECKING([for RA/WB])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dev/usb/usb.h>]],
+ [[struct usb_bulk_ra_wb_opt o;
+ ioctl(0, USB_SET_BULK_RA, &o);]])],
+ [FUSB_TECH=ra_wb],
+ [FUSB_TECH=generic])
+ ;;
+ *)
+ FUSB_TECH=generic
+ ;;
+ esac
- AC_MSG_RESULT($FUSB_TECH)
- AC_SUBST(FUSB_TECH)
+ AC_MSG_CHECKING([for fast usb technique to use])
+ AC_MSG_RESULT($FUSB_TECH)
+ AC_SUBST(FUSB_TECH)
+ fi
- AM_CONDITIONAL(FUSB_TECH_darwin, test $FUSB_TECH = darwin)
- AM_CONDITIONAL(FUSB_TECH_win32, test $FUSB_TECH = win32)
- AM_CONDITIONAL(FUSB_TECH_generic, test $FUSB_TECH = generic)
- AM_CONDITIONAL(FUSB_TECH_linux, test $FUSB_TECH = linux)
+ AM_CONDITIONAL(FUSB_TECH_darwin, test x$FUSB_TECH = xdarwin)
+ AM_CONDITIONAL(FUSB_TECH_win32, test x$FUSB_TECH = xwin32)
+ AM_CONDITIONAL(FUSB_TECH_generic, test x$FUSB_TECH = xgeneric)
+ AM_CONDITIONAL(FUSB_TECH_linux, test x$FUSB_TECH = xlinux)
+ AM_CONDITIONAL(FUSB_TECH_ra_wb, test x$FUSB_TECH = xra_wb)
])
-
diff --git a/gsm-receiver/config/usrp_libusb.m4 b/gsm-receiver/config/usrp_libusb.m4
index 9fe4753..cb3130c 100644
--- a/gsm-receiver/config/usrp_libusb.m4
+++ b/gsm-receiver/config/usrp_libusb.m4
@@ -1,43 +1,48 @@
-# Check for libusb support. -*- Autoconf -*-
-
-# Copyright 2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Boston, MA
-# 02110-1301, USA.
-
-AC_DEFUN([USRP_LIBUSB],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_LANG_PUSH(C)
+dnl Copyright 2003,2008 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU Radio
+dnl
+dnl GNU Radio is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 3, or (at your option)
+dnl any later version.
+dnl
+dnl GNU Radio is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with GNU Radio; see the file COPYING. If not, write to
+dnl the Free Software Foundation, Inc., 51 Franklin Street,
+dnl Boston, MA 02110-1301, USA.
+
+AC_DEFUN([USRP_LIBUSB], [
+ libusbok=yes
+ PKG_CHECK_MODULES(USB, libusb, [], [
+ AC_LANG_PUSH(C)
+
+ AC_CHECK_HEADERS([usb.h], [], [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb.h not found. See http://libusb.sf.net])])
+
+ save_LIBS="$LIBS"
+ case "$host_os" in
+ darwin*)
+ LIBS="$LIBS -lIOKit"
+ ;;
+ *) ;;
+ esac
- AC_CHECK_HEADERS([usb.h],
- [],
- [ AC_MSG_ERROR([USRP requires libusb. usb.h not found, stop. See http://libusb.sf.net]) ]
- )
+ AC_SEARCH_LIBS(usb_bulk_write, [usb], [USB_LIBS="$LIBS"], [libusbok=no; AC_MSG_RESULT([USRP requires libusb. usb_bulk_write not found. See http://libusb.sf.net])])
- save_LIBS="$LIBS"
- case "$host_os" in
- darwin*) LIBS="$LIBS -lIOKit" ;;
- *) ;;
- esac
- AC_SEARCH_LIBS(usb_bulk_write, [usb],
- [ USB_LIBS="$LIBS" ],
- [ AC_MSG_ERROR([USRP requires libusb. usb_bulk_write not found, stop. See http://libusb.sf.net]) ]
- )
LIBS="$save_LIBS"
- AC_LANG_POP
- AC_SUBST(USB_LIBS)
+ AC_LANG_POP
+ ])
+
+ if test x$libusbok = xyes; then
+ AC_SUBST(USB_LIBS)
+ ifelse([$1], , :, [$1])
+ else
+ ifelse([$2], , :, [$2])
+ fi
])
diff --git a/gsm-receiver/config/usrp_sdcc.m4 b/gsm-receiver/config/usrp_sdcc.m4
index 37ce7c3..86f6429 100644
--- a/gsm-receiver/config/usrp_sdcc.m4
+++ b/gsm-receiver/config/usrp_sdcc.m4
@@ -19,49 +19,57 @@
AC_DEFUN([USRP_SDCC],
[
+ sdccok=yes
AC_CHECK_PROG(XCC, sdcc, sdcc -mmcs51 --no-xinit-opt,no)
AC_CHECK_PROG(XAS, asx8051, asx8051 -plosgff,no)
if test "$XCC" = "no" -o "$XAS" = "no" ; then
- AC_MSG_ERROR([USRP requires sdcc. sdcc not found, stop. See http://sdcc.sf.net])
- fi
+ AC_MSG_RESULT([USRP requires sdcc. sdcc not found. See http://sdcc.sf.net])
+ sdccok=no
+ else
+ sdcc_version_min=$1
- sdcc_version_min=$1
+ sdcc_version=`sdcc --version 2>&1 | \
+ sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'`
- sdcc_version=`sdcc --version 2>&1 | \
- sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'`
+ AC_MSG_CHECKING([sdcc_version "$sdcc_version"])
- AC_MSG_CHECKING([sdcc_version "$sdcc_version"])
+ sdcc_major_version=`echo $sdcc_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ sdcc_minor_version=`echo $sdcc_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ sdcc_micro_version=`echo $sdcc_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- sdcc_major_version=`echo $sdcc_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- sdcc_minor_version=`echo $sdcc_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- sdcc_micro_version=`echo $sdcc_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ sdcc_major_min=`echo $sdcc_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ sdcc_minor_min=`echo $sdcc_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ sdcc_micro_min=`echo $sdcc_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- sdcc_major_min=`echo $sdcc_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- sdcc_minor_min=`echo $sdcc_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- sdcc_micro_min=`echo $sdcc_version_min | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ sdcc_version_proper=`expr \
+ "$sdcc_major_version" \> "$sdcc_major_min" \| \
+ "$sdcc_major_version" \= "$sdcc_major_min" \& \
+ "$sdcc_minor_version" \> "$sdcc_minor_min" \| \
+ "$sdcc_major_version" \= "$sdcc_major_min" \& \
+ "$sdcc_minor_version" \= "$sdcc_minor_min" \& \
+ "$sdcc_micro_version" \>= "$sdcc_micro_min" `
- sdcc_version_proper=`expr \
- "$sdcc_major_version" \> "$sdcc_major_min" \| \
- "$sdcc_major_version" \= "$sdcc_major_min" \& \
- "$sdcc_minor_version" \> "$sdcc_minor_min" \| \
- "$sdcc_major_version" \= "$sdcc_major_min" \& \
- "$sdcc_minor_version" \= "$sdcc_minor_min" \& \
- "$sdcc_micro_version" \>= "$sdcc_micro_min" `
+ if test "$sdcc_version_proper" = "1" ; then
+ AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version])
+ else
+ sdccok=no
+ AC_MSG_RESULT([USRP requires sdcc >= $sdcc_version_min. sdcc not found. See http://sdcc.sf.net])
+ fi
- if test "$sdcc_version_proper" = "1" ; then
- AC_MSG_RESULT([$sdcc_major_version.$sdcc_minor_version.$sdcc_micro_version])
- else
- AC_MSG_ERROR([USRP requires sdcc >= $sdcc_version_min. sdcc not found, stop. See http://sdcc.sf.net])
+ AC_SUBST(XCC)
+ AC_SUBST(XAS)
fi
- AC_SUBST(XCC)
- AC_SUBST(XAS)
-
+ if test $sdccok = yes; then
+ ifelse([$2], , :, [$2])
+ else
+ ifelse([$3], , :, [$3])
+ fi
])
diff --git a/gsm-receiver/configure.ac b/gsm-receiver/configure.ac
index 0c4cb7a..a9199f8 100644
--- a/gsm-receiver/configure.ac
+++ b/gsm-receiver/configure.ac
@@ -19,85 +19,12 @@ dnl the Free Software Foundation, Inc., 51 Franklin Street,
dnl Boston, MA 02110-1301, USA.
dnl
-AC_INIT
-AC_PREREQ(2.61)
-AC_CONFIG_SRCDIR([src/lib/gsm.i])
-AM_CONFIG_HEADER(config.h)
-AC_CANONICAL_TARGET([])
+AC_INIT(gsm-receiver,0.0.3)
+AC_PREREQ(2.57)
AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE(gsm-receiver,0.0.2)
-AC_CONFIG_MACRO_DIR([config])
-GR_X86_64
-dnl LF_CONFIGURE_CC
-LF_CONFIGURE_CXX
-LF_SET_WARNINGS
-
-dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
-if test x${PKG_CONFIG_PATH} = x; then
- PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
-else
- PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
-fi
-export PKG_CONFIG_PATH
-
-
-GR_SET_GPROF
-GR_SET_PROF
-AM_PROG_AS
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-AC_PROG_INSTALL
-AC_PATH_PROG([RM_PROG], [rm])
-
-AC_LIBTOOL_WIN32_DLL
-AC_ENABLE_SHARED dnl do build shared libraries
-AC_DISABLE_STATIC dnl don't build static libraries
-m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
-dnl Locate python, SWIG, etc
-GR_NO_UNDEFINED
-GR_SCRIPTING
-
-dnl Checks for libraries.
-
-dnl check for threads (mandatory)
-GR_OMNITHREAD
-
-CFLAGS="${CFLAGS} $PTHREAD_CFLAGS"
-CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS"
-
-if test "x$CXX_FOR_BUILD" = x
-then
- CXX_FOR_BUILD=${CXX}
-fi
-AC_SUBST(CXX_FOR_BUILD)
-
-dnl Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h)
-AC_CHECK_HEADERS(sys/mman.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-
-dnl Checks for library functions.
-AC_CHECK_FUNCS([])
-
-dnl Check for Mingw support
-GR_PWIN32
-
-PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
-dnl LIBS="$LIBS $GNURADIO_CORE_LIBS"
-
-dnl Define where to find boost includes
-GR_REQUIRE_BOOST_INCLUDES
-
-STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS"
-AC_SUBST(STD_DEFINES_AND_INCLUDES)
+m4_include([config/gr_standalone.m4])
+GR_STANDALONE
dnl Check for libosmocore (gsmtap support)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.13)
@@ -108,8 +35,8 @@ AC_CONFIG_FILES([\
src/Makefile \
src/lib/Makefile \
src/lib/decoder/Makefile \
- src/python/Makefile \
src/lib/decoder/openbtsstuff/Makefile \
+ src/python/Makefile \
gsm-receiver.pc \
])
dnl # doc/Makefile \
diff --git a/gsm-receiver/py-compile b/gsm-receiver/py-compile
index d6e900b..3f9d05b 100755
--- a/gsm-receiver/py-compile
+++ b/gsm-receiver/py-compile
@@ -1,9 +1,10 @@
#!/bin/sh
# py-compile - Compile a Python program
-scriptversion=2005-05-14.22
+scriptversion=2009-04-28.21; # UTC
-# Copyright (C) 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 Free Software
+# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,9 +17,7 @@ scriptversion=2005-05-14.22
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -103,38 +102,38 @@ else
fi
$PYTHON -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
files = '''$files'''
-print 'Byte-compiling python modules...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
- continue
- print file,
+ continue
+ sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
+sys.stdout.write('\n')" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
$pathtrans
$filetrans
if not os.path.exists(filepath) or not (len(filepath) >= 3
and filepath[-3:] == '.py'):
- continue
- print file,
+ continue
+ sys.stdout.write(file)
sys.stdout.flush()
py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
+sys.stdout.write('\n')" 2>/dev/null || :
# Local Variables:
# mode: shell-script
@@ -142,5 +141,6 @@ print" 2>/dev/null || :
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/gsm-receiver/src/lib/Makefile.am b/gsm-receiver/src/lib/Makefile.am
index 71ea8fe..a4aa2a6 100644
--- a/gsm-receiver/src/lib/Makefile.am
+++ b/gsm-receiver/src/lib/Makefile.am
@@ -1,5 +1,5 @@
#
-# Copyright 2004,2005,2006,2008 Free Software Foundation, Inc.
+# Copyright 2004,2005,2006,2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -21,90 +21,30 @@
include $(top_srcdir)/Makefile.common
-SUBDIRS = decoder
-# Install this stuff so that it ends up as the gnuradio.howto module
-# This usually ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-
-ourpythondir = $(grpythondir)
-ourlibdir = $(grpyexecdir)
-
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-# -I$(OPEN_BTS_INCLUDES)
-
-SWIGPYTHONARGS = $(SWIGPYTHONFLAGS) $(SWIGGRFLAGS) $(WITH_SWIG_INCLUDES) \
- $(WITH_INCLUDES)
-
-ALL_IFILES = \
- $(LOCAL_IFILES) \
- $(NON_LOCAL_IFILES)
-
-NON_LOCAL_IFILES = \
- $(GNURADIO_CORE_INCLUDEDIR)/swig/gnuradio.i
-
-
-LOCAL_IFILES = \
- $(top_srcdir)/src/lib/gsm.i
-
-# These files are built by SWIG. The first is the C++ glue.
-# The second is the python wrapper that loads the _howto shared library
-# and knows how to call our extensions.
-
-BUILT_SOURCES = \
- gsm.cc \
- gsm.py
+grinclude_HEADERS = \
+ gsm_receiver_cf.h \
+ gsm_receiver_config.h \
+ viterbi_detector.h
-# This gets howto.py installed in the right place
-ourpython_PYTHON = \
- gsm.py
+SUBDIRS = decoder
-ourlib_LTLIBRARIES = _gsm.la
+TOP_SWIG_IFILES = \
+ gsm.i
-lib_LTLIBRARIES = libgsmdemod.la
+gsm_pythondir_category = \
+ gnuradio
-# These are the source files that go into the shared library
-_gsm_la_SOURCES = \
- gsm.cc
-
-libgsmdemod_la_SOURCES = \
- gsm_receiver_cf.cc \
- gsm_receiver_config.cc \
+gsm_la_swig_sources = \
+ gsm_receiver_cf.cc \
+ gsm_receiver_config.cc \
viterbi_detector.cc
-# magic flags
-_gsm_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
-
-# link the library against some comon swig runtime code and the
-# c++ standard library
-_gsm_la_LIBADD = \
- $(PYTHON_LDFLAGS) \
- libgsmdemod.la \
+gsm_la_swig_libadd = \
$(LIBOSMOCORE_LIBS) \
- -lstdc++ \
- $(DECODER_LA)
-
-#libgsmdemod_la_LIBADD =
-
-gsm.cc gsm.py: $(LOCAL_IFILES) $(ALL_IFILES)
- $(SWIG) $(SWIGPYTHONARGS) -module gsm -o gsm.cc $(LOCAL_IFILES)
-
-# These headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- gsm_receiver_cf.h \
- gsm_receiver_config.h
-
-noinst_HEADERS = \
- gsm_constants.h \
- viterbi_detector.h
-
-# These swig headers get installed in ${prefix}/include/gnuradio/swig
-swiginclude_HEADERS = \
- $(LOCAL_IFILES)
+ decoder/libdecoder.la
+include $(top_srcdir)/Makefile.swig
-MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc
+BUILT_SOURECS = $(swig_built_sources)
-# Don't distribute output of swig
-dist-hook:
- @for file in $(BUILT_SOURCES); do echo $(RM) $(distdir)/$$file; done
- @for file in $(BUILT_SOURCES); do $(RM) $(distdir)/$$file; done
+no_dist_file = $(swig_built_sources)
diff --git a/gsm-receiver/src/lib/Makefile.swig.gen b/gsm-receiver/src/lib/Makefile.swig.gen
new file mode 100644
index 0000000..20074ef
--- /dev/null
+++ b/gsm-receiver/src/lib/Makefile.swig.gen
@@ -0,0 +1,258 @@
+# -*- Makefile -*-
+#
+# Copyright 2009 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+# Makefile.swig.gen for gsm.i
+
+## Default install locations for these files:
+##
+## Default location for the Python directory is:
+## ${prefix}/lib/python${python_version}/site-packages/[category]/gsm
+## Default location for the Python exec directory is:
+## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gsm
+##
+## The following can be overloaded to change the install location, but
+## this has to be done in the including Makefile.am -before-
+## Makefile.swig is included.
+
+gsm_pythondir_category ?= gnuradio/gsm
+gsm_pylibdir_category ?= $(gsm_pythondir_category)
+gsm_pythondir = $(pythondir)/$(gsm_pythondir_category)
+gsm_pylibdir = $(pyexecdir)/$(gsm_pylibdir_category)
+
+## SWIG headers are always installed into the same directory.
+
+gsm_swigincludedir = $(swigincludedir)
+
+## This is a template file for a "generated" Makefile addition (in
+## this case, "Makefile.swig.gen"). By including the top-level
+## Makefile.swig, this file will be used to generate the SWIG
+## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
+## SWIG .i files to generated wrappings for; there can be more than 1
+## so long as the names are unique (no sorting is done on the
+## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
+## file will generate .cc, .py, and possibly .h files -- meaning that
+## all of these files will have the same base name (that provided for
+## the SWIG .i file).
+##
+## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
+## right thing. For more info, see <
+## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
+
+## Stamps used to ensure parallel make does the right thing. These
+## are removed by "make clean", but otherwise unused except during the
+## parallel built. These will not be included in a tarball, because
+## the SWIG-generated files will be removed from the distribution.
+
+STAMPS += $(DEPDIR)/gsm-generate-*
+
+## Other cleaned files: dependency files generated by SWIG or this Makefile
+
+MOSTLYCLEANFILES += $(DEPDIR)/*.S*
+
+## Add the .py and .cc files to the list of SWIG built sources. The
+## .h file is sometimes built, but not always ... so that one has to
+## be added manually by the including Makefile.am .
+
+swig_built_sources += gsm.py gsm.cc
+
+## Various SWIG variables. These can be overloaded in the including
+## Makefile.am by setting the variable value there, then including
+## Makefile.swig .
+
+gsm_swiginclude_HEADERS = \
+ gsm.i \
+ $(gsm_swiginclude_headers)
+
+gsm_pylib_LTLIBRARIES = \
+ _gsm.la
+
+_gsm_la_SOURCES = \
+ gsm.cc \
+ $(gsm_la_swig_sources)
+
+_gsm_la_LIBADD = \
+ $(STD_SWIG_LA_LIB_ADD) \
+ $(gsm_la_swig_libadd)
+
+_gsm_la_LDFLAGS = \
+ $(STD_SWIG_LA_LD_FLAGS) \
+ $(gsm_la_swig_ldflags)
+
+_gsm_la_CXXFLAGS = \
+ $(STD_SWIG_CXX_FLAGS) \
+ $(gsm_la_swig_cxxflags)
+
+gsm_python_PYTHON = \
+ gsm.py \
+ $(gsm_python)
+
+## Entry rule for running SWIG
+
+gsm.h gsm.py gsm.cc: gsm.i
+## This rule will get called only when MAKE decides that one of the
+## targets needs to be created or re-created, because:
+##
+## * The .i file is newer than any or all of the generated files;
+##
+## * Any or all of the .cc, .h, or .py files does not exist and is
+## needed (in the case this file is not needed, the rule for it is
+## ignored); or
+##
+## * Some SWIG-based dependecy of the .cc file isn't met and hence the
+## .cc file needs be be regenerated. Explanation: Because MAKE
+## knows how to handle dependencies for .cc files (regardless of
+## their name or extension), then the .cc file is used as a target
+## instead of the .i file -- but with the dependencies of the .i
+## file. It is this last reason why the line:
+##
+## if test -f $@; then :; else
+##
+## cannot be used in this case: If a .i file dependecy is not met,
+## then the .cc file needs to be rebuilt. But if the stamp is newer
+## than the .cc file, and the .cc file exists, then in the original
+## version (with the 'test' above) the internal MAKE call will not
+## be issued and hence the .cc file will not be rebuilt.
+##
+## Once execution gets to here, it should always proceed no matter the
+## state of a stamp (as discussed in link above). The
+## $(DEPDIR)/gsm-generate stuff is used to allow for parallel
+## builds to "do the right thing". The stamp has no relationship with
+## either the target files or dependency file; it is used solely for
+## the protection of multiple builds during a given call to MAKE.
+##
+## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM
+## (15). At a caught signal, the quoted command will be issued before
+## exiting. In this case, remove any stamp, whether temporary of not.
+## The trap is valid until the process exits; the process includes all
+## commands appended via "\"s.
+##
+ trap 'rm -rf $(DEPDIR)/gsm-generate-*' 1 2 13 15; \
+##
+## Create a temporary directory, which acts as a lock. The first
+## process to create the directory will succeed and issue the MAKE
+## command to do the actual work, while all subsequent processes will
+## fail -- leading them to wait for the first process to finish.
+##
+ if mkdir $(DEPDIR)/gsm-generate-lock 2>/dev/null; then \
+##
+## This code is being executed by the first process to succeed in
+## creating the directory lock.
+##
+## Remove the stamp associated with this filename.
+##
+ rm -f $(DEPDIR)/gsm-generate-stamp; \
+##
+## Tell MAKE to run the rule for creating this stamp.
+##
+ $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/gsm-generate-stamp WHAT=$<; \
+##
+## Now that the .cc, .h, and .py files have been (re)created from the
+## .i file, future checking of this rule during the same MAKE
+## execution will come back that the rule doesn't need to be executed
+## because none of the conditions mentioned at the start of this rule
+## will be positive. Remove the the directory lock, which frees up
+## any waiting process(es) to continue.
+##
+ rmdir $(DEPDIR)/gsm-generate-lock; \
+ else \
+##
+## This code is being executed by any follower processes while the
+## directory lock is in place.
+##
+## Wait until the first process is done, testing once per second.
+##
+ while test -d $(DEPDIR)/gsm-generate-lock; do \
+ sleep 1; \
+ done; \
+##
+## Succeed if and only if the first process succeeded; exit this
+## process returning the status of the generated stamp.
+##
+ test -f $(DEPDIR)/gsm-generate-stamp; \
+ exit $$?; \
+ fi;
+
+$(DEPDIR)/gsm-generate-stamp:
+## This rule will be called only by the first process issuing the
+## above rule to succeed in creating the lock directory, after
+## removing the actual stamp file in order to guarantee that MAKE will
+## execute this rule.
+##
+## Call SWIG to generate the various output files; special
+## post-processing on 'mingw32' host OS for the dependency file.
+##
+ if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(gsm_swig_args) \
+ -MD -MF $(DEPDIR)/gsm.Std \
+ -module gsm -o gsm.cc $(WHAT); then \
+ if test $(host_os) = mingw32; then \
+ $(RM) $(DEPDIR)/gsm.Sd; \
+ $(SED) 's,\\\\,/,g' < $(DEPDIR)/gsm.Std \
+ > $(DEPDIR)/gsm.Sd; \
+ $(RM) $(DEPDIR)/gsm.Std; \
+ $(MV) $(DEPDIR)/gsm.Sd $(DEPDIR)/gsm.Std; \
+ fi; \
+ else \
+ $(RM) $(DEPDIR)/gsm.S*; exit 1; \
+ fi;
+##
+## Mess with the SWIG output .Std dependency file, to create a
+## dependecy file valid for the input .i file: Basically, simulate the
+## dependency file created for libraries by GNU's libtool for C++,
+## where all of the dependencies for the target are first listed, then
+## each individual dependency is listed as a target with no further
+## dependencies.
+##
+## (1) remove the current dependency file
+##
+ $(RM) $(DEPDIR)/gsm.d
+##
+## (2) Copy the whole SWIG file:
+##
+ cp $(DEPDIR)/gsm.Std $(DEPDIR)/gsm.d
+##
+## (3) all a carriage return to the end of the dependency file.
+##
+ echo "" >> $(DEPDIR)/gsm.d
+##
+## (4) from the SWIG file, remove the first line (the target); remove
+## trailing " \" and " " from each line. Append ":" to each line,
+## followed by 2 carriage returns, then append this to the end of
+## the dependency file.
+##
+ $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/gsm.Std | \
+ awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/gsm.d
+##
+## (5) remove the SWIG-generated file
+##
+ $(RM) $(DEPDIR)/gsm.Std
+##
+## Create the stamp for this filename generation, to signal success in
+## executing this rule; allows other threads waiting on this process
+## to continue.
+##
+ touch $(DEPDIR)/gsm-generate-stamp
+
+# KLUDGE: Force runtime include of a SWIG dependency file. This is
+# not guaranteed to be portable, but will probably work. If it works,
+# we have accurate dependencies for our swig stuff, which is good.
+
+@am__include@ @am__quote@./$(DEPDIR)/gsm.d@am__quote@
diff --git a/gsm-receiver/src/lib/decoder/Makefile.am b/gsm-receiver/src/lib/decoder/Makefile.am
index 9582109..d6b9632 100644
--- a/gsm-receiver/src/lib/decoder/Makefile.am
+++ b/gsm-receiver/src/lib/decoder/Makefile.am
@@ -21,8 +21,6 @@
include $(top_srcdir)/Makefile.common
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
-
SUBDIRS = openbtsstuff
noinst_LTLIBRARIES = libdecoder.la
diff --git a/gsm-receiver/src/lib/decoder/a5-1-2.h b/gsm-receiver/src/lib/decoder/a5-1-2.h
index de764ee..38b2d25 100644
--- a/gsm-receiver/src/lib/decoder/a5-1-2.h
+++ b/gsm-receiver/src/lib/decoder/a5-1-2.h
@@ -110,6 +110,8 @@
*
*/
+#ifndef A5_1_2_H
+#define A5_1_2_H
#include <stdio.h>
@@ -451,3 +453,4 @@ void test() {
}
}
+#endif /* A5_1_2_H */
diff --git a/gsm-receiver/src/lib/decoder/gsmstack.c b/gsm-receiver/src/lib/decoder/gsmstack.c
index 3d09c13..73d9028 100644
--- a/gsm-receiver/src/lib/decoder/gsmstack.c
+++ b/gsm-receiver/src/lib/decoder/gsmstack.c
@@ -18,9 +18,9 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <osmocore/msgb.h>
-#include <osmocore/gsmtap.h>
-#include <osmocore/gsmtap_util.h>
+#include <osmocom/core/msgb.h>
+#include <osmocom/core/gsmtap.h>
+#include <osmocom/core/gsmtap_util.h>
static const int USEFUL_BITS = 142;
diff --git a/gsm-receiver/src/lib/decoder/openbtsstuff/Makefile.am b/gsm-receiver/src/lib/decoder/openbtsstuff/Makefile.am
index 1b0433c..e71634e 100644
--- a/gsm-receiver/src/lib/decoder/openbtsstuff/Makefile.am
+++ b/gsm-receiver/src/lib/decoder/openbtsstuff/Makefile.am
@@ -21,8 +21,6 @@
include $(top_srcdir)/Makefile.common
-AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES)
-
noinst_LTLIBRARIES = libopenbtsdecoder.la
libopenbtsdecoder_la_SOURCES = \
diff --git a/gsm-receiver/src/lib/decoder/sch.c b/gsm-receiver/src/lib/decoder/sch.c
index 6f141dd..0eed12d 100644
--- a/gsm-receiver/src/lib/decoder/sch.c
+++ b/gsm-receiver/src/lib/decoder/sch.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#include "gsm_constants.h"
+#include "../gsm_constants.h"
/*
* Synchronization channel.
diff --git a/gsm-receiver/src/lib/gsm_receiver_cf.cc b/gsm-receiver/src/lib/gsm_receiver_cf.cc
index e7b8e81..0eb208f 100644
--- a/gsm-receiver/src/lib/gsm_receiver_cf.cc
+++ b/gsm-receiver/src/lib/gsm_receiver_cf.cc
@@ -34,7 +34,8 @@
#include <gsm_receiver_cf.h>
#include <viterbi_detector.h>
#include <string.h>
-#include <sch.h>
+#include <decoder/sch.h>
+#include <decoder/a5-1-2.h>//!!
#include "RxBurst.h"
diff --git a/gsm-receiver/src/lib/gsm_receiver_cf.h b/gsm-receiver/src/lib/gsm_receiver_cf.h
index fef7882..039a774 100644
--- a/gsm-receiver/src/lib/gsm_receiver_cf.h
+++ b/gsm-receiver/src/lib/gsm_receiver_cf.h
@@ -30,9 +30,8 @@
#include <gsm_constants.h>
#include <gsm_receiver_config.h>
-#include <gsmstack.h> //TODO: remember to remove this line in the future!
+#include <decoder/gsmstack.h> //TODO: remember to remove this line in the future!
#include "GSML1FEC.h" //!!
-#include <a5-1-2.h>//!!
#include <string>//!!
#include <map>//!!
@@ -58,7 +57,7 @@ class gsm_receiver_cf : public gr_block
private:
std::map<char,int> d_hex_to_int;
FILE * d_speech_file; //!!
- byte d_KC[8]; //!!
+ uint8_t d_KC[8]; //!!
GSM::TCHFACCHL1Decoder *d_tch_decoder[N_TCH_DECODER]; //!!
bool d_trace_sch;
personal git repositories of Harald Welte. Your mileage may vary