Bug #65898 aclocal compatibility change
Submitted: 14 Jul 2012 14:43 Modified: 30 Aug 2012 20:44
Reporter: John Anderson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.2.40 OS:Any (ACLOCAL/autogen.sh)
Assigned to: CPU Architecture:Any
Tags: aclocal, build, compile, configure, Contribution

[14 Jul 2012 14:43] John Anderson
Description:
Running autogen.sh or aclocal on downloaded source tree generates the following error:

configure.in:44: the top level
configure.in:375: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2730: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2749: AC_RUN_IFELSE is expanded from...
configure.in:375: the top level

The first argument to the AC_RUN_IFELSE macro should be enclosed in an AC_LANG_SOURCE macro.

How to repeat:
Download and unpack source, and run aclocal with a version of aclocal newer than 1.11.1.

Suggested fix:
Use AC_LANG_SOURCE wherever AC_RUN_IFELSE is called.  The patch below fixes the section that was throwing warnings when I ran aclocal before autogen.sh on my box.

diff -Nuar mysql-workbench-gpl-5.2.40-src-old/configure.in mysql-workbench-gpl-5.2.40-src/configure.in
--- mysql-workbench-gpl-5.2.40-src-old/configure.in     2012-05-03 15:41:06.000000000 -0400
+++ mysql-workbench-gpl-5.2.40-src/configure.in 2012-07-14 09:52:54.847655344 -0400
@@ -372,7 +372,8 @@
 ac_savecpp=$CPPFLAGS
 LIBS=`pcre-config --libs`
 CPPFLAS=`pcre-config --cflags`
-AC_RUN_IFELSE([[#include <pcre.h>
+AC_RUN_IFELSE([
+AC_LANG_SOURCE([#include <pcre.h>
 int main()
 {
   char *err= NULL;
@@ -381,7 +382,7 @@
     return 0;
   return 1;
 }
-]], [HAVE_UNICODE_PCRE=1], [HAVE_UNICODE_PCRE=0])
+])], [HAVE_UNICODE_PCRE=1], [HAVE_UNICODE_PCRE=0])
 if test $HAVE_UNICODE_PCRE; then
   AC_MSG_RESULT(yes)
 else
[14 Jul 2012 17:09] Valeriy Kravchuk
Thank you for the problem report and patch contributed. Verified on Mac OS X.
[30 Aug 2012 20:44] Philip Olson
This was fixed as of 5.2.41, and here's the changelog entry:

 MySQL Workbench was not compatable with "alocal"
 versions greater than 1.11.1. Compiling would generate errors
 related to "AC_RUN_IFELSE" usage, as opposed to
 the preferred "AC_LANG_SOURCE".

Thank you for the report.