-
Notifications
You must be signed in to change notification settings - Fork 11
/
configure.ac
54 lines (47 loc) · 1.56 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# Copyright (C) 2013 Nikolai Kondrashov
#
# This file is part of uclogic-tools.
#
# Uclogic-tools is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Uclogic-tools is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with uclogic-tools; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([uclogic-tools], [5])
AM_INIT_AUTOMAKE([1.9 -Wall foreign])
AM_MAINTAINER_MODE
AC_CONFIG_HEADER([config.h])
# Check for programs.
AC_PROG_CC
AC_PROG_INSTALL
# Check for libraries.
PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
CFLAGS="$CFLAGS $LIBUSB_CFLAGS"
LIBS="$LIBS $LIBUSB_LIBS"
# Check for features
AC_ARG_ENABLE(
debug,
AS_HELP_STRING([--enable-debug], [enable debugging features]),
[], [enable_debug="no"])
# Output features to preprocessor and compiler
if test "$enable_debug" = "yes"; then
CPPFLAGS="$CPPFLAGS -UNDEBUG"
CFLAGS="$CFLAGS -Wall -Wextra -Werror -g -O0"
fi
# Check for library functions.
AC_CHECK_FUNCS(libusb_strerror)
# Output
AC_CONFIG_FILES([Makefile])
AC_OUTPUT