Project

General

Profile

Repository access links

This URL has Read-Only access
Download (2.17 KB) Statistics
| Branch: | Tag: | Revision:

mikrokopter-genom3 / configure.ac @ master

1
dnl Autoconf file for building mikrokopter codels library.
2
dnl
3
dnl Copyright (c) 2015-2019 LAAS/CNRS
4
dnl All rights reserved.
5
dnl
6
dnl Redistribution and use  in source  and binary  forms,  with or without
7
dnl modification, are permitted provided that the following conditions are
8
dnl met:
9
dnl
10
dnl   1. Redistributions of  source  code must retain the  above copyright
11
dnl      notice and this list of conditions.
12
dnl   2. Redistributions in binary form must reproduce the above copyright
13
dnl      notice and  this list of  conditions in the  documentation and/or
14
dnl      other materials provided with the distribution.
15
dnl
16
dnl					Anthony Mallet on Fri Feb 13 2015
17
dnl
18

    
19
AC_PREREQ(2.59)
20

    
21
AC_INIT([mikrokopter-genom3],[2.0.1],[openrobots@laas.fr])
22
AC_CONFIG_MACRO_DIR([autoconf])
23
AC_CONFIG_AUX_DIR([autoconf])
24
AC_CONFIG_HEADERS([autoconf/acmikrokopter.h])
25
AM_INIT_AUTOMAKE([foreign no-define])
26
AC_CANONICAL_HOST
27

    
28
dnl Compilers
29
dnl
30
LT_INIT([disable-static])
31
AC_PROG_CC
32
AC_PROG_CXX
33

    
34
dnl Features
35
AC_SEARCH_LIBS([aio_write], [rt],, AC_MSG_ERROR([aio_write() not found], 2))
36

    
37
dnl External packages
38
PKG_CHECK_MODULES(requires, [
39
  openrobots2-idl >= 2.0
40
  genom3 >= 2.99.30
41
])
42
PKG_CHECK_MODULES(codels_requires, [
43
  eigen3
44
])
45

    
46
AC_PATH_PROG(GENOM3, [genom3], [no])
47
if test "$GENOM3" = "no"; then
48
  AC_MSG_ERROR([genom3 tool not found], 2)
49
fi
50

    
51
dnl --with-templates option
52
AG_OPT_TEMPLATES([$GENOM3 ],
53
    [$srcdir/mikrokopter.gen])
54

    
55

    
56
# check for TIOCGSERIAL, TIOCSSERIAL
57
AC_CHECK_HEADERS([sys/ioctl.h linux/serial.h])
58
if test "$ac_cv_header_sys_ioctl_h$ac_cv_header_linux_serial_h" = yesyes; then
59
  AC_MSG_CHECKING(ASYNC_LOW_LATENCY)
60
  AC_EGREP_CPP([yes],
61
[#include <sys/ioctl.h>
62
#include <linux/serial.h>
63

    
64
#ifdef TIOCGSERIAL
65
#ifdef TIOCSSERIAL
66
#ifdef ASYNC_LOW_LATENCY
67
       yes
68
#endif
69
#endif
70
#endif
71
], [AC_MSG_RESULT(yes)
72
   AC_DEFINE([HAVE_LOW_LATENCY_IOCTL], [], [FTDI low latency ioctl])],
73
   AC_MSG_RESULT(no))
74
fi
75

    
76
# libudev for serial <-> tty
77
case "${host_os}" in
78
  linux*) PKG_CHECK_MODULES(libudev, [libudev]);;
79
esac
80

    
81

    
82
dnl Doc
83
AM_MISSING_PROG([ASCIIDOCTOR], [asciidoctor])
84

    
85
dnl Output
86
AC_CONFIG_FILES([
87
	mikrokopter-genom3.pc
88
	mikrokopter-genom3-uninstalled.pc
89
	Makefile
90
	codels/Makefile
91
])
92
AC_OUTPUT
93
AG_OUTPUT_TEMPLATES
(5-5/8)