diff options
Diffstat (limited to 'math/fftw3/Makefile')
-rw-r--r-- | math/fftw3/Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/math/fftw3/Makefile b/math/fftw3/Makefile index 7862b7cbdfe1..56b92d29f47d 100644 --- a/math/fftw3/Makefile +++ b/math/fftw3/Makefile @@ -61,11 +61,17 @@ USE_GCC= 3.4 .endif .endif .endif +.if ${FFTW3_FLAVOR}=="long" && !defined(CPUTYPE) +USE_LDOUBLE= yes +.endif .if ${MACHINE_CPU:M3dnow} CONFIGURE_ARGS+=--enable-k7 -CONFIGURE_ENV+= CFLAGS="${CFLAGS:N-O:N-O*} -O3 -fomit-frame-pointer -fno-schedule-insns \ - -malign-double -fstrict-aliasing -mpreferred-stack-boundary=4 \ - -ffast-math" +CFLAGS_3DNOW= ${CFLAGS:N-O:N-O*} -O3 -fomit-frame-pointer -fno-schedule-insns \ + -fstrict-aliasing -mpreferred-stack-boundary=4 -ffast-math +.if ${ARCH} != "amd64" +CFLAGS_3DNOW+= -malign-double +.endif +CONFIGURE_ENV+= CFLAGS="${CFLAGS_3DNOW}" .endif .endif # end WITH_OPTIMIZED_CFLAGS @@ -83,7 +89,7 @@ FFTW3_PKGNAMESUFFIX= -float CONFIGURE_ARGS+=--enable-float .else .if ${FFTW3_FLAVOR}=="long" -.if ${OSVERSION} < 504000 +.if ${OSVERSION} < 504000 || defined(USE_LDOUBLE) LIB_DEPENDS+= ml.0:${PORTSDIR}/math/ldouble .endif FFTW3_SUFX= l @@ -118,7 +124,7 @@ post-patch: ${WRKSRC}/tools/Makefile.in .if ${FFTW3_FLAVOR}=="long" @${REINPLACE_CMD} -e 's|cosl sinl tanl||' ${WRKSRC}/configure -.if ${OSVERSION} < 504000 +.if ${OSVERSION} < 504000 || defined(USE_LDOUBLE) @${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -E -e \ 's|@LIBS@|-lml @LIBS@|' .endif |