File: configure.ac

package info (click to toggle)
massivethreads 1.02-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,924 kB
  • sloc: ansic: 27,814; sh: 4,559; cpp: 3,334; javascript: 1,799; makefile: 1,745; python: 523; asm: 373; perl: 118; lisp: 9
file content (595 lines) | stat: -rw-r--r-- 17,569 bytes parent folder | download
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
AC_INIT([massivethreads],[0.97],[massivethreads@eidos.ic.i.u-tokyo.ac.jp],[massivethreads],[https://github.com/massivethreads/massivethreads/])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
# required when you build shared libraries, relying on libtool
AC_CONFIG_MACRO_DIR([m4])
# avoid executing autotools on the user side
AM_MAINTAINER_MODE([disable])

# -----------------------------
# basics
# -----------------------------

AC_PROG_CC
# recommended CFLAGS
# -O3
# -ftls-model=initial-exec
AC_PROG_CC_C_O
AM_PROG_CC_C_O
AM_PROG_AS
AC_PROG_AWK

# on new systems, this seems required
# (without it it errs "linking libtool libraries using a 
# non-POSIX archiver requires 'AM_PROG_AR' in 'configure.ac");
# on old systems, this results in an error
# macro `AM_PROG_AR' not found in library
# error: possibly undefined macro: AM_PROG_AR
# If this token and others are legitimate, please use m4_pattern_allow.
# See the Autoconf documentation.
AM_PROG_AR

# =============================
# process user options
# =============================

# -----------------------
# whether or not build libmyth-ld
# -----------------------

AC_ARG_ENABLE([myth-ld],
              [AS_HELP_STRING([--enable-myth-ld=yes|no],
	                      [build libmyth-ld or not, a library that wraps some system functions with GNU linker options --wrap=function_name (default=yes)])],
              [enable_myth_ld="${enableval}"],
              [enable_myth_ld="yes"])

# only record --enable-myth-ld for now
# we will later check if the linker supports --wrap and decide if
# we really build libmyth-ld

# -----------------------
# whether or not build libmyth-dl
# -----------------------

AC_ARG_ENABLE([myth-dl],
              [AS_HELP_STRING([--enable-myth-dl=yes|no],
	                      [build libmyth-dl or not, a library that wraps some system functions with dlopen/dlsym])],
              [enable_myth_dl="${enableval}"],
              [enable_myth_dl="yes"])

# only record --enable-myth-dl for now
# we will later check if dlopen/dlsym are available and decide if
# we really build libmyth-dl

# -----------------------
# bind workers or not
# -----------------------

AC_ARG_ENABLE([bind-workers],
            [AS_HELP_STRING([--enable-default-bind-workers=yes/no],
                            [Set default value for bind-workers.
                             Default: yes.  You can change it at runtime
			     by setting MYTH_BIND_WORKERS.])],
            [default_bind_workers="${enableval}"],
            [default_bind_workers="yes"])

if test "x$default_bind_workers" != "xno" ; then
  AC_DEFINE_UNQUOTED([MYTH_DEFAULT_BIND_WORKERS],[1],[if 1, bind workers by default])
else						 
  AC_DEFINE_UNQUOTED([MYTH_DEFAULT_BIND_WORKERS],[0],[if 1, bind workers by default])
fi

# -----------------------
# --enable-eco-mode
#   flag controlling the behavior of eco-mode scheduler
# -----------------------

AC_ARG_ENABLE([eco-mode],
              [AS_HELP_STRING([--enable-eco-mode=yes|no],
	                      [Enable or disable eco-mode scheduler. "no" completely 
			      disables it when compiling MassiveThreads. "yes" 
			      enables it, but it is not activated by default.
			      To use it you have to activate by setting environment
			      variable MYTH_ECO_MODE=1. Default is "no".
			      When eco-mode scheduler is enabled, thread creation
			      overhead might be slightly increased, whichever it is activated or not])],
			      ,
			     [enable_eco_mode="no"])

if test "x$enable_eco_mode" = "xyes" ; then
  AC_DEFINE_UNQUOTED([MYTH_ECO_MODE],[1],[if 1, enable eco-mode])
  AC_DEFINE_UNQUOTED([MYTH_ECO_TEIAN_STEAL],[1],[if 1, enable eco-mode])
else
  AC_DEFINE_UNQUOTED([MYTH_ECO_MODE],[0],[if 1, enable eco-mode])
  AC_DEFINE_UNQUOTED([MYTH_ECO_TEIAN_STEAL],[0],[if 1, enable eco-mode])
fi

# -----------------------
# use ucontext or native context
# -----------------------

AC_ARG_ENABLE([native-context],
            [AS_HELP_STRING([--enable-native-context=yes|no],
                            [use optimized assembly language context switch (default=yes)])],
            [enable_native_context="${enableval}"],
            [enable_native_context="yes"])

if test x"$enable_native_context" = "xno" ; then
   enable_native_context=1
else
   enable_native_context=0
fi
AC_DEFINE_UNQUOTED([MYTH_FORCE_UCONTEXT],
	[$enable_native_context],
	[use ucontext if set, otherwise assembly context])


# -----------------------
# set user threads' default stack size
# -----------------------

AC_ARG_WITH([default-stack-size],
            [AS_HELP_STRING([--with-default-stack-size=S],
                            [Set default stack size of threads to S bytes.
                             Default: 131072.  You can change it at runtime
			     by setting MYTH_DEF_STKSIZE.])],
            [default_stack_size="$withval"],
            [default_stack_size=131072])

AC_DEFINE_UNQUOTED([MYTH_DEF_STACK_SIZE],
	[$default_stack_size],[Default stack size])

# -----------------------
# set the scheduler thread's stack size
# -----------------------

AC_ARG_WITH([sched-stack-size],
            [AS_HELP_STRING([--with-sched-stack-size=S],
                            [Set default stack size of the scheduler thread to S bytes.
                             Default: 1048576.])],
            [sched_stack_size="$withval"],
            [sched_stack_size=1048576])

AC_DEFINE_UNQUOTED([MYTH_SCHED_STACK_SIZE],
	[$sched_stack_size],[Scheduler stack size])

# -----------------------
# set user threads' default guard size
# -----------------------

AC_ARG_WITH([default-guard-size],
            [AS_HELP_STRING([--with-default-guard-size=S],
                            [Set default guard size of threads to S bytes.
                             Default: 4096.  You can change it at runtime
			     by setting MYTH_DEF_GUARDSIZE.])],
            [default_guard_size="$withval"],
            [default_guard_size=4096])

AC_DEFINE_UNQUOTED([MYTH_DEF_GUARD_SIZE],
	[$default_guard_size],[Default guard size])

#
# child first or not
#

AC_ARG_WITH([child-first],
            [AS_HELP_STRING([--with-child-first=yes/no],
                            [Set default value for child-first.
                             Default: 1.  You can change it at runtime
			     by setting MYTH_CHILD_FIRST.])],
            [default_child_first="$withval"],
            [default_child_first="yes"])

if test "x$default_child_first" != "xno" ; then
   AC_DEFINE_UNQUOTED([MYTH_CHILD_FIRST],[1],[if 1, child first by default])
else						 
   AC_DEFINE_UNQUOTED([MYTH_CHILD_FIRST],[0],[if 1, child first by default])
fi

# -----------------------
# build the profiler with PAPI (used to get hardware counters)
# -----------------------

AC_ARG_WITH([papi],
            [AS_HELP_STRING([--with-papi=yes/no],
                            [Enable the profiler (DAG Recorder) to get hardware
                            performance counters using PAPI library. PAPI must
                            be present on the system. Default: no.])],
            [with_papi="$withval"],
            [with_papi=no])

# -----------------------------
# sizes
# -----------------------------

# Check sizes
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([void*])

# =============================
# libraries
# =============================

# ---------------------
# mandatory libraries
# ---------------------

AC_CHECK_LIB(pthread, pthread_create,
		      [],
		      [AC_MSG_ERROR(libpthread not available.)])

# ---------------------
# libraries affecting build targets depending on availability
# ---------------------

#
# check if --wrap=xxxx is supported
#
AX_CHECK_LINK_FLAG([-Wl,--wrap=malloc],
	[linker_accepts_wrap="yes"],
	[linker_accepts_wrap="no"])

AM_CONDITIONAL([BUILD_MYTH_LD],
	[test x"$enable_myth_ld" = "xyes" -a x"$linker_accepts_wrap" = "xyes"])


# ---------------------
# optional libraries
# ---------------------

# ------
# -ldl dlopen
# ------
AC_CHECK_LIB(dl, dlsym,
		 [have_dlsym="yes"],
		 [have_dlsym="no"])

AC_CHECK_HEADERS([dlfcn.h])

AC_CHECK_DECL(RTLD_NEXT,
	[have_rtld_next="yes"],
	[have_rtld_next="no"],
[#define _GNU_SOURCE
#ifdef HAVE_DLFCN_H
# include <dlfcn.h>
#endif
])


# -------------
# -lrt clock_gettime
# -------------
AC_CHECK_LIB(rt, clock_gettime)
# define HAVE_CLOCK_GETTIME 1


# -------------
# -lpapi PAPI_library_init
# -------------
AC_CHECK_LIB(papi, PAPI_library_init,
		   [have_papi="yes"],
		   [have_papi="no"])
AS_IF([test x"$with_papi" = "xyes" -a x"$have_papi" = "xno"],
      AC_MSG_ERROR([[--with-papi was given, but test for PAPI failed.]]))
AM_CONDITIONAL([BUILD_DAG_RECORDER_WITH_PAPI],
	[test x"$with_papi" = "xyes" -a x"$have_papi" = "xyes" ])

# =============================
# headers
# =============================

AC_CHECK_HEADERS([malloc.h],
    AM_CONDITIONAL(HAVE_MALLOC_H, true),
    AM_CONDITIONAL(HAVE_MALLOC_H, false))
AC_CHECK_HEADERS([link.h])
# define HAVE_DL_ITERATE_BY_PHDR 1




# =============================
# functions
# =============================

AC_CHECK_FUNCS([sysconf])
# define HAVE_SYSCONF 1

AC_CHECK_FUNCS([accept4])
#define HAVE_ACCEPT4 1

AC_CHECK_FUNCS([sched_getaffinity])
# define HAVE_SCHED_GETAFFINITY 1

AC_CHECK_FUNCS([pthread_mutex_timedlock])
# define HAVE_PTHREAD_TIMEDLOCK 1

AC_CHECK_FUNCS([pthread_setschedprio])
# define HAVE_PTHREAD_SCHEDPRIO 1

AC_CHECK_FUNCS([pthread_getconcurrency],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_CONCURRENCY],
[],[pthread_getconcurrency etc.])])
# define HAVE_PTHREAD_CONCURRENCY 1

AC_CHECK_FUNCS([pthread_attr_setaffinity_np],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_AFFINITY_NP],
[],[pthread_attr_setaffinity_np etc.])])
# define HAVE_PTHREAD_AFFINITY_NP 1

AC_CHECK_FUNCS([pthread_getattr_default_np],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_ATTR_NP],
[],[pthread_getattr_default_np etc.])])
# define HAVE_PTHREAD_ATTR_NP 1

AC_CHECK_FUNCS([pthread_getname_np],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_NAME_NP],
[],[pthread_getname_np etc.])])
# define HAVE_PTHREAD_NAME_NP 1

AC_MSG_CHECKING([pthread_setname_np arity])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
]],
	[[ return (pthread_setname_np("") ? 1 : 0); ]])],
	[pthread_setname_arity=1],
	[pthread_setname_arity=2])
AC_MSG_RESULT([$pthread_setname_arity])
AC_DEFINE_UNQUOTED([PTHREAD_SETNAME_ARITY],[$pthread_setname_arity],
	[the number of args pthread_setname_arity takes; it takes thread id and name on Linux but only name on Macintosh (older pthreads?)])

AC_CHECK_FUNCS([pthread_tryjoin_np],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_JOIN_NP],
[],[pthread_tryjoin_np etc.])])
# define HAVE_PTHREAD_JOIN_NP 1

AC_CHECK_FUNCS([pthread_sigqueue])
# define HAVE_PTHREAD_SIGQUEUE 1

AC_CHECK_FUNCS([pthread_condattr_getclock],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_CONDATTR_CLOCK],
[],[pthread_condattr_getclock etc.])])
# define HAVE_PTHREAD_CONDATTR_CLOCK  1

AC_CHECK_FUNCS([pthread_getcpuclockid])
# define HAVE_PTHREAD_GETCPUCLOCKID 1

AC_CHECK_FUNCS([pthread_spin_init],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_SPIN],
[],[pthread_spin_init etc.])])
# define HAVE_PTHREAD_SPIN 1

AC_CHECK_FUNCS([pthread_mutex_consistent])
# define HAVE_PTHREAD_MUTEX_CONSISTENT 1

AC_CHECK_FUNCS([pthread_mutexattr_getrobust],
[AC_DEFINE_UNQUOTED([HAVE_PTHREAD_MUTEXATTR_ROBUST],
[],[pthread_mutexattr_getrobust etc.])])
# define HAVE_PTHREAD_MUTEXATTR_ROBUST 1


# -----------------------------
# declarations
# -----------------------------

# 
# aligned_alloc
# 

AC_MSG_CHECKING([aligned_alloc])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _ISOC11_SOURCE 1
#include <stdlib.h>
]],
	[[ return (aligned_alloc(1, 1) ? 0 : 1); ]])],
	[have_aligned_alloc="yes"],
	[have_aligned_alloc="no"])
AC_MSG_RESULT([$have_aligned_alloc])
if test x"$have_aligned_alloc" = "xyes" ; then
   AC_DEFINE_UNQUOTED([HAVE_ALIGNED_ALLOC],[1],
		[if set, aligned_alloc is declared in stdlib.h])
fi
AM_CONDITIONAL([BUILD_TEST_MYTH_ALIGNED_ALLOC],
	[test x"$have_aligned_alloc" = "xyes"])

# 
# memalign
# 

AC_MSG_CHECKING([memalign])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _ISOC11_SOURCE 1
#include <stdlib.h>
]],
	[[ return (memalign(1, 1) ? 0 : 1); ]])],
	[have_memalign="yes"],
	[have_memalign="no"])
AC_MSG_RESULT([$have_memalign])
if test x"$have_memalign" = "xyes" ; then
   AC_DEFINE_UNQUOTED([HAVE_MEMALIGN],[1],
		[if set, memalign is declared in stdlib.h])
fi
AM_CONDITIONAL([BUILD_TEST_MYTH_MEMALIGN],
	[ test x = y ])

# [ test x"$have_memalign" = "xyes" ]

# 
# pvalloc
# 

AC_MSG_CHECKING([pvalloc])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _ISOC11_SOURCE 1
#include <stdlib.h>
]],
	[[ return (pvalloc(1, 1) ? 0 : 1); ]])],
	[have_pvalloc="yes"],
	[have_pvalloc="no"])
AC_MSG_RESULT([$have_pvalloc])
if test x"$have_pvalloc" = "xyes" ; then
   AC_DEFINE_UNQUOTED([HAVE_PVALLOC],[1],
		[if set, pvalloc is declared in stdlib.h])
fi
AM_CONDITIONAL([BUILD_TEST_MYTH_PVALLOC],
	[test x"$have_pvalloc" = "xyes" ])


# 
# pthread_barrier
# 

AC_MSG_CHECKING([pthread_barrier_init])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <pthread.h>
]],
	[[ pthread_barrier_init(0, 0, 0); ]])],
	[have_pthread_barrier_init="yes"],
	[have_pthread_barrier_init="no"])
AC_MSG_RESULT([$have_pthread_barrier_init])
if test x"$have_pthread_barrier_init" = "xyes" ; then
   AC_DEFINE_UNQUOTED([HAVE_PTHREAD_BARRIER],[1],
		[if set, pthread_barrier is declared in pthread.h])
fi
AM_CONDITIONAL([BUILD_TEST_PTH_BARRIER],
	[test x"$have_pthread_barrier_init" = "xyes" ])


# 
# pthread_yield
# 

AC_MSG_CHECKING([pthread_yield])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
]],
	[[ pthread_yield(); ]])],
	[have_pthread_yield="yes"],
	[have_pthread_yield="no"])
if test x"$have_pthread_yield" = "xyes" ; then
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#define _GNU_SOURCE
#include <pthread.h>
int sched_yield(void) {}
int pthread_yield(void) {}
]],
	[[]])],
	[],
	[have_pthread_yield="no"])
fi
AC_MSG_RESULT([$have_pthread_yield])
if test x"$have_pthread_yield" = "xyes" ; then
   AC_DEFINE_UNQUOTED([HAVE_PTHREAD_YIELD],[1],
		[if set, pthread_yield is declared in pthread.h])
fi
AM_CONDITIONAL([BUILD_TEST_PTH_YIELD],
	[test x"$have_pthread_yield" = "xyes" ])


#
# for C program tests that follow, we treat warnings as error,
# as some tests work by checking if the compiler issues a
# warning
#

AC_LANG_WERROR

#
# check if sysv_abi attribute is available
#

AC_MSG_CHECKING([sysv_abi attribute])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ __attribute__((sysv_abi)) void fun() { } ]])], 
                  [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_ATTR_SYSV_ABI], [1], [if set, sysv_abi attribute is available])],
		  [AC_MSG_RESULT([no]);  AC_DEFINE([HAVE_ATTR_SYSV_ABI], [0], [if set, sysv_abi attribute is available])])

#
# check if what kind of symbols are defined for functions in 
# shared libraries. from foo, foo? _foo? foo@PLT? _foo@PLT? 
#

AC_MSG_CHECKING([global symbol modifier])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[ void fun() { asm volatile("call _malloc@PLT"); } ]],
[[ fun(); ]])],
[with_underscore_with_PLT=yes],
[with_underscore_with_PLT=no])

AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[ void fun() { asm volatile("call malloc@PLT"); } ]],
[[ fun(); ]])],
[no_underscore_with_PLT=yes],
[no_underscore_with_PLT=no])

AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[ void fun() { asm volatile("call _malloc"); } ]],
[[ fun(); ]])],
[with_underscore_no_PLT=yes],
[with_underscore_no_PLT=no])

AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[ void fun() { asm volatile("call malloc"); } ]],
[[ fun(); ]])],
[no_underscore_no_PLT=yes],
[no_underscore_no_PLT=yes])

if test "x$with_underscore_with_PLT" = "xyes" ; then
   AC_MSG_RESULT([with underscore, with PLT])
   AC_DEFINE([GLOBAL_SYM_MODIFIER], [GLOBAL_SYM_MODIFIER_WITH_UNDERSCORE_WITH_PLT], [global symbol modifier (_foo@PLT)])
elif test "x$no_underscore_with_PLT" = "xyes" ; then
   AC_MSG_RESULT([no underscore, with PLT])
   AC_DEFINE([GLOBAL_SYM_MODIFIER], [GLOBAL_SYM_MODIFIER_NO_UNDERSCORE_WITH_PLT], [global symbol modifier (foo@PLT)])
elif test "x$with_underscore_no_PLT" = "xyes" ; then
   AC_MSG_RESULT([with underscore, no PLT])
   AC_DEFINE([GLOBAL_SYM_MODIFIER], [GLOBAL_SYM_MODIFIER_WITH_UNDERSCORE_NO_PLT], [global symbol modifier (_foo)])
elif test "x$no_underscore_no_PLT" = "xyes"  ; then
   AC_MSG_RESULT([no underscore, no PLT])
   AC_DEFINE([GLOBAL_SYM_MODIFIER], [GLOBAL_SYM_MODIFIER_NO_UNDERSCORE_NO_PLT], [global symbol modifier (foo)])
else
   AC_MSG_ERROR([could not get how to call functions in a shared library from assembly])
fi

#
# conditionally build test programs
# we compile C++ test programs only when
# C++ compiler is available.
# we compile C++ test programs relying on C++ lambdas
# only when C++ compiler supports them
#
AC_PROG_CXX
AC_LANG_PUSH([C++])
AC_LANG([C++])
AC_MSG_CHECKING([C++ lambda expression support])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ [=] { }(); ]])], 
                  [AC_MSG_RESULT([yes]); cxx_lambda_available=yes],
		  [AC_MSG_RESULT([no]); cxx_lambda_available=no])
AM_CONDITIONAL([CXX_AVAILABLE], [test "x$ac_cv_prog_cxx_g" = "xyes"])
AM_CONDITIONAL([CXX_LAMBDA_AVAILABLE], [test "x$cxx_lambda_available" = "xyes"])
AC_LANG_POP([C++])

AC_CHECK_HEADERS([sqlite3.h], [AC_SUBST(LIBSQLITE3, [-lsqlite3])])

# initialize libtool
LT_INIT

AM_CONDITIONAL([BUILD_MYTH_DL],
	[test x"$enable_myth_dl" = "xyes" && \
	 test x"$have_rtld_next" = "xyes" && \
	 test x"$enable_shared" = "xyes"])

AC_CONFIG_FILES([
	Makefile 
	include/Makefile
	src/Makefile
	src/profiler/Makefile
	src/profiler/dag2any/Makefile
	src/profiler/drview/Makefile
	tests/Makefile 
])

AC_CONFIG_HEADERS([src/config.h])
AC_OUTPUT