configure.ac 1.24 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([sunxi-tools], [1.0], [https://github.com/linux-sunxi/sunxi-tools])
AC_CONFIG_SRCDIR([fel-copy.c])

# automake initialisation and check for minimal automake API version 1.9
AM_INIT_AUTOMAKE([1.9])

# Checks for programs.
AC_PROG_CC
AC_PROG_LN_S
14
15
16
17
18
19
if test x"$cross_compiling" != x"yes" ; then
  AC_CHECK_PROG(ARMGCC_CHECK, arm-none-eabi-gcc, yes)
  if test x"$ARMGCC_CHECK" != x"yes" ; then
    AC_MSG_ERROR([Please install GNU Tools for ARM Embedded Processors before installing.])
  fi
fi
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

# Checks for libraries.
PKG_CHECK_MODULES([LIBUSB], libusb-1.0 >= 1.0.0,, AC_MSG_ERROR([*** Required libusb-1.0 >= 1.0.0 not installed ***]))

# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/mount.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset munmap strchr strerror strtol strtoul])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT