blob: 41ca08e3768695a095aad563a7e24b5205217764 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# ===========================================================================
# http://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 <warren@etr-usa.com>
#
# 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 7
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_TRY_LINK(
[ #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
|