Commit b5522f44 authored by Erick's avatar Erick

added %shared-suffix for MacOs which distinguishes libraries and modules

parent 999c02a4
......@@ -187,6 +187,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -614,6 +614,7 @@ STACK_DIRECTION
COMPSRC
COMPOBJ
SH_MAIN_LOAD_FLAGS
SH_LIB_SUFFIX
SH_SUFFIX
SH_LOADER
SH_LOAD_FLAGS
......@@ -6879,6 +6880,7 @@ LIB_SUMMARY="(:system ($SYST_LIBS) :compiled ($COMP_LIBS))"
#GC
......
......@@ -2,7 +2,7 @@
###
### Author: Erick Gallesio [eg@unice.fr]
### Creation date: 28-Dec-1999 21:19 (eg)
### Last file update: 8-May-2010 18:54 (eg)
### Last file update: 5-Aug-2010 23:58 (eg)
AC_PREREQ(2.64)
AC_INIT([stklos], [1.00])
......@@ -398,6 +398,7 @@ AC_SUBST(SH_COMP_FLAGS)
AC_SUBST(SH_LOAD_FLAGS)
AC_SUBST(SH_LOADER)
AC_SUBST(SH_SUFFIX)
AC_SUBST(SH_LIB_SUFFIX)
AC_SUBST(SH_MAIN_LOAD_FLAGS)
AC_SUBST(COMPOBJ)
AC_SUBST(COMPSRC)
......
......@@ -164,6 +164,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -152,6 +152,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -156,6 +156,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -195,6 +195,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -155,6 +155,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -155,6 +155,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -156,6 +156,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -156,6 +156,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -206,6 +206,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -21,7 +21,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 19-May-2000 18:44 (eg)
* Last file update: 30-Jun-2010 19:45 (eg)
* Last file update: 6-Aug-2010 00:00 (eg)
*/
#define PREFIXDIR "@PREFIX@"
......@@ -40,3 +40,4 @@
/* Various stuff */
#define @OS_FLAVOUR@ 1
#define SHARED_SUFFIX "@SH_SUFFIX@"
#define SHARED_LIB_SUFFIX "@SH_LIB_SUFFIX@"
......@@ -16,7 +16,7 @@
*
* Author: Erick Gallesio [eg@kaolin.unice.fr]
* Creation date: 29-Mar-1994 10:57
* Last file update: 30-Jun-2010 19:56 (eg)
* Last file update: 6-Aug-2010 00:02 (eg)
*/
#include <unistd.h>
......@@ -1113,11 +1113,16 @@ DEFINE_PRIMITIVE("%library-prefix", library_prefix, subr0, (void))
return STk_Cstring2string(PREFIXDIR);
}
DEFINE_PRIMITIVE("%shared-library-suffix", shared_library_suffix, subr0, (void))
DEFINE_PRIMITIVE("%shared-suffix", shared_suffix, subr0, (void))
{
return STk_Cstring2string(SHARED_SUFFIX);
}
DEFINE_PRIMITIVE("%shared-library-suffix", shared_library_suffix, subr0, (void))
{
return STk_Cstring2string(SHARED_LIB_SUFFIX);
}
DEFINE_PRIMITIVE("%chmod", change_mode, subr2, (SCM file, SCM value))
{
long mode = STk_integer_value(value);
......@@ -1179,6 +1184,7 @@ int STk_init_system(void)
ADD_PRIMITIVE(unsetenv);
ADD_PRIMITIVE(hostname);
ADD_PRIMITIVE(library_prefix);
ADD_PRIMITIVE(shared_suffix);
ADD_PRIMITIVE(shared_library_suffix);
ADD_PRIMITIVE(change_mode);
......
......@@ -131,6 +131,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -156,6 +156,7 @@ SCMDIR = @SCMDIR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SH_COMP_FLAGS = @SH_COMP_FLAGS@
SH_LIB_SUFFIX = @SH_LIB_SUFFIX@
SH_LOADER = @SH_LOADER@
SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
......
......@@ -21,7 +21,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 27-Jul-2000 12:21 (eg)
# Last file update: 3-Aug-2005 13:12 (eg)
# Last file update: 5-Aug-2010 23:56 (eg)
#
......@@ -42,6 +42,7 @@ SH_COMP_FLAGS=""
SH_LOAD_FLAGS=""
SH_LOADER=":"
SH_SUFFIX=""
SH_LIB_SUFFIX=""
SH_MAIN_LOAD_FLAGS=""
#
......@@ -64,6 +65,7 @@ case $os in
SH_LOAD_FLAGS='-shared -o'
SH_LOADER='ld'
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
SH_MAIN_LOAD_FLAGS="-rdynamic"
;;
HP*)
......@@ -72,6 +74,7 @@ case $os in
SH_LOAD_FLAGS="-b -o"
SH_LOADER="ld"
SH_SUFFIX='sl'
SH_LIB_SUFFIX='sl'
SH_MAIN_LOAD_FLAGS="-Wl,-E"
;;
IRIX*)
......@@ -85,6 +88,7 @@ case $os in
SH_LOAD_FLAGS="-shared -o"
SH_LOADER="$CC"
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
;;
Linux*)
case $version in
......@@ -102,6 +106,7 @@ case $os in
SH_LOAD_FLAGS='-shared -o'
SH_LOADER='ld'
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
SH_MAIN_LOAD_FLAGS="-rdynamic"
;;
NetBSD*)
......@@ -110,6 +115,7 @@ case $os in
SH_LOAD_FLAGS="-Bshareable -o"
SH_LOADER="ld"
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
;;
OSF*)
OS=OSF
......@@ -118,6 +124,7 @@ case $os in
SH_LOAD_FLAGS="-shared -o"
SH_LOADER="ld"
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
else
die "I do not know how to dynamically load on $os with $CC"
fi
......@@ -133,6 +140,7 @@ case $os in
SH_LOAD_FLAGS='-shared -o'
SH_LOADER="ld"
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
;;
Darwin*)
OS=DARWIN;
......@@ -140,6 +148,7 @@ case $os in
SH_LOAD_FLAGS='-bundle -flat_namespace -undefined suppress -o'
SH_LOADER="$CC"
SH_SUFFIX='so'
SH_LIB_SUFFIX='dylib'
;;
CYGWIN*)
# Since I cannot figure yet how to use shared libraries in Cygwin
......@@ -150,6 +159,7 @@ case $os in
SH_LOAD_FLAGS='-shared -o'
SH_LOADER='true'
SH_SUFFIX='so'
SH_LIB_SUFFIX='so'
SH_MAIN_LOAD_FLAGS=""
;;
*) OS=UNKNOWN;;
......@@ -159,4 +169,4 @@ echo "os=\"$os\"; version=\"$version\"; machine=\"$machine\"; OS=\"$OS\"; \
OS_FLAVOUR=\"$OS_FLAVOUR\";SH_COMP_FLAGS=\"$SH_COMP_FLAGS\"; \
SH_LOAD_FLAGS=\"$SH_LOAD_FLAGS\"; \
SH_LOADER=\"$SH_LOADER\"; SH_SUFFIX=\"$SH_SUFFIX\"; \
SH_MAIN_LOAD_FLAGS=\"$SH_MAIN_LOAD_FLAGS\""
SH_LIB_SUFFIX=\"$SH_LIB_SUFFIX\"; SH_MAIN_LOAD_FLAGS=\"$SH_MAIN_LOAD_FLAGS\""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment