From 2704fdf1ad749ffc23c0a5f416694332ccff1a83 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 4 Jan 2022 18:10:05 +0000 Subject: [PATCH] configure.ac: only test for usleep/select if neither of sdl1/2 is used --- configure.ac | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 967f4d0..beca651 100644 --- a/configure.ac +++ b/configure.ac @@ -16,17 +16,6 @@ AC_TRY_COMPILE([], [typedef int foo;], [], [CFLAGS="$old_cflags"]) test "$cross_compiling" = "yes" || AC_C_BIGENDIAN test "$ac_cv_c_bigendian" = "no" && ENDIAN="-DIS_LITTLE_ENDIAN" - - - -AC_CHECK_FUNCS(usleep, ,[ -AC_CHECK_FUNCS(select, ,[ -AC_MSG_ERROR(your system must support either usleep or select) -])]) - - - - test "$cross_compiling" = "yes" || LIBS="$LIBS -L/usr/X11R6/lib" @@ -114,6 +103,13 @@ with_sdl=no fi fi +if test "$with_sdl" != yes && test "$with_sdl2" != yes ; then +AC_CHECK_FUNCS(usleep, ,[ +AC_CHECK_FUNCS(select, ,[ +AC_MSG_ERROR(your system must support either usleep or select) +])]) +fi + AC_PATH_X AH_TEMPLATE(HAVE_LIBXEXT) -- 2.11.4.GIT