Use AC_LANG_SOURCE and add missing quoting to configure.
This fixes some of the warnings from autoconf 2.68 while still remaining compatible with 2.61. Closes #13591. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -45,13 +45,15 @@ ac_cv_func_which_gethostbyname_r=unknown
|
|||||||
# assuming an implicit prototype. In which case, we're out of luck.
|
# assuming an implicit prototype. In which case, we're out of luck.
|
||||||
#
|
#
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[#include <netdb.h>]],
|
[[#include <netdb.h>]],
|
||||||
[[
|
[[
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
(void)gethostbyname_r(name) /* ; */
|
(void)gethostbyname_r(name) /* ; */
|
||||||
]]),
|
]]
|
||||||
ac_cv_func_which_gethostbyname_r=no)
|
)],
|
||||||
|
ac_cv_func_which_gethostbyname_r=no
|
||||||
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# SIX ARGUMENTS
|
# SIX ARGUMENTS
|
||||||
@@ -61,17 +63,19 @@ AC_COMPILE_IFELSE(
|
|||||||
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
|
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
|
||||||
|
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[#include <netdb.h>]],
|
[[#include <netdb.h>]],
|
||||||
[[
|
[[
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
struct hostent ret, *retp;
|
struct hostent ret, *retp;
|
||||||
char buf@<:@1024@:>@;
|
char buf@<:@1024@:>@;
|
||||||
int buflen = 1024;
|
int buflen = 1024;
|
||||||
int my_h_errno;
|
int my_h_errno;
|
||||||
(void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
|
(void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
|
||||||
]]),
|
]]
|
||||||
ac_cv_func_which_gethostbyname_r=six)
|
)],
|
||||||
|
ac_cv_func_which_gethostbyname_r=six
|
||||||
|
)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -83,17 +87,19 @@ fi
|
|||||||
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
|
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
|
||||||
|
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[#include <netdb.h>]],
|
[[#include <netdb.h>]],
|
||||||
[[
|
[[
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
struct hostent ret;
|
struct hostent ret;
|
||||||
char buf@<:@1024@:>@;
|
char buf@<:@1024@:>@;
|
||||||
int buflen = 1024;
|
int buflen = 1024;
|
||||||
int my_h_errno;
|
int my_h_errno;
|
||||||
(void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
|
(void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
|
||||||
]]),
|
]]
|
||||||
ac_cv_func_which_gethostbyname_r=five)
|
)],
|
||||||
|
ac_cv_func_which_gethostbyname_r=five
|
||||||
|
)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -105,15 +111,17 @@ fi
|
|||||||
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
|
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
|
||||||
|
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE(
|
||||||
AC_LANG_PROGRAM(
|
[AC_LANG_PROGRAM(
|
||||||
[[#include <netdb.h>]],
|
[[#include <netdb.h>]],
|
||||||
[[
|
[[
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
struct hostent ret;
|
struct hostent ret;
|
||||||
struct hostent_data data;
|
struct hostent_data data;
|
||||||
(void)gethostbyname_r(name, &ret, &data) /* ; */
|
(void)gethostbyname_r(name, &ret, &data) /* ; */
|
||||||
]]),
|
]]
|
||||||
ac_cv_func_which_gethostbyname_r=three)
|
)],
|
||||||
|
ac_cv_func_which_gethostbyname_r=three
|
||||||
|
)
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
128
configure
vendored
128
configure
vendored
@@ -24550,20 +24550,27 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
|||||||
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
|
||||||
#include <stdarg.h>
|
/* confdefs.h. */
|
||||||
void foo(char *f, ...)
|
_ACEOF
|
||||||
{
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
va_list ap1, ap2;
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
va_start(ap1, f);
|
/* end confdefs.h. */
|
||||||
va_copy(ap2, ap1);
|
|
||||||
va_end(ap2);
|
#include <stdarg.h>
|
||||||
va_end(ap1);
|
void foo(char *f, ...)
|
||||||
}
|
{
|
||||||
int main()
|
va_list ap1, ap2;
|
||||||
{
|
va_start(ap1, f);
|
||||||
foo("hi", 17);
|
va_copy(ap2, ap1);
|
||||||
return 0;
|
va_end(ap2);
|
||||||
}
|
va_end(ap1);
|
||||||
|
}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
foo("hi", 17);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
if { (ac_try="$ac_link"
|
if { (ac_try="$ac_link"
|
||||||
@@ -24624,22 +24631,29 @@ else
|
|||||||
else
|
else
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
|
||||||
#include <stdarg.h>
|
/* confdefs.h. */
|
||||||
int foo(char *f, ...)
|
_ACEOF
|
||||||
{
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
va_list ap1, ap2;
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
va_start(ap1, f);
|
/* end confdefs.h. */
|
||||||
ap2 = ap1;
|
|
||||||
if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
|
#include <stdarg.h>
|
||||||
return 1;
|
int foo(char *f, ...)
|
||||||
va_end(ap2);
|
{
|
||||||
va_end(ap1);
|
va_list ap1, ap2;
|
||||||
return 0;
|
va_start(ap1, f);
|
||||||
}
|
ap2 = ap1;
|
||||||
int main()
|
if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
|
||||||
{
|
return 1;
|
||||||
return foo("hi", 17);
|
va_end(ap2);
|
||||||
}
|
va_end(ap1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return foo("hi", 17);
|
||||||
|
}
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
rm -f conftest$ac_exeext
|
rm -f conftest$ac_exeext
|
||||||
if { (ac_try="$ac_link"
|
if { (ac_try="$ac_link"
|
||||||
@@ -24703,7 +24717,8 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
|
|||||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||||
|
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
/* confdefs.h. */
|
|
||||||
|
/* confdefs.h. */
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat confdefs.h >>conftest.$ac_ext
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
@@ -27107,7 +27122,14 @@ else
|
|||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="$libc"
|
LIBS="$libc"
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
int main() { return 0; }
|
int main() { return 0; }
|
||||||
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
if { (ac_try="$ac_link"
|
if { (ac_try="$ac_link"
|
||||||
@@ -42532,8 +42554,9 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
(void)gethostbyname_r(name) /* ; */
|
(void)gethostbyname_r(name) /* ; */
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -42557,6 +42580,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
|||||||
test ! -s conftest.err
|
test ! -s conftest.err
|
||||||
} && test -s conftest.$ac_objext; then
|
} && test -s conftest.$ac_objext; then
|
||||||
ac_cv_func_which_gethostbyname_r=no
|
ac_cv_func_which_gethostbyname_r=no
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
@@ -42584,12 +42608,13 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
struct hostent ret, *retp;
|
struct hostent ret, *retp;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int buflen = 1024;
|
int buflen = 1024;
|
||||||
int my_h_errno;
|
int my_h_errno;
|
||||||
(void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
|
(void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -42613,6 +42638,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
|||||||
test ! -s conftest.err
|
test ! -s conftest.err
|
||||||
} && test -s conftest.$ac_objext; then
|
} && test -s conftest.$ac_objext; then
|
||||||
ac_cv_func_which_gethostbyname_r=six
|
ac_cv_func_which_gethostbyname_r=six
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
@@ -42642,12 +42668,13 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
struct hostent ret;
|
struct hostent ret;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int buflen = 1024;
|
int buflen = 1024;
|
||||||
int my_h_errno;
|
int my_h_errno;
|
||||||
(void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
|
(void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -42671,6 +42698,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
|||||||
test ! -s conftest.err
|
test ! -s conftest.err
|
||||||
} && test -s conftest.$ac_objext; then
|
} && test -s conftest.$ac_objext; then
|
||||||
ac_cv_func_which_gethostbyname_r=five
|
ac_cv_func_which_gethostbyname_r=five
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
@@ -42700,10 +42728,11 @@ int
|
|||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
|
||||||
char *name = "www.gnu.org";
|
char *name = "www.gnu.org";
|
||||||
struct hostent ret;
|
struct hostent ret;
|
||||||
struct hostent_data data;
|
struct hostent_data data;
|
||||||
(void)gethostbyname_r(name, &ret, &data) /* ; */
|
(void)gethostbyname_r(name, &ret, &data) /* ; */
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -42727,6 +42756,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
|||||||
test ! -s conftest.err
|
test ! -s conftest.err
|
||||||
} && test -s conftest.$ac_objext; then
|
} && test -s conftest.$ac_objext; then
|
||||||
ac_cv_func_which_gethostbyname_r=three
|
ac_cv_func_which_gethostbyname_r=three
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
72
configure.in
72
configure.in
@@ -1709,20 +1709,22 @@ AC_CACHE_CHECK([for va_copy],
|
|||||||
[
|
[
|
||||||
AC_LANG_PUSH(C++)
|
AC_LANG_PUSH(C++)
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
#include <stdarg.h>
|
AC_LANG_SOURCE([
|
||||||
void foo(char *f, ...)
|
#include <stdarg.h>
|
||||||
{
|
void foo(char *f, ...)
|
||||||
va_list ap1, ap2;
|
{
|
||||||
va_start(ap1, f);
|
va_list ap1, ap2;
|
||||||
va_copy(ap2, ap1);
|
va_start(ap1, f);
|
||||||
va_end(ap2);
|
va_copy(ap2, ap1);
|
||||||
va_end(ap1);
|
va_end(ap2);
|
||||||
}
|
va_end(ap1);
|
||||||
int main()
|
}
|
||||||
{
|
int main()
|
||||||
foo("hi", 17);
|
{
|
||||||
return 0;
|
foo("hi", 17);
|
||||||
}],
|
return 0;
|
||||||
|
}])
|
||||||
|
],
|
||||||
wx_cv_func_va_copy=yes,
|
wx_cv_func_va_copy=yes,
|
||||||
wx_cv_func_va_copy=no
|
wx_cv_func_va_copy=no
|
||||||
)
|
)
|
||||||
@@ -1738,22 +1740,24 @@ else
|
|||||||
wx_cv_type_va_list_lvalue,
|
wx_cv_type_va_list_lvalue,
|
||||||
[
|
[
|
||||||
AC_RUN_IFELSE([
|
AC_RUN_IFELSE([
|
||||||
#include <stdarg.h>
|
AC_LANG_SOURCE([
|
||||||
int foo(char *f, ...)
|
#include <stdarg.h>
|
||||||
{
|
int foo(char *f, ...)
|
||||||
va_list ap1, ap2;
|
{
|
||||||
va_start(ap1, f);
|
va_list ap1, ap2;
|
||||||
ap2 = ap1;
|
va_start(ap1, f);
|
||||||
if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
|
ap2 = ap1;
|
||||||
return 1;
|
if ( va_arg(ap1, int) != 17 || va_arg(ap2, int) != 17 )
|
||||||
va_end(ap2);
|
return 1;
|
||||||
va_end(ap1);
|
va_end(ap2);
|
||||||
return 0;
|
va_end(ap1);
|
||||||
}
|
return 0;
|
||||||
int main()
|
}
|
||||||
{
|
int main()
|
||||||
return foo("hi", 17);
|
{
|
||||||
}],
|
return foo("hi", 17);
|
||||||
|
}])
|
||||||
|
],
|
||||||
wx_cv_type_va_list_lvalue=yes,
|
wx_cv_type_va_list_lvalue=yes,
|
||||||
wx_cv_type_va_list_lvalue=no,
|
wx_cv_type_va_list_lvalue=no,
|
||||||
dnl assume most common case for cross-compiling...
|
dnl assume most common case for cross-compiling...
|
||||||
@@ -1782,7 +1786,7 @@ AC_CACHE_CHECK(
|
|||||||
dnl C compiler might support variadic macros when C++ one doesn't
|
dnl C compiler might support variadic macros when C++ one doesn't
|
||||||
dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly
|
dnl (happens with gcc/g++ 2.95.4), so must use C++ one explicitly
|
||||||
AC_LANG_PUSH(C++)
|
AC_LANG_PUSH(C++)
|
||||||
AC_COMPILE_IFELSE(
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM(
|
AC_LANG_PROGRAM(
|
||||||
[
|
[
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -1791,7 +1795,7 @@ AC_CACHE_CHECK(
|
|||||||
[
|
[
|
||||||
test("%s %d %p", "test", 1, 0);
|
test("%s %d %p", "test", 1, 0);
|
||||||
]
|
]
|
||||||
),
|
)],
|
||||||
[wx_cv_have_variadic_macros=yes],
|
[wx_cv_have_variadic_macros=yes],
|
||||||
[wx_cv_have_variadic_macros=no]
|
[wx_cv_have_variadic_macros=no]
|
||||||
)
|
)
|
||||||
@@ -2268,7 +2272,9 @@ case "${host}" in
|
|||||||
if test -f $libc; then
|
if test -f $libc; then
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
LIBS="$libc"
|
LIBS="$libc"
|
||||||
AC_LINK_IFELSE([int main() { return 0; }],
|
AC_LINK_IFELSE([
|
||||||
|
AC_LANG_SOURCE([int main() { return 0; }])
|
||||||
|
],
|
||||||
wx_cv_std_libpath=`echo $d | sed s@/usr/@@`)
|
wx_cv_std_libpath=`echo $d | sed s@/usr/@@`)
|
||||||
LIBS="$save_LIBS"
|
LIBS="$save_LIBS"
|
||||||
if test "x$wx_cv_std_libpath" != "x"; then
|
if test "x$wx_cv_std_libpath" != "x"; then
|
||||||
|
Reference in New Issue
Block a user