On Sun, 23 Mar 2008, aaragon wrote:
Of course the line above won't do anything, but you get what I mean. Now imagine that instead of 2 libraries, I have 10!!! It's really annoying to have a very big command line with all those arguments. I've been hard-coding these in the Makefile.am but I don't think that's the best approach. Can anyone point me to the way it's done? Thank you all,
If this is for use on your own machine, then you should set up a config.site file. By default, the file resides at $prefix/share/config.site.
I have attached a config.site that I use for my own purposes. Perhaps it will give you some ideas.
Bob ====================================== Bob Friesenhahn bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
# config.site for configure # echo 'Applying settings for 32-bit build ...' # Change some defaults. test "$prefix" = NONE && prefix=/usr/local # Export the environment COMPILER with value 'sun' to use the Sun Studio # compiler. Otherwise GCC will be used if test "x${COMPILER}" = "xsun" then # Use Sun compiler echo "Using Sun Studio compiler ..." PATH=/opt/SUNWspro/bin:$PATH export PATH CC_DEFAULT="/opt/SUNWspro/bin/cc" CXX_DEFAULT="/opt/SUNWspro/bin/CC" F77_DEFAULT="/opt/SUNWspro/bin/f77" FC_DEFALT="/opt/SUNWspro/bin/f95" # -v enables detailed warnings # -xcheck=all performs stack checking # -g enables debug symbols # -xtarget=native target for only *this* system # -xarch=v8plusb require UltraSPARC III # -xcache=native optimize for cache properties of *this* system # -xchip=ultra3i optimize for ultra3i chip # -xO3 normal level of optimization. CFLAGS_DEFAULT='-v -xO3' # +w2 CXXFLAGS_DEFAULT='-v -xO3' LDFLAGS_DEFAULT="-L/usr/local/lib" LIBS_DEFAULT= CPPFLAGS_DEFAULT="-I/usr/local/include" else # Use GCC. # Export the environment variable GCC_VERSION to select the desired compiler version. GCC_VERS=${GCC_VERSION:=4.2.1} echo "Using GCC ${GCC_VERS} ..." CC_DEFAULT="gcc-${GCC_VERS}" CXX_DEFAULT="c++-${GCC_VERS}" F77_DEFAULT=no FC_DEFAULT=no CFLAGS_DEFAULT=-O2 CXXFLAGS_DEFAULT=-O LDFLAGS_DEFAULT="-L/usr/local/lib -R/usr/local/lib" #LDFLAGS_DEFAULT="-L${libdir} -R${libdir}" LIBS_DEFAULT= fi 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 "CC = \"$CC\"" echo "CXX = \"$CXX\"" echo "F77 = \"$F77\"" echo "FC = \"$FC\"" echo "CFLAGS = \"$CFLAGS\"" echo "CXXFLAGS = \"$CXXFLAGS\"" echo "CPPFLAGS = \"$CPPFLAGS\"" echo "LDFLAGS = \"$LDFLAGS\""
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf