For building 64-bit on Solaris, I use small shell script wrappers to help ensure that correct options are passed. For example, this is the text of a script called c++-64:

#!/bin/sh
exec c++ -m64 -march=opteron "$@"

I then specify CXX=c++-64 to the configure script.

In order to make building configure-based packages fairly easy, I use a separate install tree for 64-bit apps (e.g. /usr/local64) and then add a share/config.site script under that tree similar to the one attached. The configure script automatically sources the config.site file, which supplies default options. The advantage of this approach is that selection of a 64-bit build may be specified by the --prefix option to the configure script and then the configure script automatically uses the right options and everything just works. So one install prefix is used for 32-bit apps and another is used for 64-bit apps.

Last I heard, Solaris was being dropped from OpenEXR's "supported" list. Hopefully someone will have the sense to add it back.

Bob
======================================
Bob Friesenhahn
[EMAIL PROTECTED], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
#
# config.site for configure
#

echo 'Applying settings for 64-bit build ...'

# Change some defaults.
test "$prefix" = NONE && prefix=/usr/local64

PATH="$prefix/bin:$PATH"
export PATH

#echo "${libdir}"
#echo "${exec_prefix}"
if test "${libdir}" = '${exec_prefix}/lib'
then
  libdir=`echo ${prefix}/lib`
fi

CC_DEFAULT="/usr/local64/bin/gcc-64"
CXX_DEFAULT="/usr/local64/bin/c++-64"
F77_DEFAULT=no
FC_DEFAULT=no

#CPPFLAGS_DEFAULT=`echo -I${prefix}/include`
CFLAGS_DEFAULT=-'O2 -g'
CXXFLAGS_DEFAULT='-O -g'
LDFLAGS_DEFAULT=`echo -L${libdir}` # -R${libdir}
LIBS_DEFAULT=

if test "${ac_env_CC_set}" != set
then
  CC="$CC_DEFAULT"
fi

if test "${ac_env_CXX_set}" != set
then
  CXX="$CXX_DEFAULT"
fi

if test "${ac_env_F77_set}" != set
then
  F77="$F77_DEFAULT"
fi

if test "${ac_env_FC_set}" != set
then
  FC="$FC_DEFAULT"
fi

if test "${ac_env_CFLAGS_set}" != set
then
  CFLAGS="$CFLAGS_DEFAULT"
fi

if test "${ac_env_CXXFLAGS_set}" != set
then
  CXXFLAGS="$CXXFLAGS_DEFAULT"
fi

if test "${ac_env_CPPFLAGS_set}" != set
then
  CPPFLAGS="$CPPFLAGS_DEFAULT"
fi

if test "${ac_env_LDFLAGS_set}" = set
then
  LDFLAGS="$LDFLAGS $LDFLAGS_DEFAULT"
else
  LDFLAGS="$LDFLAGS_DEFAULT"
fi

echo "PATH     = \"$PATH\""
echo "CC       = \"$CC\""
echo "CXX      = \"$CXX\""
echo "F77      = \"$F77\""
echo "FC       = \"$FC\""
echo "CFLAGS   = \"$CFLAGS\""
echo "CXXFLAGS = \"$CXXFLAGS\""
echo "CPPFLAGS = \"$CPPFLAGS\""
echo "LDFLAGS  = \"$LDFLAGS\""
_______________________________________________
Openexr-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/openexr-devel

Reply via email to