Browse Source

Changes to build prototypes to support building on FreeBSD 9.1-RC2 amd64

* Bashism in configure:
./configure: ${ac_cv_search_addstr:2}: Bad substitution

* Configure finds libcurl in /usr/local, but /usr/local/include isn't in CFLAGS:
cgminer.c:39:10: fatal error: 'curl/curl.h' file not found

* Configure misdetects amd64 as 32-bit; fails when trying to link in sse2_64:
cgminer-sha256_sse2_amd64.o: In function `scanhash_sse2_64':
./cgminer/sha256_sse2_amd64.c:98: undefined reference to `sha256_sse2_64_new'
cgminer-sha256_sse4_amd64.o: In function `scanhash_sse4_64':
./cgminer/sha256_sse4_amd64.c:96: undefined reference to `CalcSha256_x64_sse4'
./cgminer/sha256_sse4_amd64.c:97: undefined reference to `CalcSha256_x64_sse4'
CyberLeo 13 years ago
parent
commit
ca0b68974a
2 changed files with 6 additions and 2 deletions
  1. 1 1
      Makefile.am
  2. 5 1
      configure.ac

+ 1 - 1
Makefile.am

@@ -20,7 +20,7 @@ bfgminer_LDADD	= $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
 		  @TIMER_LIBS@ \
 		  @UDEV_LIBS@ @USB_LIBS@ \
 		  @MATH_LIBS@ lib/libgnu.a ccan/libccan.a
-bfgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib
+bfgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @LIBCURL_CFLAGS@
 
 bfgminer_CPPFLAGS += $(NCURSES_CPPFLAGS)
 

+ 5 - 1
configure.ac

@@ -73,6 +73,9 @@ TIMER_LIBS=""
 MATH_LIBS="-lm"
 
 case $target in
+  amd64-*)
+    have_x86_64=true
+    ;;
   x86_64-*)
     have_x86_64=true
     ;;
@@ -270,7 +273,8 @@ else
 
 	AC_SEARCH_LIBS(addstr, ncursesw ncurses pdcurses, [
 		curses=yes
-		cursesmsg="FOUND: ${ac_cv_search_addstr:2}"
+		cursesmsg="FOUND: ${ac_cv_search_addstr}"
+		cursesmsg="${cursesmsg/-l/}"
 	], [
 		if test "x$curses" = "xyes"; then
 			AC_MSG_ERROR([Could not find curses library - please install libncurses-dev or pdcurses-dev (or configure --without-curses)])