forked from stonekyx/egui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
143 lines (129 loc) · 4.91 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([egui], [0.1], [[email protected]])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects])
LT_INIT
# Input device paths.
AC_ARG_WITH([input-dev-path],
AS_HELP_STRING([--with-input-dev-path=PATH],
[specify path to the event devices]),
[],
[]
)
AS_IF([test "$with_input_dev_path"],
[],
[with_input_dev_path="/dev/input"])
AC_DEFINE_UNQUOTED([INPUT_DEV_PATH], ["$with_input_dev_path"], [Path to event devices.])
# Mouse-moving resolution on EV_ABS events
AC_ARG_WITH([mouse-resolution],
AS_HELP_STRING([--with-mouse-resolution=NUMBER],
[specify mouse moving resolution for some devices. Bigger number means higher resolution.]),
[],
[]
)
AS_IF([test "$with_mouse_resolution"],
[],
[let with_mouse_resolution=65536])
AC_DEFINE_UNQUOTED([MOUSE_RESOLUTION], [$with_mouse_resolution], [Mouse-moving resolution.])
# Whether use fbtools
AC_ARG_ENABLE([fbtools],
AS_HELP_STRING([--enable-fbtools=yes],
[specify whether fbtools should be used.]),
[],
[]
)
AS_IF([test "$enable_fbtools" = "no"],
[FBTOOLS_SYSTEM=""],
AC_DEFINE([USE_FBTOOLS], [], [Enable fbtools.])
FBTOOLS_SYSTEM='graph/graph_lower/fbtools.lo'
)
AC_SUBST([FBTOOLS_SYSTEM])
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_MAKE_SET
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h limits.h stddef.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_LANG([C])
my_save_cflags="$CFLAGS"
CFLAGS="-std=c99 -pedantic -Wall -g"
AC_MSG_CHECKING([whether CC supports -std=c99 -pedantic -Wall -g])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[AM_CFLAGS="-std=c99 -Wall -g"],
[AC_MSG_RESULT([no])]
[AC_MSG_WARN([Your compiler may not support c99, compiling is likely to fail.])]
)
AC_SUBST([AM_CFLAGS])
CFLAGS="-I/usr/include"
AC_MSG_CHECKING([whether CC supports -I])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[AM_CPPFLAGS='-I$(top_srcdir)/include'],
[AC_MSG_RESULT([no])]
[AC_MSG_WARN([Your compiler may not support -I flag, compiling is very likely to fail.])]
)
AC_SUBST([AM_CPPFLAGS])
CFLAGS="$my_save_cflags"
# Checks for __attribute__((packed))
AC_MSG_CHECKING([whether CC supports __attribute__((packed))])
AC_RUN_IFELSE([
AC_LANG_SOURCE([[struct test_t{char c; long l;}__attribute__((packed));
int main(){
return sizeof(struct test_t)!=sizeof(char)+sizeof(long);}
]])
],
[echo "test program returned $?"],
[AC_MSG_FAILURE([test program returned $?])]
)
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([getcwd memmove memset munmap select socket strchr strerror strstr])
# Substitutions
AC_CONFIG_FILES([Makefile])
# application/Makefile
# client_lib/Makefile
# comm/Makefile
# debug/Makefile
# debug/comm/Makefile
# debug/config_parser/Makefile
# debug/event/Makefile
# debug/graph/Makefile
# debug/lib/Makefile
# debug/samples/Makefile
# debug/samples/calculator/Makefile
# debug/samples/file_browser/Makefile
# debug/widget/Makefile
# event/Makefile
# graph/Makefile
# graph/graph_engine/Makefile
# graph/graph_lower/Makefile
# server_lib/Makefile
# utils/Makefile
# utils/color/Makefile
# utils/config_parser/Makefile
# utils/data_structures/Makefile
# utils/geometry/Makefile
# widget/Makefile
# widget/button/Makefile
# widget/dialog/Makefile
# widget/icon/Makefile
# widget/image_view/Makefile
# widget/label/Makefile
# widget/message_box/Makefile
# widget/panel/Makefile
# widget/scroll_bar/Makefile
# widget/text_line/Makefile
# widget/widget/Makefile
# widget/window/Makefile
# window_manager/Makefile])
AC_OUTPUT