root/trunk/freebob/configure.ac

Revision 15, 3.9 kB (checked in by wagi, 19 years ago)

Removed sigc++ code, using instead boost library.
Print information on screen when doing bus scan.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # configure.ac - Configure script for FreeBob.
2 # Copyright (C) 2004 by Daniel Wagner.
3 #
4 # This file is part of FreeBob.
5 #
6 # FreeBob is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10 # FreeBob is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with FreeBob; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 #
18 #                                               -*- Autoconf -*-
19 # Process this file with autoconf to produce a configure script.
20
21 AC_PREREQ(2.57)
22 AC_INIT(freebob, 0.0, wagi@monom.org)
23 AM_INIT_AUTOMAKE
24 AM_MAINTAINER_MODE
25 AC_CONFIG_SRCDIR([src/main.cpp])
26 AC_CONFIG_HEADER([config.h])
27 AC_GNU_SOURCE
28 AC_LANG(C++)
29
30 maintainer_mode=${enable_maintainer_mode-no}
31
32 # Checks for programs.
33 AC_PROG_CC
34 AC_PROG_CXX
35 AM_PROG_AS
36 AC_PROG_RANLIB
37 AC_CHECK_TOOL([AR], [ar], :)
38 AC_CHECK_TOOL([NM], [nm], :)
39 AC_PATH_PROG([SED], [sed], :)
40 AC_PATH_PROG([SORT], [sort], :)
41
42 # Required for building the documentation
43
44 # Checks for libraries.
45 AC_CHECK_LIB(raw1394, raw1394_new_handle, ,
46             [AC_MSG_ERROR([Unable to link with libraw1394. Check that you have libraw1394 installed])])
47
48 AC_CHECK_LIB(avc1394, avc1394_vcr_record, ,
49              [AC_MSG_ERROR([Unable to link with libavc1394. Check that you have libavc1394 installed and that the version is 0.4.1 or newer])])
50
51 AC_CHECK_LIB(rom1394, rom1394_get_node_type, ,
52              [AC_MSG_ERROR([Unable to link with librom1394. Check that your have librom1394 installed (usually part of libavc1394) and that the version is 0.4.1 or newer])])
53
54 AC_CHECK_LIB(pthread, pthread_create,,
55 [
56         AC_ERROR(You need the pthread library to compile freebob)
57 ])
58
59 # Checks for header files.
60 AC_CHECK_HEADERS([libraw1394/raw1394.h], ,
61     [AC_MSG_ERROR([raw1394.h not found install libraw1394-devel])
62 ])
63
64 AC_CHECK_HEADER([libavc1394/avc1394.h], ,
65         [AC_MSG_ERROR([avc1394.h not found, install libavc1394-devel])
66 ])
67 AC_CHECK_HEADER([libavc1394/rom1394.h], ,
68         [AC_MSG_ERROR([rom1394.h not found, install libavc1394-devel])
69 ])
70 AC_CHECK_HEADER(execinfo.h, [AC_DEFINE(HAVE_EXECINFO_H, 1, Wheter or not execinfo.h is present)
71         EXTRA_LIBS="$EXTRA_LIBS -rdynamic"])
72
73 # Checks for typedefs, structures, and compiler characteristics.
74 AC_CANONICAL_HOST
75 AC_C_CONST
76 AC_C_VOLATILE
77 CFLAGS="$CFLAGS -Wall"
78 CXXFLAGS="$CXXFLAGS -Wall"
79
80 AC_SUBST([CFLAGS])
81 AC_SUBST([CXXFLAGS])
82
83 # Configure components.
84
85 # Create links for header file.
86
87 # Checks for library functions.
88 PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 0.10)
89 PKG_CHECK_MODULES(LIBIEC61883, libiec61883 >= 0.1.0)
90 AC_CHECK_HEADER(boost/signals.hpp, , [
91         AC_MSG_ERROR([cannot find boost headers. Make sure boost (http://www.boost.org) is installed; if the headers are in a non-standard location, set the CPPFLAGS environment variable to contain -I<headerdir>])])
92 AC_HAVE_LIBRARY(boost_signals, , [
93         AC_MSG_ERROR([cannot find boost libraries. Make sure boost (http://www.boost.org) is installed; if the libraries are in a non-standard location, set the LDFLAGS environment variable to contain -L<librarydir>])])
94
95
96 AC_SUBST([LIBSIGC_CFLAGS])
97 AC_SUBST([LIBSIGC_LIBS])
98 AC_SUBST([LIBRAW1394_CFLAGS])
99 AC_SUBST([LIBRAW1394_LIBS])
100 AC_SUBST([LIBIEC61883_CFLAGS])
101 AC_SUBST([LIBIEC61883_LIBS])
102 LIBAVC_LIBS="-lrom1394 -lavc1394"
103 AC_SUBST([LIBAVC_LIBS])
104
105 AC_CONFIG_FILES([Makefile
106                  src/Makefile])
107 AC_OUTPUT
108
109 # Print a summary so that important information isn't missed.
110 AC_MSG_RESULT([
111
112 FreeBob is now configured for $canonical_host_type
113
114   Source directory:     $srcdir
115   Installation prefix:  $prefix
116   C++ compiler:         $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS
117 ])
Note: See TracBrowser for help on using the browser.