Browse Source

Win32 does not use dlopen so link in -ldl only when not on win32 and display what ldflags are being passed on ./configure.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
c8d40fb434
  1. 2
      Makefile.am
  2. 6
      configure.ac

2
Makefile.am

@ -27,7 +27,7 @@ cgminer_SOURCES = elist.h miner.h compat.h bench_block.h \ @@ -27,7 +27,7 @@ cgminer_SOURCES = elist.h miner.h compat.h bench_block.h \
adl.c adl.h adl_functions.h \
phatk110817.cl poclbm110817.cl
cgminer_LDFLAGS = $(PTHREAD_FLAGS) -ldl
cgminer_LDFLAGS = $(PTHREAD_FLAGS) $(DLOPEN_FLAGS)
cgminer_LDADD = @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @OPENCL_LIBS@ @NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ lib/libgnu.a ccan/libccan.a
cgminer_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib

6
configure.ac

@ -62,6 +62,7 @@ AC_FUNC_ALLOCA @@ -62,6 +62,7 @@ AC_FUNC_ALLOCA
have_win32=false
PTHREAD_FLAGS="-pthread"
DLOPEN_FLAGS="-ldl"
OPENCL_FLAGS="-lOpenCL"
WS2_LIBS=""
@ -79,6 +80,7 @@ case $target in @@ -79,6 +80,7 @@ case $target in
have_x86_64=false
have_win32=true
PTHREAD_FLAGS=""
DLOPEN_FLAGS=""
WS2_LIBS="-lws2_32"
;;
*-*-darwin*)
@ -130,6 +132,8 @@ if test "$found_opencl" = 1; then @@ -130,6 +132,8 @@ if test "$found_opencl" = 1; then
if test x$have_adl = xtrue
then
AC_DEFINE([HAVE_ADL], [1], [Defined if ADL headers were found])
else
DLOPEN_FLAGS=""
fi
fi
fi
@ -287,7 +291,7 @@ echo @@ -287,7 +291,7 @@ echo
echo "Compilation............: make (or gmake)"
echo " CPPFLAGS.............: $CPPFLAGS"
echo " CFLAGS...............: $CFLAGS"
echo " LDFLAGS..............: $LDFLAGS"
echo " LDFLAGS..............: $LDFLAGS $PTHREAD_FLAGS $DLOPEN_FLAGS"
echo
echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
echo " prefix...............: $prefix"

Loading…
Cancel
Save