Browse Source

Configure options to build --without-libmicrohttpd support

Luke Dashjr 12 years ago
parent
commit
914b8751b3
2 changed files with 19 additions and 7 deletions
  1. 2 0
      README
  2. 17 7
      configure.ac

+ 2 - 0
README

@@ -127,6 +127,8 @@ BFGMiner specific configuration options:
 	--disable-ztex          Compile support for ZTEX (default if libusb)
 	--disable-ztex          Compile support for ZTEX (default if libusb)
 	--enable-scrypt         Compile support for scrypt mining (default disabled)
 	--enable-scrypt         Compile support for scrypt mining (default disabled)
 	--without-curses        Compile support for curses TUI (default enabled)
 	--without-curses        Compile support for curses TUI (default enabled)
+	--without-libmicrohttpd Compile support for libmicrohttpd getwork server
+	                        (default enabled)
 	--without-libudev       Autodetect FPGAs using libudev (default enabled)
 	--without-libudev       Autodetect FPGAs using libudev (default enabled)
 
 
 Basic *nix build instructions:
 Basic *nix build instructions:

+ 17 - 7
configure.ac

@@ -327,13 +327,23 @@ if test "x$avalon" = xyes; then
 fi
 fi
 AM_CONDITIONAL([HAS_AVALON], [test x$avalon = xyes])
 AM_CONDITIONAL([HAS_AVALON], [test x$avalon = xyes])
 
 
-httpsrv=no
-PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd],[
-	AC_DEFINE([USE_LIBMICROHTTPD],[1],[Defined to 1 if libmicrohttpd support is wanted])
-	httpsrv=yes
-],[
-	AC_MSG_WARN([libmicrohttpd not found; getwork proxy will be unavailable])
-])
+httpsrv=auto
+AC_ARG_WITH([libmicrohttpd],
+	[AC_HELP_STRING([--without-libmicrohttpd],[Compile support for libmicrohttpd getwork server (default enabled)])],
+	[httpsrv=$withval]
+)
+if test "x$httpsrv" != "xno"; then
+	PKG_CHECK_MODULES([libmicrohttpd],[libmicrohttpd],[
+		AC_DEFINE([USE_LIBMICROHTTPD],[1],[Defined to 1 if libmicrohttpd support is wanted])
+		httpsrv=yes
+	],[
+		if test "x$httpsrv" = "xyes"; then
+			AC_MSG_ERROR([Unable to find libmicrohttpd])
+		else
+			AC_MSG_WARN([libmicrohttpd not found; getwork proxy will be unavailable])
+		fi
+	])
+fi
 AM_CONDITIONAL([USE_LIBMICROHTTPD], [test x$httpsrv = xyes])
 AM_CONDITIONAL([USE_LIBMICROHTTPD], [test x$httpsrv = xyes])
 
 
 AC_ARG_ENABLE([modminer],
 AC_ARG_ENABLE([modminer],