Skip to content

Commit 68ba4e2

Browse files
committed
update configure files
1 parent 70a60ba commit 68ba4e2

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

acx_pthread.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ case "${host_cpu}-${host_os}" in
7474
7575
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
7676
;;
77+
*mingw*)
78+
acx_pthread_flags="none"
79+
;;
7780
esac
7881
7982
if test x"$acx_pthread_ok" = xno; then

configure.ac

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,7 @@ AC_CHECK_TOOL([OBJCOPY], [objcopy])
900900
AC_CHECK_TOOL([OBJDUMP], [objdump])
901901
AC_CHECK_TOOL([RANLIB], [ranlib])
902902
AC_CHECK_TOOL([READELF], [readelf])
903+
AC_CHECK_TOOL([WINDRES], [windres])
903904
LT_INIT([dlopen win32-dll])
904905

905906
dnl Check for system header files
@@ -1089,6 +1090,7 @@ fi
10891090
AC_LANG_POP(C++)
10901091

10911092
dnl Check for functions
1093+
if test $PLATFORM != win32; then
10921094
AC_CHECK_FUNCS(gettimeofday)
10931095
if test "$ac_cv_func_gettimeofday" = "yes"; then
10941096
AC_MSG_CHECKING(if gettimeofday accepts second (timezone) argument)
@@ -1101,6 +1103,7 @@ if test "$ac_cv_func_gettimeofday" = "yes"; then
11011103
#define GETTIMEOFDAY(x) gettimeofday((x))
11021104
#endif])
11031105
fi
1106+
fi
11041107
AC_CHECK_FUNCS(time times)
11051108
AC_CHECK_FUNCS(nanosleep)
11061109
AC_SEARCH_LIBS(gethostname,nsl)
@@ -1171,6 +1174,7 @@ dnl Check for time function
11711174
AC_SEARCH_LIBS(clock_gettime, rt)
11721175
AC_CHECK_FUNCS(clock_gettime)
11731176

1177+
if test $PLATFORM != win32; then
11741178
dnl Checks for pthread functions
11751179
AC_CHECK_FUNCS(pthread_mutexattr_setprotocol)
11761180
AC_CHECK_FUNCS(pthread_mutexattr_setrobust_np)
@@ -1209,6 +1213,7 @@ if test "$ac_cv_header_iconv_h" = "yes"; then
12091213
AC_SEARCH_LIBS(iconv_open, iconv)
12101214
AC_SEARCH_LIBS(libiconv_open, iconv)
12111215
fi
1216+
fi
12121217

12131218
dnl HPUX has a bug in .h files. To detect it we need C++ here.
12141219
AC_LANG_PUSH(C++)
@@ -1344,7 +1349,7 @@ case "$PLATFORM" in
13441349
;;
13451350

13461351
win32)
1347-
XE_PREPEND( -mthreads -lmpr -lversion -lws2_32 -lole32,LIBS)
1352+
XE_PREPEND( -lmpr -lversion -lws2_32 -lole32,LIBS)
13481353
;;
13491354

13501355
*)

src/misc/writeBuildNum.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,16 @@ grep ODS_VERSION $OdsH | grep -v ENCODE_ODS >$Mini
105105
cat >$TestCpp <<eof
106106
#include <stdlib.h>
107107
typedef unsigned short USHORT;
108+
#ifdef __MINGW32__
109+
#include "miniods.h"
110+
#else
108111
#include "$Mini"
112+
#endif
109113
int main()
110114
{ return ODS_VERSION; }
111115
eof
112116

113-
[ -z "$CXX" ] && CXX=g++
117+
[ -z "$CXX" ] && CXX=g++ && CXX=c++
114118

115119
$CXX -std=c++17 $TestCpp -o $AOut
116120
if [ -x $AOut ]

0 commit comments

Comments
 (0)