forked from xl4-shiro/xl4combase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
93 lines (77 loc) · 2.97 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([xl4combase], [1.0], [[email protected]])
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects])
AM_PROG_AR
LT_PREREQ([2.2])
LT_INIT([static])
AC_CONFIG_SRCDIR([combase.h])
AS_IF([test -n "$PYTHON_SITEPACKAGES_DIR"],
[am_cv_python_pythondir="${PYTHON_SITEPACKAGES_DIR}/xl4combase"],
[test x"$prefix" = "x/usr"],
[am_cv_python_pythondir='${PYTHON_PREFIX}/lib/python3/dist-packages/xl4combase'],
[am_cv_python_pythondir='${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/dist-packages/xl4combase']
)
AM_PATH_PYTHON([3])
# Checks for programs.
PKG_PROG_PKG_CONFIG
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_CC_C_O
AC_PROG_CC_C99
# Check if posix platform
AC_CHECK_HEADERS([pthread.h],
[AM_CONDITIONAL(POSIX_PLATFORM,[true])])
# Check if linux ethtool is available
AC_CHECK_HEADERS([linux/ethtool.h],
[AM_CONDITIONAL(LINUX_ETHTOOL,[true])])
# Check for command line options
# Check for command line options
AC_ARG_ENABLE([unittest],
AS_HELP_STRING([--disable-unittest],[disable building unittest programs]))
AC_ARG_ENABLE([unittest_memtest],
AS_HELP_STRING([--enable-unittest-memtest],[check memory leak in unittest]))
AC_ARG_ENABLE([ethernet],
AS_HELP_STRING([--disable-ethernet],[disable building ethernet programs]))
AC_ARG_ENABLE([thread],
AS_HELP_STRING([--disable-thread],[disable building threadding programs]))
AC_ARG_ENABLE([ipcshmem],
AS_HELP_STRING([--disable-ipcshmem],[disable building shared memory ipc programs]))
AC_ARG_ENABLE([ipcsock],
AS_HELP_STRING([--disable-ipcsock],[disable building socket ipc programs]))
AC_ARG_ENABLE([event],
AS_HELP_STRING([--disable-event],[disable building eventing programs]))
AC_ARG_ENABLE([understpl],
AS_HELP_STRING([--enable-understpl],[enable understpl mode build]))
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([stdio.h stdlib.h string.h xl4unibase/unibase.h])
if test x"$enable_unittest" != "xno"; then
AC_CHECK_HEADERS([setjmp.h cmocka.h],[],
[AC_MSG_ERROR([you may need to install libcmocka-dev package])],
[[#include <string.h>
#include <stdio.h>
#include <setjmp.h>
]])
fi
AM_CONDITIONAL(NO_ETHERNET, [test x"$enable_ethernet" = "xno"])
AM_CONDITIONAL(NO_INET, [test x"$enable_inet" = "xno"])
AM_CONDITIONAL(NO_THREAD, [test x"$enable_thread" = "xno"])
AM_CONDITIONAL(NO_IPCSHMEM, [test x"$enable_ipcshmem" = "xno"])
AM_CONDITIONAL(NO_IPCSOCK, [test x"$enable_ipcsock" = "xno"])
AM_CONDITIONAL(NO_EVENT, [test x"$enable_event" = "xno"])
# conditional build
AM_CONDITIONAL(UNITTEST_MEMTEST, [test x"$enable_unittest_memtest" = "xyes"])
AM_CONDITIONAL(BUILD_IN_STPL, [test x"$enable_understpl" = "xyes"])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove memset strtol])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT