fix -noprefix option for Solaris (bug 7722)
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 10 Nov 2006 12:47:56 +0000 (12:47 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 10 Nov 2006 12:47:56 +0000 (12:47 +0000)
bin/mklib

index 0637662ff7c27e0256902f67a19a9b330a0696e0..7d468b12e77ed977b13e1ca99c105cfa682b7d5d 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -283,7 +283,9 @@ case $ARCH in
            ar -ruv ${LIBNAME} ${OBJECTS}
            FINAL_LIBS=${LIBNAME}
        else
-           LIBNAME="lib${LIBNAME}.so"
+           if [ $NOPREFIX = 0 ] ; then
+               LIBNAME="lib${LIBNAME}.so"
+           fi
            echo "mklib: Making SunOS shared library: " ${LIBNAME}
 
            if [ "x$LINK" = "x" ] ; then
@@ -333,9 +335,14 @@ case $ARCH in
 
            # for debug:
            #echo "mklib: linker is" ${LINK} ${OPTS}
-           rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
-           ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
-           ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
+           if [ $NOPREFIX = 1 ] ; then
+               rm -f ${LIBNAME}
+               ${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+           else
+               rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
+               ${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
+               ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
+           fi
            FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
        fi
        ;;