2 ## This file is part of the libjaylink project.
4 ## Copyright (C) 2014-2015 Marc Schink <jaylink-dev@marcschink.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/>.
22 AC_INIT([libjaylink], [0.1.0], [BUG-REPORT-ADDRESS])
23 AC_CONFIG_HEADERS([config.h])
24 AC_CONFIG_MACRO_DIR([m4])
25 AC_CONFIG_AUX_DIR([build-aux])
29 AM_INIT_AUTOMAKE([foreign -Wall -Werror])
31 # Enable additional compiler warnings via -Wall and -Wextra. Use hidden
32 # visibility for all non-static symbols by default with -fvisibility=hidden.
33 CFLAGS="$CFLAGS -Wall -Wextra -Werror -fvisibility=hidden"
35 # Checks for programs.
38 # Automake >= 1.12 requires AM_PROG_AR when using options -Wall and -Werror.
39 # To be compatible with older versions of Automake use AM_PROG_AR if it's
40 # defined only. This line must occur before LT_INIT.
41 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
46 # Initialize pkg-config.
49 # Checks for libraries.
51 # Check for libusb-1.0 which is always needed.
52 PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.9],
53 [CFLAGS="$CFLAGS $libusb_CFLAGS"; LIBS="$LIBS $libusb_LIBS"])
55 # Checks for header files.
57 # Checks for typedefs, structures, and compiler characteristics.
60 # Checks for library functions.
62 # Disable progress and informational output of libtool.
63 AC_SUBST(AM_LIBTOOLFLAGS, '--silent')
65 JAYLINK_LIB_LDFLAGS=""
69 JAYLINK_LIB_LDFLAGS+="-no-undefined"
72 AC_SUBST([JAYLINK_LIB_LDFLAGS])
74 AC_CONFIG_FILES([Makefile])
75 AC_CONFIG_FILES([libjaylink/Makefile])
76 AC_CONFIG_FILES([libjaylink.pc])