Implemented sonames and the equivalent in OS X

This commit is contained in:
jjgarcia 2008-09-09 19:35:00 +00:00
parent c3a39f16b3
commit 467011e4ab
7 changed files with 3040 additions and 2135 deletions

View file

@ -1,5 +1,5 @@
ECL 0.9l-p1:
============
ECL 8.9.0:
==========
* Visible changes:
@ -33,6 +33,12 @@ ECL 0.9l-p1:
- In windows, ECL recognizes the environment variables HOMEDRIVE and HOMEPATH
and uses them to construct the output of user-homedir-pathname.
- We switch to an Ubuntu-like versioning system, based on $(year).$(month).x
where "x" is 0 for a release or any higher number for a patched version.
- In Unix-type systems, ECL now installs with a "soname" and using versioned
directory names, such as /usr/lib/ecl-8.9.0, /usr/lib/libecl.so.8.9, etc
* Bugs fixed:
- The optimizer for COERCE might enter an infinite loop for certain

View file

@ -148,6 +148,12 @@ install-base:
$(INSTALL_PROGRAM) $$i $(DESTDIR)$(libdir); \
fi \
done
if [ "x@SONAME@" != "x" ]; then \
mv $(DESTDIR)$(libdir)/@SONAME@ $(DESTDIR)$(libdir)/@SONAME3@; \
$(LN_S) $(DESTDIR)$(libdir)/@SONAME3@ $(DESTDIR)$(libdir)/@SONAME2@; \
$(LN_S) $(DESTDIR)$(libdir)/@SONAME3@ $(DESTDIR)$(libdir)/@SONAME1@; \
$(LN_S) $(DESTDIR)$(libdir)/@SONAME3@ $(DESTDIR)$(libdir)/@SONAME@; \
fi
for i in c/dpp$(EXE) ecl_min$(EXE) `cat MODULES`; do \
case $$i in \
*.fas) $(INSTALL_PROGRAM) $$i $(DESTDIR)$(ecldir);; \

16
src/aclocal.m4 vendored
View file

@ -177,6 +177,8 @@ THREAD_GC_FLAGS='--enable-threads=posix'
INSTALL_TARGET='install'
THREAD_OBJ='threads'
clibs=''
SONAME=''
SONAME_LDFLAGS=''
case "${host_os}" in
# libdir may have a dollar expression inside
linux*)
@ -189,6 +191,8 @@ case "${host_os}" in
clibs="-ldl"
# Maybe CFLAGS="-D_ISOC99_SOURCE ${CFLAGS}" ???
CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ${CFLAGS}"
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
gnu*)
thehost='gnu'
@ -199,6 +203,8 @@ case "${host_os}" in
LDRPATH='-Wl,--rpath,~A'
clibs="-ldl"
CFLAGS="-D_GNU_SOURCE ${CFLAGS}"
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
kfreebsd*-gnu)
thehost='kfreebsd'
@ -209,6 +215,8 @@ case "${host_os}" in
LDRPATH='-Wl,--rpath,~A'
clibs="-ldl"
CFLAGS="-D_GNU_SOURCE ${CFLAGS}"
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
freebsd*)
thehost='freebsd'
@ -217,6 +225,8 @@ case "${host_os}" in
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH="-Wl,--rpath,~A"
clibs=""
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
netbsd*)
thehost='netbsd'
@ -224,6 +234,8 @@ case "${host_os}" in
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH="-Wl,--rpath,~A"
clibs=""
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
openbsd*)
thehost='openbsd'
@ -231,6 +243,8 @@ case "${host_os}" in
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
LDRPATH="-Wl,--rpath,~A"
clibs=""
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
SONAME_LDFLAGS="-Wl,-soname,SONAME"
;;
solaris*)
thehost='sun4sol2'
@ -284,6 +298,8 @@ case "${host_os}" in
fi
# ECL, due to some of the libraries, does not build on
# 64 bit mode on OSX. We prevent GMP using that mode.
SONAME="${SHAREDPREFIX}ecl.SOVERSION.${SHAREDEXT}"
SONAME_LDFLAGS="-Wl,-install_name,SONAME -Wl,-compatibility_version,${PACKAGE_VERSION}"
;;
nsk*)
# HP Non-Stop platform

View file

@ -53,6 +53,7 @@
"@SHARED_LDFLAGS@ @LDFLAGS@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @LIBS@ @FASL_LIBS@"
c::*ld-bundle-flags*
"@BUNDLE_LDFLAGS@ @LDFLAGS@ @SHAREDPREFIX@ecl.@SHAREDEXT@ @LIBS@ @FASL_LIBS@")
;;; FIXME: The nonstop platform does not support soname
#+(and :wants-dlopen nonstop)
(setf c::*ld-flags*
"@LDFLAGS@ -Wld=-l@SHAREDPREFIX@ecl.@SHAREDEXT@ @LIBS@"
@ -102,13 +103,10 @@
;;;
;;; We do not need the -rpath flag for the library, nor -lecl.
;;;
(let* ((c::*ld-shared-flags* #-msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@"
(let* ((c::*ld-shared-flags* #-msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @CORE_LIBS@ @LIBS@ @FASL_LIBS@"
#+msvc "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@")
(c::*cc-flags* (concatenate 'string "-DECL_API -I@true_builddir@/c " c::*cc-flags*))
(extra-args nil))
#+darwin
(push "-Wl,-install_name,@libdir\@/@SHAREDPREFIX@ecl.@SHAREDEXT@"
extra-args)
#+(or mingw32 cygwin)
(progn
;; We need these two to force dllwrap to export the symbols

5084
src/configure vendored

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ dnl AUTOCONF configuration for ECL
dnl Giuseppe Attardi 25.1.1994
dnl
AC_INIT([ecl],[0.9l],[])
AC_INIT([ecl],[8.9.0],[])
AC_REVISION([$Revision$])
AC_CONFIG_SRCDIR([bare.lsp.in])
AC_CONFIG_AUX_DIR([${srcdir}/gmp])
@ -50,6 +50,12 @@ AC_ARG_ENABLE(slow-config,
[(no|yes, default=NO)]),
[], [enable_slow_config=no] )
AC_ARG_ENABLE(soname,
AS_HELP_STRING( [--enable-soname],
[link and install the library using version numbers]
[(no|yes, default=yes)]),
[], [enable_soname=yes] )
AC_ARG_WITH(system-boehm,
AS_HELP_STRING( [--with-system-boehm], [Deprecated! See --enable-boehm] ),
[AC_MSG_WARN(
@ -208,9 +214,9 @@ AC_ARG_ENABLE(gengc,
dnl -----------------------------------------------------------------------
dnl Installation directories
ecldir="${libdir}/ecl"
ecldir="${libdir}/ecl-${PACKAGE_VERSION}"
AC_SUBST([ecldir])
test -z "${docdir}" && docdir="${datadir}/doc/ecl"
test -z "${docdir}" && docdir="${datadir}/doc/ecl-${PACKAGE_VERSION}"
AC_SUBST([docdir])
dnl -----------------------------------------------------------------------
@ -374,7 +380,39 @@ if test "x${with_gmp}" != "xno"; then
LIBRARIES="${LIBRARIES} ${LIBPREFIX}eclgmp.${LIBEXT}"
fi
fi
fi
fi
dnl ----------------------------------------------------------------------
dnl SONAME is only active when SONAME_LDFLAGS and SONAME are non nil
dnl
AC_MSG_CHECKING(for soname flags)
if test "${enable_soname}" != yes; then
SONAME=''
SONAME1=''
SONAME2=''
SONAME3=''
SONAME_ALIASES=''
SONAME_LDFLAGS=''
AC_MSG_RESULT([none])
else
PACKAGE_MAJOR=`echo ${PACKAGE_VERSION} | sed -e 's,\(.*\)\..*\..*,\1,g'`
PACKAGE_MINOR=`echo ${PACKAGE_VERSION} | sed -e 's,.*\.\(.*\)\..*,\1,g'`
PACKAGE_LEAST=`echo ${PACKAGE_VERSION} | sed -e 's,.*\..*\.\(.*\),\1,g'`
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_LEAST}"
SONAME3=`echo $SONAME | sed "s,.SOVERSION,.$i,g"`
i="${PACKAGE_MAJOR}.${PACKAGE_MINOR}"
SONAME2=`echo $SONAME | sed "s,.SOVERSION,.$i,g"`
i="${PACKAGE_MAJOR}"
SONAME1=`echo $SONAME | sed "s,.SOVERSION,.$i,g"`
SONAME=`echo $SONAME | sed "s,.SOVERSION,,g"`
SONAME_LDFLAGS=`echo $SONAME_LDFLAGS | sed "s,SONAME,$SONAME2,g"`
AC_MSG_RESULT([${SONAME_LDFLAGS}])
fi
AC_SUBST(SONAME3)
AC_SUBST(SONAME2)
AC_SUBST(SONAME1)
AC_SUBST(SONAME)
AC_SUBST(SONAME_LDFLAGS)
dnl =====================================================================
dnl Checks for header files
@ -506,6 +544,7 @@ if test ${enable_shared} = "yes"; then
LSP_LIBRARIES="${SHAREDPREFIX}ecl.${SHAREDEXT}"
ECL_ADD_FEATURE([wants-dlopen])
else
enable_soname=no
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
LDRPATH='~*'
fi

View file

@ -24,7 +24,8 @@
#if defined(mingw32) || defined(_MSC_VER) || defined(cygwin)
# define ECL_DLLEXPORT __declspec(dllexport)
# ifdef ECL_API
# undef ECL_API /* Avoid autoconf removing this */
# undef \
ECL_API /* Avoid autoconf removing this */
# define ECL_API __declspec(dllexport)
# else
# define ECL_API __declspec(dllimport)
@ -32,7 +33,8 @@
#else
# define ECL_DLLEXPORT
# ifdef ECL_API
# undef ECL_API /* Avoid autoconf removing this */
# undef \
ECL_API /* Avoid autoconf removing this */
# endif
# define ECL_API
#endif