Project

General

Profile

Repository access links

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

mikrokopter-genom3 / configure.ac @ c71ca2b5

1
dnl Autoconf file for building mikrokopter codels library.
2
dnl
3
dnl Copyright (c) 2015-2017 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],[1.5],[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
31
AC_PROG_CC
32
AC_PROG_CXX
33

    
34

    
35
dnl External packages
36
PKG_CHECK_MODULES(requires, [
37
  openrobots-idl >= 1.4
38
  genom3 >= 2.99.26
39
  eigen3
40
])
41

    
42
AC_PATH_PROG(GENOM3, [genom3], AC_MSG_ERROR([genom3 tool not found], 2))
43

    
44

    
45
dnl --with-templates option
46
AG_OPT_TEMPLATES([$GENOM3 ],
47
    [$srcdir/mikrokopter.gen])
48

    
49

    
50
# check for TIOCGSERIAL, TIOCSSERIAL
51
AC_CHECK_HEADERS([sys/ioctl.h linux/serial.h])
52
if test "$ac_cv_header_sys_ioctl_h$ac_cv_header_linux_serial_h" = yesyes; then
53
  AC_MSG_CHECKING(ASYNC_LOW_LATENCY)
54
  AC_EGREP_CPP([yes],
55
[#include <sys/ioctl.h>
56
#include <linux/serial.h>
57

    
58
#ifdef TIOCGSERIAL
59
#ifdef TIOCSSERIAL
60
#ifdef ASYNC_LOW_LATENCY
61
       yes
62
#endif
63
#endif
64
#endif
65
], [AC_MSG_RESULT(yes)
66
   AC_DEFINE([HAVE_LOW_LATENCY_IOCTL], [], [FTDI low latency ioctl])],
67
   AC_MSG_RESULT(no))
68
fi
69

    
70
# libudev for serial <-> tty
71
case "${host_os}" in
72
  linux*) PKG_CHECK_MODULES(libudev, [libudev]);;
73
esac
74

    
75
dnl Output
76
AC_CONFIG_FILES([
77
	mikrokopter-genom3.pc
78
	mikrokopter-genom3-uninstalled.pc
79
	Makefile
80
	codels/Makefile
81
])
82
AC_OUTPUT
83
AG_OUTPUT_TEMPLATES
(4-4/7)