- Created acinclude.m4 with checks for VA_COPY and

VA_LIST_IS_ARRAY.  Currently not needed, but I suspect we
  may need them as we gain functionality; cf. dstring.c in
  quakeforge.
- Updated configure.in to check for above tests.
- Updated TODO list noting the va_list audit.
This commit is contained in:
Jamie Wilkinson 2002-05-02 15:45:55 +00:00
parent 9a018e3ad7
commit 5f2ed6f1ef
3 changed files with 67 additions and 1 deletions

5
TODO
View file

@ -13,7 +13,10 @@
- the video refresher loader code in src/vid_menu.c needs cleaning up, it's
utter bollocks at the moment. all the structs are very fragile, depending
on specific ordering of each element.
- fix va_list as per http://gozer.quakeforge.net/list-archives/quakeforge-cvs/2002-April/000151.html, http://www.quakeforge.net/cgi-bin/viewcvs.cgi/quakeforge/libs/util/dstring.c.diff?r1=1.8&r2=1.9
- do va_list audit -- check that argptr isn't used twice (as per
http://gozer.quakeforge.net/list-archives/quakeforge-cvs/2002-April/000151.html
Everything seems to be fine, someone with a PPC machine will probably want
to double check this.
- investigate the possibility of savegames not being tied to a particular build
- fix software assembler when building without --disable-asm on i386
- split out assembler per arch/os (we currently have gas i386 and win i386)

60
acinclude.m4 Normal file
View file

@ -0,0 +1,60 @@
dnl $Id$
dnl
dnl Copyright (c) 2002 The Quakeforge Project.
dnl Checks if function/macro va_copy() is available
dnl Defines HAVE_VA_COPY on success.
AC_DEFUN(AC_FUNC_VA_COPY,
[AC_CACHE_CHECK([for va_copy], ac_cv_func_va_copy,
[AC_TRY_LINK([
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#else
# include <varargs.h>
#endif],
[
va_list a, b;
va_copy(a, b);],
[ac_cv_func_va_copy=yes],
[ac_cv_func_va_copy=no])])
if test $ac_cv_func_va_copy = yes; then
AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy is available])
fi])
dnl Checks if function/macro __va_copy() is available
dnl Defines HAVE__VA_COPY on success.
AC_DEFUN(AC_FUNC__VA_COPY,
[AC_CACHE_CHECK([for __va_copy], ac_cv_func__va_copy,
[AC_TRY_LINK([
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#else
# include <varargs.h>
#endif],
[
va_list a,b;
__va_copy(a, b);],
[ac_cv_func__va_copy=yes],
[ac_cv_func__va_copy=no])])
if test $ac_cv_func__va_copy = yes; then
AC_DEFINE(HAVE__VA_COPY, 1, [Define if __va_copy is available])
fi])
dnl Checks if va_list is an array
dnl Devines VA_LIST_IS_ARRAY on success
AC_DEFUN(AC_TYPE_VA_LIST,
[AC_CACHE_CHECK([if va_list is an array], ac_cv_type_va_list_array,
[AC_TRY_LINK([
#ifdef HAVE_STDARG_H
# include <stdarg.h>
#else
# include <varargs.h>
#endif],
[
va_list a, b;
a = b;],
[ac_cv_type_va_list_array=no],
[ac_cv_type_va_list_array=yes])])
if test $ac_cv_type_va_list_array = yes; then
AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if va_list is an array])
fi])

View file

@ -71,6 +71,7 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UID_T
AC_TYPE_VA_LIST
AC_MSG_CHECKING(for underscore prefix in names)
AC_TRY_LINK(
@ -111,6 +112,8 @@ dnl -----------------------------
#AC_FUNC_STAT
#AC_FUNC_VPRINTF
#AC_CHECK_FUNCS([bzero floor getcwd gethostbyname getmntent getpagesize gettimeofday memmove memset mkdir munmap pow putenv select socket sqrt strcasecmp strchr strdup strerror strrchr strstr])
AC_FUNC_VA_COPY
AC_FUNC__VA_COPY
AC_CHECK_FUNCS(dlopen)
DL_LIBS=""