openbsd-ports/shells
robert d267cd02ca Unbreak autoconf checks with clang by not using nested functions
in the checks.

Someone clearly did not read the autoconf documentation because
using the following functions with a function declaration inside
the body will end up declaring a function inside a function.

- AC_TRY_COMPILE( [], [ int main() { return 0; } ],
- AC_LANG_PROGRAM([[]], [[int main (void) { return 0; }]])],
- AC_TRY_LINK([], [int main (void) { return 0; }],

Result:

int
main ()
{
int main (void) { return 0; }
  ;
  return 0;
}

nested functions is a gcc extension which is not supported by
clang.

test.c:4:17: error: function definition is not allowed here
int main (void) { return 0; }
                ^
1 error generated.

This causes tests to fail in the configure scripts resulting in
missing compile and link time flags from the builds.

This resulted in weird behaviour of several software, like gnome
hanging completely due to gtk+3 not being built properly.

This change intrudces the following fixes:

- remove int main() declaration from AC_TRY_COMPILE, AC_LANG_PROGRAM, AC_TRY_LINK
  as it comes with a declaration already, and people misused them

- change to use AC_LANG_SOURCE when needed in case a complete source block is specified

Most of the changes are in configure.(ac|in), however there were some cases
where autoconf is either broken or the build failed because of an autoconf
generated configure script. Everytihng else is switched to autoconf, so
the maintainers can go ahead and upstream these diffs.

There are more to come, we are continously checking the tree for these issues
and in the future the infrastructure will error if such a case is found.
2017-09-25 09:16:12 +00:00
..
bash Unbreak autoconf checks with clang by not using nested functions 2017-09-25 09:16:12 +00:00
dash Update to dash-0.5.9.1 2016-10-24 20:59:23 +00:00
es mandoc(1) now supports .ta, drop USE_GROFF and bump 2017-05-08 13:19:10 +00:00
ksh93 Remove BROKEN-mips64. The comment about libast is stale, 2017-08-18 12:44:11 +00:00
nsh Fix link order to unbreak with FTS5 enabled sqlite3. 2017-08-24 06:05:27 +00:00
osh Update to osh 4.3.2, patch upstreamed. 2017-05-26 21:27:10 +00:00
perlsh almost identical formatting of very badly broken manual pages, 2017-06-17 01:31:46 +00:00
py-qtconsole Bump after the renaming of py-qt5,-main to py-qt5. 2017-07-17 20:32:37 +00:00
sash
tcsh zap old @pkgpath entry in shells/tcsh 2016-05-31 12:11:34 +00:00
yash mark for entry in shells(5); 2017-02-24 21:23:38 +00:00
zoidberg
zsh Update ZSH to 5.4.1 2017-08-10 18:38:39 +00:00
Makefile +py-qtconsole 2017-03-05 21:13:27 +00:00