forked from chad3814/libhid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
142 lines (108 loc) · 3.86 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_REVISION($Rev$)
AC_COPYRIGHT([Please see the ./COPYING file for license information.])
AC_PREREQ(2.57)
##### INITIALISATION #########################################################
# Making releases:
# if functions were added, arg1 = 0
# if not backward compatible, arg1 = arg2 = 0
#
m4_define([LIBHID_VERSION], [0.2.17])
m4_define([IFACE_AGE], [0])
m4_define([BIN_AGE], [0])
m4_define([MD_INIT_NAME], [libhid])
m4_define([MD_INIT_VERSION], LIBHID_VERSION)
m4_define([MD_INIT_ADDRESS], m4_esyscmd([grep -i bugreports\ to README | sed -e 's,.*<\([^>]*\).*,\1,' | tr -d "\n"]))
AC_INIT(MD_INIT_NAME, MD_INIT_VERSION, MD_INIT_ADDRESS)
AM_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([include/hid.h])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
##### CONFIGURE ARGUMENTS ####################################################
MD_ARG_ENABLE_CUSTOM(pedantic, pedantic compiler checks, no)
MD_ARG_ENABLE_CUSTOM(warnings, proper compiler warnings, yes)
MD_ARG_ENABLE_CUSTOM(werror, compiler warnings as errors, yes)
MD_ARG_ENABLE_CUSTOM(debug, debugging, no)
MD_ARG_ENABLE_CUSTOM(gdbdebug, gdb-enhanced debugging symbols, no)
dnl ### If distcc and ccache are used via symlink farms (e.g. in
dnl ###/usr/lib/ccache), then the following checks fail.
dnl MD_ARG_WITH_CUSTOM(ccache, ccache for compiler caching, [yes, if found])
dnl MD_ARG_WITH_CUSTOM(distcc, distcc for distributed compilation, [yes, if found])
MD_ARG_WITH_CUSTOM(doxygen, documentation generated by doxygen, [yes, if found])
# TODO: move to with
MD_ARG_ENABLE_CUSTOM(swig, swig python wrapper, [yes, if found])
##### VERSIONING #############################################################
MD_VERSION_INFO
MD_LT_VERSION_INFO
PACKAGE=AC_PACKAGE_NAME
VERSION=$MD_VERSION
##### CONFIGURATION ##########################################################
MD_CHECK_OS
MD_CHECK_LIBUSB018B
AC_PROG_CC
MD_CHECK_GCC3
dnl MD_CONF_DISTCC
dnl MD_CONF_CCACHE
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_C_INLINE
AC_C_CONST
AC_C_BIGENDIAN
AC_C_STRINGIZE
MD_CONF_DEBUGGING
MD_CONF_COMPILER
AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "linux")
AM_CONDITIONAL(OS_BSD, test "$MD_OS" = "bsd")
AM_CONDITIONAL(OS_SOLARIS, test "$MD_OS" = "solaris")
AM_CONDITIONAL(OS_DARWIN, test "$MD_OS" = "darwin")
if test "${ac_cv_enable_swig}" = "no" ; then
AM_CONDITIONAL(HAVE_SWIG, false)
else
AX_PKG_SWIG
AM_CONDITIONAL(HAVE_SWIG, "$SWIG" -version)
if test -z "${HAVE_SWIG_TRUE}" ; then
# prefer python3 against python2
AM_PATH_PYTHON([3],, [:])
AX_SWIG_PYTHON
fi
fi
MD_CHECK_DOXYGEN
MD_CONF_FLAGS(
[],
[$OS_CFLAGS $LIBUSB_CFLAGS],
[],
[$OS_LDFLAGS $LIBUSB_LIBS]
)
MD_CONF_DB2MAN
##### OUTPUT #################################################################
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([hidparser/Makefile])
AC_CONFIG_FILES([swig/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([doc/doxygen.rc])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([doc/man/Makefile])
AC_CONFIG_FILES([doc/www/Makefile])
AC_CONFIG_FILES([pkgconfig/libhid.pc])
AC_CONFIG_FILES([rpm/libhid.spec])
AC_OUTPUT
MD_DEBUG_BUILDVARS
# COPYRIGHT --
#
# This file is part of libhid, a user-space HID access library.
# libhid is (c) 2003-2007
# Martin F. Krafft <[email protected]>
# Charles Lepple <[email protected]>
# Arnaud Quette <[email protected]> && <[email protected]>
# and distributed under the terms of the GNU General Public License.
# See the file ./COPYING in the source distribution for more information.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
# OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.