diff --git a/client/client_state.C b/client/client_state.C
index 8c01564a059..d904fdbafdc 100644
--- a/client/client_state.C
+++ b/client/client_state.C
@@ -74,7 +74,7 @@ CLIENT_STATE::CLIENT_STATE() {
core_client_version.minor = BOINC_MINOR_VERSION;
core_client_version.release = BOINC_RELEASE;
platform_name = HOSTTYPE;
-#ifdef _WIN64
+#ifdef HOSTTYPEALT
alt_platform_name = HOSTTYPEALT;
#endif
exit_after_app_start_secs = 0;
diff --git a/client/client_state.h b/client/client_state.h
index 8a10d86f813..2e44ab58495 100644
--- a/client/client_state.h
+++ b/client/client_state.h
@@ -157,7 +157,7 @@ class CLIENT_STATE {
bool run_by_updater;
double now;
const char* platform_name;
-#ifdef _WIN64
+#ifdef HOSTTYPEALT
const char* alt_platform_name;
#endif
bool initialized;
diff --git a/client/cs_scheduler.C b/client/cs_scheduler.C
index e655c002b29..651137ff7a2 100644
--- a/client/cs_scheduler.C
+++ b/client/cs_scheduler.C
@@ -112,7 +112,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
" %d\n"
" %d\n"
" %s\n"
-#ifdef _WIN64
+#ifdef HOSTTYPEALT
" \n"
" %s\n"
" \n"
@@ -130,7 +130,7 @@ int CLIENT_STATE::make_scheduler_request(PROJECT* p) {
p->hostid,
p->rpc_seqno,
p->anonymous_platform?"anonymous":platform_name,
-#ifdef _WIN64
+#ifdef HOSTTYPEALT
alt_platform_name,
#endif
core_client_version.major,
diff --git a/m4/boinc_platform.m4 b/m4/boinc_platform.m4
index 2b700a70a86..9a0ee4fc3fd 100644
--- a/m4/boinc_platform.m4
+++ b/m4/boinc_platform.m4
@@ -4,24 +4,52 @@ AC_DEFUN([BOINC_PLATFORM],[
[override the default boinc platform]),
[boinc_platform="$withval"],
[boinc_platform=])
+ AC_ARG_WITH([boinc-alt-platform],
+ AC_HELP_STRING([--with-boinc-alt-platform],
+ [override the boinc alterate platform]),
+ [boinc_alt_platform="$withval"],
+ [boinc_alt_platform=])
AC_MSG_CHECKING([boinc platform])
if test -z "${boinc_platform}" ; then
- boinc_platform=`echo $target | $SED -e 's/redhat/pc/' -e 's/[[0-9]]$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//'`
+ boinc_platform=`echo $target | $SED -e 's/redhat/pc/' -e 's/x86_64-unknown/x86_64-pc/' -e 's/[[0-9]]$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//' -e 's/\.$//' -e 's/[[0-9]]$//'`
case "${boinc_platform}" in
sparc-sun-solaris)
if test "$COMPILER_MODEL_BITS" = "64" ; then
boinc_platform=`echo $boinc_platform | $SED 's/sparc/sparc64/'`
+ if test -z "$boinc_alt_platform" ; then
+ boinc_alt_platform=sparc-sun-solaris
+ fi
+ elif test -z "$boinc_alt_platform" ; then
+ boinc_alt_platform=sparc-sun-solaris2.7
fi
;;
x86_64*linux-gnu)
if test "$COMPILER_MODEL_BITS" = "32" ; then
boinc_platform="i686-pc-linux-gnu"
+ elif test -z "$boinc_alt_platform" ; then
+ boinc_alt_platform="i686-pc-linux-gnu"
+ fi
+ ;;
+ powerpc-apple-darwin)
+ if test "$COMPILER_MODEL_BITS" = "64" ; then
+ boinc_platform="powerpc64-apple-darwin"
+ if test -z "$boinc_alt_platform" ; then
+ boinc_alt_platform="powerpc-apple-darwin"
+ fi
fi
;;
esac
fi
AC_DEFINE_UNQUOTED([HOSTTYPE],"$boinc_platform",[Platform identification used to identify applications for this BOINC core client])
AC_SUBST([boinc_platform],$boinc_platform)
- AC_MSG_RESULT($boinc_platform)
+ AC_MSG_RESULT([$boinc_platform])
+ AC_MSG_CHECKING([alternate boinc platform])
+ if test -n "$boinc_alt_platform" ; then
+ AC_DEFINE_UNQUOTED([HOSTTYPEALT],"$boinc_alt_platform",[Alternate identification used to identify applications for this BOINC core client])
+ AC_SUBST([boinc_alt_platform],$boinc_alt_platform)
+ AC_MSG_RESULT($boinc_alt_platform)
+ else
+ AC_MSG_RESULT(none)
+ fi
])
diff --git a/sched/Makefile.am b/sched/Makefile.am
index 9ff3f41787a..97052d3b0cf 100644
--- a/sched/Makefile.am
+++ b/sched/Makefile.am
@@ -33,7 +33,7 @@ EXTRA_PROGRAMS = fcgi \
# scripts that 'make install' should put in bindir
bin_SCRIPTS = start stop status
-LDADD = -L. -lsched $(MYSQL_LIBS) $(BOINC_LIB) $(PTHREAD_LIBS)
+LDADD = -L. -lsched $(MYSQL_LIBS) $(BOINC_LIB) $(PTHREAD_LIBS)
LIB_SCHED = libsched.a