Use a new package version scheme
[swodec.git] / configure.ac
bloba05b07c4a80e9c875e49720e541e120430291122
1 ##
2 ## This file is part of the swodec project.
3 ##
4 ## Copyright (C) 2014 Marc Schink <swo-dev@marcschink.de>
5 ##
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 AC_PREREQ([2.69])
22 AC_INIT([swodec], [0.1.0], [swo-dev@marcschink.de], [swodec],
23         [https://gitlab.zapb.de/zapb/swodec.git])
24 AC_CONFIG_HEADERS([config.h])
25 AC_CONFIG_MACRO_DIR([m4])
26 AC_CONFIG_AUX_DIR([build-aux])
28 AC_CANONICAL_HOST
30 AM_INIT_AUTOMAKE([foreign -Wall -Werror check-news])
32 # Enable additional compiler warnings via -Wall and -Wextra.
33 SWODEC_CFLAGS="-Wall -Wextra -Werror"
35 # Checks for programs.
36 AC_PROG_CC
37 AM_PROG_CC_C_O
39 # Initialize pkg-config.
40 PKG_PROG_PKG_CONFIG
42 # Checks for libraries.
44 # Check for glib-2.0 which is always needed.
45 PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.28.0])
47 # Check for libswo-0.1 which is always needed.
48 PKG_CHECK_MODULES([libswo], [libswo >= 0.1.0])
50 # Checks for header files.
52 # Checks for typedefs, structures, and compiler characteristics.
54 # Checks for library functions.
56 SWODEC_SET_PACKAGE_VERSION([SWODEC_VERSION_PACKAGE], [AC_PACKAGE_VERSION])
58 # Use C99 compatible stdio functions on MinGW instead of the incompatible
59 # functions provided by Microsoft.
60 AS_CASE([$host_os], [mingw*],
61         [AC_DEFINE([__USE_MINGW_ANSI_STDIO], [1],
62                 [Define to 1 to use C99 compatible stdio functions on MinGW.])])
64 AC_SUBST([SWODEC_CFLAGS])
66 AC_CONFIG_FILES([Makefile])
67 AC_CONFIG_FILES([src/Makefile])
68 AC_CONFIG_FILES([src/version.h])
70 AC_OUTPUT
72 echo
73 echo "swodec configuration summary:"
74 echo " - Package version ................ $SWODEC_VERSION_PACKAGE"
75 echo " - Installation prefix ............ $prefix"
76 echo " - Building on .................... $build"
77 echo " - Building for ................... $host"
78 echo