Switch to AC_CHECK_DECLS instead of WX_CHECK_DECLS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
53
configure
vendored
53
configure
vendored
@@ -36960,29 +36960,24 @@ done
|
|||||||
|
|
||||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
||||||
|
echo "$as_me:$LINENO: checking whether strtok_r is declared" >&5
|
||||||
for target in strtok_r
|
echo $ECHO_N "checking whether strtok_r is declared... $ECHO_C" >&6
|
||||||
do
|
if test "${ac_cv_have_decl_strtok_r+set}" = set; then
|
||||||
echo "$as_me:$LINENO: checking for $target in string.h" >&5
|
|
||||||
echo $ECHO_N "checking for $target in string.h... $ECHO_C" >&6
|
|
||||||
if eval "test \"\${wx_cv_decl_$target+set}\" = set"; then
|
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
|
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
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <string.h>
|
$ac_includes_default
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
#ifndef strtok_r
|
||||||
#ifndef $target
|
char *p = (char *) strtok_r;
|
||||||
&$target;
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
@@ -37009,31 +37004,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
eval wx_cv_decl_$target=yes
|
ac_cv_have_decl_strtok_r=yes
|
||||||
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
|
||||||
|
|
||||||
eval wx_cv_decl_$target=no
|
ac_cv_have_decl_strtok_r=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
|
||||||
fi
|
fi
|
||||||
echo "$as_me:$LINENO: result: `eval echo '${'wx_cv_decl_$target'}'`" >&5
|
echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtok_r" >&5
|
||||||
echo "${ECHO_T}`eval echo '${'wx_cv_decl_$target'}'`" >&6
|
echo "${ECHO_T}$ac_cv_have_decl_strtok_r" >&6
|
||||||
|
if test $ac_cv_have_decl_strtok_r = yes; then
|
||||||
|
|
||||||
if eval test \$wx_cv_decl_$target = yes
|
cat >>confdefs.h <<_ACEOF
|
||||||
then
|
#define HAVE_DECL_STRTOK_R 1
|
||||||
cat >>confdefs.h <<_ACEOF
|
_ACEOF
|
||||||
#define HAVE_`echo $target | tr 'a-z' 'A-Z'` 1
|
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define HAVE_STRTOK_R 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
else
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_STRTOK_R 0
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
else
|
fi
|
||||||
:
|
|
||||||
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||||
|
|
||||||
@@ -40519,7 +40518,7 @@ _ACEOF
|
|||||||
|
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
|
||||||
else
|
else
|
||||||
if test "$wx_cv_decl_strtok_r" = "yes"; then
|
if test "$ac_cv_have_decl_strtok_r" = "yes"; then
|
||||||
echo "$as_me:$LINENO: checking if -D_REENTRANT is needed" >&5
|
echo "$as_me:$LINENO: checking if -D_REENTRANT is needed" >&5
|
||||||
echo $ECHO_N "checking if -D_REENTRANT is needed... $ECHO_C" >&6
|
echo $ECHO_N "checking if -D_REENTRANT is needed... $ECHO_C" >&6
|
||||||
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
|
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
|
||||||
|
@@ -4666,7 +4666,7 @@ AC_CHECK_FUNCS(uname gethostname, break)
|
|||||||
|
|
||||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
|
||||||
WX_CHECK_DECLS(strtok_r, string.h)
|
AC_CHECK_DECLS(strtok_r, AC_DEFINE(HAVE_STRTOK_R))
|
||||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||||
|
|
||||||
dnl check for inet_addr and inet_aton (these may live either in libc, or in
|
dnl check for inet_addr and inet_aton (these may live either in libc, or in
|
||||||
@@ -5142,7 +5142,7 @@ if test "$wxUSE_THREADS" = "yes"; then
|
|||||||
else
|
else
|
||||||
dnl on some systems, _REENTRANT should be defined if we want to use any _r()
|
dnl on some systems, _REENTRANT should be defined if we want to use any _r()
|
||||||
dnl functions - add tests for other functions here as well
|
dnl functions - add tests for other functions here as well
|
||||||
if test "$wx_cv_decl_strtok_r" = "yes"; then
|
if test "$ac_cv_have_decl_strtok_r" = "yes"; then
|
||||||
AC_MSG_CHECKING(if -D_REENTRANT is needed)
|
AC_MSG_CHECKING(if -D_REENTRANT is needed)
|
||||||
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
|
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
|
||||||
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_REENTRANT"
|
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_REENTRANT"
|
||||||
|
Reference in New Issue
Block a user