forked from rfujita/libpafe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
51 lines (40 loc) · 1.24 KB
/
configure.in
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT(libpafe, 0.0.7, [email protected])
AM_INIT_AUTOMAKE(libpafe, 0.0.7)
AC_CONFIG_SRCDIR([src/libpafe.h])
AC_CONFIG_SRCDIR([tests/pasori_test.c])
AC_CONFIG_HEADER(config.h)
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_ENABLE_SHARED
dnl AM_DISABLE_STATIC
# AM_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h stdio.h string.h sys/ioctl.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_SIZEOF(short, 2)
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_SELECT_ARGTYPES
AC_CHECK_FUNCS([select])
# Test for libusb
CHECK_LIBUSB_0="false"
PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.8, AC_DEFINE([HAVE_LIBUSB_1], 1, [have libusb version 1.0]), CHECK_LIBUSB_0="true")
if [ "$CHECK_LIBUSB_0" == "true" ]
then
PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12, AC_DEFINE([HAVE_LIBUSB], 1, [have libusb version 0.1]))
fi
#AM_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile src/Makefile tests/Makefile debian/Makefile)