how to test HAVE_MALLOC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux