source: git/omalloc/configure.ac @ c5a262a

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