mirror of https://gerrit.osmocom.org/libusrp
Extract libusrp, adjust to be buildable standalone
* $ git \ filter-branch \ --prune-empty \ --tree-filter \ 'find \! -path "./usrp/*" -a -type f -delete' \ HEAD * Craft custom configure.ac * Update m4 macros * Small fixes here and there The code in doc/, firmware/ and host/swig does _not_ build at the moment, due to m4 macros not being adhered and is disabled therefore.
This commit is contained in:
parent
d736692415
commit
ec6adccbbd
|
@ -1,3 +1,5 @@
|
|||
*.o
|
||||
|
||||
/*.cache
|
||||
/*.la
|
||||
/*.lo
|
||||
|
@ -29,3 +31,6 @@
|
|||
/stamp-h.in
|
||||
/stamp-h1
|
||||
/usrp.iss
|
||||
/compile
|
||||
/config.guess
|
||||
/config.sub
|
||||
|
|
|
@ -21,12 +21,14 @@
|
|||
|
||||
include $(top_srcdir)/Makefile.common
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST += \
|
||||
usrp.pc.in \
|
||||
usrp.iss.in \
|
||||
usrp.inf
|
||||
|
||||
SUBDIRS = host firmware fpga doc
|
||||
SUBDIRS = host fpga
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = \
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
# -*- Makefile -*-
|
||||
#
|
||||
# Copyright 2004,2006,2007,2008,2009,2010 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.
|
||||
#
|
||||
|
||||
# Every Makefile starts with common vars so we can
|
||||
# consistently use +=
|
||||
BUILT_SOURCES =
|
||||
CLEANFILES = guile.log
|
||||
DISTCLEANFILES =
|
||||
EXTRA_DIST =
|
||||
STAMPS =
|
||||
|
||||
|
||||
# Make rebuilds less verbose with stuff we can safely ignore
|
||||
# about GNU make only extensions.
|
||||
AUTOMAKE += -Wno-portability -Wnone
|
||||
|
||||
#AM_CFLAGS = @autoconf_default_CFLAGS@ @lf_CFLAGS@
|
||||
#AM_CXXFLAGS = @autoconf_default_CXXFLAGS@ @lf_CXXFLAGS@
|
||||
|
||||
# Sets ABI version in SONAME and appends -LIBVER to filename
|
||||
LTVERSIONFLAGS = -version-info 0:0:0 -release $(VERSION)
|
||||
|
||||
# includes
|
||||
grincludedir = $(includedir)/gnuradio
|
||||
|
||||
# swig includes
|
||||
swigincludedir = $(grincludedir)/swig
|
||||
|
||||
# Guile scheme code ends up under here:
|
||||
guiledir = $(prefix)/share/guile/site
|
||||
|
||||
# Install the gnuradio stuff in the appropriate subdirectory
|
||||
# This usually ends up at:
|
||||
# ${prefix}/lib/python${python_version}/site-packages/gnuradio
|
||||
|
||||
grpythondir = $(pythondir)/gnuradio
|
||||
grpyexecdir = $(pyexecdir)/gnuradio
|
||||
|
||||
# Install the non-gnuradio usrp stuff in the appropriate subdirectory
|
||||
# This usually ends up at:
|
||||
# ${prefix}/lib/python${python_version}/site-packages/usrpm
|
||||
|
||||
usrppythondir = $(pythondir)/usrpm
|
||||
usrppyexecdir = $(pyexecdir)/usrpm
|
||||
|
||||
# gcell includes
|
||||
gcellincludedir = $(includedir)/gcell
|
||||
gcellspuincludedir = $(includedir)/gcell/spu
|
||||
|
||||
# Cell spu libs
|
||||
libspudir = $(libdir)spu
|
||||
|
||||
# This used to be set in configure.ac but is now defined here for all
|
||||
# Makefiles when this fragment is included.
|
||||
STD_DEFINES_AND_INCLUDES = $(DEFINES) $(GNURADIO_INCLUDES) \
|
||||
$(GRUEL_INCLUDES) $(VOLK_INCLUDES) $(BOOST_CPPFLAGS)
|
||||
|
||||
# when including for compilation from pre-installed libraries and such,
|
||||
# need to make sure those are put last on the compile command
|
||||
WITH_INCLUDES = #@with_INCLUDES@
|
||||
WITH_SWIG_INCLUDES = @with_SWIG_INCLUDES@
|
||||
|
||||
# Where to find gnuradio include files in the current build tree
|
||||
# top_srcdir for original stuff, top_builddir for generated files
|
||||
GNURADIO_INCLUDES = @gnuradio_core_INCLUDES@
|
||||
|
||||
# How to link in GNU Radio core library from inside the tree
|
||||
GNURADIO_CORE_LA = @gnuradio_core_LA@
|
||||
|
||||
# How to link in the GRUEL library from inside the tree
|
||||
GRUEL_INCLUDES = @gruel_INCLUDES@
|
||||
GRUEL_LA = @gruel_LA@
|
||||
|
||||
# How to link in the VOLK library from inside the tree
|
||||
VOLK_INCLUDES = @volk_INCLUDES@
|
||||
VOLK_LA = @volk_LA@
|
||||
|
||||
# How to link in the USRP library from inside the tree
|
||||
USRP_INCLUDES = \
|
||||
-I$(abs_top_srcdir)/ost/include \
|
||||
-I$(abs_top_builddir)/host/include \
|
||||
-I$(abs_top_srcdir)/firmware/include \
|
||||
$(NULL)
|
||||
USRP_LA = $(abs_top_builddir)/host/lib/libusrp.la
|
||||
|
||||
# How to link the gcell library from inside the tree (the PPU part)
|
||||
GCELL_INCLUDES = @gcell_INCLUDES@
|
||||
GCELL_LA = @gcell_LA@
|
||||
|
||||
# How to link the gcell library from inside the tree (the SPU part)
|
||||
GCELL_SPU_INCLUDES = @gcell_spu_INCLUDES@
|
||||
GCELL_SPU_LA = @gcell_spu_LA@
|
||||
|
||||
# libtool aware wrapper for ppu-embedspu
|
||||
GCELL_EMBEDSPU_LIBTOOL = @abs_top_srcdir@/gcell/lib/runtime/gcell-embedspu-libtool
|
||||
|
||||
# Fix for BSD make not defining $(RM). 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
|
||||
|
||||
RUN_GUILE = GUILE_LOAD_PATH="@abs_top_srcdir@/gruel/src/scheme" @GUILE@ -e main -s
|
||||
|
||||
# Base directory for example applications
|
||||
exampledir = $(datadir)/gnuradio/examples
|
||||
|
||||
# Base directory for documentation (docdir undefined in autoconf < 1.60)
|
||||
docdir ?= $(datadir)/doc/$(PACKAGE)
|
||||
gr_docdir = $(docdir)-$(DOCVER)
|
||||
|
||||
# System configuration files
|
||||
gr_prefsdir = $(GR_PREFSDIR)
|
||||
|
||||
# Data directory for grc block wrappers
|
||||
grc_blocksdir = $(pkgdatadir)/grc/blocks
|
||||
|
||||
# Other common defines; use "+=" to add to these
|
||||
MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT \
|
||||
.unittests/* .unittests/python/*
|
|
@ -0,0 +1,77 @@
|
|||
# -*- 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.
|
||||
#
|
||||
|
||||
STAMPS ?=
|
||||
EXTRA_DIST ?=
|
||||
MOSTLYCLEANFILES ?=
|
||||
|
||||
## ----------------------------------------------------------------
|
||||
## Special rules for generating sources. Include this file when there
|
||||
## are multiple targets ('gen_sources') being created using a single
|
||||
## command. In this case, parallel build protection is required, and
|
||||
## is provided by this file using a reasonably generic ruleset. For
|
||||
## more info, see:
|
||||
##
|
||||
## http://sources.redhat.com/automake/automake.html#Multiple-Outputs
|
||||
##
|
||||
## If a single source is being created, then normal rules can be used;
|
||||
## using this parallel protection will not hurt, but it also won't help.
|
||||
##
|
||||
## Define the variable 'par_gen_command' to be the command that
|
||||
## creates the sources 'gen_sources' from the dependency files
|
||||
## 'gen_sources_deps'.
|
||||
##
|
||||
|
||||
## These STAMPS will be removed upon "make clean", but are otherwise
|
||||
## not used.
|
||||
|
||||
STAMPS += $(DEPDIR)/stamp-sources-generate*
|
||||
|
||||
## The following STAMP will be included in the archive, to show that
|
||||
## this these rules have been followed.
|
||||
|
||||
EXTRA_DIST += stamp-sources-generate
|
||||
MOSTLYCLEANFILES += stamp-sources-generate
|
||||
|
||||
stamp-sources-generate: $(gen_sources_deps)
|
||||
@rm -f $(DEPDIR)/stamp-sources-generate-tmp
|
||||
@touch $(DEPDIR)/stamp-sources-generate-tmp
|
||||
$(par_gen_command)
|
||||
@mv -f $(DEPDIR)/stamp-sources-generate-tmp $@
|
||||
|
||||
$(gen_sources): stamp-sources-generate
|
||||
## Recover from the removal of $@
|
||||
@if test -f $@; then :; else \
|
||||
trap 'rm -rf $(DEPDIR)/stamp-sources-generate-*' 1 2 13 15; \
|
||||
if mkdir $(DEPDIR)/stamp-sources-generate-lock 2>/dev/null; then \
|
||||
## This code is being executed by the first process.
|
||||
rm -f stamp-sources-generate; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-sources-generate; \
|
||||
rmdir $(DEPDIR)/stamp-sources-generate-lock; \
|
||||
else \
|
||||
## This code is being executed by the follower processes.
|
||||
## Wait until the first process is done.
|
||||
while test -d $(DEPDIR)/stamp-sources-generate-lock; do sleep 1; done; \
|
||||
## Succeed iff the first process succeeded.
|
||||
test -f stamp-sources-generate; exit $$?; \
|
||||
fi; \
|
||||
fi;
|
|
@ -0,0 +1,208 @@
|
|||
# -*- Makefile -*-
|
||||
#
|
||||
# Copyright 2009,2010 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.
|
||||
|
||||
|
||||
## include the built Makefile.swig.gen, always the one from the srcdir
|
||||
include $(srcdir)/Makefile.swig.gen
|
||||
|
||||
|
||||
## 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 .
|
||||
|
||||
STD_SWIG_PYTHON_ARGS = \
|
||||
$(SWIG_PYTHON_FLAGS) \
|
||||
$(STD_DEFINES_AND_INCLUDES) \
|
||||
$(WITH_SWIG_INCLUDES) \
|
||||
$(WITH_INCLUDES)
|
||||
|
||||
# NOTE: -Linkage passive and -Linkage module don't define SWIG_init()
|
||||
SWIG_GUILE_FLAGS = \
|
||||
-guile \
|
||||
-scm \
|
||||
-scmstub \
|
||||
-package gnuradio \
|
||||
-Linkage module \
|
||||
-proxy \
|
||||
-goopsprefix gr: \
|
||||
-emit-slot-accessors \
|
||||
-emit-setters \
|
||||
-outdir .
|
||||
|
||||
## standard swig flags used by most components
|
||||
|
||||
STD_SWIG_GUILE_ARGS = \
|
||||
$(SWIG_GUILE_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@
|
||||
|
||||
# We drive the dependencies off of swig_built_sources. This variable
|
||||
# ends up containing only the generated .py and/or .scm files, not the .h
|
||||
# or .cc files. This allows us to use the pattern rules defined
|
||||
# below to generate all the pieces without the parallel make
|
||||
# problems that occur when both the .py's and .cc's are in swig_built_sources.
|
||||
|
||||
swig_built_sources =
|
||||
|
||||
# swig_all_built_sources contains swig_built_sources plus the .cc and .h files.
|
||||
# It contains the files to remove from the distribution and the files to
|
||||
# remove for make clean.
|
||||
|
||||
swig_all_built_sources =
|
||||
|
||||
if PYTHON
|
||||
# Create a list of .py files based on the top level .i files.
|
||||
PYTHON_GEN = $(foreach IFILE,$(TOP_SWIG_IFILES), $(subst .i,.py,$(IFILE)))
|
||||
swig_built_sources += $(PYTHON_GEN)
|
||||
swig_all_built_sources += $(PYTHON_GEN)
|
||||
|
||||
# Now add .h, .cc to _all_
|
||||
swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,python/%.h,$(IFILE)))
|
||||
swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,python/%.cc,$(IFILE)))
|
||||
endif
|
||||
|
||||
if GUILE
|
||||
# Create a list of .scm files based on the top level .i files.
|
||||
GUILE_GEN = $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%.scm,$(IFILE)))
|
||||
swig_built_sources += $(GUILE_GEN)
|
||||
swig_all_built_sources += $(GUILE_GEN)
|
||||
|
||||
# Now add -primitive.scm, .cc to _all_
|
||||
swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%-primitive.scm,$(IFILE)))
|
||||
swig_all_built_sources += $(foreach IFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,guile/%.cc,$(IFILE)))
|
||||
endif
|
||||
|
||||
# N.B. Only $(swig_built_sources), not $(swig_all_built_sources)
|
||||
BUILT_SOURCES += $(swig_built_sources)
|
||||
|
||||
# Don't distribute any of the swig generated files
|
||||
no_dist_files = $(swig_all_built_sources)
|
||||
|
||||
CLEANFILES += $(swig_all_built_sources)
|
||||
CLEANFILES += python/*.lo python/*.o python/*.d
|
||||
CLEANFILES += guile/*.lo guile/*.o guile/*.d
|
||||
|
||||
|
||||
## SWIG suffixes for automake to know about
|
||||
SUFFIXES = .i .scm .py
|
||||
|
||||
# Compile a .i to what guile needs. We use -o to set the output file name,
|
||||
# or even with -outdir guile in SWIG_GUILE_ARGS, swig keeps putting a
|
||||
# gnuradio_core_*_wrap.cxx in the source directory.
|
||||
gnuradio/%.scm : %.i
|
||||
@echo "Compile .i to .scm"
|
||||
@test -d "guile" || $(mkinstalldirs) "guile"
|
||||
@test -d "gnuradio" || $(mkinstalldirs) "gnuradio"
|
||||
$(SWIG) $(STD_SWIG_GUILE_ARGS) $($*_swig_args) \
|
||||
-MD -MF guile/$*.Std \
|
||||
-module $* -o guile/$*.cc $<
|
||||
$(SED) -e 's|guile/\(.*\)\.cc:|gnuradio/\1.scm:|' guile/$*.Std > guile/$*.d
|
||||
$(SED) -i -e 's/<--dummy-[0-9]\+-->/<top>/g' gnuradio/$*.scm
|
||||
$(SED) -i -e 's/^(export /(export-safely /' gnuradio/$*.scm
|
||||
$(RM) guile/$*.Std
|
||||
|
||||
# Compile a .i file to what python needs
|
||||
.i.py:
|
||||
@echo "Compile .i to .py"
|
||||
@test -d "python" || $(mkinstalldirs) "python"
|
||||
$(SWIG) $(STD_SWIG_PYTHON_ARGS) $($*_swig_args) \
|
||||
-MD -MF python/$*.Std \
|
||||
-module $* -o python/$*.cc -oh python/$*.h $<
|
||||
$(SED) -e 's|python/\(.*\)\.cc:|\1.py:|' python/$*.Std > python/$*.d
|
||||
$(RM) python/$*.Std
|
||||
|
||||
## ------------------------------------------------------------------------
|
||||
## Rule that (re)generates Makefile.swig.gen using TOP_SWIG_IFILES and
|
||||
## Makefile.swig.gen.t
|
||||
##
|
||||
## 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.genX: $(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;
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
# -*- 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)
|
||||
|
||||
# The .so libraries for the guile modules get installed whereever guile
|
||||
# is installed, usually /usr/lib/guile/gnuradio/
|
||||
# FIXME: determince whether these should be installed with gnuradio.
|
||||
@NAME@_scmlibdir = $(libdir)
|
||||
|
||||
# The scm files for the guile modules get installed where ever guile
|
||||
# is installed, usually /usr/share/guile/site/@NAME@
|
||||
# FIXME: determince whether these should be installed with gnuradio.
|
||||
@NAME@_scmdir = $(guiledir)
|
||||
|
||||
## 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 >
|
||||
|
||||
## Other cleaned files: dependency files generated by SWIG or this Makefile
|
||||
|
||||
MOSTLYCLEANFILES += $(DEPDIR)/*.S*
|
||||
|
||||
## 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)
|
||||
|
||||
if PYTHON
|
||||
@NAME@_pylib_LTLIBRARIES = \
|
||||
_@NAME@.la
|
||||
|
||||
_@NAME@_la_SOURCES = \
|
||||
python/@NAME@.cc \
|
||||
$(@NAME@_la_swig_sources)
|
||||
|
||||
@NAME@_python_PYTHON = \
|
||||
@NAME@.py \
|
||||
$(@NAME@_python)
|
||||
|
||||
_@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) \
|
||||
-I$(top_builddir) \
|
||||
$(@NAME@_la_swig_cxxflags)
|
||||
|
||||
python/@NAME@.cc: @NAME@.py
|
||||
@NAME@.py: @NAME@.i
|
||||
|
||||
# Include the python dependencies for this file
|
||||
-include python/@NAME@.d
|
||||
|
||||
endif # end of if python
|
||||
|
||||
if GUILE
|
||||
|
||||
@NAME@_scmlib_LTLIBRARIES = \
|
||||
libguile-gnuradio-@NAME@.la
|
||||
libguile_gnuradio_@NAME@_la_SOURCES = \
|
||||
guile/@NAME@.cc \
|
||||
$(@NAME@_la_swig_sources)
|
||||
nobase_@NAME@_scm_DATA = \
|
||||
gnuradio/@NAME@.scm \
|
||||
gnuradio/@NAME@-primitive.scm
|
||||
libguile_gnuradio_@NAME@_la_LIBADD = \
|
||||
$(STD_SWIG_LA_LIB_ADD) \
|
||||
$(@NAME@_la_swig_libadd)
|
||||
libguile_gnuradio_@NAME@_la_LDFLAGS = \
|
||||
$(STD_SWIG_LA_LD_FLAGS) \
|
||||
$(@NAME@_la_swig_ldflags)
|
||||
libguile_gnuradio_@NAME@_la_CXXFLAGS = \
|
||||
$(STD_SWIG_CXX_FLAGS) \
|
||||
-I$(top_builddir) \
|
||||
$(@NAME@_la_swig_cxxflags)
|
||||
|
||||
guile/@NAME@.cc: gnuradio/@NAME@.scm
|
||||
gnuradio/@NAME@.scm: @NAME@.i
|
||||
gnuradio/@NAME@-primitive.scm: gnuradio/@NAME@.scm
|
||||
|
||||
# Include the guile dependencies for this file
|
||||
-include guile/@NAME@.d
|
||||
|
||||
endif # end of GUILE
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
AC_INIT([libusrp], [3.4.2])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects silent-rules])
|
||||
AM_SILENT_RULES([yes])
|
||||
|
||||
AC_CONFIG_MACRO_DIRS([m4])
|
||||
|
||||
AC_PROG_CXX
|
||||
|
||||
LT_INIT([pic-only disable-static])
|
||||
|
||||
PKG_CHECK_MODULES([USB], [libusb-1.0])
|
||||
|
||||
AX_BOOST_BASE([1.37], [true], [AC_MSG_ERROR([boost is required, bailing out])])
|
||||
|
||||
AX_BOOST_THREAD
|
||||
CXXFLAGS="$CXXFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar
|
||||
CFLAGS="$CFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar
|
||||
|
||||
dnl
|
||||
dnl all the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo>
|
||||
dnl
|
||||
AX_BOOST_DATE_TIME
|
||||
AX_BOOST_FILESYSTEM
|
||||
dnl AX_BOOST_IOSTREAMS
|
||||
AX_BOOST_PROGRAM_OPTIONS
|
||||
dnl AX_BOOST_REGEX
|
||||
dnl AX_BOOST_SERIALIZATION
|
||||
dnl AX_BOOST_SIGNALS
|
||||
AX_BOOST_SYSTEM
|
||||
dnl AX_BOOST_TEST_EXEC_MONITOR
|
||||
dnl AX_BOOST_UNIT_TEST_FRAMEWORK
|
||||
dnl AX_BOOST_WSERIALIZATION
|
||||
|
||||
# Allow user to choose whether to generate SWIG/Python
|
||||
# Default is enabled
|
||||
AC_ARG_ENABLE([python],
|
||||
[AS_HELP_STRING([--enable-python],
|
||||
[generate SWIG/Python components (default is yes)])],
|
||||
[case "${enableval}" in
|
||||
yes) enable_python=yes ;;
|
||||
no) enable_python=no ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
|
||||
esac],
|
||||
[enable_python=no]
|
||||
)
|
||||
|
||||
# Allow user to choose whether to generate SWIG/Guile
|
||||
# Default is disabled
|
||||
AC_ARG_ENABLE([guile],
|
||||
[AS_HELP_STRING([--enable-guile],
|
||||
[generate SWIG/Guile components (default is no)])],
|
||||
[case "${enableval}" in
|
||||
yes) enable_guile=yes ;;
|
||||
no) enable_guile=no ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-guile]) ;;
|
||||
esac],
|
||||
[enable_guile=no]
|
||||
)
|
||||
|
||||
AM_PATH_PYTHON
|
||||
|
||||
AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes])
|
||||
AM_CONDITIONAL([GUILE], [test x$enable_guile = xyes])
|
||||
|
||||
AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
|
||||
AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
usrp.pc
|
||||
usrp.iss
|
||||
doc/Doxyfile
|
||||
doc/Makefile
|
||||
doc/other/Makefile
|
||||
host/Makefile
|
||||
host/include/Makefile
|
||||
host/include/usrp/Makefile
|
||||
host/include/usrp/libusb_types.h
|
||||
host/misc/Makefile
|
||||
host/lib/Makefile
|
||||
host/lib/std_paths.h
|
||||
host/swig/Makefile
|
||||
host/apps/Makefile
|
||||
firmware/Makefile
|
||||
firmware/include/Makefile
|
||||
firmware/lib/Makefile
|
||||
firmware/src/Makefile
|
||||
firmware/src/common/Makefile
|
||||
firmware/src/usrp2/Makefile
|
||||
fpga/Makefile
|
||||
fpga/rbf/Makefile
|
||||
fpga/rbf/rev2/Makefile
|
||||
fpga/rbf/rev4/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
|
@ -44,7 +44,7 @@ DOCBOOK_HTML_FILES=
|
|||
all-local: dox
|
||||
endif
|
||||
|
||||
dist_usrp_doc_DATA = $(top_srcdir)/usrp/README
|
||||
dist_usrp_doc_DATA = $(top_srcdir)/README
|
||||
|
||||
dox: html/index.html
|
||||
html/index.html:
|
||||
|
@ -54,7 +54,7 @@ html/index.html:
|
|||
docbook-html: usrp_guide.html
|
||||
|
||||
usrp_guide.html: usrp_guide.xml
|
||||
xmlto html-nochunks $(top_srcdir)/usrp/doc/usrp_guide.xml
|
||||
xmlto html-nochunks $(top_srcdir)/doc/usrp_guide.xml
|
||||
|
||||
install-data-local:
|
||||
$(MKDIR_P) $(DESTDIR)$(usrp_docdir)/html
|
||||
|
|
|
@ -23,16 +23,9 @@
|
|||
#ifndef _LIBUSB_TYPES_H_
|
||||
#define _LIBUSB_TYPES_H_
|
||||
|
||||
#if @USE_LIBUSB1@
|
||||
#include <libusb-1.0/libusb.h>
|
||||
struct libusb_device;
|
||||
struct libusb_device_handle;
|
||||
struct libusb_device_descriptor;
|
||||
#else
|
||||
#include <usb.h>
|
||||
typedef struct usb_device libusb_device;
|
||||
typedef struct usb_dev_handle libusb_device_handle;
|
||||
typedef struct usb_device_descriptor libusb_device_descriptor;
|
||||
#endif
|
||||
|
||||
#endif /* _LIBUSB_TYPES_H_ */
|
||||
|
|
|
@ -31,16 +31,9 @@ libusrp_la_common_LIBADD = \
|
|||
$(BOOST_THREAD_LIB) \
|
||||
../misc/libmisc.la
|
||||
|
||||
# darwin fusb requires gruel (for threading)
|
||||
if FUSB_TECH_darwin
|
||||
AM_CPPFLAGS = $(GRUEL_INCLUDES) $(common_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
|
||||
libusrp_la_LIBADD = $(libusrp_la_common_LIBADD) $(GRUEL_LA)
|
||||
libusrp_la_LDFLAGS = $(libusrp_la_common_LDFLAGS) -framework CoreFoundation
|
||||
else
|
||||
AM_CPPFLAGS = $(common_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)
|
||||
libusrp_la_LIBADD = $(libusrp_la_common_LIBADD)
|
||||
libusrp_la_LDFLAGS = $(libusrp_la_common_LDFLAGS)
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
std_paths.h.in \
|
||||
|
@ -132,30 +125,7 @@ libusrp_la_common_SOURCES = \
|
|||
db_dtt768.cc \
|
||||
db_util.cc
|
||||
|
||||
if FUSB_TECH_generic
|
||||
libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(generic_CODE)
|
||||
endif
|
||||
|
||||
if FUSB_TECH_darwin
|
||||
libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(darwin_CODE)
|
||||
endif
|
||||
|
||||
if FUSB_TECH_win32
|
||||
libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(win32_CODE)
|
||||
endif
|
||||
|
||||
if FUSB_TECH_linux
|
||||
libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(linux_CODE)
|
||||
endif
|
||||
|
||||
if FUSB_TECH_ra_wb
|
||||
libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(ra_wb_CODE)
|
||||
endif
|
||||
|
||||
if FUSB_TECH_libusb1
|
||||
libusrp_la_SOURCES = $(libusrp_la_common_SOURCES) $(libusb1_CODE)
|
||||
endif
|
||||
|
||||
|
||||
noinst_HEADERS = \
|
||||
ad9862.h \
|
||||
|
|
|
@ -1,145 +0,0 @@
|
|||
# -*- 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 usrp_prims.i
|
||||
|
||||
## Default install locations for these files:
|
||||
##
|
||||
## Default location for the Python directory is:
|
||||
## ${prefix}/lib/python${python_version}/site-packages/[category]/usrp_prims
|
||||
## Default location for the Python exec directory is:
|
||||
## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/usrp_prims
|
||||
##
|
||||
## 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.
|
||||
|
||||
usrp_prims_pythondir_category ?= gnuradio/usrp_prims
|
||||
usrp_prims_pylibdir_category ?= $(usrp_prims_pythondir_category)
|
||||
usrp_prims_pythondir = $(pythondir)/$(usrp_prims_pythondir_category)
|
||||
usrp_prims_pylibdir = $(pyexecdir)/$(usrp_prims_pylibdir_category)
|
||||
|
||||
# The .so libraries for the guile modules get installed whereever guile
|
||||
# is installed, usually /usr/lib/guile/gnuradio/
|
||||
# FIXME: determince whether these should be installed with gnuradio.
|
||||
usrp_prims_scmlibdir = $(libdir)
|
||||
|
||||
# The scm files for the guile modules get installed where ever guile
|
||||
# is installed, usually /usr/share/guile/site/usrp_prims
|
||||
# FIXME: determince whether these should be installed with gnuradio.
|
||||
usrp_prims_scmdir = $(guiledir)
|
||||
|
||||
## SWIG headers are always installed into the same directory.
|
||||
|
||||
usrp_prims_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 >
|
||||
|
||||
## Other cleaned files: dependency files generated by SWIG or this Makefile
|
||||
|
||||
MOSTLYCLEANFILES += $(DEPDIR)/*.S*
|
||||
|
||||
## Various SWIG variables. These can be overloaded in the including
|
||||
## Makefile.am by setting the variable value there, then including
|
||||
## Makefile.swig .
|
||||
|
||||
usrp_prims_swiginclude_HEADERS = \
|
||||
usrp_prims.i \
|
||||
$(usrp_prims_swiginclude_headers)
|
||||
|
||||
if PYTHON
|
||||
usrp_prims_pylib_LTLIBRARIES = \
|
||||
_usrp_prims.la
|
||||
|
||||
_usrp_prims_la_SOURCES = \
|
||||
python/usrp_prims.cc \
|
||||
$(usrp_prims_la_swig_sources)
|
||||
|
||||
usrp_prims_python_PYTHON = \
|
||||
usrp_prims.py \
|
||||
$(usrp_prims_python)
|
||||
|
||||
_usrp_prims_la_LIBADD = \
|
||||
$(STD_SWIG_LA_LIB_ADD) \
|
||||
$(usrp_prims_la_swig_libadd)
|
||||
|
||||
_usrp_prims_la_LDFLAGS = \
|
||||
$(STD_SWIG_LA_LD_FLAGS) \
|
||||
$(usrp_prims_la_swig_ldflags)
|
||||
|
||||
_usrp_prims_la_CXXFLAGS = \
|
||||
$(STD_SWIG_CXX_FLAGS) \
|
||||
-I$(top_builddir) \
|
||||
$(usrp_prims_la_swig_cxxflags)
|
||||
|
||||
python/usrp_prims.cc: usrp_prims.py
|
||||
usrp_prims.py: usrp_prims.i
|
||||
|
||||
# Include the python dependencies for this file
|
||||
-include python/usrp_prims.d
|
||||
|
||||
endif # end of if python
|
||||
|
||||
if GUILE
|
||||
|
||||
usrp_prims_scmlib_LTLIBRARIES = \
|
||||
libguile-gnuradio-usrp_prims.la
|
||||
libguile_gnuradio_usrp_prims_la_SOURCES = \
|
||||
guile/usrp_prims.cc \
|
||||
$(usrp_prims_la_swig_sources)
|
||||
nobase_usrp_prims_scm_DATA = \
|
||||
gnuradio/usrp_prims.scm \
|
||||
gnuradio/usrp_prims-primitive.scm
|
||||
libguile_gnuradio_usrp_prims_la_LIBADD = \
|
||||
$(STD_SWIG_LA_LIB_ADD) \
|
||||
$(usrp_prims_la_swig_libadd)
|
||||
libguile_gnuradio_usrp_prims_la_LDFLAGS = \
|
||||
$(STD_SWIG_LA_LD_FLAGS) \
|
||||
$(usrp_prims_la_swig_ldflags)
|
||||
libguile_gnuradio_usrp_prims_la_CXXFLAGS = \
|
||||
$(STD_SWIG_CXX_FLAGS) \
|
||||
-I$(top_builddir) \
|
||||
$(usrp_prims_la_swig_cxxflags)
|
||||
|
||||
guile/usrp_prims.cc: gnuradio/usrp_prims.scm
|
||||
gnuradio/usrp_prims.scm: usrp_prims.i
|
||||
gnuradio/usrp_prims-primitive.scm: gnuradio/usrp_prims.scm
|
||||
|
||||
# Include the guile dependencies for this file
|
||||
-include guile/usrp_prims.d
|
||||
|
||||
endif # end of GUILE
|
||||
|
||||
|
|
@ -0,0 +1,301 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_base.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for the Boost C++ libraries of a particular version (or newer)
|
||||
#
|
||||
# If no path to the installed boost library is given the macro searchs
|
||||
# under /usr, /usr/local, /opt and /opt/local and evaluates the
|
||||
# $BOOST_ROOT environment variable. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Peter Adolphs
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 43
|
||||
|
||||
# example boost program (need to pass version)
|
||||
m4_define([_AX_BOOST_BASE_PROGRAM],
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <boost/version.hpp>
|
||||
]],[[
|
||||
(void) ((void)sizeof(char[1 - 2*!!((BOOST_VERSION) < ($1))]));
|
||||
]])])
|
||||
|
||||
AC_DEFUN([AX_BOOST_BASE],
|
||||
[
|
||||
AC_ARG_WITH([boost],
|
||||
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
|
||||
[use Boost library from a standard location (ARG=yes),
|
||||
from the specified location (ARG=<path>),
|
||||
or disable it (ARG=no)
|
||||
@<:@ARG=yes@:>@ ])],
|
||||
[
|
||||
AS_CASE([$withval],
|
||||
[no],[want_boost="no";_AX_BOOST_BASE_boost_path=""],
|
||||
[yes],[want_boost="yes";_AX_BOOST_BASE_boost_path=""],
|
||||
[want_boost="yes";_AX_BOOST_BASE_boost_path="$withval"])
|
||||
],
|
||||
[want_boost="yes"])
|
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir],
|
||||
[AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
|
||||
[Force given directory for boost libraries.
|
||||
Note that this will override library path detection,
|
||||
so use this parameter only if default library detection fails
|
||||
and you know exactly where your boost libraries are located.])],
|
||||
[
|
||||
AS_IF([test -d "$withval"],
|
||||
[_AX_BOOST_BASE_boost_lib_path="$withval"],
|
||||
[AC_MSG_ERROR([--with-boost-libdir expected directory name])])
|
||||
],
|
||||
[_AX_BOOST_BASE_boost_lib_path=""])
|
||||
|
||||
BOOST_LDFLAGS=""
|
||||
BOOST_CPPFLAGS=""
|
||||
AS_IF([test "x$want_boost" = "xyes"],
|
||||
[_AX_BOOST_BASE_RUNDETECT([$1],[$2],[$3])])
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
AC_SUBST(BOOST_LDFLAGS)
|
||||
])
|
||||
|
||||
|
||||
# convert a version string in $2 to numeric and affect to polymorphic var $1
|
||||
AC_DEFUN([_AX_BOOST_BASE_TONUMERICVERSION],[
|
||||
AS_IF([test "x$2" = "x"],[_AX_BOOST_BASE_TONUMERICVERSION_req="1.20.0"],[_AX_BOOST_BASE_TONUMERICVERSION_req="$2"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_shorten=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_major=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '\([[0-9]]*\)'`
|
||||
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_major" = "x"],
|
||||
[AC_MSG_ERROR([You should at least specify libboost major version])])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.\([[0-9]]*\)'`
|
||||
AS_IF([test "x$_AX_BOOST_BASE_TONUMERICVERSION_req_minor" = "x"],
|
||||
[_AX_BOOST_BASE_TONUMERICVERSION_req_minor="0"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
|
||||
AS_IF([test "X$_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor" = "X"],
|
||||
[_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor="0"])
|
||||
_AX_BOOST_BASE_TONUMERICVERSION_RET=`expr $_AX_BOOST_BASE_TONUMERICVERSION_req_major \* 100000 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_minor \* 100 \+ $_AX_BOOST_BASE_TONUMERICVERSION_req_sub_minor`
|
||||
AS_VAR_SET($1,$_AX_BOOST_BASE_TONUMERICVERSION_RET)
|
||||
])
|
||||
|
||||
dnl Run the detection of boost should be run only if $want_boost
|
||||
AC_DEFUN([_AX_BOOST_BASE_RUNDETECT],[
|
||||
_AX_BOOST_BASE_TONUMERICVERSION(WANT_BOOST_VERSION,[$1])
|
||||
succeeded=no
|
||||
|
||||
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib.
|
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to
|
||||
dnl this (as it rises problems for generic multi-arch support).
|
||||
dnl The last entry in the list is chosen by default when no libraries
|
||||
dnl are found, e.g. when only header-only libraries are installed!
|
||||
AS_CASE([${host_cpu}],
|
||||
[x86_64],[libsubdirs="lib64 libx32 lib lib64"],
|
||||
[ppc64|s390x|sparc64|aarch64|ppc64le],[libsubdirs="lib64 lib lib64"],
|
||||
[libsubdirs="lib"]
|
||||
)
|
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give
|
||||
dnl them priority over the other paths since, if libs are found there, they
|
||||
dnl are almost assuredly the ones desired.
|
||||
AS_CASE([${host_cpu}],
|
||||
[i?86],[multiarch_libsubdir="lib/i386-${host_os}"],
|
||||
[multiarch_libsubdir="lib/${host_cpu}-${host_os}"]
|
||||
)
|
||||
|
||||
dnl first we check the system location for boost libraries
|
||||
dnl this location ist chosen if boost libraries are installed with the --layout=system option
|
||||
dnl or if you install boost with RPM
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include"
|
||||
for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"])
|
||||
AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[
|
||||
AC_MSG_RESULT([yes])
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp";
|
||||
break;
|
||||
],
|
||||
[AC_MSG_RESULT([no])])
|
||||
done],[
|
||||
AC_MSG_RESULT([no])])
|
||||
],[
|
||||
if test X"$cross_compiling" = Xyes; then
|
||||
search_libsubdirs=$multiarch_libsubdir
|
||||
else
|
||||
search_libsubdirs="$multiarch_libsubdir $libsubdirs"
|
||||
fi
|
||||
for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then
|
||||
for libsubdir in $search_libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir"
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
dnl overwrite ld flags if we have required special directory with
|
||||
dnl --with-boost-libdir parameter
|
||||
AS_IF([test "x$_AX_BOOST_BASE_boost_lib_path" != "x"],
|
||||
[BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_lib_path"])
|
||||
|
||||
AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION)])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
|
||||
|
||||
|
||||
dnl if we found no boost with system layout we search for boost libraries
|
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
BOOST_CPPFLAGS=
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
BOOST_LDFLAGS=
|
||||
fi
|
||||
_version=0
|
||||
if test -n "$_AX_BOOST_BASE_boost_path" ; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path"; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
fi
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include/boost-$VERSION_UNDERSCORE"
|
||||
done
|
||||
dnl if nothing found search for layout used in Windows distributions
|
||||
if test -z "$BOOST_CPPFLAGS"; then
|
||||
if test -d "$_AX_BOOST_BASE_boost_path/boost" && test -r "$_AX_BOOST_BASE_boost_path/boost"; then
|
||||
BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path"
|
||||
fi
|
||||
fi
|
||||
dnl if we found something and BOOST_LDFLAGS was unset before
|
||||
dnl (because "$_AX_BOOST_BASE_boost_lib_path" = ""), set it here.
|
||||
if test -n "$BOOST_CPPFLAGS" && test -z "$BOOST_LDFLAGS"; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$_AX_BOOST_BASE_boost_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "x$cross_compiling" != "xyes" ; then
|
||||
for _AX_BOOST_BASE_boost_path in /usr /usr/local /opt /opt/local ; do
|
||||
if test -d "$_AX_BOOST_BASE_boost_path" && test -r "$_AX_BOOST_BASE_boost_path" ; then
|
||||
for i in `ls -d $_AX_BOOST_BASE_boost_path/include/boost-* 2>/dev/null`; do
|
||||
_version_tmp=`echo $i | sed "s#$_AX_BOOST_BASE_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
|
||||
V_CHECK=`expr $_version_tmp \> $_version`
|
||||
if test "x$V_CHECK" = "x1" ; then
|
||||
_version=$_version_tmp
|
||||
best_path=$_AX_BOOST_BASE_boost_path
|
||||
fi
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
|
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
|
||||
if test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$BOOST_ROOT" ; then
|
||||
for libsubdir in $libsubdirs ; do
|
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
|
||||
done
|
||||
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
|
||||
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
|
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
|
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
|
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version`
|
||||
if test "x$V_CHECK" = "x1" && test -z "$_AX_BOOST_BASE_boost_lib_path" ; then
|
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
|
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT"
|
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([_AX_BOOST_BASE_PROGRAM($WANT_BOOST_VERSION)],[
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
found_system=yes
|
||||
],[
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
fi
|
||||
|
||||
if test "x$succeeded" != "xyes" ; then
|
||||
if test "x$_version" = "x0" ; then
|
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $1 or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
|
||||
else
|
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
|
||||
fi
|
||||
# execute ACTION-IF-NOT-FOUND (if present):
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
|
||||
# execute ACTION-IF-FOUND (if present):
|
||||
ifelse([$2], , :, [$2])
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
|
||||
])
|
|
@ -0,0 +1,113 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_date_time.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_DATE_TIME
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Date_Time library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_DATE_TIME_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_DATE_TIME
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 22
|
||||
|
||||
AC_DEFUN([AX_BOOST_DATE_TIME],
|
||||
[
|
||||
AC_ARG_WITH([boost-date-time],
|
||||
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@],
|
||||
[use the Date_Time library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_date_time_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_date_time_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Date_Time library is available,
|
||||
ax_cv_boost_date_time,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]],
|
||||
[[using namespace boost::gregorian; date d(2002,Jan,10);
|
||||
return 0;
|
||||
]])],
|
||||
ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_date_time" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_date_time_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_date_time*.so* $BOOSTLIBDIR/libboost_date_time*.dylib* $BOOSTLIBDIR/libboost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_date_time.*\)\.so.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.a*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
|
||||
[link_date_time="no"])
|
||||
done
|
||||
if test "x$link_date_time" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_date_time*.dll* $BOOSTLIBDIR/boost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_date_time.*\)\.dll.*$;\1;' -e 's;^\(boost_date_time.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
|
||||
[link_date_time="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_date_time_lib boost_date_time-$ax_boost_user_date_time_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break],
|
||||
[link_date_time="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_date_time" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,118 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_FILESYSTEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Filesystem library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_FILESYSTEM_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_FILESYSTEM
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Michael Tindal
|
||||
# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 27
|
||||
|
||||
AC_DEFUN([AX_BOOST_FILESYSTEM],
|
||||
[
|
||||
AC_ARG_WITH([boost-filesystem],
|
||||
AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
|
||||
[use the Filesystem library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_filesystem_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_filesystem_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
LIBS_SAVED=$LIBS
|
||||
LIBS="$LIBS $BOOST_SYSTEM_LIB"
|
||||
export LIBS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
|
||||
ax_cv_boost_filesystem,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
|
||||
[[using namespace boost::filesystem;
|
||||
path my_path( "foo/bar/data.txt" );
|
||||
return 0;]])],
|
||||
ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_filesystem" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_filesystem_lib" = "x"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
if test "x$link_filesystem" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
|
||||
[link_filesystem="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_filesystem" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
LIBS="$LIBS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,116 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_iostreams.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_IOSTREAMS
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for IOStreams library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_IOSTREAMS_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_IOSTREAMS
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 21
|
||||
|
||||
AC_DEFUN([AX_BOOST_IOSTREAMS],
|
||||
[
|
||||
AC_ARG_WITH([boost-iostreams],
|
||||
AS_HELP_STRING([--with-boost-iostreams@<:@=special-lib@:>@],
|
||||
[use the IOStreams library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-iostreams=boost_iostreams-gcc-mt-d-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_iostreams_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_iostreams_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::IOStreams library is available,
|
||||
ax_cv_boost_iostreams,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@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;
|
||||
]])],
|
||||
ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_iostreams" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_iostreams_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_iostreams*.so* $BOOSTLIBDIR/libboost_iostream*.dylib* $BOOSTLIBDIR/libboost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_iostreams.*\)\.so.*$;\1;' -e 's;^lib\(boost_iostream.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_iostreams.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
|
||||
[link_iostreams="no"])
|
||||
done
|
||||
if test "x$link_iostreams" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_iostreams*.dll* $BOOSTLIBDIR/boost_iostreams*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_iostreams.*\)\.dll.*$;\1;' -e 's;^\(boost_iostreams.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
|
||||
[link_iostreams="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_iostreams_lib boost_iostreams-$ax_boost_user_iostreams_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_IOSTREAMS_LIB="-l$ax_lib"; AC_SUBST(BOOST_IOSTREAMS_LIB) link_iostreams="yes"; break],
|
||||
[link_iostreams="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_iostreams" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,108 @@
|
|||
# =============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html
|
||||
# =============================================================================
|
||||
#
|
||||
# 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. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_PROGRAM_OPTIONS
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 25
|
||||
|
||||
AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS],
|
||||
[
|
||||
AC_ARG_WITH([boost-program-options],
|
||||
AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@],
|
||||
[use the program options library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_program_options_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_program_options_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
export want_boost
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
AC_CACHE_CHECK([whether the Boost::Program_Options library is available],
|
||||
ax_cv_boost_program_options,
|
||||
[AC_LANG_PUSH(C++)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options/errors.hpp>
|
||||
]],
|
||||
[[boost::program_options::error err("Error message");
|
||||
return 0;]])],
|
||||
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "$ax_cv_boost_program_options" = yes; then
|
||||
AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_program_options_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
if test "x$link_program_options" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break],
|
||||
[link_program_options="no"])
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_program_options" != "xyes"; then
|
||||
AC_MSG_ERROR([Could not link against [$ax_lib] !])
|
||||
fi
|
||||
fi
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,121 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/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 correct 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 and the Boost libraries are
|
||||
# specified on the include path, this macro requires AX_PYTHON_DEVEL and
|
||||
# AX_BOOST_BASE to be called.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
# Copyright (c) 2013 Daniel M"ullner <daniel@danifold.net>
|
||||
#
|
||||
# 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 <https://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 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.
|
||||
|
||||
#serial 22
|
||||
|
||||
AC_DEFUN([AX_BOOST_PYTHON],
|
||||
[AC_REQUIRE([AX_PYTHON_DEVEL])dnl
|
||||
AC_REQUIRE([AX_BOOST_BASE])dnl
|
||||
AC_LANG_PUSH([C++])
|
||||
ax_boost_python_save_CPPFLAGS="$CPPFLAGS"
|
||||
ax_boost_python_save_LDFLAGS="$LDFLAGS"
|
||||
ax_boost_python_save_LIBS="$LIBS"
|
||||
if test "x$PYTHON_CPPFLAGS" != "x"; then
|
||||
CPPFLAGS="$PYTHON_CPPFLAGS $CPPFLAGS"
|
||||
fi
|
||||
|
||||
# Versions of AX_PYTHON_DEVEL() before serial 18 provided PYTHON_LDFLAGS
|
||||
# instead of PYTHON_LIBS, so this is just here for compatibility.
|
||||
if test "x$PYTHON_LDFLAGS" != "x"; then
|
||||
LDFLAGS="$PYTHON_LDFLAGS $LDFLAGS"
|
||||
fi
|
||||
|
||||
# Note: Only versions of AX_PYTHON_DEVEL() since serial 18 provide PYTHON_LIBS
|
||||
# instead of PYTHON_LDFLAGS.
|
||||
if test "x$PYTHON_LIBS" != "x"; then
|
||||
LIBS="$PYTHON_LIBS $LIBS"
|
||||
fi
|
||||
|
||||
if test "x$BOOST_CPPFLAGS" != "x"; then
|
||||
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
|
||||
fi
|
||||
if test "x$BOOST_LDFLAGS" != "x"; then
|
||||
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS"
|
||||
fi
|
||||
AC_CACHE_CHECK(whether the Boost::Python library is available,
|
||||
ac_cv_boost_python,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <boost/python/module.hpp>
|
||||
BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], [])],
|
||||
ac_cv_boost_python=yes, ac_cv_boost_python=no)
|
||||
])
|
||||
if test "$ac_cv_boost_python" = "yes"; then
|
||||
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 yes/no or the boost python library or suffix to use]),
|
||||
[if test "x$with_boost_python" != "xno" -a "x$with_boost_python" != "xyes"; then
|
||||
ax_python_lib=$with_boost_python
|
||||
ax_boost_python_lib=boost_python-$with_boost_python
|
||||
fi])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
for ax_lib in $ax_python_lib $ax_boost_python_lib `ls $BOOSTLIBDIR/libboost_python*.so* $BOOSTLIBDIR/libboost_python*.dylib* $BOOSTLIBDIR/libboost_python*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_python.*\)\.so.*$;\1;' -e 's;^lib\(boost_python.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_python.*\)\.a.*$;\1;' ` boost_python boost_python3; do
|
||||
AS_VAR_PUSHDEF([ax_Lib], [ax_cv_lib_$ax_lib''_BOOST_PYTHON_MODULE])dnl
|
||||
AC_CACHE_CHECK([whether $ax_lib is the correct library], [ax_Lib],
|
||||
[LIBS="-l$ax_lib $ax_boost_python_save_LIBS $PYTHON_LIBS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <boost/python/module.hpp>
|
||||
BOOST_PYTHON_MODULE(test) { throw "Boost::Python test."; }]], [])],
|
||||
[AS_VAR_SET([ax_Lib], [yes])],
|
||||
[AS_VAR_SET([ax_Lib], [no])])])
|
||||
AS_VAR_IF([ax_Lib], [yes], [BOOST_PYTHON_LIB=$ax_lib break], [])
|
||||
AS_VAR_POPDEF([ax_Lib])dnl
|
||||
done
|
||||
AC_SUBST(BOOST_PYTHON_LIB)
|
||||
fi
|
||||
CPPFLAGS="$ax_boost_python_save_CPPFLAGS"
|
||||
LDFLAGS="$ax_boost_python_save_LDFLAGS"
|
||||
LIBS="$ax_boost_python_save_LIBS"
|
||||
AC_LANG_POP([C++])
|
||||
])dnl
|
|
@ -0,0 +1,111 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_regex.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_REGEX
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Regex library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_REGEX_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_REGEX
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 23
|
||||
|
||||
AC_DEFUN([AX_BOOST_REGEX],
|
||||
[
|
||||
AC_ARG_WITH([boost-regex],
|
||||
AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@],
|
||||
[use the Regex library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_regex_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_regex_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Regex library is available,
|
||||
ax_cv_boost_regex,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/regex.hpp>
|
||||
]],
|
||||
[[boost::regex r(); return 0;]])],
|
||||
ax_cv_boost_regex=yes, ax_cv_boost_regex=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_regex" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_regex_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
|
||||
[link_regex="no"])
|
||||
done
|
||||
if test "x$link_regex" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
|
||||
[link_regex="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break],
|
||||
[link_regex="no"])
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the Boost::Regex library!)
|
||||
fi
|
||||
if test "x$link_regex" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,117 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_serialization.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_SERIALIZATION
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Serialization library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_SERIALIZATION_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_SERIALIZATION
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 22
|
||||
|
||||
AC_DEFUN([AX_BOOST_SERIALIZATION],
|
||||
[
|
||||
AC_ARG_WITH([boost-serialization],
|
||||
AS_HELP_STRING([--with-boost-serialization@<:@=special-lib@:>@],
|
||||
[use the Serialization library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-serialization=boost_serialization-gcc-mt-d-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_serialization_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_serialization_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_MSG_WARN(BOOST_CPPFLAGS $BOOST_CPPFLAGS)
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Serialization library is available,
|
||||
ax_cv_boost_serialization,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@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;
|
||||
]])],
|
||||
ax_cv_boost_serialization=yes, ax_cv_boost_serialization=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_serialization" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_SERIALIZATION,,[define if the Boost::Serialization library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_serialization_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_serialization*.so* $BOOSTLIBDIR/libboost_serialization*.dylib* $BOOSTLIBDIR/libboost_serialization*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_serialization.*\)\.so.*$;\1;' -e 's;^lib\(boost_serialization.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_serialization.*\)\.a*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
|
||||
[link_serialization="no"])
|
||||
done
|
||||
if test "x$link_serialization" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_serialization*.dll* $BOOSTLIBDIR/boost_serialization*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_serialization.*\)\.dll.*$;\1;' -e 's;^\(boost_serialization.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
|
||||
[link_serialization="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_serialization_lib boost_serialization-$ax_boost_user_serialization_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_SERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_SERIALIZATION_LIB) link_serialization="yes"; break],
|
||||
[link_serialization="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_serialization" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,114 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_signals.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_SIGNALS
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Signals library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_SIGNALS_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_SIGNALS
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 22
|
||||
|
||||
AC_DEFUN([AX_BOOST_SIGNALS],
|
||||
[
|
||||
AC_ARG_WITH([boost-signals],
|
||||
AS_HELP_STRING([--with-boost-signals@<:@=special-lib@:>@],
|
||||
[use the Signals library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-signals=boost_signals-gcc-mt-d ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_signals_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_signals_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Signals library is available,
|
||||
ax_cv_boost_signals,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/signal.hpp>
|
||||
]],
|
||||
[[boost::signal<void ()> sig;
|
||||
return 0;
|
||||
]])],
|
||||
ax_cv_boost_signals=yes, ax_cv_boost_signals=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_signals" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_SIGNALS,,[define if the Boost::Signals library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_signals_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_signals*.so* $BOOSTLIBDIR/libboost_signals*.dylib* $BOOSTLIBDIR/libboost_signals*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_signals.*\)\.so.*$;\1;' -e 's;^lib\(boost_signals.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_signals.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
|
||||
[link_signals="no"])
|
||||
done
|
||||
if test "x$link_signals" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_signals*.dll* $BOOSTLIBDIR/boost_signals*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_signals.*\)\.dll.*$;\1;' -e 's;^\(boost_signals.*\)\.a*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
|
||||
[link_signals="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_signals_lib boost_signals-$ax_boost_user_signals_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_SIGNALS_LIB="-l$ax_lib"; AC_SUBST(BOOST_SIGNALS_LIB) link_signals="yes"; break],
|
||||
[link_signals="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_signals" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,121 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_system.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_SYSTEM
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for System library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_SYSTEM_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_SYSTEM
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2008 Michael Tindal
|
||||
# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 19
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
AC_ARG_WITH([boost-system],
|
||||
AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
|
||||
[use the System library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-system=boost_system-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_system_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_system_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::System library is available,
|
||||
ax_cv_boost_system,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
CXXFLAGS=
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
|
||||
[[boost::system::error_category *a = 0;]])],
|
||||
ax_cv_boost_system=yes, ax_cv_boost_system=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_system" = "xyes"; then
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
if test "x$ax_boost_user_system_lib" = "x"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
if test "x$link_system" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
|
||||
[link_system="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_system" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,139 @@
|
|||
# ===============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_test_exec_monitor.html
|
||||
# ===============================================================================
|
||||
#
|
||||
# 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. Further documentation
|
||||
# is available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_TEST_EXEC_MONITOR
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Dodji Seketeli <dodji@seketeli.org>
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 21
|
||||
|
||||
AC_DEFUN([AX_BOOST_TEST_EXEC_MONITOR],
|
||||
[
|
||||
AC_ARG_WITH([boost-test-exec-monitor],
|
||||
AS_HELP_STRING([--with-boost-test-exec-monitor@<:@=special-lib@:>@],
|
||||
[use the Test_Exec_Monitor library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-test-exec-monitor=boost_test_exec_monitor-gcc ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_test_exec_monitor_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_test_exec_monitor_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Test_Exec_Monitor library is available,
|
||||
ax_cv_boost_test_exec_monitor,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/test_tools.hpp>]],
|
||||
[[int i=1 ; BOOST_REQUIRE(i==1); ; return 0;]])],
|
||||
ax_cv_boost_test_exec_monitor=yes, ax_cv_boost_test_exec_monitor=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_test_exec_monitor" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_TEST_EXEC_MONITOR,,[define if the Boost::Test_Exec_Monitor library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
if test "x$ax_boost_user_test_exec_monitor_lib" = "x"; then
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
|
||||
for monitor_library in `ls $BOOSTLIBDIR/libboost_test_exec_monitor*.so* $BOOSTLIBDIR/libboost_test_exec_monitor*.dylib* $BOOSTLIBDIR/libboost_test_exec_monitor*.a* 2>/dev/null` ; do
|
||||
if test -r $monitor_library ; then
|
||||
libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_test_exec_monitor.*\)\.so.*$;\1;' -e 's;^lib\(boost_test_exec_monitor.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_test_exec_monitor.*\)\.a.*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_test_exec_monitor="yes"
|
||||
else
|
||||
link_test_exec_monitor="no"
|
||||
fi
|
||||
|
||||
if test "x$link_test_exec_monitor" = "xyes"; then
|
||||
BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "x$link_test_exec_monitor" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_test_exec_monitor*.dll* $BOOSTLIBDIR/boost_test_exec_monitor*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_test_exec_monitor.*\)\.dll.*$;\1;' -e 's;^\(boost_test_exec_monitor.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"; AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB) link_test_exec_monitor="yes"; break],
|
||||
[link_test_exec_monitor="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
link_test_exec_monitor="no"
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
for ax_lib in boost_test_exec_monitor-$ax_boost_user_test_exec_monitor_lib $ax_boost_user_test_exec_monitor_lib ; do
|
||||
if test "x$link_test_exec_monitor" = "xyes"; then
|
||||
break;
|
||||
fi
|
||||
for monitor_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
|
||||
if test -r $monitor_library ; then
|
||||
libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_test_exec_monitor.*\)\.so.*$;\1;' -e 's;^lib\(boost_test_exec_monitor.*\)\.a*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_test_exec_monitor="yes"
|
||||
else
|
||||
link_test_exec_monitor="no"
|
||||
fi
|
||||
|
||||
if test "x$link_test_exec_monitor" = "xyes"; then
|
||||
BOOST_TEST_EXEC_MONITOR_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_TEST_EXEC_MONITOR_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_test_exec_monitor" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,163 @@
|
|||
# ===========================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_THREAD
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Thread library from the Boost C++ libraries. The macro requires
|
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at
|
||||
# <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_THREAD_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_THREAD
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
|
||||
# Copyright (c) 2009 Michael Tindal
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 30
|
||||
|
||||
AC_DEFUN([AX_BOOST_THREAD],
|
||||
[
|
||||
AC_ARG_WITH([boost-thread],
|
||||
AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
|
||||
[use the Thread library from boost -
|
||||
it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-thread=boost_thread-gcc-mt ]),
|
||||
[
|
||||
if test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_thread_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_thread_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Thread library is available,
|
||||
ax_cv_boost_thread,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
CXXFLAGS="-pthreads $CXXFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
CXXFLAGS="-mthreads $CXXFLAGS"
|
||||
else
|
||||
CXXFLAGS="-pthread $CXXFLAGS"
|
||||
fi
|
||||
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)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_thread" = "xyes"; then
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
||||
else
|
||||
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
AC_DEFINE(HAVE_BOOST_THREAD,,
|
||||
[define if the Boost::Thread library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
LDFLAGS="-pthread $LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
if test "x$ax_boost_user_thread_lib" = "x"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
if test "x$link_thread" != "xyes"; then
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_thread" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
else
|
||||
BOOST_THREAD_LIB="-l$ax_lib"
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
solaris )
|
||||
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
|
||||
break;
|
||||
;;
|
||||
mingw32 )
|
||||
break;
|
||||
;;
|
||||
* )
|
||||
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(BOOST_THREAD_LIB)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,137 @@
|
|||
# =================================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_unit_test_framework.html
|
||||
# =================================================================================
|
||||
#
|
||||
# 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. Further documentation
|
||||
# is available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_UNIT_TEST_FRAMEWORK
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 20
|
||||
|
||||
AC_DEFUN([AX_BOOST_UNIT_TEST_FRAMEWORK],
|
||||
[
|
||||
AC_ARG_WITH([boost-unit-test-framework],
|
||||
AS_HELP_STRING([--with-boost-unit-test-framework@<:@=special-lib@:>@],
|
||||
[use the Unit_Test_Framework library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-unit-test-framework=boost_unit_test_framework-gcc ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_unit_test_framework_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_unit_test_framework_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Unit_Test_Framework library is available,
|
||||
ax_cv_boost_unit_test_framework,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/test/unit_test.hpp>]],
|
||||
[[using boost::unit_test::test_suite;
|
||||
test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" ); return 0;]])],
|
||||
ax_cv_boost_unit_test_framework=yes, ax_cv_boost_unit_test_framework=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_unit_test_framework" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_UNIT_TEST_FRAMEWORK,,[define if the Boost::Unit_Test_Framework library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
if test "x$ax_boost_user_unit_test_framework_lib" = "x"; then
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
for monitor_library in `ls $BOOSTLIBDIR/libboost_unit_test_framework*.so* $BOOSTLIBDIR/libboost_unit_test_framework*.dylib* $BOOSTLIBDIR/libboost_unit_test_framework*.a* 2>/dev/null` ; do
|
||||
if test -r $monitor_library ; then
|
||||
libextension=`echo $monitor_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a.*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_unit_test_framework="yes"
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
fi
|
||||
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "x$link_unit_test_framework" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_unit_test_framework*.dll* $BOOSTLIBDIR/boost_unit_test_framework*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_unit_test_framework.*\)\.dll.*$;\1;' -e 's;^\(boost_unit_test_framework.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"; AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB) link_unit_test_framework="yes"; break],
|
||||
[link_unit_test_framework="no"])
|
||||
done
|
||||
fi
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
saved_ldflags="${LDFLAGS}"
|
||||
for ax_lib in boost_unit_test_framework-$ax_boost_user_unit_test_framework_lib $ax_boost_user_unit_test_framework_lib ; do
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
break;
|
||||
fi
|
||||
for unittest_library in `ls $BOOSTLIBDIR/lib${ax_lib}.so* $BOOSTLIBDIR/lib${ax_lib}.a* 2>/dev/null` ; do
|
||||
if test -r $unittest_library ; then
|
||||
libextension=`echo $unittest_library | sed 's,.*/,,' | sed -e 's;^lib\(boost_unit_test_framework.*\)\.so.*$;\1;' -e 's;^lib\(boost_unit_test_framework.*\)\.a*$;\1;'`
|
||||
ax_lib=${libextension}
|
||||
link_unit_test_framework="yes"
|
||||
else
|
||||
link_unit_test_framework="no"
|
||||
fi
|
||||
|
||||
if test "x$link_unit_test_framework" = "xyes"; then
|
||||
BOOST_UNIT_TEST_FRAMEWORK_LIB="-l$ax_lib"
|
||||
AC_SUBST(BOOST_UNIT_TEST_FRAMEWORK_LIB)
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_unit_test_framework" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,116 @@
|
|||
# ============================================================================
|
||||
# https://www.gnu.org/software/autoconf-archive/ax_boost_wserialization.html
|
||||
# ============================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_BOOST_WSERIALIZATION
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Test for Serialization library from the Boost C++ libraries. The macro
|
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is
|
||||
# available at <http://randspringer.de/boost/index.html>.
|
||||
#
|
||||
# This macro calls:
|
||||
#
|
||||
# AC_SUBST(BOOST_WSERIALIZATION_LIB)
|
||||
#
|
||||
# And sets:
|
||||
#
|
||||
# HAVE_BOOST_WSERIALIZATION
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
|
||||
#
|
||||
# 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. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 21
|
||||
|
||||
AC_DEFUN([AX_BOOST_WSERIALIZATION],
|
||||
[
|
||||
AC_ARG_WITH([boost-wserialization],
|
||||
AS_HELP_STRING([--with-boost-wserialization@<:@=special-lib@:>@],
|
||||
[use the WSerialization library from boost - it is possible to specify a certain library for the linker
|
||||
e.g. --with-boost-wserialization=boost_wserialization-gcc-mt-d-1_33_1 ]),
|
||||
[
|
||||
if test "$withval" = "no"; then
|
||||
want_boost="no"
|
||||
elif test "$withval" = "yes"; then
|
||||
want_boost="yes"
|
||||
ax_boost_user_wserialization_lib=""
|
||||
else
|
||||
want_boost="yes"
|
||||
ax_boost_user_wserialization_lib="$withval"
|
||||
fi
|
||||
],
|
||||
[want_boost="yes"]
|
||||
)
|
||||
|
||||
if test "x$want_boost" = "xyes"; then
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
CPPFLAGS_SAVED="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
export CPPFLAGS
|
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
|
||||
export LDFLAGS
|
||||
|
||||
AC_CACHE_CHECK(whether the Boost::WSerialization library is available,
|
||||
ax_cv_boost_wserialization,
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@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;
|
||||
]])],
|
||||
ax_cv_boost_wserialization=yes, ax_cv_boost_wserialization=no)
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_wserialization" = "xyes"; then
|
||||
AC_DEFINE(HAVE_BOOST_WSERIALIZATION,,[define if the Boost::WSerialization library is available])
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
if test "x$ax_boost_user_wserialization_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_wserialization*.so* $BOOSTLIBDIR/libboost_wserialization*.dylib* $BOOSTLIBDIR/libboost_wserialization*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_wserialization.*\)\.so.*$;\1;' -e 's;^lib\(boost_wserialization.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_wserialization.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_WSERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_WSERIALIZATION_LIB) link_wserialization="yes"; break],
|
||||
[link_wserialization="no"])
|
||||
done
|
||||
if test "x$link_wserialization" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_wserialization*.dll* $BOOSTLIBDIR/boost_wserialization*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_wserialization.*\)\.dll.*$;\1;' -e 's;^\(boost_wserialization.*\)\.a.*$;\1;'` ; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_WSERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_WSERIALIZATION_LIB) link_wserialization="yes"; break],
|
||||
[link_wserialization="no"])
|
||||
done
|
||||
fi
|
||||
|
||||
else
|
||||
for ax_lib in $ax_boost_user_wserialization_lib boost_wserialization-$ax_boost_user_wserialization_lib; do
|
||||
AC_CHECK_LIB($ax_lib, main,
|
||||
[BOOST_WSERIALIZATION_LIB="-l$ax_lib"; AC_SUBST(BOOST_WSERIALIZATION_LIB) link_wserialization="yes"; break],
|
||||
[link_wserialization="no"])
|
||||
done
|
||||
|
||||
fi
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
if test "x$link_wserialization" != "xyes"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
LDFLAGS="$LDFLAGS_SAVED"
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,109 @@
|
|||
dnl
|
||||
dnl Copyright 2003 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
|
||||
|
||||
# SWIG_PROG([required-version])
|
||||
#
|
||||
# Checks for the SWIG program. If found you can (and should) call SWIG via $(SWIG).
|
||||
# You can use the optional first argument to check if the version of the available SWIG
|
||||
# is greater or equal to the value of the argument. It should have the format:
|
||||
# N[.N[.N]] (N is a number between 0 and 999. Only the first N is mandatory.)
|
||||
AC_DEFUN([SWIG_PROG],[
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])
|
||||
AC_CHECK_PROG(SWIG,swig,[`which swig`])
|
||||
if test -z "$SWIG" ; then
|
||||
AC_MSG_ERROR([Cannot find 'swig' program. SWIG version >= $1 required])
|
||||
SWIG=false
|
||||
elif test -n "$1" ; then
|
||||
AC_MSG_CHECKING([for SWIG version])
|
||||
swig_version=`$SWIG -version 2>&1 | \
|
||||
awk '/^SWIG Version [[0-9]+\.[0-9]+\.[0-9]]+.*$/ { split($[3],a,"[[^.0-9]]"); print a[[1]] }'`
|
||||
AC_MSG_RESULT([$swig_version])
|
||||
if test -n "$swig_version" ; then
|
||||
swig_version=`echo $swig_version | \
|
||||
awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null`
|
||||
swig_required_version=`echo $1 | \
|
||||
awk '{ split($[1],a,"\."); print [a[1]*1000000+a[2]*1000+a[3]] }' 2>/dev/null`
|
||||
if test $swig_required_version -gt $swig_version ; then
|
||||
AC_MSG_ERROR([SWIG version >= $1 required])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([cannot determine SWIG version])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# SWIG_ENABLE_CXX()
|
||||
#
|
||||
# Enable swig C++ support. This effects all invocations of $(SWIG).
|
||||
AC_DEFUN([SWIG_ENABLE_CXX],[
|
||||
AC_REQUIRE([SWIG_PROG])
|
||||
AC_REQUIRE([AC_PROG_CXX])
|
||||
if test "$SWIG" != "false" ; then
|
||||
SWIG="$SWIG -c++"
|
||||
fi
|
||||
])
|
||||
|
||||
# SWIG_PYTHON([use-shadow-classes])
|
||||
#
|
||||
# Checks for Python and provides the $(SWIG_PYTHON_CPPFLAGS),
|
||||
# $(SWIG_PYTHON_LIB) and $(SWIG_PYTHON_OPT) output variables.
|
||||
# $(SWIG_PYTHON_OPT) contains all necessary swig options to generate
|
||||
# code for Python. If you need multi module support use
|
||||
# $(SWIG_PYTHON_LIB) (provided by the SWIG_MULTI_MODULE_SUPPORT()
|
||||
# macro) to link against the appropriate library. It contains the
|
||||
# SWIG Python runtime library that is needed by the type check system
|
||||
# for example.
|
||||
|
||||
AC_DEFUN([SWIG_PYTHON],[
|
||||
AC_REQUIRE([SWIG_PROG])
|
||||
AC_REQUIRE([PYTHON_DEVEL])
|
||||
if test "$SWIG" != "false" ; then
|
||||
AC_SUBST(SWIG_PYTHON_LIB,[-lswigpy])
|
||||
dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow=""
|
||||
dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow])
|
||||
AC_SUBST(SWIG_PYTHON_OPT,[-python])
|
||||
fi
|
||||
AC_SUBST(SWIG_PYTHON_CPPFLAGS,[$PYTHON_CPPFLAGS])
|
||||
])
|
||||
|
||||
AC_DEFUN([SWIG_TCL],[
|
||||
AC_REQUIRE([SWIG_PROG])
|
||||
AC_REQUIRE([TCL_DEVEL])
|
||||
if test "$SWIG" != "false" ; then
|
||||
AC_SUBST(SWIG_TCL_LIB,[-ltcl])
|
||||
dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow=""
|
||||
dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow])
|
||||
AC_SUBST(SWIG_TCL_OPT,[-tcl])
|
||||
fi
|
||||
AC_SUBST(SWIG_TCL_CPPFLAGS,[$TCL_CPPFLAGS])
|
||||
])
|
||||
|
||||
AC_DEFUN([SWIG_GUILE],[
|
||||
AC_REQUIRE([SWIG_PROG])
|
||||
AC_REQUIRE([GUILE_DEVEL])
|
||||
if test "$SWIG" != "false" ; then
|
||||
AC_SUBST(SWIG_GUILE_LIB,[-lguile])
|
||||
dnl test ! "x$1" = "xno" && swig_shadow=" -shadow" || swig_shadow=""
|
||||
dnl AC_SUBST(SWIG_PYTHON_OPT,[-python$swig_shadow])
|
||||
AC_SUBST(SWIG_GUILE_OPT,[-guile])
|
||||
fi
|
||||
AC_SUBST(SWIG_GUILE_CPPFLAGS,[$GUILE_CPPFLAGS])
|
||||
])
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,437 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -0,0 +1,124 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -0,0 +1,23 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -0,0 +1,99 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|
@ -0,0 +1,87 @@
|
|||
dnl
|
||||
dnl Copyright 2003,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
|
||||
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
|
||||
|
||||
# $1 is $enable_usrp:
|
||||
# yes : do these tests
|
||||
# no : do not do these tests
|
||||
# "" : do these tests
|
||||
|
||||
AC_DEFUN([USRP_SET_FUSB_TECHNIQUE],[
|
||||
req_libusb1=no
|
||||
USE_LIBUSB1=0
|
||||
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
|
||||
libusb1*)
|
||||
FUSB_TECH=libusb1
|
||||
req_libusb1=yes
|
||||
USE_LIBUSB1=1
|
||||
;;
|
||||
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_CHECKING([for fast usb technique to use])
|
||||
AC_MSG_RESULT($FUSB_TECH)
|
||||
AC_SUBST(FUSB_TECH)
|
||||
fi
|
||||
|
||||
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_libusb1, test x$FUSB_TECH = xlibusb1)
|
||||
AM_CONDITIONAL(FUSB_TECH_ra_wb, test x$FUSB_TECH = xra_wb)
|
||||
|
||||
AC_SUBST(USE_LIBUSB1)
|
||||
AC_CONFIG_FILES([\
|
||||
usrp/host/include/usrp/libusb_types.h \
|
||||
])
|
||||
])
|
|
@ -0,0 +1,273 @@
|
|||
dnl Copyright 2003,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
|
||||
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.
|
||||
|
||||
# $1 is $req_libusb1:
|
||||
# yes : check libusb-1.0
|
||||
# no : check libusb-0.12
|
||||
# "" : check libusb-0.12
|
||||
|
||||
|
||||
AC_DEFUN([USRP_LIBUSB], [
|
||||
dnl do not use LDFLAGS, except on Windows
|
||||
saved_LDFLAGS=${LDFLAGS}
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
;;
|
||||
*)
|
||||
LDFLAGS=
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl this variable is set in usrp/usrp.pc.in as a requirement
|
||||
dnl for libusrp; it is OK to be empty.
|
||||
LIBUSB_PKG_CONFIG_NAME=
|
||||
|
||||
dnl for Windows (cygin, mingw), do not use PKGCONFIG since LIBUSB
|
||||
dnl does not install a .pc file. For all other OSs, use
|
||||
dnl PKGCONFIG to check for various package names first.
|
||||
libusb_list=''
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
libusb_list='libusb'
|
||||
;;
|
||||
*)
|
||||
dnl create the list of libusb PKGCONFIG modules to test
|
||||
if test x$1 = xyes; then
|
||||
dnl libusb-1.0 was requested; just test for it
|
||||
libusb_list="libusb-1.0"
|
||||
else
|
||||
dnl test for legacy libusb only
|
||||
libusb_list="libusb libusb-legacy"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl loop over various possible 'libusb' names, and
|
||||
dnl choose the first one that meets both the user's selection
|
||||
dnl (via configure flags) as well as what is installed
|
||||
for libusb_name in ${libusb_list}; do
|
||||
dnl clear internal variables
|
||||
libusbok=no
|
||||
have_libusb1=no
|
||||
usb_header=''
|
||||
usb_lib_func=''
|
||||
usb_lib_name=''
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
USB_INCLUDEDIR=
|
||||
USB_INCLUDES=
|
||||
USB_LIBS=-lusb
|
||||
usb_header='usb.h'
|
||||
usb_lib_func='usb_bulk_write'
|
||||
libusbok=yes
|
||||
;;
|
||||
*)
|
||||
dnl start checks
|
||||
AC_MSG_NOTICE([Checking for LIBUSB version '${libusb_name}'])
|
||||
if test ${libusb_name} = "libusb-1.0"; then
|
||||
dnl see if the pkgconfig module is available
|
||||
PKG_CHECK_MODULES(USB, ${libusb_name}, [
|
||||
libusbok=yes
|
||||
have_libusb1=yes
|
||||
usb_header='libusb-1.0/libusb.h'
|
||||
usb_lib_func='libusb_bulk_transfer'
|
||||
], [libusbok=no])
|
||||
else
|
||||
dnl see if the pkgconfig module is available
|
||||
PKG_CHECK_MODULES(USB, ${libusb_name}, [
|
||||
libusbok=yes
|
||||
usb_header='usb.h'
|
||||
usb_lib_func='usb_bulk_write'
|
||||
], [libusbok=no])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test $libusbok = yes; then
|
||||
dnl PKGCONFIG found a version of LIBUSB, or the info was
|
||||
dnl provided by the user, or the OS is Windows.
|
||||
|
||||
dnl Check it to make sure it meets enough criteria:
|
||||
dnl Verify that $usb_header is a valid header. If so, then
|
||||
dnl verify that $usb_lib_func can be found in the library
|
||||
dnl $usb_lib_name. if so, verify that the symbol 'usb_debug' is
|
||||
dnl found in the library if not using Windows.
|
||||
|
||||
dnl Check for the header. Similar to AC_CHECK_HEADERS,
|
||||
dnl but doesn't append to known \#defines.
|
||||
dnl If PKGCONFIG found variable USB_INCLUDEDIR, and it is
|
||||
dnl not empty, use it for checking for $usb_header.
|
||||
dnl Otherwise, maybe the user's shell environment is already
|
||||
dnl configured to find this header.
|
||||
AC_LANG_PUSH(C)
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test x$USB_INCLUDEDIR != x; then
|
||||
USB_INCLUDES="-I$USB_INCLUDEDIR"
|
||||
CPPFLAGS="$USB_INCLUDES"
|
||||
fi
|
||||
AC_MSG_CHECKING([$libusb_name for header $usb_header])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include "$usb_header"
|
||||
]], [])],
|
||||
[libusbok=yes],[libusbok=no])
|
||||
AC_MSG_RESULT([$libusbok])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
|
||||
if test $libusbok = yes; then
|
||||
dnl found the header; now make sure the library is OK
|
||||
dnl On Darwin, need to include the IOKit library.
|
||||
|
||||
AC_LANG_PUSH(C)
|
||||
save_LIBS="$LIBS"
|
||||
case "$host_os" in
|
||||
darwin*)
|
||||
USB_LIBS="$USB_LIBS -lIOKit"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
LIBS="$USB_LIBS"
|
||||
|
||||
dnl find the library link name
|
||||
usb_lib_name=`echo $USB_LIBS | sed -e "s@.*-l\(usb[[^ ]]*\).*@\1@"`
|
||||
|
||||
dnl Check for the function in the library. Similar to
|
||||
dnl AC_CHECK_LIB, but doesn't append to known \#defines.
|
||||
AC_MSG_CHECKING([$libusb_name for function $usb_lib_func in library $usb_lib_name])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char $usb_lib_func ();
|
||||
]], [[return $usb_lib_func ();]])],
|
||||
[libusbok=yes],[libusbok=no])
|
||||
AC_MSG_RESULT([$libusbok])
|
||||
LIBS="$save_LIBS"
|
||||
AC_LANG_POP(C)
|
||||
|
||||
if test $libusbok = yes; then
|
||||
if test ${libusb_name} != "libusb-1.0"; then
|
||||
dnl PKGCONFIG found a legacy version of libusb; make sure the
|
||||
dnl variable _usb_debug is available in the found library.
|
||||
dnl Do not test on Windows, since that symbol is not defined.
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
;;
|
||||
*)
|
||||
AC_LANG_PUSH(C)
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test x$USB_INCLUDEDIR != x; then
|
||||
CPPFLAGS="$USB_INCLUDES"
|
||||
fi
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$USB_LIBS"
|
||||
AC_MSG_CHECKING([$libusb_name for symbol usb_debug in library $usb_lib_name])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
extern int usb_debug;]],
|
||||
[[usb_debug = 0;]])],
|
||||
[libusbok=yes],[libusbok=no])
|
||||
AC_MSG_RESULT([$libusbok])
|
||||
LIBS="$save_LIBS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl if everything checks out OK, finish up
|
||||
if test $libusbok = yes; then
|
||||
case "$host_os" in
|
||||
cygwin* | mingw*)
|
||||
;;
|
||||
*)
|
||||
LIBUSB_PKG_CONFIG_NAME="${libusb_name}"
|
||||
;;
|
||||
esac
|
||||
break
|
||||
else
|
||||
dnl something wasn't found in this LIBUSB version.
|
||||
dnl HACK: clear cache variables for header and library
|
||||
unset USB_INCLUDEDIR
|
||||
unset USB_INCLUDES
|
||||
unset USB_LIBS
|
||||
unset $as_ac_Header
|
||||
unset $as_ac_Lib
|
||||
fi
|
||||
done
|
||||
|
||||
if test $libusbok = yes; then
|
||||
dnl final error checking, mostly to create #define's
|
||||
AC_LANG_PUSH(C)
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test x$USB_INCLUDEDIR != x; then
|
||||
CPPFLAGS="$USB_INCLUDES"
|
||||
fi
|
||||
dnl Check for the header.
|
||||
AC_CHECK_HEADERS([$usb_header], [], [libusbok=no])
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
|
||||
if test $libusbok = no; then
|
||||
AC_MSG_RESULT([USRP requires libusb header '$usb_header' which was not found or was not usable. See http://www.libusb.org])
|
||||
else
|
||||
dnl check for the library (again)
|
||||
AC_LANG_PUSH(C)
|
||||
save_CPPFLAGS="$CPPFLAGS"
|
||||
if test x$USB_INCLUDEDIR != x; then
|
||||
CPPFLAGS="$USB_INCLUDES"
|
||||
fi
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$USB_LIBS"
|
||||
AC_CHECK_LIB([$usb_lib_name], [$usb_lib_func], [], [
|
||||
libusbok=no
|
||||
AC_MSG_RESULT([USRP requires library '$usb_lib_name' with function '$usb_lib_func', which was either not found or was not usable. See http://www.libusb.org])])
|
||||
# case "$host_os" in
|
||||
# cygwin* | mingw*)
|
||||
# USB_LIBS="$LIBS"
|
||||
# ;;
|
||||
# *) ;;
|
||||
# esac
|
||||
LIBS="$save_LIBS"
|
||||
CPPFLAGS="$save_CPPFLAGS"
|
||||
AC_LANG_POP(C)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $libusbok = yes; then
|
||||
dnl success
|
||||
AC_MSG_NOTICE([Using LIBUSB version '${libusb_name}'])
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
dnl not found; clear substitution variables
|
||||
LIBUSB_PKG_CONFIG_NAME=
|
||||
USB_INCLUDES=
|
||||
USB_LIBS=
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
|
||||
dnl create substitution variables
|
||||
AC_SUBST(USB_INCLUDES)
|
||||
AC_SUBST(USB_LIBS)
|
||||
AC_SUBST(LIBUSB_PKG_CONFIG_NAME)
|
||||
|
||||
dnl restore LDFLAGS
|
||||
LDFLAGS=${saved_LDFLAGS}
|
||||
])
|
|
@ -0,0 +1,75 @@
|
|||
# Check for sdcc support. -*- Autoconf -*-
|
||||
|
||||
# Copyright 2004 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_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_RESULT([USRP requires sdcc version 2. sdcc not found. See http://sdcc.sf.net])
|
||||
sdccok=no
|
||||
else
|
||||
sdcc_version_min=$1
|
||||
|
||||
sdcc_version=`sdcc --version 2>&1 | \
|
||||
sed 's/\(SDCC.* \)\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)\( .*$\)/\2/'`
|
||||
|
||||
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_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" `
|
||||
|
||||
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
|
||||
|
||||
AC_SUBST(XCC)
|
||||
AC_SUBST(XAS)
|
||||
fi
|
||||
|
||||
if test $sdccok = yes; then
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
])
|
Loading…
Reference in New Issue