source: git/omalloc/configure.in @ 3b3b0e

fieker-DuValspielwiese
Last change on this file since 3b3b0e was e92dc4a, checked in by Hans Schoenemann <hannes@…>, 13 years ago
fix configure tests (needed for backtrace) git-svn-id: file:///usr/local/Singular/svn/trunk@14212 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 16.6 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(om_Alloc.c)
10
11VERSION=0.9.6
12AC_SUBST(VERSION)
13
14dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
15dnl help for configure
16dnl
17AC_ARG_WITH(
18  external-config_h,
19  [ --with-external-config_h=HEADER_FILE
20                    use HEADER_FILE for external configuration])
21AC_ARG_WITH(
22  external-config_c,
23  [ --with-external-config_c=C_FILE
24                    use C_FILE for external implementations])
25AC_ARG_WITH(
26  malloc,
27  [ --with-malloc=system|dlmalloc|gmalloc|pmalloc|external
28                    which malloc to use, default: malloc ])
29AC_ARG_WITH(
30  external-malloc_h,
31  [ --with-external-malloc-h=HEADER_FILE
32                    use HEADER_FILE for external malloc declaration])
33AC_ARG_WITH(
34  external-malloc_c,
35  [ --with-external-malloc-c=C_FILE
36                    use C_FILE for external malloc implementation])
37AC_ARG_WITH(
38  valloc,
39  [ --with-valloc=mmap|system|emulate
40                    how to get page-aligned memory, default: use first possible])
41AC_ARG_WITH(
42  provide-malloc,
43  [ --with-provide-malloc=yes|debug|malloc
44                    provide normal|debug|underlying malloc ANSI-C conforming
45                    versions of malloc|calloc|realloc|free])
46AC_ARG_WITH(
47  emulate-omalloc,
48  [ --with-emulate-omalloc
49                    provide only omallocs interface, but do not use its features])
50AC_ARG_WITH(
51  align,
52  [ --with-align=8|sloppy|strict
53                    how memory is aligned,
54                    default: if possible sloppy, else strict])
55AC_ARG_WITH(
56  dense-bins,
57  [ --with-dense-bins  use dense bin distribution])
58AC_ARG_WITH(
59  inline,
60  [ --without-inline   do not inline])
61AC_ARG_WITH(
62  debug,
63  [ --without-debug    disable all debugging facilities])
64AC_ARG_WITH(
65  track,
66  [ --without-track    disable debug tracking functionality])
67AC_ARG_WITH(
68  track-fl,
69  [ --with-track-fl    track file and line numbers])
70AC_ARG_WITH(
71  track-return,
72  [ --with-track-return track return addresses])
73AC_ARG_WITH(
74  track-backtrace,
75  [ --with-track-backtrace track stack backtraces])
76AC_ARG_WITH(
77  track-custom,
78  [ --with-track-custom track custom values])
79AC_ARG_WITH(
80  internal_debug,
81  [ --with-internal-debug
82                       turn on internal debugging])
83dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
84dnl compiler/make  config
85dnl
86dnl I'm not sure why I did this
87dnl if test "${CFLAGS+set}" != set; then
88dnl  CFLAGS="-O"
89dnl  ac_cflags_set=no
90dnl fi
91
92CPPFLAGS="-I.. -I."
93AC_PROG_MAKE_SET
94AC_PROG_CC
95AC_PROG_CPP
96AC_PROG_RANLIB
97AC_PROG_LN_S
98AC_PROG_INSTALL
99AC_C_CONST
100AC_C_INLINE
101
102dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
103dnl check for programs
104dnl
105AC_CHECK_PROG(AR, ar, ar, :)
106if test "$ac_cv_prog_AR" != ar; then
107  AC_MSG_ERROR(*** ar program not found)
108fi
109AC_CHECK_PROGS(PERL, perl, "no")
110if test "$ac_cv_prog_PERL" = no; then
111  AC_MSG_ERROR(*** perl program not found)
112fi
113
114AC_CHECK_PROG(ADDR2LINE, addr2line, addr2line, no)
115if test "$ac_cv_prog_ADDR2LINE" = addr2line; then
116  AC_DEFINE_UNQUOTED(OM_PROG_ADDR2LINE, "$ac_cv_prog_ADDR2LINE")
117fi
118
119dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
120dnl header file checks
121dnl
122AC_HEADER_STDC
123AC_CHECK_HEADERS(limits.h,,
124  AC_MSG_ERROR(Can not compile without limits.h))
125AC_CHECK_HEADERS(unistd.h sys/mman.h fcntl.h /usr/include/malloc.h)
126
127AC_CHECK_FUNCS(popen readlink getcwd getwd mmap sbrk random)
128
129dnl llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
130dnl Find out more about particularity of the system
131dnl
132
133# sizes
134AC_CHECK_SIZEOF(long,4)
135AC_CHECK_SIZEOF(void*,4)
136AC_CHECK_SIZEOF(double, 8)
137AC_CHECK_SIZEOF(size_t, 4)
138
139if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_voidp"; then
140  AC_MSG_ERROR(need equal sizes for long and void*)
141fi
142if test "$ac_cv_sizeof_voidp" != 4 && test "$ac_cv_sizeof_voidp" != 8; then
143  AC_MSG_ERROR(need void* to be 4 or 8 bytes long)
144fi
145if test "$ac_cv_sizeof_double" != 4 && test "$ac_cv_sizeof_double" != 8; then
146  AC_MSG_ERROR(need double to be 4 or 8 bytes long)
147fi
148
149dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
150dnl figure out page size of the system
151dnl
152AC_MSG_CHECKING(size of system page)
153AC_CACHE_VAL(ac_cv_pagesize,
154AC_TRY_RUN([#include <stdio.h>
155#include "omGetPageSize.h"
156
157main()
158{
159  FILE *f=fopen("conftestval", "w");
160  if (!f) exit(1);
161  fprintf(f, "%d\n", omalloc_getpagesize);
162  exit(0);
163}], ac_cv_pagesize=`cat conftestval`, ac_cv_pagesize=0, ac_cv_pagesize=0))
164# can not really handle pagesizes which are greater -- there must be a
165# bug somewhere
166if test $ac_cv_pagesize -gt 8192; then
167  ac_cv_pagesize=8192
168fi
169AC_MSG_RESULT($ac_cv_pagesize)
170if test "$ac_cv_pagesize" = 4096 || test "$ac_cv_pagesize" = 8192; then
171  AC_DEFINE_UNQUOTED(SIZEOF_SYSTEM_PAGE, $ac_cv_pagesize)
172else
173AC_MSG_ERROR(need sytem page to be of size 4096 or 8192, but is $ac_cv_pagesize)
174fi
175
176dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
177dnl check whether mmap actually works
178dnl
179if test "$ac_cv_func_mmap" = yes; then
180AC_MSG_CHECKING(whether mmap works)
181AC_CACHE_VAL(ac_cv_working_mmap,
182AC_TRY_RUN([
183#include "omMmap.c"
184main()
185{
186  void* addr = omVallocMmap(128*${ac_cv_pagesize});
187  if (addr == 0 || ((unsigned long) addr % ${ac_cv_pagesize}))
188    exit(1);
189  exit(omVfreeMmap(addr, 128*${ac_cv_pagesize}));
190}], ac_cv_working_mmap=yes, ac_cv_working_mmap=no, ac_cv_working_mmap=no))
191AC_MSG_RESULT($ac_cv_working_mmap)
192if test "$ac_cv_working_mmap" = yes; then
193  AC_DEFINE(HAVE_WORKING_MMAP)
194fi
195fi
196
197dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
198dnl for strict alignment
199dnl
200AC_CACHE_CHECK(whether alignment needs to be strict, ac_cv_align_need_strict,
201AC_TRY_RUN([
202main()
203{
204  void* ptr = (void*) malloc(12);
205  double* d_ptr;
206  if ((unsigned long) ptr % 8 == 0) ptr = ptr + 4;
207  d_ptr = (double*) ptr;
208  *d_ptr = (double) 1.1;
209  if (*d_ptr != (double) 1.1) exit(1);
210  else exit(0);
211}
212], ac_cv_align_need_strict=no, ac_cv_align_need_strict=yes, ac_cv_align_need_strict=yes))
213
214dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
215dnl external config files
216dnl
217AC_MSG_CHECKING(for external config files)
218if test "${with_external_config_h+set}" = set; then
219    AC_DEFINE(OM_HAVE_EXTERNAL_CONFIG_H)
220    EXTERNAL_CONFIG_HEADER=${with_external_config_h}
221    rm -f omExternalConfig.h
222    cp ${with_external_config_h} omExternalConfig.h
223fi
224if test "${with_external_config_c+set}" = set; then
225    AC_DEFINE(OM_HAVE_EXTERNAL_CONFIG_C)
226    EXTERNAL_CONFIG_SOURCE=${with_external_config_c}
227fi
228AC_SUBST(EXTERNAL_CONFIG_HEADER)
229AC_SUBST(EXTERNAL_CONFIG_SOURCE)
230if test "${EXTERNAL_CONFIG_HEADER+set}" = set || test "${EXTERNAL_CONFIG_SOURCE+set}" = set; then
231AC_MSG_RESULT(${EXTERNAL_CONFIG_HEADER} ${EXTERNAL_CONFIG_SOURCE})
232else
233AC_MSG_RESULT(none)
234fi
235
236dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
237dnl for malloc
238dnl
239AC_MSG_CHECKING(which malloc to use)
240if test "${with_malloc}" = system; then
241  OM_MALLOC_HEADER=omMallocSystem.h
242  AC_DEFINE(OMALLOC_USES_MALLOC)
243  if test "${with_provide_malloc}" = yes || test "${with_provide_malloc}" = debug; then
244    AC_MSG_ERROR("can not provide malloc for --with-malloc=system")
245  fi
246elif test "${with_malloc}" = gmalloc; then
247  OM_MALLOC_HEADER=gmalloc.h
248  OM_MALLOC_SOURCE=gmalloc.c
249elif test "${with_malloc}" = pmalloc; then
250  OM_MALLOC_HEADER=pmalloc.h
251  OM_MALLOC_SOURCE=pmalloc.c
252elif test "${with_malloc}" = external; then
253  if test "${with_external_malloc_h+set}" != set; then
254    AC_MSG_ERROR(need --with_external_malloc_h for external malloc)
255  fi
256  if test "${with_provide_malloc}" = yes || test "${with_provide_malloc}" = debug; then
257    AC_MSG_ERROR("can not provide malloc for --with_malloc=external")
258  fi
259  OM_MALLOC_HEADER=$with_external_malloc_h
260  OM_MALLOC_SOURCE=$with_external_malloc_c
261  AC_DEFINE(OMALLOC_USES_MALLOC)
262elif test "${with_malloc}" = dlmalloc; then
263  with_malloc=dlmalloc
264  OM_MALLOC_HEADER=dlmalloc.h
265  OM_MALLOC_SOURCE=dlmalloc.c
266else
267  OM_MALLOC_HEADER=omMallocSystem.h
268  AC_DEFINE(OMALLOC_USES_MALLOC)
269  if test "${with_provide_malloc}" = yes || test "${with_provide_malloc}" = debug; then
270    AC_MSG_ERROR("can not provide malloc for --with-malloc=system")
271  fi
272fi
273AC_MSG_RESULT($with_malloc)
274
275AC_SUBST(OM_MALLOC_HEADER)
276AC_SUBST(OM_MALLOC_SOURCE)
277if test "${OM_MALLOC_SOURCE+set}" = set; then
278  AC_DEFINE(OM_HAVE_MALLOC_SOURCE)
279fi
280
281AC_MSG_CHECKING(whether malloc provides SizeOfAddr)
282if test "${ac_cv_malloc_sizeof_addr}" = no; then
283  AC_MSG_RESULT( (cached) no)
284elif test "${ac_cv_malloc_sizeof_addr}" = "${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}"; then
285   AC_MSG_RESULT( (cached) yes)
286else
287AC_TRY_RUN([
288#include "$OM_MALLOC_HEADER"
289#ifdef OM_HAVE_MALLOC_SOURCE
290#include "$OM_MALLOC_SOURCE"
291#endif
292
293main()
294{
295  void* addr = OM_MALLOC_MALLOC(512);
296  if (OM_MALLOC_SIZEOF_ADDR(addr) < 512)
297    exit(1);
298  exit(0);
299}
300], ac_cv_malloc_sizeof_addr="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}", ac_cv_malloc_sizeof_addr=no, ac_cv_malloc_sizeof_addr=no)
301if test "${ac_cv_malloc_sizeof_addr}" = no; then
302AC_MSG_RESULT(no)
303else
304AC_MSG_RESULT(yes)
305fi
306fi
307if test "$ac_cv_malloc_sizeof_addr" != no; then
308AC_DEFINE(OM_MALLOC_PROVIDES_SIZEOF_ADDR)
309fi
310
311if test "${with_provide_malloc}" = malloc; then
312   AC_DEFINE(OM_PROVIDE_MALLOC, 3)
313elif test "${with_provide_malloc}" = debug; then
314   AC_DEFINE(OM_PROVIDE_MALLOC, 2)
315elif test "${with_provide_malloc}" = yes; then
316  AC_DEFINE(OM_PROVIDE_MALLOC, 1)
317else
318  AC_DEFINE(OM_PROVIDE_MALLOC, 0)
319fi
320
321dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
322dnl check whether valloc is provided and that it works
323dnl
324AC_MSG_CHECKING(whether working valloc exists)
325if test "${ac_cv_working_valloc}" = no; then
326  AC_MSG_RESULT( (cached) no)
327elif test "${ac_cv_working_valloc}" = "${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}"; then
328  AC_MSG_RESULT( (cached) yes)
329else
330AC_TRY_RUN([
331#include "$OM_MALLOC_HEADER"
332#ifdef OM_HAVE_MALLOC_SOURCE
333#include "$OM_MALLOC_SOURCE"
334#endif
335
336main()
337{
338  void* addr = OM_MALLOC_VALLOC(128*${ac_cv_pagesize});
339  if (addr == 0 || ((unsigned long) addr % ${ac_cv_pagesize}))
340    exit(1);
341  OM_MALLOC_VFREE(addr, 128*${ac_cv_pagesize});
342  exit(0);
343}
344], ac_cv_working_valloc="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}", ac_cv_working_valloc=no, ac_cv_working_valloc=no)
345if test "${ac_cv_working_valloc}" = no; then
346AC_MSG_RESULT(no)
347else
348AC_MSG_RESULT(yes)
349fi
350fi
351
352dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
353dnl for valloc
354dnl
355AC_MSG_CHECKING(which valloc to use)
356if test "${with_valloc+set}" != set || test "${with_valloc}" = mmap; then
357  if test "${ac_cv_working_mmap}" = yes; then
358    with_valloc=mmap
359    AC_DEFINE(OM_HAVE_VALLOC_MMAP)
360  else
361    with_valloc=malloc
362  fi
363fi
364if test "${with_valloc}" = malloc; then
365  if test "${ac_cv_working_valloc}" != no; then
366    AC_DEFINE(OM_HAVE_VALLOC_MALLOC)
367  else
368    with_valloc=emulate
369  fi
370fi
371AC_MSG_RESULT($with_valloc)
372
373dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
374dnl emulation
375dnl
376AC_MSG_CHECKING(whether to emulate omalloc)
377if test "${with_emulate_omalloc}" = yes; then
378  AC_DEFINE(OM_EMULATE_OMALLOC)
379  AC_MSG_RESULT(yes)
380else
381  AC_MSG_RESULT(no)
382fi
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)
391else
392if test "$ac_cv_align_need_strict" = "yes" || test "$with_align" = "strict"; then
393  AC_DEFINE(OM_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)
408else
409AC_MSG_RESULT(no)
410fi
411
412dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
413dnl debug and inline
414dnl
415AC_MSG_CHECKING(whether to disable debugging)
416if test "$with_debug" != no; then
417AC_MSG_RESULT(no)
418else
419AC_MSG_RESULT(yes)
420AC_DEFINE(OM_NDEBUG)
421with_track=no
422fi
423
424AC_MSG_CHECKING(whether to have tracking debug functionality)
425if test "$with_track" != no; then
426AC_MSG_RESULT(yes)
427AC_DEFINE(OM_HAVE_TRACK)
428else
429AC_MSG_RESULT(no)
430fi
431
432AC_MSG_CHECKING(whether to use internal debug)
433if test "$with_internal_debug" = yes; then
434AC_MSG_RESULT(yes)
435AC_DEFINE(OM_INTERNAL_DEBUG)
436with_inline=no
437else
438AC_MSG_RESULT(no)
439fi
440
441AC_MSG_CHECKING(whether to inline)
442if test "$ac_cv_c_inline" != no && test "$with_inline" != no; then
443  AC_DEFINE_UNQUOTED(OM_INLINE, static $ac_cv_c_inline)
444  AC_DEFINE_UNQUOTED(OM_INLINE_DECL, static $ac_cv_c_inline)
445  AC_DEFINE_UNQUOTED(OM_INLINE_IMPL, static $ac_cv_c_inline)
446  AC_DEFINE_UNQUOTED(OM_INLINE_LOCAL, static $ac_cv_c_inline)
447  AC_MSG_RESULT(yes)
448else
449  AC_DEFINE_UNQUOTED(OM_INLINE_DECL, extern)
450  AC_DEFINE_UNQUOTED(OM_INLINE_IMPL,)
451  AC_DEFINE_UNQUOTED(OM_INLINE_LOCAL, static)
452  AC_MSG_RESULT(no)
453fi
454
455dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
456dnl backtrace business
457dnl
458AC_MSG_CHECKING(whether GET_RET_ADDR works)
459AC_CACHE_VAL(ac_cv_get_return_addr_works,
460AC_TRY_RUN([
461#include "omReturn.h"
462int test_return_addr()
463{
464  char* f;
465  GET_RET_ADDR(f);
466  return (int) 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)
478fi
479
480AC_MSG_CHECKING(whether omGetBackTrace works)
481AC_CACHE_VAL(ac_cv_get_backtrace_works,
482AC_TRY_RUN([
483#include "omGetBackTrace.c"
484#include <stdio.h>
485int test_backtrace()
486{
487  void* bt;
488  int i = omGetBackTrace(&bt, 0, 10);
489  return i;
490}
491int main()
492{
493   int i;
494   omInitGetBackTrace();
495   i = test_backtrace();
496   if (i == 1) exit(0);
497   else exit(i+1);
498}
499], ac_cv_get_backtrace_works=yes,
500   ac_cv_get_backtrace_works=no,
501   ac_cv_get_backtrace_works=no))
502AC_MSG_RESULT($ac_cv_get_backtrace_works)
503if test "$ac_cv_get_backtrace_works" = yes; then
504AC_DEFINE(OM_GET_BACKTRACE_WORKS)
505fi
506
507AC_MSG_CHECKING(whether addr2line works)
508AC_CACHE_VAL(ac_cv_prog_addr2line_works,
509AC_TRY_RUN([
510#undef OM_GET_BACKTRACE_WORKS
511#include "omReturn.h"
512#include "omStructs.h"
513#include "omGetBackTrace.h"
514#include "omRet2Info.c"
515#include "omFindExec.c"
516
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)
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)
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)
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)
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),
596AC_DEFINE(Void_t,char),
597)
598AC_MSG_RESULT(Void_t)
599
600
601
602dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
603dnl wrap it up
604dnl
605AC_CONFIG_HEADER(omConfig.h omlimits.h omMalloc.h:${OM_MALLOC_HEADER})
606
607AC_OUTPUT(Makefile, \
608 if test "$CONFIG_HEADERS"; then echo timestamp > stamp-h; fi)
609
610
Note: See TracBrowser for help on using the repository browser.