summaryrefslogtreecommitdiff
path: root/volk/config
diff options
context:
space:
mode:
Diffstat (limited to 'volk/config')
-rw-r--r--volk/config/Makefile.am60
-rw-r--r--volk/config/acx_pthread.m4275
-rw-r--r--volk/config/bnv_have_qt.m4404
-rw-r--r--volk/config/cppunit.m480
-rw-r--r--volk/config/gcc_version_workaround.m449
-rw-r--r--volk/config/gr_lib64.m485
-rw-r--r--volk/config/gr_libgnuradio_core_extra_ldflags.m440
-rw-r--r--volk/config/gr_no_undefined.m444
-rw-r--r--volk/config/gr_omnithread.m452
-rw-r--r--volk/config/gr_pwin32.m4146
-rw-r--r--volk/config/gr_set_md_cpu.m463
-rw-r--r--volk/config/gr_sysv_shm.m436
-rw-r--r--volk/config/lf_cc.m441
-rw-r--r--volk/config/lf_cxx.m467
-rw-r--r--volk/config/lf_warnings.m4121
-rw-r--r--volk/config/lf_x11.m439
-rw-r--r--volk/config/lv_configure.m4110
-rw-r--r--volk/config/mkstemp.m489
-rw-r--r--volk/config/onceonly.m463
-rw-r--r--volk/config/pkg.m4201
20 files changed, 2065 insertions, 0 deletions
diff --git a/volk/config/Makefile.am b/volk/config/Makefile.am
new file mode 100644
index 000000000..b7dc2c161
--- /dev/null
+++ b/volk/config/Makefile.am
@@ -0,0 +1,60 @@
+#
+# Copyright 2001 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.
+#
+
+include $(top_srcdir)/Makefile.common
+
+# Install m4 macros in this directory
+m4datadir = $(datadir)/aclocal
+
+# List your m4 macros here
+m4macros = \
+ acx_pthread.m4 \
+ bnv_have_qt.m4 \
+ cppunit.m4 \
+ gr_check_shm_open.m4 \
+ gr_lib64.m4 \
+ gr_libgnuradio_core_extra_ldflags.m4 \
+ gr_no_undefined.m4 \
+ gr_omnithread.m4 \
+ gr_pwin32.m4 \
+ gr_set_md_cpu.m4 \
+ lv_configure.m4 \
+ gr_subversion.m4 \
+ gr_sysv_shm.m4 \
+ lf_cc.m4 \
+ lf_cxx.m4 \
+ lf_warnings.m4 \
+ lv_lf_warnings.m4 \
+ lf_x11.m4 \
+ lv_set_simd_flags.m4 \
+ lv_set_lv_arch.m4 \
+ mkstemp.m4 \
+ onceonly.m4 \
+ pkg.m4 \
+ gcc_version_workaround.m4
+
+
+
+
+# Don't install m4 macros anymore
+# m4data_DATA = $(m4macros)
+
+EXTRA_DIST = $(m4macros)
diff --git a/volk/config/acx_pthread.m4 b/volk/config/acx_pthread.m4
new file mode 100644
index 000000000..eb09f5acc
--- /dev/null
+++ b/volk/config/acx_pthread.m4
@@ -0,0 +1,275 @@
+# ===========================================================================
+# 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
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+ AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# 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, 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 pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -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 -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="-pthreads pthread -mt -pthread $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ case $flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $flag])
+ 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"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+ [acx_pthread_ok=yes])
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ AC_MSG_RESULT($acx_pthread_ok)
+ if test "x$acx_pthread_ok" = xyes; then
+ break;
+ fi
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # 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* | *-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"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ # 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
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+ ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+ :
+else
+ acx_pthread_ok=no
+ $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
diff --git a/volk/config/bnv_have_qt.m4 b/volk/config/bnv_have_qt.m4
new file mode 100644
index 000000000..1469bfbfd
--- /dev/null
+++ b/volk/config/bnv_have_qt.m4
@@ -0,0 +1,404 @@
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/bnv_have_qt.html
+dnl
+AC_DEFUN([BNV_HAVE_QT],
+[
+ dnl THANKS! This code includes bug fixes by:
+ dnl Tim McClarren.
+
+ AC_REQUIRE([AC_PROG_CXX])
+ AC_REQUIRE([AC_PATH_X])
+ AC_REQUIRE([AC_PATH_XTRA])
+
+ AC_MSG_CHECKING(for Qt)
+
+ AC_ARG_WITH([Qt-dir],
+ [ --with-Qt-dir=DIR DIR is equal to \$QTDIR if you have followed the
+ installation instructions of Trolltech. Header
+ files are in DIR/include, binary utilities are
+ in DIR/bin and the library is in DIR/lib])
+ AC_ARG_WITH([Qt-include-dir],
+ [ --with-Qt-include-dir=DIR
+ Qt header files are in DIR])
+ AC_ARG_WITH([Qt-bin-dir],
+ [ --with-Qt-bin-dir=DIR Qt utilities such as moc and uic are in DIR])
+ AC_ARG_WITH([Qt-lib-dir],
+ [ --with-Qt-lib-dir=DIR The Qt library is in DIR])
+ AC_ARG_WITH([Qt-lib],
+ [ --with-Qt-lib=LIB Use -lLIB to link with the Qt library])
+ if test x"$with_Qt_dir" = x"no" ||
+ test x"$with_Qt_include-dir" = x"no" ||
+ test x"$with_Qt_bin_dir" = x"no" ||
+ test x"$with_Qt_lib_dir" = x"no" ||
+ test x"$with_Qt_lib" = x"no"; then
+ # user disabled Qt. Leave cache alone.
+ have_qt="User disabled Qt."
+ else
+ # "yes" is a bogus option
+ if test x"$with_Qt_dir" = xyes; then
+ with_Qt_dir=
+ fi
+ if test x"$with_Qt_include_dir" = xyes; then
+ with_Qt_include_dir=
+ fi
+ if test x"$with_Qt_bin_dir" = xyes; then
+ with_Qt_bin_dir=
+ fi
+ if test x"$with_Qt_lib_dir" = xyes; then
+ with_Qt_lib_dir=
+ fi
+ if test x"$with_Qt_lib" = xyes; then
+ with_Qt_lib=
+ fi
+ # No Qt unless we discover otherwise
+ have_qt=no
+ # Check whether we are requested to link with a specific version
+ if test x"$with_Qt_lib" != x; then
+ bnv_qt_lib="$with_Qt_lib"
+ fi
+ # Check whether we were supplied with an answer already
+ if test x"$with_Qt_dir" != x; then
+ have_qt=yes
+ bnv_qt_dir="$with_Qt_dir"
+ bnv_qt_include_dir="$with_Qt_dir/include"
+ bnv_qt_bin_dir="$with_Qt_dir/bin"
+ bnv_qt_lib_dir="$with_Qt_dir/lib"
+ # Only search for the lib if the user did not define one already
+ if test x"$bnv_qt_lib" = x; then
+ bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p |
+ sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
+ fi
+ bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ else
+ # Use cached value or do search, starting with suggestions from
+ # the command line
+ AC_CACHE_VAL(bnv_cv_have_qt,
+ [
+ # We are not given a solution and there is no cached value.
+ bnv_qt_dir=NO
+ bnv_qt_include_dir=NO
+ bnv_qt_lib_dir=NO
+ if test x"$bnv_qt_lib" = x; then
+ bnv_qt_lib=NO
+ fi
+ BNV_PATH_QT_DIRECT
+ if test "$bnv_qt_dir" = NO ||
+ test "$bnv_qt_include_dir" = NO ||
+ test "$bnv_qt_lib_dir" = NO ||
+ test "$bnv_qt_lib" = NO; then
+ # Problem with finding complete Qt. Cache the known absence of Qt.
+ bnv_cv_have_qt="have_qt=no"
+ else
+ # Record where we found Qt for the cache.
+ bnv_cv_have_qt="have_qt=yes \
+ bnv_qt_dir=$bnv_qt_dir \
+ bnv_qt_include_dir=$bnv_qt_include_dir \
+ bnv_qt_bin_dir=$bnv_qt_bin_dir \
+ bnv_qt_LIBS=\"$bnv_qt_LIBS\""
+ fi
+ ])dnl
+ eval "$bnv_cv_have_qt"
+ fi # all $bnv_qt_* are set
+ fi # $have_qt reflects the system status
+ if test x"$have_qt" = xyes; then
+ QT_CXXFLAGS="-I$bnv_qt_include_dir"
+ QT_DIR="$bnv_qt_dir"
+ QT_LIBS="$bnv_qt_LIBS"
+ # If bnv_qt_dir is defined, utilities are expected to be in the
+ # bin subdirectory
+ if test x"$bnv_qt_dir" != x; then
+ if test -x "$bnv_qt_dir/bin/uic"; then
+ QT_UIC="$bnv_qt_dir/bin/uic"
+ else
+ # Old versions of Qt don't have uic
+ QT_UIC=
+ fi
+ QT_MOC="$bnv_qt_dir/bin/moc"
+ else
+ # Or maybe we are told where to look for the utilities
+ if test x"$bnv_qt_bin_dir" != x; then
+ if test -x "$bnv_qt_bin_dir/uic"; then
+ QT_UIC="$bnv_qt_bin_dir/uic"
+ else
+ # Old versions of Qt don't have uic
+ QT_UIC=
+ fi
+ QT_MOC="$bnv_qt_bin_dir/moc"
+ else
+ # Last possibility is that they are in $PATH
+ QT_UIC="`which uic`"
+ QT_MOC="`which moc`"
+ fi
+ fi
+ # All variables are defined, report the result
+ AC_MSG_RESULT([$have_qt:
+ QT_CXXFLAGS=$QT_CXXFLAGS
+ QT_DIR=$QT_DIR
+ QT_LIBS=$QT_LIBS
+ QT_UIC=$QT_UIC
+ QT_MOC=$QT_MOC])
+ else
+ # Qt was not found
+ QT_CXXFLAGS=
+ QT_DIR=
+ QT_LIBS=
+ QT_UIC=
+ QT_MOC=
+ AC_MSG_RESULT($have_qt)
+ fi
+ AC_SUBST(QT_CXXFLAGS)
+ AC_SUBST(QT_DIR)
+ AC_SUBST(QT_LIBS)
+ AC_SUBST(QT_UIC)
+ AC_SUBST(QT_MOC)
+
+ #### Being paranoid:
+ if test x"$have_qt" = xyes; then
+ AC_MSG_CHECKING(correct functioning of Qt installation)
+ AC_CACHE_VAL(bnv_cv_qt_test_result,
+ [
+ cat > bnv_qt_test.h << EOF
+#include <qobject.h>
+class Test : public QObject
+{
+Q_OBJECT
+public:
+ Test() {}
+ ~Test() {}
+public slots:
+ void receive() {}
+signals:
+ void send();
+};
+EOF
+
+ cat > bnv_qt_main.$ac_ext << EOF
+#include "bnv_qt_test.h"
+#include <qapplication.h>
+int main( int argc, char **argv )
+{
+ QApplication app( argc, argv );
+ Test t;
+ QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) );
+}
+EOF
+
+ bnv_cv_qt_test_result="failure"
+ bnv_try_1="$QT_MOC bnv_qt_test.h -o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_1.out"
+ AC_TRY_EVAL(bnv_try_1)
+ bnv_err_1=`grep -v '^ *+' bnv_qt_test_1.out | grep -v "^bnv_qt_test.h\$"`
+ if test x"$bnv_err_1" != x; then
+ echo "$bnv_err_1" >&AC_FD_CC
+ echo "configure: could not run $QT_MOC on:" >&AC_FD_CC
+ cat bnv_qt_test.h >&AC_FD_CC
+ else
+ bnv_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_bnv_qt_test.o moc_bnv_qt_test.$ac_ext >/dev/null 2>bnv_qt_test_2.out"
+ AC_TRY_EVAL(bnv_try_2)
+ bnv_err_2=`grep -v '^ *+' bnv_qt_test_2.out | grep -v "^bnv_qt_test.{$ac_ext}\$"`
+ if test x"$bnv_err_2" != x; then
+ echo "$bnv_err_2" >&AC_FD_CC
+ echo "configure: could not compile:" >&AC_FD_CC
+ cat bnv_qt_test.$ac_ext >&AC_FD_CC
+ else
+ bnv_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o bnv_qt_main.o bnv_qt_main.$ac_ext >/dev/null 2>bnv_qt_test_3.out"
+ AC_TRY_EVAL(bnv_try_3)
+ bnv_err_3=`grep -v '^ *+' bnv_qt_test_3.out | grep -v "^bnv_qt_main.{$ac_ext}\$"`
+ if test x"$bnv_err_3" != x; then
+ echo "$bnv_err_3" >&AC_FD_CC
+ echo "configure: could not compile:" >&AC_FD_CC
+ cat bnv_qt_main.$ac_ext >&AC_FD_CC
+ else
+ bnv_try_4="$CXX $QT_LIBS $LIBS -o bnv_qt_main bnv_qt_main.o moc_bnv_qt_test.o >/dev/null 2>bnv_qt_test_4.out"
+ AC_TRY_EVAL(bnv_try_4)
+ bnv_err_4=`grep -v '^ *+' bnv_qt_test_4.out`
+ if test x"$bnv_err_4" != x; then
+ echo "$bnv_err_4" >&AC_FD_CC
+ else
+ bnv_cv_qt_test_result="success"
+ fi
+ fi
+ fi
+ fi
+ ])dnl AC_CACHE_VAL bnv_cv_qt_test_result
+ AC_MSG_RESULT([$bnv_cv_qt_test_result]);
+ if test x"$bnv_cv_qt_test_result" = "xfailure"; then
+ # working Qt was not found
+ QT_CXXFLAGS=
+ QT_DIR=
+ QT_LIBS=
+ QT_UIC=
+ QT_MOC=
+ have_qt=no
+ AC_MSG_WARN([Failed to find matching components of a complete
+ Qt installation. Try using more options,
+ see ./configure --help.])
+ fi
+
+ rm -f bnv_qt_test.h moc_bnv_qt_test.$ac_ext moc_bnv_qt_test.o \
+ bnv_qt_main.$ac_ext bnv_qt_main.o bnv_qt_main \
+ bnv_qt_test_1.out bnv_qt_test_2.out bnv_qt_test_3.out bnv_qt_test_4.out
+ fi
+])
+
+dnl Internal subroutine of BNV_HAVE_QT
+dnl Set bnv_qt_dir bnv_qt_include_dir bnv_qt_bin_dir bnv_qt_lib_dir bnv_qt_lib
+dnl Copyright 2001 Bastiaan N. Veelo <Bastiaan.N.Veelo@immtek.ntnu.no>
+AC_DEFUN([BNV_PATH_QT_DIRECT],
+[
+ ## Binary utilities ##
+ if test x"$with_Qt_bin_dir" != x; then
+ bnv_qt_bin_dir=$with_Qt_bin_dir
+ fi
+ ## Look for header files ##
+ if test x"$with_Qt_include_dir" != x; then
+ bnv_qt_include_dir="$with_Qt_include_dir"
+ else
+ # The following header file is expected to define QT_VERSION.
+ qt_direct_test_header=qglobal.h
+ # Look for the header file in a standard set of common directories.
+ bnv_include_path_list="
+ /usr/include
+ `ls -dr /usr/include/qt* 2>/dev/null`
+ `ls -dr /usr/lib/qt*/include 2>/dev/null`
+ `ls -dr /usr/local/qt*/include 2>/dev/null`
+ `ls -dr /opt/qt*/include 2>/dev/null`
+ "
+ for bnv_dir in $bnv_include_path_list; do
+ if test -r "$bnv_dir/$qt_direct_test_header"; then
+ bnv_dirs="$bnv_dirs $bnv_dir"
+ fi
+ done
+ # Now look for the newest in this list
+ bnv_prev_ver=0
+ for bnv_dir in $bnv_dirs; do
+ bnv_this_ver=`egrep -w '#define QT_VERSION' $bnv_dir/$qt_direct_test_header | sed s/'#define QT_VERSION'//`
+ if expr $bnv_this_ver '>' $bnv_prev_ver > /dev/null; then
+ bnv_qt_include_dir=$bnv_dir
+ bnv_prev_ver=$bnv_this_ver
+ fi
+ done
+ fi dnl Found header files.
+
+ # Are these headers located in a traditional Trolltech installation?
+ # That would be $bnv_qt_include_dir stripped from its last element:
+ bnv_possible_qt_dir=`dirname $bnv_qt_include_dir`
+ if test -x $bnv_possible_qt_dir/bin/moc &&
+ ls $bnv_possible_qt_dir/lib/libqt* > /dev/null; then
+ # Then the rest is a piece of cake
+ bnv_qt_dir=$bnv_possible_qt_dir
+ bnv_qt_bin_dir="$bnv_qt_dir/bin"
+ bnv_qt_lib_dir="$bnv_qt_dir/lib"
+ # Only look for lib if the user did not supply it already
+ if test x"$bnv_qt_lib" = xNO; then
+ bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p |
+ sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
+ fi
+ bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ else
+ # There is no valid definition for $QTDIR as Trolltech likes to see it
+ bnv_qt_dir=
+ ## Look for Qt library ##
+ if test x"$with_Qt_lib_dir" != x; then
+ bnv_qt_lib_dir="$with_Qt_lib_dir"
+ # Only look for lib if the user did not supply it already
+ if test x"$bnv_qt_lib" = xNO; then
+ bnv_qt_lib="`ls $bnv_qt_lib_dir/libqt* | sed -n 1p |
+ sed s@$bnv_qt_lib_dir/lib@@ | [sed s@[.].*@@]`"
+ fi
+ bnv_qt_LIBS="-L$bnv_qt_lib_dir -l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ else
+ # Normally, when there is no traditional Trolltech installation,
+ # the library is installed in a place where the linker finds it
+ # automatically.
+ # If the user did not define the library name, try with qt
+ if test x"$bnv_qt_lib" = xNO; then
+ bnv_qt_lib=qt
+ fi
+ qt_direct_test_header=qapplication.h
+ qt_direct_test_main="
+ int argc;
+ char ** argv;
+ QApplication app(argc,argv);
+ "
+ # See if we find the library without any special options.
+ # Don't add top $LIBS permanently yet
+ bnv_save_LIBS="$LIBS"
+ LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ bnv_qt_LIBS="$LIBS"
+ bnv_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="-I$bnv_qt_include_dir"
+ AC_TRY_LINK([#include <$qt_direct_test_header>],
+ $qt_direct_test_main,
+ [
+ # Success.
+ # We can link with no special library directory.
+ bnv_qt_lib_dir=
+ ], [
+ # That did not work. Try the multi-threaded version
+ echo "Non-critical error, please neglect the above." >&AC_FD_CC
+ bnv_qt_lib=qt-mt
+ LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ AC_TRY_LINK([#include <$qt_direct_test_header>],
+ $qt_direct_test_main,
+ [
+ # Success.
+ # We can link with no special library directory.
+ bnv_qt_lib_dir=
+ ], [
+ # That did not work. Try the OpenGL version
+ echo "Non-critical error, please neglect the above." >&AC_FD_CC
+ bnv_qt_lib=qt-gl
+ LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ AC_TRY_LINK([#include <$qt_direct_test_header>],
+ $qt_direct_test_main,
+ [
+ # Succes.
+ # We can link with no special library directory.
+ bnv_qt_lib_dir=
+ ], [
+ # That did not work. Maybe a library version I don't know about?
+ echo "Non-critical error, please neglect the above." >&AC_FD_CC
+ # Look for some Qt lib in a standard set of common directories.
+ bnv_dir_list="
+ `echo $bnv_qt_includes | sed ss/includess`
+ /lib
+ /usr/lib
+ /usr/local/lib
+ /opt/lib
+ `ls -dr /usr/lib/qt* 2>/dev/null`
+ `ls -dr /usr/local/qt* 2>/dev/null`
+ `ls -dr /opt/qt* 2>/dev/null`
+ "
+ for bnv_dir in $bnv_dir_list; do
+ if ls $bnv_dir/libqt*; then
+ # Gamble that it's the first one...
+ bnv_qt_lib="`ls $bnv_dir/libqt* | sed -n 1p |
+ sed s@$bnv_dir/lib@@ | sed s/[.].*//`"
+ bnv_qt_lib_dir="$bnv_dir"
+ break
+ fi
+ done
+ # Try with that one
+ LIBS="-l$bnv_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS"
+ AC_TRY_LINK([#include <$qt_direct_test_header>],
+ $qt_direct_test_main,
+ [
+ # Succes.
+ # We can link with no special library directory.
+ bnv_qt_lib_dir=
+ ], [
+ # Leave bnv_qt_lib_dir defined
+ ])
+ ])
+ ])
+ ])
+ if test x"$bnv_qt_lib_dir" != x; then
+ bnv_qt_LIBS="-l$bnv_qt_lib_dir $LIBS"
+ else
+ bnv_qt_LIBS="$LIBS"
+ fi
+ LIBS="$bnv_save_LIBS"
+ CXXFLAGS="$bnv_save_CXXFLAGS"
+ fi dnl $with_Qt_lib_dir was not given
+ fi dnl Done setting up for non-traditional Trolltech installation
+])
diff --git a/volk/config/cppunit.m4 b/volk/config/cppunit.m4
new file mode 100644
index 000000000..0991d51ec
--- /dev/null
+++ b/volk/config/cppunit.m4
@@ -0,0 +1,80 @@
+dnl
+dnl AM_PATH_CPPUNIT(MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl
+AC_DEFUN([AM_PATH_CPPUNIT],
+[
+
+AC_ARG_WITH(cppunit-prefix,[ --with-cppunit-prefix=PFX Prefix where CppUnit is installed (optional)],
+ cppunit_config_prefix="$withval", cppunit_config_prefix="")
+AC_ARG_WITH(cppunit-exec-prefix,[ --with-cppunit-exec-prefix=PFX Exec prefix where CppUnit is installed (optional)],
+ cppunit_config_exec_prefix="$withval", cppunit_config_exec_prefix="")
+
+ if test x$cppunit_config_exec_prefix != x ; then
+ cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
+ if test x${CPPUNIT_CONFIG+set} != xset ; then
+ CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
+ fi
+ fi
+ if test x$cppunit_config_prefix != x ; then
+ cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
+ if test x${CPPUNIT_CONFIG+set} != xset ; then
+ CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
+ fi
+ fi
+
+ AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
+ cppunit_version_min=$1
+
+ AC_MSG_CHECKING(for Cppunit - version >= $cppunit_version_min)
+ no_cppunit=""
+ if test "$CPPUNIT_CONFIG" = "no" ; then
+ no_cppunit=yes
+ else
+ CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
+ CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
+ cppunit_version=`$CPPUNIT_CONFIG --version`
+
+ cppunit_major_version=`echo $cppunit_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ cppunit_minor_version=`echo $cppunit_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ cppunit_micro_version=`echo $cppunit_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+ cppunit_major_min=`echo $cppunit_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ cppunit_minor_min=`echo $cppunit_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ cppunit_micro_min=`echo $cppunit_version_min | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+
+ cppunit_version_proper=`expr \
+ $cppunit_major_version \> $cppunit_major_min \| \
+ $cppunit_major_version \= $cppunit_major_min \& \
+ $cppunit_minor_version \> $cppunit_minor_min \| \
+ $cppunit_major_version \= $cppunit_major_min \& \
+ $cppunit_minor_version \= $cppunit_minor_min \& \
+ $cppunit_micro_version \>= $cppunit_micro_min `
+
+ if test "$cppunit_version_proper" = "1" ; then
+ AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
+ else
+ AC_MSG_RESULT(no)
+ no_cppunit=yes
+ fi
+ fi
+
+ if test "x$no_cppunit" = x ; then
+ ifelse([$2], , :, [$2])
+ else
+ CPPUNIT_CFLAGS=""
+ CPPUNIT_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+
+ AC_SUBST(CPPUNIT_CFLAGS)
+ AC_SUBST(CPPUNIT_LIBS)
+])
+
+
+
diff --git a/volk/config/gcc_version_workaround.m4 b/volk/config/gcc_version_workaround.m4
new file mode 100644
index 000000000..b3ba0b6f3
--- /dev/null
+++ b/volk/config/gcc_version_workaround.m4
@@ -0,0 +1,49 @@
+AC_DEFUN([LV_GCC_VERSION_WORKAROUND],
+[
+ AC_REQUIRE([LF_CONFIGURE_CXX])
+
+ cxx_version=`$CXX --version`
+
+ cxx_major_version=`echo $cxx_version | sed 's/[[^)]]*) \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
+ cxx_minor_version=`echo $cxx_version | sed 's/g++ [[^)]]*) \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
+ cxx_micro_version=`echo $cxx_version | sed 's/g++ [[^)]]*) \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
+
+ if test ["$cxx_minor_version" -lt "3"] -o ["$cxx_major_version" -lt "4"]; then
+ cxx_proper_version="$cxx_major_version.$cxx_minor_version.$cxx_micro_version"
+
+
+ my_arch=`uname -m`
+
+ if test "${my_arch}" = i686; then
+ my_arch="${my_arch} i586 i486 i386"
+ fi
+ if test "${my_arch}" = i586; then
+ my_arch = "${my_arch} i686 i386 i486"
+ fi
+ if test "${my_arch}" = i486; then
+ my_arch = "${my_arch} i686 i386 i586"
+ fi
+ if test "${my_arch}" = i386; then
+ my_arch = "${my_arch} i686 i586 i486"
+ fi
+
+ for i in $my_arch
+ do
+ if test -n "`ls /usr/include/c++/$cxx_proper_version | grep $i`"; then
+ mystery_dir=`ls /usr/include/c++/$cxx_proper_version | grep $i`
+ echo `ls /usr/include/c++/$cxx_proper_version | grep $i`
+ fi
+ done
+ echo "${mystery_dir}"
+
+ LV_CXXFLAGS="${LV_CXXFLAGS} -nostdinc++ -I/usr/include/c++/$cxx_proper_version -I/usr/include/c++/$cxx_proper_version/$mystery_dir"
+
+ CXXFLAGS="${CXXFLAGS} -nostdinc++ -I/usr/include/c++/$cxx_proper_version -I/usr/include/c++/$cxx_proper_version/$mystery_dir"
+
+
+
+ fi
+
+
+
+ ]) \ No newline at end of file
diff --git a/volk/config/gr_lib64.m4 b/volk/config/gr_lib64.m4
new file mode 100644
index 000000000..751f774b4
--- /dev/null
+++ b/volk/config/gr_lib64.m4
@@ -0,0 +1,85 @@
+dnl
+dnl Copyright 2005,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.
+dnl
+
+dnl GR_LIB64()
+dnl
+dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine
+dnl if libdir should end in "64" or not.
+dnl
+dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix)
+dnl May append "64" to libdir.
+dnl
+dnl The current heuristic is:
+dnl if the host_cpu isn't x86_64 or powerpc64, then ""
+dnl if the host_os isn't linux, then ""
+dnl if we're cross-compiling, ask the linker, by way of the selected compiler
+dnl if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else ""
+dnl else ask the compiler
+dnl
+AC_DEFUN([GR_LIB64],[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_PROG_CXX])
+
+ AC_MSG_CHECKING([gr_libdir_suffix])
+ gr_libdir_suffix=""
+ AC_SUBST(gr_libdir_suffix)
+
+ case "$host_os" in
+ linux*) is_linux=yes ;;
+ *) is_linux=no ;;
+ esac
+
+ if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then
+ gr_libdir_suffix=""
+ elif test "$cross_compiling" = yes; then
+ _GR_LIB64_ASK_COMPILER
+ elif test "$host_cpu" = "x86_64"; then
+ if test -d /lib64 && test ! -L /lib64; then
+ gr_libdir_suffix=64
+ fi
+ else
+ _GR_LIB64_ASK_COMPILER
+ fi
+ AC_MSG_RESULT([$gr_libdir_suffix])
+
+
+ AC_MSG_CHECKING([whether to append 64 to libdir])
+ t=${libdir##*/lib}
+ if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then
+ libdir=${libdir}64
+ AC_MSG_RESULT([yes. Setting libdir to $libdir])
+ else
+ AC_MSG_RESULT([no])
+ fi
+])
+
+dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script
+dnl and see if it contains a suffix after the final .../lib part of the path.
+dnl (This works because the linker script varies depending on whether we're generating
+dnl 32-bit or 64-bit executables)
+dnl
+AC_DEFUN([_GR_LIB64_ASK_COMPILER],[
+ if test "$ac_cv_cxx_compiler_gnu" = "yes";
+ then
+ gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'`
+ fi
+])
+
diff --git a/volk/config/gr_libgnuradio_core_extra_ldflags.m4 b/volk/config/gr_libgnuradio_core_extra_ldflags.m4
new file mode 100644
index 000000000..43f872c04
--- /dev/null
+++ b/volk/config/gr_libgnuradio_core_extra_ldflags.m4
@@ -0,0 +1,40 @@
+# Check for (MinGW)win32 extra ld options. -*- Autoconf -*-
+
+# Copyright 2003,2004,2005 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.
+
+dnl
+AC_DEFUN([GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS], [
+AC_REQUIRE([AC_PROG_LD])
+# on Mingw32 extra LDFLAGS are required to ease global variable linking
+LIBGNURADIO_CORE_EXTRA_LDFLAGS=""
+
+AC_MSG_CHECKING([whether $LD accepts --enable-runtime-pseudo-reloc])
+if ${LD} --enable-runtime-pseudo-reloc --version >/dev/null 2>&1
+then
+ # libtool requires the quotes
+ LIBGNURADIO_CORE_EXTRA_LDFLAGS="\"-Wl,--enable-runtime-pseudo-reloc\""
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_SUBST(LIBGNURADIO_CORE_EXTRA_LDFLAGS)
+
+])
diff --git a/volk/config/gr_no_undefined.m4 b/volk/config/gr_no_undefined.m4
new file mode 100644
index 000000000..c8d745d5f
--- /dev/null
+++ b/volk/config/gr_no_undefined.m4
@@ -0,0 +1,44 @@
+dnl
+dnl Copyright 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
+
+# GR_NO_UNDEFINED()
+#
+# Detemine whether we need to use the -no-undefined linker flag
+# when building shared libraries.
+# Sets NO_UNDEFINED to "" or "-no-undefined"
+#
+# As far as I can tell, we need -no-undefined only when building
+# windows DLLs. This occurs when using MinGW and Cygwin.
+#
+# For now, we stub this out.
+
+AC_DEFUN([GR_NO_UNDEFINED],[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ no_undefined=""
+ case "${host_os}" in
+ *mingw* | *cygwin*)
+
+ # on MinGW/Cygwin extra LDFLAGS are required
+ no_undefined="-no-undefined"
+ ;;
+ esac
+ AC_SUBST(NO_UNDEFINED,[$no_undefined])
+])
diff --git a/volk/config/gr_omnithread.m4 b/volk/config/gr_omnithread.m4
new file mode 100644
index 000000000..054f07824
--- /dev/null
+++ b/volk/config/gr_omnithread.m4
@@ -0,0 +1,52 @@
+# Check for Omnithread (pthread/NT) thread support. -*- Autoconf -*-
+
+# 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
+# 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([GR_OMNITHREAD],
+[
+ # Check first for POSIX
+ ACX_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])
+
+ AC_LINK_IFELSE([
+ #include <windows.h>
+ #include <winbase.h>
+ int main() { InitializeCriticalSection(NULL); return 0; }
+ ],
+ [
+ ot_nt="yes"
+ DEFINES="$DEFINES -DOMNITHREAD_NT=1"
+ ],
+ [AC_MSG_FAILURE([GNU Radio requires POSIX threads. pthreads not found.])]
+ )
+ AC_MSG_RESULT(yes)
+ ])
+ AM_CONDITIONAL(OMNITHREAD_POSIX, test "x$ot_posix" = xyes)
+ AM_CONDITIONAL(OMNITHREAD_NT, test "x$ot_nt" = xyes)
+
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS([clock_gettime], [rt], [PTHREAD_LIBS="$PTHREAD_LIBS $LIBS"])
+ AC_CHECK_FUNCS([clock_gettime gettimeofday nanosleep])
+ LIBS="$save_LIBS"
+])
+
diff --git a/volk/config/gr_pwin32.m4 b/volk/config/gr_pwin32.m4
new file mode 100644
index 000000000..7b99cba6b
--- /dev/null
+++ b/volk/config/gr_pwin32.m4
@@ -0,0 +1,146 @@
+# Check for (mingw)win32 POSIX replacements. -*- Autoconf -*-
+
+# Copyright 2003,2004,2005 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.
+
+
+AC_DEFUN([GR_PWIN32],
+[
+AC_REQUIRE([AC_HEADER_TIME])
+AC_CHECK_HEADERS([sys/types.h fcntl.h io.h])
+AC_CHECK_HEADERS([windows.h])
+AC_CHECK_HEADERS([winioctl.h winbase.h], [], [], [
+ #if HAVE_WINDOWS_H
+ #include <windows.h>
+ #endif
+])
+
+AC_CHECK_FUNCS([getopt usleep gettimeofday nanosleep rand srand random srandom sleep sigaction])
+AC_CHECK_TYPES([struct timezone, struct timespec, ssize_t],[],[],[
+ #if HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #if TIME_WITH_SYS_TIME
+ # include <sys/time.h>
+ # include <time.h>
+ #else
+ # if HAVE_SYS_TIME_H
+ # include <sys/time.h>
+ # else
+ # include <time.h>
+ # endif
+ #endif
+])
+
+dnl Checks for replacements
+AC_REPLACE_FUNCS([getopt usleep gettimeofday])
+
+
+AC_MSG_CHECKING(for Sleep)
+AC_TRY_LINK([ #include <windows.h>
+ #include <winbase.h>
+ ], [ Sleep(0); ],
+ [AC_DEFINE(HAVE_SSLEEP,1,[Define to 1 if you have win32 Sleep])
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no)
+ )
+
+dnl Under Win32, mkdir prototype in io.h has only one arg
+AC_MSG_CHECKING(whether mkdir accepts only one arg)
+AC_TRY_COMPILE([#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>], [
+ mkdir("")
+ ], [ AC_MSG_RESULT(yes)
+ AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ],
+ [ AC_MSG_RESULT(no)
+ ])
+
+AH_BOTTOM(
+[
+/* Define missing prototypes, implemented in replacement lib */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef HAVE_GETOPT
+int getopt (int argc, char * const argv[], const char * optstring);
+extern char * optarg;
+extern int optind, opterr, optopt;
+#endif
+
+#ifndef HAVE_USLEEP
+int usleep(unsigned long usec); /* SUSv2 */
+#endif
+
+#ifndef HAVE_NANOSLEEP
+#ifndef HAVE_STRUCT_TIMESPEC
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h> /* need time_t */
+#endif
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+#endif
+static inline int nanosleep(const struct timespec *req, struct timespec *rem) { return usleep(req->tv_sec*1000000+req->tv_nsec/1000); }
+#endif
+
+#if defined(HAVE_SSLEEP) && !defined(HAVE_SLEEP)
+#ifdef HAVE_WINBASE_H
+#include <windows.h>
+#include <winbase.h>
+#endif
+/* TODO: what about SleepEx? */
+static inline unsigned int sleep (unsigned int nb_sec) { Sleep(nb_sec*1000); return 0; }
+#endif
+
+#ifndef HAVE_GETTIMEOFDAY
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifndef HAVE_STRUCT_TIMEZONE
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#endif
+int gettimeofday(struct timeval *tv, struct timezone *tz);
+#endif
+
+#if !defined(HAVE_RANDOM) && defined(HAVE_RAND)
+#include <stdlib.h>
+static inline long int random (void) { return rand(); }
+#endif
+
+#if !defined(HAVE_SRANDOM) && defined(HAVE_SRAND)
+static inline void srandom (unsigned int seed) { srand(seed); }
+#endif
+
+#ifndef HAVE_SSIZE_T
+typedef size_t ssize_t;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+])
+
+
+])
diff --git a/volk/config/gr_set_md_cpu.m4 b/volk/config/gr_set_md_cpu.m4
new file mode 100644
index 000000000..56fd83bac
--- /dev/null
+++ b/volk/config/gr_set_md_cpu.m4
@@ -0,0 +1,63 @@
+dnl
+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.
+dnl
+
+AC_DEFUN([_TRY_ADD_ALTIVEC],
+[
+ LF_CHECK_CC_FLAG([-mabi=altivec -maltivec])
+ LF_CHECK_CXX_FLAG([-mabi=altivec -maltivec])
+])
+
+AC_DEFUN([GR_SET_MD_CPU],[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_ARG_WITH(md-cpu,
+ AC_HELP_STRING([--with-md-cpu=ARCH],[set machine dependent speedups (auto)]),
+ [cf_with_md_cpu="$withval"],
+ [cf_with_md_cpu="$host_cpu"])
+
+ 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 ;;
+ powerpc*) MD_CPU=powerpc ;;
+ *) MD_CPU=generic ;;
+ esac
+
+ AC_ARG_ENABLE(altivec,
+ AC_HELP_STRING([--enable-altivec],[enable altivec on PowerPC (yes)]),
+ [ if test $MD_CPU = powerpc; then
+ case "$enableval" in
+ (no) MD_CPU=generic ;;
+ (yes) _TRY_ADD_ALTIVEC ;;
+ (*) AC_MSG_ERROR([Invalid argument ($enableval) to --enable-altivec]) ;;
+ esac
+ fi],
+ [ if test $MD_CPU = powerpc; then _TRY_ADD_ALTIVEC fi])
+
+
+ AC_MSG_CHECKING([for machine dependent speedups])
+ 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_powerpc, test "$MD_CPU" = "powerpc")
+ AM_CONDITIONAL(MD_CPU_generic, test "$MD_CPU" = "generic")
+])
diff --git a/volk/config/gr_sysv_shm.m4 b/volk/config/gr_sysv_shm.m4
new file mode 100644
index 000000000..db5c8351e
--- /dev/null
+++ b/volk/config/gr_sysv_shm.m4
@@ -0,0 +1,36 @@
+# Check for IPC System V shm 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([GR_SYSV_SHM],
+[
+ AC_LANG_SAVE
+ AC_LANG_C
+
+ AC_CHECK_HEADERS([sys/ipc.h sys/shm.h])
+
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS(shmat, [cygipc ipc],
+ [ IPC_LIBS="$LIBS" ],
+ [ AC_MSG_WARN([SystemV IPC support not found. ]) ]
+ )
+ LIBS="$save_LIBS"
+
+ AC_LANG_RESTORE
+ AC_SUBST(IPC_LIBS)
+])
diff --git a/volk/config/lf_cc.m4 b/volk/config/lf_cc.m4
new file mode 100644
index 000000000..b75e1a4c5
--- /dev/null
+++ b/volk/config/lf_cc.m4
@@ -0,0 +1,41 @@
+dnl Autoconf support for C++
+dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
+dnl
+dnl This program 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 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program 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 this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a configuration
+dnl script generated by Autoconf, you may include it under the same
+dnl distribution terms that you use for the rest of that program.
+
+# -------------------------------------------------------------------------
+# Use this macro to configure your C compiler
+# When called the macro does the following things:
+# 1. It finds an appropriate C compiler.
+# If you passed the flag --with-cc=foo then it uses that
+# particular compiler
+# 2. Check whether the compiler works.
+# 3. Checks whether the compiler accepts the -g
+# -------------------------------------------------------------------------
+
+AC_DEFUN([LF_CONFIGURE_CC],[
+ dnl Sing the song
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_CPP])dnl
+ AC_REQUIRE([AC_AIX])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+])
+
diff --git a/volk/config/lf_cxx.m4 b/volk/config/lf_cxx.m4
new file mode 100644
index 000000000..dfc6bfbfe
--- /dev/null
+++ b/volk/config/lf_cxx.m4
@@ -0,0 +1,67 @@
+dnl Autoconf support for C++
+dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
+dnl
+dnl This program 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 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program 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 this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a configuration
+dnl script generated by Autoconf, you may include it under the same
+dnl distribution terms that you use for the rest of that program.
+
+# -----------------------------------------------------------------
+# This macro should be called to configure your C++ compiler.
+# When called, the macro does the following things:
+# 1. It finds an appropriate C++ compiler
+# If you passed the flag --with-cxx=foo, then it uses that
+# particular compiler
+# 2. Checks whether the compiler accepts the -g
+# ------------------------------------------------------------------
+
+AC_DEFUN([LF_CONFIGURE_CXX],[
+ AC_REQUIRE([AC_PROG_CXX])dnl
+ AC_REQUIRE([AC_PROG_CXXCPP])dnl
+ LF_CXX_PORTABILITY
+])
+
+# -----------------------------------------------------------------------
+# This macro tests the C++ compiler for various portability problem.
+# -----------------------------------------------------------------------
+
+
+AC_DEFUN([LF_CXX_PORTABILITY],[
+
+ dnl
+ dnl Check for common C++ portability problems
+ dnl
+
+ dnl AC_LANG_PUSH
+ dnl AC_LANG_CPLUSPLUS
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+
+
+ dnl Test whether C++ has std::isnan
+ AC_MSG_CHECKING(whether C++ has std::isnan)
+ AC_TRY_COMPILE([#include <cmath>], [
+ std::isnan(0);
+], [ AC_MSG_RESULT(yes)
+ AC_DEFINE(CXX_HAS_STD_ISNAN,[],[Define if has std::isnan]) ],
+ [ AC_MSG_RESULT(no) ])
+
+ dnl Done with the portability checks
+ dnl AC_LANG_POP([C++])
+ AC_LANG_RESTORE
+])
+
diff --git a/volk/config/lf_warnings.m4 b/volk/config/lf_warnings.m4
new file mode 100644
index 000000000..d40c77f14
--- /dev/null
+++ b/volk/config/lf_warnings.m4
@@ -0,0 +1,121 @@
+dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl
+dnl This program 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 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program 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 this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a configuration
+dnl script generated by Autoconf, you may include it under the same
+dnl distribution terms that you use for the rest of that program.
+
+# --------------------------------------------------------------------------
+# Check whether the C++ compiler accepts a certain flag
+# If it does it adds the flag to lf_CXXFLAGS
+# If it does not then it returns an error to lf_ok
+# Usage:
+# LF_CHECK_CXX_FLAG(-flag1 -flag2 -flag3 ...)
+# -------------------------------------------------------------------------
+
+AC_DEFUN([LF_CHECK_CXX_FLAG],[
+ echo 'void f(){}' > conftest.cc
+ for i in $1
+ do
+ AC_MSG_CHECKING([whether $CXX accepts $i])
+ if test -z "`${CXX} $i -c conftest.cc 2>&1`"
+ then
+ lf_CXXFLAGS="${lf_CXXFLAGS} $i"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+ rm -f conftest.cc conftest.o
+ AC_SUBST(lf_CXXFLAGS)
+])
+
+# --------------------------------------------------------------------------
+# Check whether the C compiler accepts a certain flag
+# If it does it adds the flag to lf_CFLAGS
+# If it does not then it returns an error to lf_ok
+# Usage:
+# LF_CHECK_CC_FLAG(-flag1 -flag2 -flag3 ...)
+# -------------------------------------------------------------------------
+
+AC_DEFUN([LF_CHECK_CC_FLAG],[
+ echo 'void f(){}' > conftest.c
+ for i in $1
+ do
+ AC_MSG_CHECKING([whether $CC accepts $i])
+ if test -z "`${CC} $i -c conftest.c 2>&1`"
+ then
+ lf_CFLAGS="${lf_CFLAGS} $i"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+ rm -f conftest.c conftest.o
+ AC_SUBST(lf_CFLAGS)
+])
+
+# --------------------------------------------------------------------------
+# Check whether the Fortran compiler accepts a certain flag
+# If it does it adds the flag to lf_FFLAGS
+# If it does not then it returns an error to lf_ok
+# Usage:
+# LF_CHECK_F77_FLAG(-flag1 -flag2 -flag3 ...)
+# -------------------------------------------------------------------------
+
+AC_DEFUN([LF_CHECK_F77_FLAG],[
+ cat << EOF > conftest.f
+c....:++++++++++++++++++++++++
+ PROGRAM MAIN
+ PRINT*,'Hello World!'
+ END
+EOF
+ for i in $1
+ do
+ AC_MSG_CHECKING([whether $F77 accepts $i])
+ if test -z "`${F77} $i -c conftest.f 2>&1`"
+ then
+ lf_FFLAGS="${lf_FFLAGS} $i"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+ rm -f conftest.f conftest.o
+ AC_SUBST(lf_FFLAGS)
+])
+
+# ----------------------------------------------------------------------
+# Enable compiler warnings.
+# Call this command AFTER you have configured ALL your compilers.
+# ----------------------------------------------------------------------
+
+AC_DEFUN([LF_SET_WARNINGS],[
+ dnl Warnings for the two main compilers
+ dnl add -Wextra when you're got time to fix a bunch of them ;-)
+ cc_warning_flags="-Wall -Werror-implicit-function-declaration"
+ cxx_warning_flags="-Wall -Woverloaded-virtual"
+ if test -n "${CC}"
+ then
+ LF_CHECK_CC_FLAG($cc_warning_flags)
+ fi
+ if test -n "${CXX}"
+ then
+ LF_CHECK_CXX_FLAG($cxx_warning_flags)
+ fi
+])
diff --git a/volk/config/lf_x11.m4 b/volk/config/lf_x11.m4
new file mode 100644
index 000000000..460cd605f
--- /dev/null
+++ b/volk/config/lf_x11.m4
@@ -0,0 +1,39 @@
+dnl Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu>
+dnl
+dnl This program 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 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program 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 this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a configuration
+dnl script generated by Autoconf, you may include it under the same
+dnl distribution terms that you use for the rest of that program.
+
+
+#-----------------------------------------------------------------------
+# This macro searches for Xlib and when it finds it it adds the
+# appropriate flags to CXXFLAGS and export the link sequence to
+# the variable XLIB.
+# In your configure.in file add:
+# LF_PATH_XLIB
+# In your Makefile.am add
+# program_LDADD = .... $(XLIB)
+#------------------------------------------------------------------------
+
+AC_DEFUN([LF_PATH_XLIB],[
+ AC_PATH_XTRA
+ CXXFLAGS="$CXXFLAGS $X_CFLAGS"
+ XLIB="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
+ AC_SUBST(XLIB)
+])
+
diff --git a/volk/config/lv_configure.m4 b/volk/config/lv_configure.m4
new file mode 100644
index 000000000..fc6a0a567
--- /dev/null
+++ b/volk/config/lv_configure.m4
@@ -0,0 +1,110 @@
+dnl all this stuff taken and modified from GNURADIO!
+dnl
+dnl LV_CONFIGURE
+dnl
+dnl Handles the bulk of the configure.ac work for an out-of-tree build
+dnl
+dnl You must invoke:
+dnl
+dnl AC_INIT(package_name,version)
+dnl AC_PREREQ(2.57)
+dnl AC_CONFIG_AUX_DIR([.])
+dnl
+dnl in configure.ac before LV_CONFIGURE
+dnl
+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([LV_CONFIGURE],
+[
+
+ AC_CONFIG_SRCDIR([config/lv_configure.m4])
+ AC_CONFIG_AUX_DIR([.])
+ AM_CONFIG_HEADER(config.h)
+
+ AC_CANONICAL_BUILD
+ AC_CANONICAL_HOST
+ AC_CANONICAL_TARGET
+
+ AM_INIT_AUTOMAKE(libvector,0.0svn)
+
+ LF_CONFIGURE_CC
+ LF_CONFIGURE_CXX
+ GR_LIB64 dnl check for lib64 suffix after choosing compilers
+
+ LV_GCC_VERSION_WORKAROUND
+ 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
+dnl GR_SET_GPROF
+dnl 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... important for qa
+ AC_DISABLE_STATIC dnl don't build static libraries... important for qa
+ m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
+ dnl GR_FORTRAN
+
+ GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
+dnl GR_SCRIPTING dnl Locate python, SWIG, etc
+
+dnl AC_ARG_WITH([python],
+dnl AC_HELP_STRING([--with-python], [Should we use python? [[default=yes]]]),
+dnl [case "$with_python" in
+dnl (no | yes) ;;
+dnl (*) AC_MSG_ERROR([Invalid argument ($with_python) to --with-python]) ;;
+dnl esac],
+dnl [with_python=yes])
+
+dnl AM_CONDITIONAL([USE_PYTHON], [test "$with_python" = yes])
+
+
+ dnl Set the c++ compiler that we use for the build system when cross compiling
+ 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
+
+ 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
+ GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS
+
+ LDFLAGS="$LDFLAGS $LIBGNURADIO_CORE_EXTRA_LDFLAGS"
+
+ AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
+ AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
+
+ dnl Define where to look for cppunit includes and libs
+ dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS
+ dnl Try using pkg-config first, then fall back to cppunit-config.
+ PKG_CHECK_EXISTS(cppunit,
+ [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)],
+ [AM_PATH_CPPUNIT([1.9.14],[],
+ [AC_MSG_ERROR([LIBVECTOR requires cppunit. Stop])])])
+
+dnl PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
+dnl LIBS="$LIBS $GNURADIO_CORE_LIBS"
+])
diff --git a/volk/config/mkstemp.m4 b/volk/config/mkstemp.m4
new file mode 100644
index 000000000..4af0f0a9b
--- /dev/null
+++ b/volk/config/mkstemp.m4
@@ -0,0 +1,89 @@
+#serial 4
+
+# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
+# silly limit that it can create no more than 26 files from a given template.
+# Other systems lack mkstemp altogether.
+# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create
+# only 32 files per process.
+# On systems like the above, arrange to use the replacement function.
+AC_DEFUN([UTILS_FUNC_MKSTEMP],
+[dnl
+ AC_REPLACE_FUNCS(mkstemp)
+ if test $ac_cv_func_mkstemp = no; then
+ utils_cv_func_mkstemp_limitations=yes
+ else
+ AC_CACHE_CHECK([for mkstemp limitations],
+ utils_cv_func_mkstemp_limitations,
+ [
+ AC_TRY_RUN([
+# include <stdlib.h>
+ int main ()
+ {
+ int i;
+ for (i = 0; i < 70; i++)
+ {
+ char template[] = "conftestXXXXXX";
+ int fd = mkstemp (template);
+ if (fd == -1)
+ exit (1);
+ close (fd);
+ }
+ exit (0);
+ }
+ ],
+ utils_cv_func_mkstemp_limitations=no,
+ utils_cv_func_mkstemp_limitations=yes,
+ utils_cv_func_mkstemp_limitations=yes
+ )
+ ]
+ )
+ fi
+
+ if test $utils_cv_func_mkstemp_limitations = yes; then
+ AC_LIBOBJ(mkstemp)
+ AC_LIBOBJ(tempname)
+ AC_DEFINE(mkstemp, rpl_mkstemp,
+ [Define to rpl_mkstemp if the replacement function should be used.])
+ gl_PREREQ_MKSTEMP
+ jm_PREREQ_TEMPNAME
+ fi
+])
+
+# Prerequisites of lib/mkstemp.c.
+AC_DEFUN([gl_PREREQ_MKSTEMP],
+[
+ AH_BOTTOM(
+ [
+ #ifndef HAVE_MKSTEMP
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ int rpl_mkstemp (char *templ);
+ #ifdef __cplusplus
+ }
+ #endif
+ #endif
+ ])
+])
+
+# Prerequisites of lib/tempname.c.
+AC_DEFUN([jm_PREREQ_TEMPNAME],
+[
+ AC_REQUIRE([AC_HEADER_STAT])
+ AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h)
+ AC_CHECK_HEADERS(stdint.h)
+ AC_CHECK_FUNCS(__secure_getenv gettimeofday lstat)
+ AC_CHECK_DECLS_ONCE(getenv)
+ # AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])
+
+ dnl Under Win32, mkdir prototype in io.h has only one arg
+ AC_MSG_CHECKING(whether mkdir accepts only one arg)
+ AC_TRY_COMPILE([#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>], [
+ mkdir("")
+ ], [ AC_MSG_RESULT(yes)
+ AC_DEFINE(MKDIR_TAKES_ONE_ARG,[],[Define if mkdir accepts only one arg]) ],
+ [ AC_MSG_RESULT(no)
+ ])
+])
diff --git a/volk/config/onceonly.m4 b/volk/config/onceonly.m4
new file mode 100644
index 000000000..f6fec37cb
--- /dev/null
+++ b/volk/config/onceonly.m4
@@ -0,0 +1,63 @@
+# onceonly.m4 serial 3
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl This file defines some "once only" variants of standard autoconf macros.
+dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
+dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
+dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
+dnl AC_REQUIRE([AC_HEADER_STDC]) like AC_HEADER_STDC
+dnl The advantage is that the check for each of the headers/functions/decls
+dnl will be put only once into the 'configure' file. It keeps the size of
+dnl the 'configure' file down, and avoids redundant output when 'configure'
+dnl is run.
+dnl The drawback is that the checks cannot be conditionalized. If you write
+dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
+dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
+dnl empty, and the check will be inserted before the body of the AC_DEFUNed
+dnl function.
+
+dnl Autoconf version 2.57 or newer is recommended.
+AC_PREREQ(2.54)
+
+# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
+# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
+AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
+ :
+ AC_FOREACH([gl_HEADER_NAME], [$1], [
+ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(defn([gl_HEADER_NAME]),
+ [-./], [___])), [
+ AC_CHECK_HEADERS(gl_HEADER_NAME)
+ ])
+ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
+ [-./], [___])))
+ ])
+])
+
+# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
+# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
+AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
+ :
+ AC_FOREACH([gl_FUNC_NAME], [$1], [
+ AC_DEFUN([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]), [
+ AC_CHECK_FUNCS(defn([gl_FUNC_NAME]))
+ ])
+ AC_REQUIRE([gl_CHECK_FUNC_]defn([gl_FUNC_NAME]))
+ ])
+])
+
+# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
+# AC_CHECK_DECLS(DECL1, DECL2, ...).
+AC_DEFUN([AC_CHECK_DECLS_ONCE], [
+ :
+ AC_FOREACH([gl_DECL_NAME], [$1], [
+ AC_DEFUN([gl_CHECK_DECL_]defn([gl_DECL_NAME]), [
+ AC_CHECK_DECLS(defn([gl_DECL_NAME]))
+ ])
+ AC_REQUIRE([gl_CHECK_DECL_]defn([gl_DECL_NAME]))
+ ])
+])
diff --git a/volk/config/pkg.m4 b/volk/config/pkg.m4
new file mode 100644
index 000000000..2d4d96109
--- /dev/null
+++ b/volk/config/pkg.m4
@@ -0,0 +1,201 @@
+# 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_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])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
+ dnl _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2])
+ _PKG_CONFIG([$1][_LIBS], [libs --static], [$2])
+ dnl prune out any -L/lib or -L/usr/lib since they're pointing to the wrong filesystem root
+ _pkg_tmp=
+ for flag in [$]pkg_cv_[$1][_LIBS]; do
+ case $flag in
+ (-L/lib* | -L/usr/lib* ) ;; # ignore
+ (*) _pkg_tmp="$_pkg_tmp $flag" ;;
+ esac
+ done
+ pkg_cv_[$1][_LIBS]="$_pkg_tmp"
+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.
+
+_PKG_TEXT
+
+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