Sorry 'bout that! Nice catch...

I wouldn't have thought the CXXFLAGS variable (that's more for C++ compiler flags) would get used for Wine though...

That output is useful though. The host and build options aren't going to work on Slackware (I think they're just aliases to the 64-bit gcc compiler with the -m32 flag - on Gentoo).
So try really forcing the -m32 compiler flag all over the place(!!) :
Code: Select all
mkdir -pv /tmp/build/wine
cd /tmp/build/wine
mkdir -v wine{64,32}-build
WINE_ARCHIVE="wine-1.8.1.tar.bz2"
WINE_OPTIONS="--with-alsa --without-capi --with-cms --with-coreaudio --without-cups --with-curses --with-dbus --with-fontconfig --with-freetype --with-gettext --without-gettextpo --without-gphoto --with-glu --with-gnutls --without-gsm --without-gstreamer --without-hal --with-jpeg --without-ldap --without-mpg123 --with-netapi --without-openal --without-opencl --with-opengl --with-osmesa --with-oss --with-pcap --with-png --with-pthread --without-pulse --without-sane --without-tiff --with-v4l --with-xcomposite --with-xcursor --with-xinerama --with-xinput --with-xinput2 --with-xml --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --with-zlib --with-x"
WINE_SRC_DIR=$(tar --exclude '*/*' -taf "${WINE_ARCHIVE}")
tar xvf "${WINE_ARCHIVE}"
for ARCH in "m32" "m64"; do
sed -i '/CXX="\$CXX -'"${ARCH}"'"/a \
CFLAGS="$CFLAGS -'"${ARCH}"'"\
LDFLAGS="$LDFLAGS -'"${ARCH}"'"\
CXXFLAGS="$CXXFLAGS -'"${ARCH}"'"' "${WINE_SRC_DIR}/configure.ac"
done
unset -v ARCH
pushd wine64-build
CFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC" ../${WINE_SRC_DIR}/configure --prefix=/usr --enable-win64 ${WINE_OPTIONS}
make
popd
pushd wine32-build
CFLAGS="-O2 -fPIC -m32" CXXFLAGS="-O2 -fPIC -m32" LDFLAGS="-m32" ../${WINE_SRC_DIR}/configure --prefix=/usr --libdir=/usr/lib --with-wine64=../wine64-build ${WINE_OPTIONS}
make
make install DESTDIR=/tmp/${WINE_SRC_DIR}
popd
pushd wine64-build
make install DESTDIR=/tmp/${WINE_SRC_DIR}
popd
Bob