fi
fi
+ # If using Sun C++ compiler, need to tell it not to add runpaths
+ # that are specific to the build machine
+ if [ ${LINK} = "CC" ] ; then
+ OPTS="${OPTS} -norunpath"
+ fi
+
+ # Solaris linker requires explicitly listing the Standard C & C++
+ # libraries in the link path when building shared objects
+ if [ ${LINK} = "CC" ] ; then
+ DEPS="${DEPS} -lCrun"
+ fi
+ DEPS="${DEPS} -lc"
+
+ if [ $EXPORTS ] ; then
+ # Make the 'mapfile.scope' linker mapfile
+ echo "{" > mapfile.scope
+ echo "global:" >> mapfile.scope
+ sed 's/$/;/' ${EXPORTS} >> mapfile.scope
+ echo "local:" >> mapfile.scope
+ echo " *;" >> mapfile.scope
+ echo "};" >> mapfile.scope
+ OPTS="${OPTS} -Wl,-Mmapfile.scope"
+ fi
+
# Check if objects are SPARC v9
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
set ${OBJECTS}
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
+
# for debug:
#echo "mklib: linker is" ${LINK} ${OPTS}
if [ $NOPREFIX = 1 ] ; then
rm -f ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
+ FINAL_LIBS="${LIBNAME}"
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
+ FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
fi
- FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
fi
;;
DEFINES="$DEFINES -DMESA_SELINUX"
fi
-dnl OS-specific libraries
-OS_LIBS=""
-case "$host_os" in
-solaris*)
- OS_LIBS="-lc"
- if test "x$GXX" != xyes; then
- OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS"
- fi
- ;;
-esac
-
dnl
dnl Driver configuration. Options are xlib, dri and osmesa right now.
dnl More later: directfb, fbdev, ...
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
GL_PC_CFLAGS="$X11_INCLUDES"
fi
- GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS"
- GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $OS_LIBS"
+ GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
+ GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread"
# if static, move the external libraries to the programs
# and empty the libraries for libGL
fi
# need DRM libs, -lpthread, etc.
- GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS"
- GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS $OS_LIBS"
+ GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
+ GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS"
;;
osmesa)
# No libGL for osmesa
- GL_LIB_DEPS="$OS_LIBS"
+ GL_LIB_DEPS=""
;;
esac
AC_SUBST([GL_LIB_DEPS])
;;
esac
if test "$enable_static" = no; then
- OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
+ OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS"
fi
-OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS"
+OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV"
AC_SUBST([OSMESA_LIB_DEPS])
AC_SUBST([OSMESA_MESA_DEPS])
AC_SUBST([OSMESA_PC_REQ])
# should check these...
EGL_LIB_DEPS="$X_LIBS -lX11"
fi
-EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS $OS_LIBS"
+EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS"
AC_SUBST([EGL_LIB_DEPS])
dnl
fi
# If static, empty GLW_LIB_DEPS and add libs for programs to link
- GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV $OS_LIBS"
+ GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV"
if test "$enable_static" = no; then
GLW_MESA_DEPS='-l$(GL_LIB)'
- GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS"
+ GLW_LIB_DEPS="$GLW_LIB_DEPS"
else
APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS"
GLW_LIB_DEPS=""
GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
GLUT_PC_CFLAGS="$X11_INCLUDES"
fi
- GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS"
- GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm $OS_LIBS"
+ GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
+ GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"
# If glut is available, we can build most programs
if test "$with_demos" = yes; then