File: configure.ac

package info (click to toggle)
dfu-programmer 0.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 720 kB
  • sloc: ansic: 3,653; sh: 789; makefile: 15
file content (54 lines) | stat: -rw-r--r-- 1,448 bytes parent folder | download
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([dfu-programmer],[0.6.1])

AC_CONFIG_AUX_DIR([m4])
AC_CONFIG_SRCDIR([src/atmel.c])
AC_CONFIG_HEADERS([config.h])

AM_INIT_AUTOMAKE()

# Enable silent rules is available
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AM_MAINTAINER_MODE([enable])

# Checks for programs.
AC_PROG_CC

# Checks for libusb
AC_ARG_ENABLE(old-libusb,
  AS_HELP_STRING([--enable-old-libusb],
    [use old libusb]),
    enable_old_libusb=$enableval,
    enable_old_libusb=no)

AS_IF([test x$enable_old_libusb = xyes], [
  # libusb >= 0.1.8 is required, as we need usb_interrupt_read()
  PKG_CHECK_MODULES([LIBUSB], [libusb >= 0.1.8])
    AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have libusb.])
    AC_SUBST(LIBUSB_CFLAGS)
    AC_SUBST(LIBUSB_LIBS)
  ], [
  # If libusb-1.0 is enabled and available, prefer that to the old libusb
  PKG_CHECK_MODULES([LIBUSB1], [libusb-1.0 >= 1.0.0])
    AC_DEFINE(HAVE_LIBUSB_1_0, 1, [Define to 1 if you have libusb-1.0.])
    AC_SUBST(LIBUSB1_CFLAGS)
    AC_SUBST(LIBUSB1_LIBS)
  ])

# Checks for header files.
AC_HEADER_STDC

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP

AC_CONFIG_FILES(fedora/dfu-programmer.spec Makefile docs/Makefile src/Makefile)
AC_OUTPUT