Ticket #9167: implib.patch

File implib.patch, 4.9 KB (added by jpflori, 9 years ago)

Patch to upstream build system.

  • src/aclocal.m4

    diff -dru src.orig/src/aclocal.m4 src/src/aclocal.m4
    old new  
    232232AC_SUBST(LIBEXT)
    233233AC_SUBST(SHAREDEXT)dnl  Name components of a dynamically linked library
    234234AC_SUBST(SHAREDPREFIX)
     235AC_SUBST(IMPLIB_EXT)dnl Name components of a dynamically linked library import file
     236AC_SUBST(IMPLIB_PREFIX)
    235237AC_SUBST(OBJEXT)dnl     These are set by autoconf
    236238AC_SUBST(EXEEXT)
    237239AC_SUBST(INSTALL_TARGET)dnl Which type of installation: flat directory or unix like.
     
    241243ECL_LDRPATH=''
    242244SHAREDEXT='so'
    243245SHAREDPREFIX='lib'
     246IMPLIB_EXT=''
     247IMPLIB_PREFIX=''
    244248LIBPREFIX='lib'
    245249LIBEXT='a'
    246250PICFLAG='-fPIC'
     
    252256clibs=''
    253257SONAME=''
    254258SONAME_LDFLAGS=''
     259IMPLIB_NAME=''
     260IMPLIB_LDFLAGS=''
    255261case "${host_os}" in
    256262        # libdir may have a dollar expression inside
    257263        linux*)
     
    354360                shared='yes'
    355361                THREAD_CFLAGS='-D_THREAD_SAFE'
    356362                THREAD_LIBS='-lpthread'
    357                 SHARED_LDFLAGS="-shared ${LDFLAGS}"
    358                 BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
    359                 SHAREDPREFIX=''
     363                SHARED_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
     364                BUNDLE_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
     365                SHAREDPREFIX='cyg'
    360366                SHAREDEXT='dll'
     367                IMPLIB_PREFIX='lib'
     368                IMPLIB_EXT='dll.a'
     369                IMPLIB_NAME="${IMPLIB_PREFIX}ecl.${IMPLIB_EXT}"
     370                IMPLIB_LDFLAGS="-Wl,--out-implib,${IMPLIB_NAME}"
    361371                PICFLAG=''
    362372                ;;
    363373        mingw*)
     
    367377                enable_threads='yes'
    368378                THREAD_CFLAGS='-D_THREAD_SAFE'
    369379                THREAD_GC_FLAGS='--enable-threads=win32'
    370                 SHARED_LDFLAGS=''
    371                 BUNDLE_LDFLAGS=''
     380                SHARED_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
     381                BUNDLE_LDFLAGS="-shared -Wl,--enable-auto-image-base ${LDFLAGS}"
    372382                SHAREDPREFIX=''
    373383                SHAREDEXT='dll'
     384                IMPLIB_PREFIX='lib'
     385                IMPLIB_EXT='dll.a'
     386                IMPLIB_NAME="${IMPLIB_PREFIX}ecl.${IMPLIB_EXT}"
     387                IMPLIB_LDFLAGS="-Wl,--out-implib,${IMPLIB_NAME}"
    374388                PICFLAG=''
    375389                INSTALL_TARGET='flatinstall'
    376390                TCPLIBS='-lws2_32'
  • src/compile.lsp.in

    diff -dru src.orig/src/compile.lsp.in src/src/compile.lsp.in
    old new  
    4242;;;
    4343;;; * Add include path to not yet installed headers, and remove include flag
    4444;;;   (-I) to installed directory, and Notice that we must explicitely mention
    45 ;;;   libecl.so/ecl.dll instead of using -lecl. This is to avoid interference
     45;;;   libecl.so/cygecl.dll instead of using -lecl. This is to avoid interference
    4646;;;   with an already installed copy of ECL.
    4747;;;
    4848(setq c::*cc-flags*
     
    5050      #+msvc "@CFLAGS@ @ECL_CFLAGS@"
    5151      c::*ecl-include-directory* "@true_builddir@/"
    5252      c::*ecl-library-directory* "@true_builddir@/")
    53 #-:wants-dlopen 
     53#-:wants-dlopen
    5454(setf c::*ld-flags*
    5555      "@LDFLAGS@ @LIBPREFIX@ecl.@LIBEXT@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@")
    5656#+(and :wants-dlopen (not nonstop))
     
    124124;;;
    125125;;; We do not need the -rpath flag for the library, nor -lecl.
    126126;;;
    127 (let* ((c::*ld-shared-flags* #-msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@"
     127(let* ((c::*ld-shared-flags* #-msvc " @IMPLIB_LDFLAGS@ @SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@"
    128128                             #+msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@")
    129129       (c::*cc-flags* (concatenate 'string "-DECL_API -I@true_builddir@/c " c::*cc-flags*))
    130130       (extra-args nil))
  • src/configure.in

    diff -dru src.orig/src/configure.in src/src/configure.in
    old new  
    576576AC_SUBST(SONAME)
    577577AC_SUBST(SONAME_LDFLAGS)
    578578
     579dnl ----------------------------------------------------------------------
     580dnl IMPLIB_NAME is only active when IMPLIB_NAME is non nil
     581dnl
     582AC_MSG_CHECKING(for import name)
     583if test "${enable_soname}" != yes; then
     584   IMPLIB_NAME=''
     585   AC_MSG_RESULT([none])
     586else
     587   AC_MSG_RESULT([${IMPLIB_NAME}])
     588fi
     589AC_SUBST(IMPLIB_NAME)
     590AC_SUBST(IMPLIB_LDFLAGS)
     591
    579592dnl Related to that, the package version number
    580593ECL_VERSION_NUMBER=$(($PACKAGE_MAJOR * 10000 + $PACKAGE_MINOR * 100 + $PACKAGE_LEAST))
    581594AC_SUBST(ECL_VERSION_NUMBER)
  • src/Makefile.in

    diff -dru src.orig/src/Makefile.in src/src/Makefile.in
    old new  
    174174          if test -s $$i ; then \
    175175           if echo $$i | grep dll; then \
    176176            $(INSTALL_LIBRARY) $$i $(DESTDIR)$(bindir); \
    177            fi; \
    178            $(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
     177           else \
     178            $(INSTALL_LIBRARY) $$i $(DESTDIR)$(libdir); \
     179           fi \
    179180          fi \
    180181        done
     182        if [ "x@IMPLIB_NAME@" != "x" -a -f "@IMPLIB_NAME@" ]; then \
     183          $(INSTALL_LIBRARY) @IMPLIB_NAME@ $(DESTDIR)$(libdir); \
     184        fi
    181185        if [ "x@SONAME@" != "x" -a -f "@SONAME@" ]; then \
    182186          ( cd $(DESTDIR)$(libdir) && $(RM) -f @SONAME3@ @SONAME2@ @SONAME1@ && \
    183187            mv @SONAME@ @SONAME3@ && \