-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
59 lines (44 loc) · 1.43 KB
/
configure.ac
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
55
56
57
58
59
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([alsa-midi-latency-test], [0.0.5])
AC_CONFIG_SRCDIR([src/alsa-midi-latency-test.c])
AM_INIT_AUTOMAKE
AC_PREFIX_DEFAULT(/usr)
dnl Checks for programs.
dnl try to gues cross-compiler if not set
if test "x$target" != "x$host" -a -z "`echo $CC | grep -e '-gcc'`";
then
AC_MSG_CHECKING(for cross-compiler)
which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
which ${target_cpu}-${target_os}-gcc >/dev/null 2>&1 \
&& CC=${target_cpu}-${target-os}-gcc
which ${target_cpu}-${target_vendor}-${target_os}-gcc >/dev/null 2>&1 \
&& CC=${target_cpu}-${target_vendor}-${target_os}-gcc
AC_MSG_RESULT($CC)
fi
AC_PROG_CC
dnl AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
dnl Checks for header files.
AC_HEADER_STDC
test "x$prefix" = xNONE && prefix=$ac_default_prefix
eval dir="$datadir"
case "$dir" in
/*) ;;
*) dir="$prefix/share"
esac
AM_CONFIG_HEADER(include/aconfig.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], [AC_CHECK_LIB([rt],
[clock_gettime], [CLOCK_LIB=-lrt],
[AC_MSG_ERROR([Couldn't find clock_gettime])])])
AC_SUBST([CLOCK_LIB])
dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
dnl Enable largefile support
AC_SYS_LARGEFILE
AC_OUTPUT(Makefile m4/Makefile src/Makefile include/Makefile)