2 ## This file is part of the sigrok project.
4 ## Copyright (C) 2010 Bert Vermeulen <bert@biot.com>
6 ## This program 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 3 of the License, or
9 ## (at your option) any later version.
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
22 AC_INIT([sigrok-gtk], [0.1], [gareth@blacksphere.co.nz],
23 [sigrok-gtk], [http://www.sigrok.org])
25 AC_CONFIG_SRCDIR([main.c])
26 AC_CONFIG_MACRO_DIR([autostuff])
27 AC_CONFIG_AUX_DIR([autostuff])
29 AM_INIT_AUTOMAKE([-Wall -Werror foreign std-options])
30 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
32 AH_TOP([#ifndef SIGROK_GTK_CONFIG_H
33 #define SIGROK_GTK_CONFIG_H /* To stop multiple inclusions. */])
34 AH_BOTTOM([#endif /* SIGROK_GTK_CONFIG_H */])
36 CFLAGS="-g -Wall -Wextra"
38 # Checks for programs.
45 # Initialize pkg-config.
46 # We require at least 0.22, as "Requires.private" behaviour changed there.
47 PKG_PROG_PKG_CONFIG([0.22])
49 AC_CHECK_TOOL([WINDRES], windres, [])
50 AM_CONDITIONAL([WINDOWS], test x$WINDRES != x)
52 # Checks for libraries.
54 PKG_CHECK_MODULES([gtk], [gtk+-2.0 gmodule-2.0],
55 [CFLAGS="$CFLAGS $gtk_CFLAGS";
56 LIBS="$LIBS $gtk_LIBS"])
58 PKG_CHECK_MODULES([libsigrok], [libsigrok >= 0.2],
59 [CFLAGS="$CFLAGS $libsigrok_CFLAGS";
60 LIBS="$LIBS $libsigrok_LIBS"])
62 # Checks for header files.
63 # These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
64 # AC_CHECK_HEADERS([])
66 # Checks for typedefs, structures, and compiler characteristics.
78 # Checks for library functions.
79 AC_CHECK_FUNCS([memset strtoull])
81 AC_CONFIG_FILES([Makefile
88 echo "sigrok-gtk configuration summary:"
90 echo " - Package version: $VERSION"
91 echo " - Prefix: $prefix"
93 echo "Detected libraries:"
96 # Note: This only works for libs with pkg-config integration.
97 for lib in "glib-2.0" "gmodule-2.0" "gtk+-2.0" "libsigrok"; do
98 if `$PKG_CONFIG --exists $lib`; then
99 ver=`$PKG_CONFIG --modversion $lib`
104 echo " - $lib: $answer"