source: scripts/untested/blfs-scripts/blfs-fftw3.sh@ 300656b

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 300656b was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 3.8 KB
Line 
1#!/bin/bash
2
3### fftw3 ###
4
5cd ${SRC}
6
7SELF=`basename ${0}`
8set_buildenv
9set_libdirname
10setup_multiarch
11if [ ! "${libdirname}" = "lib" ]; then
12 extra_conf="--libdir=/usr/${libdirname}"
13fi
14
15unpack_tarball fftw-${FFTW3_VER}
16if [ -d ${PKGDIR}-single ]; then rm -rf ${PKGDIR}-single ; fi
17mv ${PKGDIR} ${PKGDIR}-single
18unpack_tarball fftw-${FFTW3_VER}
19if [ -d ${PKGDIR}-double ]; then rm -rf ${PKGDIR}-double ; fi
20mv ${PKGDIR} ${PKGDIR}-double
21unpack_tarball fftw-${FFTW3_VER}
22if [ -d ${PKGDIR}-long-double ]; then rm -rf ${PKGDIR}-long-double ; fi
23mv ${PKGDIR} ${PKGDIR}-long-double
24
25
26### SINGLE ###
27cd ${SRC}/${PKGDIR}-single
28
29LOG=fftw3-single-blfs.log
30
31# TODO: gonna need to set extra_conf for each arch methinks...
32# currently only handling amd64/i686
33
34MACHINE=`uname --machine`
35if [ "${MACHINE}" = "x86_64" ]; then
36 case ${BUILDENV} in
37 32 )
38 extra_conf="${extra_conf} --enable-sse"
39 ;;
40 esac
41fi
42
43max_log_init fftw3-single ${FFTW3_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
44CC="${CC-gcc} ${ARCH_CFLAGS}" \
45CXX="${CXX-g++} ${ARCH_CFLAGS}" \
46CFLAGS="${TGT_CFLAGS}" \
47CXXFLAGS="${TGT_CFLAGS}" \
48./configure --prefix=/usr ${extra_conf} \
49 --mandir=/usr/share/man \
50 --infodir=/usr/share/info \
51 --enable-shared --enable-threads --enable-float \
52 >> ${LOGFILE} 2>&1 &&
53echo " o Configure OK" &&
54
55min_log_init ${BUILDLOGS} &&
56make ${PMFLAGS} \
57 >> ${LOGFILE} 2>&1 &&
58echo " o Build OK" || barf
59
60min_log_init ${TESTLOGS} &&
61make check \
62 >> ${LOGFILE} 2>&1 &&
63echo " o Test OK" || errmsg
64
65min_log_init ${INSTLOGS} &&
66make install \
67 >> ${LOGFILE} 2>&1 &&
68echo " o ALL OK" || barf
69
70#### DOUBLE ###
71cd ${SRC}/${PKGDIR}-double
72
73LOG=fftw3-double-blfs.log
74
75if [ ! "${libdirname}" = "lib" ]; then
76 extra_conf="--libdir=/usr/${libdirname}"
77fi
78
79# OK, for 32bit on amd64, we can use -sse2 extensions, but it barfs on
80# 64bit...
81#
82# TODO: gonna need to set extra_conf for each arch methinks...
83# currently only handling amd64/i686
84
85MACHINE=`uname --machine`
86if [ "${MACHINE}" = "x86_64" ]; then
87 case ${BUILDENV} in
88 32 )
89 extra_conf="${extra_conf} --enable-sse2"
90 ;;
91 esac
92fi
93
94max_log_init fftw3-double ${FFTW3_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
95CC="${CC-gcc} ${ARCH_CFLAGS}" \
96CXX="${CXX-g++} ${ARCH_CFLAGS}" \
97CFLAGS="${TGT_CFLAGS}" \
98CXXFLAGS="${TGT_CFLAGS}" \
99./configure --prefix=/usr ${extra_conf} \
100 --mandir=/usr/share/man \
101 --infodir=/usr/share/info \
102 --enable-shared --enable-threads \
103 >> ${LOGFILE} 2>&1 &&
104echo " o Configure OK" &&
105
106min_log_init ${BUILDLOGS} &&
107make ${PMFLAGS} \
108 >> ${LOGFILE} 2>&1 &&
109echo " o Build OK" || barf
110
111min_log_init ${TESTLOGS} &&
112make check \
113 >> ${LOGFILE} 2>&1 &&
114echo " o Test OK" || errmsg
115
116min_log_init ${INSTLOGS} &&
117make install \
118 >> ${LOGFILE} 2>&1 &&
119echo " o ALL OK" || barf
120
121
122#### LONG DOUBLE ###
123cd ${SRC}/${PKGDIR}-double
124
125LOG=fftw3-long-double-blfs.log
126
127if [ ! "${libdirname}" = "lib" ]; then
128 extra_conf="--libdir=/usr/${libdirname}"
129fi
130
131# OK, for 32bit on amd64, we can use -sse extensions, but it barfs on
132# 64bit... k7 extensions work for 64bit though...
133#
134# TODO: gonna need to set extra_conf for each arch methinks...
135# currently only handling amd64/i686
136
137max_log_init fftw3-double ${FFTW3_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
138CC="${CC-gcc} ${ARCH_CFLAGS}" \
139CXX="${CXX-g++} ${ARCH_CFLAGS}" \
140CFLAGS="${TGT_CFLAGS}" \
141CXXFLAGS="${TGT_CFLAGS}" \
142./configure --prefix=/usr ${extra_conf} \
143 --mandir=/usr/share/man \
144 --infodir=/usr/share/info \
145 --enable-shared --enable-threads --enable-long-double \
146 >> ${LOGFILE} 2>&1 &&
147echo " o Configure OK" &&
148
149min_log_init ${BUILDLOGS} &&
150make ${PMFLAGS} \
151 >> ${LOGFILE} 2>&1 &&
152echo " o Build OK" || barf
153
154min_log_init ${TESTLOGS} &&
155make check \
156 >> ${LOGFILE} 2>&1 &&
157echo " o Test OK" || errmsg
158
159min_log_init ${INSTLOGS} &&
160make install \
161 >> ${LOGFILE} 2>&1 &&
162echo " o ALL OK" || barf
163
Note: See TracBrowser for help on using the repository browser.