summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-28 10:50:20 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-28 10:50:20 -0700
commit304b60556397464143c6fc24edb856b03fc9781a (patch)
tree230a24f6dc769b2e54088cebe34db0a7829bf681 /configure.in
parentbb2018587b4e14a170a648d08dcdd74dc995d8ce (diff)
downloadnasm-304b60556397464143c6fc24edb856b03fc9781a.tar.gz
nasm-304b60556397464143c6fc24edb856b03fc9781a.tar.bz2
nasm-304b60556397464143c6fc24edb856b03fc9781a.zip
Add substitutes for snprintf() and vsnprintf()
To deal with fools^Wpeople trying to keep really old systems alive, create a proper framework for substitution functions, and make it possible to deal with the lack of snprintf/vsnprintf in particular.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index a52b620..3def6cb 100644
--- a/configure.in
+++ b/configure.in
@@ -87,6 +87,7 @@ AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for library functions.
+AC_SUBST_FILE(XOBJS)
AC_CHECK_FUNCS(strcspn, ,
AC_MSG_ERROR([NASM requires ANSI C (specifically, "strcspn")]))
@@ -95,15 +96,15 @@ AC_CHECK_FUNCS(strspn, ,
AC_MSG_ERROR([NASM requires ANSI C (specifically, "strspn")]))
missing=true
-AC_CHECK_FUNCS([snprintf _snprintf], missing=false)
+AC_CHECK_FUNCS([vsnprintf _vsnprintf], missing=false)
if $missing; then
- AC_MSG_ERROR([NASM requires ISO C99 (specifically, "snprintf")])
+ XOBJS="$XOBJS lib/vsnprintf.o"
fi
missing=true
-AC_CHECK_FUNCS([vsnprintf _vsnprintf], missing=false)
+AC_CHECK_FUNCS([snprintf _snprintf], missing=false)
if $missing; then
- AC_MSG_ERROR([NASM requires ISO C99 (specifically, "vsnprintf")])
+ XOBJS="$XOBJS lib/snprintf.o"
fi
AC_CHECK_FUNCS(getuid)