Fixes ticket:92.
[debian/gnuradio] / gr-howto-write-a-block / configure.ac
1 dnl 
2 dnl  Copyright 2004,2005 Free Software Foundation, Inc.
3 dnl  
4 dnl  This file is part of GNU Radio
5 dnl  
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 2, or (at your option)
9 dnl  any later version.
10 dnl  
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.
15 dnl  
16 dnl  You should have received a copy of the GNU General Public License
17 dnl  along with GNU Radio; see the file COPYING.  If not, write to
18 dnl  the Free Software Foundation, Inc., 51 Franklin Street,
19 dnl  Boston, MA 02110-1301, USA.
20 dnl 
21
22 AC_INIT
23 AC_PREREQ(2.57)
24 AC_CONFIG_SRCDIR([src/lib/howto.i])
25 AM_CONFIG_HEADER(config.h)
26 AC_CANONICAL_TARGET([])
27 AM_INIT_AUTOMAKE(gr-howto-write-a-block,3.0svn)
28
29 GR_X86_64
30 dnl LF_CONFIGURE_CC
31 LF_CONFIGURE_CXX
32 LF_SET_WARNINGS
33 GR_SET_GPROF
34 GR_SET_PROF
35 AM_PROG_AS
36 AC_PROG_LN_S
37 AC_PROG_MAKE_SET
38 AC_PROG_INSTALL
39 AC_PATH_PROG([RM_PROG], [rm])
40
41 AC_LIBTOOL_WIN32_DLL
42 AC_ENABLE_SHARED        dnl do build shared libraries
43 AC_DISABLE_STATIC       dnl don't build static libraries
44 AC_PROG_LIBTOOL
45
46 dnl Locate python, SWIG, etc
47 GR_NO_UNDEFINED
48 GR_SCRIPTING
49
50 dnl Checks for libraries.
51
52 dnl check for threads (mandatory)
53 GR_OMNITHREAD
54
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 Checks for header files.
65 AC_HEADER_STDC
66 AC_HEADER_SYS_WAIT
67 AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/ioctl.h sys/time.h unistd.h)
68 AC_CHECK_HEADERS(sys/mman.h)
69
70 dnl Checks for typedefs, structures, and compiler characteristics.
71 AC_C_CONST
72 AC_C_INLINE
73 AC_TYPE_SIZE_T
74 AC_HEADER_TIME
75
76 dnl Checks for library functions.
77 AC_CHECK_FUNCS([])
78
79 dnl Check for Mingw support
80 GR_PWIN32
81
82 PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2)
83 LIBS="$LIBS $GNURADIO_CORE_LIBS"
84
85 dnl Define where to find boost includes
86 dnl defines BOOST_CFLAGS
87 GR_REQUIRE_BOOST_INCLUDES
88
89 STD_DEFINES_AND_INCLUDES="$GNURADIO_CORE_CFLAGS $BOOST_CFLAGS"
90 AC_SUBST(STD_DEFINES_AND_INCLUDES)
91  
92 AC_CONFIG_FILES([\
93           Makefile \
94           config/Makefile \
95           doc/Makefile \
96           src/Makefile \
97           src/lib/Makefile \
98           src/python/Makefile \
99           src/python/run_tests \
100         ])
101
102 dnl run_tests is created from run_tests.in.  Make it executable.
103 AC_CONFIG_COMMANDS([run_tests], [chmod +x src/python/run_tests])
104
105 AC_OUTPUT