2 ## This file is part of the libsigrokflow project.
4 ## Copyright (C) 2018 Uwe Hermann <uwe@hermann-uwe.de>
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/>.
20 # We require at least autoconf 2.63 (AC_INIT format changed there).
23 AC_INIT([libsigrokflow], [0.1.0],
24 [sigrok-devel@lists.sourceforge.net],
25 [libsigrokflow], [http://www.sigrok.org])
26 AC_CONFIG_MACRO_DIR([m4])
27 AC_CONFIG_AUX_DIR([autostuff])
28 AC_CONFIG_HEADERS([config.h])
30 # We require at least automake 1.11 (needed for 'silent rules').
31 AM_INIT_AUTOMAKE([1.11 -Wall -Werror no-define nostdinc subdir-objects check-news color-tests])
32 AM_SILENT_RULES([yes])
33 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
37 # Checks for programs.
42 # Get compiler versions.
43 SR_PROG_VERSION([$CXX], [srf_cxx_version])
45 # Check for optional make features.
46 SR_PROG_MAKE_ORDER_ONLY
51 # Set up the libsigrokflow version defines.
52 SR_PKG_VERSION_SET([SRF_PACKAGE_VERSION], [AC_PACKAGE_VERSION])
54 # Library version for libsigrokflow (NOT the same as the package version).
55 # Carefully read the libtool docs before updating these numbers!
56 # The algorithm for determining which number to change (and how) is nontrivial!
57 # http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
58 # Format: current:revision:age.
59 SR_LIB_VERSION_SET([SRF_LIB_VERSION], [0:0:0])
61 # Initialize pkg-config.
62 # We require at least 0.22, as "Requires.private" behaviour changed there.
63 PKG_PROG_PKG_CONFIG([0.22])
66 SR_ARG_ENABLE_WARNINGS([SRF_WXXFLAGS], [-Wall], [-Wall -Wextra])
68 # Check if the C++ compiler supports the C++11 standard.
69 AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
71 ##############################
72 ## Finalize configuration ##
73 ##############################
75 AC_CONFIG_FILES([Makefile libsigrokflow.pc])
79 cat >&AS_MESSAGE_FD <<_EOF
81 libsigrokflow configuration summary:
82 - Package version................. $SRF_PACKAGE_VERSION
83 - Library ABI version............. $SRF_LIB_VERSION
84 - Prefix.......................... $prefix
85 - Building on..................... $build
86 - Building for.................... $host
87 - Building shared / static........ $enable_shared / $enable_static
89 Compile configuration:
90 - C++ compiler.................... $CXX
91 - C++ compiler version............ $srf_cxx_version
92 - C++ compiler flags.............. $CXXFLAGS
93 - C++ compiler warnings........... $SRF_WXXFLAGS
94 - Linker flags.................... $LDFLAGS