Workaround for a problem with FFTW3 threads in some external plugins... needs to be really fixed at some point.

This commit is contained in:
nemu
2009-12-23 13:28:49 +00:00
parent 1c3f08e03e
commit 19dee34c22
3 changed files with 34 additions and 4 deletions

View File

@ -40,7 +40,7 @@ MUD_MINOR_VERSION=0
MUD_MICRO_VERSION=0
#release versioning
PLUGIN_MAJOR_VERSION=0
PLUGIN_MAJOR_VERSION=1
PLUGIN_MINOR_VERSION=0
PLUGIN_MICRO_VERSION=0
@ -180,7 +180,6 @@ fi
AC_SUBST(FFTW3_LIBS)
AC_SUBST(FFTW3_CFLAGS)
dnl -----------------------------------------------
dnl Ask user for path to gsl
dnl -----------------------------------------------
@ -332,6 +331,37 @@ AC_ARG_ENABLE([BMWlibs], [AC_HELP_STRING([--enable-BMWlibs],[build optional BMW
fi
AC_SUBST(CUBA_LIBS)
AC_SUBST(CUBA_CFLAGS)
# Since it is not clear to me, how to use the AC_SEARCH_LIBS macro correctly, I introduce a primitive file check here...
FFTW3_THREADS_LIBS=$(echo ${FFTW3_LIBS} | grep "lfftw3_threads")
if test "$FFTW3_THREADS_LIBS" == ""; then
if [test -r ${FFTW3_PREFIX}/lib/libfftw3_threads.a || test -r ${FFTW3_PREFIX}/lib/libfftw3_threads.so || \
test -r ${FFTW3_PREFIX}/lib/libfftw3_threads.dll.a || test -r ${FFTW3_PREFIX}/lib/libfftw3_threads.dll || \
test -r ${FFTW3_PREFIX}/lib/libfftw3_threads.dylib]; then
AC_MSG_RESULT([FFTW3 threads library found... OK])
elif [test -r /usr/local/lib/libfftw3_threads.a || test -r /usr/local/lib/libfftw3_threads.so || \
test -r /usr/local/lib/libfftw3_threads.dll.a || test -r /usr/local/lib/libfftw3_threads.dll || \
test -r /usr/local/lib/libfftw3_threads.dylib]; then
AC_MSG_RESULT([FFTW3 threads library found... OK])
elif [test -r /usr/lib/libfftw3_threads.a || test -r /usr/lib/libfftw3_threads.so || \
test -r /usr/lib/libfftw3_threads.dll.a || test -r /usr/lib/libfftw3_threads.dll || \
test -r /usr/lib/libfftw3_threads.dylib]; then
AC_MSG_RESULT([FFTW3 threads library found... OK])
elif [test -r /sw/lib/libfftw3_threads.a || test -r /sw/lib/libfftw3_threads.so || \
test -r /sw/lib/libfftw3_threads.dll.a || test -r /sw/lib/libfftw3_threads.dll || \
test -r /sw/lib/libfftw3_threads.dylib]; then
AC_MSG_RESULT([FFTW3 threads library found... OK])
elif [test -r /opt/local/lib/libfftw3_threads.a || test -r /opt/local/lib/libfftw3_threads.so || \
test -r /opt/local/lib/libfftw3_threads.dll.a || test -r /opt/local/lib/libfftw3_threads.dll || \
test -r /opt/local/lib/libfftw3_threads.dylib]; then
AC_MSG_RESULT([FFTW3 threads library found... OK])
else
AC_MSG_WARN([FFTW3 threads library not found. Please check! The BMWlibs will not run without it at the moment!])
fi
FFTW3_THREADS_LIBS="${FFTW3_LIBS} -lfftw3_threads -lpthread"
fi
AC_SUBST(FFTW3_THREADS_LIBS)
BUILD_BMW_LIBS=1
],
[BUILD_BMW_LIBS=0]

View File

@ -56,7 +56,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
lib_LTLIBRARIES = libTFitPofB.la
libTFitPofB_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
libTFitPofB_la_LIBADD = $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_LIBS) $(ROOT_LIBS)
libTFitPofB_la_LIBADD = $(LEM_LIBS) $(PMUSR_LIBS) $(FFTW3_THREADS_LIBS) $(ROOT_LIBS)
libTFitPofB_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
## For the moment do not build pkgconfig files for musrfit plug-ins...

View File

@ -33,7 +33,7 @@ CLEANFILES = *Dict.cpp *Dict.h *~ core
lib_LTLIBRARIES = libLFRelaxation.la
libLFRelaxation_la_SOURCES = $(h_sources) $(cpp_sources) $(dict_h_sources) $(dict_cpp_sources)
libLFRelaxation_la_LIBADD = $(PMUSR_LIBS) $(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
libLFRelaxation_la_LIBADD = $(PMUSR_LIBS) $(FFTW3_THREADS_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(CUBA_LIBS)
libLFRelaxation_la_LDFLAGS = -version-info $(PLUGIN_LIBRARY_VERSION) -release $(PLUGIN_RELEASE) $(AM_LDFLAGS)
## For the moment do not build pkgconfig files for musrfit plug-ins...