source: git/omalloc/configure.ac @ c3c704

spielwiese
Last change on this file since c3c704 was 0c26a1, checked in by Hans Schoenemann <hannes@…>, 3 years ago
Revert "update configure stuff": requires autoconf 2.7.1 This reverts commit 69185ceb2807ebeacfe2824621e4b70e2ed19642.
  • 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])
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
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_HEADER_STDC
158AC_CHECK_HEADERS(limits.h,,
159  AC_MSG_ERROR(Can not compile without limits.h))
160
161AC_CHECK_HEADERS(unistd.h sys/mman.h fcntl.h malloc.h malloc/malloc.h)
162
163AC_CHECK_FUNCS(popen mmap sbrk random malloc_usable_size malloc_size)
164
165dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
166dnl Find out more about particularity of the system
167dnl
168
169# sizes
170AC_CHECK_SIZEOF(long,4)
171AC_CHECK_SIZEOF(void*,4)
172AC_CHECK_SIZEOF(double, 8)
173AC_CHECK_SIZEOF(size_t, 4)
174
175if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
176  AC_MSG_ERROR(need equal sizes for long and void*)
177fi
178if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
179  AC_MSG_ERROR(need void* to be 4 or 8 bytes long)
180fi
181if test "$ac_cv_sizeof_double" != 4 && test "$ac_cv_sizeof_double" != 8; then
182  AC_MSG_ERROR(need double to be 4 or 8 bytes long)
183fi
184
185dnl Set compiler, linker flags so that we can work with omalloc
186BACKUP_CFLAGS=$CFLAGS
187BACKUP_CXXFLAGS=$CXXFLAGS
188BACKUP_LDFLAGS=$LDFLAGS
189
190CFLAGS="$CFLAGS -I$srcdir"
191CXXFLAGS="$CXXFLAGS -I$srcdir"
192
193dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
194dnl figure out page size of the system
195dnl
196AC_MSG_CHECKING(size of system page)
197AC_CACHE_VAL(ac_cv_pagesize,
198ac_cv_pagesize=`getconf PAGESIZE`)
199# can not really handle pagesizes which are greater -- there must be a
200# bug somewhere
201if test $ac_cv_pagesize -gt 8192; then
202  ac_cv_pagesize=8192
203fi
204AC_MSG_RESULT($ac_cv_pagesize)
205if test "$ac_cv_pagesize" = 4096 || test "$ac_cv_pagesize" = 8192; then
206  AC_DEFINE_UNQUOTED(SIZEOF_SYSTEM_PAGE, $ac_cv_pagesize, "Page-size of the build-system")
207else
208AC_MSG_ERROR([need sytem page to be of size 4096 or 8192, but is $ac_cv_pagesize])
209fi
210
211AC_DEFINE_UNQUOTED(SIZEOF_OM_PAGE,SIZEOF_SYSTEM_PAGE,Page-size of the build-system)
212
213dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
214dnl check whether mmap actually works
215dnl
216if test "$ac_cv_func_mmap" = yes; then
217AC_MSG_CHECKING(whether mmap works)
218AC_CACHE_VAL(ac_cv_working_mmap,
219AC_TRY_RUN([
220#include <stdlib.h>
221#include "omMmap.c"
222int main()
223{
224  void* addr = omVallocMmap(128*${ac_cv_pagesize});
225  if (addr == 0 || ((unsigned long) addr % ${ac_cv_pagesize}))
226    exit(1);
227  exit(omVfreeMmap(addr, 128*${ac_cv_pagesize}));
228}], ac_cv_working_mmap=yes, ac_cv_working_mmap=no, ac_cv_working_mmap=no))
229AC_MSG_RESULT($ac_cv_working_mmap)
230if test "$ac_cv_working_mmap" = yes; then
231  AC_DEFINE(HAVE_WORKING_MMAP,1,"Whether we have a working mmap")
232fi
233fi
234
235dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
236dnl for strict alignment
237dnl
238AC_CACHE_CHECK(whether alignment needs to be strict, ac_cv_align_need_strict,
239AC_TRY_RUN([
240#include <stdlib.h>
241int main()
242{
243  void* ptr = (void*) malloc(12);
244  volatile double* d_ptr;
245  if ((unsigned long) ptr % 8 == 0) ptr = ptr + 4;
246  d_ptr = (double*) ptr;
247  *d_ptr = (double) 1.25;
248  if (*d_ptr != (double) 1.25) exit(1);
249  else exit(0);
250}
251], ac_cv_align_need_strict=no, ac_cv_align_need_strict=yes, ac_cv_align_need_strict=yes))
252
253dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
254dnl external config files
255dnl
256AC_MSG_CHECKING(for external config files)
257if test "${with_external_config_h+set}" = set; then
258    AC_DEFINE(OM_HAVE_EXTERNAL_CONFIG_H,1,"Whether we have external config.h")
259    EXTERNAL_CONFIG_HEADER=${with_external_config_h}
260    rm -f omExternalConfig.h
261    cp ${with_external_config_h} omExternalConfig.h
262fi
263if test "${with_external_config_c+set}" = set; then
264    AC_DEFINE(OM_HAVE_EXTERNAL_CONFIG_C,1,"Wether we have an external config.c")
265    EXTERNAL_CONFIG_SOURCE=${with_external_config_c}
266fi
267AC_SUBST(EXTERNAL_CONFIG_HEADER)
268AC_SUBST(EXTERNAL_CONFIG_SOURCE)
269if test "${EXTERNAL_CONFIG_HEADER+set}" = set || test "${EXTERNAL_CONFIG_SOURCE+set}" = set; then
270AC_MSG_RESULT(${EXTERNAL_CONFIG_HEADER} ${EXTERNAL_CONFIG_SOURCE})
271else
272AC_MSG_RESULT(none)
273fi
274
275dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
276dnl for malloc
277dnl
278AC_MSG_CHECKING(which malloc to use)
279if test "${with_malloc}" = system; then
280  OM_MALLOC_HEADER=omMallocSystem.h
281  AC_DEFINE(OMALLOC_USES_MALLOC,1,the system allocator is called malloc)
282  AC_DEFINE(OMALLOC_USES_SYSTEM_MALLOC,1,use system malloc as system allocator)
283elif test "${with_malloc}" = external; then
284  if test "${with_external_malloc_h+set}" != set; then
285    AC_MSG_ERROR(need --with_external_malloc_h for external malloc)
286  fi
287  AC_DEFINE(OMALLOC_USES_EXTERNAL_MALLOC,1,use external malloc as system allocator)
288  OM_MALLOC_HEADER=$with_external_malloc_h
289  OM_MALLOC_SOURCE=$with_external_malloc_c
290  AC_DEFINE(OMALLOC_USES_MALLOC,1,the system allocator is called malloc)
291else    ## default
292  OM_MALLOC_HEADER=omMallocSystem.h
293  AC_DEFINE(OMALLOC_USES_MALLOC,1,the system allocator is called malloc)
294  AC_DEFINE(OMALLOC_USES_SYSTEM_MALLOC,1,use system malloc as system allocator)
295fi
296AC_MSG_RESULT($with_malloc)
297
298AC_SUBST(OM_MALLOC_HEADER)
299AC_SUBST(OM_MALLOC_SOURCE)
300if test "${OM_MALLOC_SOURCE+set}" = set; then
301  AC_DEFINE(OM_HAVE_MALLOC_SOURCE,1,"Whether we have the source for malloc ()")
302fi
303
304dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
305dnl check whether valloc is provided and that it works
306dnl
307AC_MSG_CHECKING(whether working valloc exists)
308if test "${ac_cv_working_valloc}" = no; then
309  AC_MSG_RESULT( (cached) no)
310elif test "${ac_cv_working_valloc}" = "${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}"; then
311  AC_MSG_RESULT( (cached) yes)
312else
313AC_TRY_RUN([
314#include <stdlib.h>
315#include "$OM_MALLOC_HEADER"
316#ifdef OM_HAVE_MALLOC_SOURCE
317#include "$OM_MALLOC_SOURCE"
318#endif
319
320int main()
321{
322  void* addr = OM_MALLOC_VALLOC(128*${ac_cv_pagesize});
323  if (addr == 0 || ((unsigned long) addr % ${ac_cv_pagesize}))
324    exit(1);
325  OM_MALLOC_VFREE(addr, 128*${ac_cv_pagesize});
326  exit(0);
327}
328], ac_cv_working_valloc="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}", ac_cv_working_valloc=no, ac_cv_working_valloc=no)
329if test "${ac_cv_working_valloc}" = no; then
330AC_MSG_RESULT(no)
331else
332AC_MSG_RESULT(yes)
333fi
334fi
335
336dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
337dnl for valloc
338dnl
339AC_MSG_CHECKING(which valloc to use)
340if test "${with_valloc+set}" != set || test "${with_valloc}" = mmap; then
341  if test "${ac_cv_working_mmap}" = yes; then
342    with_valloc=mmap
343    AC_DEFINE(OM_HAVE_VALLOC_MMAP,1,"Have valloc")
344  else
345    with_valloc=malloc
346  fi
347fi
348if test "${with_valloc}" = malloc; then
349  if test "${ac_cv_working_valloc}" != no; then
350    AC_DEFINE(OM_HAVE_VALLOC_MALLOC,1,"Have valloc")
351  else
352    with_valloc=emulate
353  fi
354fi
355AC_MSG_RESULT($with_valloc)
356
357dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
358dnl alignment
359dnl
360AC_MSG_CHECKING(how to align)
361if test "$with_align" = 8 || test "$ac_cv_sizeof_long" = 8; then
362  ac_cv_align=8
363  AC_DEFINE(OM_ALIGN_8,1,"Align to 8 bytes")
364else
365if test "$ac_cv_align_need_strict" = "yes" || test "$with_align" = "strict"; then
366  AC_DEFINE(OM_ALIGNMENT_NEEDS_WORK,1,"Whether alignment needs work")
367  ac_cv_align="strict"
368else
369  ac_cv_align="sloppy"
370fi
371fi
372AC_MSG_RESULT($ac_cv_align)
373
374dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
375dnl dense bins
376dnl
377AC_MSG_CHECKING(whether to use dense bins)
378if test "$with_dense_bins" = yes; then
379AC_MSG_RESULT(yes)
380AC_DEFINE(OM_HAVE_DENSE_BIN_DISTRIBUTION,1,"Whether we have dense bins")
381else
382AC_MSG_RESULT(no)
383fi
384
385dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
386dnl debug and inline
387dnl
388save_cflags="$CFLAGS"
389AC_MSG_CHECKING(whether to disable debugging)
390if test "$enable_debug" = yes; then
391AC_MSG_RESULT(no)
392CFLAGS="$CFLAGS -g"
393else
394AC_MSG_RESULT(yes)
395AC_DEFINE(OM_NDEBUG,1,"Disable debug")
396with_track=no
397fi
398AM_CONDITIONAL([WANT_DEBUG],[test x"$with_debug" = xyes])
399
400AC_MSG_CHECKING(whether to have tracking debug functionality)
401if test "$with_track" != no; then
402AC_MSG_RESULT(yes)
403AC_DEFINE(OM_HAVE_TRACK,1,"Have track")
404else
405AC_MSG_RESULT(no)
406fi
407
408AC_MSG_CHECKING(whether to use internal debug)
409if test "$with_internal_debug" = yes; then
410AC_MSG_RESULT(yes)
411AC_DEFINE(OM_INTERNAL_DEBUG,1,"Internal debug")
412with_inline=no
413else
414AC_MSG_RESULT(no)
415fi
416
417AC_MSG_CHECKING(whether to inline)
418if test "$ac_cv_c_inline" != no && test "$with_inline" != no; then
419  AC_DEFINE_UNQUOTED(OM_INLINE, static $ac_cv_c_inline, "inline-declaration")
420  AC_DEFINE_UNQUOTED(OM_INLINE_DECL, static $ac_cv_c_inline, "inline-declaration")
421  AC_DEFINE_UNQUOTED(OM_INLINE_IMPL, static $ac_cv_c_inline, "inline-declaration")
422  AC_DEFINE_UNQUOTED(OM_INLINE_LOCAL, static $ac_cv_c_inline, "inline-declaration")
423  AC_MSG_RESULT(yes)
424else
425  AC_DEFINE_UNQUOTED(OM_INLINE_DECL, extern, "inline-declaration")
426  AC_DEFINE_UNQUOTED(OM_INLINE_IMPL,, "inline-declaration")
427  AC_DEFINE_UNQUOTED(OM_INLINE_LOCAL, static, "inline-declaration")
428  AC_MSG_RESULT(no)
429fi
430
431dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
432dnl backtrace business
433dnl
434if test "x$with_track" != xno; then
435AC_MSG_CHECKING(whether GET_RET_ADDR works)
436AC_CACHE_VAL(ac_cv_get_return_addr_works,
437AC_TRY_RUN([
438#include <stdlib.h>
439#define OM_GET_RETURN_ADDR_WORKS 1
440#include "omReturn.h"
441int test_return_addr()
442{
443  char* f;
444  GET_RET_ADDR(f);
445  return (int)(long) f;
446}
447int main()
448{
449   exit(! test_return_addr());
450}
451], ac_cv_get_return_addr_works=yes,
452   ac_cv_get_return_addr_works=no,
453   ac_cv_get_return_addr_works=no))
454AC_MSG_RESULT($ac_cv_get_return_addr_works)
455if test "$ac_cv_get_return_addr_works" = yes; then
456AC_DEFINE(OM_GET_RETURN_ADDR_WORKS,1, "Whether get return address works")
457fi
458
459AC_MSG_CHECKING(whether omGetBackTrace works)
460AC_CACHE_VAL(ac_cv_get_backtrace_works,
461AC_TRY_RUN([
462#include <stdio.h>
463#include <stdlib.h>
464#include "omGetBackTrace.c"
465int test_backtrace0()
466{
467  void* bt @<:@ 10 @:>@ ;
468  int i = omGetBackTrace(bt, 0, 10);
469  return i;
470}
471int test_backtrace(){ return test_backtrace0(); }
472int main()
473{
474   int i;
475   #ifdef __APPLE__
476   /* omGetBackTrace crashes on OsX for i>2 */
477   i=0;
478   #else
479   omInitGetBackTrace();
480   i = test_backtrace();
481   #endif
482   if (i > 0) exit(0);
483   else exit(i+10);
484}
485], ac_cv_get_backtrace_works=yes,
486   ac_cv_get_backtrace_works=no,
487   ac_cv_get_backtrace_works=no))
488AC_MSG_RESULT($ac_cv_get_backtrace_works)
489if test "$ac_cv_get_backtrace_works" = yes; then
490AC_DEFINE(OM_GET_BACKTRACE_WORKS,1,"Whether omInitGetBackTrace () works")
491fi
492else
493   AC_MSG_CHECKING(whether GET_RET_ADDR works)
494   ac_cv_get_return_addr_works=no
495   AC_MSG_RESULT($ac_cv_get_return_addr_works)
496   AC_MSG_CHECKING(whether omGetBackTrace works)
497   ac_cv_get_backtrace_works=no
498   AC_MSG_RESULT($ac_cv_get_backtrace_works)
499fi
500
501AC_MSG_CHECKING(whether addr2line works)
502AC_CACHE_VAL(ac_cv_prog_addr2line_works,
503AC_TRY_RUN([
504#include <stdlib.h>
505#define OM_GET_RETURN_ADDR_WORKS 1
506#include "omReturn.h"
507#include "omStructs.h"
508/* #include "omGetBackTrace.h" */
509#include "omGetBackTrace.c"
510#include "omRet2Info.c"
511
512int test_Ret_2_Info()
513{
514  void* bt;
515  int i;
516  struct omRetInfo_s info;
517
518  GET_RET_ADDR(bt);
519  i = omBackTrace_2_RetInfo(&bt, &info, 1);
520  return i;
521}
522
523int main(int argc, char** argv)
524{
525  int i;
526  omInitRet_2_Info(*argv);
527  i = test_Ret_2_Info();
528  if (i==1) exit(0);
529  else exit (i+10);
530}
531], ac_cv_prog_addr2line_works=yes,
532   ac_cv_prog_addr2line_works=no,
533   ac_cv_prog_addr2line_works=no))
534AC_MSG_RESULT($ac_cv_prog_addr2line_works)
535
536CFLAGS="$save_cflags"
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
600dnl Restore user-specified CFLAGS, CXXFLAGS, LIBS
601
602CFLAGS=$BACKUP_CFLAGS
603CXXFLAGS=$BACKUP_CXXFLAGS
604LDFLAGS=$BACKUP_LDFLAGS
605
606dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
607dnl wrap it up
608dnl
609AC_CONFIG_FILES([Makefile omalloc.pc])
610AC_OUTPUT
611
Note: See TracBrowser for help on using the repository browser.