diff --git a/INSTALL b/INSTALL index 4538b8716..a2a11be9a 100644 --- a/INSTALL +++ b/INSTALL @@ -20,7 +20,7 @@ necessary packages installed. \section req-pack Required Packages The following packages are required to build QuakeForge: -\li GNU autoconf 2.50 or later +\li GNU autoconf 2.71 or later \li GNU automake 1.6 or later \li GNU libtool 1.4 or later \li GNU bison 2.6 or later diff --git a/bootstrap b/bootstrap index abd34252f..805df70d8 100755 --- a/bootstrap +++ b/bootstrap @@ -71,11 +71,11 @@ if test -n "$ac" ; then AC_VER_MINOR=`echo $AC_VER | cut -f2 -d'.' | sed 's/[^0-9]*$//'` if test "$AC_VER_MAJOR" -lt "2" ; then - errors="Autoconf 2.61 or greater needed to build configure.\n$errors" + errors="Autoconf 2.71 or greater needed to build configure.\n$errors" fi - if test "$AC_VER_MAJOR" -eq "2" -a "$AC_VER_MINOR" -lt "61" ; then - errors="Autoconf 2.61 or greater needed to build configure.\n$errors" + if test "$AC_VER_MAJOR" -eq "2" -a "$AC_VER_MINOR" -lt "71" ; then + errors="Autoconf 2.71 or greater needed to build configure.\n$errors" fi fi else diff --git a/config.d/asm.m4 b/config.d/asm.m4 index 79e5ceea8..33f249096 100644 --- a/config.d/asm.m4 +++ b/config.d/asm.m4 @@ -17,10 +17,8 @@ esac AM_CONDITIONAL(ASM_ARCH, test "x$ASM_ARCH" = "xyes") AC_MSG_CHECKING(for underscore prefix in names) -AC_TRY_LINK( - [asm(".long _bar"); - int bar;], - [], - AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE, 1, [Define this if C symbols are prefixed with an underscore]) AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[asm(".long _bar"); int bar;]], [[]])], + [AC_DEFINE(HAVE_SYM_PREFIX_UNDERSCORE, 1, Define this if C symbols are prefixed with an underscore) AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no) +]) diff --git a/config.d/compiling.m4 b/config.d/compiling.m4 index f0d108a27..5fc0ea03e 100644 --- a/config.d/compiling.m4 +++ b/config.d/compiling.m4 @@ -16,15 +16,16 @@ AC_MSG_RESULT([$leave_cflags_alone]) AC_MSG_CHECKING(for C99 inline) c99_inline=no -AC_TRY_LINK( - [inline int foo (int x) { return x * x; } - int (*bar) (int) = foo;], - [], - c99_inline=no - AC_MSG_RESULT(no), - c99_inline=yes - AC_DEFINE(HAVE_C99INLINE, extern, [define this if using c99 inline]) - AC_MSG_RESULT(yes) +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[inline int foo (int x) { return x * x; } + int (*bar) (int) = foo;]], + [[]])], + [c99_inline=no + AC_MSG_RESULT(no)], + [c99_inline=yes + AC_DEFINE(HAVE_C99INLINE, extern, define this if using c99 inline) + AC_MSG_RESULT(yes)] ) AH_VERBATIM([HAVE_C99INLINE], [#undef HAVE_C99INLINE @@ -169,25 +170,17 @@ if test "x$optimize" = xyes -a "x$leave_cflags_alone" != "xyes"; then else save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $MORE_CFLAGS" - AC_TRY_COMPILE( - [], - [], - AC_MSG_RESULT(yes), - CFLAGS="$save_CFLAGS" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[AC_MSG_RESULT(yes)],[CFLAGS="$save_CFLAGS" AC_MSG_RESULT(no) - ) + ]) fi if test $CC_MAJ = 2 -a $CC_MIN = 96; then AC_MSG_CHECKING(if align options work) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2" - AC_TRY_COMPILE( - [], - [], - light="$light -malign-loops=2 -malign-jumps=2 -malign-functions=2" - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[light="$light -malign-loops=2 -malign-jumps=2 -malign-functions=2" + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) CFLAGS="$save_CFLAGS" CFLAGS="$CFLAGS $light" else diff --git a/config.d/fbdev.m4 b/config.d/fbdev.m4 index afc519003..8af090ab1 100644 --- a/config.d/fbdev.m4 +++ b/config.d/fbdev.m4 @@ -10,27 +10,15 @@ fi if test "x$HAVE_FBDEV" = xyes; then AC_MSG_CHECKING(for FB_AUX_VGA_PLANES_VGA4) - AC_TRY_COMPILE( - [#include "linux/fb.h"], - [int foo = FB_AUX_VGA_PLANES_VGA4;], - AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_VGA4, 1, [Define this if you have FB_AUX_VGA_PLANES_VGA4]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "linux/fb.h"]], [[int foo = FB_AUX_VGA_PLANES_VGA4;]])],[AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_VGA4, 1, Define this if you have FB_AUX_VGA_PLANES_VGA4) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) AC_MSG_CHECKING(for FB_AUX_VGA_PLANES_CFB4) - AC_TRY_COMPILE( - [#include "linux/fb.h"], - [int foo = FB_AUX_VGA_PLANES_CFB4;], - AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB4, 1, [Define this if you have FB_AUX_VGA_PLANES_CFB4]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "linux/fb.h"]], [[int foo = FB_AUX_VGA_PLANES_CFB4;]])],[AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB4, 1, Define this if you have FB_AUX_VGA_PLANES_CFB4) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) AC_MSG_CHECKING(for FB_AUX_VGA_PLANES_CFB8) - AC_TRY_COMPILE( - [#include "linux/fb.h"], - [int foo = FB_AUX_VGA_PLANES_CFB8;], - AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB8, 1, [Define this if you have FB_AUX_VGA_PLANES_CFB4]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "linux/fb.h"]], [[int foo = FB_AUX_VGA_PLANES_CFB8;]])],[AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB8, 1, Define this if you have FB_AUX_VGA_PLANES_CFB4) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) fi diff --git a/config.d/header_files.m4 b/config.d/header_files.m4 index 2e3de3103..93513dc8c 100644 --- a/config.d/header_files.m4 +++ b/config.d/header_files.m4 @@ -3,7 +3,6 @@ dnl Checks for header files. dnl ================================================================== AC_HEADER_DIRENT -AC_HEADER_STDC AC_HEADER_MAJOR AC_HEADER_SYS_WAIT AC_CHECK_HEADERS( @@ -33,37 +32,21 @@ fi AC_FUNC_ALLOCA AC_MSG_CHECKING(for fnmatch in fnmatch.h) -AC_TRY_COMPILE( - [#include "fnmatch.h"], - [int (*foo)() = fnmatch;], - AC_DEFINE(HAVE_FNMATCH_PROTO, 1, [Define this if fnmatch is prototyped in fnmatch.h]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "fnmatch.h"]], [[int (*foo)() = fnmatch;]])],[AC_DEFINE(HAVE_FNMATCH_PROTO, 1, Define this if fnmatch is prototyped in fnmatch.h) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AC_MSG_CHECKING(for strnlen in string.h) -AC_TRY_COMPILE( - [#include "string.h"], - [int (*foo)() = strnlen;], - AC_DEFINE(HAVE_STRNLEN_PROTO, 1, [Define this if strnlen is prototyped in string.h]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[int (*foo)() = strnlen;]])],[AC_DEFINE(HAVE_STRNLEN_PROTO, 1, Define this if strnlen is prototyped in string.h) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AC_MSG_CHECKING(for strndup in string.h) -AC_TRY_COMPILE( - [#include "string.h"], - [int (*foo)() = strndup;], - AC_DEFINE(HAVE_STRNDUP_PROTO, 1, [Define this if strndup is prototyped in string.h]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[int (*foo)() = strndup;]])],[AC_DEFINE(HAVE_STRNDUP_PROTO, 1, Define this if strndup is prototyped in string.h) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AC_MSG_CHECKING(for strcasestr in string.h) -AC_TRY_COMPILE( - [#include "string.h"], - [int (*foo)() = strcasestr;], - AC_DEFINE(HAVE_STRCASESTR_PROTO, 1, [Define this if strcasestr is prototyped in string.h]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "string.h"]], [[int (*foo)() = strcasestr;]])],[AC_DEFINE(HAVE_STRCASESTR_PROTO, 1, Define this if strcasestr is prototyped in string.h) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) diff --git a/config.d/library_functions.m4 b/config.d/library_functions.m4 index c071dfa94..533e5cb78 100644 --- a/config.d/library_functions.m4 +++ b/config.d/library_functions.m4 @@ -5,7 +5,7 @@ dnl ================================================================== AC_FUNC_ALLOCA AC_FUNC_MEMCMP AC_FUNC_MMAP -AC_TYPE_SIGNAL + AC_FUNC_VPRINTF AC_CHECK_FUNCS( access _access bsearch_r connect dlopen execvp fcntl ftime _ftime \ @@ -39,21 +39,13 @@ AC_SUBST(DL_LIBS) if test "x$DL_LIBS" != "x"; then AC_MSG_CHECKING([for RTLD_NOW]) -AC_TRY_COMPILE( - [#include ], - [int foo = RTLD_NOW], - AC_DEFINE(HAVE_RTLD_NOW, 1, [Define if you have RTLD_NOW.]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int foo = RTLD_NOW]])],[AC_DEFINE(HAVE_RTLD_NOW, 1, Define if you have RTLD_NOW.) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AC_MSG_CHECKING([for RTLD_DEEPBIND]) -AC_TRY_COMPILE( - [#include ], - [int foo = RTLD_DEEPBIND], - AC_DEFINE(HAVE_RTLD_DEEPBIND, 1, [Define if you have RTLD_DEEPBIND.]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int foo = RTLD_DEEPBIND]])],[AC_DEFINE(HAVE_RTLD_DEEPBIND, 1, Define if you have RTLD_DEEPBIND.) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) fi dnl Checks for stricmp/strcasecmp @@ -81,36 +73,24 @@ fi AC_CHECK_FUNCS(usleep) AC_MSG_CHECKING(for fnmatch) -AC_TRY_LINK( - [], - [fnmatch();], - BUILD_FNMATCH=no - AC_MSG_RESULT(yes), - BUILD_FNMATCH=yes +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[fnmatch();]])],[BUILD_FNMATCH=no + AC_MSG_RESULT(yes)],[BUILD_FNMATCH=yes AC_MSG_RESULT(no) -) +]) AM_CONDITIONAL(BUILD_FNMATCH, test "x$BUILD_FNMATCH" = "xyes") AC_MSG_CHECKING(for opendir) -AC_TRY_LINK( - [], - [opendir();], - BUILD_DIRENT=no - AC_MSG_RESULT(yes), - BUILD_DIRENT=yes +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[opendir();]])],[BUILD_DIRENT=no + AC_MSG_RESULT(yes)],[BUILD_DIRENT=yes AC_MSG_RESULT(no) -) +]) AM_CONDITIONAL(BUILD_DIRENT, test "x$BUILD_DIRENT" = "xyes") AC_MSG_CHECKING(for getopt_long) -AC_TRY_LINK( - [], - [getopt_long();], - BUILD_GETOPT=no - AC_MSG_RESULT(yes), - BUILD_GETOPT=yes +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[getopt_long();]])],[BUILD_GETOPT=no + AC_MSG_RESULT(yes)],[BUILD_GETOPT=yes AC_MSG_RESULT(no) -) +]) AM_CONDITIONAL(BUILD_GETOPT, test "x$BUILD_GETOPT" = "xyes") AC_MSG_CHECKING(for log2f) diff --git a/config.d/networking.m4 b/config.d/networking.m4 index a7fb22783..74c214c83 100644 --- a/config.d/networking.m4 +++ b/config.d/networking.m4 @@ -60,19 +60,16 @@ fi AC_MSG_CHECKING([for connect in -lwsock32]) SAVELIBS="$LIBS" LIBS="$LIBS -lwsock32" -AC_TRY_LINK([ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include -], -[ +]], [[ connect(0, NULL, 42); -], - NET_LIBS="$NET_LIBS -lwsock32 -lwinmm" +]])],[NET_LIBS="$NET_LIBS -lwsock32 -lwinmm" ac_cv_func_connect=yes ac_cv_func_gethostbyname=yes HAVE_WSOCK=yes - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) LIBS="$SAVELIBS" AC_MSG_CHECKING(for UDP support) @@ -87,16 +84,13 @@ if test "x$ac_cv_func_connect" != "xyes"; then AC_MSG_CHECKING([for connect in -lwsock32]) SAVELIBS="$LIBS" LIBS="$LIBS -lwsock32" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include - ], - [ + ]], [[ connect (0, NULL, 42); - ], - NET_LIBS="$NET_LIBS -lwsock32 -lwinmm" - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + ]])],[NET_LIBS="$NET_LIBS -lwsock32 -lwinmm" + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) LIBS="$SAVELIBS" fi AC_SUBST(NET_LIBS) @@ -104,12 +98,9 @@ AC_SUBST(NET_LIBS) AC_MSG_CHECKING([for getifaddrs]) SAVELIBS="$LIBS" LIBS="$LIBS $NET_LIBS" -AC_TRY_LINK([], - [ +AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ getifaddrs (0); - ], - AC_DEFINE(HAVE_GETIFADDRS, 1, [Define this if you have getifaddrs()]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) + ]])],[AC_DEFINE(HAVE_GETIFADDRS, 1, Define this if you have getifaddrs()) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) LIBS="$SAVELIBS" diff --git a/config.d/programs.m4 b/config.d/programs.m4 index 439fb7c93..bcff065c5 100644 --- a/config.d/programs.m4 +++ b/config.d/programs.m4 @@ -32,6 +32,7 @@ AS_VERSION_COMPARE([$BISON_VER], [2.6], AC_MSG_RESULT([yes]) ) +AC_PROG_LEX(noyywrap) AM_PROG_LEX if echo $LEX | grep -v flex > /dev/null; then AC_MSG_ERROR(GNU flex is required but was not found) diff --git a/config.d/pthread.m4 b/config.d/pthread.m4 index 6fc05c13c..6ed5626a9 100644 --- a/config.d/pthread.m4 +++ b/config.d/pthread.m4 @@ -11,22 +11,14 @@ if test "x$ac_cv_header_pthread_h" = "xyes"; then ;; *openbsd*) LIBS="$LIBS -pthread" - AC_TRY_LINK( - [#include ], - [pthread_attr_t type; - pthread_attr_setstacksize(&type, 0x100000);], - [PTHREAD_LDFLAGS=-pthread], - [PTHREAD_LDFLAGS=-lpthread] - ) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_attr_t type; + pthread_attr_setstacksize(&type, 0x100000);]])],[PTHREAD_LDFLAGS=-pthread],[PTHREAD_LDFLAGS=-lpthread + ]) ;; *) LIBS="$LIBS -lpthread" - AC_TRY_LINK( - [#include ], - [pthread_attr_t type; - pthread_attr_setstacksize(&type, 0x100000);], - [PTHREAD_LDFLAGS=-lpthread], - [PTHREAD_LDFLAGS=-pthread] - ) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_attr_t type; + pthread_attr_setstacksize(&type, 0x100000);]])],[PTHREAD_LDFLAGS=-lpthread],[PTHREAD_LDFLAGS=-pthread + ]) ;; esac LIBS="$save_LIBS" diff --git a/config.d/typedefs_structs_compiler.m4 b/config.d/typedefs_structs_compiler.m4 index 8e6acac2e..c38e7c56c 100644 --- a/config.d/typedefs_structs_compiler.m4 +++ b/config.d/typedefs_structs_compiler.m4 @@ -5,29 +5,19 @@ dnl ================================================================== AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T -AC_STRUCT_ST_BLKSIZE -AC_HEADER_TIME AC_STRUCT_TM if test "x$ac_cv_header_unistd_h" = xyes; then AC_MSG_CHECKING(for _SC_PAGESIZE) -AC_TRY_COMPILE( - [#include ], - [int foo = _SC_PAGESIZE;], - AC_DEFINE(HAVE__SC_PAGESIZE,1,[Define this if you have _SC_PAGESIZE]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int foo = _SC_PAGESIZE;]])],[AC_DEFINE(HAVE__SC_PAGESIZE,1,Define this if you have _SC_PAGESIZE) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) fi AC_MSG_CHECKING(for __attribute__) -AC_TRY_COMPILE( - [static __attribute__ ((unused)) const char *foo = "bar";], - [], - AC_DEFINE(HAVE___ATTRIBUTE__) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[static __attribute__ ((unused)) const char *foo = "bar";]], [[]])],[AC_DEFINE(HAVE___ATTRIBUTE__) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AH_VERBATIM([HAVE___ATTRIBUTE__], [/* Define this if the GCC __attribute__ keyword is available */ #undef HAVE___ATTRIBUTE__ @@ -36,14 +26,10 @@ AH_VERBATIM([HAVE___ATTRIBUTE__], #endif]) AC_MSG_CHECKING(for __attribute__ ((visibility))) -AC_TRY_COMPILE( - [void foo (void); - __attribute__ ((sivibility ("default"))) void foo (void) {}], - [], - AC_DEFINE(HAVE___ATTRIBUTE__VISIBILITY) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[void foo (void); + __attribute__ ((sivibility ("default"))) void foo (void) {}]], [[]])],[AC_DEFINE(HAVE___ATTRIBUTE__VISIBILITY) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AH_VERBATIM([HAVE___ATTRIBUTE__VISIBILITY], [/* Define this if the GCC visibility __attribute__ is available */ #undef HAVE___ATTRIBUTE__VISIBILITY @@ -55,14 +41,10 @@ AH_VERBATIM([HAVE___ATTRIBUTE__VISIBILITY], if test "x$SYSTYPE" = "xWIN32"; then AC_MSG_CHECKING(for __attribute__ ((gcc_struct))) - AC_TRY_COMPILE( - [typedef struct { int foo; } - __attribute__ ((gcc_struct)) gcc_struct_test;], - [], - AC_DEFINE(HAVE___ATTRIBUTE__GCC_STRUCT) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[typedef struct { int foo; } + __attribute__ ((gcc_struct)) gcc_struct_test;]], [[]])],[AC_DEFINE(HAVE___ATTRIBUTE__GCC_STRUCT) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) fi AH_VERBATIM([HAVE___ATTRIBUTE__GCC_STRUCT], [/* Define this if the GCC gcc_struct __attribute__ is available */ @@ -74,13 +56,9 @@ AH_VERBATIM([HAVE___ATTRIBUTE__GCC_STRUCT], #endif]) AC_MSG_CHECKING(for __builtin_expect) -AC_TRY_LINK( - [int x;], - [if (__builtin_expect(!x, 1)) {}], - AC_DEFINE(HAVE___BUILTIN_EXPECT) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[int x;]], [[if (__builtin_expect(!x, 1)) {}]])],[AC_DEFINE(HAVE___BUILTIN_EXPECT) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AH_VERBATIM([HAVE___BUILTIN_EXPECT], [/* Define this if the GCC __builtin_expect keyword is available */ #undef HAVE___BUILTIN_EXPECT @@ -89,78 +67,47 @@ AH_VERBATIM([HAVE___BUILTIN_EXPECT], #endif]) AC_MSG_CHECKING(for type of fpos_t) -AC_TRY_COMPILE( - [#include ], - [fpos_t x = 0], - AC_MSG_RESULT(off_t), - AC_DEFINE(HAVE_FPOS_T_STRUCT, 1, [Define this if FPOS_T is a struct]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[fpos_t x = 0]])],[AC_MSG_RESULT(off_t)],[AC_DEFINE(HAVE_FPOS_T_STRUCT, 1, Define this if FPOS_T is a struct) AC_MSG_RESULT(struct) -) +]) AC_MSG_CHECKING(for socklen_t in sys/types.h) -AC_TRY_COMPILE( - [#include ], - [ socklen_t x = 0;], - AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define this if your system has socklen_t]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[socklen_t x = 0;]])],[AC_DEFINE(HAVE_SOCKLEN_T, 1, Define this if your system has socklen_t) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) dnl FreeBSD 4.0 has it in sys/socket.h AC_MSG_CHECKING(for socklen_t in sys/socket.h) - AC_TRY_COMPILE( - [#include - #include ], - [ socklen_t x = 0;], - AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define this if your system has socklen_t]) AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) -) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[socklen_t x = 0;]])],[AC_DEFINE(HAVE_SOCKLEN_T, 1, Define this if your system has socklen_t) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) +]) if test "x$ac_cv_header_sys_uio_h" = xyes; then AC_MSG_CHECKING(for struct in_pktinfo) - AC_TRY_COMPILE( - [#include + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include #include - #include ], - [struct in_pktinfo x;], - AC_DEFINE(HAVE_IN_PKTINFO, 1, [Define this if your system has struct in_pktinfo]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) - ) + #include ]], [[struct in_pktinfo x;]])],[AC_DEFINE(HAVE_IN_PKTINFO, 1, Define this if your system has struct in_pktinfo) + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) + ]) fi AC_MSG_CHECKING(for size_t in sys/types.h) -AC_TRY_COMPILE( - [#include ], - [ size_t x = 0;], - AC_DEFINE(HAVE_SIZE_T, 1, [Define this if your system has size_t]) AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ size_t x = 0;]])],[AC_DEFINE(HAVE_SIZE_T, 1, Define this if your system has size_t) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) dnl maybe these two (at least the 2nd) should be checked only if ipv6 is enabled? AC_MSG_CHECKING(for ss_len in struct sockaddr_storage) -AC_TRY_COMPILE( - [#include - #include ], - [ void f(void) { struct sockaddr_storage ss; ss.ss_len=0; }], - AC_DEFINE(HAVE_SS_LEN, 1, [Define this if you have ss_len member in struct sockaddr_storage (BSD)]) AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[ void f(void) { struct sockaddr_storage ss; ss.ss_len=0; }]])],[AC_DEFINE(HAVE_SS_LEN, 1, Define this if you have ss_len member in struct sockaddr_storage (BSD)) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AC_MSG_CHECKING(for sin6_len in struct sockaddr_in6) -AC_TRY_COMPILE( - [#include - #include ], - [ void f(void) { struct sockaddr_in6 s6; s6.sin6_len=0; }], - AC_DEFINE(HAVE_SIN6_LEN, 1, [Define this if you have sin6_len member in struct sockaddr_in6 (BSD)]) AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[ void f(void) { struct sockaddr_in6 s6; s6.sin6_len=0; }]])],[AC_DEFINE(HAVE_SIN6_LEN, 1, Define this if you have sin6_len member in struct sockaddr_in6 (BSD)) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) AC_MSG_CHECKING(for sa_len in struct sockaddr) -AC_TRY_COMPILE( - [#include - #include ], - [ void f(void) { struct sockaddr sa; sa.sa_len=0; }], - AC_DEFINE(HAVE_SA_LEN, 1, [Define this if you have sa_len member in struct sockaddr (BSD)]) AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + #include ]], [[ void f(void) { struct sockaddr sa; sa.sa_len=0; }]])],[AC_DEFINE(HAVE_SA_LEN, 1, Define this if you have sa_len member in struct sockaddr (BSD)) AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) diff --git a/config.d/versions.m4 b/config.d/versions.m4 index 7550013d6..32d6f85ae 100644 --- a/config.d/versions.m4 +++ b/config.d/versions.m4 @@ -15,7 +15,7 @@ AC_DEFINE_UNQUOTED(QW_VERSION, "$QW_VERSION", AC_DEFINE_UNQUOTED(QW_QSG_VERSION, "$QW_QSG_VERSION", [Define this to the QSG standard version you support in QuakeWorld]) -AC_ARG_ENABLE([version-info], AC_HELP_STRING([--enable-version-info=CURRENT:REVISION:AGE], +AC_ARG_ENABLE([version-info], AS_HELP_STRING([--enable-version-info=CURRENT:REVISION:AGE], [Override the value passed to libtool -version-info.]), [], [enable_version_info=1:0:0]) QUAKE_LIBRARY_VERSION_INFO=$enable_version_info diff --git a/configure.ac b/configure.ac index 17ad222cf..d90db713b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,8 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ(2.61) +AC_PREREQ([2.71]) dnl This is the only place where the package name and version appear -AC_INIT([QuakeForge], m4_esyscmd([config.d/git-version-gen --prefix '' .tarball-version])) +AC_INIT([QuakeForge],m4_esyscmd(config.d/git-version-gen --prefix '' .tarball-version)) AM_INIT_AUTOMAKE([foreign subdir-objects]) dnl LT_INIT messes with CFLAGS (evil bastard) @@ -11,7 +11,7 @@ if test "x${CFLAGS-unset}" = xunset; then fi saved_CFLAGS="$CFLAGS" dnl LT_INIT([win32-dll]) -AM_PROG_LIBTOOL +LT_INIT CFLAGS="$saved_CFLAGS" AC_REVISION([$Revision$]) dnl @@ -23,7 +23,7 @@ AC_CANONICAL_HOST m4_include(config.d/versions.m4) -AC_LANG_C +AC_LANG([C]) if test "$x{AR-unset}" = xunset; then AR="ar" diff --git a/m4/libFLAC.m4 b/m4/libFLAC.m4 index 8f9ef741c..c43a0caa6 100644 --- a/m4/libFLAC.m4 +++ b/m4/libFLAC.m4 @@ -46,7 +46,7 @@ dnl dnl Now check if the installed libFLAC is sufficiently new. dnl rm -f conf.libFLACtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -58,7 +58,7 @@ int main () return 0; } -],, no_libFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_libFLAC=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -74,11 +74,10 @@ int main () echo "*** Could not run libFLAC test program, checking why..." CFLAGS="$CFLAGS $LIBFLAC_CFLAGS" LIBS="$LIBS $LIBFLAC_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libFLAC or finding the wrong" echo "*** version of libFLAC. If it is not finding libFLAC, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -86,8 +85,7 @@ int main () echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means libFLAC was incorrectly installed" echo "*** or that you have moved libFLAC since it was installed. In the latter case, you" echo "*** may want to edit the libFLAC-config script: $LIBFLAC_CONFIG" ]) diff --git a/m4/libOggFLAC.m4 b/m4/libOggFLAC.m4 index a04623f6c..eefc77b6a 100644 --- a/m4/libOggFLAC.m4 +++ b/m4/libOggFLAC.m4 @@ -46,7 +46,7 @@ dnl dnl Now check if the installed libOggFLAC is sufficiently new. dnl rm -f conf.libOggFLACtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -58,7 +58,7 @@ int main () return 0; } -],, no_libOggFLAC=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_libOggFLAC=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -74,11 +74,10 @@ int main () echo "*** Could not run libOggFLAC test program, checking why..." CFLAGS="$CFLAGS $LIBOGGFLAC_CFLAGS" LIBS="$LIBS $LIBOGGFLAC_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding libOggFLAC or finding the wrong" echo "*** version of libOggFLAC. If it is not finding libOggFLAC, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -86,8 +85,7 @@ int main () echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means libOggFLAC was incorrectly installed" echo "*** or that you have moved libOggFLAC since it was installed. In the latter case, you" echo "*** may want to edit the libOggFLAC-config script: $LIBOGGFLAC_CONFIG" ]) diff --git a/m4/libcurl.m4 b/m4/libcurl.m4 index 01a0575cc..66857d6e7 100644 --- a/m4/libcurl.m4 +++ b/m4/libcurl.m4 @@ -61,7 +61,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP]) AC_ARG_WITH(libcurl, - AC_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]), + AS_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]), [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])]) if test "$_libcurl_with" != "no" ; then diff --git a/m4/ogg.m4 b/m4/ogg.m4 index 0e1f1abf5..87b018508 100644 --- a/m4/ogg.m4 +++ b/m4/ogg.m4 @@ -45,7 +45,7 @@ dnl dnl Now check if the installed Ogg is sufficiently new. dnl rm -f conf.oggtest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -57,7 +57,7 @@ int main () return 0; } -],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_ogg=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -73,11 +73,10 @@ int main () echo "*** Could not run Ogg test program, checking why..." CFLAGS="$CFLAGS $OGG_CFLAGS" LIBS="$LIBS $OGG_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding Ogg or finding the wrong" echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -85,8 +84,7 @@ int main () echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means Ogg was incorrectly installed" echo "*** or that you have moved Ogg since it was installed." ]) CFLAGS="$ac_save_CFLAGS" diff --git a/m4/quakeforge.m4 b/m4/quakeforge.m4 index 5dad02d82..ce2d9b38b 100644 --- a/m4/quakeforge.m4 +++ b/m4/quakeforge.m4 @@ -5,9 +5,7 @@ dnl AC_HAVE_STRUCT_FIELD(struct, field, headers) AC_DEFUN([AC_HAVE_STRUCT_FIELD], [ define(cache_val, translit(ac_cv_type_$1_$2, [A-Z ], [a-z_])) AC_CACHE_CHECK([for $2 in $1], cache_val,[ -AC_TRY_COMPILE([$3],[$1 x; x.$2;], -cache_val=yes, -cache_val=no)]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$3]], [[$1 x; x.$2;]])],[cache_val=yes],[cache_val=no])]) if test "$cache_val" = yes; then define(foo, translit(HAVE_$1_$2, [a-z ], [A-Z_])) AC_DEFINE(foo, 1, [Define if $1 has field $2.]) @@ -20,18 +18,15 @@ 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([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_STDARG_H # include #else # include -#endif], - [ +#endif]], [[ va_list a, b; -va_copy(a, b);], - [ac_cv_func_va_copy=yes], - [ac_cv_func_va_copy=no])]) +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]) @@ -40,18 +35,15 @@ 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([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_STDARG_H # include #else # include -#endif], - [ +#endif]], [[ va_list a, b; -__va_copy(a, b);], - [ac_cv_func__va_copy=yes], - [ac_cv_func__va_copy=no])]) +__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]) @@ -60,19 +52,16 @@ dnl Checks if va_list is an array dnl Defines 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([ + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_STDARG_H # include #else # include #endif -], - [ +]], [[ va_list a, b; -a = b;], - [ac_cv_type_va_list_array=no], - [ac_cv_type_va_list_array=yes])]) +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]) @@ -179,13 +168,9 @@ AC_MSG_CHECKING(whether $1 works) save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" qf_opt_ok=no -AC_TRY_COMPILE( - [], - [], - qf_opt_ok=yes - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no) -) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[qf_opt_ok=yes + AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no) +]) CFLAGS="$save_CFLAGS" if test "x$qf_opt_ok" = xyes; then true diff --git a/m4/sdl.m4 b/m4/sdl.m4 index 0928a9ddf..9018ad5e8 100644 --- a/m4/sdl.m4 +++ b/m4/sdl.m4 @@ -63,7 +63,7 @@ dnl Now check if the installed SDL is sufficiently new. (Also sanity dnl checks the results of sdl-config to some extent dnl rm -f conf.sdltest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -120,7 +120,7 @@ int main (int argc, char *argv[]) } } -],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_sdl=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" @@ -144,7 +144,7 @@ int main (int argc, char *argv[]) CFLAGS="$CFLAGS $SDL_CFLAGS" CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" LIBS="$LIBS $SDL_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include "SDL.h" @@ -152,8 +152,7 @@ int main(int argc, char *argv[]) { return 0; } #undef main #define main K_and_R_C_main -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding SDL or finding the wrong" echo "*** version of SDL. If it is not finding SDL, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -161,8 +160,7 @@ int main(int argc, char *argv[]) echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means SDL was incorrectly installed" echo "*** or that you have moved SDL since it was installed. In the latter case, you" echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) diff --git a/m4/vorbis.m4 b/m4/vorbis.m4 index 300cc6c7d..8071ab886 100644 --- a/m4/vorbis.m4 +++ b/m4/vorbis.m4 @@ -49,7 +49,7 @@ dnl dnl Now check if the installed Vorbis is sufficiently new. dnl rm -f conf.vorbistest - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include @@ -73,7 +73,7 @@ int main () return 0; } -],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) +]])],[],[no_vorbis=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi @@ -89,11 +89,10 @@ int main () echo "*** Could not run Vorbis test program, checking why..." CFLAGS="$CFLAGS $VORBIS_CFLAGS" LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" +]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding Vorbis or finding the wrong" echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" @@ -101,8 +100,7 @@ int main () echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means Vorbis was incorrectly installed" echo "*** or that you have moved Vorbis since it was installed." ]) CFLAGS="$ac_save_CFLAGS"