mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 05:12:38 -08:00
Implement a new configuration flag, --enable-rpath.
This commit is contained in:
parent
f33a082b14
commit
085a5a4388
6 changed files with 75 additions and 32 deletions
|
|
@ -6,6 +6,13 @@ ECL 9.8.2:
|
|||
- The C inline expansion for sin, cos, and tan were wrong due to three
|
||||
recently introduced typos.
|
||||
|
||||
* Visible changes:
|
||||
|
||||
- A new configuration flag, --enable-rpath, allows hardcoding in ECL the
|
||||
location of its shared library. This is not needed in Windows, it should
|
||||
work on all supported platforms and its purpose is to simplify the
|
||||
installation of ECL in nonstandard locations.
|
||||
|
||||
|
||||
ECL 9.8.1:
|
||||
==========
|
||||
|
|
|
|||
22
src/aclocal.m4
vendored
22
src/aclocal.m4
vendored
|
|
@ -183,7 +183,7 @@ AC_SUBST(SOFTWARE_TYPE)dnl Type of operating system
|
|||
AC_SUBST(SOFTWARE_VERSION)dnl Version number of operating system
|
||||
AC_SUBST(MACHINE_VERSION)dnl Version of the machine
|
||||
|
||||
AC_SUBST(LDRPATH)dnl Sometimes the path for finding DLLs must be hardcoded.
|
||||
AC_SUBST(ECL_LDRPATH)dnl Sometimes the path for finding DLLs must be hardcoded.
|
||||
AC_SUBST(LIBPREFIX)dnl Name components of a statically linked library
|
||||
AC_SUBST(LIBEXT)
|
||||
AC_SUBST(SHAREDEXT)dnl Name components of a dynamically linked library
|
||||
|
|
@ -192,7 +192,7 @@ AC_SUBST(OBJEXT)dnl These are set by autoconf
|
|||
AC_SUBST(EXEEXT)
|
||||
AC_SUBST(INSTALL_TARGET)dnl Which type of installation: flat directory or unix like.
|
||||
AC_SUBST(thehost)
|
||||
LDRPATH='~*'
|
||||
ECL_LDRPATH=''
|
||||
SHAREDEXT='so'
|
||||
SHAREDPREFIX='lib'
|
||||
LIBPREFIX='lib'
|
||||
|
|
@ -214,7 +214,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wl,--rpath,~A'
|
||||
ECL_LDRPATH='-Wl,--rpath,~A'
|
||||
clibs="-ldl"
|
||||
# Maybe CFLAGS="-D_ISOC99_SOURCE ${CFLAGS}" ???
|
||||
CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ${CFLAGS}"
|
||||
|
|
@ -227,7 +227,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wl,--rpath,~A'
|
||||
ECL_LDRPATH='-Wl,--rpath,~A'
|
||||
clibs="-ldl"
|
||||
CFLAGS="-D_GNU_SOURCE ${CFLAGS}"
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
|
|
@ -239,7 +239,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wl,--rpath,~A'
|
||||
ECL_LDRPATH='-Wl,--rpath,~A'
|
||||
clibs="-ldl"
|
||||
CFLAGS="-D_GNU_SOURCE ${CFLAGS}"
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
|
|
@ -250,7 +250,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
ECL_LDRPATH="-Wl,--rpath,~A"
|
||||
clibs=""
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
SONAME_LDFLAGS="-Wl,-soname,SONAME"
|
||||
|
|
@ -260,7 +260,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
ECL_LDRPATH="-Wl,--rpath,~A"
|
||||
clibs=""
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
SONAME_LDFLAGS="-Wl,-soname,SONAME"
|
||||
|
|
@ -271,7 +271,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS=''
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
ECL_LDRPATH="-Wl,--rpath,~A"
|
||||
clibs="-lpthread -lm"
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
SONAME_LDFLAGS="-Wl,-soname,SONAME"
|
||||
|
|
@ -280,7 +280,7 @@ case "${host_os}" in
|
|||
thehost='sun4sol2'
|
||||
SHARED_LDFLAGS="-dy -G ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-dy -G ${LDFLAGS}"
|
||||
LDRPATH='-Wl,-R,~A'
|
||||
ECL_LDRPATH='-Wl,-R,~A'
|
||||
TCPLIBS='-lsocket -lnsl -lintl'
|
||||
clibs='-ldl'
|
||||
CFLAGS="${CFLAGS} -std=gnu99"
|
||||
|
|
@ -317,7 +317,7 @@ case "${host_os}" in
|
|||
PICFLAG='-fPIC -fno-common'
|
||||
SHARED_LDFLAGS="-dynamiclib -flat_namespace -undefined suppress ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-bundle ${LDFLAGS}"
|
||||
LDRPATH=''
|
||||
ECL_LDRPATH=''
|
||||
THREAD_CFLAGS='-D_THREAD_SAFE'
|
||||
THREAD_LIBS='-lpthread'
|
||||
# The GMP library has not yet been ported to Intel-OSX
|
||||
|
|
@ -342,7 +342,7 @@ case "${host_os}" in
|
|||
THREAD_CFLAGS='-spthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wld=\"-rld_l ~A\"'
|
||||
ECL_LDRPATH='-Wld=\"-rld_l ~A\"'
|
||||
clibs="-Wld=-lrld"
|
||||
;;
|
||||
*)
|
||||
|
|
|
|||
|
|
@ -452,11 +452,11 @@ coprocessor).")
|
|||
(defvar *cc-optimize* #-msvc "-O"
|
||||
#+msvc "@CFLAGS_OPTIMIZE@")
|
||||
|
||||
(defvar *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~A"
|
||||
#+msvc "~A -Fe~S~* ~{~S ~} ~A")
|
||||
(defvar *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~@[~S~] ~A"
|
||||
#+msvc "~A -Fe~S~* ~{~S ~} ~@[~S~] ~A")
|
||||
|
||||
(defvar *cc-format* #-msvc "~A ~A ~:[~*~;~A~] \"-I~A\" -w -c \"~A\" -o \"~A\""
|
||||
#+msvc "~A ~A ~:[~*~;~A~] -I\"~A\" -w -c \"~A\" -Fo\"~A\"")
|
||||
(defvar *cc-format* #-msvc "~A \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\""
|
||||
#+msvc "~A -I\"~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -Fo\"~A\"")
|
||||
|
||||
#-dlopen
|
||||
(defvar *ld-flags* "@LDFLAGS@ -lecl @CORE_LIBS@ @FASL_LIBS@ @LIBS@")
|
||||
|
|
@ -482,6 +482,11 @@ coprocessor).")
|
|||
(defvar *ecl-include-directory* @includedir\@)
|
||||
(defvar *ecl-library-directory* @libdir\@)
|
||||
|
||||
(defvar *ld-rpath*
|
||||
(let ((x "@ECL_LDRPATH@"))
|
||||
(and (plusp (length x))
|
||||
(format nil x *ecl-library-directory*))))
|
||||
|
||||
;;;
|
||||
;;; Compiler program and flags.
|
||||
;;;
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
(si::coerce-to-filename o-pathname)
|
||||
(fix-for-mingw (ecl-library-directory))
|
||||
options
|
||||
*ld-rpath*
|
||||
*ld-flags*)))
|
||||
|
||||
#+dlopen
|
||||
|
|
@ -102,15 +103,17 @@
|
|||
(si::coerce-to-filename o-pathname)
|
||||
(fix-for-mingw (ecl-library-directory))
|
||||
options
|
||||
*ld-rpath*
|
||||
*ld-shared-flags*))
|
||||
#+(or mingw32)
|
||||
(let ((lib-file (compile-file-pathname o-pathname :type :lib)))
|
||||
(safe-system
|
||||
(format nil
|
||||
"gcc -shared -o ~S -L~S ~{~S ~} ~@?"
|
||||
"gcc -shared -o ~S -L~S ~{~S ~} ~@[~S~] ~@?"
|
||||
(si::coerce-to-filename o-pathname)
|
||||
(fix-for-mingw (ecl-library-directory))
|
||||
options
|
||||
*ld-rpath*
|
||||
*ld-shared-flags*))))
|
||||
|
||||
#+dlopen
|
||||
|
|
@ -123,6 +126,7 @@
|
|||
(si::coerce-to-filename o-pathname)
|
||||
(fix-for-mingw (ecl-library-directory))
|
||||
options
|
||||
*ld-rpath*
|
||||
#-msvc *ld-bundle-flags*
|
||||
#+msvc (concatenate 'string *ld-bundle-flags*
|
||||
" /EXPORT:" init-name
|
||||
|
|
@ -134,10 +138,11 @@
|
|||
#+(or mingw32)
|
||||
(safe-system
|
||||
(format nil
|
||||
"gcc -shared -o ~A -Wl,--export-all-symbols -L~S ~{~S ~} ~A"
|
||||
"gcc -shared -o ~A -Wl,--export-all-symbols -L~S ~{~S ~} ~@[~S~] ~A"
|
||||
(si::coerce-to-filename o-pathname)
|
||||
(fix-for-mingw (ecl-library-directory))
|
||||
options
|
||||
*ld-rpath*
|
||||
*ld-bundle-flags*)))
|
||||
|
||||
(defconstant +lisp-program-header+ "
|
||||
|
|
@ -850,8 +855,9 @@ from the C language code. NIL means \"do not create the file\"."
|
|||
(safe-system
|
||||
(format nil
|
||||
*cc-format*
|
||||
*cc* *cc-flags* (>= (cmp-env-optimization 'speed) 2) *cc-optimize*
|
||||
(fix-for-mingw (ecl-include-directory))
|
||||
*cc*
|
||||
(fix-for-mingw (ecl-include-directory))
|
||||
*cc-flags* (>= (cmp-env-optimization 'speed) 2) *cc-optimize*
|
||||
(si::coerce-to-filename c-pathname)
|
||||
(si::coerce-to-filename o-pathname))
|
||||
; Since the SUN4 assembler loops with big files, you might want to use this:
|
||||
|
|
|
|||
39
src/configure
vendored
39
src/configure
vendored
|
|
@ -671,7 +671,7 @@ SHAREDPREFIX
|
|||
SHAREDEXT
|
||||
LIBEXT
|
||||
LIBPREFIX
|
||||
LDRPATH
|
||||
ECL_LDRPATH
|
||||
MACHINE_VERSION
|
||||
SOFTWARE_VERSION
|
||||
SOFTWARE_TYPE
|
||||
|
|
@ -764,6 +764,7 @@ ac_user_opts='
|
|||
enable_option_checking
|
||||
with_cross_config
|
||||
enable_shared
|
||||
enable_rpath
|
||||
enable_threads
|
||||
enable_boehm
|
||||
enable_slow_config
|
||||
|
|
@ -1446,6 +1447,8 @@ Optional Features:
|
|||
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
||||
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
||||
--enable-shared enable loading compiled files (default=YES)
|
||||
--enable-rpath hard-code the location of the ECL shared library.
|
||||
(no|yes, default=NO)
|
||||
--enable-threads support for native threads (yes|no|auto,
|
||||
default=NO).
|
||||
--enable-boehm use the Boehm-Weiser garbage collector
|
||||
|
|
@ -2031,6 +2034,14 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-rpath was given.
|
||||
if test "${enable_rpath+set}" = set; then
|
||||
enableval=$enable_rpath;
|
||||
else
|
||||
enable_rpath=no
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-threads was given.
|
||||
if test "${enable_threads+set}" = set; then
|
||||
enableval=$enable_threads;
|
||||
|
|
@ -4359,7 +4370,7 @@ MV="mv"
|
|||
|
||||
|
||||
|
||||
LDRPATH='~*'
|
||||
ECL_LDRPATH=''
|
||||
SHAREDEXT='so'
|
||||
SHAREDPREFIX='lib'
|
||||
LIBPREFIX='lib'
|
||||
|
|
@ -4381,7 +4392,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wl,--rpath,~A'
|
||||
ECL_LDRPATH='-Wl,--rpath,~A'
|
||||
clibs="-ldl"
|
||||
# Maybe CFLAGS="-D_ISOC99_SOURCE ${CFLAGS}" ???
|
||||
CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 ${CFLAGS}"
|
||||
|
|
@ -4394,7 +4405,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wl,--rpath,~A'
|
||||
ECL_LDRPATH='-Wl,--rpath,~A'
|
||||
clibs="-ldl"
|
||||
CFLAGS="-D_GNU_SOURCE ${CFLAGS}"
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
|
|
@ -4406,7 +4417,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wl,--rpath,~A'
|
||||
ECL_LDRPATH='-Wl,--rpath,~A'
|
||||
clibs="-ldl"
|
||||
CFLAGS="-D_GNU_SOURCE ${CFLAGS}"
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
|
|
@ -4417,7 +4428,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
ECL_LDRPATH="-Wl,--rpath,~A"
|
||||
clibs=""
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
SONAME_LDFLAGS="-Wl,-soname,SONAME"
|
||||
|
|
@ -4427,7 +4438,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS='-lpthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
ECL_LDRPATH="-Wl,--rpath,~A"
|
||||
clibs=""
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
SONAME_LDFLAGS="-Wl,-soname,SONAME"
|
||||
|
|
@ -4438,7 +4449,7 @@ case "${host_os}" in
|
|||
THREAD_LIBS=''
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH="-Wl,--rpath,~A"
|
||||
ECL_LDRPATH="-Wl,--rpath,~A"
|
||||
clibs="-lpthread -lm"
|
||||
SONAME="${SHAREDPREFIX}ecl.${SHAREDEXT}.SOVERSION"
|
||||
SONAME_LDFLAGS="-Wl,-soname,SONAME"
|
||||
|
|
@ -4447,7 +4458,7 @@ case "${host_os}" in
|
|||
thehost='sun4sol2'
|
||||
SHARED_LDFLAGS="-dy -G ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-dy -G ${LDFLAGS}"
|
||||
LDRPATH='-Wl,-R,~A'
|
||||
ECL_LDRPATH='-Wl,-R,~A'
|
||||
TCPLIBS='-lsocket -lnsl -lintl'
|
||||
clibs='-ldl'
|
||||
CFLAGS="${CFLAGS} -std=gnu99"
|
||||
|
|
@ -4484,7 +4495,7 @@ case "${host_os}" in
|
|||
PICFLAG='-fPIC -fno-common'
|
||||
SHARED_LDFLAGS="-dynamiclib -flat_namespace -undefined suppress ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-bundle ${LDFLAGS}"
|
||||
LDRPATH=''
|
||||
ECL_LDRPATH=''
|
||||
THREAD_CFLAGS='-D_THREAD_SAFE'
|
||||
THREAD_LIBS='-lpthread'
|
||||
# The GMP library has not yet been ported to Intel-OSX
|
||||
|
|
@ -4509,7 +4520,7 @@ case "${host_os}" in
|
|||
THREAD_CFLAGS='-spthread'
|
||||
SHARED_LDFLAGS="-shared ${LDFLAGS}"
|
||||
BUNDLE_LDFLAGS="-shared ${LDFLAGS}"
|
||||
LDRPATH='-Wld=\"-rld_l ~A\"'
|
||||
ECL_LDRPATH='-Wld=\"-rld_l ~A\"'
|
||||
clibs="-Wld=-lrld"
|
||||
;;
|
||||
*)
|
||||
|
|
@ -12972,7 +12983,11 @@ LSP_FEATURES="(cons :wants-dlopen ${LSP_FEATURES})"
|
|||
else
|
||||
enable_soname=no
|
||||
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
|
||||
LDRPATH='~*'
|
||||
ECL_LDRPATH=''
|
||||
fi
|
||||
|
||||
if test "x${enable_rpath}" = "xno"; then
|
||||
ECL_LDRPATH=''
|
||||
fi
|
||||
|
||||
if test "${with_cmuformat}" = "yes"; then
|
||||
|
|
|
|||
|
|
@ -33,6 +33,12 @@ AC_ARG_ENABLE(shared,
|
|||
[enable loading compiled files (default=YES)]),
|
||||
[], [enable_shared=yes])
|
||||
|
||||
AC_ARG_ENABLE(rpath,
|
||||
AS_HELP_STRING( [--enable-rpath],
|
||||
[hard-code the location of the ECL shared library.]
|
||||
[(no|yes, default=NO)]),
|
||||
[], [enable_rpath=no] )
|
||||
|
||||
AC_ARG_ENABLE(threads,
|
||||
AS_HELP_STRING( [--enable-threads],
|
||||
[support for native threads (yes|no|auto, default=NO).]),
|
||||
|
|
@ -634,7 +640,11 @@ if test ${enable_shared} = "yes"; then
|
|||
else
|
||||
enable_soname=no
|
||||
LSP_LIBRARIES="${LIBPREFIX}ecl.${LIBEXT}"
|
||||
LDRPATH='~*'
|
||||
ECL_LDRPATH=''
|
||||
fi
|
||||
|
||||
if test "x${enable_rpath}" = "xno"; then
|
||||
ECL_LDRPATH=''
|
||||
fi
|
||||
|
||||
if test "${with_cmuformat}" = "yes"; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue