summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-17 13:53:14 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-17 13:53:14 -0700
commitb8af9aa522935e7c261e8b4464dd2f4d0c972a14 (patch)
treef37823084167eef2f01238e658e6d4be05fdadc0 /configure.in
parent2ced2ec3709d8cbcbb80d51f23092af260258cd1 (diff)
downloadnasm-b8af9aa522935e7c261e8b4464dd2f4d0c972a14.tar.gz
nasm-b8af9aa522935e7c261e8b4464dd2f4d0c972a14.tar.bz2
nasm-b8af9aa522935e7c261e8b4464dd2f4d0c972a14.zip
Cleaner way to handle MSVC's _snprintf() underscore damage
Some versions of MSVC have snprintf() and vsnprintf() only with a leading underscore. Handle that a bit more cleanly.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in26
1 files changed, 10 insertions, 16 deletions
diff --git a/configure.in b/configure.in
index b45d754..a52b620 100644
--- a/configure.in
+++ b/configure.in
@@ -87,28 +87,22 @@ AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
-AC_FUNC_VPRINTF
-if test $ac_cv_func_vprintf = no; then
- AC_MSG_ERROR([NASM requires ANSI C (specifically, "vprintf" and friends)])
-fi
-AC_CHECK_FUNCS(strcspn)
-if test $ac_cv_func_strcspn = no; then
- AC_MSG_ERROR([NASM requires ANSI C (specifically, "strcspn")])
-fi
+AC_CHECK_FUNCS(strcspn, ,
+ AC_MSG_ERROR([NASM requires ANSI C (specifically, "strcspn")]))
-AC_CHECK_FUNCS(strspn)
-if test $ac_cv_func_strspn = no; then
- AC_MSG_ERROR([NASM requires ANSI C (specifically, "strspn")])
-fi
+AC_CHECK_FUNCS(strspn, ,
+ AC_MSG_ERROR([NASM requires ANSI C (specifically, "strspn")]))
-AC_CHECK_FUNCS(snprintf)
-if test $ac_cv_func_snprintf = no; then
+missing=true
+AC_CHECK_FUNCS([snprintf _snprintf], missing=false)
+if $missing; then
AC_MSG_ERROR([NASM requires ISO C99 (specifically, "snprintf")])
fi
-AC_CHECK_FUNCS(vsnprintf)
-if test $ac_cv_func_snprintf = no; then
+missing=true
+AC_CHECK_FUNCS([vsnprintf _vsnprintf], missing=false)
+if $missing; then
AC_MSG_ERROR([NASM requires ISO C99 (specifically, "vsnprintf")])
fi