source: git/omalloc/configure.ac @ e62a1d

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