[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to test HAVE_MALLOC
From: |
j . wuttke |
Subject: |
how to test HAVE_MALLOC |
Date: |
Fri, 5 Feb 2010 16:55:24 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.22 (X11/20090706) |
A user of my software package reported that compilation on
a virtual Linux machine running on his Mac failed because
'::malloc' was not declared.
We then found that AC_FUNC_MALLOC actually produced a 'no'
in the ./configure output.
This is not what I expected, and definitely not what I need.
If there is no malloc on a box, I do not want my users do
go into deeper complications; I just want ./configure to
abort with an error message.
If I understand correctly, I need to add a separate stance
to configure.ac that tests whether HAVE_MALLOC has been set
to 1, and otherwise calls AC_MSG_ERROR([Cannot find malloc.]).
Now my question: How to write this test?
My naive approach
if test $HAVE_MALLOC -ne 1; then
does not work.
Thanks in advance, Joachim
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
- how to test HAVE_MALLOC,
j . wuttke <=