root/trunk/freebob/configure.ac

Revision 14, 3.5 kB (checked in by wagi, 19 years ago)

Started new implementation according UML diagrams.

  • 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/freebob.cpp])
26 AC_CONFIG_HEADER([config.h])
27 AC_GNU_SOURCE
28
29 maintainer_mode=${enable_maintainer_mode-no}
30
31 # Checks for programs.
32 AC_PROG_CC
33 AC_PROG_CXX
34 AM_PROG_AS
35 AC_PROG_RANLIB
36 AC_CHECK_TOOL([AR], [ar], :)
37 AC_CHECK_TOOL([NM], [nm], :)
38 AC_PATH_PROG([SED], [sed], :)
39 AC_PATH_PROG([SORT], [sort], :)
40
41 # Required for building the documentation
42
43 # Checks for libraries.
44 AC_CHECK_LIB(raw1394, raw1394_new_handle, ,
45             [AC_MSG_ERROR([Unable to link with libraw1394. Check that you have libraw1394 installed])])
46
47 AC_CHECK_LIB(avc1394, avc1394_vcr_record, ,
48              [AC_MSG_ERROR([Unable to link with libavc1394. Check that you have libavc1394 installed and that the version is 0.4.1 or newer])])
49
50 AC_CHECK_LIB(rom1394, rom1394_get_node_type, ,
51              [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])])
52
53 AC_CHECK_LIB(pthread, pthread_create,,
54 [
55         AC_ERROR(You need the pthread library to compile freebob)
56 ])
57
58 # Checks for header files.
59 AC_CHECK_HEADERS([libraw1394/raw1394.h], ,
60     [AC_MSG_ERROR([raw1394.h not found install libraw1394-devel])
61 ])
62
63 AC_CHECK_HEADER([libavc1394/avc1394.h], ,
64         [AC_MSG_ERROR([avc1394.h not found, install libavc1394-devel])
65 ])
66 AC_CHECK_HEADER([libavc1394/rom1394.h], ,
67         [AC_MSG_ERROR([rom1394.h not found, install libavc1394-devel])
68 ])
69 AC_CHECK_HEADER(execinfo.h, [AC_DEFINE(HAVE_EXECINFO_H, 1, Wheter or not execinfo.h is present)
70         EXTRA_LIBS="$EXTRA_LIBS -rdynamic"])
71
72 # Checks for typedefs, structures, and compiler characteristics.
73 AC_CANONICAL_HOST
74 AC_C_CONST
75 AC_C_VOLATILE
76 CFLAGS="$CFLAGS -Wall"
77 CXXFLAGS="$CXXFLAGS -Wall"
78
79 AC_SUBST([CFLAGS])
80 AC_SUBST([CXXFLAGS])
81
82 # Configure components.
83
84 # Create links for header file.
85
86 # Checks for library functions.
87 PKG_CHECK_MODULES(LIBSIGC, sigc++-2.0 >= 2.0.3)
88 PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 0.10)
89 PKG_CHECK_MODULES(LIBIEC61883, libiec61883 >= 0.1.0)
90
91 AC_SUBST([LIBSIGC_CFLAGS])
92 AC_SUBST([LIBSIGC_LIBS])
93 AC_SUBST([LIBRAW1394_CFLAGS])
94 AC_SUBST([LIBRAW1394_LIBS])
95 AC_SUBST([LIBIEC61883_CFLAGS])
96 AC_SUBST([LIBIEC61883_LIBS])
97 LIBAVC_LIBS="-lrom1394 -lavc1394"
98 AC_SUBST([LIBAVC_LIBS])
99
100 AC_CONFIG_FILES([Makefile
101                  src/Makefile])
102 AC_OUTPUT
103
104 # Print a summary so that important information isn't missed.
105 AC_MSG_RESULT([
106
107 FreeBob is now configured for $canonical_host_type
108
109   Source directory:     $srcdir
110   Installation prefix:  $prefix
111   C compiler:           $CC $XTRA_CFLAGS $WARN_CFLAGS $CFLAGS
112   C++ compiler:         $CXX $XTRA_CXXFLAGS $WARN_CXXFLAGS $CXXFLAGS
113 ])
Note: See TracBrowser for help on using the browser.