summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2011-10-17 23:19:48 +0000
committerChris Wilson <chris+github@qwirx.com>2011-10-17 23:19:48 +0000
commit54d73c51d78add1cfb1ef6a831402cdd95f9bac9 (patch)
treed662ea90c997920f60d0a9e859249c491704d29d /infrastructure
parent631fdd1e9e2f8a7f897bc5e3f6f490195bd180be (diff)
Patch to support building on MinGW, thanks to Paolo Tosco
(http://open3dalign.org, http://open3dqsar.org)
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/BoxPlatform.pm.in4
-rw-r--r--infrastructure/m4/boxbackup_tests.m411
2 files changed, 10 insertions, 5 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in
index c3e57a10..7cd14eac 100644
--- a/infrastructure/BoxPlatform.pm.in
+++ b/infrastructure/BoxPlatform.pm.in
@@ -24,11 +24,13 @@ BEGIN
# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
# Box Backup tried on Win2000,XP only :)
$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
+ $build_os = 'MINGW32' if $build_os =~ m/MINGW32/;
$make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
$bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&
- $build_os ne "SunOS" && $build_os ne 'GNU/kFreeBSD');
+ $build_os ne "MINGW32" && $build_os ne "SunOS"
+ && $build_os ne 'GNU/kFreeBSD');
# blank extra flags by default
$platform_compile_line_extra = '';
diff --git a/infrastructure/m4/boxbackup_tests.m4 b/infrastructure/m4/boxbackup_tests.m4
index 245c54b8..98ab7069 100644
--- a/infrastructure/m4/boxbackup_tests.m4
+++ b/infrastructure/m4/boxbackup_tests.m4
@@ -67,11 +67,14 @@ esac
### Checks for libraries.
case $target_os in
-mingw32*) ;;
-winnt) ;;
+mingw32*)
+ AC_CHECK_LIB([crypto -lws2_32 -lgdi32], [CRYPTO_lock])
+ ;;
+winnt)
+ ;;
*)
- AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes],
- [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])])
+ AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes],
+ [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])])
;;
esac