-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfigure.ac
229 lines (173 loc) · 5.95 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
dnl // /////////////////////////////////////////////////////////////////////// //
dnl //
dnl // This file is part of the anacleto project.
dnl // Copyright 2018 Andrea Rigoni Garola <[email protected]>.
dnl //
dnl // This program is free software: you can redistribute it and/or modify
dnl // it under the terms of the GNU General Public License as published by
dnl // the Free Software Foundation, either version 3 of the License, or
dnl // (at your option) any later version.
dnl //
dnl // This program is distributed in the hope that it will be useful,
dnl // but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl // GNU General Public License for more details.
dnl //
dnl // You should have received a copy of the GNU General Public License
dnl // along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl //
dnl // ////////////////////////////////////////////////////////////////////// //
dnl Process this file with autoconf to produce a configure script.
dnl AUTOCONF ///////////////////////////////////////////////////////////////////
AC_PREREQ([])
AC_INIT([Anacleto],[0.1],[[email protected]])
AC_CONFIG_MACRO_DIRS([conf/m4])
AC_CONFIG_AUX_DIR([conf])
dnl AC_CONFIG_SRCDIR([...])
AC_CANONICAL_TARGET
dnl AX_ANACLETO_BANNER
dnl update submodules at first ... (must be cleaned out)
AS_IF([${srcdir}/conf/update_submodules.sh],
[AS_ECHO(["Submodules succesfully updated"])],
[AS_ECHO(["Error updating submodules"])])
dnl AX_KCONFIG /////////////////////////////////////////////////////////////////
dnl see: m4/ax_enable_kconfig.m4
AS_VAR_SET([srcdir],[$(cd ${srcdir}; pwd)])
AS_VAR_SET([builddir],[$(pwd)])
AX_KCONFIG([conf/kconfig])
dnl AX_TARGET_SELFHELP /////////////////////////////////////////////////////////
AX_TARGET_SELFHELP
# //////////////////////////////////////////////////////////////////////////// #
# // DOCKER BUILD /////////////////////////////////////////////////////////// #
# //////////////////////////////////////////////////////////////////////////// #
m4_sinclude(conf/kscripts/docker.ac)
AX_DOCKER_BUILD
dnl AUTOMAKE ///////////////////////////////////////////////////////////////////
AM_INIT_AUTOMAKE([no-define foreign subdir-objects])
dnl ([1.14 foreign subdir-objects])
AC_CONFIG_HEADERS([config.h])
dnl RELEASE
AX_IS_RELEASE([always])
AX_CHECK_ENABLE_DEBUG([no],,,,[-g -O2])
# Checks for programs.
AC_PROG_AWK
AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_PROG_SED
AC_PROG_CC
AC_PROG_CXX
# AC_PROG_RANLIB
AC_PROG_LN_S
AC_CHECK_PROGS([CURL],[curl])
AC_CHECK_PROGS([TAR],[gtar tar])
AC_CHECK_PROGS([UNIQ],[uniq])
AC_CHECK_PROGS([WC],[wc])
AC_PROG_LEX(yywrap)
AC_PROG_YACC
# needed for sh_envsubst
AC_CHECK_PROGS([PERL],[perl])
# needed to scan all subdirectories files timestamp for make deps
AC_CHECK_PROGS([FIND],[find])
AC_SUBST([FIND])
## LIBTOOL
dnl LT_INIT()
## /////////////////////////////////////////////////////////////////////////////
## // KSCRIPTS ///////////////////////////////////////////////////////////////
## /////////////////////////////////////////////////////////////////////////////
## BUILD_COMMON ##
m4_sinclude(conf/kscripts/build_common.ac)
## TOOLCHAIN ##
m4_sinclude(conf/kscripts/toolchain.ac)
## PYTHON ##
m4_sinclude(conf/kscripts/python.ac)
## CODAC ##
# m4_sinclude(conf/kscripts/iter_codac.ac)
## QT ##
m4_sinclude(conf/kscripts/qtdesktop.ac)
## NODEJS ##
m4_sinclude(conf/kscripts/nodejs.ac)
## DOXYGEN ##
m4_sinclude(conf/autoconf-doxygen/doxygen.ac)
## EXT_LIBJIT ##
m4_sinclude(conf/kscripts/ext_libjit.ac)
## EXT_LLVM ##
m4_sinclude(conf/kscripts/ext_llvm.ac)
## EXT_CCSTICKERS ##
m4_sinclude(conf/kscripts/ext_ccStickers.ac)
## EXT_NODEJS_NODE ##
m4_sinclude(conf/kscripts/ext_nodejs_node.ac)
## EXT_MDSPLUS ##
m4_sinclude(conf/kscripts/ext_mdsplus.ac)
## EXT ##
AX_KCONFIG_MODULES([EXT],
[libjit],[libjit external sources],
[llvm],[llvm external sources],
[ccStickers],[ccStickers external sources],
[mdsplus],[mdsplus external sources]
)
AC_SUBST([EXT_MODULES])
## YOCTO ##
m4_sinclude(conf/kscripts/yocto.ac)
## LINUX ##
m4_sinclude(conf/kscripts/linux.ac)
# COMPILER OPTIONS
AX_KCONFIG_VAR([LINUX_CFLAGS])
AX_KCONFIG_VAR([LINUX_PACKAGE])
AX_KCONFIG_VAR([LINUX_DIR])
AC_SUBST([LINUX_CFLAGS])
AC_SUBST([LINUX_PACKAGE])
AC_SUBST([LINUX_DIR])
# //////////////////////////////////////////////////////////////////////////// #
# // TARGET //////////////////////////////////////////////////////////////// #
# //////////////////////////////////////////////////////////////////////////// #
# DEVICE
AX_KCONFIG_VAR([DEVICE_NAME])
AC_SUBST([DEVICE_NAME])
AX_KCONFIG_VAR([DEVICE_IP])
AC_SUBST([DEVICE_IP])
AX_KCONFIG_VAR([DEVICE_MODULES_DIR])
AC_SUBST([DEVICE_MODULES_DIR])
AX_KCONFIG_VAR([DEVICE_BOOT_DIR])
AC_SUBST([DEVICE_BOOT_DIR])
# SSH to deploy
AX_KCONFIG_VAR([DEVICE_ACCESS])
AX_KCONFIG_VAR([DEVICE_USER])
AC_CHECK_PROG([SSHPASS],sshpass,sshpass)
AX_KCONFIG_VAR([WITH_DEVICE_SSHPASSWD])
AM_CONDITIONAL([WITH_DEVICE_SSHPASSWD],
[test -n "${WITH_DEVICE_SSHPASSWD}" -a -n "${SSHPASS}"] )
AX_KCONFIG_VAR([WITH_DEVICE_SSHKEY])
AM_CONDITIONAL([WITH_DEVICE_SSHKEY], [test -n "${WITH_DEVICE_SSHKEY}"])
AX_KCONFIG_VAR([DEVICE_PASSWD])
AX_KCONFIG_VAR([DEVICE_SSHKEY])
AC_SUBST([DEVICE_ACCESS])
AC_SUBST([DEVICE_USER])
AC_SUBST([DEVICE_PASSWD])
AC_SUBST([DEVICE_SSHKEY])
# Yocto meta-xilinx support
AX_KCONFIG_CONDITIONAL([ENABLE_YOCTO_XILINX])
AX_KCONFIG_CONDITIONAL([WITH_YOCTO_XILINX_GIT])
AX_KCONFIG_CONDITIONAL([WITH_YOCTO_XILINX_TAR])
AX_KCONFIG_VAR([YOCTO_XILINX_GIT])
AC_SUBST([YOCTO_XILINX_GIT])
AX_KCONFIG_VAR([YOCTO_XILINX_TAR])
AC_SUBST([YOCTO_XILINX_TAR])
dnl AC_SUBST([obj_m],[obj-m])
# // GIT IGNORE // #
AX_GITIGNORE_SUBST
dnl forward declaration for fpga configure.ac
AX_COMPARE_VERSION([],[eq],[])
AX_PROJECT_VARIABLES
# // include configure.ac in subdirectories // #
AX_CONFIG_SUBDIRS(
fpga
fpga/lib/rfx
projects
)
AX_CONFIG_FILES(
Makefile
ext/Makefile
src/hello_cpp/Makefile
.gitignore
)
AC_OUTPUT