d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # intercept -arch option and set SIZEXX
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # which architecture are we compiling for?
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # if the -c option is given, the output is .o
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # if the output file is given by a -o option, record it
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # Note each file ending by ${SUFFIX} and remember the last one
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # Transform them in .o
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv# What is the output?
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # It is an executable whose is name is the LASTFILE without suffix
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv# Othewise, the output is just the ${OUTPUT} variable as computed before
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv# For some reason, -dynamiclib and -lpython2.6 are missing when linking
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv# .so files. Add them, except if -bundle is set (incompatible switches)
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv ! `echo $NEWARGS | grep -q bundle`; then
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv NEWARGS="${NEWARGS} ${PREFIX}/lib/libpython2.6.dylib -dynamiclib"
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv# Now, compile
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # No size indication given, just proceed with default
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv if `${COMPILER} $NEWARGS`; then
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv if `${COMPILER} -m32 $NEWARGS`; then
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv if `${COMPILER} -m64 $NEWARGS`; then
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv # Universal case
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv if `${COMPILER} -m32 $NEWARGS`; then
d77a920e949c865a25cba18261a54fa1ec6c87c8~suv if `${COMPILER} -m64 $NEWARGS`; then