SunOS tweaks (Greg Menke)
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 8 Sep 2003 14:59:11 +0000 (14:59 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 8 Sep 2003 14:59:11 +0000 (14:59 +0000)
bin/mklib

index 8dc91de20bed5cdc7b15240893b767b950e858ce..b207ade5e13d4441cb814335a5438fa04650a9a8 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -143,11 +143,11 @@ case $ARCH in
            # link for C++
            if [ "x${CXX}" = "xg++" ] ; then
                LINK="g++"
+           elif [ "x${CXX}" = "xCC" ] ; then
+               LINK="CC"
            elif [ `which c++` ] ; then
                LINK="c++"
-           elif [ `which CC` ] ; then
-               LINK="CC"
-           elif [ `which g++` ] ; then
+           elif [ `type g++` ] ; then
                LINK="g++"
            else
                echo "mklib: warning: can't find C++ comiler, trying CC."
@@ -160,6 +160,7 @@ case $ARCH in
            # use native Sun linker
            LINK="ld"
        fi
+       echo "mklib: linker is " ${LINK}
        rm -f ${LIBNAME}
        ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
        FINAL_LIBS=${LIBNAME}