Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
Please observe that the following code from 3.1.2 The Autoconf Language is obsolete and should be updated: AC_COMPILE_IFELSE([[char b[10];]], [], [AC_MSG_ERROR([you lose])]) Running this snippet through autoconf produces the warning: no AC_LANG_SOURCE call detected in body It seems the following syntax is required instead: AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char b[10];]])], [], [AC_MSG_ERROR([you lose])]) Please fix, Chris
Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
On 09/23/2010 02:56 PM, Ralf Corsepius wrote: Hi, I am facing a new issue/regression with autoconf-2.68: When running autoreconf on the follow configure.ac[1]: Another case, but this time triggered by libtool: -- snip -- AC_INIT([foo],[0.1]) AC_CONFIG_SRCDIR([configure.ac]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign]) LT_INIT AC_CONFIG_FILES([Makefile]) AC_OUTPUT -- snip -- # autoreconf -fi configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... /usr/share/aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... /usr/share/aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... /usr/share/aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:138: _LT_SETUP is expanded from... /usr/share/aclocal/libtool.m4:67: LT_INIT is expanded from... configure.ac:7: the top level configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... /usr/share/aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... /usr/share/aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:138: _LT_SETUP is expanded from... /usr/share/aclocal/libtool.m4:67: LT_INIT is expanded from... configure.ac:7: the top level configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... aclocal.m4:1037: _LT_SYS_MODULE_PATH_AIX is expanded from... aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from... aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from... aclocal.m4:159: _LT_SETUP is expanded from... aclocal.m4:88: LT_INIT is expanded from... configure.ac:7: the top level configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from... aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from... aclocal.m4:159: _LT_SETUP is expanded from... aclocal.m4:88: LT_INIT is expanded from... configure.ac:7: the top level libtoolize: putting auxiliary files in `.'. libtoolize: copying file `./ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. libtoolize: copying file `m4/libtool.m4' libtoolize: copying file `m4/ltoptions.m4' libtoolize: copying file `m4/ltsugar.m4' libtoolize: copying file `m4/ltversion.m4' libtoolize: copying file `m4/lt~obsolete.m4' libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... /usr/share/aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from... /usr/share/aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... /usr/share/aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:138: _LT_SETUP is expanded from... /usr/share/aclocal/libtool.m4:67: LT_INIT is expanded from... configure.ac:7: the top level configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... /usr/share/aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from... /usr/share/aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:138: _LT_SETUP is expanded from... /usr/share/aclocal/libtool.m4:67: LT_INIT is expanded from... configure.ac:7: the top level configure.ac:7: 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:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... aclocal.m4:1037: _LT_SYS_MODULE_PATH_AIX is expanded from... aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from... aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
On 09/24/2010 12:23 AM, Ralf Corsepius wrote: On 09/23/2010 02:56 PM, Ralf Corsepius wrote: Hi, I am facing a new issue/regression with autoconf-2.68: When running autoreconf on the follow configure.ac[1]: Another case, but this time triggered by libtool: Already fixed in libtool 2.4. # libtool --version ltmain.sh (GNU libtool) 2.2.6b (Original Fedora libtool) So the best course of action here would be to file a Fedora bug report to get libtool updated in that distro. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org
Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
On 09/23/2010 06:56 AM, Ralf Corsepius wrote: Hi, I am facing a new issue/regression with autoconf-2.68: That is not a regression, but a feature. Reread NEWS: AC_COMPILE_IFELSE([ #ifndef FOO choke me #endif ]) You should have used: AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #ifndef FOO choke me #endif ]) With older autoconfs, autoreconf remains entirely silent. Not only were they entirely silent, but most likely generated a broken configure. If you don't use AC_LANG_SOURCE, then you don't get the benefit of all the prior AC_DEFINEs being implicitly included before the body of your test, which leads to documented cases of mis-diagnosing whether a feature is present for a given build. What is wrong with this configure.ac rsp. how to overcome these warnings? Use AC_LANG_SOURCE, like the warning told you to do in the first place. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org
Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
On 09/23/2010 07:52 AM, Eric Blake wrote: [hit send too soon] On 09/23/2010 06:56 AM, Ralf Corsepius wrote: Hi, I am facing a new issue/regression with autoconf-2.68: That is not a regression, but a feature. Reread NEWS: ** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and AC_RUN_IFELSE now warn if the first argument failed to use AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file contents. A new macro AC_LANG_DEFINES_PROVIDED exists if you have a compelling reason why you cannot use AC_LANG_SOURCE but must avoid the warning. AC_COMPILE_IFELSE([ #ifndef FOO choke me #endif ]) You should have used: AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #ifndef FOO choke me #endif ]) Needs another ]), to match the fact that there is an added ([ from the added call to AC_LANG_SOURCE. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org
Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
On 09/23/2010 03:52 PM, Eric Blake wrote: On 09/23/2010 06:56 AM, Ralf Corsepius wrote: Hi, I am facing a new issue/regression with autoconf-2.68: That is not a regression, but a feature. Your feature is my regression - It broke what appeared to have worked for ages ;) Reread NEWS: AC_COMPILE_IFELSE([ #ifndef FOO choke me #endif ]) You should have used: AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #ifndef FOO choke me #endif ]) OK, thanks. With older autoconfs, autoreconf remains entirely silent. Not only were they entirely silent, but most likely generated a broken configure. If you don't use AC_LANG_SOURCE, then you don't get the benefit of all the prior AC_DEFINEs being implicitly included before the body of your test, which leads to documented cases of mis-diagnosing whether a feature is present for a given build. Actually, I don't need the AC_DEFINES in this particular case - Adding them however, should not do much harm, either. What is wrong with this configure.ac rsp. how to overcome these warnings? Use AC_LANG_SOURCE, like the warning told you to do in the first place. Well, really usable warnings look a bit different than this warning. They might be self-explanatory to you, but to me this warning was Greek. Ralf
Re: autoconf-2.68: no AC_LANG_SOURCE call detected in body
* Ralf Corsepius wrote on Thu, Sep 23, 2010 at 04:33:01PM CEST: On 09/23/2010 03:52 PM, Eric Blake wrote: On 09/23/2010 06:56 AM, Ralf Corsepius wrote: I am facing a new issue/regression with autoconf-2.68: That is not a regression, but a feature. Your feature is my regression - It broke what appeared to have worked for ages ;) Beside the fact that the warning might be a false positive in your case, can you please confirm that it was only a warning, and did not actually *break* the resulting configure script, right? Without autoconf -Werror, things should have still worked as expected. Well, really usable warnings look a bit different than this warning. They might be self-explanatory to you, but to me this warning was Greek. That's a QoI issue (and of course always good and important to improve upon) but not a regression. Thanks, Ralf