From: Jon TURNEY Date: Sat, 24 Jul 2010 11:05:34 +0000 (+0100) Subject: Cygwin: Teach mklib/minstall to properly install libraries on cygwin X-Git-Tag: 062012170305~10016 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c55a8a73a483305c7c9a7bcc7191dd7c833f873d;p=profile%2Fivi%2Fmesa.git Cygwin: Teach mklib/minstall to properly install libraries on cygwin Teach mklib/minstall more about cygwin so libraries are properly installed Have mklib install the .dll into the lib/ staging directory as well Have minstall install the .dll into PREFIX/bin at the same time as installing the .dll.a link library into PREFIX/lib mklib uses a '-' rather than a '.' as the separator before the version number in library names on cygwin. Change the install globs so they match library names like that. Signed-off-by: Jon TURNEY Signed-off-by: Brian Paul --- diff --git a/bin/minstall b/bin/minstall index 1300258..094ec0c 100755 --- a/bin/minstall +++ b/bin/minstall @@ -31,7 +31,7 @@ if [ $# -ge 2 ] ; then # Last cmd line arg is the dest dir for FILE in $@ ; do - DEST="$FILE" + DESTDIR="$FILE" done # Loop over args, moving them to DEST directory @@ -42,6 +42,25 @@ if [ $# -ge 2 ] ; then exit 0 fi + DEST=$DESTDIR + + # On CYGWIN, because DLLs are loaded by the native Win32 loader, + # they are installed in the executable path. Stub libraries used + # only for linking are installed in the library path + case `uname` in + CYGWIN*) + case $FILE in + *.dll) + DEST="$DEST/../bin" + ;; + *) + ;; + esac + ;; + *) + ;; + esac + PWDSAVE=`pwd` # determine file's type diff --git a/bin/mklib b/bin/mklib index 5478ef7..bc554c1 100755 --- a/bin/mklib +++ b/bin/mklib @@ -1019,4 +1019,9 @@ if [ ${INSTALLDIR} != "." ] ; then echo "mklib: Installing" ${FINAL_LIBS} "in" ${INSTALLDIR} test -d ${INSTALLDIR} || mkdir -p ${INSTALLDIR} mv ${FINAL_LIBS} ${INSTALLDIR}/ + + if [ "x${FINAL_BINS}" != "x" ] ; then + echo "mklib: Installing" ${FINAL_BINS} "in" ${INSTALLDIR} + mv ${FINAL_BINS} ${INSTALLDIR}/ + fi fi diff --git a/configure.ac b/configure.ac index 77004cc..d3d74ac 100644 --- a/configure.ac +++ b/configure.ac @@ -275,6 +275,8 @@ fi dnl dnl library names dnl +LIB_PREFIX_GLOB='lib' +LIB_VERSION_SEPARATOR='.' if test "$enable_static" = yes; then LIB_EXTENSION='a' else @@ -282,7 +284,10 @@ else darwin* ) LIB_EXTENSION='dylib' ;; cygwin* ) - LIB_EXTENSION='dll.a' ;; + dnl prefix can be 'cyg' or 'lib' + LIB_PREFIX_GLOB='???' + LIB_VERSION_SEPARATOR='-' + LIB_EXTENSION='dll' ;; aix* ) LIB_EXTENSION='a' ;; * ) @@ -300,15 +305,16 @@ GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION} GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION} VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION} -GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*' -GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*' -GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*' -GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*' -OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*' -EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*' -GLESv1_CM_LIB_GLOB='lib$(GLESv1_CM_LIB).*'${LIB_EXTENSION}'*' -GLESv2_LIB_GLOB='lib$(GLESv2_LIB).*'${LIB_EXTENSION}'*' -VG_LIB_GLOB='lib$(VG_LIB).*'${LIB_EXTENSION}'*' +GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLUT_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLUT_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLW_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLW_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +OSMESA_LIB_GLOB=${LIB_PREFIX_GLOB}'$(OSMESA_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' AC_SUBST([GL_LIB_NAME]) AC_SUBST([GLU_LIB_NAME])