source: git/omalloc/configure.ac @ 7afda2

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