source: git/omalloc/configure.ac @ 2b43ac

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