Removed ezdop from build until m4 issue fixed.
[debian/gnuradio] / configure.ac
1 dnl Copyright 2001,2002,2003,2004,2005,2006 Free Software Foundation, Inc.
2 dnl 
3 dnl This file is part of GNU Radio
4 dnl 
5 dnl GNU Radio is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 2, or (at your option)
8 dnl any later version.
9 dnl 
10 dnl GNU Radio is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 dnl GNU General Public License for more details.
14 dnl 
15 dnl You should have received a copy of the GNU General Public License
16 dnl along with GNU Radio; see the file COPYING.  If not, write to
17 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 dnl Boston, MA 02111-1307, USA.
19
20 AC_INIT
21 AC_PREREQ(2.57)
22 AM_CONFIG_HEADER(config.h)
23 AC_CANONICAL_HOST
24 AC_CANONICAL_TARGET([])
25 AM_INIT_AUTOMAKE(gnuradio,2.8svn)
26
27 GR_X86_64               dnl check for lib64 suffix
28 LF_CONFIGURE_CC
29 LF_CONFIGURE_CXX
30 LF_SET_WARNINGS
31 GR_SET_GPROF
32 GR_SET_PROF
33 GR_PROG_AS
34 AC_PROG_LN_S
35 AC_PROG_MAKE_SET
36 AC_PROG_INSTALL
37 AC_PATH_PROG([RM_PROG], [rm])
38
39 AC_LIBTOOL_WIN32_DLL
40 dnl AC_DISABLE_SHARED   dnl don't build shared libraries
41 AC_ENABLE_SHARED        dnl do build shared libraries
42 AC_DISABLE_STATIC       dnl don't build static libraries
43 AC_PROG_LIBTOOL
44 GR_FORTRAN
45
46 GR_NO_UNDEFINED         dnl do we need the -no-undefined linker flag
47 GR_SCRIPTING
48
49 dnl Checks for libraries.
50 AC_CHECK_LIB(socket,socket)
51
52 dnl check for threads (mandatory)
53 GR_OMNITHREAD
54 #AC_SUBST(PTHREAD_CFLAGS)
55 CFLAGS="${CFLAGS} $PTHREAD_CFLAGS"
56 CXXFLAGS="${CXXFLAGS} $PTHREAD_CFLAGS"
57
58 if test "x$CXX_FOR_BUILD" = x
59 then
60   CXX_FOR_BUILD=${CXX}
61 fi
62 AC_SUBST(CXX_FOR_BUILD)
63
64 dnl Check for SysV shm (mandatory)
65 dnl FIXME this is no longer mandatory.  Check the macro.
66 GR_SYSV_SHM
67
68 dnl Checks for header files.
69 AC_HEADER_STDC
70 AC_HEADER_SYS_WAIT
71 AC_CHECK_HEADERS(fcntl.h limits.h strings.h time.h sys/ioctl.h sys/time.h unistd.h)
72 AC_CHECK_HEADERS(linux/ppdev.h sys/mman.h sys/select.h sys/types.h)
73 AC_CHECK_HEADERS(sys/resource.h stdint.h sched.h)
74
75 dnl Checks for typedefs, structures, and compiler characteristics.
76 AC_C_CONST
77 AC_C_INLINE
78 AC_TYPE_SIZE_T
79 AC_HEADER_TIME
80 AC_C_BIGENDIAN
81 AC_STRUCT_TM
82
83 dnl Checks for library functions.
84 AC_FUNC_ALLOCA
85 AC_FUNC_SETVBUF_REVERSED
86 AC_FUNC_VPRINTF
87 AC_CHECK_FUNCS([mmap select socket strcspn strerror strspn getpagesize sysconf])
88 AC_CHECK_FUNCS([snprintf gettimeofday nanosleep sched_setscheduler])
89 AC_CHECK_FUNCS([modf sqrt])
90
91 AC_CHECK_LIB(m, sincos, [AC_DEFINE([HAVE_SINCOS],[1],[Define to 1 if your system has `sincos'.])])
92 AC_CHECK_LIB(m, sincosf,[AC_DEFINE([HAVE_SINCOSF],[1],[Define to 1 if your system has `sincosf'.])])
93 AC_CHECK_LIB(m, sinf, [AC_DEFINE([HAVE_SINF],[1],[Define to 1 if your system has `sinf'.])])
94 AC_CHECK_LIB(m, cosf, [AC_DEFINE([HAVE_COSF],[1],[Define to 1 if your system has `cosf'.])])
95 AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your system has `trunc'.])])
96 AC_CHECK_LIB(m, exp10, [AC_DEFINE([HAVE_EXP10],[1],[Define to 1 if your system has 'exp10'.])])
97 #AC_FUNC_MKTIME
98
99 AH_BOTTOM([
100 #ifndef HAVE_TRUNC
101 #include <math.h>
102 inline static double trunc(double x)
103 {
104   return x >= 0 ? floor(x) : ceil(x);
105 }
106 #endif
107
108 #ifndef HAVE_EXP10
109 #include <math.h>
110 inline static double exp10(double x)
111 {
112   return pow(10.0, x);
113 }
114 #endif
115 ])
116
117 GR_CHECK_SHM_OPEN
118 GR_LIBGNURADIO_CORE_EXTRA_LDFLAGS
119 GR_CHECK_CREATEFILEMAPPING
120
121 dnl Check for Mingw support
122 GR_PWIN32
123
124 dnl Do we have "dot", part of the graphviz package from AT&T?
125 dnl Doxgen will use it to draw pretty diagrams ;-)
126 AC_CHECK_PROG(HAVE_DOT, [dot],[YES],[NO])
127
128 PKG_CHECK_MODULES(FFTW3F, fftw3f >= 3.0)
129 AC_SUBST(FFTW3F_LIBS)
130
131 dnl conditional build stuff
132 GR_CHECK_DOXYGEN
133 GR_SET_MD_CPU
134
135 dnl Define where to look for cppunit includes and libs
136 dnl sets CPPUNIT_CFLAGS and CPPUNIT_LIBS
137 AM_PATH_CPPUNIT([1.9.14],[],
138                 [AC_MSG_ERROR([GNU Radio requires cppunit.  Stop])])
139
140 CPPUNIT_INCLUDES=$CPPUNIT_CFLAGS
141 AC_SUBST(CPPUNIT_INCLUDES)
142
143 dnl Define where to find boost includes
144 dnl defines BOOST_CFLAGS
145 GR_REQUIRE_BOOST_INCLUDES
146
147 DEFINES=""
148 AC_SUBST(DEFINES)
149
150 dnl Component specific configuration
151 dnl The order of the GR_ macros determines the order of compilation
152 subdirs="config"
153 GRC_GNURADIO_CORE
154 GRC_GNURADIO_EXAMPLES
155 GRC_USRP
156 GRC_GR_USRP                     dnl this must come after GRC_USRP
157 GRC_GR_AUDIO_ALSA
158 GRC_GR_AUDIO_JACK
159 GRC_GR_AUDIO_OSS
160 GRC_GR_AUDIO_OSX                dnl ***NOT TESTED***
161 GRC_GR_AUDIO_PORTAUDIO          dnl ***NOT TESTED***
162 GRC_GR_AUDIO_WINDOWS            dnl ***NOT TESTED***
163 GRC_GR_ATSC
164 GRC_GR_COMEDI
165 dnl GRC_GR_ERROR_CORRECTING_CODES  dnl disabled until fix for ticket:36
166 GRC_GR_GSM_FR_VOCODER
167 GRC_GR_RADAR
168 GRC_GR_RADIO_ASTRONOMY
169 GRC_GR_VIDEO_SDL
170 GRC_GR_WXGUI
171 GRC_PMT
172 GRC_GR_TRELLIS
173 dnl GRC_EZDOP                   dnl disable until grc_ezdop.m4 fixed
174 dnl GRC_GR_EZDOP                dnl this must come after GRC_EZDOP
175
176 dnl Has list of successfully configured components
177 AC_SUBST([subdirs],$subdirs)
178 AC_SUBST([failed_subdirs], $failed)
179  
180 AC_CONFIG_FILES([\
181           Makefile \
182           config/Makefile
183 ])
184
185 AC_OUTPUT
186
187 echo
188 echo "*******************************************************************"
189 echo The following GNU Radio components have been successfully configured:
190 echo 
191 for dir in $subdirs
192 do
193     echo $dir
194 done
195 echo
196 if test "$failed" != ""; then
197     echo However, the following components did not configure successfully due to 
198     echo missing dependencies:
199     echo
200     for dir in $failed
201     do
202         echo $dir
203     done
204     echo
205     echo You may still run the 'make' command to build the successfully configured
206     echo components.
207     echo
208     #exit 1
209 fi
210 echo You my now run the 'make' command to build these packages.
211 echo