Use WX_CHECK_FUNCS for strtok_r.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell
2006-08-28 07:53:48 +00:00
parent 040b34976e
commit 56632e818f
2 changed files with 42 additions and 40 deletions

View File

@@ -4678,10 +4678,7 @@ fi
dnl check for uname (POSIX) and gethostname (BSD)
AC_CHECK_FUNCS(uname gethostname, break)
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
AC_CHECK_DECLS(strtok_r, AC_DEFINE(HAVE_STRTOK_R))
CPPFLAGS="$SAVE_CPPFLAGS"
WX_CHECK_FUNCS(strtok_r, [], [], [#define _REENTRANT])
dnl check for inet_addr and inet_aton (these may live either in libc, or in
dnl libnsl or libresolv or libsocket)
@@ -5156,7 +5153,7 @@ if test "$wxUSE_THREADS" = "yes"; then
else
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
if test "$ac_cv_have_decl_strtok_r" = "yes"; then
if test "$wx_cv_func_strtok_r" = "yes"; then
AC_MSG_CHECKING(if -D_REENTRANT is needed)
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_REENTRANT"