source: git/omalloc/configure.ac @ 280286e

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