missing -D_REENTRANT for HP-UX/Solaris finally seems to be fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-02 18:58:22 +00:00
parent cfeb83fd7f
commit ab9b9eabe6
2 changed files with 1223 additions and 502 deletions

1694
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -440,6 +440,11 @@ USE_CYGWIN=
USE_MINGW= USE_MINGW=
USE_DATA_GENERAL= USE_DATA_GENERAL=
dnl on some platforms xxx_r() functions are declared inside "#ifdef
dnl _REENTRANT" and it's easier to just define this symbol for these platforms
dnl than checking it during run-time
NEEDS_D_REENTRANT_FOR_R_FUNCS=0
dnl the list of all available toolkits dnl the list of all available toolkits
ALL_TOOLKITS="CYGWIN GTK MINGW MOTIF WINE" ALL_TOOLKITS="CYGWIN GTK MINGW MOTIF WINE"
@@ -462,6 +467,7 @@ case "${host}" in
*-hp-hpux* ) *-hp-hpux* )
USE_HPUX=1 USE_HPUX=1
DEFAULT_DEFAULT_wxUSE_MOTIF=1 DEFAULT_DEFAULT_wxUSE_MOTIF=1
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
AC_DEFINE(__HPUX__) AC_DEFINE(__HPUX__)
;; ;;
*-*-linux* ) *-*-linux* )
@@ -489,6 +495,7 @@ case "${host}" in
AC_DEFINE(__SOLARIS__) AC_DEFINE(__SOLARIS__)
AC_DEFINE(__SVR4__) AC_DEFINE(__SVR4__)
DEFAULT_DEFAULT_wxUSE_MOTIF=1 DEFAULT_DEFAULT_wxUSE_MOTIF=1
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
;; ;;
*-*-sunos4* ) *-*-sunos4* )
USE_SUN=1 USE_SUN=1
@@ -2128,17 +2135,13 @@ else
dnl on some systems, _REENTRANT should bedefined if we want to use any _r() dnl on some systems, _REENTRANT should bedefined 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 "$ac_cv_func_strtok_r" = "yes"; then if test "$ac_cv_func_strtok_r" = "yes"; then
dnl and now try with C++ AC_MSG_CHECKING(if -D_REENTRANT is needed)
unset ac_cv_func_strtok_r if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
AC_LANG_SAVE CFLAGS="${CFLAGS} -D_REENTRANT"
AC_LANG_CPLUSPLUS CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
AC_CHECK_FUNCS(strtok_r) AC_MSG_RESULT(yes)
AC_LANG_RESTORE else
AC_MSG_RESULT(no)
if test "$ac_cv_func_strtok_r" != "yes"; then
ac_cv_func_strtok_r=yes
CFLAGS="${CFLAGS} -D_REENTRANT"
CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
fi fi
fi fi
fi fi