Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Proper platform detection #15

Closed
wants to merge 2 commits into from

2 participants

Florian Léger Jeff Garzik
Florian Léger

Fixes compilation for i686 and possibly other platforms.
Compiles libx8664 only when the target is x86_64.

fleger added some commits
fleger Proper platform detection.
Use target instead of host.
Fix compilation for non win32 and non x86_64 platforms.
59c2045
fleger Restore jansson check d51ec47
Jeff Garzik
Owner

Rebase manually into one commit. For the future, please rebase to fold fixes for bugs you add, into the main commit itself.

Jeff Garzik jgarzik closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 11, 2011
  1. Proper platform detection.

    fleger authored
    Use target instead of host.
    Fix compilation for non win32 and non x86_64 platforms.
  2. Restore jansson check

    fleger authored
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 1 deletion.
  1. +2 −0  Makefile.am
  2. +10 −1 configure.ac
2  Makefile.am
View
@@ -22,9 +22,11 @@ minerd_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@
if HAVE_WINDOWS
else
+if HAVE_x86_64
if HAS_YASM
SUBDIRS += x86_64
minerd_LDADD += x86_64/libx8664.a
AM_CFLAGS = -DHAS_YASM
endif
endif
+endif
11 configure.ac
View
@@ -4,6 +4,7 @@ AC_PREREQ(2.52)
AC_CONFIG_SRCDIR([cpu-miner.c])
AM_INIT_AUTOMAKE([gnu])
AC_CONFIG_HEADERS([cpuminer-config.h])
+AC_CANONICAL_SYSTEM
dnl Make sure anyone changing configure.ac/Makefile.am has a clue
AM_MAINTAINER_MODE
@@ -20,12 +21,19 @@ AC_CHECK_HEADERS(syslog.h)
AC_FUNC_ALLOCA
-case $host in
+case $target in
*-*-mingw*)
+ have_x86_64=false
have_win32=true
PTHREAD_FLAGS=""
;;
+ x86_64-*)
+ have_x86_64=true
+ have_win32=false
+ PTHREAD_FLAGS="-pthread"
+ ;;
*)
+ have_x86_64=false
have_win32=false
PTHREAD_FLAGS="-pthread"
;;
@@ -37,6 +45,7 @@ AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread)
AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
AM_CONDITIONAL([HAVE_WINDOWS], [test x$have_win32 = xtrue])
+AM_CONDITIONAL([HAVE_x86_64], [test x$have_x86_64 = xtrue])
if test x$request_jansson = xtrue
then
Something went wrong with that request. Please try again.