source: scripts/untested/blfs-scripts/blfs-fftw3.sh @ e38d58c

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since e38d58c was e38d58c, checked in by Jim Gifford <clfs@…>, 18 years ago

r610@server (orig r608): ryan | 2005-08-05 23:36:05 -0700
Ensure extraconf is set correctly for each build


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