We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1587

Summary: "aclocal" fails to generate a sufficient "aclocal.m4".
Product: SDL Reporter: Cecil Curry <leycec>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: critical    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Linux   
Attachments: Allow "aclocal" to find the "AC_CHECK_DEFINE" macro.

Description Cecil Curry 2012-08-27 16:55:12 UTC
Created attachment 941 [details]
Allow "aclocal" to find the "AC_CHECK_DEFINE" macro.

On running:

   rm aclocal.m4
   libtoolize --install --copy --force
   aclocal -I acinclude
   autoconf -I acinclude

The former three commands succeed, but "autoconf" fails with:

   configure.in:198: error: possibly undefined macro: AC_CHECK_DEFINE
         If this token and others are legitimate, please use m4_pattern_allow.
         See the Autoconf documentation.

"aclocal" fails to find AC_CHECK_DEFINE and hence add such macro to "aclocal.m4". Here is why:

* "acinclude/ac_check_define.m4" defines AC_CHECK_DEFINE via define() rather than AC_DEFUN().
* "aclocal" fails to find macros defined via define().

Please find the attached trivial patch. Thanks for all the tireless work in the run-up to SDL 2.0.

======================

Incidentally, contemplate adding the following line anywhere to "Makefile.in":

   ACLOCAL_AMFLAGS -I acinclude

This eliminates this libtoolize warning:

   libtoolize: Consider adding `-I acinclude' to ACLOCAL_AMFLAGS in Makefile.am.

And also reduces autoreconfiguration to:

   rm aclocal.m4
   libtoolize --install --copy --force
   aclocal
   autoconf

Which is nice.

======================

Needless to say, we strongly support inclusion of Marcus von Appen's CMake patch in SDL 2.0 at:

   http://forums.libsdl.org/viewtopic.php?t=8383
Comment 1 Sam Lantinga 2012-09-28 03:24:00 UTC
Trivial patch applied, thanks!
http://hg.libsdl.org/SDL/rev/03b7e6b0a8bf

I tried adding that line to Makefile.in, but it didn't fix the warning from libtoolize, for me.

Nice plug for the CMake patch. We're definitely looking at it. :)