source: git/omalloc/configure.ac @ ea0001

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