Do _not_ test for strcasecmp on OS/2 (where stricmp is the function to be used).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2004-02-15 14:09:59 +00:00
parent 16c587ca76
commit a36036203f

View File

@@ -1464,15 +1464,20 @@ fi dnl not GNU make
dnl needed for making link to setup.h dnl needed for making link to setup.h
AC_PROG_LN_S AC_PROG_LN_S
dnl --------------------------------------------------------------------------- dnl ------------------------------------------------------------------------
dnl When we are using gcc on OS/2, we want to be either using resources (PM) dnl Platform specific tests
dnl or a more complete POSIX emulation for Motif/GTK+/X11 dnl ------------------------------------------------------------------------
dnl Moreover we need to link explicitly against either stdcpp.a or stdcxx.a
dnl (depending on compiler version), since we are using "gcc", not "g++/c++".
dnl ---------------------------------------------------------------------------
dnl (OS/2-only piece)
case "${host}" in case "${host}" in
*-pc-os2_emx | *-pc-os2-emx ) *-pc-os2_emx | *-pc-os2-emx )
dnl ---------------------------------------------------------------------
dnl When we are using gcc on OS/2, we want to be either using resources
dnl (PM) or a more complete POSIX emulation for Motif/GTK+/X11.
dnl Moreover we need to link explicitly against either stdcpp.a or
dnl stdcxx.a (depending on compiler version), since we are using "gcc",
dnl not "g++/c++".
dnl ---------------------------------------------------------------------
dnl (OS/2-only piece)
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
dnl More complete Unix emulation for unix-like ports dnl More complete Unix emulation for unix-like ports
dnl by linking in POSIX/2's cExt (if available). dnl by linking in POSIX/2's cExt (if available).
@@ -1501,19 +1506,20 @@ case "${host}" in
else else
LIBS="$LIBS -lstdcxx" LIBS="$LIBS -lstdcxx"
fi fi
dnl (end of OS/2-only piece)
;; ;;
esac *)
dnl (end of OS/2-only piece) dnl ---------------------------------------------------------------------
dnl look for strcasecmp() in string.h and then strings.h if it's not
dnl there. Don't do this on OS/2, where "stricmp" is the function to be
dnl used.
dnl ---------------------------------------------------------------------
dnl (non-OS/2-only piece)
dnl ------------------------------------------------------------------------ AC_LANG_SAVE
dnl Check for headers AC_LANG_CPLUSPLUS
dnl ------------------------------------------------------------------------
dnl look for strcasecmp() in string.h and then strings.h if it's not there AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
AC_TRY_LINK([ AC_TRY_LINK([
#include <string.h> #include <string.h>
], ],
@@ -1523,11 +1529,11 @@ AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
ac_cv_string_strcasecmp=yes, ac_cv_string_strcasecmp=yes,
ac_cv_string_strcasecmp=no ac_cv_string_strcasecmp=no
) )
]) ])
if test x"$ac_cv_string_strcasecmp" = "xyes"; then if test x"$ac_cv_string_strcasecmp" = "xyes"; then
AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H) AC_DEFINE(HAVE_STRCASECMP_IN_STRING_H)
else else
AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [ AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [
AC_TRY_LINK([ AC_TRY_LINK([
#include <strings.h> #include <strings.h>
@@ -1545,9 +1551,16 @@ else
else else
AC_MSG_ERROR([No case-insensitive string comparison function found.]) AC_MSG_ERROR([No case-insensitive string comparison function found.])
fi fi
fi fi
AC_LANG_RESTORE AC_LANG_RESTORE
dnl (end of non-OS/2-only piece)
;;
esac
dnl ------------------------------------------------------------------------
dnl Check for headers
dnl ------------------------------------------------------------------------
dnl defines HAVE_STDLIB_H dnl defines HAVE_STDLIB_H
AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(stdlib.h)