freeciv: Remove unused CacheVarForGettimeofday.patch

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
This commit is contained in:
Marko Lindqvist
2022-10-24 03:45:37 +03:00
parent 812ef402b8
commit e1ea826fcf

View File

@@ -1,53 +0,0 @@
diff --git a/configure.ac b/configure.ac
index ee311c6fb3..655c45c425 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,9 +1478,9 @@ CPPFLAGS="$CPPFLAGS -Werror $EXTRA_DEBUG_CFLAGS"
AC_CHECK_FUNCS([_mkdir])
CPPFLAGS="$fc_save_CPPFLAGS"
-AC_MSG_CHECKING(for working gettimeofday)
- FC_CHECK_GETTIMEOFDAY_RUNTIME(,AC_DEFINE([HAVE_GETTIMEOFDAY], [1],
- [Define if the gettimeofday function works and is sane.]),)
+FC_CHECK_GETTIMEOFDAY_RUNTIME([],
+ [AC_DEFINE([HAVE_GETTIMEOFDAY], [1],
+ [Define if the gettimeofday function works and is sane.])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netinet/in.h>]],
[[struct ip_mreqn req; req.imr_ifindex = 0;]])],
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
index a0601c4b79..bb5cede0eb 100644
--- a/m4/gettimeofday.m4
+++ b/m4/gettimeofday.m4
@@ -6,6 +6,8 @@ dnl a huge amount. It seems that glibc 2.3.1 is broken in this respect.
AC_DEFUN([FC_CHECK_GETTIMEOFDAY_RUNTIME],
[
+AC_CACHE_CHECK([for working gettimeofday], [ac_cv_working_gettimeofday],
+[
templibs="$LIBS"
LIBS="$1 $LIBS"
AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -101,9 +103,17 @@ int main(int argc, char **argv)
#endif
return 0;
}
-]])],[AC_MSG_RESULT(yes)
- [$2]],[AC_MSG_RESULT(no)
- [$3]],[AC_MSG_RESULT(unknown: cross-compiling)
- [$3]])
-LIBS="$templibs"
+]])],
+[ac_cv_working_gettimeofday=yes],
+[ac_cv_working_gettimeofday=no],
+[ac_cv_working_gettimeofday=cross-compiling])
+LIBS="$templibs"])
+
+if test "x$ac_cv_working_gettimeofday" = "xyes" ; then
+ $2
+ :
+else
+ $3
+ :
+fi
])