From 6453605785a3036c7e633400e4bd35bf2297b000 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Thu, 4 Jun 2009 19:42:08 -0700 Subject: osmesa: Link with -ldl for dlopen code Now that the dlopen wrappers are built into libmesa.a, we need to link standalone libOSMesa with libdl to resolve dlopen and friends on platforms that need it. (cherry picked from commit 4795dd5950d4dcd7c8d421c8fb4851c193297ba1) --- configure.ac | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8110e0f8692..48b8022736d 100644 --- a/configure.ac +++ b/configure.ac @@ -826,12 +826,12 @@ case "$mesa_driver" in osmesa) # only link libraries with osmesa if shared if test "$enable_static" = no; then - OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS" + OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" else OSMESA_LIB_DEPS="" fi OSMESA_MESA_DEPS="" - OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS" + OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" ;; *) # Link OSMesa to libGL otherwise @@ -845,9 +845,6 @@ osmesa) OSMESA_PC_REQ="gl" ;; esac -if test "$enable_static" = no; then - OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS" -fi OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV" AC_SUBST([OSMESA_LIB_DEPS]) AC_SUBST([OSMESA_MESA_DEPS]) -- cgit v1.2.3 From 7eed6ab5b525b75f690d05042c90d05827253114 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Mon, 8 Jun 2009 16:02:18 +0100 Subject: Cygwin build fixes Fix mklib to deal with NOPREFIX and use --enable-auto-image-base for cygwin Teach configure.ac some basic facts about cygwin Signed-off-by: Jon TURNEY --- bin/mklib | 19 ++++++++++++++++--- configure.ac | 5 +++++ 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/bin/mklib b/bin/mklib index 2fd95ba7751..24449450068 100755 --- a/bin/mklib +++ b/bin/mklib @@ -885,6 +885,17 @@ case $ARCH in CYGWIN*) # GCC-based environment + if [ $NOPREFIX = 1 ] ; then + # No "lib" or ".so" part + echo "mklib: Making CYGWIN shared library: " ${LIBNAME} + OPTS="-shared -Wl,--enable-auto-image-base" + if [ "${ALTOPTS}" ] ; then + OPTS=${ALTOPTS} + fi + rm -f ${LIBNAME} + ${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS} + FINAL_LIBS=${LIBNAME} + else CYGNAME="cyg${LIBNAME}" # prefix with "cyg" LIBNAME="lib${LIBNAME}" # prefix with "lib" @@ -901,11 +912,11 @@ case $ARCH in # finish up FINAL_LIBS=${LIBNAME}.a else - OPTS="-shared -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" + OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}-${MAJOR}.dll + echo "mklib: Making" $ARCH "shared library: " ${CYGNAME}-${MAJOR}.dll if [ $CPLUSPLUS = 1 ] ; then LINK="g++" @@ -914,7 +925,8 @@ case $ARCH in fi # rm any old libs - rm -f ${LIBNAME}-${MAJOR}.dll + rm -f ${CYGNAME}-${MAJOR}.dll + rm -f ${LIBNAME}-${MAJOR}.dll.a rm -f ${LIBNAME}.dll.a rm -f ${LIBNAME}.a @@ -927,6 +939,7 @@ case $ARCH in # special case for installing in bin FINAL_BINS="${CYGNAME}-${MAJOR}.dll" fi + fi ;; 'example') diff --git a/configure.ac b/configure.ac index 48b8022736d..2a9ac1ed9cd 100644 --- a/configure.ac +++ b/configure.ac @@ -222,6 +222,8 @@ else case "$host_os" in darwin* ) LIB_EXTENSION='dylib' ;; + cygwin* ) + LIB_EXTENSION='dll' ;; * ) LIB_EXTENSION='so' ;; esac @@ -1073,6 +1075,9 @@ if test "x$APP_LIB_DEPS" = x; then solaris*) APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm" ;; + cygwin*) + APP_LIB_DEPS="-lX11" + ;; *) APP_LIB_DEPS="-lm" ;; -- cgit v1.2.3