2 dnl Copyright 2008 Free Software Foundation, Inc.
4 dnl This file is part of GNU Radio
6 dnl GNU Radio is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 3, or (at your option)
11 dnl GNU Radio is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License along
17 dnl with this program; if not, write to the Free Software Foundation, Inc.,
18 dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 dnl GR_STANDALONE([package],[version])
24 dnl Handles the bulk of the configure.ac work for an out-of-tree build
26 dnl N.B., this is an m4_define because if it were an AC_DEFUN it would
27 dnl get called too late to be useful.
29 m4_define([GR_STANDALONE],
33 AC_CONFIG_SRCDIR([config/gr_standalone.m4])
34 AC_CONFIG_AUX_DIR([.])
35 AM_CONFIG_HEADER(config.h)
45 GR_LIB64 dnl check for lib64 suffix after choosing compilers
47 dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
48 if test x${PKG_CONFIG_PATH} = x; then
49 PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
51 PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
53 export PKG_CONFIG_PATH
62 AC_PATH_PROG([RM_PROG], [rm])
65 AC_ENABLE_SHARED dnl do build shared libraries
66 AC_DISABLE_STATIC dnl don't build static libraries
67 m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
70 GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
71 GR_SCRIPTING dnl Locate python, SWIG, etc
74 AC_HELP_STRING([--with-python], [Should we use python? [[default=yes]]]),
75 [case "$with_python" in
77 (*) AC_MSG_ERROR([Invalid argument ($with_python) to --with-python]) ;;
81 AM_CONDITIONAL([USE_PYTHON], [test "$with_python" = yes])
84 dnl Set the c++ compiler that we use for the build system when cross compiling
85 if test "x$CXX_FOR_BUILD" = x
89 AC_SUBST(CXX_FOR_BUILD)
91 dnl Checks for header files.
94 dnl Checks for typedefs, structures, and compiler characteristics.
101 dnl Check for Mingw support
104 AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
105 AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
107 dnl Define where to look for cppunit includes and libs
108 dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS
109 dnl Try using pkg-config first, then fall back to cppunit-config.
110 PKG_CHECK_EXISTS(cppunit,
111 [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)],
112 [AM_PATH_CPPUNIT([1.9.14],[],
113 [AC_MSG_ERROR([GNU Radio requires cppunit. Stop])])])
115 PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)