|
1 | 1 | # Macros that test various C library quirks
|
2 |
| -# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.4 2000/10/02 03:58:31 momjian Exp $ |
| 2 | +# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.5 2000/11/03 18:43:51 petere Exp $ |
3 | 3 |
|
4 | 4 |
|
5 | 5 | # PGAC_VAR_INT_TIMEZONE
|
@@ -96,3 +96,30 @@ if test x"$pgac_cv_func_posix_signals" = xyes ; then
|
96 | 96 | fi
|
97 | 97 | HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
|
98 | 98 | AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
|
| 99 | + |
| 100 | + |
| 101 | +# PGAC_HEADER_STRING |
| 102 | +# ------------------ |
| 103 | +# Tests whether <string.h> and <strings.h> can both be included |
| 104 | +# (without generating warnings). This is mostly useful if you need |
| 105 | +# str[n]casecmp(), since this is not in the "standard" <string.h> |
| 106 | +# on some systems. |
| 107 | +AC_DEFUN([PGAC_HEADER_STRING], |
| 108 | +[AC_CACHE_CHECK([whether string.h and strings.h may both be included], |
| 109 | + [pgac_cv_header_strings_both], |
| 110 | +[AC_TRY_CPP( |
| 111 | +[#include <string.h> |
| 112 | +#include <strings.h> |
| 113 | +], |
| 114 | +[AC_TRY_COMPILE( |
| 115 | +[#include <string.h> |
| 116 | +#include <strings.h> |
| 117 | +], |
| 118 | +[int n = strcasecmp("a", "b");], |
| 119 | +[pgac_cv_header_strings_both=yes], |
| 120 | +[pgac_cv_header_strings_both=no])], |
| 121 | +[pgac_cv_header_strings_both=no])]) |
| 122 | +if test x"$pgac_cv_header_strings_both" = x"yes"; then |
| 123 | + AC_DEFINE([STRING_H_WITH_STRINGS_H], 1, |
| 124 | + [Define if string.h and strings.h may both be included]) |
| 125 | +fi]) |
0 commit comments