1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ([2.69])
6 # Initilize autoconf
7 AC_INIT([ti-rpmsg-char], [0.3.0], [s-anna@ti.com])
9 # Check common src files to ensure integrity of the package
10 AC_CONFIG_SRCDIR([src/rpmsg_char.c])
11 AC_CONFIG_HEADERS([config.h])
13 # Set auxiliary build tools directories
14 AC_CONFIG_AUX_DIR([build-aux])
16 # Initialize automake
17 AM_INIT_AUTOMAKE([foreign])
19 # Disabling maintainer mode to prevent rebuild of configure script
20 AM_MAINTAINER_MODE([disable])
22 # Initialize libtool
23 AC_PROG_LIBTOOL
25 # Checks for programs.
26 AC_PROG_CC
27 AC_PROG_INSTALL
29 # Checks for libraries.
31 # Checks for header files.
32 AC_HEADER_STDC
33 AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h unistd.h])
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_CHECK_HEADER_STDBOOL
37 AC_TYPE_SIZE_T
38 AC_TYPE_UINT32_T
40 # Checks for library functions.
41 AC_FUNC_MALLOC
42 AC_CHECK_FUNCS([memset realpath strerror strtol])
44 # Export CFLAGS and LDFLAGS to Makefile(s)
45 AC_SUBST([AM_CFLAGS])
46 AC_SUBST([AM_LDFLAGS])
49 # Generate Makefile(s)
50 AC_CONFIG_FILES([Makefile
51 src/Makefile
52 src/ti_rpmsg_char.pc
53 examples/Makefile])
54 AC_OUTPUT
56 echo \
57 "-----------------------------------------------------------
59 Thank you for installing the Linux ${PACKAGE_NAME} package
61 Installation directory prefix: '${prefix}'.
62 Compilation command: '${CC} ${CFLAGS} ${CPPFLAGS}'
64 Now type 'make; sudo make install' to generate the program
65 and install it to your system. sudo usage is optional and
66 depends on the permissions of the prefix folder being used
67 or installation.
69 ------------------------------------------------------------"