AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

etr_string_strcasecmp

Back to the Main Page.

Synopsis
ETR_STRING_STRCASECMP
, 
Version

2001-05-25

Author

Warren Young <warren@etr-usa.com>

License

AllPermissive
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. Users of this software should generally follow the principles of the MIT License includings its disclaimer.

Category

cryp.to ac-archive's C Support (released)

Documentation

This macro tries to find strcasecmp() in string.h.

Use this macro in conjunction with ETR_STRINGS_STRCASECMP in your configure.in like so:

   ETR_STRING_STRCASECMP
   if test x"$ac_cv_string_strcasecmp" = "xno" ; then
       ETR_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.

M4 Source Code
AC_DEFUN([ETR_STRING_STRCASECMP],
[
AC_CACHE_CHECK([for strcasecmp() in string.h], ac_cv_string_strcasecmp, [
        AC_TRY_LINK(
                [ #include &lt;string.h&gt; ],
                [ 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 ETR_STRING_STRCASECMP