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-cli], [0.1], [sigrok-devel@lists.sourceforge.net],
23 [sigrok-cli], [http://www.sigrok.org])
25 AC_CONFIG_SRCDIR([sigrok-cli.c])
27 AC_CONFIG_HEADERS([config.h])
28 AC_CONFIG_MACRO_DIR([autostuff])
29 AC_CONFIG_AUX_DIR([autostuff])
31 AM_INIT_AUTOMAKE([-Wall -Werror foreign std-options])
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34 AH_TOP([#ifndef SGIROK_CLI_CONFIG_H
35 #define SIGROK_CLI_CONFIG_H /* To stop multiple inclusions. */])
36 AH_BOTTOM([#endif /* SIGROK_CLI_CONFIG_H */])
38 CFLAGS="-g -Wall -Wextra"
40 # Checks for programs.
49 # Initialize pkg-config.
50 # We require at least 0.22, as "Requires.private" behaviour changed there.
51 PKG_PROG_PKG_CONFIG([0.22])
53 # Checks for libraries.
55 PKG_CHECK_MODULES([libsigrok], [libsigrok],
56 [CFLAGS="$CFLAGS $libsigrok_CFLAGS";
57 LIBS="$LIBS $libsigrok_LIBS"])
59 PKG_CHECK_MODULES([libsigrokdecode], [libsigrokdecode],
60 [CFLAGS="$CFLAGS $libsigrokdecode_CFLAGS";
61 LIBS="$LIBS $libsigrokdecode_LIBS"])
63 # Checks for header files.
64 # These are already checked: inttypes.h stdint.h stdlib.h string.h unistd.h.
65 AC_CHECK_HEADERS([sys/time.h termios.h])
67 # Checks for typedefs, structures, and compiler characteristics.
79 # Checks for library functions.
80 AC_CHECK_FUNCS([strcasecmp strchr strerror strstr strtol])
82 AC_SUBST(MAKEFLAGS, '--no-print-directory')
83 AC_SUBST(AM_LIBTOOLFLAGS, '--silent')
85 AC_CONFIG_FILES([Makefile