source: git/omalloc/configure.ac @ 58d429

spielwiese
Last change on this file since 58d429 was 58d429, checked in by Hans Schoenemann <hannes@…>, 10 years ago
fix: tr. #484 (test alignment) from master
  • Property mode set to 100644
File size: 17.1 KB
Line 
1dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
2dnl File: configure.ac
3dnl Purpose: Process this file with autoconf to produce configure
4dnl Author:  obachman@mathematik.uni-kl.de (Olaf Bachmann)
5dnl Created: 11/99
6dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
7
8AC_INIT([omalloc],[0.9.6])
9AC_CONFIG_SRCDIR(om_Alloc.c)
10AC_CONFIG_MACRO_DIR([../m4])
11
12AC_CONFIG_AUX_DIR([.])
13
14AC_CONFIG_HEADER(omConfig.h)
15
16AM_MAINTAINER_MODE
17AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) # -Wno-extra-portability -Werror silent-rules
18m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
19m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
20
21
22# Add pre'prefixed config
23AX_PREFIX_CONFIG_H([omConfig.h],[],[omConfig.h])
24
25AC_SUBST(VERSION)
26
27dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
28dnl help for configure
29dnl
30AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [build the debugging version of the libraries]),
31 [if test "x$enableval"  = "xyes"; then
32   ENABLE_DEBUG=yes
33 fi], ENABLE_DEBUG=no)
34
35AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes)
36
37AC_ARG_WITH(
38  external-config_h,
39  [ --with-external-config_h=HEADER_FILE
40                    use HEADER_FILE for external configuration])
41AC_ARG_WITH(
42  external-config_c,
43  [ --with-external-config_c=C_FILE
44                    use C_FILE for external implementations])
45AC_ARG_WITH(
46  malloc,
47  [ --with-malloc=system|external
48                    which malloc to use, default: malloc ])
49AC_ARG_WITH(
50  external-malloc_h,
51  [ --with-external-malloc-h=HEADER_FILE
52                    use HEADER_FILE for external malloc declaration])
53AC_ARG_WITH(
54  external-malloc_c,
55  [ --with-external-malloc-c=C_FILE
56                    use C_FILE for external malloc implementation])
57AC_ARG_WITH(
58  valloc,
59  [ --with-valloc=mmap|system|emulate
60                    how to get page-aligned memory, default: use first possible])
61AC_ARG_WITH(
62  align,
63  [ --with-align=8|sloppy|strict
64                    how memory is aligned,
65                    default: if possible sloppy, else strict])
66AC_ARG_WITH(
67  dense-bins,
68  [ --with-dense-bins  use dense bin distribution])
69AC_ARG_WITH(
70  inline,
71  [ --without-inline   do not inline])
72AC_ARG_WITH(
73  debug,
74  [ --without-debug    disable all debugging facilities])
75AC_ARG_WITH(
76  track,
77  [ --without-track    disable debug tracking functionality])
78AC_ARG_WITH(
79  track-fl,
80  [ --with-track-fl    track file and line numbers])
81AC_ARG_WITH(
82  track-return,
83  [ --with-track-return track return addresses])
84AC_ARG_WITH(
85  track-backtrace,
86  [ --with-track-backtrace track stack backtraces])
87AC_ARG_WITH(
88  track-custom,
89  [ --with-track-custom track custom values])
90AC_ARG_WITH(
91  internal_debug,
92  [ --with-internal-debug
93                       turn on internal debugging])
94dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
95dnl compiler/make  config
96dnl
97dnl I'm not sure why I did this
98dnl if test "${CFLAGS+set}" != set; then
99dnl  CFLAGS="-O"
100dnl  ac_cflags_set=no
101dnl fi
102
103CPPFLAGS="-I.. -I."
104AC_PROG_MAKE_SET
105AC_PROG_CC
106AC_PROG_CPP
107
108AC_PROG_LN_S
109AC_PROG_INSTALL
110AM_PROG_CC_C_O
111# AM_PROG_AR
112AC_C_CONST
113AC_C_INLINE
114
115LT_INIT
116
117
118dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
119dnl check for programs
120dnl
121AC_CHECK_PROG(AR, ar, ar, :)
122if test "$ac_cv_prog_AR" != ar; then
123  AC_MSG_ERROR(*** ar program not found)
124fi
125AC_CHECK_PROGS(PERL, perl, "no")
126if test "$ac_cv_prog_PERL" = no; then
127  AC_MSG_ERROR(*** perl program not found)
128fi
129
130AC_CHECK_PROG(ADDR2LINE, addr2line, addr2line, no)
131if test "$ac_cv_prog_ADDR2LINE" = addr2line; then
132  AC_DEFINE_UNQUOTED(OM_PROG_ADDR2LINE, "$ac_cv_prog_ADDR2LINE", "Name of addr2line")
133fi
134
135dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
136dnl header file checks
137dnl
138AC_HEADER_STDC
139AC_CHECK_HEADERS(limits.h,,
140  AC_MSG_ERROR(Can not compile without limits.h))
141
142AC_CHECK_HEADERS(unistd.h sys/mman.h fcntl.h /usr/include/malloc.h)
143
144AC_CHECK_FUNCS(popen mmap sbrk random)
145
146dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
147dnl Find out more about particularity of the system
148dnl
149
150# sizes
151AC_CHECK_SIZEOF(long,4)
152AC_CHECK_SIZEOF(void*,4)
153AC_CHECK_SIZEOF(double, 8)
154AC_CHECK_SIZEOF(size_t, 4)
155
156if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
157  AC_MSG_ERROR(need equal sizes for long and void*)
158fi
159if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
160  AC_MSG_ERROR(need void* to be 4 or 8 bytes long)
161fi
162if test "$ac_cv_sizeof_double" != 4 && test "$ac_cv_sizeof_double" != 8; then
163  AC_MSG_ERROR(need double to be 4 or 8 bytes long)
164fi
165
166dnl Set compiler, linker flags so that we can work with omalloc
167BACKUP_CFLAGS=$CFLAGS
168BACKUP_CXXFLAGS=$CXXFLAGS
169BACKUP_LDFLAGS=$LDFLAGS
170CFLAGS="$CFLAGS -I$srcdir"
171CXXFLAGS="$CXXFLAGS -I$srcdir"
172
173dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
174dnl figure out page size of the system
175dnl
176AC_MSG_CHECKING(size of system page)
177AC_CACHE_VAL(ac_cv_pagesize,
178AC_TRY_RUN([#include <stdio.h>
179#include <stdlib.h>
180#include "omGetPageSize.h"
181
182main()
183{
184  FILE *f=fopen("conftestval", "w");
185  if (!f) exit(1);
186  fprintf(f, "%d\n", omalloc_getpagesize);
187  exit(0);
188}], ac_cv_pagesize=`cat conftestval`, ac_cv_pagesize=0, ac_cv_pagesize=0))
189# can not really handle pagesizes which are greater -- there must be a
190# bug somewhere
191if test $ac_cv_pagesize -gt 8192; then
192  ac_cv_pagesize=8192
193fi
194AC_MSG_RESULT($ac_cv_pagesize)
195if test "$ac_cv_pagesize" = 4096 || test "$ac_cv_pagesize" = 8192; then
196  AC_DEFINE_UNQUOTED(SIZEOF_SYSTEM_PAGE, $ac_cv_pagesize, "Page-size of the build-system")
197else
198AC_MSG_ERROR([need sytem page to be of size 4096 or 8192, but is $ac_cv_pagesize])
199fi
200
201AC_DEFINE_UNQUOTED(SIZEOF_OM_PAGE,SIZEOF_SYSTEM_PAGE,Page-size of the build-system)
202
203dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
204dnl check whether mmap actually works
205dnl
206if test "$ac_cv_func_mmap" = yes; then
207AC_MSG_CHECKING(whether mmap works)
208AC_CACHE_VAL(ac_cv_working_mmap,
209AC_TRY_RUN([
210#include <stdlib.h>
211#include "omMmap.c"
212main()
213{
214  void* addr = omVallocMmap(128*${ac_cv_pagesize});
215  if (addr == 0 || ((unsigned long) addr % ${ac_cv_pagesize}))
216    exit(1);
217  exit(omVfreeMmap(addr, 128*${ac_cv_pagesize}));
218}], ac_cv_working_mmap=yes, ac_cv_working_mmap=no, ac_cv_working_mmap=no))
219AC_MSG_RESULT($ac_cv_working_mmap)
220if test "$ac_cv_working_mmap" = yes; then
221  AC_DEFINE(HAVE_WORKING_MMAP,1,"Whether we have a working mmap")
222fi
223fi
224
225dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
226dnl for strict alignment
227dnl
228AC_CACHE_CHECK(whether alignment needs to be strict, ac_cv_align_need_strict,
229AC_TRY_RUN([
230#include <stdlib.h>
231main()
232{
233  void* ptr = (void*) malloc(12);
234  volatile double* d_ptr;
235  if ((unsigned long) ptr % 8 == 0) ptr = ptr + 4;
236  d_ptr = (double*) ptr;
237  *d_ptr = (double) 1.25;
238  if (*d_ptr != (double) 1.25) exit(1);
239  else exit(0);
240}
241], ac_cv_align_need_strict=no, ac_cv_align_need_strict=yes, ac_cv_align_need_strict=yes))
242
243dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
244dnl external config files
245dnl
246AC_MSG_CHECKING(for external config files)
247if test "${with_external_config_h+set}" = set; then
248    AC_DEFINE(OM_HAVE_EXTERNAL_CONFIG_H,1,"Whether we have external config.h")
249    EXTERNAL_CONFIG_HEADER=${with_external_config_h}
250    rm -f omExternalConfig.h
251    cp ${with_external_config_h} omExternalConfig.h
252fi
253if test "${with_external_config_c+set}" = set; then
254    AC_DEFINE(OM_HAVE_EXTERNAL_CONFIG_C,1,"Wether we have an external config.c")
255    EXTERNAL_CONFIG_SOURCE=${with_external_config_c}
256fi
257AC_SUBST(EXTERNAL_CONFIG_HEADER)
258AC_SUBST(EXTERNAL_CONFIG_SOURCE)
259if test "${EXTERNAL_CONFIG_HEADER+set}" = set || test "${EXTERNAL_CONFIG_SOURCE+set}" = set; then
260AC_MSG_RESULT(${EXTERNAL_CONFIG_HEADER} ${EXTERNAL_CONFIG_SOURCE})
261else
262AC_MSG_RESULT(none)
263fi
264
265dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
266dnl for malloc
267dnl
268AC_MSG_CHECKING(which malloc to use)
269if test "${with_malloc}" = system; then
270  OM_MALLOC_HEADER=omMallocSystem.h
271  AC_DEFINE(OMALLOC_USES_MALLOC,1,the system allocator is called malloc)
272  AC_DEFINE(OMALLOC_USES_SYSTEM_MALLOC,1,use system malloc as system allocator)
273elif test "${with_malloc}" = external; then
274  if test "${with_external_malloc_h+set}" != set; then
275    AC_MSG_ERROR(need --with_external_malloc_h for external malloc)
276  fi
277  AC_DEFINE(OMALLOC_USES_EXTERNAL_MALLOC,1,use external malloc as system allocator)
278  OM_MALLOC_HEADER=$with_external_malloc_h
279  OM_MALLOC_SOURCE=$with_external_malloc_c
280  AC_DEFINE(OMALLOC_USES_MALLOC,1,the system allocator is called malloc)
281else    ## default
282  OM_MALLOC_HEADER=omMallocSystem.h
283  AC_DEFINE(OMALLOC_USES_MALLOC,1,the system allocator is called malloc)
284  AC_DEFINE(OMALLOC_USES_SYSTEM_MALLOC,1,use system malloc as system allocator)
285fi
286AC_MSG_RESULT($with_malloc)
287
288AC_SUBST(OM_MALLOC_HEADER)
289AC_SUBST(OM_MALLOC_SOURCE)
290if test "${OM_MALLOC_SOURCE+set}" = set; then
291  AC_DEFINE(OM_HAVE_MALLOC_SOURCE,1,"Whether we have the source for malloc ()")
292fi
293
294AC_MSG_CHECKING(whether malloc provides SizeOfAddr)
295if test "${ac_cv_malloc_sizeof_addr}" = no; then
296  AC_MSG_RESULT( (cached) no)
297elif test "${ac_cv_malloc_sizeof_addr}" = "${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}"; then
298   AC_MSG_RESULT( (cached) yes)
299else
300AC_TRY_RUN([
301#include <stdlib.h>
302#include "$OM_MALLOC_HEADER"
303#ifdef OM_HAVE_MALLOC_SOURCE
304#include "$OM_MALLOC_SOURCE"
305#endif
306
307main()
308{
309  void* addr = OM_MALLOC_MALLOC(512);
310  if (OM_MALLOC_SIZEOF_ADDR(addr) < 512)
311    exit(1);
312  exit(0);
313}
314], ac_cv_malloc_sizeof_addr="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}", ac_cv_malloc_sizeof_addr=no, ac_cv_malloc_sizeof_addr=no)
315if test "${ac_cv_malloc_sizeof_addr}" = no; then
316AC_MSG_RESULT(no)
317else
318AC_MSG_RESULT(yes)
319fi
320fi
321if test "$ac_cv_malloc_sizeof_addr" != no; then
322AC_DEFINE(OM_MALLOC_PROVIDES_SIZEOF_ADDR,1,"Whether malloc provides SIZEOF_ADDR")
323fi
324
325dnl Restore user-specified CFLAGS, CXXFLAGS, LIBS
326
327CFLAGS=$BACKUP_CFLAGS
328CXXFLAGS=$BACKUP_CXXFLAGS
329LDFLAGS=$BACKUP_LDFLAGS
330
331dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
332dnl check whether valloc is provided and that it works
333dnl
334AC_MSG_CHECKING(whether working valloc exists)
335if test "${ac_cv_working_valloc}" = no; then
336  AC_MSG_RESULT( (cached) no)
337elif test "${ac_cv_working_valloc}" = "${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}"; then
338  AC_MSG_RESULT( (cached) yes)
339else
340AC_TRY_RUN([
341#include <stdlib.h>
342#include "$OM_MALLOC_HEADER"
343#ifdef OM_HAVE_MALLOC_SOURCE
344#include "$OM_MALLOC_SOURCE"
345#endif
346
347main()
348{
349  void* addr = OM_MALLOC_VALLOC(128*${ac_cv_pagesize});
350  if (addr == 0 || ((unsigned long) addr % ${ac_cv_pagesize}))
351    exit(1);
352  OM_MALLOC_VFREE(addr, 128*${ac_cv_pagesize});
353  exit(0);
354}
355], ac_cv_working_valloc="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}", ac_cv_working_valloc=no, ac_cv_working_valloc=no)
356if test "${ac_cv_working_valloc}" = no; then
357AC_MSG_RESULT(no)
358else
359AC_MSG_RESULT(yes)
360fi
361fi
362
363dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
364dnl for valloc
365dnl
366AC_MSG_CHECKING(which valloc to use)
367if test "${with_valloc+set}" != set || test "${with_valloc}" = mmap; then
368  if test "${ac_cv_working_mmap}" = yes; then
369    with_valloc=mmap
370    AC_DEFINE(OM_HAVE_VALLOC_MMAP,1,"Have valloc")
371  else
372    with_valloc=malloc
373  fi
374fi
375if test "${with_valloc}" = malloc; then
376  if test "${ac_cv_working_valloc}" != no; then
377    AC_DEFINE(OM_HAVE_VALLOC_MALLOC,1,"Have valloc")
378  else
379    with_valloc=emulate
380  fi
381fi
382AC_MSG_RESULT($with_valloc)
383
384dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
385dnl alignment
386dnl
387AC_MSG_CHECKING(how to align)
388if test "$with_align" = 8 || test "$ac_cv_sizeof_long" = 8; then
389  ac_cv_align=8
390  AC_DEFINE(OM_ALIGN_8,1,"Align to 8 bytes")
391else
392if test "$ac_cv_align_need_strict" = "yes" || test "$with_align" = "strict"; then
393  AC_DEFINE(OM_ALIGNMENT_NEEDS_WORK,1,"Whether alignment needs work")
394  ac_cv_align="strict"
395else
396  ac_cv_align="sloppy"
397fi
398fi
399AC_MSG_RESULT($ac_cv_align)
400
401dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
402dnl dense bins
403dnl
404AC_MSG_CHECKING(whether to use dense bins)
405if test "$with_dense_bins" = yes; then
406AC_MSG_RESULT(yes)
407AC_DEFINE(OM_HAVE_DENSE_BIN_DISTRIBUTION,1,"Whether we have dense bins")
408else
409AC_MSG_RESULT(no)
410fi
411
412dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
413dnl debug and inline
414dnl
415AC_MSG_CHECKING(whether to disable debugging)
416if test "$with_debug" != no; then
417AC_MSG_RESULT(no)
418else
419AC_MSG_RESULT(yes)
420AC_DEFINE(OM_NDEBUG,1,"Disable debug")
421with_track=no
422fi
423
424AC_MSG_CHECKING(whether to have tracking debug functionality)
425if test "$with_track" != no; then
426AC_MSG_RESULT(yes)
427AC_DEFINE(OM_HAVE_TRACK,1,"Have track")
428else
429AC_MSG_RESULT(no)
430fi
431
432AC_MSG_CHECKING(whether to use internal debug)
433if test "$with_internal_debug" = yes; then
434AC_MSG_RESULT(yes)
435AC_DEFINE(OM_INTERNAL_DEBUG,1,"Internal debug")
436with_inline=no
437else
438AC_MSG_RESULT(no)
439fi
440
441AC_MSG_CHECKING(whether to inline)
442if test "$ac_cv_c_inline" != no && test "$with_inline" != no; then
443  AC_DEFINE_UNQUOTED(OM_INLINE, static $ac_cv_c_inline, "inline-declaration")
444  AC_DEFINE_UNQUOTED(OM_INLINE_DECL, static $ac_cv_c_inline, "inline-declaration")
445  AC_DEFINE_UNQUOTED(OM_INLINE_IMPL, static $ac_cv_c_inline, "inline-declaration")
446  AC_DEFINE_UNQUOTED(OM_INLINE_LOCAL, static $ac_cv_c_inline, "inline-declaration")
447  AC_MSG_RESULT(yes)
448else
449  AC_DEFINE_UNQUOTED(OM_INLINE_DECL, extern, "inline-declaration")
450  AC_DEFINE_UNQUOTED(OM_INLINE_IMPL,, "inline-declaration")
451  AC_DEFINE_UNQUOTED(OM_INLINE_LOCAL, static, "inline-declaration")
452  AC_MSG_RESULT(no)
453fi
454
455dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
456dnl backtrace business
457dnl
458AC_MSG_CHECKING(whether GET_RET_ADDR works)
459AC_CACHE_VAL(ac_cv_get_return_addr_works,
460AC_TRY_RUN([
461#include <stdlib.h>
462#include "omReturn.h"
463int test_return_addr()
464{
465  char* f;
466  GET_RET_ADDR(f);
467  return (int)(long) f;
468}
469int main()
470{
471   exit(! test_return_addr());
472}
473], ac_cv_get_return_addr_works=yes,
474   ac_cv_get_return_addr_works=no,
475   ac_cv_get_return_addr_works=no))
476AC_MSG_RESULT($ac_cv_get_return_addr_works)
477if test "$ac_cv_get_return_addr_works" = yes; then
478AC_DEFINE(OM_GET_RETURN_ADDR_WORKS,1, "Whether get return address works")
479fi
480
481AC_MSG_CHECKING(whether omGetBackTrace works)
482AC_CACHE_VAL(ac_cv_get_backtrace_works,
483AC_TRY_RUN([
484#include <stdio.h>
485#include <stdlib.h>
486#include "omGetBackTrace.c"
487int test_backtrace()
488{
489  void* bt;
490  int i = omGetBackTrace(&bt, 0, 10);
491  return i;
492}
493int main()
494{
495   int i;
496   omInitGetBackTrace();
497   i = test_backtrace();
498   if (i > 0) exit(0);
499   else exit(i+10);
500}
501], ac_cv_get_backtrace_works=yes,
502   ac_cv_get_backtrace_works=no,
503   ac_cv_get_backtrace_works=no))
504AC_MSG_RESULT($ac_cv_get_backtrace_works)
505if test "$ac_cv_get_backtrace_works" = yes; then
506AC_DEFINE(OM_GET_BACKTRACE_WORKS,1,"Whether omInitGetBackTrace () works")
507fi
508
509AC_MSG_CHECKING(whether addr2line works)
510AC_CACHE_VAL(ac_cv_prog_addr2line_works,
511AC_TRY_RUN([
512#include <stdlib.h>
513#undef OM_GET_BACKTRACE_WORKS
514#include "omReturn.h"
515#include "omStructs.h"
516#include "omGetBackTrace.h"
517#include "omRet2Info.c"
518
519int test_Ret_2_Info()
520{
521  void* bt;
522  int i;
523  struct omRetInfo_s info;
524
525  GET_RET_ADDR(bt);
526  i = omBackTrace_2_RetInfo(&bt, &info, 1);
527  return i;
528}
529
530int main(int argc, char** argv)
531{
532  int i;
533  omInitRet_2_Info(*argv);
534  i = test_Ret_2_Info();
535  if (i==1) exit(0);
536  else exit (i+10);
537}
538], ac_cv_prog_addr2line_works=yes,
539   ac_cv_prog_addr2line_works=no,
540   ac_cv_prog_addr2line_works=no))
541AC_MSG_RESULT($ac_cv_prog_addr2line_works)
542
543AC_MSG_CHECKING(whether to track return addresses)
544if test "$with_track_return" = no || test "$ac_cv_get_return_addr_works" = no || test "$ac_cv_prog_addr2line_works" != yes; then
545  with_track_return=no
546else
547  AC_DEFINE(OM_TRACK_RETURN,1,"Whether to track return")
548  with_track_return=yes
549fi
550AC_MSG_RESULT($with_track_return)
551
552AC_MSG_CHECKING(whether to track files and line numbers)
553if test "$with_track_fl" = no && test "$with_track_return" = no; then
554  with_track_fl=yes
555fi
556if test "${with_track_fl+set}" != set; then
557  if test "$with_track_return" = yes; then
558    with_track_fl=no
559  else
560    with_track_fl=yes
561  fi
562fi
563AC_MSG_RESULT($with_track_fl)
564if test "$with_track_fl" = yes; then
565  AC_DEFINE(OM_TRACK_FILE_LINE,1,"Whether to track file-line")
566fi
567
568AC_MSG_CHECKING(whether to track stack backtraces)
569if test "$with_track" != no && test "$ac_cv_get_backtrace_works" = yes && test "$with_track_backtrace" != no && test "$ac_cv_prog_addr2line_works" = yes; then
570  with_track_backtrace=yes
571  AC_DEFINE(OM_TRACK_BACKTRACE,1,"Whether to track backtrace")
572else
573  with_track_backtrace=no
574fi
575AC_MSG_RESULT($with_track_backtrace)
576
577AC_MSG_CHECKING(whether to track custom values)
578if test "$with_track" != no && test "$with_track_custom" = yes; then
579  AC_DEFINE(OM_TRACK_CUSTOM,1,"Enable custom tracking")
580else
581  with_track_custom=no
582fi
583AC_MSG_RESULT($with_track_custom)
584
585dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
586dnl figure out the return type of sbrk
587dnl
588
589AC_MSG_CHECKING(return type of sbrk)
590AC_TRY_LINK(
591#define __USE_MISC
592#include <unistd.h>
593,
594void *sbrk();
595,
596AC_DEFINE(Void_t,void,"Type of void"),
597AC_DEFINE(Void_t,char,"Type of void"),
598)
599AC_MSG_RESULT(Void_t)
600
601
602AC_DEFINE(OM_PROVIDE_MALLOC,0,[Provide NO standard routines!])
603
604
605
606dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
607dnl wrap it up
608dnl
609AC_CONFIG_FILES([Makefile])
610AC_OUTPUT
611
Note: See TracBrowser for help on using the repository browser.