This repository has been archived by the owner on Sep 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow strcasecmp on Windows, because sometimes only POSIX is provided…
… there.
- Loading branch information
1 parent
75a6f7e
commit ce4b11f
Showing
4 changed files
with
109 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# =========================================================================== | ||
# https://www.gnu.org/software/autoconf-archive/ax_string_strcasecmp.html | ||
# =========================================================================== | ||
# | ||
# SYNOPSIS | ||
# | ||
# AX_STRING_STRCASECMP | ||
# | ||
# DESCRIPTION | ||
# | ||
# This macro tries to find strcasecmp() in string.h. | ||
# | ||
# Use this macro in conjunction with AX_STRINGS_STRCASECMP in your | ||
# configure.in like so: | ||
# | ||
# AX_STRING_STRCASECMP | ||
# if test x"$ac_cv_string_strcasecmp" = "xno" ; then | ||
# AX_STRINGS_STRCASECMP | ||
# fi | ||
# | ||
# This will cause either HAVE_STRING_STRCASECMP or HAVE_STRINGS_STRCASECMP | ||
# to be defined in config.h, which will tell your code what header to | ||
# include to get strcasecmp()'s prototype. | ||
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2008 Warren Young <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 9 | ||
|
||
AU_ALIAS([ETR_STRING_STRCASECMP], [AX_STRING_STRCASECMP]) | ||
AC_DEFUN([AX_STRING_STRCASECMP], | ||
[ | ||
AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [ | ||
AC_LINK_IFELSE([AC_LANG_PROGRAM( | ||
[[#include <string.h>]], | ||
[[strcasecmp("foo", "bar");]])], | ||
[ac_cv_string_strcasecmp=yes], | ||
[ac_cv_string_strcasecmp=no]) | ||
]) | ||
if test x"$ac_cv_string_strcasecmp" = "xyes" | ||
then | ||
AC_DEFINE(HAVE_STRING_STRCASECMP, 1, | ||
[ Define if your system has strcasecmp() in string.h ]) | ||
fi | ||
]) dnl AX_STRING_STRCASECMP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# =========================================================================== | ||
# https://www.gnu.org/software/autoconf-archive/ax_strings_strcasecmp.html | ||
# =========================================================================== | ||
# | ||
# SYNOPSIS | ||
# | ||
# AX_STRINGS_STRCASECMP | ||
# | ||
# DESCRIPTION | ||
# | ||
# This macro tries to find strcasecmp() in strings.h. See the | ||
# AX_STRING_STRCASECMP macro's commentary for usage details. | ||
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2008 Warren Young <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 9 | ||
|
||
AU_ALIAS([ETR_STRINGS_STRCASECMP], [AX_STRINGS_STRCASECMP]) | ||
AC_DEFUN([AX_STRINGS_STRCASECMP], | ||
[ AC_CACHE_CHECK([for strcasecmp() in strings.h], ac_cv_strings_strcasecmp, [ | ||
AC_LINK_IFELSE( | ||
[AC_LANG_PROGRAM([[#include <strings.h>]], | ||
[[strcasecmp("foo", "bar");]])], | ||
[ac_cv_strings_strcasecmp=yes], | ||
[ac_cv_strings_strcasecmp=no]) | ||
]) | ||
if test x"$ac_cv_strings_strcasecmp" = "xyes" | ||
then | ||
AC_DEFINE(HAVE_STRINGS_STRCASECMP, 1, | ||
[ Define if your system has strcasecmp() in strings.h ]) | ||
fi | ||
]) dnl AX_STRINGS_STRCASECMP |