source: git/omalloc/configure.ac @ adb2ed

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