Skip to content
This repository
Browse code

Miscellaneous changes to improve flexibility of installation.

1) --enable-symlinks configure option (on by default)
2) --enable-multiple-versions configure option (off by default)
3) --enable-absolute-shared-libs configure option (on by default)
4) support for DESTDIR at "make install"
5) support for --bindir=BINDIR, --libdir=LIBDIR, ...
6) Gambit runtime option -:~~bin=BINDIR to override installation directory
7) ~~bin expands to BINDIR (or ~~/bin if none was specified)
8) make uninstall removes all the files that were installed (but not all the directories)
9) configure --help is much more accurate (the exception is that some of the directory specification options are not used, such as --pdfdir=...)
10) gsi -:s automatically loads ~~lib/syntax-case
  • Loading branch information...
commit 321d6cda27224fc217948cde0a7b1800b230952a 1 parent a648b60
Marc Feeley authored

Showing 78 changed files with 2,205 additions and 851 deletions. Show diff stats Hide diff stats

  1. +90 39 INSTALL.txt
  2. +109 59 bin/makefile.in
  3. +241 60 configure
  4. +215 50 configure.ac
  5. +1 1  doc/checkdoc.scm
  6. +132 102 doc/gambit-c.txi
  7. +87 16 doc/makefile.in
  8. +1 1  doc/square.scm
  9. +2 2 examples/Xlib-simple/Xlib.scm
  10. +23 11 examples/Xlib-simple/makefile.in
  11. +2 2 examples/distr-comp/dc.scm
  12. +3 3 examples/distr-comp/distr-comp.scm
  13. +23 11 examples/distr-comp/makefile.in
  14. +21 9 examples/makefile.in
  15. +23 11 examples/misc/makefile.in
  16. +23 11 examples/pi/makefile.in
  17. +2 2 examples/pi/pi.scm
  18. +24 12 examples/pthread/makefile.in
  19. +23 11 examples/ring/makefile.in
  20. +2 2 examples/ring/ring.scm
  21. +23 11 examples/tcltk/makefile.in
  22. +3 3 examples/tcltk/tcltk.scm
  23. +23 11 examples/web-repl/makefile.in
  24. +2 2 examples/web-repl/web-repl.scm
  25. +3 3 examples/web-server/base64.scm
  26. +4 4 examples/web-server/html.scm
  27. +2 2 examples/web-server/http.scm
  28. +23 11 examples/web-server/makefile.in
  29. +9 9 examples/web-server/web-server.scm
  30. +3 3 gsc/_gsc.scm
  31. +27 12 gsc/_gsclib.scm
  32. +3 3 gsc/fixnum.scm
  33. +96 35 gsc/makefile.in
  34. +3 3 gsi/_gsi.scm
  35. +2 10 gsi/main.scm
  36. +96 35 gsi/makefile.in
  37. +2 1  include/gambit.h.in
  38. +55 12 include/makefile.in
  39. +2 2 include/stamp.h
  40. +27 1 lib/_eval.scm
  41. +10 10 lib/_gambit#.scm
  42. +6 10 lib/_kernel.scm
  43. +30 15 lib/_nonstd.scm
  44. +1 1  lib/_repl.scm
  45. +3 3 lib/digest.scm
  46. +2 2 lib/gambit#.scm
  47. +21 9 lib/guide/images/makefile.in
  48. +21 9 lib/guide/makefile.in
  49. +104 52 lib/main.c
  50. +85 35 lib/makefile.in
  51. +171 1 lib/os_files.c
  52. +6 2 lib/os_files.h
  53. 0  {misc → lib}/psyntax69c.pp
  54. 0  {misc → lib}/psyntax69c.ss
  55. 0  {misc → lib}/psyntax73.pp
  56. 0  {misc → lib}/psyntax73.ss
  57. +2 2 lib/r4rs#.scm
  58. +3 3 lib/r5rs#.scm
  59. +3 2 lib/setup.c
  60. 0  {misc → lib}/syntax-case-build
  61. 0  {misc → lib}/syntax-case-expand-file
  62. 0  {misc → lib}/syntax-case-postlude.scm
  63. +6 6 {misc → lib}/syntax-case-prelude.scm
  64. +9 9 {misc → lib}/syntax-case.scm
  65. +44 14 makefile.in
  66. +57 16 misc/makefile.in
  67. +2 2 prebuilt/README
  68. +1 1  prebuilt/macosx/build
  69. +2 1  prebuilt/macosx/build-phase2.in
  70. +20 8 prebuilt/macosx/makefile.in
  71. +17 5 prebuilt/macosx/remote-shell
  72. +20 8 prebuilt/makefile.in
  73. +1 1  prebuilt/windows/build
  74. +2 1  prebuilt/windows/build-phase2.in
  75. +20 8 prebuilt/windows/makefile.in
  76. +17 5 prebuilt/windows/remote-shell
  77. +30 0 relpath
  78. +34 22 tests/makefile.in
129 INSTALL.txt
... ... @@ -1,7 +1,7 @@
1 1 Installation instructions for Gambit-C
2 2 ======================================
3 3
4   - [Time-stamp: <2007-08-21 10:58:51 feeley>]
  4 + [Time-stamp: <2008-12-23 09:06:13 feeley>]
5 5
6 6
7 7 This directory contains a release of the Gambit-C Scheme programming
@@ -19,15 +19,15 @@ On most Unix platforms the system can be easily built, tested and
19 19 installed using the following commands:
20 20
21 21 % ./configure
22   - % make
23   - % make check
24   - % make install
25 22 % make bootstrap
  23 + % make check
  24 + % sudo make install
26 25
27 26 The configure script, which was generated by the "autoconf" tool,
28   -accepts command line options that control various features. It is
29   -***highly*** recommended to use the --enable-single-host option to
30   -improve the execution speed and compactness of the executables:
  27 +accepts many command line options that control various features.
  28 +
  29 +It is ***highly*** recommended to use the --enable-single-host option
  30 +to improve the execution speed and compactness of the executables:
31 31
32 32 % ./configure --enable-single-host
33 33
@@ -39,12 +39,16 @@ the system as the source code can take advantage of some GCC
39 39 extensions. Notably the use of GCC's computed gotos reduces the
40 40 execution time by roughly 35%.
41 41
42   -When using the GCC compiler it is recommended to use the
  42 +When using some versions of the GCC compiler it is possible to use the
43 43 --enable-gcc-opts option to further improve the execution speed and
44 44 compactness of the executables:
45 45
46 46 % ./configure --enable-single-host --enable-gcc-opts
47 47
  48 +Note that this option might degrade the execution speed, so it is best
  49 +to build the system both ways and see which works best for your
  50 +version of GCC.
  51 +
48 52 These options are not used by default because compilation is much
49 53 longer and requires more RAM. In fact some platforms may not have
50 54 enough resources to build the system this way. With
@@ -68,6 +72,11 @@ by the compiler evolve and vary in computational complexity. Since
68 72 the C files are so large, the compile time is very sensitive to the
69 73 computational complexity of the optimization algorithms.
70 74
  75 +Finally, in order to support installing multiple versions of Gambit,
  76 +it is recommended to use these options:
  77 +
  78 + % ./configure --enable-single-host --enable-multiple-versions
  79 +
71 80
72 81 2) Other options of the "configure" script
73 82 ==========================================
@@ -78,29 +87,59 @@ obtained with:
78 87 % ./configure --help
79 88
80 89 Most options are the same as for other autoconf generated configure
81   -scripts. For example, you can select the installation directory with
82   -the option --prefix:
  90 +scripts. For example, you can select the central installation
  91 +directory with the option --prefix:
83 92
84   - % ./configure --prefix=/u/feeley/my-gambit
  93 + % ./configure --prefix=/Users/feeley/my-gambit
85 94 % make install
86   - % ~/my-gambit/current/bin/gsi
87   - Gambit v4.0.0
  95 + % ~/my-gambit/bin/gsi
  96 + Gambit v4.4.0
88 97 ...
89 98
90 99 If the --prefix option is not used, the default is to install all
91   -files in /usr/local/Gambit-C and its subdirectories.
  100 +files in /usr/local/Gambit-C and its subdirectories, namely "bin",
  101 +"lib", "include", etc. The files that would normally go in these
  102 +subdirectories can be redirected to other directories using one of
  103 +the following configure options:
  104 +
  105 + --bindir=DIR executables (gsi, gsc, ...)
  106 + --libdir=DIR libraries (libgambc.a, syntax-case.scm, ...)
  107 + --includedir=DIR C header files (gambit.h, ...)
  108 + --docdir=DIR documentation (gambit-c.pdf, gambit-c.html, ...)
  109 + --infodir=DIR info documentation (gambit-c.info, ...)
  110 + --datadir=DIR read-only architecture-independent data (gambit.el)
  111 +
  112 +Note that the install target of the makefiles supports the DESTDIR
  113 +environment variable which allows staging an install to a specific
  114 +directory. The command:
  115 +
  116 + % make install DESTDIR=/Users/feeley/stage
  117 +
  118 +will install all the files in /Users/feeley/stage as though it was the
  119 +root of the filesystem. Note that the use of DESTDIR is incompatible
  120 +with the combination of --enable-shared and
  121 +--enable-absolute-shared-libs options.
92 122
93 123 The configure options which are specific to the Gambit-C system are:
94 124
95 125 --enable-single-host compile each Scheme module as a single C function
96   - --enable-inline-jumps Generate inline code for jumps
97 126 --enable-gcc-opts use expensive GCC optimizations
98   - --enable-char-size=N define Scheme character size in bytes (N = 1, 2 or 4)
99 127 --enable-cplusplus compile using C++ compiler
100   - --enable-guide include the Gambit Universal IDE
101 128 --enable-shared build the Scheme runtime system as a shared library
102 129 --enable-debug build system so that it can be debugged
103 130 --enable-profile build system so that it can be profiled
  131 + --enable-feedback1 build system to accumulate trial run data
  132 + --enable-feedback2 build system using trial run feedback
  133 + --enable-inline-jumps generate inline code for jumps
  134 + --enable-char-size=N Scheme character size in bytes (N = 1, 2 or 4)
  135 + --enable-ansi-c link only with ANSI C libraries
  136 + --enable-symlinks use symbolic links for installed files not in the
  137 + central installation directory
  138 + --enable-multiple-versions
  139 + multiple installed versions are supported
  140 + --enable-absolute-shared-libs
  141 + shared libraries should be linked to using an
  142 + absolute path
104 143
105 144 The option --enable-cplusplus should be used when applications
106 145 developped with the Gambit-C compiler are to be linked with code or
@@ -109,27 +148,36 @@ source code with a C++ compiler instead of a C compiler (this is
109 148 possible because the code generated by the Gambit-C compiler conforms
110 149 both to C and C++).
111 150
112   -[NOTE: Due to some last-minute makefile problems, GUIDE is not supported
113   -in this release.]
114   -The option --enable-guide will include the Gambit Universal IDE in the
115   -Gambit-C runtime system. The option --enable-cplusplus must be used
116   -when the option --enable-guide is used. The Gambit Universal IDE
117   -requires the Qt GUI library version 3.3. To include GUIDE it is
118   -necessary to first build the system without including GUIDE (to have a
119   -working Gambit-C compiler) and then rebuild the system with GUIDE
120   -enabled. For instance:
121   -
122   - % ./configure --enable-cplusplus
123   - % make bootstrap
124   - % make clean
125   - % ./configure --enable-cplusplus --enable-guide
126   - % make
127   -
128 151 The option --enable-shared will build a shared library for the
129 152 Gambit-C runtime system. This is not supported on all platforms.
130 153
131   -The option --enable-debug and --enable-profile are useful for
132   -debugging the system.
  154 +The option --enable-debug and --enable-profile, --enable-feedback1, and
  155 +--enable-feedback2 are useful for debugging the system.
  156 +
  157 +The option --enable-symlinks is useful when the --bindir, --libdir,
  158 +... options are used. The files will actually be stored in the
  159 +central installation directory and symbolic links to those files will
  160 +be stored in the directories specified to --bindir, --libdir, ...
  161 +
  162 +The option --enable-multiple-versions allows multiple versions of
  163 +Gambit to be installed. When it is enabled the path of the central
  164 +installation directory (specified with --prefix) is automatically
  165 +extended with a subdirectory which is the version number, and a
  166 +"current" symbolic link points to the version subdirectory. All
  167 +symbolic links created as a result of the --enable-symlinks option
  168 +will refer to the files indirectly through the "current" symbolic
  169 +link. Switching to a different version of Gambit can be done by
  170 +simply redirecting the "current" symbolic link to another version
  171 +subdirectory.
  172 +
  173 +When --enable-shared is used, the option --enable-absolute-shared-libs
  174 +will install executables (for gsi and gsc) which contain references to
  175 +the absolute paths of the libraries. This is necessary when multiple
  176 +versions of Gambit are installed so that each executable refers to the
  177 +appropriate Gambit shared library. This is the default behavior.
  178 +Note that this option is incompatible with the use of DESTDIR because
  179 +the executables can only be linked after the Gambit shared libraries
  180 +are installed in their final destination.
133 181
134 182 By default the configure script will use the GCC compiler to build the
135 183 system, if it is available. To override this choice or to use special
@@ -207,10 +255,14 @@ Here is a description of the most useful "make" targets:
207 255 % make dist Creates a compressed tar file of
208 256 the system.
209 257
  258 + % make dist-devel Creates a compressed tar file of
  259 + the system including all the source code
  260 + management files.
  261 +
210 262 % make doc Builds the documentation.
211 263
212   - % make hg-setup For initial setup of source code
213   - management using Mercurial. This should
  264 + % make rc-setup For initial setup of source code
  265 + management using git. This should
214 266 only be performed by the Gambit maintainers.
215 267
216 268 % make prebuilt Builds installers for Mac OS X and Windows.
@@ -218,8 +270,7 @@ Here is a description of the most useful "make" targets:
218 270 specific and is intended for the Gambit
219 271 maintainers.
220 272
221   - % make release Builds source tarball and installers and
222   - uploads them to the Gambit web site.
  273 + % make release Builds source tarball and installers.
223 274 Note: this make target is very platform
224 275 specific and is intended for the Gambit
225 276 maintainers.
168 bin/makefile.in
@@ -12,7 +12,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
12 12 PACKAGE_STRING = @PACKAGE_STRING@
13 13 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
14 14 PACKAGE_TARNAME = @PACKAGE_TARNAME@
15   -PACKAGE_SUBDIR = @PACKAGE_SUBDIR@
16 15
17 16 @SET_MAKE@
18 17
@@ -29,8 +28,12 @@ FLAGS_EXE = @FLAGS_EXE@
29 28 DEFS = @DEFS@
30 29 LIBS = @LIBS@
31 30
  31 +LIBRARY_DEFS = @LIBRARY_DEFS@
  32 +LIB_PREFIX = @LIB_PREFIX@
  33 +LIB_EXTENSION = @LIB_EXTENSION@
32 34 GAMBCLIB = @GAMBCLIB@
33   -GAMBCCOMPLIB = @GAMBCCOMPLIB@
  35 +GAMBCGSCLIB = @GAMBCGSCLIB@
  36 +GAMBCGSILIB = @GAMBCGSILIB@
34 37 INSTALL = @INSTALL@
35 38 INSTALL_DATA = @INSTALL_DATA@
36 39 INSTALL_LIB = @INSTALL_LIB@
@@ -43,12 +46,21 @@ HG = @HG@
43 46
44 47 prefix = @prefix@
45 48 exec_prefix = @exec_prefix@
46   -includedir = $(prefix)$(PACKAGE_SUBDIR)/include
47   -libdir = $(prefix)$(PACKAGE_SUBDIR)/lib
48   -bindir = $(prefix)$(PACKAGE_SUBDIR)/bin
49   -docdir = $(prefix)$(PACKAGE_SUBDIR)/doc
50   -infodir = $(prefix)$(PACKAGE_SUBDIR)/info
51   -emacsdir = $(prefix)$(PACKAGE_SUBDIR)/share/emacs/site-lisp
  49 +includedir = @includedir@
  50 +libdir = @libdir@
  51 +bindir = @bindir@
  52 +docdir = @docdir@
  53 +infodir = @infodir@
  54 +emacsdir = @emacsdir@
  55 +libexecdir = @libexecdir@
  56 +datarootdir = @datarootdir@
  57 +datadir = @datadir@
  58 +htmldir = @htmldir@
  59 +dvidir = @dvidir@
  60 +pdfdir = @pdfdir@
  61 +psdir = @psdir@
  62 +localedir = @localedir@
  63 +mandir = @mandir@
52 64
53 65 .SUFFIXES:
54 66
@@ -58,6 +70,13 @@ GENDISTFILES =
58 70
59 71 DISTFILES = $(RCFILES) $(GENDISTFILES)
60 72
  73 +INSTFILES_BIN_PROG = gsc-cc-o.bat
  74 +INSTFILES_BIN_LINK_GSI = six@exe@ gsi-script@bat@ six-script@bat@ \
  75 +scheme-srfi-0@bat@ scheme-r5rs@bat@ scheme-r4rs@bat@ scheme-ieee-1178-1990@bat@
  76 +INSTFILES_BIN_LINK_GSC = gsc-script@bat@
  77 +INSTFILES_BIN_LINK = $(INSTFILES_BIN_LINK_GSI) $(INSTFILES_BIN_LINK_GSC)
  78 +INSTFILES_BIN = $(INSTFILES_BIN_PROG) $(INSTFILES_BIN_LINK)
  79 +
61 80 all: all-pre all-recursive all-post
62 81
63 82 all-pre:
@@ -70,7 +89,9 @@ gsc-cc-o.bat: makefile
70 89 echo "#! /bin/sh" > gsc-cc-o.bat; \
71 90 echo "" >> gsc-cc-o.bat; \
72 91 echo "# Script parameters are passed in the following environment variables:" >> gsc-cc-o.bat; \
73   - echo "# GSC_CC_O_GAMBCDIR" >> gsc-cc-o.bat; \
  92 + echo "# GSC_CC_O_GAMBCDIR_BIN" >> gsc-cc-o.bat; \
  93 + echo "# GSC_CC_O_GAMBCDIR_INCLUDE" >> gsc-cc-o.bat; \
  94 + echo "# GSC_CC_O_GAMBCDIR_LIB" >> gsc-cc-o.bat; \
74 95 echo "# GSC_CC_O_OBJ_FILENAME" >> gsc-cc-o.bat; \
75 96 echo "# GSC_CC_O_C_FILENAME_DIR" >> gsc-cc-o.bat; \
76 97 echo "# GSC_CC_O_C_FILENAME_BASE" >> gsc-cc-o.bat; \
@@ -78,7 +99,9 @@ gsc-cc-o.bat: makefile
78 99 echo "# GSC_CC_O_LD_OPTIONS_PRELUDE" >> gsc-cc-o.bat; \
79 100 echo "# GSC_CC_O_LD_OPTIONS" >> gsc-cc-o.bat; \
80 101 echo "" >> gsc-cc-o.bat; \
81   - echo "# echo GSC_CC_O_GAMBCDIR = \"\$${GSC_CC_O_GAMBCDIR}\"" >> gsc-cc-o.bat; \
  102 + echo "# echo GSC_CC_O_GAMBCDIR_BIN = \"\$${GSC_CC_O_GAMBCDIR_BIN}\"" >> gsc-cc-o.bat; \
  103 + echo "# echo GSC_CC_O_GAMBCDIR_INCLUDE = \"\$${GSC_CC_O_GAMBCDIR_INCLUDE}\"" >> gsc-cc-o.bat; \
  104 + echo "# echo GSC_CC_O_GAMBCDIR_LIB = \"\$${GSC_CC_O_GAMBCDIR_LIB}\"" >> gsc-cc-o.bat; \
82 105 echo "# echo GSC_CC_O_OBJ_FILENAME = \"\$${GSC_CC_O_OBJ_FILENAME}\"" >> gsc-cc-o.bat; \
83 106 echo "# echo GSC_CC_O_C_FILENAME_DIR = \"\$${GSC_CC_O_C_FILENAME_DIR}\"" >> gsc-cc-o.bat; \
84 107 echo "# echo GSC_CC_O_C_FILENAME_BASE = \"\$${GSC_CC_O_C_FILENAME_BASE}\"" >> gsc-cc-o.bat; \
@@ -94,7 +117,9 @@ gsc-cc-o.bat: makefile
94 117 echo "@echo off" > gsc-cc-o.bat; \
95 118 echo "" >> gsc-cc-o.bat; \
96 119 echo "rem Script parameters are passed in the following environment variables:" >> gsc-cc-o.bat; \
97   - echo "rem GSC_CC_O_GAMBCDIR" >> gsc-cc-o.bat; \
  120 + echo "rem GSC_CC_O_GAMBCDIR_BIN" >> gsc-cc-o.bat; \
  121 + echo "rem GSC_CC_O_GAMBCDIR_INCLUDE" >> gsc-cc-o.bat; \
  122 + echo "rem GSC_CC_O_GAMBCDIR_LIB" >> gsc-cc-o.bat; \
98 123 echo "rem GSC_CC_O_OBJ_FILENAME" >> gsc-cc-o.bat; \
99 124 echo "rem GSC_CC_O_C_FILENAME_DIR" >> gsc-cc-o.bat; \
100 125 echo "rem GSC_CC_O_C_FILENAME_BASE" >> gsc-cc-o.bat; \
@@ -102,7 +127,9 @@ gsc-cc-o.bat: makefile
102 127 echo "rem GSC_CC_O_LD_OPTIONS_PRELUDE" >> gsc-cc-o.bat; \
103 128 echo "rem GSC_CC_O_LD_OPTIONS" >> gsc-cc-o.bat; \
104 129 echo "" >> gsc-cc-o.bat; \
105   - echo "rem echo GSC_CC_O_GAMBCDIR = %GSC_CC_O_GAMBCDIR%" >> gsc-cc-o.bat; \
  130 + echo "rem echo GSC_CC_O_GAMBCDIR_BIN = %GSC_CC_O_GAMBCDIR_BIN%" >> gsc-cc-o.bat; \
  131 + echo "rem echo GSC_CC_O_GAMBCDIR_INCLUDE = %GSC_CC_O_GAMBCDIR_INCLUDE%" >> gsc-cc-o.bat; \
  132 + echo "rem echo GSC_CC_O_GAMBCDIR_LIB = %GSC_CC_O_GAMBCDIR_LIB%" >> gsc-cc-o.bat; \
106 133 echo "rem echo GSC_CC_O_OBJ_FILENAME = %GSC_CC_O_OBJ_FILENAME%" >> gsc-cc-o.bat; \
107 134 echo "rem echo GSC_CC_O_C_FILENAME_DIR = %GSC_CC_O_C_FILENAME_DIR%" >> gsc-cc-o.bat; \
108 135 echo "rem echo GSC_CC_O_C_FILENAME_BASE = %GSC_CC_O_C_FILENAME_BASE%" >> gsc-cc-o.bat; \
@@ -121,12 +148,12 @@ gsc-cc-o.bat: makefile
121 148 echo "" >> gsc-cc-o.bat; \
122 149 echo ":use_gcc.exe" >> gsc-cc-o.bat; \
123 150 echo "cd \"%GSC_CC_O_C_FILENAME_DIR%\"" >> gsc-cc-o.bat; \
124   - echo "gcc.exe -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fno-common -mieee-fp -shared -I\"%GSC_CC_O_GAMBCDIR%include\" -D___DYNAMIC -D___SINGLE_HOST -o \"%GSC_CC_O_OBJ_FILENAME%\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \"%GSC_CC_O_C_FILENAME_BASE%\" %GSC_CC_O_LD_OPTIONS%" >> gsc-cc-o.bat; \
  151 + echo "gcc.exe -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fno-common -mieee-fp -shared -I\"%GSC_CC_O_GAMBCDIR_INCLUDE%\" -D___DYNAMIC -D___SINGLE_HOST -o \"%GSC_CC_O_OBJ_FILENAME%\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \"%GSC_CC_O_C_FILENAME_BASE%\" %GSC_CC_O_LD_OPTIONS%" >> gsc-cc-o.bat; \
125 152 echo "goto end" >> gsc-cc-o.bat; \
126 153 echo "" >> gsc-cc-o.bat; \
127 154 echo ":use_cl.exe" >> gsc-cc-o.bat; \
128 155 echo "cd \"%GSC_CC_O_C_FILENAME_DIR%\"" >> gsc-cc-o.bat; \
129   - echo "cl.exe -nologo -Oityb1 -MT -D_CRT_SECURE_NO_DEPRECATE -LD -I\"%GSC_CC_O_GAMBCDIR%include\" -D___DYNAMIC -D___SINGLE_HOST -Fe\"%GSC_CC_O_OBJ_FILENAME%\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \"%GSC_CC_O_C_FILENAME_BASE%\" %GSC_CC_O_LD_OPTIONS%" >> gsc-cc-o.bat; \
  156 + echo "cl.exe -nologo -Oityb1 -MT -D_CRT_SECURE_NO_DEPRECATE -LD -I\"%GSC_CC_O_GAMBCDIR_INCLUDE%\" -D___DYNAMIC -D___SINGLE_HOST -Fe\"%GSC_CC_O_OBJ_FILENAME%\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \"%GSC_CC_O_C_FILENAME_BASE%\" %GSC_CC_O_LD_OPTIONS%" >> gsc-cc-o.bat; \
130 157 echo "goto end" >> gsc-cc-o.bat; \
131 158 echo "" >> gsc-cc-o.bat; \
132 159 echo ":use_build_time_c_compiler" >> gsc-cc-o.bat; \
@@ -206,62 +233,85 @@ scheme-ieee-1178-1990@bat@: makefile
206 233 install-pre:
207 234
208 235 install-post: all
209   - $(srcdirpfx)$(rootfromhere)/mkidirs $(bindir)
210   - rm -f $(bindir)/gsc-cc-o.bat \
211   - $(bindir)/six@exe@ $(bindir)/six@exe@.lnk \
212   - $(bindir)/gsi-script@bat@ $(bindir)/gsi-script@bat@.lnk \
213   - $(bindir)/gsc-script@bat@ $(bindir)/gsc-script@bat@.lnk \
214   - $(bindir)/six-script@bat@ $(bindir)/six-script@bat@.lnk \
215   - $(bindir)/scheme-srfi-0@bat@ $(bindir)/scheme-srfi-0@bat@.lnk \
216   - $(bindir)/scheme-r5rs@bat@ $(bindir)/scheme-r5rs@bat@.lnk \
217   - $(bindir)/scheme-r4rs@bat@ $(bindir)/scheme-r4rs@bat@.lnk \
218   - $(bindir)/scheme-ieee-1178-1990@bat@ $(bindir)/scheme-ieee-1178-1990@bat@.lnk
219   - $(INSTALL_PROGRAM) gsc-cc-o.bat $(bindir)/gsc-cc-o.bat
220   - if test "@bat@" = ""; then \
221   - (cd $(bindir) && $(LN_S) gsi@exe@ six@exe@); \
222   - (cd $(bindir) && $(LN_S) gsi@exe@ gsi-script@bat@); \
223   - (cd $(bindir) && $(LN_S) gsc@exe@ gsc-script@bat@); \
224   - (cd $(bindir) && $(LN_S) gsi@exe@ six-script@bat@); \
225   - (cd $(bindir) && $(LN_S) gsi@exe@ scheme-srfi-0@bat@); \
226   - (cd $(bindir) && $(LN_S) gsi@exe@ scheme-r5rs@bat@); \
227   - (cd $(bindir) && $(LN_S) gsi@exe@ scheme-r4rs@bat@); \
228   - (cd $(bindir) && $(LN_S) gsi@exe@ scheme-ieee-1178-1990@bat@); \
229   - else \
230   - $(INSTALL_PROGRAM) six@exe@ $(bindir)/six@exe@; \
231   - $(INSTALL_PROGRAM) gsi-script@bat@ $(bindir)/gsi-script@bat@; \
232   - $(INSTALL_PROGRAM) gsc-script@bat@ $(bindir)/gsc-script@bat@; \
233   - $(INSTALL_PROGRAM) six-script@bat@ $(bindir)/six-script@bat@; \
234   - $(INSTALL_PROGRAM) scheme-srfi-0@bat@ $(bindir)/scheme-srfi-0@bat@; \
235   - $(INSTALL_PROGRAM) scheme-r5rs@bat@ $(bindir)/scheme-r5rs@bat@; \
236   - $(INSTALL_PROGRAM) scheme-r4rs@bat@ $(bindir)/scheme-r4rs@bat@; \
237   - $(INSTALL_PROGRAM) scheme-ieee-1178-1990@bat@ $(bindir)/scheme-ieee-1178-1990@bat@; \
  236 + c_bindir=$(DESTDIR)$(prefix)/bin; \
  237 + i_bindir=$(DESTDIR)$(bindir); \
  238 + t_bindir=$$i_bindir; \
  239 + $(srcdirpfx)$(rootfromhere)/mkidirs $$i_bindir; \
  240 + if test "@ENABLE_SYMLINKS@" = "yes"; then \
  241 + $(srcdirpfx)$(rootfromhere)/mkidirs $$c_bindir; \
  242 + t_bindir=$$c_bindir; \
  243 + fi; \
  244 + for file in $(INSTFILES_BIN_LINK); do \
  245 + rm -f $$t_bindir/$$file $$t_bindir/$$file.lnk; \
  246 + done; \
  247 + for file in $(INSTFILES_BIN_PROG); do \
  248 + $(INSTALL_PROGRAM) $$file $$t_bindir/$$file; \
  249 + done; \
  250 + for file in $(INSTFILES_BIN_LINK_GSI); do \
  251 + (cd $$t_bindir && $(LN_S) gsi@exe@ $$file); \
  252 + done; \
  253 + for file in $(INSTFILES_BIN_LINK_GSC); do \
  254 + (cd $$t_bindir && $(LN_S) gsc@exe@ $$file); \
  255 + done; \
  256 + if test "$$t_bindir" != "$$i_bindir"; then \
  257 + r_bindir=`$(rootfromhere)/relpath "$$t_bindir" "$$i_bindir" @ENABLE_MULTIPLE_VERSIONS@`; \
  258 + for file in $(INSTFILES_BIN_LINK); do \
  259 + rm -f $$i_bindir/$$file $$i_bindir/$$file.lnk; \
  260 + done; \
  261 + for file in $(INSTFILES_BIN); do \
  262 + (cd $$i_bindir && $(LN_S) $$r_bindir$$file $$file); \
  263 + done; \
238 264 fi
239 265
240 266 uninstall-pre:
241 267
242 268 uninstall-post:
243   - rm -f $(bindir)/gsc-cc-o.bat \
244   - $(bindir)/six@exe@ $(bindir)/six@exe@.lnk \
245   - $(bindir)/gsi-script@bat@ $(bindir)/gsi-script@bat@.lnk \
246   - $(bindir)/gsc-script@bat@ $(bindir)/gsc-script@bat@.lnk \
247   - $(bindir)/six-script@bat@ $(bindir)/six-script@bat@.lnk \
248   - $(bindir)/scheme-srfi-0@bat@ $(bindir)/scheme-srfi-0@bat@.lnk \
249   - $(bindir)/scheme-r5rs@bat@ $(bindir)/scheme-r5rs@bat@.lnk \
250   - $(bindir)/scheme-r4rs@bat@ $(bindir)/scheme-r4rs@bat@.lnk \
251   - $(bindir)/scheme-ieee-1178-1990@bat@ $(bindir)/scheme-ieee-1178-1990@bat@.lnk
  269 + c_bindir=$(DESTDIR)$(prefix)/bin; \
  270 + i_bindir=$(DESTDIR)$(bindir); \
  271 + t_bindir=$$i_bindir; \
  272 + $(srcdirpfx)$(rootfromhere)/mkidirs $$i_bindir; \
  273 + if test "@ENABLE_SYMLINKS@" = "yes"; then \
  274 + $(srcdirpfx)$(rootfromhere)/mkidirs $$c_bindir; \
  275 + t_bindir=$$c_bindir; \
  276 + fi; \
  277 + for file in $(INSTFILES_BIN_LINK); do \
  278 + rm -f $$t_bindir/$$file $$t_bindir/$$file.lnk; \
  279 + done; \
  280 + for file in $(INSTFILES_BIN_PROG); do \
  281 + rm -f $$t_bindir/$$file; \
  282 + done; \
  283 + if test "$$t_bindir" != "$$i_bindir"; then \
  284 + for file in $(INSTFILES_BIN_LINK); do \
  285 + rm -f $$i_bindir/$$file $$i_bindir/$$file.lnk; \
  286 + done; \
  287 + for file in $(INSTFILES_BIN_PROG); do \
  288 + rm -f $$i_bindir/$$file; \
  289 + done; \
  290 + fi; \
  291 + rmdir $$t_bindir 2> /dev/null; \
  292 + if test "$$t_bindir" != "$$i_bindir"; then \
  293 + rmdir $$i_bindir 2> /dev/null; \
  294 + fi
252 295
253 296 mostlyclean-pre:
254 297
255 298 mostlyclean-post:
256 299 rm -f gsc-cc-o.bat \
257 300 six@exe@ six@exe@.lnk \
258   - gsi-script@bat@ gsi-script@bat@.lnk \
259   - gsc-script@bat@ gsc-script@bat@.lnk \
260   - six-script@bat@ six-script@bat@.lnk \
261   - scheme-srfi-0@bat@ scheme-srfi-0@bat@.lnk \
262   - scheme-r5rs@bat@ scheme-r5rs@bat@.lnk \
263   - scheme-r4rs@bat@ scheme-r4rs@bat@.lnk \
264   - scheme-ieee-1178-1990@bat@ scheme-ieee-1178-1990@bat@.lnk
  301 + gsi-script@bat@ \
  302 + gsi-script@bat@.lnk \
  303 + gsc-script@bat@ \
  304 + gsc-script@bat@.lnk \
  305 + six-script@bat@ \
  306 + six-script@bat@.lnk \
  307 + scheme-srfi-0@bat@ \
  308 + scheme-srfi-0@bat@.lnk \
  309 + scheme-r5rs@bat@ \
  310 + scheme-r5rs@bat@.lnk \
  311 + scheme-r4rs@bat@ \
  312 + scheme-r4rs@bat@.lnk \
  313 + scheme-ieee-1178-1990@bat@ \
  314 + scheme-ieee-1178-1990@bat@.lnk
265 315
266 316 clean-pre: mostlyclean-pre
267 317
301 configure
@@ -678,7 +678,6 @@ build_alias
678 678 host_alias
679 679 target_alias
680 680 PACKAGE_SHORTNAME
681   -PACKAGE_SUBDIR
682 681 build
683 682 build_cpu
684 683 build_vendor
@@ -773,13 +772,19 @@ obj
773 772 bat
774 773 SETDLPATH
775 774 GSC_CC_O
  775 +LIBRARY_DEFS
  776 +LIB_PREFIX
  777 +LIB_EXTENSION
776 778 GAMBCLIB
777 779 GAMBCGSCLIB
778 780 GAMBCGSILIB
779 781 MAKE_LIBRARY
780 782 MAKE_LIBRARY_FOR_INSTALL
  783 +MAKE_LIBRARY_FOR_INSTALL_LIBS
781 784 LINK
782 785 LINK_FOR_INSTALL
  786 +LINK_FOR_INSTALL_GSI_LIBS
  787 +LINK_FOR_INSTALL_GSC_LIBS
783 788 INSTALL
784 789 INSTALL_DATA
785 790 INSTALL_LIB
@@ -789,6 +794,12 @@ GIT
789 794 HG
790 795 FIXLIB
791 796 X_FLAGS
  797 +ENABLE_SYMLINKS
  798 +ENABLE_MULTIPLE_VERSIONS
  799 +ENABLE_SHARED
  800 +ENABLE_ABSOLUTE_SHARED_LIBS
  801 +ENABLE_VERSIONNED_LIBS
  802 +emacsdir
792 803 SET_MAKE
793 804 LIBOBJS
794 805 LTLIBOBJS'
@@ -807,6 +818,9 @@ enable_gcc_opts
807 818 enable_char_size
808 819 enable_shared
809 820 enable_ansi_c
  821 +enable_symlinks
  822 +enable_multiple_versions
  823 +enable_absolute_shared_libs
810 824 with_x
811 825 '
812 826 ac_precious_vars='build_alias
@@ -1465,12 +1479,20 @@ Optional Features:
1465 1479 NO)
1466 1480 --enable-single-host compile each Scheme module as a single C function
1467 1481 (default is NO)
1468   - --enable-inline-jumps Generate inline code for jumps (default is NO)
1469   - --enable-gcc-opts Use expensive GCC optimizations (default is NO)
  1482 + --enable-inline-jumps generate inline code for jumps (default is NO)
  1483 + --enable-gcc-opts use expensive GCC optimizations (default is NO)
1470 1484 --enable-char-size=N Scheme character size in bytes (default is 4)
1471 1485 --enable-shared build the Scheme runtime system as a shared library
1472 1486 (default is NO)
1473 1487 --enable-ansi-c link only with ANSI C libraries (default is NO)
  1488 + --enable-symlinks use symbolic links for installed files not in the
  1489 + central installation directory (default is YES)
  1490 + --enable-multiple-versions
  1491 + multiple installed versions are supported (default
  1492 + is NO)
  1493 + --enable-absolute-shared-libs
  1494 + shared libraries should be linked to using an
  1495 + absolute path (default is YES)
1474 1496
1475 1497 Optional Packages:
1476 1498 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1944,9 +1966,6 @@ ac_config_headers="$ac_config_headers include/config.h"
1944 1966
1945 1967
1946 1968 PACKAGE_SHORTNAME="gambc"
1947   -PACKAGE_SUBDIR="/$PACKAGE_VERSION"
1948   -#PACKAGE_SUBDIR=""
1949   -
1950 1969
1951 1970
1952 1971
@@ -2134,6 +2153,7 @@ FLAGS_DYN=""
2134 2153 FLAGS_LIB=""
2135 2154 FLAGS_EXE=""
2136 2155 GSC_CC_O_DEFS="-D___DYNAMIC"
  2156 +LIBRARY_DEFS=""
2137 2157
2138 2158 ###############################################################################
2139 2159 #
@@ -5353,6 +5373,69 @@ fi
5353 5373
5354 5374 ###############################################################################
5355 5375 #
  5376 +# Check if symbolic links should be used for files not in the
  5377 +# central installation directory.
  5378 +
  5379 +# Check whether --enable-symlinks was given.
  5380 +if test "${enable_symlinks+set}" = set; then
  5381 + enableval=$enable_symlinks; ENABLE_SYMLINKS=$enableval
  5382 +else
  5383 + ENABLE_SYMLINKS=no
  5384 +fi
  5385 +
  5386 +
  5387 +###############################################################################
  5388 +#
  5389 +# Check if multiple installed versions are supported.
  5390 +
  5391 +# Check whether --enable-multiple-versions was given.
  5392 +if test "${enable_multiple_versions+set}" = set; then
  5393 + enableval=$enable_multiple_versions; ENABLE_MULTIPLE_VERSIONS=$enableval
  5394 +else
  5395 + ENABLE_MULTIPLE_VERSIONS=no
  5396 +fi
  5397 +
  5398 +
  5399 +###############################################################################
  5400 +#
  5401 +# Check if libraries should contain a version number suffix.
  5402 +
  5403 +ENABLE_VERSIONNED_LIBS=no
  5404 +
  5405 +# This option does not currently work. Some work is needed to make it
  5406 +# work properly. Here is the documentation that should go in INSTALL.txt:
  5407 +
  5408 +#The option --enable-versionned-libs will add a version number suffix
  5409 +#to the libraries. For example the Gambit v4.3.2 runtime library which
  5410 +#is normally libgambc.a will be named libgambc-v4_3_2.a and it must be
  5411 +#linked to with the C compiler option -lgambc-v4_3_2 . If you give
  5412 +#this option a value, as in --enable-versionned-libs=<suffix> then
  5413 +#<suffix> will be appended to the name of the libraries.
  5414 +
  5415 +#AC_ARG_ENABLE(versionned-libs,
  5416 +# AC_HELP_STRING([--enable-versionned-libs],
  5417 +# [libraries should contain a version number suffix (default is NO)]),
  5418 +# ENABLE_VERSIONNED_LIBS=$enableval,
  5419 +# ENABLE_VERSIONNED_LIBS=no)
  5420 +
  5421 +###############################################################################
  5422 +#
  5423 +# Check if shared libraries should be linked to using an absolute path.
  5424 +
  5425 +# Check whether --enable-absolute-shared-libs was given.
  5426 +if test "${enable_absolute_shared_libs+set}" = set; then
  5427 + enableval=$enable_absolute_shared_libs; ENABLE_ABSOLUTE_SHARED_LIBS=$enableval
  5428 +else
  5429 + ENABLE_ABSOLUTE_SHARED_LIBS=yes
  5430 +fi
  5431 +
  5432 +
  5433 +if test "$ENABLE_SHARED" != "yes"; then
  5434 + ENABLE_ABSOLUTE_SHARED_LIBS=no
  5435 +fi
  5436 +
  5437 +###############################################################################
  5438 +#
5356 5439 # Check for C compiler.
5357 5440
5358 5441
@@ -6483,7 +6566,7 @@ fi
6483 6566 done
6484 6567
6485 6568
6486   -if test "$ANSI_C" = no; then
  6569 +if test "$ANSI_C" != yes; then
6487 6570
6488 6571
6489 6572 for ac_header in unistd.h
@@ -24405,40 +24488,35 @@ if test "$ENABLE_SHARED" = yes; then
24405 24488
24406 24489
24407 24490 mingw* | cygwin*)
24408   - GAMBCLIB="libgambc.dll"
24409   - GAMBCGSCLIB="libgambcgsc.dll"
24410   - GAMBCGSILIB="libgambcgsi.dll"
  24491 + LIB_PREFIX="lib"
  24492 + LIB_EXTENSION=".dll"
24411 24493 SETDLPATH="PATH=\"\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${PATH}\""
24412 24494 ;;
24413 24495
24414   - darwin*) GAMBCLIB="libgambc.dylib"
24415   - GAMBCGSCLIB="libgambcgsc.dylib"
24416   - GAMBCGSILIB="libgambcgsi.dylib"
  24496 + darwin*) LIB_PREFIX="lib"
  24497 + LIB_EXTENSION=".dylib"
24417 24498 SETDLPATH="DYLD_LIBRARY_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${DYLD_LIBRARY_PATH}"
24418 24499 ;;
24419 24500
24420   - hpux*) GAMBCLIB="libgambc.so"
24421   - GAMBCGSCLIB="libgambcgsc.so"
24422   - GAMBCGSILIB="libgambcgsi.so"
  24501 + hpux*) LIB_PREFIX="lib"
  24502 + LIB_EXTENSION=".so"
24423 24503 SETDLPATH="SHLIB_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${SHLIB_PATH}"
24424 24504 ;;
24425 24505
24426   - aix*) GAMBCLIB="libgambc.so"
24427   - GAMBCGSCLIB="libgambcgsc.so"
24428   - GAMBCGSILIB="libgambcgsi.so"
  24506 + aix*) LIB_PREFIX="lib"
  24507 + LIB_EXTENSION=".so"
24429 24508 SETDLPATH="LIBPATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${LIBPATH}"
24430 24509 ;;
24431 24510
24432   - *) GAMBCLIB="libgambc.so"
24433   - GAMBCGSCLIB="libgambcgsc.so"
24434   - GAMBCGSILIB="libgambcgsi.so"
  24511 + *) LIB_PREFIX="lib"
  24512 + LIB_EXTENSION=".so"
24435 24513 SETDLPATH="LD_LIBRARY_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${LD_LIBRARY_PATH}"
24436 24514 ;;
24437 24515 esac
24438 24516
24439 24517 MAKE_LIBRARY='$(C_COMPILER) $(FLAGS_LIB) -o $(LIBRARY) $(LIBRARY_OBJECTS) $(MAKE_LIBRARY_LIBS) $(LIBS)'
24440 24518 MAKE_LIBRARY_FOR_INSTALL='$(C_COMPILER) $(FLAGS_LIB) -o $(LIBRARY) $(LIBRARY_OBJECTS) $(MAKE_LIBRARY_FOR_INSTALL_LIBS) $(LIBS)'
24441   - FIXLIB='#'
  24519 + FIXLIB=':'
24442 24520 LINK='$(C_COMPILER) $(FLAGS_EXE) $(EXECUTABLE_OBJECTS) $(LINK_LIBS) $(LIBS) -o $(EXECUTABLE)'
24443 24521 LINK_FOR_INSTALL='$(C_COMPILER) $(FLAGS_EXE) $(EXECUTABLE_OBJECTS) $(LINK_FOR_INSTALL_LIBS) $(LIBS) -o $(EXECUTABLE)'
24444 24522
@@ -24450,9 +24528,8 @@ else
24450 24528
24451 24529 ########## Microsoft Visual C++ compiler
24452 24530
24453   - GAMBCLIB="libgambc.lib"
24454   - GAMBCGSCLIB="libgambcgsc.lib"
24455   - GAMBCGSILIB="libgambcgsi.lib"
  24531 + LIB_PREFIX="lib"
  24532 + LIB_EXTENSION=".lib"
24456 24533 MAKE_LIBRARY='lib -out:$(LIBRARY) $(LIBRARY_OBJECTS)'
24457 24534 MAKE_LIBRARY_FOR_INSTALL=':'
24458 24535 FIXLIB=':'
@@ -24466,9 +24543,8 @@ else
24466 24543
24467 24544 ########## Other C compiler
24468 24545
24469   - GAMBCLIB="libgambc.a"
24470   - GAMBCGSCLIB="libgambcgsc.a"
24471   - GAMBCGSILIB="libgambcgsi.a"
  24546 + LIB_PREFIX="lib"
  24547 + LIB_EXTENSION=".a"
24472 24548 MAKE_LIBRARY='ar rc $(LIBRARY) $(LIBRARY_OBJECTS) && $(RANLIB) $(LIBRARY)'
24473 24549 MAKE_LIBRARY_FOR_INSTALL=':'
24474 24550 FIXLIB='$(RANLIB)'
@@ -24483,21 +24559,57 @@ if test "$C_COMP_VISUALC" = yes; then
24483 24559
24484 24560 ########## Microsoft Visual C++ compiler
24485 24561
24486   - GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR%include\\\" $GSC_CC_O_DEFS -Fe\\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
  24562 + GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR_INCLUDE%\\\" $GSC_CC_O_DEFS -Fe\\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
24487 24563
24488 24564 else
24489 24565
24490 24566 case "$target_os" in
24491 24567
24492   - mingw*) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR%include\\\" $GSC_CC_O_DEFS -o \\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
  24568 + mingw*) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR_INCLUDE%\\\" $GSC_CC_O_DEFS -o \\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
24493 24569 ;;
24494 24570
24495   - *) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"\\\$\${GSC_CC_O_GAMBCDIR}include\\\" $GSC_CC_O_DEFS -o \\\"\\\$\${GSC_CC_O_OBJ_FILENAME}\\\" \\\$\${GSC_CC_O_CC_OPTIONS} \\\$\${GSC_CC_O_LD_OPTIONS_PRELUDE} \\\"\\\$\${GSC_CC_O_C_FILENAME_BASE}\\\" \\\$\${GSC_CC_O_LD_OPTIONS}"
  24571 + *) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"\\\$\${GSC_CC_O_GAMBCDIR_INCLUDE}\\\" $GSC_CC_O_DEFS -o \\\"\\\$\${GSC_CC_O_OBJ_FILENAME}\\\" \\\$\${GSC_CC_O_CC_OPTIONS} \\\$\${GSC_CC_O_LD_OPTIONS_PRELUDE} \\\"\\\$\${GSC_CC_O_C_FILENAME_BASE}\\\" \\\$\${GSC_CC_O_LD_OPTIONS}"
24496 24572 ;;
24497 24573 esac
24498 24574
24499 24575 fi
24500 24576
  24577 +if test "$ENABLE_VERSIONNED_LIBS" = "no"; then
  24578 +
  24579 + LIB_SUFFIX=""
  24580 +
  24581 +else
  24582 +
  24583 + if test "$ENABLE_VERSIONNED_LIBS" = "yes"; then
  24584 +
  24585 + LIB_SUFFIX=`echo -$PACKAGE_VERSION | sed -e 's/\./_/g'`
  24586 +
  24587 + else
  24588 +
  24589 + LIB_SUFFIX="$ENABLE_VERSIONNED_LIBS"
  24590 +
  24591 + fi
  24592 +
  24593 +fi
  24594 +
  24595 +GAMBCLIB="gambc$LIB_SUFFIX"
  24596 +GAMBCGSCLIB="gambcgsc$LIB_SUFFIX"
  24597 +GAMBCGSILIB="gambcgsi$LIB_SUFFIX"
  24598 +
  24599 +if test "$ENABLE_ABSOLUTE_SHARED_LIBS" = "yes"; then
  24600 +
  24601 + MAKE_LIBRARY_FOR_INSTALL_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
  24602 + LINK_FOR_INSTALL_GSI_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCGSILIB)$(LIB_EXTENSION) $$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
  24603 + LINK_FOR_INSTALL_GSC_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCGSCLIB)$(LIB_EXTENSION) $$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
  24604 +
  24605 +else
  24606 +
  24607 + MAKE_LIBRARY_FOR_INSTALL_LIBS='-L$(rootfromhere)/lib -l$(GAMBCLIB)'
  24608 + LINK_FOR_INSTALL_GSI_LIBS='-L. -L$(rootfromhere)/lib -l$(GAMBCGSILIB) -l$(GAMBCLIB)'
  24609 + LINK_FOR_INSTALL_GSC_LIBS='-L. -L$(rootfromhere)/lib -l$(GAMBCGSCLIB) -l$(GAMBCLIB)'
  24610 +
  24611 +fi
  24612 +
24501 24613 ###############################################################################
24502 24614 #
24503 24615 # Determine what prefix and suffix are added to function names by the
@@ -24556,6 +24668,78 @@ _ACEOF
24556 24668 esac
24557 24669
24558 24670 ###############################################################################
  24671 +#
  24672 +# Determine where the installation directories are located.
  24673 +
  24674 +if test "$prefix" = "NONE"; then
  24675 + prefix="/usr/local/$PACKAGE_NAME"
  24676 +fi
  24677 +
  24678 +if test "$ENABLE_MULTIPLE_VERSIONS" = yes; then
  24679 + prefix="$prefix/$PACKAGE_VERSION"
  24680 +fi
  24681 +
  24682 +if test "$bindir" = "\${exec_prefix}/bin"; then
  24683 + bindir="\${prefix}/bin"
  24684 +fi
  24685 +
  24686 +if test "$includedir" = "\${prefix}/include"; then
  24687 + includedir="\${prefix}/include"
  24688 +fi
  24689 +
  24690 +if test "$libdir" = "\${exec_prefix}/lib"; then
  24691 + libdir="\${prefix}/lib"
  24692 +fi
  24693 +
  24694 +if test "$docdir" = "\${datarootdir}/doc/\${PACKAGE_TARNAME}"; then
  24695 + docdir="\${prefix}/doc"
  24696 +fi
  24697 +
  24698 +if test "$infodir" = "\${datarootdir}/info"; then
  24699 + infodir="\${prefix}/info"
  24700 +fi
  24701 +
  24702 +if test "$datadir" = "\${datarootdir}"; then
  24703 + datadir="\${prefix}/share"
  24704 +fi
  24705 +
  24706 +LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR=\"\\\"\${prefix}\\\"\""
  24707 +
  24708 +if test "$ENABLE_SYMLINKS" != yes; then
  24709 +
  24710 + if test "$bindir" != "\${prefix}/bin"; then
  24711 + LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR_BIN=\"\\\"\${bindir}\\\"\""
  24712 + fi
  24713 +
  24714 + if test "$includedir" != "\${prefix}/include"; then
  24715 + LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR_INCLUDE=\"\\\"\${includedir}\\\"\""
  24716 + fi
  24717 +
  24718 + if test "$libdir" != "\${prefix}/lib"; then
  24719 + LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR_LIB=\"\\\"\${libdir}\\\"\""
  24720 + fi
  24721 +
  24722 + if test "$docdir" != "\${prefix}/doc"; then
  24723 + LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR_DOC=\"\\\"\${docdir}\\\"\""
  24724 + fi
  24725 +
  24726 + if test "$infodir" != "\${prefix}/info"; then
  24727 + LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR_INFO=\"\\\"\${infodir}\\\"\""
  24728 + fi
  24729 +
  24730 + if test "$datadir" != "\${prefix}/share"; then
  24731 + LIBRARY_DEFS="$LIBRARY_DEFS -D___GAMBCDIR_SHARE=\"\\\"\${datadir}\\\"\""
  24732 + fi
  24733 +
  24734 +fi
  24735 +
  24736 +emacsdir="\${datadir}/emacs/site-lisp"
  24737 +
  24738 +LIBRARY_DEFS="$LIBRARY_DEFS -D___SYS_TYPE_CPU=\"\\\"$target_cpu\\\"\""
  24739 +LIBRARY_DEFS="$LIBRARY_DEFS -D___SYS_TYPE_VENDOR=\"\\\"$target_vendor\\\"\""
  24740 +LIBRARY_DEFS="$LIBRARY_DEFS -D___SYS_TYPE_OS=\"\\\"$target_os\\\"\""
  24741 +
  24742 +###############################################################################
24559 24743
24560 24744 if test "$srcdir" = "."; then
24561 24745 srcdirpfx=""
@@ -24599,6 +24783,15 @@ INSTALL_PROGRAM='$(rootfromhere)/install-sh -c -m 755'
24599 24783
24600 24784
24601 24785
  24786 +
  24787 +
  24788 +
  24789 +
  24790 +
  24791 +
  24792 +
  24793 +
  24794 +
24602 24795 { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
24603 24796 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
24604 24797 set x ${MAKE-make}
@@ -25915,31 +26108,19 @@ $as_echo "$as_me:
25915 26108 " >&6;}
25916 26109 fi
25917 26110
25918   -if test "$C_COMP_GNUC" = yes; then
25919   - if test "$ENABLE_GCC_OPTS" != yes; then
25920   - { $as_echo "$as_me:$LINENO:
25921   -**************************************************************************
25922   -*** The GCC compiler is being used but the option \"--enable-gcc-opts\" ***
25923   -*** was not specified to the configure script. The Gambit-C system ***
25924   -*** will compile correctly but the code generated by the GCC compiler ***
25925   -*** will be suboptimal and the executables will run slightly slower ***
25926   -*** than if \"--enable-gcc-opts\" is specified. On the other hand the ***
25927   -*** build process will be faster and require less memory. If you have ***
25928   -*** lots of RAM memory (>= 2 Gbytes) and you are willing to wait for ***
25929   -*** the longer build try the configure option \"--enable-gcc-opts\". ***
25930   -**************************************************************************
25931   -" >&5
25932   -$as_echo "$as_me:
25933   -**************************************************************************
25934   -*** The GCC compiler is being used but the option \"--enable-gcc-opts\" ***
25935   -*** was not specified to the configure script. The Gambit-C system ***
25936   -*** will compile correctly but the code generated by the GCC compiler ***
25937   -*** will be suboptimal and the executables will run slightly slower ***
25938   -*** than if \"--enable-gcc-opts\" is specified. On the other hand the ***
25939   -*** build process will be faster and require less memory. If you have ***
25940   -*** lots of RAM memory (>= 2 Gbytes) and you are willing to wait for ***
25941   -*** the longer build try the configure option \"--enable-gcc-opts\". ***
25942   -**************************************************************************
25943   -" >&6;}
25944   - fi
25945   -fi
  26111 +#if test "$C_COMP_GNUC" = yes; then
  26112 +# if test "$ENABLE_GCC_OPTS" != yes; then
  26113 +# AC_MSG_NOTICE([
  26114 +#**************************************************************************
  26115 +#*** The GCC compiler is being used but the option "--enable-gcc-opts" ***
  26116 +#*** was not specified to the configure script. The Gambit-C system ***
  26117 +#*** will compile correctly but the code generated by the GCC compiler ***
  26118 +#*** will be suboptimal and the executables will run slightly slower ***
  26119 +#*** than if "--enable-gcc-opts" is specified. On the other hand the ***
  26120 +#*** build process will be faster and require less memory. If you have ***
  26121 +#*** lots of RAM memory (>= 2 Gbytes) and you are willing to wait for ***
  26122 +#*** the longer build try the configure option "--enable-gcc-opts". ***
  26123 +#**************************************************************************
  26124 +#])
  26125 +# fi
  26126 +#fi
265 configure.ac
@@ -9,8 +9,6 @@ AC_INIT(Gambit-C,v4.3.2,gambit@iro.umontreal.ca,gambc-v4_3_2)
9 9 AC_CONFIG_HEADERS(include/config.h)
10 10
11 11 PACKAGE_SHORTNAME="gambc"
12   -PACKAGE_SUBDIR="/$PACKAGE_VERSION"
13   -#PACKAGE_SUBDIR=""
14 12
15 13 AC_SUBST(PACKAGE_SHORTNAME)
16 14 AC_SUBST(PACKAGE_NAME)
@@ -18,7 +16,6 @@ AC_SUBST(PACKAGE_VERSION)
18 16 AC_SUBST(PACKAGE_STRING)
19 17 AC_SUBST(PACKAGE_BUGREPORT)
20 18 AC_SUBST(PACKAGE_TARNAME)
21   -AC_SUBST(PACKAGE_SUBDIR)
22 19
23 20 AC_COPYRIGHT([[Copyright (c) 1994-2008 by Marc Feeley, All Rights Reserved.]])
24 21
@@ -43,6 +40,7 @@ FLAGS_DYN=""
43 40 FLAGS_LIB=""
44 41 FLAGS_EXE=""
45 42 GSC_CC_O_DEFS="-D___DYNAMIC"
  43 +LIBRARY_DEFS=""
46 44
47 45 ###############################################################################
48 46 #
@@ -241,7 +239,7 @@ fi
241 239
242 240 AC_ARG_ENABLE(inline-jumps,
243 241 AC_HELP_STRING([--enable-inline-jumps],
244   - [Generate inline code for jumps (default is NO)]),
  242 + [generate inline code for jumps (default is NO)]),
245 243 ENABLE_INLINE_JUMPS=$enableval,
246 244 ENABLE_INLINE_JUMPS=no)
247 245
@@ -258,7 +256,7 @@ fi
258 256
259 257 AC_ARG_ENABLE(gcc-opts,
260 258 AC_HELP_STRING([--enable-gcc-opts],
261   - [Use expensive GCC optimizations (default is NO)]),
  259 + [use expensive GCC optimizations (default is NO)]),
262 260 ENABLE_GCC_OPTS=$enableval,
263 261 ENABLE_GCC_OPTS=no)
264 262
@@ -328,6 +326,63 @@ AC_ARG_ENABLE(ansi-c,
328 326
329 327 ###############################################################################
330 328 #
  329 +# Check if symbolic links should be used for files not in the
  330 +# central installation directory.
  331 +
  332 +AC_ARG_ENABLE(symlinks,
  333 + AC_HELP_STRING([--enable-symlinks],
  334 + [use symbolic links for installed files not in the central installation directory (default is YES)]),
  335 + ENABLE_SYMLINKS=$enableval,
  336 + ENABLE_SYMLINKS=no)
  337 +
  338 +###############################################################################
  339 +#
  340 +# Check if multiple installed versions are supported.
  341 +
  342 +AC_ARG_ENABLE(multiple-versions,
  343 + AC_HELP_STRING([--enable-multiple-versions],
  344 + [multiple installed versions are supported (default is NO)]),
  345 + ENABLE_MULTIPLE_VERSIONS=$enableval,
  346 + ENABLE_MULTIPLE_VERSIONS=no)
  347 +
  348 +###############################################################################
  349 +#
  350 +# Check if libraries should contain a version number suffix.
  351 +
  352 +ENABLE_VERSIONNED_LIBS=no
  353 +
  354 +# This option does not currently work. Some work is needed to make it
  355 +# work properly. Here is the documentation that should go in INSTALL.txt:
  356 +
  357 +#The option --enable-versionned-libs will add a version number suffix
  358 +#to the libraries. For example the Gambit v4.3.2 runtime library which
  359 +#is normally libgambc.a will be named libgambc-v4_3_2.a and it must be
  360 +#linked to with the C compiler option -lgambc-v4_3_2 . If you give
  361 +#this option a value, as in --enable-versionned-libs=<suffix> then
  362 +#<suffix> will be appended to the name of the libraries.
  363 +
  364 +#AC_ARG_ENABLE(versionned-libs,
  365 +# AC_HELP_STRING([--enable-versionned-libs],
  366 +# [libraries should contain a version number suffix (default is NO)]),
  367 +# ENABLE_VERSIONNED_LIBS=$enableval,
  368 +# ENABLE_VERSIONNED_LIBS=no)
  369 +
  370 +###############################################################################
  371 +#
  372 +# Check if shared libraries should be linked to using an absolute path.
  373 +
  374 +AC_ARG_ENABLE(absolute-shared-libs,
  375 + AC_HELP_STRING([--enable-absolute-shared-libs],
  376 + [shared libraries should be linked to using an absolute path (default is YES)]),
  377 + ENABLE_ABSOLUTE_SHARED_LIBS=$enableval,
  378 + ENABLE_ABSOLUTE_SHARED_LIBS=yes)
  379 +
  380 +if test "$ENABLE_SHARED" != "yes"; then
  381 + ENABLE_ABSOLUTE_SHARED_LIBS=no
  382 +fi
  383 +
  384 +###############################################################################
  385 +#
331 386 # Check for C compiler.
332 387
333 388 AC_DEFUN(AC_CHECK_C_COMPILER_DEF,
@@ -410,7 +465,7 @@ AC_CHECK_HEADERS(stdlib.h)
410 465 AC_CHECK_HEADERS(string.h)
411 466 AC_CHECK_HEADERS(time.h)
412 467
413   -if test "$ANSI_C" = no; then
  468 +if test "$ANSI_C" != yes; then
414 469
415 470 AC_CHECK_HEADERS(unistd.h)
416 471 AC_CHECK_HEADERS(pwd.h)
@@ -1174,40 +1229,35 @@ if test "$ENABLE_SHARED" = yes; then
1174 1229
1175 1230
1176 1231 mingw* | cygwin*)
1177   - GAMBCLIB="libgambc.dll"
1178   - GAMBCGSCLIB="libgambcgsc.dll"
1179   - GAMBCGSILIB="libgambcgsi.dll"
  1232 + LIB_PREFIX="lib"
  1233 + LIB_EXTENSION=".dll"
1180 1234 SETDLPATH="PATH=\"\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${PATH}\""
1181 1235 ;;
1182 1236
1183   - darwin*) GAMBCLIB="libgambc.dylib"
1184   - GAMBCGSCLIB="libgambcgsc.dylib"
1185   - GAMBCGSILIB="libgambcgsi.dylib"
  1237 + darwin*) LIB_PREFIX="lib"
  1238 + LIB_EXTENSION=".dylib"
1186 1239 SETDLPATH="DYLD_LIBRARY_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${DYLD_LIBRARY_PATH}"
1187 1240 ;;
1188 1241
1189   - hpux*) GAMBCLIB="libgambc.so"
1190   - GAMBCGSCLIB="libgambcgsc.so"
1191   - GAMBCGSILIB="libgambcgsi.so"
  1242 + hpux*) LIB_PREFIX="lib"
  1243 + LIB_EXTENSION=".so"
1192 1244 SETDLPATH="SHLIB_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${SHLIB_PATH}"
1193 1245 ;;
1194 1246
1195   - aix*) GAMBCLIB="libgambc.so"
1196   - GAMBCGSCLIB="libgambcgsc.so"
1197   - GAMBCGSILIB="libgambcgsi.so"
  1247 + aix*) LIB_PREFIX="lib"
  1248 + LIB_EXTENSION=".so"
1198 1249 SETDLPATH="LIBPATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${LIBPATH}"
1199 1250 ;;
1200 1251
1201   - *) GAMBCLIB="libgambc.so"
1202   - GAMBCGSCLIB="libgambcgsc.so"
1203   - GAMBCGSILIB="libgambcgsi.so"
  1252 + *) LIB_PREFIX="lib"
  1253 + LIB_EXTENSION=".so"
1204 1254 SETDLPATH="LD_LIBRARY_PATH=\$(rootfromhere)/lib:\$(rootfromhere)/gsi:\$(rootfromhere)/gsc:\${LD_LIBRARY_PATH}"
1205 1255 ;;
1206 1256 esac
1207 1257
1208 1258 MAKE_LIBRARY='$(C_COMPILER) $(FLAGS_LIB) -o $(LIBRARY) $(LIBRARY_OBJECTS) $(MAKE_LIBRARY_LIBS) $(LIBS)'
1209 1259 MAKE_LIBRARY_FOR_INSTALL='$(C_COMPILER) $(FLAGS_LIB) -o $(LIBRARY) $(LIBRARY_OBJECTS) $(MAKE_LIBRARY_FOR_INSTALL_LIBS) $(LIBS)'
1210   - FIXLIB='#'
  1260 + FIXLIB=':'
1211 1261 LINK='$(C_COMPILER) $(FLAGS_EXE) $(EXECUTABLE_OBJECTS) $(LINK_LIBS) $(LIBS) -o $(EXECUTABLE)'
1212 1262 LINK_FOR_INSTALL='$(C_COMPILER) $(FLAGS_EXE) $(EXECUTABLE_OBJECTS) $(LINK_FOR_INSTALL_LIBS) $(LIBS) -o $(EXECUTABLE)'
1213 1263
@@ -1219,9 +1269,8 @@ else
1219 1269
1220 1270 ########## Microsoft Visual C++ compiler
1221 1271
1222   - GAMBCLIB="libgambc.lib"
1223   - GAMBCGSCLIB="libgambcgsc.lib"
1224   - GAMBCGSILIB="libgambcgsi.lib"
  1272 + LIB_PREFIX="lib"
  1273 + LIB_EXTENSION=".lib"
1225 1274 MAKE_LIBRARY='lib -out:$(LIBRARY) $(LIBRARY_OBJECTS)'
1226 1275 MAKE_LIBRARY_FOR_INSTALL=':'
1227 1276 FIXLIB=':'
@@ -1235,9 +1284,8 @@ else
1235 1284
1236 1285 ########## Other C compiler
1237 1286
1238   - GAMBCLIB="libgambc.a"
1239   - GAMBCGSCLIB="libgambcgsc.a"
1240   - GAMBCGSILIB="libgambcgsi.a"
  1287 + LIB_PREFIX="lib"
  1288 + LIB_EXTENSION=".a"
1241 1289 MAKE_LIBRARY='ar rc $(LIBRARY) $(LIBRARY_OBJECTS) && $(RANLIB) $(LIBRARY)'
1242 1290 MAKE_LIBRARY_FOR_INSTALL=':'
1243 1291 FIXLIB='$(RANLIB)'
@@ -1252,21 +1300,57 @@ if test "$C_COMP_VISUALC" = yes; then
1252 1300
1253 1301 ########## Microsoft Visual C++ compiler
1254 1302
1255   - GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR%include\\\" $GSC_CC_O_DEFS -Fe\\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
  1303 + GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR_INCLUDE%\\\" $GSC_CC_O_DEFS -Fe\\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
1256 1304
1257 1305 else
1258 1306
1259 1307 case "$target_os" in
1260 1308
1261   - mingw*) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR%include\\\" $GSC_CC_O_DEFS -o \\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
  1309 + mingw*) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"%GSC_CC_O_GAMBCDIR_INCLUDE%\\\" $GSC_CC_O_DEFS -o \\\"%GSC_CC_O_OBJ_FILENAME%\\\" %GSC_CC_O_CC_OPTIONS% %GSC_CC_O_LD_OPTIONS_PRELUDE% \\\"%GSC_CC_O_C_FILENAME_BASE%\\\" %GSC_CC_O_LD_OPTIONS%"
1262 1310 ;;
1263 1311
1264   - *) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"\\\$\${GSC_CC_O_GAMBCDIR}include\\\" $GSC_CC_O_DEFS -o \\\"\\\$\${GSC_CC_O_OBJ_FILENAME}\\\" \\\$\${GSC_CC_O_CC_OPTIONS} \\\$\${GSC_CC_O_LD_OPTIONS_PRELUDE} \\\"\\\$\${GSC_CC_O_C_FILENAME_BASE}\\\" \\\$\${GSC_CC_O_LD_OPTIONS}"
  1312 + *) GSC_CC_O="$C_COMPILER $FLAGS_DYN -I\\\"\\\$\${GSC_CC_O_GAMBCDIR_INCLUDE}\\\" $GSC_CC_O_DEFS -o \\\"\\\$\${GSC_CC_O_OBJ_FILENAME}\\\" \\\$\${GSC_CC_O_CC_OPTIONS} \\\$\${GSC_CC_O_LD_OPTIONS_PRELUDE} \\\"\\\$\${GSC_CC_O_C_FILENAME_BASE}\\\" \\\$\${GSC_CC_O_LD_OPTIONS}"
1265 1313 ;;
1266 1314 esac
1267 1315
1268 1316 fi
1269 1317
  1318 +if test "$ENABLE_VERSIONNED_LIBS" = "no"; then
  1319 +
  1320 + LIB_SUFFIX=""
  1321 +
  1322 +else
  1323 +
  1324 + if test "$ENABLE_VERSIONNED_LIBS" = "yes"; then
  1325 +
  1326 + LIB_SUFFIX=`echo -$PACKAGE_VERSION | sed -e 's/\./_/g'`
  1327 +
  1328 + else
  1329 +
  1330 + LIB_SUFFIX="$ENABLE_VERSIONNED_LIBS"
  1331 +
  1332 + fi
  1333 +
  1334 +fi
  1335 +
  1336 +GAMBCLIB="gambc$LIB_SUFFIX"
  1337 +GAMBCGSCLIB="gambcgsc$LIB_SUFFIX"
  1338 +GAMBCGSILIB="gambcgsi$LIB_SUFFIX"
  1339 +
  1340 +if test "$ENABLE_ABSOLUTE_SHARED_LIBS" = "yes"; then
  1341 +
  1342 + MAKE_LIBRARY_FOR_INSTALL_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
  1343 + LINK_FOR_INSTALL_GSI_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCGSILIB)$(LIB_EXTENSION) $$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
  1344 + LINK_FOR_INSTALL_GSC_LIBS='$$t_libdir/$(LIB_PREFIX)$(GAMBCGSCLIB)$(LIB_EXTENSION) $$t_libdir/$(LIB_PREFIX)$(GAMBCLIB)$(LIB_EXTENSION)'
  1345 +
  1346 +else
  1347 +
  1348 + MAKE_LIBRARY_FOR_INSTALL_LIBS='-L$(rootfromhere)/lib -l$(GAMBCLIB)'
  1349 + LINK_FOR_INSTALL_GSI_LIBS='-L. -L$(rootfromhere)/lib -l$(GAMBCGSILIB) -l$(GAMBCLIB)'
  1350 + LINK_FOR_INSTALL_GSC_LIBS='-L. -L$(rootfromhere)/lib -l$(GAMBCGSCLIB) -l$(GAMBCLIB)'
  1351 +
  1352 +fi
  1353 +
1270 1354 #################################################################