2 dnl Copyright 2008,2009 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],
31 AC_CONFIG_SRCDIR([config/gr_standalone.m4])
32 AM_CONFIG_HEADER(config.h)
40 dnl Remember if the user explicity set CXXFLAGS
41 if test -n "${CXXFLAGS}"; then
47 GR_LIB64 dnl check for lib64 suffix after choosing compilers
49 dnl The three macros above are known to override CXXFLAGS if the user
50 dnl didn't specify them. Though I'm sure somebody thought this was
51 dnl a good idea, it makes it hard to use other than -g -O2 when compiling
52 dnl selected files. Thus we "undo" the damage here...
54 dnl If the user specified CXXFLAGS, we use them. Otherwise when compiling
55 dnl the output of swig use use -O1 if we're using g++.
56 dnl See Makefile.common for the rest of the magic.
57 if test "$user_set_cxxflags" != yes; then
58 autoconf_default_CXXFLAGS="$CXXFLAGS"
59 if test "$GXX" = yes; then
62 dnl "-O1" is broken on the PPC for some reason
63 dnl (at least as of g++ 4.1.1)
64 swig_CXXFLAGS="-g1 -O2 -Wno-strict-aliasing -Wno-parentheses"
67 swig_CXXFLAGS="-g -O1 -Wno-strict-aliasing -Wno-parentheses"
72 AC_SUBST(autoconf_default_CXXFLAGS)
73 AC_SUBST(swig_CXXFLAGS)
75 dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
76 if test x${PKG_CONFIG_PATH} = x; then
77 PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
79 PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
81 export PKG_CONFIG_PATH
90 AC_PATH_PROG([RM_PROG], [rm])
93 AC_ENABLE_SHARED dnl do build shared libraries
94 AC_DISABLE_STATIC dnl don't build static libraries
95 m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
98 GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
99 GR_SCRIPTING dnl Locate python, SWIG, etc
101 dnl Checks for header files.
104 dnl Checks for typedefs, structures, and compiler characteristics.
111 dnl Check for Mingw support
114 AC_CHECK_PROG([XMLTO],[xmlto],[yes],[])
115 AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes])
117 PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 3)
118 LIBS="$LIBS $GNURADIO_CORE_LIBS"