diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2008-07-02 09:20:22 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2008-07-02 09:20:22 +0000 |
commit | c36e36de9920e2560440847fa5e1cd76adc20586 (patch) | |
tree | 9cf022c9df00ff9cc1f2b938d8aeb5373bd6e886 /sci-libs | |
parent | Added openmp local USE flag for sci-libs/fftw (diff) | |
download | historical-c36e36de9920e2560440847fa5e1cd76adc20586.tar.gz historical-c36e36de9920e2560440847fa5e1cd76adc20586.tar.bz2 historical-c36e36de9920e2560440847fa5e1cd76adc20586.zip |
Added openmp support for both fftw-2 and fftw-3. Added as-needed fixes for fftw-3, needed for threads support. Added a doc use flag for fftw-3.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/fftw/ChangeLog | 12 | ||||
-rw-r--r-- | sci-libs/fftw/Manifest | 16 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-2.1.5-r5.ebuild | 129 | ||||
-rw-r--r-- | sci-libs/fftw/fftw-3.1.2-r1.ebuild | 119 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-2.1.5-configure.in.patch | 29 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-3.1.2-as-needed.patch | 35 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-3.1.2-configure.ac.patch | 13 | ||||
-rw-r--r-- | sci-libs/fftw/files/fftw-3.1.2-openmp.patch | 12 |
8 files changed, 350 insertions, 15 deletions
diff --git a/sci-libs/fftw/ChangeLog b/sci-libs/fftw/ChangeLog index 93c99bca0a48..a1bde79e6c27 100644 --- a/sci-libs/fftw/ChangeLog +++ b/sci-libs/fftw/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sci-libs/fftw # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.66 2008/06/23 14:31:13 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.67 2008/07/02 09:20:22 bicatali Exp $ + +*fftw-3.1.2-r1 (02 Jul 2008) +*fftw-2.1.5-r5 (02 Jul 2008) + + 02 Jul 2008; Sébastien Fabbro <bicatali@gentoo.org> + files/fftw-2.1.5-configure.in.patch, +files/fftw-3.1.2-as-needed.patch, + files/fftw-3.1.2-configure.ac.patch, +files/fftw-3.1.2-openmp.patch, + +fftw-2.1.5-r5.ebuild, +fftw-3.1.2-r1.ebuild: + Added openmp support for both fftw-2 and fftw-3. Added as-needed fixes for + fftw-3, needed for threads support. Added a doc use flag for fftw-3. 23 Jun 2008; Sébastien Fabbro <bicatali@gentoo.org> +files/fftw-2.1.5-no-test.patch, fftw-2.1.5-r4.ebuild, fftw-3.1.2.ebuild: diff --git a/sci-libs/fftw/Manifest b/sci-libs/fftw/Manifest index 89541145fe27..9f8ee1e11a3e 100644 --- a/sci-libs/fftw/Manifest +++ b/sci-libs/fftw/Manifest @@ -2,19 +2,23 @@ Hash: SHA1 AUX fftw-2.1.5-as-needed.patch 4374 RMD160 b9bc387a322cec9d36d7d7ff54e556e907767742 SHA1 3274a914d3532190fb8c2c96d944c85b5ab47237 SHA256 b1d65b2dca62257db5c78e81577fb87b7d79f6eb75b8899de48faabfc702e9f0 -AUX fftw-2.1.5-configure.in.patch 6456 RMD160 18d01f44617cc5d7bfd7c34d944caefcd6fd2be0 SHA1 8ebbf4fd43558bd2ec3a9f7402be78d75074eabe SHA256 04aa10f41edb1e5a1c4513021f24fe953c7f2a740a4d15363a6ae24b94bf2a3e +AUX fftw-2.1.5-configure.in.patch 7039 RMD160 dd7e27aae926d4d736efadc43355d80b330bb5f0 SHA1 93290c9d2e553293e9377e50ac0ad8a46aad5ea4 SHA256 5d31a7aa798febdaad0d59679d2540e69bf8bec68cb0cbfaf4e597a7ae7c964e AUX fftw-2.1.5-no-test.patch 1592 RMD160 86ec7b7fd58a1c67ecc7b53f4927bb23cf88d668 SHA1 356283400cd80bcdd90d32a6dee0aa43d34cfe4f SHA256 e56d733196008b8d0366cae20a3d1966cc4f16d2276a93c37b59086a8322b83a -AUX fftw-3.1.2-configure.ac.patch 523 RMD160 1b4936d4bdbdc0ee7c39a6b54a3d27a681013a4f SHA1 f77634e1cc92d1e42c368cdfd78af995fcbfa6e2 SHA256 e203086198ec9cb65caddb432dcfe2cc207bb197d22c7ca21c0bc37a0c725ea5 +AUX fftw-3.1.2-as-needed.patch 1199 RMD160 9132ee7cb555967dd852dd2a9be11a7b13dd900b SHA1 abace49a909a24a735c4768b0454c7b8b560f443 SHA256 5d5e6ff5dff0faa01f7dd81634c5f4a9bc1e0532161ece7112f514dedfe0ff03 +AUX fftw-3.1.2-configure.ac.patch 924 RMD160 eedb92c6ad39fd6ba4daefec3cb910f507eb5add SHA1 03fa6d09a1408e129a1eeff190c17d8051406245 SHA256 2d239069d4d3cef3781fc2b5aa68289b6c5591f3c0d84982f3251f0a3505bc6e +AUX fftw-3.1.2-openmp.patch 473 RMD160 f369626bf8a923b71f92607f5691990d5cb1ac33 SHA1 762b373c14905865da3c018544356a55fd43822c SHA256 c0d1dcebf0a6438e406e14aa22cd697fb06195b9f32dc607301e0e27967d53be DIST fftw-2.1.5.tar.gz 1256888 RMD160 723308722d76c12710db6473979adf8d086b0909 SHA1 12020b58edc1b0490a83db4aa912fac5dfdfb26b SHA256 f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630 DIST fftw-3.1.2.tar.gz 2736360 RMD160 13069b3582eeaa1fba1614cdca2dfbc2e45ab585 SHA1 3e4c64009ffb48123a0f30f46c1d89da7810dc67 SHA256 e1b92e97fe27efcbd150212d0d287ac907bd2fef0af32e16284fef5d1c1c26bf EBUILD fftw-2.1.5-r4.ebuild 3435 RMD160 6dec3455cbb6e4804d1d0899a9816a7c771aef03 SHA1 e385b611622d2f4fa0f5c16bdf12df516fb60ade SHA256 9cc764af059cd98c3902d0e483b4f909b6269824a43201f9a776ff30541b8e10 +EBUILD fftw-2.1.5-r5.ebuild 3463 RMD160 e262b984ef21804780fc96590dc439619f4dac18 SHA1 e9de3617f4aec410583d270f25424bb34e0970eb SHA256 dc817da9017629c671875772d0afd44729fe536576222ade46d9f50f15677794 +EBUILD fftw-3.1.2-r1.ebuild 3252 RMD160 61923adace2d8b98355cc9cb06eed8f792d77173 SHA1 349cfe59d857f8a6819ef96ee52b708c495578ab SHA256 188188bddbed0bb57fa8d401673767014d871f8e113537ebb03af1bb8e794068 EBUILD fftw-3.1.2.ebuild 3028 RMD160 ccae2a7aa9987a6dadac0de1b6c22d70f267c14d SHA1 a099a89a2fe1164b78b05b2a41d29b4a8c4a776a SHA256 96b29aa7df715b9765596d0e9c69a69013232e412d255afbc71e58feb3160804 -MISC ChangeLog 14489 RMD160 a5d23ba48a849d66ff2384beaae052266d4051df SHA1 adfbb6e5d8c61017246a69018684a4ad3158c99e SHA256 24bac7fcd6cf0ad9b4a237f8d93c0448de6416541e3b214453761022dfd346f6 +MISC ChangeLog 14945 RMD160 75c0a5a8eb9bda7cf1cc79412abd036bc9f2acb1 SHA1 b523011778ba2c38dc35712f021341d6a6bda3cf SHA256 c54cbd7dadcaebaf3a78de1844a58f2f9d301c05829c6ab494506cfa39756276 MISC metadata.xml 637 RMD160 a7f1ab3fce5eae79531875234ca77532d0fd2cfa SHA1 b1cce6af4d119fc1b4f640b33e4ef1a8318a736c SHA256 a2798427fe8d4cbe97cf588e66bf54cc37d9650b9451290c2b6846cc6bb81e50 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkhftCYACgkQ1ycZbhPLE2BXVQCeOWU6V5SDPguTSYvx193xXUd1 -MqsAn2FCx/0gYFZ2pCm5g/kVRPZ3Y1kP -=qxCV +iEYEARECAAYFAkhrSGAACgkQ1ycZbhPLE2BXgACeM77buPWt8abmlgw4g4/BOvqV +BGUAn1t2FkfISoKdZyIKRlDsgm5lZf3O +=u3fC -----END PGP SIGNATURE----- diff --git a/sci-libs/fftw/fftw-2.1.5-r5.ebuild b/sci-libs/fftw/fftw-2.1.5-r5.ebuild new file mode 100644 index 000000000000..a5ec2b4e6b7d --- /dev/null +++ b/sci-libs/fftw/fftw-2.1.5-r5.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r5.ebuild,v 1.1 2008/07/02 09:20:22 bicatali Exp $ + +inherit eutils flag-o-matic multilib autotools fortran + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +SRC_URI="http://www.fftw.org/${P}.tar.gz" +HOMEPAGE="http://www.fftw.org" + +# hppa does not have yet a virtual/mpi +DEPEND="mpi? ( virtual/mpi )" + +SLOT="2.1" +LICENSE="GPL-2" +IUSE="doc float fortran mpi openmp threads" + +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +pkg_setup() { + # this one is reported to cause trouble on pentium4 m series + filter-mfpmath "sse" + + # here I need (surprise) to increase optimization: + # --enable-i386-hacks requires -fomit-frame-pointer to work properly + if [ "${ARCH}" == "x86" ]; then + is-flag "-fomit-frame-pointer" || append-flags "-fomit-frame-pointer" + fi + FORTRAN="gfortran ifc g77" + use fortran && fortran_pkg_setup +} + +src_unpack() { + # doc suggests installing single and double precision versions + # via separate compilations. will do in two separate source trees + # since some sed'ing is done during the build + # (?if --enable-type-prefix is set?) + + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-as-needed.patch + epatch "${FILESDIR}"/${P}-configure.in.patch + epatch "${FILESDIR}"/${P}-no-test.patch + + # fix info files + for infofile in doc/fftw*info*; do + cat >> ${infofile} <<-EOF + INFO-DIR-SECTION Libraries + START-INFO-DIR-ENTRY + * fftw: (fftw). ${DESCRIPTION} + END-INFO-DIR-ENTRY + EOF + done + + eautoreconf + + cd "${WORKDIR}" + cp -R ${P} ${P}-double + mv ${P} ${P}-single +} + +src_compile() { + cd "${S}-single" + econf \ + --enable-float \ + --enable-shared \ + --enable-type-prefix \ + --enable-vec-recurse \ + $(use_enable threads) \ + $(use_with openmp) \ + $(use_enable fortran) \ + $(use_enable mpi) \ + $(use_enable x86 i386-hacks) \ + || die "econf for float failed" + emake || die "emake for float failed" + + # the only difference here is no --enable-float + cd "${S}-double" + econf \ + --enable-shared \ + --enable-type-prefix \ + --enable-vec-recurse \ + $(use_enable threads) \ + $(use_with openmp) \ + $(use_enable fortran) \ + $(use_enable mpi) \ + $(use_enable x86 i386-hacks) \ + || die "econf for double failed" + emake || die "emake for double failed" +} + +src_test() { + cd "${S}-single" + emake -j1 check || die "emake check single failed" + cd "${S}-double" + emake -j1 check || die "emake check double failed" +} + +src_install () { + + # both builds are installed in the same place + # libs are distinguished by prefix (s or d), see docs for details + + cd "${S}-single" + emake DESTDIR="${D}" install || die "emake install float failed" + insinto /usr/include + doins fortran/fftw_f77.i || die "doins failed" + dodoc AUTHORS ChangeLog NEWS TODO README README.hacks || die "dodoc failed" + use doc && dohtml doc/* + + cd "${S}-double" + emake DESTDIR="${D}" install || die "emake install double failed" + + if use float; then + for f in "${D}"/usr/{include,$(get_libdir)}/*sfft*; do + ln -s $(basename ${f}) ${f/sfft/fft} + done + for f in "${D}"/usr/{include,$(get_libdir)}/*srfft*; do + ln -s $(basename ${f}) ${f/srfft/rfft} + done + else + for f in "${D}"/usr/{include,$(get_libdir)}/*dfft*; do + ln -s $(basename ${f}) ${f/dfft/fft} + done + for f in "${D}"/usr/{include,$(get_libdir)}/*drfft*; do + ln -s $(basename ${f}) ${f/drfft/rfft} + done + fi +} diff --git a/sci-libs/fftw/fftw-3.1.2-r1.ebuild b/sci-libs/fftw/fftw-3.1.2-r1.ebuild new file mode 100644 index 000000000000..3989ae95b521 --- /dev/null +++ b/sci-libs/fftw/fftw-3.1.2-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.1.2-r1.ebuild,v 1.1 2008/07/02 09:20:22 bicatali Exp $ + +inherit flag-o-matic eutils toolchain-funcs autotools fortran + +DESCRIPTION="Fast C library for the Discrete Fourier Transform" +HOMEPAGE="http://www.fftw.org/" +SRC_URI="http://www.fftw.org/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="3.0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="altivec doc fortran openmp sse sse2 threads" + +pkg_setup() { + FORTRAN="gfortran ifc g77" + use fortran && fortran_pkg_setup +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-configure.ac.patch + epatch "${FILESDIR}"/${P}-openmp.patch + epatch "${FILESDIR}"/${P}-as-needed.patch + + # fix info file + sed -e 's/Texinfo documentation system/Libraries/' \ + -i doc/fftw3.info || die "failed to fix info file" + AT_M4DIR=m4 eautoreconf + cd "${WORKDIR}" + mv ${P} ${P}-single + cp -pPR ${P}-single ${P}-double + cp -pPR ${P}-single ${P}-longdouble +} + +src_compile() { + # filter -Os according to docs + replace-flags -Os -O2 + + local myconfcommon="--enable-shared + $(use_with openmp) + $(use_enable threads) + $(use_enable fortran)" + local myconfsingle="" + local myconfdouble="" + local myconflongdouble="" + + if use sse2; then + myconfsingle="${myconfsingle} --enable-sse" + myconfdouble="${myconfdouble} --enable-sse2" + elif use sse; then + myconfsingle="${myconfsingle} --enable-sse" + fi + # altivec only helps floats, not doubles + if use altivec; then + myconfsingle="${myconfsingle} --enable-altivec" + fi + + cd "${S}-single" + econf \ + --enable-float \ + ${myconfcommon} \ + ${myconfsingle} || \ + die "econf single failed" + emake || die "emake single failed" + + # the only difference here is no --enable-float + cd "${S}-double" + econf \ + ${myconfcommon} \ + ${myconfdouble} || \ + die "econf double failed" + emake || die "emake double failed" + + # the only difference here is --enable-long-double + cd "${S}-longdouble" + econf \ + --enable-long-double \ + ${myconfcommon} \ + ${myconflongdouble} || \ + die "econf long double failed" + emake || die "emake long double failed" +} + + +src_test () { + # We want this to be a reasonably quick test, but that is still hard... + ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" + # Do not increase the number of threads, it will not help your performance + #local testbase="perl check.pl --nthreads=1 --estimate" + # ${testbase} -${p}d || die "Failure: $n" + for d in single double longdouble; do + cd "${S}-${d}"/tests + einfo "Testing ${PN}-${d}" + emake -j1 check || die "emake test failed" + done +} + +src_install () { + # all builds are installed in the same place + # libs have distinuguished names; include files, docs etc. identical. + for i in single double longdouble; do + cd "${S}-${i}" + emake DESTDIR="${D}" install || die "emake install for ${i} failed" + done + + # Install documentation. + cd "${S}-single" + dodoc AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS || die + if use doc; then + cd doc + insinto /usr/share/doc/${PF} + doins -r html fftw3.pdf || die "doc install failed" + insinto /usr/share/doc/${PF}/faq + doins FAQ/fftw-faq.html/* + fi +} diff --git a/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch b/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch index f4dde992611f..62b388590e12 100644 --- a/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch +++ b/sci-libs/fftw/files/fftw-2.1.5-configure.in.patch @@ -1,5 +1,5 @@ ---- configure.in.orig 2008-04-01 22:46:45.943787297 +0100 -+++ configure.in 2008-04-01 22:58:13.510969518 +0100 +--- configure.in.orig 2008-06-22 17:01:59.013047109 +0100 ++++ configure.in 2008-06-22 17:17:39.421924454 +0100 @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(fftw/planner.c) @@ -95,7 +95,24 @@ fi -@@ -243,7 +244,7 @@ +@@ -230,6 +231,16 @@ + AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " + omp_enabler="$CC -omp") + if test -z "$THREADLIBS"; then ++ CFLAGS="$save_CFLAGS -fopenmp" ++ AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS="-lgomp" ++ omp_enabler="$CC -fopenmp") ++ fi ++ if test -z "$THREADLIBS"; then ++ CFLAGS="$save_CFLAGS -fopenmp" ++ AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS="" ++ omp_enabler="$CC -openmp") ++ fi ++ if test -z "$THREADLIBS"; then + CFLAGS="$save_CFLAGS -mp" + AC_TRY_LINK_FUNC(omp_set_num_threads,THREADLIBS=" " + omp_enabler="$CC -mp") +@@ -243,7 +249,7 @@ if test -z "$THREADLIBS"; then AC_MSG_ERROR([don't know how to enable OpenMP]) fi @@ -104,7 +121,7 @@ fi if test "$with_sgimp"x != nox; then AC_MSG_CHECKING(how to enable SGI MP) -@@ -261,7 +262,7 @@ +@@ -261,7 +267,7 @@ if test -z "$THREADLIBS"; then AC_MSG_ERROR([don't know how to enable SGI MP]) fi @@ -113,7 +130,7 @@ fi # POSIX threads, the default choice: -@@ -270,38 +271,38 @@ +@@ -270,38 +276,38 @@ ACX_PTHREAD([THREADLIBS="$PTHREAD_LIBS " CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CC="$PTHREAD_CC" @@ -158,7 +175,7 @@ fi if test -z "$THREADLIBS"; then AC_MSG_ERROR(couldn't find threads library for --enable-threads) -@@ -334,7 +335,7 @@ +@@ -334,7 +340,7 @@ CC="$MPICC" ok=yes AC_TRY_LINK([#include <mpi.h> diff --git a/sci-libs/fftw/files/fftw-3.1.2-as-needed.patch b/sci-libs/fftw/files/fftw-3.1.2-as-needed.patch new file mode 100644 index 000000000000..fca95715827c --- /dev/null +++ b/sci-libs/fftw/files/fftw-3.1.2-as-needed.patch @@ -0,0 +1,35 @@ +--- Makefile.am.orig 2008-06-22 14:49:18.725790127 +0100 ++++ Makefile.am 2008-06-22 15:09:37.339234950 +0100 +@@ -35,6 +35,13 @@ + if THREADS + 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 + +--- threads/Makefile.am.orig 2008-07-01 11:46:56.464637525 +0100 ++++ threads/Makefile.am 2008-07-01 11:48:02.268387467 +0100 +@@ -2,15 +2,12 @@ + -I$(top_srcdir)/rdft -I$(top_srcdir)/api + + if THREADS +-if COMBINED_THREADS + noinst_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la +-else +-lib_LTLIBRARIES = libfftw3@PREC_SUFFIX@_threads.la +-endif + endif + + libfftw3@PREC_SUFFIX@_threads_la_SOURCES = api.c conf.c threads.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@ diff --git a/sci-libs/fftw/files/fftw-3.1.2-configure.ac.patch b/sci-libs/fftw/files/fftw-3.1.2-configure.ac.patch index bbc0ccb6b5f8..de54a25dab05 100644 --- a/sci-libs/fftw/files/fftw-3.1.2-configure.ac.patch +++ b/sci-libs/fftw/files/fftw-3.1.2-configure.ac.patch @@ -1,5 +1,5 @@ ---- configure.ac.orig 2008-03-31 23:03:45.200210228 +0100 -+++ configure.ac 2008-03-31 23:06:57.111081976 +0100 +--- configure.ac.orig 2008-06-30 23:10:27.431674828 +0100 ++++ configure.ac 2008-06-30 23:50:59.266804845 +0100 @@ -135,7 +135,7 @@ AC_PROG_CC AX_COMPILER_VENDOR @@ -18,3 +18,12 @@ dnl Checks for header files. AC_HEADER_STDC +@@ -362,7 +364,7 @@ + THREADLIBS="" + if test "$enable_threads" = "yes"; then + if test "$with_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])]) diff --git a/sci-libs/fftw/files/fftw-3.1.2-openmp.patch b/sci-libs/fftw/files/fftw-3.1.2-openmp.patch new file mode 100644 index 000000000000..5ccfea691a8f --- /dev/null +++ b/sci-libs/fftw/files/fftw-3.1.2-openmp.patch @@ -0,0 +1,12 @@ +--- m4/ax_openmp.m4.orig 2008-07-01 00:14:48.814076874 +0100 ++++ m4/ax_openmp.m4 2008-06-30 23:42:30.534809664 +0100 +@@ -59,6 +59,9 @@ + 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 |