[MPlayer-dev-eng] [PATCH] localtime_r check needed in ./configure
Steven M. Schultz
sms at 2BSD.COM
Mon Apr 12 23:06:40 CEST 2004
Hi!
I see that libavformat from ffmpeg is being used now - cool.
But the libavfrmat/os_support.c file uses HAVE_LOCALTIME_R to
determine if a localtime_r() should be included or not.
MPlayer's ./configure needs to check for localtime_r and generate
the appropriate HAVE_LOCALTIME_R in config.h
A patch to do that is attached.
Cheers,
Steven Schultz
-------------- next part --------------
--- configure.dist Mon Apr 12 13:12:56 2004
+++ configure Mon Apr 12 13:53:27 2004
@@ -2654,6 +2654,20 @@
fi
echores "$_fseeko"
+echocheck "localtime_r()"
+cat > $TMPC << EOF
+#include <time.h>
+int main( void ) { localtime_r(NULL, NULL); }
+EOF
+_localtime_r=no
+cc_check && _localtime_r=yes
+if test "$_localtime_r" = yes ; then
+ _def_localtime_r='#define HAVE_LOCALTIME_R 1'
+else
+ _def_localtime_r='#undef HAVE_LOCALTIME_R'
+fi
+echores "$_localtime_r"
+
echocheck "vsscanf()"
cat > $TMPC << EOF
#include <stdarg.h>
@@ -6246,6 +6260,8 @@
#include <sys/types.h>
int fseeko(FILE *, off_t, int);
#endif
+
+$_def_localtime_r
/* Define this if your system has vsscanf */
$_def_vsscanf
More information about the MPlayer-dev-eng
mailing list