summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-12-14 16:00:08 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-12-14 16:00:08 +0000
commit8c273f054451ef8ea3190e2cdc865bad291c4d88 (patch)
tree61d1a6542b0a1b044d61b70bbd5de987daf41b3e /Build/source/texk
parent87ca47281d522ade4d8596b91b04ac6354141d05 (diff)
fix FreeBSD build problems
git-svn-id: svn://tug.org/texlive/trunk@16405 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/dvisvgm/config.h.in12
-rwxr-xr-xBuild/source/texk/dvisvgm/configure28
-rw-r--r--Build/source/texk/dvisvgm/configure.ac3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog6
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-20-gettimeofday-or-ftime58
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-0.8.7/configure.ac3
-rw-r--r--Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/dvisvgm.cpp16
7 files changed, 125 insertions, 1 deletions
diff --git a/Build/source/texk/dvisvgm/config.h.in b/Build/source/texk/dvisvgm/config.h.in
index 29765f9e36b..2ce7bb5b59f 100644
--- a/Build/source/texk/dvisvgm/config.h.in
+++ b/Build/source/texk/dvisvgm/config.h.in
@@ -31,9 +31,15 @@
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
+/* Define to 1 if you have the `ftime' function. */
+#undef HAVE_FTIME
+
/* Define to 1 if you have the `getcwd' function. */
#undef HAVE_GETCWD
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
/* Define to 1 if you have the `getwd' function. */
#undef HAVE_GETWD
@@ -136,6 +142,12 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
diff --git a/Build/source/texk/dvisvgm/configure b/Build/source/texk/dvisvgm/configure
index c56d031a3ae..1e66d94eddb 100755
--- a/Build/source/texk/dvisvgm/configure
+++ b/Build/source/texk/dvisvgm/configure
@@ -15762,6 +15762,34 @@ if test "$ac_res" != no; then :
fi
+for ac_func in ftime gettimeofday
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_header in sys/time.h sys/timeb.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
## _KPSE_INIT: Initialize TL infrastructure
kpse_BLD=`(cd "./../../." && pwd)`
kpse_SRC=`(cd "$srcdir/../../." && pwd)`
diff --git a/Build/source/texk/dvisvgm/configure.ac b/Build/source/texk/dvisvgm/configure.ac
index f5bb7942eeb..8301b3e14f3 100644
--- a/Build/source/texk/dvisvgm/configure.ac
+++ b/Build/source/texk/dvisvgm/configure.ac
@@ -37,6 +37,9 @@ AC_DEFINE_UNQUOTED([TARGET_SYSTEM], ["$target"],
AC_SEARCH_LIBS([sqrt], [m])
+AC_CHECK_FUNCS([ftime gettimeofday])
+AC_CHECK_HEADERS([sys/time.h sys/timeb.h])
+
KPSE_KPATHSEA_FLAGS
KPSE_ZLIB_FLAGS
KPSE_FREETYPE2_FLAGS
diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog
index 1508a5650ad..59b110e6c6c 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog
+++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-14 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Added patch-20-gettimeofday-or-ftime.
+ * configure.ac, src/dvisvgm.cpp: Check for gettimeofday()
+ and <sys/time.h> or ftime() and <sys/timeb.h>.
+
2009-11-18 Peter Breitenlohner <peb@mppmu.mpg.de>
Added patch-05-libdvisvgm-dlfcn.
diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-20-gettimeofday-or-ftime b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-20-gettimeofday-or-ftime
new file mode 100644
index 00000000000..891117407da
--- /dev/null
+++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7-PATCHES/patch-20-gettimeofday-or-ftime
@@ -0,0 +1,58 @@
+ Use gettimeofday(), ftime(), or time(), as available.
+
+diff -ur dvisvgm-0.8.7.orig/configure.ac dvisvgm-0.8.7/configure.ac
+--- dvisvgm-0.8.7.orig/configure.ac 2009-11-09 18:17:17.000000000 +0100
++++ dvisvgm-0.8.7/configure.ac 2009-12-14 14:23:12.000000000 +0100
+@@ -22,6 +22,9 @@
+ AC_PROG_RANLIB
+ AC_LANG(C)
+
++AC_CHECK_FUNCS([ftime gettimeofday])
++AC_CHECK_HEADERS([sys/time.h sys/timeb.h])
++
+ # Check whether MikTeX import libraries should be linked
+ case $host in
+ *-mingw32* | *-windows*)
+diff -ur dvisvgm-0.8.7.orig/src/dvisvgm.cpp dvisvgm-0.8.7/src/dvisvgm.cpp
+--- dvisvgm-0.8.7.orig/src/dvisvgm.cpp 2009-11-13 14:49:31.000000000 +0100
++++ dvisvgm-0.8.7/src/dvisvgm.cpp 2009-12-14 14:37:35.000000000 +0100
+@@ -23,7 +23,6 @@
+ #include <iostream>
+ #include <sstream>
+ #include <string>
+-#include <sys/timeb.h>
+ #include <time.h>
+ #include "gzstream.h"
+ #include "CommandLine.h"
+@@ -46,6 +45,12 @@
+ #define EMAIL "Martin Gieseking <martin.gieseking@uos.de>"
+ #endif
+
++#if defined (HAVE_SYS_TIME_H)
++#include <sys/time.h>
++#elif defined (HAVE_SYS_TIMEB_H)
++#include <sys/timeb.h>
++#endif
++
+ using namespace std;
+
+
+@@ -106,9 +111,18 @@
+
+ /** Returns timestamp (wall time) in seconds. */
+ static double get_time () {
++#if defined (HAVE_SYS_TIME_H)
++ struct timeval tv;
++ gettimeofday(&tv, NULL);
++ return tv.tv_sec + tv.tv_usec/1000000.0;
++#elif defined (HAVE_SYS_TIMEB_H)
+ struct timeb tb;
+ ftime(&tb);
+ return tb.time + tb.millitm/1000.0;
++#else
++ time_t myclock = time((time_t*)NULL);
++ return myclock;
++#endif
+ }
+
+
diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/configure.ac b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/configure.ac
index 2ce6615afe2..a706c0191ea 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/configure.ac
+++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/configure.ac
@@ -22,6 +22,9 @@ AC_PROG_CC
AC_PROG_RANLIB
AC_LANG(C)
+AC_CHECK_FUNCS([ftime gettimeofday])
+AC_CHECK_HEADERS([sys/time.h sys/timeb.h])
+
# Check whether MikTeX import libraries should be linked
case $host in
*-mingw32* | *-windows*)
diff --git a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/dvisvgm.cpp b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/dvisvgm.cpp
index b51c16d736b..0659e192418 100644
--- a/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/dvisvgm.cpp
+++ b/Build/source/texk/dvisvgm/dvisvgm-0.8.7/src/dvisvgm.cpp
@@ -23,7 +23,6 @@
#include <iostream>
#include <sstream>
#include <string>
-#include <sys/timeb.h>
#include <time.h>
#include "gzstream.h"
#include "CommandLine.h"
@@ -46,6 +45,12 @@
#define EMAIL "Martin Gieseking <martin.gieseking@uos.de>"
#endif
+#if defined (HAVE_SYS_TIME_H)
+#include <sys/time.h>
+#elif defined (HAVE_SYS_TIMEB_H)
+#include <sys/timeb.h>
+#endif
+
using namespace std;
@@ -106,9 +111,18 @@ static string remove_suffix (string fname) {
/** Returns timestamp (wall time) in seconds. */
static double get_time () {
+#if defined (HAVE_SYS_TIME_H)
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return tv.tv_sec + tv.tv_usec/1000000.0;
+#elif defined (HAVE_SYS_TIMEB_H)
struct timeb tb;
ftime(&tb);
return tb.time + tb.millitm/1000.0;
+#else
+ time_t myclock = time((time_t*)NULL);
+ return myclock;
+#endif
}