source: git/omalloc/configure.ac @ c0bd77

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