root / configure.ac @ 9739742f
History | View | Annotate | Download (13.6 kB)
| 1 | 1eb2ad39 | Johnathan Corgan | dnl Copyright 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc. |
|---|---|---|---|
| 2 | 5d69a524 | jcorgan | dnl |
| 3 | 5d69a524 | jcorgan | dnl This file is part of GNU Radio |
| 4 | 5d69a524 | jcorgan | dnl |
| 5 | 5d69a524 | jcorgan | dnl GNU Radio is free software; you can redistribute it and/or modify |
| 6 | 5d69a524 | jcorgan | dnl it under the terms of the GNU General Public License as published by |
| 7 | 937b719d | eb | dnl the Free Software Foundation; either version 3, or (at your option) |
| 8 | 5d69a524 | jcorgan | dnl any later version. |
| 9 | 5d69a524 | jcorgan | dnl |
| 10 | 5d69a524 | jcorgan | dnl GNU Radio is distributed in the hope that it will be useful, |
| 11 | 5d69a524 | jcorgan | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | 5d69a524 | jcorgan | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | 5d69a524 | jcorgan | dnl GNU General Public License for more details. |
| 14 | 5d69a524 | jcorgan | dnl |
| 15 | 5d69a524 | jcorgan | dnl You should have received a copy of the GNU General Public License |
| 16 | 5d69a524 | jcorgan | dnl along with GNU Radio; see the file COPYING. If not, write to |
| 17 | 86f5c924 | eb | dnl the Free Software Foundation, Inc., 51 Franklin Street, |
| 18 | 86f5c924 | eb | dnl Boston, MA 02110-1301, USA. |
| 19 | 5d69a524 | jcorgan | |
| 20 | 5d69a524 | jcorgan | AC_INIT |
| 21 | 5d69a524 | jcorgan | AC_PREREQ(2.57) |
| 22 | 37f8cc6c | Josh Blum | |
| 23 | 37f8cc6c | Josh Blum | dnl Set the prefix to the default when --prefix is not specified. |
| 24 | 37f8cc6c | Josh Blum | dnl This is critical for variable substitutions in the configure. |
| 25 | 37f8cc6c | Josh Blum | if test "${prefix}" = "NONE"; then
|
| 26 | 37f8cc6c | Josh Blum | prefix=${ac_default_prefix}
|
| 27 | 37f8cc6c | Josh Blum | fi |
| 28 | 37f8cc6c | Josh Blum | |
| 29 | 5d69a524 | jcorgan | AM_CONFIG_HEADER(config.h) |
| 30 | bf89a844 | eb | AC_CONFIG_SRCDIR([gnuradio-core/src/lib/runtime/gr_vmcircbuf.cc]) |
| 31 | bf89a844 | eb | |
| 32 | bf89a844 | eb | AC_CANONICAL_BUILD |
| 33 | 5d69a524 | jcorgan | AC_CANONICAL_HOST |
| 34 | bf89a844 | eb | AC_CANONICAL_TARGET |
| 35 | bf89a844 | eb | |
| 36 | 56496536 | Johnathan Corgan | GR_VERSION |
| 37 | 56496536 | Johnathan Corgan | dnl ustar required to have pathnames > 99 chars |
| 38 | 56496536 | Johnathan Corgan | _AM_SET_OPTION([tar-ustar]) |
| 39 | 56496536 | Johnathan Corgan | AM_INIT_AUTOMAKE(gnuradio,$RELEASE) |
| 40 | bf89a844 | eb | |
| 41 | 4d84dd43 | eb | DEFINES="" |
| 42 | 4d84dd43 | eb | AC_SUBST(DEFINES) |
| 43 | 4d84dd43 | eb | |
| 44 | 18f68585 | eb | dnl Remember if the user explicity set CFLAGS |
| 45 | 18f68585 | eb | if test -n "${CFLAGS}"; then
|
| 46 | 18f68585 | eb | user_set_cflags=yes |
| 47 | 18f68585 | eb | fi |
| 48 | cbe1628f | eb | dnl Remember if the user explicity set CXXFLAGS |
| 49 | cbe1628f | eb | if test -n "${CXXFLAGS}"; then
|
| 50 | cbe1628f | eb | user_set_cxxflags=yes |
| 51 | cbe1628f | eb | fi |
| 52 | cbe1628f | eb | |
| 53 | 18f68585 | eb | |
| 54 | 5d69a524 | jcorgan | LF_CONFIGURE_CC |
| 55 | 5d69a524 | jcorgan | LF_CONFIGURE_CXX |
| 56 | 2c8ea58e | eb | GR_LIB64 dnl check for lib64 suffix after choosing compilers |
| 57 | cbe1628f | eb | |
| 58 | 18f68585 | eb | |
| 59 | 18f68585 | eb | dnl The three macros above are known to override CFLAGS if the user |
| 60 | 18f68585 | eb | dnl didn't specify them. Though I'm sure somebody thought this was |
| 61 | 18f68585 | eb | dnl a good idea, it makes it hard to use other than -g -O2 when compiling |
| 62 | 18f68585 | eb | dnl selected files. Thus we "undo" the damage here... |
| 63 | 18f68585 | eb | dnl |
| 64 | 18f68585 | eb | dnl If the user specified CFLAGS, we use them. |
| 65 | 18f68585 | eb | dnl See Makefile.common for the rest of the magic. |
| 66 | 18f68585 | eb | if test "$user_set_cflags" != yes; then |
| 67 | 18f68585 | eb | autoconf_default_CFLAGS="$CFLAGS" |
| 68 | 18f68585 | eb | CFLAGS="" |
| 69 | 18f68585 | eb | fi |
| 70 | 18f68585 | eb | AC_SUBST(autoconf_default_CFLAGS) |
| 71 | 18f68585 | eb | |
| 72 | 18f68585 | eb | |
| 73 | cbe1628f | eb | dnl The three macros above are known to override CXXFLAGS if the user |
| 74 | cbe1628f | eb | dnl didn't specify them. Though I'm sure somebody thought this was |
| 75 | cbe1628f | eb | dnl a good idea, it makes it hard to use other than -g -O2 when compiling |
| 76 | cbe1628f | eb | dnl selected files. Thus we "undo" the damage here... |
| 77 | cbe1628f | eb | dnl |
| 78 | cbe1628f | eb | dnl If the user specified CXXFLAGS, we use them. Otherwise when compiling |
| 79 | cbe1628f | eb | dnl the output of swig use use -O1 if we're using g++. |
| 80 | cbe1628f | eb | dnl See Makefile.common for the rest of the magic. |
| 81 | cbe1628f | eb | if test "$user_set_cxxflags" != yes; then |
| 82 | cbe1628f | eb | autoconf_default_CXXFLAGS="$CXXFLAGS" |
| 83 | 18f68585 | eb | CXXFLAGS="" |
| 84 | cbe1628f | eb | if test "$GXX" = yes; then |
| 85 | e754be97 | eb | case "$host_cpu" in |
| 86 | e754be97 | eb | powerpc*) |
| 87 | 90e4faa6 | jcorgan | dnl "-O1" is broken on the PPC for some reason |
| 88 | 90e4faa6 | jcorgan | dnl (at least as of g++ 4.1.1) |
| 89 | ae3d670a | eb | swig_CXXFLAGS="-g1 -O2 -Wno-strict-aliasing -Wno-parentheses" |
| 90 | 511ddd6c | michaelld | ;; |
| 91 | 511ddd6c | michaelld | *) |
| 92 | ae3d670a | eb | swig_CXXFLAGS="-g -O1 -Wno-strict-aliasing -Wno-parentheses" |
| 93 | 511ddd6c | michaelld | ;; |
| 94 | 511ddd6c | michaelld | esac |
| 95 | cbe1628f | eb | fi |
| 96 | cbe1628f | eb | fi |
| 97 | cbe1628f | eb | AC_SUBST(autoconf_default_CXXFLAGS) |
| 98 | cbe1628f | eb | AC_SUBST(swig_CXXFLAGS) |
| 99 | cbe1628f | eb | |
| 100 | 5c02ea03 | eb | dnl add ${prefix}/lib${gr_libdir_suffix}/pkgconfig to the head of the PKG_CONFIG_PATH
|
| 101 | 5c02ea03 | eb | if test x${PKG_CONFIG_PATH} = x; then
|
| 102 | 5c02ea03 | eb | PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig
|
| 103 | 5c02ea03 | eb | else |
| 104 | 5c02ea03 | eb | PKG_CONFIG_PATH=${prefix}/lib${gr_libdir_suffix}/pkgconfig:${PKG_CONFIG_PATH}
|
| 105 | 5c02ea03 | eb | fi |
| 106 | 5c02ea03 | eb | export PKG_CONFIG_PATH |
| 107 | 5c02ea03 | eb | |
| 108 | 18f68585 | eb | LF_SET_WARNINGS |
| 109 | 5d69a524 | jcorgan | GR_SET_GPROF |
| 110 | 5d69a524 | jcorgan | GR_SET_PROF |
| 111 | ff432904 | jcorgan | AM_PROG_AS |
| 112 | 5d69a524 | jcorgan | AC_PROG_LN_S |
| 113 | 5d69a524 | jcorgan | AC_PROG_MAKE_SET |
| 114 | 5d69a524 | jcorgan | AC_PROG_INSTALL |
| 115 | 63f2a732 | jcorgan | |
| 116 | 63f2a732 | jcorgan | # AC_PROG_MKDIR_P |
| 117 | 63f2a732 | jcorgan | # is a backport of autoconf-2.60's AC_PROG_MKDIR_P. |
| 118 | 63f2a732 | jcorgan | # Remove this macro when we can assume autoconf >= 2.60. |
| 119 | 63f2a732 | jcorgan | m4_ifdef([AC_PROG_MKDIR_P], [], [ |
| 120 | 63f2a732 | jcorgan | AC_DEFUN([AC_PROG_MKDIR_P], |
| 121 | 63f2a732 | jcorgan | [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake |
| 122 | 63f2a732 | jcorgan | MKDIR_P='$(mkdir_p)' |
| 123 | 63f2a732 | jcorgan | AC_SUBST([MKDIR_P])]) |
| 124 | 63f2a732 | jcorgan | ]) |
| 125 | 503efe1f | jcorgan | AC_PROG_MKDIR_P |
| 126 | 63f2a732 | jcorgan | |
| 127 | c7aab5e1 | jcorgan | AC_PATH_PROG([RM_PROG], [rm]) |
| 128 | 5d69a524 | jcorgan | |
| 129 | 5d69a524 | jcorgan | AC_LIBTOOL_WIN32_DLL |
| 130 | 5d69a524 | jcorgan | dnl AC_DISABLE_SHARED dnl don't build shared libraries |
| 131 | 5d69a524 | jcorgan | AC_ENABLE_SHARED dnl do build shared libraries |
| 132 | 5d69a524 | jcorgan | AC_DISABLE_STATIC dnl don't build static libraries |
| 133 | a2220200 | eb | m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL]) |
| 134 | 212ba35c | Johnathan Corgan | dnl GR_FORTRAN |
| 135 | 5d69a524 | jcorgan | |
| 136 | 5d69a524 | jcorgan | GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag |
| 137 | 5d69a524 | jcorgan | GR_SCRIPTING |
| 138 | 5d69a524 | jcorgan | |
| 139 | 40b8a57d | jcorgan | # Allow user to choose whether to generate SWIG/Python |
| 140 | 40b8a57d | jcorgan | # Default is enabled |
| 141 | 40b8a57d | jcorgan | AC_ARG_ENABLE([python], |
| 142 | 40b8a57d | jcorgan | [AS_HELP_STRING([--enable-python], |
| 143 | 40b8a57d | jcorgan | [generate SWIG/Python components (default is yes)])], |
| 144 | 40b8a57d | jcorgan | [case "${enableval}" in
|
| 145 | 40b8a57d | jcorgan | yes) enable_python=yes ;; |
| 146 | 40b8a57d | jcorgan | no) enable_python=no ;; |
| 147 | 40b8a57d | jcorgan | *) AC_MSG_ERROR([bad value ${enableval} for --enable-python]) ;;
|
| 148 | 40b8a57d | jcorgan | esac], |
| 149 | 40b8a57d | jcorgan | [enable_python=yes] |
| 150 | 40b8a57d | jcorgan | ) |
| 151 | 0bb3e5a7 | Rob Savoye | |
| 152 | 59a1eeb1 | Eric Blossom | # Allow user to choose whether to generate SWIG/Guile |
| 153 | 59a1eeb1 | Eric Blossom | # Default is disabled |
| 154 | 0bb3e5a7 | Rob Savoye | AC_ARG_ENABLE([guile], |
| 155 | 0bb3e5a7 | Rob Savoye | [AS_HELP_STRING([--enable-guile], |
| 156 | 59a1eeb1 | Eric Blossom | [generate SWIG/Guile components (default is no)])], |
| 157 | 0bb3e5a7 | Rob Savoye | [case "${enableval}" in
|
| 158 | 0bb3e5a7 | Rob Savoye | yes) enable_guile=yes ;; |
| 159 | 0bb3e5a7 | Rob Savoye | no) enable_guile=no ;; |
| 160 | 0bb3e5a7 | Rob Savoye | *) AC_MSG_ERROR([bad value ${enableval} for --enable-guile]) ;;
|
| 161 | 0bb3e5a7 | Rob Savoye | esac], |
| 162 | 0bb3e5a7 | Rob Savoye | [enable_guile=no] |
| 163 | 0bb3e5a7 | Rob Savoye | ) |
| 164 | 69033829 | Rob Savoye | |
| 165 | 40b8a57d | jcorgan | AM_CONDITIONAL([PYTHON], [test x$enable_python = xyes]) |
| 166 | 0bb3e5a7 | Rob Savoye | AM_CONDITIONAL([GUILE], [test x$enable_guile = xyes]) |
| 167 | 40b8a57d | jcorgan | |
| 168 | 878730dc | jcorgan | AC_CHECK_PROG([XMLTO],[xmlto],[yes],[]) |
| 169 | 878730dc | jcorgan | AM_CONDITIONAL([HAS_XMLTO], [test x$XMLTO = xyes]) |
| 170 | 878730dc | jcorgan | |
| 171 | 5d69a524 | jcorgan | dnl Checks for libraries. |
| 172 | 5d69a524 | jcorgan | AC_CHECK_LIB(socket,socket) |
| 173 | 5d69a524 | jcorgan | |
| 174 | 5c02ea03 | eb | dnl Set the c++ compiler that we use for the build system when cross compiling |
| 175 | bf89a844 | eb | if test x$CXX_FOR_BUILD = x |
| 176 | 5d69a524 | jcorgan | then |
| 177 | bf89a844 | eb | if test x$cross_compiling = xno; then |
| 178 | bf89a844 | eb | CXX_FOR_BUILD=${CXX}
|
| 179 | bf89a844 | eb | else |
| 180 | bf89a844 | eb | CXX_FOR_BUILD=g++ |
| 181 | bf89a844 | eb | fi |
| 182 | 5d69a524 | jcorgan | fi |
| 183 | 5d69a524 | jcorgan | AC_SUBST(CXX_FOR_BUILD) |
| 184 | 5d69a524 | jcorgan | |
| 185 | 5d69a524 | jcorgan | dnl Check for SysV shm (mandatory) |
| 186 | 5d69a524 | jcorgan | dnl FIXME this is no longer mandatory. Check the macro. |
| 187 | 5d69a524 | jcorgan | GR_SYSV_SHM |
| 188 | 5d69a524 | jcorgan | |
| 189 | 5d69a524 | jcorgan | dnl Checks for header files. |
| 190 | 5d69a524 | jcorgan | AC_HEADER_STDC |
| 191 | 5d69a524 | jcorgan | AC_HEADER_SYS_WAIT |
| 192 | 5d69a524 | jcorgan | AC_CHECK_HEADERS(fcntl.h limits.h strings.h time.h sys/ioctl.h sys/time.h unistd.h) |
| 193 | 7b14a03f | eb | AC_CHECK_HEADERS(linux/ppdev.h dev/ppbus/ppi.h sys/mman.h sys/select.h sys/types.h) |
| 194 | 5d1b7103 | michaelld | AC_CHECK_HEADERS(sys/resource.h stdint.h sched.h signal.h sys/syscall.h malloc.h) |
| 195 | a81fada7 | eb | AC_CHECK_HEADERS(windows.h) |
| 196 | a1d3c023 | eb | AC_CHECK_HEADERS(vec_types.h) |
| 197 | 68ce6b4a | Eric Blossom | AC_CHECK_HEADERS(netdb.h netinet/in.h arpa/inet.h sys/types.h sys/socket.h) |
| 198 | c1ff40ad | jcorgan | |
| 199 | 5d69a524 | jcorgan | dnl Checks for typedefs, structures, and compiler characteristics. |
| 200 | 5d69a524 | jcorgan | AC_C_CONST |
| 201 | 5d69a524 | jcorgan | AC_C_INLINE |
| 202 | 5d69a524 | jcorgan | AC_TYPE_SIZE_T |
| 203 | 5d69a524 | jcorgan | AC_HEADER_TIME |
| 204 | 1adf4453 | jcorgan | AC_C_BIGENDIAN([GR_ARCH_BIGENDIAN=1],[GR_ARCH_BIGENDIAN=0]) |
| 205 | 1adf4453 | jcorgan | AC_SUBST(GR_ARCH_BIGENDIAN) |
| 206 | 676acd5c | jcorgan | AC_STRUCT_TM |
| 207 | 5d69a524 | jcorgan | |
| 208 | 5d69a524 | jcorgan | dnl Checks for library functions. |
| 209 | 5d69a524 | jcorgan | AC_FUNC_ALLOCA |
| 210 | b2a284bf | jcorgan | GR_CHECK_MEMALIGN |
| 211 | 5d69a524 | jcorgan | AC_FUNC_SETVBUF_REVERSED |
| 212 | 5d69a524 | jcorgan | AC_FUNC_VPRINTF |
| 213 | 5d69a524 | jcorgan | AC_CHECK_FUNCS([mmap select socket strcspn strerror strspn getpagesize sysconf]) |
| 214 | 5d69a524 | jcorgan | AC_CHECK_FUNCS([snprintf gettimeofday nanosleep sched_setscheduler]) |
| 215 | 29576322 | eb | AC_CHECK_FUNCS([modf sqrt sigaction sigprocmask pthread_sigmask]) |
| 216 | 0bf2128a | eb | AC_CHECK_FUNCS([sched_setaffinity]) |
| 217 | 5d69a524 | jcorgan | |
| 218 | 5d69a524 | jcorgan | AC_CHECK_LIB(m, sincos, [AC_DEFINE([HAVE_SINCOS],[1],[Define to 1 if your system has `sincos'.])]) |
| 219 | 5d69a524 | jcorgan | AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your system has `sincosf'.])]) |
| 220 | 5d69a524 | jcorgan | AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system has `sinf'.])]) |
| 221 | 5d69a524 | jcorgan | AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system has `cosf'.])]) |
| 222 | 5d69a524 | jcorgan | AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your system has `trunc'.])]) |
| 223 | e20a5fd2 | eb | AC_CHECK_LIB(m, exp10, [AC_DEFINE([HAVE_EXP10],[1],[Define to 1 if your system has 'exp10'.])]) |
| 224 | 593a87ce | eb | AC_CHECK_LIB(m, log2, [AC_DEFINE([HAVE_LOG2],[1],[Define to 1 if your system has 'log2'.])]) |
| 225 | 676acd5c | jcorgan | #AC_FUNC_MKTIME |
| 226 | e20a5fd2 | eb | |
| 227 | 5d69a524 | jcorgan | AH_BOTTOM([ |
| 228 | 5d69a524 | jcorgan | #ifndef HAVE_TRUNC |
| 229 | 5d69a524 | jcorgan | #include <math.h> |
| 230 | 5d69a524 | jcorgan | inline static double trunc(double x) |
| 231 | 5d69a524 | jcorgan | {
|
| 232 | 5d69a524 | jcorgan | return x >= 0 ? floor(x) : ceil(x); |
| 233 | 5d69a524 | jcorgan | } |
| 234 | 5d69a524 | jcorgan | #endif |
| 235 | e20a5fd2 | eb | |
| 236 | e20a5fd2 | eb | #ifndef HAVE_EXP10 |
| 237 | e20a5fd2 | eb | #include <math.h> |
| 238 | e20a5fd2 | eb | inline static double exp10(double x) |
| 239 | e20a5fd2 | eb | {
|
| 240 | e20a5fd2 | eb | return pow(10.0, x); |
| 241 | e20a5fd2 | eb | } |
| 242 | e20a5fd2 | eb | #endif |
| 243 | a81fada7 | eb | |
| 244 | a81fada7 | eb | #ifdef HAVE_WINDOWS_H |
| 245 | a81fada7 | eb | #define NOMINMAX |
| 246 | a81fada7 | eb | #endif |
| 247 | 5d69a524 | jcorgan | ]) |
| 248 | 5d69a524 | jcorgan | |
| 249 | 5d69a524 | jcorgan | GR_CHECK_SHM_OPEN |
| 250 | 5d69a524 | jcorgan | GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS |
| 251 | 5d69a524 | jcorgan | GR_CHECK_CREATEFILEMAPPING |
| 252 | 5d69a524 | jcorgan | |
| 253 | 5d69a524 | jcorgan | dnl Check for Mingw support |
| 254 | 5d69a524 | jcorgan | GR_PWIN32 |
| 255 | 5d69a524 | jcorgan | |
| 256 | 5d69a524 | jcorgan | dnl Do we have "dot", part of the graphviz package from AT&T? |
| 257 | 5d69a524 | jcorgan | dnl Doxgen will use it to draw pretty diagrams ;-) |
| 258 | 5d69a524 | jcorgan | AC_CHECK_PROG(HAVE_DOT, [dot],[YES],[NO]) |
| 259 | 5d69a524 | jcorgan | |
| 260 | 5d69a524 | jcorgan | PKG_CHECK_MODULES(FFTW3F, fftw3f >= 3.0) |
| 261 | 5d69a524 | jcorgan | AC_SUBST(FFTW3F_LIBS) |
| 262 | 5d69a524 | jcorgan | |
| 263 | 5d69a524 | jcorgan | dnl conditional build stuff |
| 264 | 5d69a524 | jcorgan | GR_CHECK_DOXYGEN |
| 265 | 5d69a524 | jcorgan | GR_SET_MD_CPU |
| 266 | 5d69a524 | jcorgan | |
| 267 | 5d69a524 | jcorgan | dnl Define where to look for cppunit includes and libs |
| 268 | 5d69a524 | jcorgan | dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS |
| 269 | bf89a844 | eb | dnl Try using pkg-config first, then fall back to cppunit-config. |
| 270 | bf89a844 | eb | PKG_CHECK_EXISTS(cppunit, |
| 271 | bf89a844 | eb | [PKG_CHECK_MODULES(CPPUNIT, cppunit >= 1.9.14)], |
| 272 | bf89a844 | eb | [AM_PATH_CPPUNIT([1.9.14],[], |
| 273 | bf89a844 | eb | [AC_MSG_ERROR([GNU Radio requires cppunit. Stop])])]) |
| 274 | 5d69a524 | jcorgan | |
| 275 | 2c8ea58e | eb | CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS |
| 276 | 2c8ea58e | eb | AC_SUBST(CPPUNIT_INCLUDES) |
| 277 | 2c8ea58e | eb | |
| 278 | 90e4faa6 | jcorgan | dnl see if GUILE is installed |
| 279 | 90e4faa6 | jcorgan | AC_PATH_PROG(GUILE,guile) |
| 280 | 90e4faa6 | jcorgan | |
| 281 | 2c8ea58e | eb | dnl |
| 282 | 2c8ea58e | eb | dnl We require the boost headers, thread lib and date_time lib. |
| 283 | 2c8ea58e | eb | dnl AX_BOOST_BASE finds the headers and the lib dir (-L<foo>) |
| 284 | 2c8ea58e | eb | dnl |
| 285 | 2c8ea58e | eb | dnl calls AC_SUBST(BOOST_CPPFLAGS), AC_SUBST(BOOST_LDFLAGS) and defines HAVE_BOOST |
| 286 | 1eb2ad39 | Johnathan Corgan | dnl |
| 287 | 1eb2ad39 | Johnathan Corgan | dnl Current Boost version requirement is >=1.35 for all platforms except Darwin, |
| 288 | 1eb2ad39 | Johnathan Corgan | dnl which requires >=1.37 for code in usrp host library. |
| 289 | 1eb2ad39 | Johnathan Corgan | case "$host_os" in |
| 290 | 1eb2ad39 | Johnathan Corgan | darwin*) |
| 291 | 1eb2ad39 | Johnathan Corgan | AX_BOOST_BASE([1.37]) |
| 292 | 1eb2ad39 | Johnathan Corgan | ;; |
| 293 | 1eb2ad39 | Johnathan Corgan | *) |
| 294 | 1eb2ad39 | Johnathan Corgan | AX_BOOST_BASE([1.35]) |
| 295 | 1eb2ad39 | Johnathan Corgan | ;; |
| 296 | 1eb2ad39 | Johnathan Corgan | esac |
| 297 | 2c8ea58e | eb | |
| 298 | 2c8ea58e | eb | dnl calls AC_SUBST(BOOST_THREAD_LIB), AC_SUBST(BOOST_CXXFLAGS) and defines HAVE_BOOST_THREAD |
| 299 | 2c8ea58e | eb | AX_BOOST_THREAD |
| 300 | 2c8ea58e | eb | CXXFLAGS="$CXXFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar |
| 301 | 2c8ea58e | eb | CFLAGS="$CFLAGS $BOOST_CXXFLAGS" dnl often picks up a -pthread or something similar |
| 302 | 2c8ea58e | eb | |
| 303 | 2c8ea58e | eb | dnl |
| 304 | 2c8ea58e | eb | dnl all the rest of these call AC_SUBST(BOOST_<foo>_LIB) and define HAVE_BOOST_<foo> |
| 305 | 2c8ea58e | eb | dnl |
| 306 | 2c8ea58e | eb | AX_BOOST_DATE_TIME |
| 307 | 2c8ea58e | eb | dnl AX_BOOST_FILESYSTEM |
| 308 | 2c8ea58e | eb | dnl AX_BOOST_IOSTREAMS |
| 309 | 72c625f7 | jcorgan | AX_BOOST_PROGRAM_OPTIONS |
| 310 | 2c8ea58e | eb | dnl AX_BOOST_REGEX |
| 311 | 2c8ea58e | eb | dnl AX_BOOST_SERIALIZATION |
| 312 | 2c8ea58e | eb | dnl AX_BOOST_SIGNALS |
| 313 | 2c8ea58e | eb | dnl AX_BOOST_SYSTEM |
| 314 | 2c8ea58e | eb | dnl AX_BOOST_TEST_EXEC_MONITOR |
| 315 | 2c8ea58e | eb | dnl AX_BOOST_UNIT_TEST_FRAMEWORK |
| 316 | 2c8ea58e | eb | dnl AX_BOOST_WSERIALIZATION |
| 317 | 5d69a524 | jcorgan | |
| 318 | 1badda02 | Johnathan Corgan | BUILD_DATE=`date -u +"%a, %d %b %Y %R:%S"` |
| 319 | 6f60fe94 | jcorgan | AC_SUBST(BUILD_DATE) |
| 320 | 62cc4591 | jcorgan | |
| 321 | 3b0db383 | jcorgan | dnl SYSCONFDIR substitution |
| 322 | 3b0db383 | jcorgan | if test "${sysconfdir}" == "\${prefix}/etc" ; then
|
| 323 | 3b0db383 | jcorgan | if test "${prefix}" == "NONE" ; then
|
| 324 | 3b0db383 | jcorgan | SYSCONFDIR=["$ac_default_prefix/etc"] |
| 325 | 3b0db383 | jcorgan | else |
| 326 | 3b0db383 | jcorgan | SYSCONFDIR=["${prefix}/etc"]
|
| 327 | 3b0db383 | jcorgan | fi |
| 328 | 3b0db383 | jcorgan | else |
| 329 | 3b0db383 | jcorgan | SYSCONFDIR=[${sysconfdir}]
|
| 330 | 3b0db383 | jcorgan | fi |
| 331 | 3b0db383 | jcorgan | AC_SUBST(SYSCONFDIR) |
| 332 | 3b0db383 | jcorgan | |
| 333 | 3b0db383 | jcorgan | dnl System configuration files |
| 334 | 3b0db383 | jcorgan | GR_PREFSDIR=[$SYSCONFDIR/${PACKAGE}/conf.d]
|
| 335 | 3b0db383 | jcorgan | AC_SUBST(GR_PREFSDIR) |
| 336 | 3b0db383 | jcorgan | |
| 337 | 5d69a524 | jcorgan | dnl Component specific configuration |
| 338 | 5d69a524 | jcorgan | dnl The order of the GR_ macros determines the order of compilation |
| 339 | 90e4faa6 | jcorgan | dnl For -any- checks on $enable_all_components |
| 340 | 34af4364 | jcorgan | dnl use the following guidelines: |
| 341 | 90e4faa6 | jcorgan | dnl yes : --enable-all-components was specified, so error out if any |
| 342 | 90e4faa6 | jcorgan | dnl components do not pass configuration checks. |
| 343 | 90e4faa6 | jcorgan | dnl no : --disable-all-components was specified, so try to build the |
| 344 | 90e4faa6 | jcorgan | dnl --enable'd components, and error out if any do not pass |
| 345 | 90e4faa6 | jcorgan | dnl configuration checks. |
| 346 | 90e4faa6 | jcorgan | dnl "" : this option was not specified on the command line; try to |
| 347 | 90e4faa6 | jcorgan | dnl build all components that are not --with'd, but don't |
| 348 | 90e4faa6 | jcorgan | dnl error out if any component does not pass configuration checks. |
| 349 | 90e4faa6 | jcorgan | dnl |
| 350 | 90e4faa6 | jcorgan | dnl For each --enable-foo component, if that flag is not specified on |
| 351 | 90e4faa6 | jcorgan | dnl the command line, the related variable $enable_foo will be set to |
| 352 | 90e4faa6 | jcorgan | dnl $enable_all_components . |
| 353 | 90e4faa6 | jcorgan | |
| 354 | 287fc41d | jcorgan | AC_ARG_ENABLE( |
| 355 | 287fc41d | jcorgan | [all-components], |
| 356 | 90e4faa6 | jcorgan | [ --enable-all-components Build all configurable components (default), or stop on failed dependencies] |
| 357 | 287fc41d | jcorgan | ) |
| 358 | 287fc41d | jcorgan | |
| 359 | 287fc41d | jcorgan | build_dirs="config" |
| 360 | b48de00c | jcorgan | GRC_GRUEL dnl must come first |
| 361 | 1186ab98 | Tom Rondeau | GRC_VOLK |
| 362 | 28361a1b | eb | GRC_GCELL |
| 363 | 28361a1b | eb | GRC_GNURADIO_CORE |
| 364 | b949d474 | jcorgan | GRC_USRP |
| 365 | e0fcbaee | jcorgan | GRC_USRP2 |
| 366 | b949d474 | jcorgan | GRC_GR_USRP dnl this must come after GRC_USRP |
| 367 | e0fcbaee | jcorgan | GRC_GR_USRP2 |
| 368 | b9ba2711 | eb | GRC_GR_GCELL dnl this must come after GRC_GCELL and GRC_GNURADIO_CORE |
| 369 | 8e7ddfa7 | n4hy | GRC_GR_MSDD6000 |
| 370 | b949d474 | jcorgan | GRC_GR_AUDIO_ALSA |
| 371 | b949d474 | jcorgan | GRC_GR_AUDIO_JACK |
| 372 | b949d474 | jcorgan | GRC_GR_AUDIO_OSS |
| 373 | f3c0065c | jcorgan | GRC_GR_AUDIO_OSX |
| 374 | 287fc41d | jcorgan | GRC_GR_AUDIO_PORTAUDIO |
| 375 | 287fc41d | jcorgan | GRC_GR_AUDIO_WINDOWS |
| 376 | b949d474 | jcorgan | GRC_GR_ATSC |
| 377 | b949d474 | jcorgan | GRC_GR_COMEDI |
| 378 | 36c0ba64 | trondeau | GRC_GR_CVSD_VOCODER |
| 379 | 48fefc9b | jcorgan | GRC_GR_GPIO |
| 380 | b949d474 | jcorgan | GRC_GR_GSM_FR_VOCODER |
| 381 | b6101982 | Johnathan Corgan | GRC_GR_NOAA |
| 382 | 50a6df5e | jcorgan | GRC_GR_PAGER |
| 383 | c39968a6 | jcorgan | GRC_GR_RADAR_MONO |
| 384 | b949d474 | jcorgan | GRC_GR_RADIO_ASTRONOMY |
| 385 | 287fc41d | jcorgan | GRC_GR_TRELLIS |
| 386 | b949d474 | jcorgan | GRC_GR_VIDEO_SDL |
| 387 | b949d474 | jcorgan | GRC_GR_WXGUI |
| 388 | 144fa44e | trondeau | GRC_GR_QTGUI |
| 389 | c6baf9d4 | jcorgan | GRC_GR_SOUNDER dnl this must come after GRC_USRP |
| 390 | abde5aff | Eric Blossom | GRC_GR_UTILS dnl this must come after GRC_GR_WXGUI |
| 391 | d52c462e | jcorgan | GRC_GNURADIO_EXAMPLES dnl must come after all GRC_GR_* |
| 392 | e0feca2c | jblum | GRC_GRC |
| 393 | 54179f7f | Josh Blum | GRC_GR_UHD |
| 394 | 349331a8 | eb | GRC_DOCS dnl must be last |
| 395 | 5d69a524 | jcorgan | |
| 396 | 42d9c6f4 | jcorgan | # Each component is now either to be built, was skipped, will be |
| 397 | 42d9c6f4 | jcorgan | # included from pre-installed libraries and includes, or failed |
| 398 | 42d9c6f4 | jcorgan | # dependencies. |
| 399 | 287fc41d | jcorgan | AC_SUBST([build_dirs], [$build_dirs]) |
| 400 | 287fc41d | jcorgan | AC_SUBST([skipped_dirs], [$skipped_dirs]) |
| 401 | 42d9c6f4 | jcorgan | AC_SUBST([with_dirs], [$with_dirs]) |
| 402 | 42d9c6f4 | jcorgan | |
| 403 | 503efe1f | jcorgan | # fix for older autotools that don't define these by default |
| 404 | 729f214b | michaelld | AC_SUBST(abs_top_srcdir) |
| 405 | 729f214b | michaelld | AC_SUBST(abs_top_builddir) |
| 406 | 503efe1f | jcorgan | AC_SUBST(MKDIR_P) |
| 407 | 729f214b | michaelld | |
| 408 | 42d9c6f4 | jcorgan | # 'with' variables - the pre-installed libraries, includes, and paths |
| 409 | 42d9c6f4 | jcorgan | # - must always come last in the lists, so they require special |
| 410 | 42d9c6f4 | jcorgan | # treatment. |
| 411 | 42d9c6f4 | jcorgan | AC_SUBST(with_INCLUDES) |
| 412 | 42d9c6f4 | jcorgan | AC_SUBST(with_SWIG_INCLUDES) |
| 413 | 42d9c6f4 | jcorgan | AC_SUBST(with_PYDIRPATH) |
| 414 | 42d9c6f4 | jcorgan | AC_SUBST(with_SWIGDIRPATH) |
| 415 | 42d9c6f4 | jcorgan | AC_SUBST(with_LIBDIRPATH) |
| 416 | ff62557a | Eric Blossom | AC_SUBST(with_GUILE_LOAD_PATH) |
| 417 | 42d9c6f4 | jcorgan | |
| 418 | 42d9c6f4 | jcorgan | # Local files tweaked by AC |
| 419 | 5d69a524 | jcorgan | AC_CONFIG_FILES([\ |
| 420 | 287fc41d | jcorgan | Makefile \ |
| 421 | 42d9c6f4 | jcorgan | run_tests.sh \ |
| 422 | d1d80474 | Eric Blossom | setup_guile_test_env \ |
| 423 | 0bb3e5a7 | Rob Savoye | config/Makefile |
| 424 | 5d69a524 | jcorgan | ]) |
| 425 | 5d69a524 | jcorgan | |
| 426 | 42d9c6f4 | jcorgan | dnl run_tests.sh is created from run_tests.sh.in . Make it executable. |
| 427 | d1d80474 | Eric Blossom | AC_CONFIG_COMMANDS([run_tests_build], [chmod +x run_tests.sh]) |
| 428 | 6b5a0200 | jcorgan | |
| 429 | 5d69a524 | jcorgan | AC_OUTPUT |
| 430 | 5d69a524 | jcorgan | |
| 431 | 5d69a524 | jcorgan | echo |
| 432 | 287fc41d | jcorgan | echo "*********************************************************************" |
| 433 | 5d69a524 | jcorgan | echo The following GNU Radio components have been successfully configured: |
| 434 | 5d69a524 | jcorgan | echo |
| 435 | 287fc41d | jcorgan | for dir in $build_dirs |
| 436 | 5d69a524 | jcorgan | do |
| 437 | 5d69a524 | jcorgan | echo $dir |
| 438 | 5d69a524 | jcorgan | done |
| 439 | 5d69a524 | jcorgan | echo |
| 440 | 287fc41d | jcorgan | echo You my now run the 'make' command to build these components. |
| 441 | 287fc41d | jcorgan | echo |
| 442 | 287fc41d | jcorgan | if test "$skipped_dirs" != ""; then |
| 443 | 287fc41d | jcorgan | echo "*********************************************************************" |
| 444 | 287fc41d | jcorgan | echo The following components were skipped either because you asked not |
| 445 | 287fc41d | jcorgan | echo to build them or they didn\'t pass configuration checks: |
| 446 | 5d69a524 | jcorgan | echo |
| 447 | 287fc41d | jcorgan | for dir in $skipped_dirs |
| 448 | 5d69a524 | jcorgan | do |
| 449 | 5d69a524 | jcorgan | echo $dir |
| 450 | 5d69a524 | jcorgan | done |
| 451 | 5d69a524 | jcorgan | echo |
| 452 | 287fc41d | jcorgan | echo These components will not be built. |
| 453 | 5d69a524 | jcorgan | echo |
| 454 | 5d69a524 | jcorgan | fi |
| 455 | 42d9c6f4 | jcorgan | if test "$with_dirs" != ""; then |
| 456 | 42d9c6f4 | jcorgan | echo "*********************************************************************" |
| 457 | 42d9c6f4 | jcorgan | echo The following components will be included from pre-installed |
| 458 | 42d9c6f4 | jcorgan | echo libraries and includes: |
| 459 | 42d9c6f4 | jcorgan | echo |
| 460 | 42d9c6f4 | jcorgan | for dir in $with_dirs |
| 461 | 42d9c6f4 | jcorgan | do |
| 462 | 42d9c6f4 | jcorgan | echo $dir |
| 463 | 42d9c6f4 | jcorgan | done |
| 464 | 42d9c6f4 | jcorgan | echo |
| 465 | 42d9c6f4 | jcorgan | echo These components will not be built. |
| 466 | 42d9c6f4 | jcorgan | echo |
| 467 | 42d9c6f4 | jcorgan | fi |
| 468 | 40b8a57d | jcorgan | |
| 469 | 56496536 | Johnathan Corgan | echo Configured GNU Radio release $RELEASE for build. |