diff options
Diffstat (limited to 'sci-libs/fftw/files')
-rw-r--r-- | sci-libs/fftw/files/fftw-3.2.1-as-needed.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/sci-libs/fftw/files/fftw-3.2.1-as-needed.patch b/sci-libs/fftw/files/fftw-3.2.1-as-needed.patch new file mode 100644 index 000000000000..ee9c12a4df59 --- /dev/null +++ b/sci-libs/fftw/files/fftw-3.2.1-as-needed.patch @@ -0,0 +1,82 @@ +diff -Nur fftw-3.2.1.orig/configure.ac fftw-3.2.1/configure.ac +--- fftw-3.2.1.orig/configure.ac 2009-02-20 19:28:55.832163268 +0000 ++++ fftw-3.2.1/configure.ac 2009-02-26 15:02:37.533259854 +0000 +@@ -440,14 +440,15 @@ + AC_ARG_WITH(combined-threads, [AC_HELP_STRING([--with-combined-threads],[combine threads into main libfftw3])], with_combined_threads=$withval, with_combined_threads=no) + + if test "$enable_openmp"x != nox; then +- AX_OPENMP([THREADLIBS=" " ++ AX_OPENMP([THREADLIBS="$OPENMP_LIBS" + AC_DEFINE(USING_OPENMP_THREADS, 1, [Define if we have and are using OpenMP multithreading directives]) + CFLAGS="$CFLAGS $OPENMP_CFLAGS"], +- [AC_MSG_ERROR([don't know how to enable OpenMP])]) ++ [AC_MSG_WARN([don't know how to enable OpenMP, reverting to POSIX threads])]) ++else ++ THREADLIBS="" + fi + + dnl Check for threads library... +-THREADLIBS="" + if test "$enable_threads" = "yes"; then + # POSIX threads, the default choice: + if test -z "$THREADLIBS"; then +diff -Nur fftw-3.2.1.orig/m4/ax_openmp.m4 fftw-3.2.1/m4/ax_openmp.m4 +--- fftw-3.2.1.orig/m4/ax_openmp.m4 2009-02-20 19:28:55.792160754 +0000 ++++ fftw-3.2.1/m4/ax_openmp.m4 2009-02-26 15:02:08.887255943 +0000 +@@ -54,13 +54,18 @@ + done + []_AC_LANG_PREFIX[]FLAGS=$save[]_AC_LANG_PREFIX[]FLAGS + ]) ++OPENMP_LIBS=" " + if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "xunknown"; then + m4_default([$2],:) + else + if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" != "xnone"; then + OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ax_cv_[]_AC_LANG_ABBREV[]_openmp ++ if test "x$ax_cv_[]_AC_LANG_ABBREV[]_openmp" = "x-fopenmp"; then ++ OPENMP_LIBS="-lgomp" ++ fi + fi + m4_default([$1], [AC_DEFINE(HAVE_OPENMP,1,[Define if OpenMP is enabled])]) + fi + AC_SUBST(OPENMP_[]_AC_LANG_PREFIX[]FLAGS) ++AC_SUBST(OPENMP_LIBS) + ])dnl AX_OPENMP +diff -Nur fftw-3.2.1.orig/Makefile.am fftw-3.2.1/Makefile.am +--- fftw-3.2.1.orig/Makefile.am 2009-02-20 19:28:56.040169973 +0000 ++++ fftw-3.2.1/Makefile.am 2009-02-26 15:02:08.887255943 +0000 +@@ -36,6 +36,13 @@ + if SMP + if COMBINED_THREADS + COMBINED_THREADLIBS=threads/libfftw3@PREC_SUFFIX@_threads.la ++else ++lib_LTLIBRARIES += libfftw3@PREC_SUFFIX@_threads.la ++libfftw3@PREC_SUFFIX@_threads_la_SOURCES = ++libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ ++libfftw3@PREC_SUFFIX@_threads_la_LIBADD = \ ++ libfftw3@PREC_SUFFIX@.la \ ++ threads/libfftw3@PREC_SUFFIX@_threads.la + endif + endif + +diff -Nur fftw-3.2.1.orig/threads/Makefile.am fftw-3.2.1/threads/Makefile.am +--- fftw-3.2.1.orig/threads/Makefile.am 2009-02-20 19:28:55.832163268 +0000 ++++ fftw-3.2.1/threads/Makefile.am 2009-02-26 15:02:08.887255943 +0000 +@@ -2,11 +2,7 @@ + -I$(top_srcdir)/rdft -I$(top_srcdir)/api + + if SMP +-if COMBINED_THREADS + noinst_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la +-else +-lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la +-endif + endif + + # pkgincludedir = $(includedir)/fftw3@PREC_SUFFIX@ +@@ -16,4 +12,5 @@ + openmp.c threads.h dft-vrank-geq1.c ct.c rdft-vrank-geq1.c hc2hc.c \ + vrank-geq1-rdft2.c f77api.c f77funcs.h + ++libfftw3@PREC_SUFFIX@_threads_la_LIBADD = $(THREADLIBS) + libfftw3@PREC_SUFFIX@_threads_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ |