-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.ac
411 lines (365 loc) · 13 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
AC_INIT([D-Machine],[4.8.10],[Alexander Peyser <[email protected]>],[dm])
AC_CONFIG_MACRO_DIRS([m4 libltdl/m4])
AC_CANONICAL_TARGET
AC_CONFIG_AUX_DIR([libltdl/config])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AX_PREFIX_CONFIG_H([src/dm-config.h])
AX_PREFIX_CONFIG_H([src/codegen/dm-config.h])
AM_PATH_LISPDIR
AM_MAINTAINER_MODE
AX_SET_VERSION_INFO
CF_CLEAR_DEF([CFLAGS])
CF_AC_ENABLE([xps], [compile or install only new xps], [yes])
CF_AC_ENABLE([regex], [include regex], [yes])
CF_AC_ENABLE([openssl], [hash box files with sha1], [yes])
CF_AC_ARG_VAR([SYS_DICT_SIZE], [system dictionary size], [500])
CF_AC_ARG_VAR([MAX_NUM_OPDS], [maximum operand stack size in frames], [100000])
CF_AC_ARG_VAR([MAX_NUM_DICTS], [maximum dict stack size in frames], [10000])
CF_AC_ARG_VAR([MAX_NUM_EXECS], [maximum exec stack size in frame], [20000])
CF_AC_ARG_VAR([MAX_MEM_SIZE], [maximum vm allocation size in mb], [4000])
CF_AC_ARG_VAR([MAX_USER_DICT_SIZE], [maximum user dict size], [5000])
CF_AC_ARG_VAR([DVT_NUM_OPDS],
[dvt operand stack size in frames], [1000])
CF_AC_ARG_VAR([DVT_NUM_DICTS],
[dvt dict stack size in frames], [20])
CF_AC_ARG_VAR([DVT_NUM_EXECS], [dvt exec stack size in frame], [500])
CF_AC_ARG_VAR([DVT_MEM_SIZE], [dvt vm allocation size in mb], [10])
CF_AC_ARG_VAR([DVT_USER_DICT_SIZE], [dvt user dict size], [500])
CF_AC_ARG_VAR([DM_IPPORT_USERRESERVED],
[Symbol or integer value to use for default port base if dnode not in services],
[IPPORT_USERRESERVED])
CF_AC_ARG_VAR([DM_IPPORT_USERRESERVED_STANDARD],
[Fail if DM_IPPORT_USERRESERVED_SET != DM_IPPORT_USERRESERVED],
[5000])
CF_AC_ARG_VAR([ROLLBITS], [unroll math loops to 2^rollbits], [3])
CF_AC_ARG_VAR([BYTECORRECT], [align to this many bytes], [8])
CF_AC_ENABLE([debug-dmnum], [enable extra debug in dmnum], [no], [yes])
CF_AC_ENABLE([threads],
[compile and install threads, value is default number],
[1])
CF_IF_ENABLED([threads], [
CF_AC_ARG_VAR([THREADNUM], [max number of threads], [8])
CF_ON_TARGET([*-*-darwin*], [
CF_AC_ARG_VAR([THREADMUL], [min unrolls per thread], [560])
], [
CF_AC_ARG_VAR([THREADMUL], [min unrolls per thread], [56])
])
])
CF_AC_ENABLE([rthreads], [Activate mpi], [yes])
CF_IF_ENABLED([threads], [CF_ACX_PTHREAD_REQUIRE([no, please disable threads])])
CF_IF_ENABLED([rthreads], [
CF_ACX_PTHREAD_REQUIRE([no, please disable rthreads])
])
CF_AC_ARG_DIR([pkgdatadir], [location for data files],
[${datadir}/${PACKAGE}])
CF_AC_ARG_DIR([dmstartdir], [location for dm scripts], [${pkgdatadir}])
CF_AC_ARG_DIR([dmconfdir], [locations for per-host configuration],
[${sysconfdir}/${PACKAGE}])
CF_AC_ARG_DIR([m4datadir], [location for m4 files],
[${pkgdatadir}/m4])
CF_AC_ARG_DIR([plugindatadir], [location for plugin compile files],
[${pkgdatadir}/plugin])
CF_AC_ARG_DIR([pkgpsdatadir], [location for ps files],
[${pkgdatadir}/ps])
CF_AC_ARG_DIR([pkglispdir], [location for lisp files],
[${lispdir}/${PACKAGE}])
CF_AC_ARG_DIR([tmp], [location of temp dir], [/tmp])
CF_AC_ARG_DIR([real_tmp], [location of real temp dir], [${tmp}])
CF_AC_ARG_DIR([pkgconfiglibdir], [location for pkg-config pc files],
[${libdir}/pkgconfig])
CF_AC_ARG_DIR([pkglibdir], [location for plugins], [${libdir}/${PACKAGE}])
CF_AC_ARG_DIR([pkglibexecdir], [location for internal executables],
[${libexecdir}/${PACKAGE}])
CF_AC_ARG_DIR([pkgincludedir], [location for package includes],
[${includedir}/${PACKAGE}])
CF_AC_ENABLE([unix-sockets], [compile and install unix domain sockets], [yes])
CF_IF_ENABLED([unix-sockets], [
CF_AC_ARG_DIR([dmsockdir],
[location for dm unix sockets],
[${real_tmp}/${PACKAGE}/sockets])
])
CF_AC_ENABLE([doc], [compile and install documentation], [yes])
CF_IF_ENABLED([doc], [
CF_PROG_PDFLATEX
CF_PROG_BIBTEX
CF_PROG_MAKEINDEX
CF_LATEX_BIBSTYLE([plainnat])
CF_LATEX_CLASS_ARTICLE
CF_LATEX_CLASS_BOOK
CF_LATEX_PACKAGE_AMSMATH
CF_LATEX_PACKAGES([array,makeidx,supertabular,pdf,options,hyperref,relsize,caption,calc,avant,mathpazo,newbook],
[book], [`cd $srcdir; pwd -P`/doc])
CF_LATEX_PACKAGES([pdf,hyperref,natbib,redefs],
[article], [`cd $srcdir; pwd -P`/doc])
CF_LATEX_PACKAGE_OPT([geometry], [article], [pdftex])
CF_LATEX_PACKAGES([verbdef], [book])
CF_LATEX_PACKAGES([verbdef], [article])
])
AC_PROG_CC
gl_EARLY
AM_PROG_CC_C_O
AC_C_CONST
AC_C_RESTRICT
CF_C_INLINE
CF_BASIC_DEFS
CF_AC_ENABLE([plugins-support], [compile or install plugin support], [yes])
CF_AM_ENABLE([plugins], [compile or install plugins], [yes])
CF_AM_ENABLE([cppplugin],
[compile or install cpp memory library for plugins],
[no], [yes])
CF_AM_ENABLE([dmflex],
[compile or install dmflex plugin],
[no], [yes])
CF_AC_ENABLE([sem],
[compile d with cross-process semaphores],
[yes])
CF_AC_ARG_VAR_SUBST_EVAL([STRINGBUF],
[Max buffer size for dmflex, must be at least $NAMEBYTES + 2],
[8092])
CF_AC_SUBST_EVAL([NAMEBYTES_1], [`expr $NAMEBYTES - 1`])
CF_IF_ENABLED([plugins], [
CF_IF_ENABLED([dmflex], [
CF_PROG_LEX
])
])
CF_IF_ENABLED([sem], [
CF_SEM
CF_AC_ARG_VAR([SEM_DNODE_NAME],
[name for semaphore shared by processes (without leading slash)],
[dnode])
])
CF_ON_TARGET([*-*-darwin*], [
AC_CHECK_PROG([guipdf], [launch], [launch -i com.apple.Preview])
])
AC_CHECK_PROG([guipdf], [xdg-open], [xdg-open])
AC_CHECK_PROG([guipdf], [kfmclient], [kfmclient exec])
AC_CHECK_PROG([guipdf], [gnome-open], [gnome-open])
AC_CHECK_PROG([guipdf], [kpdf], [kpdf])
AC_CHECK_PROG([guipdf], [xpdf], [xpdf])
AC_CHECK_PROG([guipdf], [gv], [gv])
AC_CHECK_PROG([guipdf], [gs], [gs])
CF_ATLAS()
CF_IF_ENABLED([rthreads], [
AC_ARG_WITH([dpawn-command],
[Program and arguments (before dpawn) to run ]
[dpawn under (like valgrind)],
[dpawn_command="$withval"])
CF_AC_SUBST([DPAWN_COMMAND], [$dpawn_command])
CF_MPI([], [
AC_MSG_ERROR([No mpi found... needed for rthreads])
])
], [AM_CONDITIONAL([ENABLE_MPI], [false])])
CF_PETSC()
CF_IF_ENABLED([petsc], [
CF_CHECK_PETSC_SIZEOF([PetscInt], [4])
CF_CHECK_PETSC_SIZEOF([PetscScalar], [8])
])
CF_AM_PROG([BASH], [bash])
CF_AM_PROG([ENV], [env], [/usr/bin])
CF_AM_PROG([PERL], [perl])
CF_AM_PROG([TAIL], [tail])
CF_AM_PROG([XTERM], [xterm])
CF_AM_PROG([LP], [lp])
CF_AM_PROG([ATPS], [a2ps])
CF_AM_PROG([PSTPDF], [ps2pdf])
CF_AM_PROG([EPSTPDF], [epstopdf])
CF_AM_PROG([PDFTPS], [pdf2ps])
CF_AM_PROG([DVIPDF], [dvipdf])
CF_AM_PROG([XDVI], [xdvi])
CF_AM_PROG([GS], [gs])
CF_AM_PROG([PDFLATEX], [pdflatex])
CF_AM_PROG([LATEX], [latex])
CF_AM_PROG([EMACSCLIENT], [emacsclient])
CF_AM_PROG([PDFCROP], [pdfcrop])
CF_AM_PROG([PDFTOPS], [pdftops])
CF_AC_ARG_VAR_QUOTE([guipdf],
[name of program to display pdf's, eg gnome-open or launch -i com.apple.Preview],
[xpdf])
CF_AM_CONDITIONAL([EMACS], [:])
#CF_EMACS_ENABLED([
CF_EMACS_SOURCE([server])
#])
AC_CHECK_HEADERS([unistd.h])
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
CF_SET_TOP_DIR
CF_LIBTOOL
LT_LIB_M
CF_X11_ENABLE
CF_PREPEND_VARS([LIBS], [XLIB LIBM])
AC_C_BIGENDIAN
AC_DEFINE([_POSIX_C_SOURCE], [200809L], [Define to 200809L - we are POSIXY])
AC_DEFINE([_XOPEN_SOURCE], [(_XOPEN_SOURCE < 700 ? 700 : _XOPEN_SOURCE)],
[Define to >700 - we are POSIXY])
AC_CHECK_HEADERS([features.h])
CF_AC_CHECK_HEADERS([endian.h machine/endian.h], [ENDIAN_HDR],
[Header for endianness], [NO_ENDIAN_HDR])
CF_AC_CHECK_HEADER([math.h])
CF_AC_CHECK_HEADER([stdlib.h])
CF_AC_CHECK_HEADER([stdio.h])
CF_AC_CHECK_HEADER([sys/socket.h])
CF_AC_CHECK_HEADER([limits.h])
CF_AC_CHECK_HEADER([sys/un.h])
CF_AC_CHECK_HEADER([sys/select.h])
CF_AC_CHECK_HEADER([netinet/in.h])
CF_AC_CHECK_HEADER([errno.h])
CF_AC_CHECK_HEADER([netdb.h])
CF_AC_CHECK_HEADER([fcntl.h])
CF_AC_CHECK_HEADER([unistd.h])
CF_AC_CHECK_HEADER([string.h])
CF_AC_CHECK_HEADER([dirent.h])
CF_AC_CHECK_HEADER([time.h])
CF_AC_CHECK_HEADER([sys/stat.h])
CF_AC_CHECK_HEADER([sys/statvfs.h])
CF_AC_CHECK_HEADER([fnmatch.h])
CF_AC_CHECK_HEADER([sys/types.h])
CF_AC_CHECK_HEADER([signal.h])
CF_AC_CHECK_HEADER([time.h])
CF_AC_CHECK_HEADER([sys/time.h])
CF_AC_CHECK_HEADER([sys/resource.h])
CF_X11_ENABLED([
CF_AC_CHECK_HEADER([X11/Xlib.h])
CF_AC_CHECK_HEADER([X11/Xutil.h])
AC_CHECK_HEADERS([X11/XKBlib.h])
])
CF_AC_CHECK_HEADER([strings.h])
CF_AC_CHECK_HEADER([inttypes.h])
CF_AC_CHECK_HEADER([sys/wait.h])
CF_IF_ENABLED([plugins-support], [CF_AC_CHECK_HEADER([stdarg.h])])
CF_IF_ENABLED([regex], [CF_AC_CHECK_HEADER([regex.h])])
CF_AC_CHECK_HEADER([spawn.h])
CF_IF_ENABLED([openssl], [CF_AC_CHECK_HEADER([openssl/sha.h])])
CF_AC_CHECK_HEADER([sys/statvfs.h])
AC_CHECK_FUNCS([setsid])
AC_CHECK_FUNCS([srandomdev])
CF_IF_UNDEF([CFLAGS], [
CF_ON_TARGET([*-pc-cygwin], [], [
CF_GCC_COMPILER_OPTION([-g])
])
CF_GCC_COMPILER_OPTION([-O2])
])
AX_CFLAGS_STRICT_PROTOTYPES()
CF_GCC_COMPILER_OPTION([-ftree-vectorize])
CF_GCC_COMPILER_OPTION([-fno-strict-aliasing])
CF_GCC_COMPILER_OPTION([-pipe], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-fno-unsigned-char], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-ffast-math], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-fno-finite-math-only], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-fno-unsafe-math-optimizations], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-Wno-pointer-sign], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-fprefetch-loop-arrays], [GCC_CFLAGS])
CF_GCC_COMPILER_OPTION([-std=gnu99])
CF_IF_ENABLED([cppplugin], [
CF_IF_UNDEF([CXXFLAGS], [
CF_ON_TARGET([*-pc-cygwin], [], [
CF_GXX_COMPILER_OPTION([-g])
])
CF_GXX_COMPILER_OPTION([-O2])
])
CF_GXX_COMPILER_OPTION([-ftree-vectorize])
CF_GXX_COMPILER_OPTION([-fno-strict-aliasing])
CF_GXX_COMPILER_OPTION([-pipe], [GCC_CXXFLAGS])
CF_GXX_COMPILER_OPTION([-fno-unsigned-char], [GCC_CXXFLAGS])
CF_GXX_COMPILER_OPTION([-ffast-math], [GCC_CXXFLAGS])
CF_GXX_COMPILER_OPTION([-fno-finite-math-only], [GCC_CXXFLAGS])
CF_GXX_COMPILER_OPTION([-fno-unsafe-math-optimizations], [GCC_CXXFLAGS])
CF_GXX_COMPILER_OPTION([-Wno-pointer-sign], [GCC_CXXFLAGS])
CF_GXX_COMPILER_OPTION([-fprefetch-loop-arrays], [GCC_CXXFLAGS])
])
CF_DEFINE_IF_CODE_GCC([HOT], [__attribute__ ((__hot__)) void x(void) {}])
CF_DEFINE_IF_CODE_GCC([UNUSED], [__attribute__ ((__unused__)) void x(void) {}])
CF_DEFINE_IF_CODE_GCC([NORETURN], [
#include <stdlib.h>
__attribute__ ((__noreturn__)) void x(void) {exit(0);}
])
CF_WIN_DLL_IMPORT([DM])
CF_WIN_DLL_IMPORT([PLUGIN])
LIB_SOCKET_NSL
CF_AC_SUBST([PCLIBS], [ ${LTLIBOBJS} -ldmglobals])
CF_AC_SUBST([PCCFLAGS], [${CFLAGS} ${GCC_CFLAGS} ${LIBDM_DLL_IMPORT} ${X_CFLAGS}])
CF_AC_SUBST([PCLDFLAGS], [-module -no-undefined])
CF_IF_ENABLED([cppplugin], [
CF_AC_SUBST([PCCXXFLAGS],
[${CXXFLAGS} ${GCC_CXXFLAGS} ${LIBDM_DLL_IMPORT} ${X_CFLAGS}])
], [
CF_AC_SUBST([PCCXXFLAGS])
PCCXXFLAGS=''
])
AC_SUBST([PKG_CONFIG_PATH])
CF_IF_ENABLED([openssl], [
CF_PKG_CHECK_MODULES([openssl])
CF_PKG_CHECK_FLAGS([openssl], [cflags], [libs])
])
gl_INIT
AC_CONFIG_LINKS([
src/dsp1f.h:src/codegen/dsp1f.h.built
src/dmnuminc.h:src/codegen/dmnuminc.h.built
src/dsp2def.h:src/codegen/dsp2def.h.built
src/dgen_0.h:src/codegen/dgen_0.h.built
src/dnode_0.h:src/codegen/dnode_0.h.built
src/dpawn_0.h:src/codegen/dpawn_0.h.built
src/dm-errs.h:src/codegen/dm-errs.h.built
src/dvt_0.h:src/codegen/dvt_0.h.built
src/codegen/dm.h:src/dm.h
src/codegen/dmglobals.c:src/dmglobals.c
src/codegen/dsp1.c:src/dsp1.c
src/codegen/dm1.c:src/dm1.c
src/codegen/dm2.c:src/dm2.c
src/codegen/dm2.h:src/dm2.h
src/codegen/dm3.h:src/dm3.h
src/codegen/dm-prop.h:src/dm-prop.h
src/codegen/dm-signals.h:src/dm-signals.h
src/codegen/dm-vm.h:src/dm-vm.h
src/codegen/dm-swapbytes.h:src/dm-swapbytes.h
src/codegen/dm-conv.c:src/dm-conv.c
src/codegen/dm3.c:src/dm3.c
src/codegen/dm-prop.cin:src/dm-prop.cin
src/codegen/dm-signals.c:src/dm-signals.c
src/codegen/dm-vm.c:src/dm-vm.c
src/codegen/dm4.c:src/dm4.c
src/codegen/dm5.c:src/dm5.c
src/codegen/dm5.h:src/dm5.h
src/codegen/dm6.c:src/dm6.c
src/codegen/dm6.h:src/dm6.h
src/codegen/dm7.c:src/dm7.c
src/codegen/dm8.c:src/dm8.c
src/codegen/dm8.h:src/dm8.h
src/codegen/dmnum.c:src/dmnum.c
src/codegen/dsp2.c:src/dsp2.c
src/codegen/dm-types.h:src/dm-types.h
src/codegen/dm-types.c:src/dm-types.c
src/codegen/paths.hin:src/paths.hin
src/codegen/dgen.c:src/dgen.c
src/codegen/dgen_1.h:src/dgen_1.h
src/codegen/dgen-build:src/dgen-build
src/codegen/dmnum.h:src/dmnum.h
src/codegen/dm-nextevent.c:src/dm-nextevent.c
src/codegen/dm-nextevent.h:src/dm-nextevent.h
plugins/plugin.d:dcode/plugin.d
dcode/errors.d:src/codegen/errors.d.built
plugins/startup_dgen.d:src/codegen/startup_dgen.d
emacs/d-mode-ops.el:src/codegen/d-mode-ops.el
plugins/new-plugin.d:dcode/new-plugin.d
doc/dvt-3.0.bib:doc/dvt.bib
doc/dvt-emacs.bib:doc/dvt.bib
doc/newbook.bib:doc/dvt.bib
])
AC_CONFIG_FILES([
Makefile
src/Makefile
src/codegen/Makefile
src/dm.pc
plugins/Makefile plugins/dmflex.l
ps/Makefile
sh/Makefile
emacs/Makefile
dcode/Makefile
test/Makefile
m4/Makefile
test/arr.d
lib/Makefile
doc/Makefile
])
AC_OUTPUT