-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
52 lines (43 loc) · 1.33 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([hpitest], [1.0.5])
AC_CONFIG_SRCDIR([src/HpiTest.cc])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
# Checks for programs.
if test -n "${CXXFLAGS}"; then
user_set_cxxflags=yes
fi
AC_PROG_CXX
if test X$user_set_cxxflags != Xyes; then
CXXFLAGS="-O2"
fi
AC_ARG_WITH(threads, [build with support for pthreads],
[if test $withval == 'yes'; then
ACX_PTHREAD([AC_DEFINE([USE_THREADS],[1],[pthread support])
LIBS="$PTHREAD_LIBS $LIBS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"
CXX="$PTHREAD_CXX"])
fi],
[ACX_PTHREAD([AC_DEFINE([USE_THREADS],[1],[pthread support])
LIBS="$PTHREAD_LIBS $LIBS"
CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS"
CXX="$PTHREAD_CXX"])])
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([sys/time.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_HEADER_TIME
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_HEADER_STDC
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([alarm gettimeofday select strcasecmp])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT