richdiesal
asked on
Can't ./configure Bigloo in MinGW/MSYS in WinXP
I'm trying to install Roadsend to Windows XP using the instructions here: http://code.roadsend.com/pcc/wiki/BuildInstructions
I have installed everything to default locations. MinGW is in C:\MinGW and MSYS is in C:\msys.
I've reached step 5 and hit a roadblock. The step reads:
Configure bigloo. Note that to provide bigloo with a path for installation, we use the MinGW 'forward slash hack': "./configure --prefix=c:/msys/1.0/home/ USERNAME/b igloo"
When I enter this command in the bigloo directory, I get the following:
-------------------------- ---------- ------
$ ./configure --prefix=c:/msys/1.0/home/ richdiesal /bigloo
** Configure **
*** ERROR:configure:Can't configure a C compiler. Aborting
./autoconf/sqlite: eval: illegal option: -m
eval: usage: eval [arg ...]
Configuring lib/2.9a/bigloo_config.h, runtime/Jlib/configure.jav a, runtime/CSlib/configure.cs :
log2 ptr alignment:
./autoconf/ccstrip: eval: illegal option: -s
eval: usage: eval [arg ...]
./autoconf/ccprof: eval: illegal option: -p
eval: usage: eval [arg ...]
./autoconf/ccprof: eval: illegal option: -p
eval: usage: eval [arg ...]
*** ERROR:configure:stack. Aborting
-------------------------- ---------- ------
I have gcc installed in MinGW, but MSYS doesn't seem to have access to it. My .bashrc contains:
-------------------------- ---------- ------
PCC_HOME=~/pcc
BIGLOO_HOME=~/bigloo
BIGLOO_VERSION=2.9a
# for binaries
PATH=$BIGLOO_HOME/bin:/usr /local/bin :$PCC_HOME :$PCC_HOME /compiler: ~/bin:$PAT H
# for DLL's
PATH=$PCC_HOME/libs:$BIGLO O_HOME/lib /bigloo/$B IGLOO_VERS ION:/usr/l ocal/lib:$ PATH
BGL_LIBRARY_PATH=c:/msys/1 .0/home/$U SERNAME/bi gloo/lib/b igloo/$BIG LOO_VERSIO N
export PATH PCC_HOME BGL_LIBRARY_PATH
-------------------------- ---------- ------
How do I get my .configure to use the c compiler (I assume gcc)?
I have installed everything to default locations. MinGW is in C:\MinGW and MSYS is in C:\msys.
I've reached step 5 and hit a roadblock. The step reads:
Configure bigloo. Note that to provide bigloo with a path for installation, we use the MinGW 'forward slash hack': "./configure --prefix=c:/msys/1.0/home/
When I enter this command in the bigloo directory, I get the following:
--------------------------
$ ./configure --prefix=c:/msys/1.0/home/
** Configure **
*** ERROR:configure:Can't configure a C compiler. Aborting
./autoconf/sqlite: eval: illegal option: -m
eval: usage: eval [arg ...]
Configuring lib/2.9a/bigloo_config.h, runtime/Jlib/configure.jav
log2 ptr alignment:
./autoconf/ccstrip: eval: illegal option: -s
eval: usage: eval [arg ...]
./autoconf/ccprof: eval: illegal option: -p
eval: usage: eval [arg ...]
./autoconf/ccprof: eval: illegal option: -p
eval: usage: eval [arg ...]
*** ERROR:configure:stack. Aborting
--------------------------
I have gcc installed in MinGW, but MSYS doesn't seem to have access to it. My .bashrc contains:
--------------------------
PCC_HOME=~/pcc
BIGLOO_HOME=~/bigloo
BIGLOO_VERSION=2.9a
# for binaries
PATH=$BIGLOO_HOME/bin:/usr
# for DLL's
PATH=$PCC_HOME/libs:$BIGLO
BGL_LIBRARY_PATH=c:/msys/1
export PATH PCC_HOME BGL_LIBRARY_PATH
--------------------------
How do I get my .configure to use the c compiler (I assume gcc)?
ASKER
$ echo $PATH
.:/usr/local/bin:/mingw/bi n:/bin:/c/ PHP5/:/c/W INDOWS/sys tem32:/c/W INDOWS:/c/ WINDOWS/Sy stem32/Wbe m:/c/Progr am Files/Common Files/Adobe/AGL:/c/Program Files/QuickTime/QTSystem/: /c/Program Files/SSH Communications Security/SSH Secure Shell
It's in the path, I think. I can run gcc from anywhere at the command line, but configure doesn't seem to have the same ability...
.:/usr/local/bin:/mingw/bi
It's in the path, I think. I can run gcc from anywhere at the command line, but configure doesn't seem to have the same ability...
Hi,
This is my path:
/usr/local/bin:/usr/bin:/b in:/usr/X1 1R6/bin:/c ygdrive/c/ WINDOWS/sy stem32:/cy gdrive/c/W INDOWS:/cy gdrive/c/W INDOWS/Sys tem32/Wbem :/home/Lee :/usr/bin: /cygdrive/ c/Pr
ogram Files/Microsoft SQL Server/80/Tools/Binn/:/cyg drive/c/Pr ogram Files/Microsoft SQL Server/90/DTS/Binn/:/cygdr ive/c/Prog ram Files/Microsoft SQL Server/90/Tools/binn/:/cyg drive/c/Pr ogram Files/Microsoft SQL Server/90/Tools/Binn/VSShe ll/Common7 /IDE/:/cyg drive/c/Pr ogram Files/Microsoft Visual Studio 8/Common7/IDE/Priv
ateAssemblies/:/usr/lib/la pack
As you can see the opening 2 entries are /usr/local/bin and /usr/bin. Personally I haven't altered my path since I installed cygwin. Try adding a line to your .bashrc to add the line /usr/bin to the path and see what happens.
Failing that it seems that bigloo (I confess I don't know what this program is or does) requires a hack to set the path up. Try altering config form this:
./configure --prefix=c:/msys/1.0/home/ USERNAME/b igloo
to
./configure --prefix=/cygdrive/c/msys/ 1.0/home/U SERNAME/bi gloo
and see what happens.
Regards,
Lee
This is my path:
/usr/local/bin:/usr/bin:/b
ogram Files/Microsoft SQL Server/80/Tools/Binn/:/cyg
ateAssemblies/:/usr/lib/la
As you can see the opening 2 entries are /usr/local/bin and /usr/bin. Personally I haven't altered my path since I installed cygwin. Try adding a line to your .bashrc to add the line /usr/bin to the path and see what happens.
Failing that it seems that bigloo (I confess I don't know what this program is or does) requires a hack to set the path up. Try altering config form this:
./configure --prefix=c:/msys/1.0/home/
to
./configure --prefix=/cygdrive/c/msys/
and see what happens.
Regards,
Lee
ASKER
I added it, but it didn't do any good - same error.
Bigloo is described here: http://www-sop.inria.fr/mimosa/fp/Bigloo/.
I don't know much about it either, other than that it is a prerequisite for installation of Roadsend.
Bigloo is described here: http://www-sop.inria.fr/mimosa/fp/Bigloo/.
I don't know much about it either, other than that it is a prerequisite for installation of Roadsend.
ASKER
Not sure if this is relevant, but I tried compiling a different program and got this error:
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
This is a fresh install of MSYS/MinGW, so I haven't compiled anything before. Not sure how to fix this...
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
This is a fresh install of MSYS/MinGW, so I haven't compiled anything before. Not sure how to fix this...
Hi,
Ok there are some big differences when creating executables in cygwin. Firstly you can't just create a file and give it an executable flag because there is no concept of an executable flag in Windows. It seems to me that Bigloo may be trying to create an executable in the way Linux would do them rather than creating a real executable in the way Windows would. This is just a guess. It might be that you have to install Bigloo first and then alter the config file for RoadSend so it doesn't try and make Bigloo.
Regards,
Lee
Ok there are some big differences when creating executables in cygwin. Firstly you can't just create a file and give it an executable flag because there is no concept of an executable flag in Windows. It seems to me that Bigloo may be trying to create an executable in the way Linux would do them rather than creating a real executable in the way Windows would. This is just a guess. It might be that you have to install Bigloo first and then alter the config file for RoadSend so it doesn't try and make Bigloo.
Regards,
Lee
ASKER
Bigloo is actually installed as a prerequisite for RoadSend - they don't install simultaneously. The install for RoadSend fails for the same reason, but with the error I listed above:
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
ASKER
I actually can't run gcc alone either. Trying to compile anything at all produces:
gcc.exe: no input files
gcc.exe: no input files
Hi,
It looks as if the installer is trying to check for the existence of a c compiler by compiling an empty file. This is fine under linux as it would create the default a.out file and then apply the executable flag to it. As I said earlier, Windows has no concept of an executable flag so it might be that the configuration file ./configure needs the line that does the whole compiler check removed. You know that there is a compiler on there so if you remove the line that does the check and set any variable it needs to say it found one so it can continue. I am assuming that the configure script is a shell script. Post the contents and lets see if we can hack it around a bit.
Regards,
Lee
It looks as if the installer is trying to check for the existence of a c compiler by compiling an empty file. This is fine under linux as it would create the default a.out file and then apply the executable flag to it. As I said earlier, Windows has no concept of an executable flag so it might be that the configuration file ./configure needs the line that does the whole compiler check removed. You know that there is a compiler on there so if you remove the line that does the check and set any variable it needs to say it found one so it can continue. I am assuming that the configure script is a shell script. Post the contents and lets see if we can hack it around a bit.
Regards,
Lee
Hi,
That gcc error is fine. That means it hasn't been given anything to compile. The message is just telling you that it did nothing.
Regards,
Lee
That gcc error is fine. That means it hasn't been given anything to compile. The message is just telling you that it did nothing.
Regards,
Lee
ASKER
No, I mean, I wrote a program called "test.c", entered the command "gcc test.c" and that produces "no input files." It's been since college since I wrote anything in c, but I'm pretty sure that command on...
#include <stdio.h>
main () {
prinf("Hello world");
}
...should do something other than say "no input files."
#include <stdio.h>
main () {
prinf("Hello world");
}
...should do something other than say "no input files."
Hi,
For that, try gcc ./test.c
It might be your path doesn't include the current directory in it's search.
Regards,
Lee
For that, try gcc ./test.c
It might be your path doesn't include the current directory in it's search.
Regards,
Lee
ASKER
I assume this means something is wrong:
richdiesal@RICHDIESALMOBI2 ~
$ ls
bigloo gcc-java-3.4.2-20040916-1. tar pcc
binutils-2.16.91-20060119- 1.tar gcc-objc-3.4.2-20040916-1. tar test.c
gcc-core-3.4.2-20040916-1. tar mingw-runtime-3.11.tar w32api-3.8.tar
gcc-g++-3.4.2-20040916-1.t ar mingw32-make-3.81-2.tar
richdiesal@RICHDIESALMOBI2 ~
$ gcc ./test.c
gcc.exe: no input files
richdiesal@RICHDIESALMOBI2
$ ls
bigloo gcc-java-3.4.2-20040916-1.
binutils-2.16.91-20060119-
gcc-core-3.4.2-20040916-1.
gcc-g++-3.4.2-20040916-1.t
richdiesal@RICHDIESALMOBI2
$ gcc ./test.c
gcc.exe: no input files
Hi,
I must say it isn't looking promising. What's in the configure script?
Regards,
Lee
I must say it isn't looking promising. What's in the configure script?
Regards,
Lee
ASKER
Sizable:
#!/bin/sh
#*======================== ========== ========== ========== ========== =====*/
#* serrano/prgm/project/biglo o/configur e */
#* -------------------------- ---------- ---------- ---------- ----- */
#* Author : Manuel Serrano */
#* Creation : Tue Jan 25 16:05:10 1994 */
#* Last change : Mon Dec 18 12:12:58 2006 (serrano) */
#* Copyright : 1994-2006 Manuel Serrano, see LICENSE file */
#* -------------------------- ---------- ---------- ---------- ----- */
#* The Bigloo configuration file */
#* -------------------------- ---------- ---------- ---------- ----- */
#* Please, dont talk to me about autoconf. I simply dont want */
#* to hear about it... */
#*======================== ========== ========== ========== ========== =====*/
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Bigloo revision number */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
release=2.9a
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* User variables */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#*--- paths -------------------------- ---------- ---------- ---------- ---*/
prefix=/usr/local
bindir=$prefix/bin
libdir=$prefix/lib
fildir=$libdir/bigloo/$rel ease
zipdir=$fildir
dlldir=$fildir
mandir=$prefix/man/man1
infodir=$prefix/info
docdir=$prefix/doc/bigloo- $release
tmpdir=/tmp
lispdir=
bee=partial
tmp=$TMPDIR
if [ "$tmp " = " " ]; then
tmp=/tmp
fi
#*--- C back-end user configure -------------------------- ---------- ---*/
nativebackend=yes # set to "no" not to install the native (C) back-end
ccstyle=gcc
cc=$CC # left blank for default automatic configuration
cflags=$CFLAGS
lflags=
bflags="-O3"
bootflags=""
coflags="-O3"
cstrip="-s"
cpicflags="demanded" # Possible values for cpicflags are:
# - "no" not to use position independent code (recommended)
# - "demanded" auto configuration but with a preference to "no"
# - any legal C compiler option that enable PIC code.
# - blank (uninitalized) for automatic configuration of the
# position independent code compiler option
as=as
ar=ar
arflags=qc
ldstyle=gcc
ldflags=
ld=ld
ldlibs=-lc
ldcomplibs=-lc
strip=strip
longlong= # The C type to represent long long integers
stringsplit="0"
#*--- Java back-end user configuration -------------------------- ------*/
jvmbackend=no # set to "no" not to install the Jvm back-end
zip=zip
jar="jar cmf"
zflags=
javac=javac
jcflags=-O
java=java
jflags=
jvflags=-noverify
jshell=sh
#*--- .NET back-end user configuration -------------------------- ------*/
dotnetbackend=no # set to "yes" to install the .NET back-end
dotnetclrstyle=pnet
dotnetcsccstyle=pnet
dotnetldstyle=pnet
dotnetcscc=cscc
dotnetld=cscc
dotnetclr=ilrun
dotnetclropt="-S 4000 -C 256"
dotnetshell=sh
dotnetasm=ilasm
#*--- Misc user configuration -------------------------- ---------- -----*/
shell=/bin/sh
emacs=
makeinfo=makeinfo
makeinfoopt="-U oldinfo"
texi2dvi=texi2dvi
texi2dviopt=-b
texi2html=texi2html
texi2htmlopt="-menu -monolithic -number"
texi2pdf=texi2pdf
iinfo=install-info
dlopenopt=-ldl
dirname=dirname
defaultbackend="native"
aout=""
abat=""
exe=""
cobj=o
specific=""
#*--- socket library (left empty for automatic configuration) ---------*/
socketlibs=
#*--- posix threads library (left blank for autoconfiguration) --------*/
pthreadlibs=
pthreadtimedlock=1
#*--- openssl library (left blank for autoconfiguration) --------------*/
openssllibs=
openssldtls=
#*--- sqlite library (left blank for autoconfiguration) ---------------*/
sqlitelibs=
#*--- gc source directory (left blank for default configuration) ------*/
customgc=yes
# the following two variables are relevant only when using
# standard (i.e. already existing and operational) Boehm's GC
# and when customgc=no
stdgclib=gc
stdgcincdir=/usr/include/g c
stdint=
stdlibint=0
#*--- indent -------------------------- ---------- ---------- ---------- --*/
indent="indent -npro -bap -bad -nbc -bl -ncdb -nce -nfc1 -ip0 -nlp -npcs -nsc -nsob -cli0.5 -di0 -l80 -d1 -c0 -ts2 -st"
#*--- mask of Bigloo intalled files -------------------------- ---------* /
bmask=755
#*--- ld shared library option -------------------------- ---------- ----*/
# set this variable to `no-share' if you don't want shared library
ldopt=
ldsoname=-soname
sharedsuffix=so
sharedlibraryclosed=no
#*--- should the compiler be dynamically linked? ---------------------*/
# the legal value for that variable is `yes' or `no'
sharedcompiler=no
sharedbde=no
#*--- forced OS -------------------------- ---------- ---------- ---------* /
posixos=
jvmrecettebootpath=
jvmapibootpath=
macosx=auto
#*--- cygwin specific configuration -------------------------- ---------* /
# The location where cygwin is installed
cygwindospath=
cygwindosjvm="yes"
cygwindosdotnet="yes"
#*--- migw specific configuration -------------------------- ---------- -*/
mingw="no"
#*--- api -------------------------- ---------- ---------- ---------- -----*/
apis="fthread pthread ssl sqlite web multimedia mail calendar"
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Hacker variables */
#* -------------------------- ---------- ---------- ---------- ----- */
#* Dont modifiy these variables unless you know what you are */
#* doing. */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#*--- The basename of the compiler and tools -------------------------- */
bigloo=bigloo
afile=bglafile
jfile=bgljfile
btags=bgltags
bdepend=bgldepend
bmake=bglmake
bpp=bglpp
bprof=bglprof
mco=bglmco
jas=bgljas
bmem=bglmem
bmemrun=bglmemrun
bdb=bgldb
#*--- libraries -------------------------- ---------- ---------- ---------* /
libraryname=$bigloo
#--- additional user library used to link bigloo applications ---------*/
extralibs="-lm"
extragclibs="-lc"
#*--- custom GC configuration -------------------------- ---------- -----*/
gcincdir=
gclibdir=
customgclib=bigloogc
gchaveblocking=1
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* !!! DONT EDIT AFTER THIS LINE !!! */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
action=all
mode=standard
tuning=
makefile_cfg=Makefile.conf ig
autoconfdir=`dirname $0 2> /dev/null`/autoconf
pwd=`pwd`
bootdir=$pwd
cgcflags=""
cgcfinalflags="-DFINALIZE_ ON_DEMAND"
bigloo_h=
bigloo_gc_h=
bigloo_config_h=
bigloo_config_jvm=
bigloo_config_dotnet=
bigloo_config_el=
summary=yes
java_configured=no
dotnet_configured=no
os=posix
gcspecial=
gcthread=
hardtune=
emacswarning=
stacksizerequired=2
configureinfo="no"
dnscache=1
if [ $? != "0" ]; then
autoconfdir="autoconf"
fi
# Argument parsing
while : ; do
case $1 in
"")
break;;
--bootconfig)
bindir=$PWD/bin;
libdir=$PWD/lib;
fildir=$libdir/$release;
zipdir=$fildir;
dlldir=$fildir;
bootdir=$PWD;
mandir=$HOME/house/man
lispdir=$HOME/emacs/site-l isp/bigloo ;
docdir=$PWD/manuals;
sharedcompiler=no;
sharedbde=yes;
infodir=$HOME/house/info;
java=java;
javac=javac;
ld=ld;
cflags="$cflags -Wpointer-arith -Wswitch -Wtrigraphs";
bootflags="-cg";
cpicflags="no";
jvmbackend="force";
dotnetbackend="force";
dotnetclr=mono;
dotnetclropt="";
dotnetcscc=cscc;
dotnetld=cscc;
dotnetasm=ilasm.pnet;
dotnetclrstyle=mono;
dotnetcsccstyle=mono;
dotnetldstyle=mono;
mode=standard;
configureinfo="yes";
bee="full";
havebdb=1;
action="all";;
--bootdir=*)
bootdir="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.h)
action="bigloo_config";;
--bigloo.h=*)
action="bigloo_config";
bigloo_h="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_gc.h=*)
action="bigloo_config";
bigloo_gc_h="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.h=*)
action="bigloo_config";
bigloo_config_h="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.jvm=*)
action="bigloo_config";
bigloo_config_jvm="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.dotnet=*)
action="bigloo_config";
bigloo_config_dotnet="`ech o $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.el=*)
action="bigloo_config_el";
bigloo_config_el="`echo $1 | sed 's/^[^=]*=//'`";;
--Makefile.config)
action="Makefile.config";;
--bindir=*)
bindir="`echo $1 | sed 's/^[^=]*=//'`";;
--libdir=*)
libdir="`echo $1 | sed 's/^[^=]*=//'`";
fildir=$libdir/bigloo/$rel ease;
zipdir=$fildir;
dlldir=$fildir;;
--gcdir=*)
gclibdir="`echo $1 | sed 's/^[^=]*=//'`";;
--fildir=*)
fildir="`echo $1 | sed 's/^[^=]*=//'`";;
--zipdir=*)
zipdir="`echo $1 | sed 's/^[^=]*=//'`";;
--dlldir=*)
dlldir="`echo $1 | sed 's/^[^=]*=//'`";;
--mandir=*)
mandir="`echo $1 | sed 's/^[^=]*=//'`";;
--infodir=*)
infodir="`echo $1 | sed 's/^[^=]*=//'`";;
--docdir=*)
docdir="`echo $1 | sed 's/^[^=]*=//'`";;
--tmpdir=*)
tmpdir="`echo $1 | sed 's/^[^=]*=//'`";;
--tmp=*)
tmp="`echo $1 | sed 's/^[^=]*=//'`";;
--emacs=*)
emacs="`echo $1 | sed 's/^[^=]*=//'`";;
--xemacs=*)
emacs="`echo $1 | sed 's/^[^=]*=//'`";;
--indent=*)
indent="`echo $1 | sed 's/^[^=]*=//'`";;
--dirname=*)
dirname="`echo $1 | sed 's/^[^=]*=//'`";;
--lispdir=*)
lispdir="`echo $1 | sed 's/^[^=]*=//'`";;
--prefix=*)
prefix="`echo $1 | sed 's/^[^=]*=//'`";
bindir=$prefix/bin;
libdir=$prefix/lib;
fildir=$libdir/bigloo/$rel ease;
zipdir=$fildir;
dlldir=$fildir;
mandir=$prefix/man/man1;
infodir=$prefix/info;
docdir=$prefix/doc/bigloo- $release;;
--cc=*)
cc="`echo $1 | sed 's/^[^=]*=//'`";;
--as=*)
as="`echo $1 | sed 's/^[^=]*=//'`";;
--ld=*)
ld="`echo $1 | sed 's/^[^=]*=//'`";;
--cflags=*)
cflags="`echo $1 | sed 's/^[^=]*=//'`";;
--lflags=*)
lflags="`echo $1 | sed 's/^[^=]*=//'`";;
--coflags=*)
coflags="`echo $1 | sed 's/^[^=]*=//'`";;
--ldlibs=*)
ldlibs="`echo $1 | sed 's/^[^=]*=//'`";;
--ldcomplibs=*)
ldcomplibs="`echo $1 | sed 's/^[^=]*=//'`";;
--ldflags=*)
ldflags="`echo $1 | sed 's/^[^=]*=//'`";;
--stringsplit=*)
stringsplit="`echo $1 | sed 's/^[^=]*=//'`";;
--native=*)
nativebackend="`echo $1 | sed 's/^[^=]*=//'`";;
--sharedcompiler=*)
sharedcompiler="`echo $1 | sed 's/^[^=]*=//'`";;
--sharedbde=*)
sharedbde="`echo $1 | sed 's/^[^=]*=//'`";;
--bee=partial)
bee="partial";;
--bee=full)
bee="full";;
--a.out=*)
aout="`echo $1 | sed 's/^[^=]*=//'`";;
--a.bat=*)
abat="`echo $1 | sed 's/^[^=]*=//'`";;
--jvm=*)
jvmbackend="`echo $1 | sed 's/^[^=]*=//'`";;
--java=*)
java="`echo $1 | sed 's/^[^=]*=//'`";;
--javac=*)
javac="`echo $1 | sed 's/^[^=]*=//'`";;
--javaprefix=*)
java="`echo $1 | sed 's/^[^=]*=//'`"/java;
javac="`echo $1 | sed 's/^[^=]*=//'`"/javac;
jar="`echo $1 | sed 's/^[^=]*=//'`/jar cmf";;
--javashell=sh)
jshell="sh";;
--javashell=msdos)
jshell="msdos";;
--native-default-backend)
defaultbackend="native";;
--jvm-default-backend)
defaultbackend="jvm";;
--dotnet=*)
dotnetbackend="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetld=*)
dotnetld="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetldlibopt=*)
dotnetldlibopt="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetldlibdiropt=*)
dotnetldlibdiropt="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetclr=*)
dotnetclr="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetclropt=*)
dotnetclropt="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetshell=sh)
jshell="sh";;
--dotnetshell=msdos)
jshell="msdos";;
--dotnetasm=*)
dotnetasm="`echo $1 | sed 's/^[^=]*=//'`";;
--no-share)
ldopt="no-share";;
--no-ldpreload)
ldpreload="no";;
--force-posixos=*)
posixos="`echo $1 | sed 's/^[^=]*=//'`";;
--os-win32)
os="win32";;
--os-macosx)
ld=gcc;
ldopt="";
sharedsuffix="dylib";
ldlibs="-lc -lbigloogc-$release -lbigloo_s-$release -lc";
ldcomplibs="-lc -lbigloogc-$release -lc";
sharedcompiler=yes;
sharedbde=yes;
ldflags="$ldflags -dynamiclib -single_module";;
--no-os-macosx)
macosx=false;;
--cygwin-dos-path=*)
cygwindospath="`echo $1 | sed 's/^[^=]*=//'`";;
--cygwin-dos-jvm=yes)
cygwindosjvm="yes";;
--cygwin-dos-jvm=no)
cygwindosjvm="no";;
--cygwin-dos-dotnet=yes)
cygwindosdotnet="yes";;
--cygwin-dos-dotnet=no)
cygwindosdotnet="no";;
--arch=athlon)
hardtune="athlon";
gcspecial=-DUSE_3DNOW_PREF ETCH;;
--arch=athlon-tbird)
hardtune="athlon-tbird";
gcspecial=-DUSE_3DNOW_PREF ETCH;;
--arch=athlon-xp)
hardtune="athlon-xp";
gcspecial=-DUSE_3DNOW_PREF ETCH;;
--arch=athlon-mp)
hardtune="athlon-mp";
gcspecial=-DUSE_3DNOW_PREF ETCH;;
--arch=k6-2)
hardtune="k6-2";
gcspecial=-DUSE_3DNOW_PREF ETCH;;
--arch=k6-3)
hardtune="k6-3";
gcspecial=-DUSE_3DNOW_PREF ETCH;;
--arch=pentium3)
hardtune="pentium3";
gcspecial=-DUSE_I686_PREFE TCH;;
--arch=pentium4)
hardtune="pentium4";
gcspecial=-DUSE_I686_PREFE TCH;;
--arch=i586)
hardtune="i586";;
--arch=i686)
hardtune="i686";;
--no-summary)
summary=no;;
--icc)
cc=icc;
as=icc;
ldopt="no-share";
coflags="$coflags -O3 -ip";
extralibs="";
cstrip="no";;
--pnet)
dotnetclrstyle=pnet;
dotnetcsccstyle=pnet;
dotnetldstyle=pnet;
dotnetclr=ilrun;
dotnetclropt="-S 4000 -C 256";
dotnetcscc=cscc;
dotnetld=cscc;
dotnetasm=ilasm;;
--mono)
dotnetclrstyle=mono;
dotnetcsccstyle=mono;
dotnetldstyle=mono;
dotnetclr=mono;
dotnetclropt="";
dotnetcscc=cscc;
dotnetld=cscc;
dotnetasm=ilasm;;
--dotnetldstyle=*)
dotnetldstyle="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetcsccstyle=*)
dotnetcsccstyle="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetclrstyle=*)
dotnetclrstyle="`echo $1 | sed 's/^[^=]*=//'`";;
--customgc=yes)
customgc=yes;;
--customgc=no)
customgc=no;;
--finalization=yes)
cgcfinalflags=;;
--finalization=no)
cgcfinalflags=-DFINALIZE_O N_DEMAND;;
--stack-check=no)
stacksizerequired=0;;
--benchmark=no)
mode=standard;;
--benchmark=yes)
mode=benchmark;;
--cpicflags=*)
cpicflags="`echo $1 | sed 's/^[^=]*=//'`";;
--configureinfo=no)
configureinfo="no";;
--configureinfo=yes)
configureinfo="yes";;
--mingw=yes)
mingw="yes";;
--enable-*)
api="`echo $1 | sed 's/--[^-]*-//'`";
apis="$api $apis";;
--disable-*)
api="`echo $1 | sed 's/--[^-]*-//'`";
napis=;
for a in $apis; do
if [ $a != $api ]; then
napis="$a $napis";
fi
done
apis=$napis;;
-*)
if [ "$1" != "-h" -a "$1" != "-help" -a "$1" != "--help" ]; then
echo "*** ERROR: Illegal option \"$1\""
echo ""
echo ""
echo "Usage: configure [options]" >&2;
echo "" >&2;
fi
# Existing apis
eapis=
(cd $bootdir/api;
for p in *; do
if [ -d $p ]; then
if [ "$eapis " = " " ]; then
eapis="$p";
else
eapis="$eapis|$p";
fi
fi
done)
echo "Bigloo compiler:" >&2;
echo " --native=yes|no [default yes]" >&2;
echo " --jvm=yes|no|force [default no]" >&2;
echo " --dotnet=yes|no|force [default no]" >&2;
echo " --customgc=yes|no [default yes]" >&2;
echo " --bee=partial|full [default partial]" >&2;
echo "" >&2;
echo "API:" >&2;
echo " --enable-[$eapis]" >&2;
echo " --disable-[$eapis]" >&2;
echo "" >&2;
echo "Path:" >&2;
echo " --prefix=dir (sets bin, lib, zip, man, info and doc dirs)" >&2;
echo " --bindir=file" >&2;
echo " --libdir=file" >&2;
echo " --gcdir=dir (directory for non custom gc library)" >&2;
echo " --fildir=file" >&2;
echo " --zipdir=file" >&2;
echo " --dlldir=file" >&2;
echo " --mandir=file" >&2;
echo " --infodir=file" >&2;
echo " --docdir=file" >&2;
echo " --tmpdir=file (Bigloo tmp dir)" >&2;
echo " --tmp=file (Installation tmp dir)" >&2;
echo " --lispdir=file" >&2;
echo "" >&2;
echo "Tools and compilers:" >&2;
echo " --cc=comp [default gcc]" >&2;
echo " --ld=comp [default gcc]" >&2;
echo " --as=asm" >&2;
echo " --cflags=compilation flags" >&2;
echo " --lflags=compiler link flags" >&2;
echo " --coflags=optimization_fla gs" >&2;
echo " --cpicflags=pic_flags" >&2;
echo " --ldlibs=ld_libs" >&2;
echo " --ldcomplibs=ld_compiler_l ibs" >&2;
echo " --ldflags=ld_flags" >&2;
echo " --emacs=file" >&2;
echo " --xemacs=file (deprecated, use \"--emacs\" option)" >&2;
echo " --indent=file" >&2;
echo " --icc (configure for icc)" >&2;
echo "" >&2;
echo "Host configuration:" >&2;
echo " --arch=[i586|i686|athlon|a thlon-tbir d|athlon-m p|athlon-x p|k6-2|k6- 3|pentium3 |pentium4] (configure for specified hardware)" >&2;
echo " --a.out=file" >&2;
echo " --a.bat=file" >&2;
echo " --dirname=file-or-command" >&2;
echo " --force-posixos=operating- system" >&2;
echo " --os-win32" >&2;
echo " --os-macosx (tune for MacOSX)" >&2;
echo " --no-os-macosx (disable MacOSX auto configuration)" >&2;
echo " --cygwin-dos-path=[dos path]" >&2;
echo " --cygwin-dos-jvm=yes|no [default yes]" >&2;
echo " --no-share (disable shared libraries support)" >&2;
echo " --no-ldpreload" >&2;
echo " --sharedbde=yes|no [default no] (link Bde tools against shared libraries)" >&2;
echo " --sharedcompiler=yes|no [default no] (link Bigloo against shared libraries)" >&2;
echo "" >&2;
echo "JVM configuration:" >&2;
echo " --java=file" >&2;
echo " --javac=file" >&2;
echo " --javaprefix=dir" >&2;
echo " --javashell=shell [should be sh or msdos (default sh)]" >&2;
echo " --native-default-backend" >&2;
echo " --jvm-default-backend" >&2;
echo "" >&2;
echo ".NET configuration:" >&2;
echo " --pnet (configure for GNU pnet)" >&2;
echo " --mono (configure for Ximian Mono)" >&2;
echo " --dotnetldstyle=style [should be pnet, mono]" >&2;
echo " --dotnetcsccstyle=style [should be pnet, mono]" >&2;
echo " --dotnetclrstyle=style [should be pnet, mono]" >&2;
echo " --dotnetcscc=file" >&2;
echo " --dotnetld=file" >&2;
echo " --dotnetclr=file" >&2;
echo " --dotnetclropt=options" >&2;
echo " --dotnetshell=shell [should be sh or msdos (default sh)]" >&2;
echo " --dotnetasm=asm [optional]" >&2;
echo "" >&2;
echo "Misc:" >&2;
echo " --finalization=yes|no [default no]" >&2;
echo " --benchmark=yes|no [default no] (must use --arch too)" >&2;
echo " --stack-check=no" >&2;
echo "" >&2;
echo "Configuration settings:" >&2;
echo " --bigloo.h[=file]" >&2;
echo " --bigloo_gc.h[=file]" >&2;
echo " --bigloo_config.h[=file]" >&2;
echo " --bigloo_config.jvm[=file] " >&2;
echo " --Makefile.config=file" >&2;
echo " --no-summary" >&2;
echo " --bootconfig" >&2;
echo " --bootdir=dir" >&2;
echo " --configureinfo=yes|no [default no]" >&2;
exit 3;
esac
shift
done
# The bigloo.h file
if [ "$bigloo_h " = " " ]; then
bigloo_h=lib/$release/bigl oo.h
fi
# The bigloo_gc.h file
if [ "$bigloo_gc_h " = " " ]; then
bigloo_gc_h=lib/$release/b igloo_gc.h
fi
# The bigloo_config.h file
if [ "$bigloo_config_h " = " " ]; then
bigloo_config_h=lib/$relea se/bigloo_ config.h
fi
# The bigloo_config.jvm file
if [ "$bigloo_config_jvm " = " " ]; then
bigloo_config_jvm=runtime/ Jlib/confi gure.java
fi
# The bigloo_config.dotnet file
if [ "$bigloo_config_dotnet " = " " ]; then
bigloo_config_dotnet=runti me/CSlib/c onfigure.c s
fi
# The bigloo_bmacs.el file
if [ "$bigloo_config_el " = " " ]; then
bigloo_config_el=bmacs/bma cs-config. el
fi
# The gc directory
if [ "$gcincdir " = " " ]; then
gcincdir=../gc-boehm
fi
# Start configuring
if [ "$summary" = "yes" ]; then
echo "** Configure **"
echo
fi
# Cleaning
/bin/rm -f configure.log
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Testing the Posix OS */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ "$posixos " = " " ]; then
posixos=`$autoconfdir/os`
fi
# Setting the default a.out production according to the OS
if [ "$aout " = " " ]; then
case $posixos in
cygwin|mingw)
aout=a.exe;;
*)
aout=a.out;;
esac
fi
if [ "$abat " = " " ]; then
case $posixos in
cygwin|mingw)
abat=a.bat;;
*)
abat=a.out;;
esac
fi
if [ $posixos = "cygwin" ]; then
exe=".exe";
jshell="msdos";
if [ "$cygwindospath " = " " ]; then
cygwindospath=`$autoconfdi r/cygwindo spath`
fi
if [ "$cygwindospath " = " " ]; then
echo "*** ERROR:Can't find out where cygwin is installed."
echo "Run configure with the --cygwin-dos-path option."
exit 1
else
cygwindospath=`echo "$cygwindospath" | sed -e 's|/$||g'`
if [ ! -d $cygwindospath ]; then
echo "*** WARNING:Can't find cygwindospath \"$cygwindospath\""
fi
cygwindospath=`echo "$cygwindospath" | sed -e 's/\\\\/\\\\\\\\/g'`
zipdir=`echo $zipdir | sed -e 's/\/cygdrive\/\([a-z]\)\/ /\1:\//'`
zipdir=`echo $zipdir | sed -e "s/^\//$cygwindospath\\\\\ \\\\\\\\\\ \/"`
zipdir=`echo $zipdir | sed -e 's/\//\\\\\\\\/g'`
zipdir=`echo $zipdir | sed -e 's/\([^\\\\]\)\\\\\([^\\\\ ]\)/\1\\\\ \\\\\2/g'`
syszipdir=$zipdir
syszipdirstr=`echo $syszipdir | sed -e 's|\\\\|\\\\\\\\|g'`
dlldir=`echo $dlldir | sed -e 's/\/cygdrive\/\([a-z]\)\/ /\1:\//'`
dlldir=`echo $dlldir | sed -e "s/^\//$cygwindospath\\\\\ \\\\\\\\\\ \/"`
dlldir=`echo $dlldir | sed -e 's/\//\\\\\\\\/g'`
dlldir=`echo $dlldir | sed -e 's/\([^\\\\]\)\\\\\([^\\\\ ]\)/\1\\\\ \\\\\2/g'`
sysdlldir=$dlldir
sysdlldirstr=`echo $sysdlldir | sed -e 's|\\\\|\\\\\\\\|g'`
fi
elif [ "$posixos" = "mingw" ]; then
exe=".exe"
os="win32"
ld="gcc"
ldlibs=""
ldcomplibs=""
ldflags="$ldflags -Wl,--enable-runtime-pseud o-reloc"
havedlopen=1
dlopen=""
cflags="$cflags -mthreads -D_MINGW_VER"
sharedsuffix="dll"
sharedlibraryclosed=yes
extralibs="$extralibs -Wl,--stack,8000000"
extragclibs=""
else
syszipdir=$zipdir
syszipdirstr=$zipdir
sysdlldir=$dlldir
sysdlldirstr=$dlldir
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* MacOSX autodetection */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ "$macosx " = "auto " ]; then
autoconf/macosx --cc="$cc" --posixos="$posixos"
macosx=$?
if [ "$macosx" = "0" ]; then
if [ "$ld" = "ld" \
-a "$ldopt " = " " \
-a "$sharedsuffix" = "so" \
-a "$ldlibs" = "-lc" \
-a "$ldflags " = " " ]; then
echo "MacOS X tuning enabled";
ld=gcc;
ldopt="";
sharedsuffix="dylib";
ldlibs="-lc -lbigloogc-$release -lbigloo_s-$release -lc";
ldcomplibs="-lc -lbigloogc-$release -lc";
sharedcompiler=yes;
sharedbde=yes;
ldflags="$ldflags -dynamiclib -single_module";
tuning="MacOS X"
fi
fi
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* cgcflags */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
cgcflags=`$autoconfdir/gcf lags --user=$user --tmp=$tmp --cc="$cc" --cflags="$cflags" --posixos="$posixos"`;
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Emacs configuration */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ "$emacs " = " " ]; then
emacs=emacs
emacsversion=`$autoconfdir /emacsbran d --emacs=emacs 2> /dev/null`
if [ "$emacsversion" = "false" ]; then
emacs=xemacs
emacsversion=`$autoconfdir /emacsbran d --emacs=xemacs 2> /dev/null`
fi
else
emacsversion=`$autoconfdir /emacsbran d --emacs=$emacs 2> /dev/null`
fi
if [ "$emacsversion" != "false" ]; then
if [ "$lispdir " = " " ]; then
emacslisppath=`$autoconfdi r/emacslis ppath --emacs=$emacs 2> /dev/null`
else
emacslisppath=`$autoconfdi r/emacslis ppath --emacs=$emacs --path=$lispdir 2> /dev/null`
fi
if [ "$emacslisppath" = "" ]; then
emacsversion="false";
fi
else
emacslisppath=""
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* If the operating system is win32 we have to turn the / into \ in */
#* path names */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $os = "win32" ]; then
if [ "$posixos" != "mingw" ]; then
bindir=`echo $bindir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
libdir=`echo $libdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
fildir=`echo $fildir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
zipdir=`echo $zipdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
dlldir=`echo $dlldir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
mandir=`echo $mandir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
infodir=`echo $infodir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
docdir=`echo $docdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
lispdir=`echo $lispdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
fi
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* We don't support shared libraries on cygwin yet. */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $posixos = "cygwin" ]; then
jvmrecettebootpath="-class path \".;../lib/$release/bigloo _s.zip;obj s_jvm\""
jvmapibootpath="-classpath \".;../../../../../lib/$re lease/bigl oo_s.zip\" "
gchaveblocking=0
ldopt="no-share"
if [ "$cygwindosjvm" = "yes" ]; then
jshell="msdos"
fi
if [ "$cygwindosdotnet" = "yes" ]; then
dotnetshell="msdos"
fi
elif [ $posixos = "mingw" ]; then
ldopt=-shared
gchaveblocking=0
else
jvmrecettebootpath="-class path \".:../lib/$release/bigloo _s.zip:obj s_jvm\""
jvmapibootpath="-classpath \".:../../../../../lib/$re lease/bigl oo_s.zip\" "
case $dotnetldstyle in
pnet|mono)
;;
*)
echo "*** Don't know how to link .NET application [" $dotnetldstyl "]";
exit 3;;
esac
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* all action */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $action = "all" ]; then
if [ ! -d bin ]; then
mkdir bin || exit 3
fi
if [ ! -d lib ]; then
mkdir lib || exit 3
fi
if [ ! -d lib/$release ]; then
mkdir lib/$release || exit 3
fi
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Finding a user name */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
user=`$autoconfdir/user --posixos=$posixos`
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Testing C compiler */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ "$cc " = " " ]; then
$autoconfdir/cctest --cc="gcc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
$autoconfdir/cctest --cc="cc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
echo "*** ERROR:configure:Can't configure a C compiler. Aborting";
else
cc=cc;
fi
else
cc=gcc
fi
else
$autoconfdir/cctest --cc="$cc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
echo "*** ERROR:configure:the C compiler ($cc) does not seem to work. Aborting";
exit 1;
fi
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Benchmark mode */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ "$mode" = "benchmark" ]; then
ccprefix="`echo $cc | sed 's/[0-9]*//g'`" # remove version numbers
case $hardtune in
i586|i686)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mcpu=$hardtune -mpreferred-stack-boundary =2 -fomit-frame-pointer -fschedule-insns2 -ffast-math";
fi
gcspecial=-DDONT_ADD_BYTE_ AT_END;;
pentium3|pentium4)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mpreferred-stack-boundary =2 -fomit-frame-pointer -fschedule-insns2 -ffast-math";
fi
gcspecial="-DUSE_I686_PREF ETCH -DDONT_ADD_BYTE_AT_END";;
athlon|athlon-mp|athlon-tb ird|athlon -xp)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mpreferred-stack-boundary =2 -fomit-frame-pointer -fschedule-insns2 -ffast-math";
fi
gcspecial="-DUSE_3DNOW_PRE FETCH -DDONT_ADD_BYTE_AT_END";;
k6-2|k6-3)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mpreferred-stack-boundary =2 -fomit-frame-pointer -fschedule-insns2 -ffast-math";
fi
gcspecial="-DUSE_3DNOW_PRE FETCH -DDONT_ADD_BYTE_AT_END";;
esac
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Testing stack size */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $posixos != "cygwin" ]; then
if [ "$posixos" != "mingw" ]; then
if [ ! "$stacksizerequired" = "0" ]; then
$autoconfdir/stacksize --cc="$cc" --user=$user --tmp=$tmp --stacksize=$stacksizerequ ired 2> /dev/null
if [ $? != "0" ]; then
echo "*** ERROR:configure:the execution stack is too small.";
echo ""
echo "Bigloo REQUIRES a larger stack (it needs a stack of about $stacksizerequired MB to compile).";
echo "In general, it is possible to adjust the stack size by the means of";
echo "a shell command.";
echo "On most Unix systems, it is frequently called \"ulimit\" or \"unlimit\".";
echo "For instance, with Bash you should try \"ulimit -s 4096\"."
echo "With Zsh, try \"unlimit\"."
echo ""
echo "Another solution, if you know what you are doing,";
echo "is to use the configure option \"--stack-check=no\". This will";
echo "simply, disable stack size checking.";
exit 1;
fi
fi
fi
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Multi-threading */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
# Does the system supports threads
if [ "$gcthread " = " " ]; then
gcthread=`$autoconfdir/thr ead --user=$user --tmp=$tmp --cc="$cc" --cflags="$cgcfinalflags" --posixos="$posixos"`;
fi
# find out the C library for posix threads
if [ "$pthreadlibs " = " " ]; then
pthreadlibs=`$autoconfdir/ pthread --user=$user --tmp=$tmp --cc="$cc" --posixos="$posixos"`;
fi
# pthread_mutex_timedlock
if [ "$pthreadlibs" != "no" ]; then
pthreadtimedlock=`$autocon fdir/pthre adlock --user=$user --tmp=$tmp --cc="$cc" --posixos="$posixos" --lib="$pthreadlibs"`;
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* OpenSSL */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
# find out the C library for openssl
if [ "$openssllibs " = " " ]; then
openssllibs=`$autoconfdir/ openssl --user=$user --tmp=$tmp --cc="$cc" --posixos="$posixos"`;
else
openssllibs=`$autoconfdir/ openssl --user=$user --tmp=$tmp --cc="$cc" --posixos="$posixos" --lib=$openssllibs`;
fi
if [ "$openssllibs" != "no" ]; then
openssldtls=`$autoconfdir/ openssl-dt ls --user=$user --tmp=$tmp --cc="$cc" --posixos="$posixos" --lib=$openssllibs`;
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* sqlite */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
# find out the C library for sqlite
if [ "$sqlitelibs " = " " ]; then
sqlitelibs=`$autoconfdir/s qlite --user=$user --tmp=$tmp --cc="$cc" --cflags="$cflags" --posixos="$posixos"`;
fi
if [ "$sqlitelibs" = "no" ]; then
napis=;
for a in $apis; do
if [ "sqlite" != "$a" ]; then
napis="$a $napis";
fi
done
apis=$napis;
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* bigloo_config.h / configure.java / configure.cs / ... */
#* -------------------------- ---------- ---------- ---------- ----- */
#* This part of the configure script produces the files */
#* runtime/Include/bigloo_con fig.h, runtime/Jlib/configure.jav a and */
#* runtime/CSlib/configure.cs . These files contain all the machine- */
#* dependant information used by Bigloo. */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $action = "all" -o $action = "bigloo_config" ]; then
# Tell what we are doing
echo "Configuring $bigloo_config_h, $bigloo_config_jvm, $bigloo_config_dotnet:"
# The pointer alignment
alignment=`$autoconfdir/al ignment --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:alignment. Aborting";
exit 1;
else
echo " log2 ptr alignment: " $alignment
fi
# The -O C compiler options
coflags=`$autoconfdir/ccop tim --user=$user --tmp=$tmp --cc="$cc" --cflags="$coflags" --posixos="$posixos"`
# The -s C linker options
if [ "$cstrip" != "no" ]; then
csflags=`$autoconfdir/ccst rip --user=$user --tmp=$tmp --cc="$cc" --cflags="$cstrip"`;
else
csflags="";
fi
# The -p C compiler options
cpflags=`$autoconfdir/ccpr of --user=$user --tmp=$tmp --cc="$cc"`
# The stack direction
stackgrows=`$autoconfdir/s tackdown --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:stack. Aborting";
exit 1;
else
if [ "$stackgrows" = "1" ]; then
echo " stack grows: down"
else
echo " stack grows: up"
fi
fi
# stdint
stdint=`$autoconfdir/stdin t --user=$user --tmp=$tmp --cc="$cc"`
if [ "$stdint" = "1" ]; then
echo " stdint: yes"
else
echo " stdint: no"
stdlibint=`$autoconfdir/st dlibint --user=$user --tmp=$tmp --cc="$cc"`
if [ "$stdlibint" = "1" ]; then
echo " stdlibint: yes"
else
echo " stdlibint: no"
fi
fi
# setjmp/longjmp
prefix=`$autoconfdir/setjm p --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:setjmp. Aborting";
exit 1;
else
setjmp="$prefix"setjmp
longjmp="$prefix"longjmp
echo " setjmp: $setjmp longjmp: $longjmp"
if [ "$prefix" = "sig" ]; then
setjmp="sigsetjmp(__jb,1)" ;
else
setjmp="$setjmp(__jb)";
fi
fi
# Does the system have bcopy?
bcopy=`$autoconfdir/bcopy --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:bcopy. Aborting";
exit 1;
else
if [ "$bcopy" = "1" ]; then
echo " bcopy: yes"
havebcopy=1
else
echo " bcopy: no"
havebcopy=0
fi
fi
# The number of window register
window=`$autoconfdir/winre g --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:winreg. Aborting";
exit 1;
else
echo " nb register windows: " $window
fi
# Does the system have sigpipe?
sigpipe=`$autoconfdir/sigp ipe --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigpipe. Aborting";
exit 1;
else
if [ "$sigpipe" = "0" ]; then
echo " sigpipe: no"
else
echo " sigpipe: yes"
fi
fi
# Does the system have sigsetmask?
sigsetmask=`$autoconfdir/s igsetmask --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigsetmask . Aborting";
exit 1;
else
if [ "$sigsetmask" = "0" ]; then
echo " sigsetmask: no"
else
echo " sigsetmask: yes"
fi
fi
# Does the system have sigprocmask?
sigprocmask=`$autoconfdir/ sigprocmas k --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigprocmas k. Aborting";
exit 1;
else
if [ $sigprocmask = "0" ]; then
echo " sigprocmask: no"
else
echo " sigprocmask: yes"
fi
fi
# A warning if neither sigsetmask nor sigprocmask is defined
if( test $sigsetmask = "0" -a $sigprocmask = "0"); then
echo "*** WARNING:sigsetmask nor sigprocmask available"
echo "(^C disabled in the interpreter)."
fi
# Does the system have alloca?
alloca=`$autoconfdir/alloc a --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:alloca. Aborting";
exit 1;
else
if [ $alloca = "1" ]; then
echo " alloca: yes"
else
echo " alloca: no"
fi
fi
# Does the system have mmap?
mmap=`$autoconfdir/mmap --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:mmap. Aborting";
exit 1;
else
if [ $mmap = "1" ]; then
echo " mmap: yes"
else
echo " mmap: no"
fi
fi
# Does the system have getcwd?
getcwd=`$autoconfdir/getcw d --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:getcwd. Aborting";
exit 1;
else
if [ $getcwd = "0" ]; then
echo " getcwd: no"
else
echo " getcwd: yes"
fi
fi
# Does the system have getwd?
getwd=`$autoconfdir/getwd --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:getwd. Aborting";
exit 1;
else
if [ $getwd = "0" ]; then
echo " getwd: no"
else
echo " getwd: yes"
fi
fi
# Where to find the socket api
socket=`$autoconfdir/socke t --user=$user --tmp=$tmp --cc="$cc" --lib="$socketlibs"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:socket. Aborting";
exit 1;
fi
socklen=`$autoconfdir/sock len --user=$user --tmp=$tmp --cc="$cc" --lib="$socketlibs"`
if [ "$socket " = " " ]; then
echo " socket: yes"
else
echo " socket: $socket"
extralibs="$socket $extralibs"
fi
# Are the static constants aligned?
cnstalign=`$autoconfdir/cn stalign --user=$user --tmp=$tmp --cc="$cc" --alignment=$alignment`
if [ $? != "0" ]; then
echo "*** ERROR:configure:cnstalign. Aborting";
exit 1;
fi
enforcedcnstalign=`$autoco nfdir/enfo rcedcnstal ign --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:enforcedcn stalign. Aborting";
exit 1;
else
if [ "$cnstalign" = "1" ]; then
echo " constant alignment: ok"
elif [ "$enforcedcnstalign" = "1" ]; then
echo " constant alignment: enforced"
else
echo "*** ERROR:configure:illegal alignment."
echo "It is then impossible install Bigloo on this architecture, sorry."
exit 1
fi
fi
# Endianness
endian=`$autoconfdir/bigen dian --user=$user --tmp=$tmp --cc="$cc"`
if [ "$endian" = "1" ]; then
echo " Endianness: big"
else
echo " Endianness: little"
fi
# Does this system implements pipe?
pipe=`$autoconfdir/pipe --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:pipe. Aborting";
exit 1;
else
if [ "$pipe" = "0" ]; then
echo " popen/pclose: no"
else
echo " popen/pclose: yes"
fi
fi
# Does this compiler implements labs?
# llabs=`$autoconfdir/labs --user=$user --tmp=$tmp --cc="$cc"`
# SE: fix, 27 oct 2006
labs=`$autoconfdir/labs --user=$user --tmp=$tmp --cc="$cc"`
if [ "$labs " != " " ]; then
echo " labs: yes [$labs]"
have_labs=1
else
echo " labs: no"
have_labs=0
labs=abs
fi
# Does this compiler implements longlong?
longlong=`$autoconfdir/lon glong --user=$user --tmp=$tmp --cc="$cc" --longlong="$longlong"`
echo "#undef BGL_LONGLONG_T" >> $bigloo_config_h
if [ "$longlong " = " " ]; then
echo " long long: no"
longlong=long
have_llabs=0
llabs=abs
have_strtoll=0
strtoll=strtol
have_strtoull=0
strtoull=0
else
llabs=`$autoconfdir/llabs --user=$user --tmp=$tmp --cc="$cc" --longlong="$longlong"`
strtoll=`$autoconfdir/strt oll --user=$user --tmp=$tmp --cc="$cc" --longlong="$longlong"`
strtoull=`$autoconfdir/str toull --user=$user --tmp=$tmp --cc="$cc" --longlong="$longlong"`
echo " long long: yes [$longlong]"
if [ "$llabs " != " " ]; then
echo " llabs: yes [$llabs]"
have_llabs=1
else
echo " llabs: no"
have_llabs=0
llabs=abs
fi
if [ "$strtoll " != " " ]; then
echo " strtoll: yes [$strtoll]"
have_strtoll=1
else
echo " strtoll: no"
have_strtoll=0
strtoll="bgl_strtoll"
fi
if [ "$strtoull " != " " ]; then
echo " strtoull: yes [$strtoull]"
have_strtoull=1
else
echo " strtoull: no"
have_strtoull=0
strtoull="bgl_strtoull"
fi
fi
# Is sigchld available for us
sigchld=`$autoconfdir/sigc hld --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigchld. Aborting";
exit 1;
else
if [ "$sigchld" = "1" ]; then
echo " sigchld: yes"
else
sigchld=0
echo " sigchld: no"
fi
fi
# Is sigaction available
sigaction=`$autoconfdir/si gaction --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigaction. Aborting";
exit 1;
else
if [ "$sigaction" = "1" ]; then
echo " sigaction: yes"
else
echo " sigaction: no"
fi
fi
# Is select available
select=`$autoconfdir/selec t --user=$user --tmp=$tmp --cc="$cc"`
if [ "$select" = "1" ]; then
echo " select: yes"
else
echo " select: no"
fi
# Is fcntl available
fcntl=`$autoconfdir/fcntl --user=$user --tmp=$tmp --cc="$cc"`
if [ "$fcntl" = "1" ]; then
echo " fcntl: yes"
else
echo " fcntl: no"
fi
# Is termio available
termio=`$autoconfdir/termi o --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:termio. Aborting";
exit 1;
else
if [ "$termio" = "1" ]; then
echo " termio: yes"
else
echo " termio: no"
fi
fi
# Is termio available
termios=`$autoconfdir/term ios --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:termios. Aborting";
exit 1;
else
if [ "$termios" = "1" ]; then
echo " termios: yes"
else
echo " termios: no"
fi
fi
# Does the system support posix-file-ops
posixfileops=`$autoconfdir /posixfile ops --user=$user --tmp=$tmp --cc="$cc"`
if [ "$posixfileops" = "1" ]; then
echo " posix file operations: yes"
else
echo " posix file operations: no"
fi
# Does the system support sendfile
sendfile=`$autoconfdir/sen dfile --user=$user --tmp=$tmp --cc="$cc"`
if [ "$sendfile" = "1" ]; then
echo " sendfile: yes"
sendfile_rif=1;
sendfile_ros=1;
else
echo " sendfile: no"
sendfile_rif=0;
sendfile_ros=0;
fi
# Does the system support nanosleep
nanosleep=`$autoconfdir/sl eep --user=$user --tmp=$tmp --cc="$cc" --cflags="-DBGL_NANOSLEEP" `
if [ "$nanosleep" = "1" ]; then
echo " nanosleep: yes"
else
echo " nanosleep: no"
fi
# Does the system support normalsleep
normalsleep=`$autoconfdir/ sleep --user=$user --tmp=$tmp --cc="$cc" --cflags="-DBGL_SLEEP"`
if [ "$normalSleep" = "1" ]; then
echo " normal sleep: yes"
else
echo " normal sleep: no"
fi
# The timezone variable
timezone=`$autoconfdir/tim ezone --user=$user --tmp=$tmp --cc="$cc" --cflags="$coflags"`
# The -pic C compiler options
if [ "$cpicflags" = "no" ]; then
cpicflags=""
else
if [ "$ldopt" != "no-share" ]; then
if [ "$cpicflags" = "demanded" -o "$cpicflags " = " " ]; then
if [ "$cpicflags" = "demanded" ]; then
cpicflags=`$autoconfdir/cc pic --user=$user --tmp=$tmp --cc="$cc" --cflags="$cpicflags"`;
else
cpicflags=`$autoconfdir/cc pic --user=$user --tmp=$tmp --cc="$cc" --cflags="$cpicflags"`
fi
fi
else
cpicflags=""
fi
fi
if [ "$cpicflags " = " " ]; then
cpicflags=-DBGL_NO_PIC;
fi
# The shared libraries
if [ "$ldopt" = "no-share" ]; then
echo " shared library: no"
haveshlib=0
else
ldopt=`$autoconfdir/ldshar e --user=$user --tmp=$tmp --cc="$cc" --ld="$ld" --ldopt="$ldopt" --ldlibs="$ldlibs" --cflags="$cpicflags" --sharedsuffix="$sharedsuf fix"`
if [ "$ldopt" = "no-share" ]; then
echo " shared library: no (because I don't know ld option)"
haveshlib=0
cpicflags="-DBGL_NO_PIC"
else
echo " shared library: yes"
haveshlib=1
ldpreload=`$autoconfdir/ld preload --user=$user --tmp=$tmp --cc="$cc" --ld="$ld" --ldlibs="$ldlibs" --ldopt="$ldopt"`
echo " ld preload: $ldpreload"
fi
fi
# Does the system have dlopen?
if [ "$ldopt " != "no-share" ]; then
if [ "$posixos" = "mingw" ]; then
echo " dlopen: yes (mingw)"
havedlopen=1
dlopen=""
else
dlopen=`$autoconfdir/dlope n --user=$user --tmp=$tmp --cc="$cc" --dlopt="$dlopenopt"`
if [ "$dlopen" != "0" ]; then
echo " dlopen: yes [$dlopen]"
havedlopen=1
dlopen=$dlopen
extralibs="$dlopen $extralibs"
else
echo " dlopen: no"
havedlopen=0
dlopen=""
fi
fi
else
echo " dlopen: no"
havedlopen=0
dlopen=""
fi
# We check the standard GC if we have to use one
if [ "$customgc" = "no" ]; then
gclib=`$autoconfdir/gcstd --user=$user --tmp=$tmp --cc="$cc" --cflags="$coflags" --gcdir="$stdgcincdir" --gclib="$stdgclib" --gclibdir="$gclibdir" --dlopen=$dlopen`
if [ $? != "0" ]; then
echo "*** ERROR:configure:Standard GC. Aborting";
echo "You are trying to configure Bigloo so that it uses an existing"
echo "GC library. The configuration script is enable to make this"
echo "library working properly."
echo "Try to configure Bigloo with \"--customgc=yes\"."
exit 1;
fi
gcincdir=$stdgcincdir
else
gclib=$customgclib;
fi
# for now only the port is Unix
echo " operating system: unix"
if [ "$posixos" = "mingw" ]; then
echo " (well actually it's a win32 MinGW System ;-)"
fi
$autoconfdir/unix --user=$user --tmpdir=$tmpdir --posixos="$posixos" >> $bigloo_config_h
if [ $? != "0" ]; then
echo "*** ERROR:configure:os. Aborting";
exit 1;
fi
# which shell to use
`$shell -c "ls -l > /dev/null 2> /dev/null"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:$shell. Aborting";
exit 1;
fi
# the C compiler style
echo " c compiler style: $ccstyle"
echo " c compiler: $cc"
echo " c flags: $cflags"
echo " c compiler optimization: $coflags"
echo " c linker strip: $csflags"
# the library files directory
echo " library directory: $libdir"
echo " files directory: $fildir"
echo " GC library: $gclib"
if [ $customgc = "yes" ]; then
echo " custom GC: yes"
isgccustom=1
else
echo " custom GC: no"
isgccustom=0
fi
# the zip directory
echo " zip directory: $syszipdir"
# the dll directory
echo " dll directory: $sysdlldir"
# additionals non bigloo library
echo " additional libraries: $extralibs"
# the C beautifier
if [ `$autoconfdir/indent --user=$user --tmp=$tmp --cc="$cc" --cflags="$cflags" --indent="$indent"` != "1" ]; then
echo " c beautifier: no"
indent=
else
echo " c beautifier: $indent"
fi
# the dirname command
dirname=`$autoconfdir/dirn ame --user=$user --tmp=$tmp --cc="$cc" --cflags="$cflags" --dirname="$dirname"`
echo " dirname: $dirname"
# library basename
echo " library basename: $libraryname"
# double precision
prec=`$autoconfdir/doublep rec --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:doubleprec . Aborting";
exit 1;
else
echo " double precision: $prec"
fi
# static link additional option
ldstaticopt=`$autoconfdir/ ldstaticop t --user=$user --tmp=$tmp --posixos="$posixos"`
# shared link additional option
ldsharedopt=`$autoconfdir/ ldsharedop t --user=$user --tmp=$tmp $libdir --cc="$cc" --posixos="$posixos"`
# bdb configuration
if [ "$bee" = "partial" ]; then
echo " bdb library installation: no"
havebdb=0
else
echo " bdb library installation: yes"
havebdb=1
fi
# Java configuration
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
if [ "$jshell" != "sh" ]; then
if [ "$jshell" != "msdos" ]; then
echo "*** ERROR:configure:Illegal Java shell \"$jshell\" (should be either \"sh\" or \"msdos\")";
exit 3
fi
fi
if [ "$jvmbackend" = "yes" ]; then
if [ "$posixos" = "cygwin" -a "$cygwindosjvm" = "yes" ]; then
cpsep=";";
else
cpsep=":";
fi
$autoconfdir/javatest --java=$java \
--jflags=$jflags \
--jvflags=$jvflags \
--javac=$javac \
--jcflags=$jcflags \
--user=$user \
--tmp=$tmp \
--cpsep="$cpsep"
if [ $? = 0 ]; then
echo " java: yes"
else
echo " java: no"
echo "*** ERROR:configure:Can't configure Java."
echo "Command:"
echo "$autoconfdir/javatest --java=$java --jflags=$jflags --jvflags=$jvflags --javac=$javac --jcflags=$jcflags --user=$user --tmp=$tmp --cpsep=\"$cpsep\""
echo "failed unexpectedly (see configure.log for details)."
echo ""
echo "To give up with the JVM backend, use:"
echo " ./configure --jvm=no"
exit 3
fi
fi
java_configured=yes
java_version=`$java -version 2>&1 | head -n 1`
if echo "$java_version" | grep "1.6" > /dev/null
then java_version=1.6
elif echo "$java_version" | grep "1.5" > /dev/null
then java_version=1.5
elif echo "$java_version" | grep "1.4" > /dev/null
then java_version=1.4
else
java_version=1.3
fi
else
java=java
jflags=
jvflags=
jshell=sh
jar=
fi
# .NET configuration
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
echo " dotnet: yes"
if [ "$dotnetshell" != "sh" ]; then
if [ "$dotnetshell" != "msdos" ]; then
echo "*** ERROR:configure:Illegal .NET shell \"$dotnetshell\" (should be either \"sh\" or \"msdos\")";
exit 3
fi
fi
if [ "$dotnetbackend" = "yes" ]; then
if [ "$posixos" = "cygwin" -a "$cygwindosdotnet" = "yes" ]; then
cpsep=";";
else
cpsep=":";
fi
$autoconfdir/dotnettest --clr=$dotnetclr \
--clropt="$dotnetclropt" \
--clrld=$dotnetclrld \
--cscc=$dotnetcscc \
--user=$user \
--tmp=$tmp \
--cpsep="$cpsep"
if [ $? = 0 ]; then
echo " .NET: yes"
else
echo " .NET: no"
echo "*** ERROR:configure:Can't configure .NET. Command:"
echo "$autoconfdir/dotnettest --clr=$dotnetclr --clropt=$dotnetclropt --clrld=$dotnetclrld --cscc=$dotnetcscc --user=$user --tmp=$tmp --cpsep=\"$cpsep\""
echo "failed unexpectedly (see configure.log for details)."
echo ""
echo "To give up with the .NET backend, use:"
echo " ./configure --dotnet=no"
exit 3
fi
fi
dotnet_configured=yes
else
echo " dotnet: no"
dotnetld=""
dotnetldstyle=""
dotnetclr=""
dotnetclrstyle=""
dotnetclropt=""
dotnetshell=""
dotnetasm=""
fi
# Posix Os
if eval uname > /dev/null 2> /dev/null; then
osname=`uname -s`
osarch=`uname -m`
osversion=`uname -r`
if [ "$posixos" = "mingw" ]; then
osclass="mingw"
else
osclass="unix"
fi
ostmp="$tmpdir"
fileseparator="/"
if [ "$posixos" = "mingw" ]; then
pathseparator=";"
else
pathseparator=":"
fi
staticlibsuf="a"
ucs2displayable=0
else
osname="unknown"
osarch="unknown"
osversion="unknown"
ostmp="/tmp"
fileseparator="/"
pathseparator=":"
staticlibsuf="a"
ucs2displayable=0
fi
echo
# bigloo_config_h, bigloo_config_jvm, bigloo_config_dotnet
for p in $bigloo_config_h $bigloo_config_jvm $bigloo_config_dotnet; do
if [ "$p " != " " ]; then
rm -f $p 2> /dev/null
rel=`echo $release | sed -e "s|[.]|_|"`;
cat autoconf/`basename $p`.in \
| sed -e "s|@CONFIGURE@|Automatical ly generated file (don't edit), `date`|" \
-e "s|@BGL_RELEASE@|BGL_$rel| " \
-e "s|@BGL_RELEASE_NUMBER@|$r elease|" \
-e "s|@BGL_SPECIFIC_VERSION@| $specific| " \
-e "s|@BGL_DEFAULT_BACK_END@| $defaultba ckend|" \
-e "s|@BGL_DEFAULT_A_OUT@|$ao ut|" \
-e "s|@BGL_DEFAULT_A_BAT@|$ab at|" \
-e "s|@STACK_GROWS_DOWN@|$sta ckgrows|" \
-e "s|@PTR_ALIGNMENT@|$alignm ent|" \
-e "s|@HAVE_STDINT@|$stdint|" \
-e "s|@HAVE_STDLIBINT@|$stdli bint|" \
-e "s|@SETJMP@|$setjmp|" \
-e "s|@LONGJMP@|$longjmp|" \
-e "s|@HAVE_BCOPY@|$havebcopy |" \
-e "s|@NB_WINDOW_REGISTER@|$w indow|" \
-e "s|@HAVE_SIGPIPE@|$sigpipe |" \
-e "s|@HAVE_SIGSETMASK@|$sigs etmask|" \
-e "s|@HAVE_SIGPROCMASK@|$sig procmask|" \
-e "s|@HAVE_ALLOCA@|$alloca|" \
-e "s|@HAVE_MMAP@|$mmap|" \
-e "s|@HAVE_GETCWD@|$getcwd|" \
-e "s|@HAVE_GETWD@|$getwd|" \
-e "s|@CONSTANT_ALIGNED@|$cns talign|" \
-e "s|@BGL_BIG_ENDIAN@|$endia n|" \
-e "s|@HAVE_PIPE@|$pipe|" \
-e "s|@BGL_LONGLONG_T@|$longl ong|" \
-e "s|@BGL_HAVE_LABS@|$have_l abs|" \
-e "s|@BGL_LABS@|$labs|" \
-e "s|@BGL_HAVE_LLABS@|$have_ llabs|" \
-e "s|@BGL_LLABS@|$llabs|" \
-e "s|@BGL_HAVE_STRTOLL@|$hav e_strtoll| " \
-e "s|@BGL_STRTOLL@|$strtoll| " \
-e "s|@BGL_HAVE_STRTOULL@|$ha ve_strtoul l|" \
-e "s|@BGL_STRTOULL@|$strtoul l|" \
-e "s|@HAVE_SIGCHLD@|$sigchld |" \
-e "s|@HAVE_SIGACTION@|$sigac tion|" \
-e "s|@BGL_HAVE_SELECT@|$sele ct|" \
-e "s|@BGL_HAVE_FCNTL@|$fcntl |" \
-e "s|@HAVE_TERMIO@|$termio|" \
-e "s|@HAVE_TERMIOS@|$termios |" \
-e "s|@POSIX_FILE_OPS@|$posix fileops|" \
-e "s|@BGL_HAVE_SENDFILE@|$se ndfile|" \
-e "s|@BGL_SENDFILE_REQUIRE_I NPUT_FILE@ |$sendfile _rif|" \
-e "s|@BGL_SENDFILE_REQUIRE_O UTPUT_SOCK ET@|$sendf ile_ros|" \
-e "s|@BGL_NANOSLEEP@|$nanosl eep|" \
-e "s|@BGL_SLEEP@|$normalslee p|" \
-e "s|@BGL_TIMEZONE@|$timezon e|" \
-e "s|@HAVE_SHARED_LIBRARY@|$ haveshlib| " \
-e "s|@HAVE_DLOPEN@|$havedlop en|" \
-e "s|@DLOPEN_LD_OPT@|$dlopen |" \
-e "s|@HAVE_SOCKLEN@|$socklen |" \
-e "s|@SHELL@|$shell|" \
-e "s|@C_COMPILER_STYLE@|$ccs tyle|" \
-e "s|@C_COMPILER@|$cc|" \
-e "s|@C_FLAGS@|$cflags|" \
-e "s|@C_COMPILER_O_OPTION@|- o |" \
-e "s|@C_COMPILER_DEBUG_OPTIO N@|-g|" \
-e "s|@C_OBJECT_FILE_EXTENSIO N@|$cobj|" \
-e "s|@C_COMPILER_OPTIM_FLAGS @|$coflags $cflags|" \
-e "s|@C_STRIP_FLAGS@|$csflag s|" \
-e "s|@C_LINKER_STYLE@|$ldsty le|" \
-e "s|@C_LINKER_O_OPTION@|-o |" \
-e "s|@C_LINKER_DEBUG_OPTION@ |-g |" \
-e "s|@C_LINKER_OPTIM_FLAGS@| |" \
-e "s|@C_PROFILE_FLAGS@|$cpfl ags $cflags|" \
-e "s|@C_STRING_SPLIT@|$strin gsplit|" \
-e "s|@BGL_LD_LIBRARY_DIR@|$l ibdir|" \
-e "s|@BGL_NON_CUSTOM_GC_DIR@ |$gclibdir |" \
-e "s|@LIBRARY_DIRECTORY@|$fi ldir|" \
-e "s|@BGL_GC_LIBRARY@|$gclib |" \
-e "s|@BGL_GC_CUSTOM@|$isgccu stom|" \
-e "s|@ZIP_DIRECTORY@|$syszip dirstr|" \
-e "s|@DLL_DIRECTORY@|$sysdll dirstr|" \
-e "s|@DNS_CACHE@|$dnscache|" \
| sed \
-e "s|@USER_LIBRARIES@|$extra libs|" \
-e "s|@C_BEAUTIFIER@|$indent| " \
-e "s|@DIRNAME_CMD@|$dirname| " \
-e "s|@LIBRARY_BASE_NAME@|$li braryname| " \
-e "s|@DOUBLE_PRECISION@|$pre c|" \
-e "s|@ADDITIONAL_STATIC_LINK _OPTION@|$ ldstaticop t|" \
-e "s|@ADDITIONAL_SHARED_LINK _OPTION@|$ ldsharedop t|" \
-e "s|@BGL_HAVE_BIGLOO_ABORT@ |0|" \
-e "s|@BGL_HAVE_BDB@|$havebdb |" \
-e "s|@BGL_JAVA@|$java|" \
-e "s|@BGL_JAVA_OPT@|$jflags| " \
-e "s|@BGL_JAVA_VOPT@|$jvflag s|" \
-e "s|@BGL_JAR@|$jar|" \
-e "s|@BGL_JAVA_SHELL@|$jshel l|" \
-e "s|@BGL_DOTNET_LD@|$dotnet ld|" \
-e "s|@BGL_DOTNET_LD_STYLE@|$ dotnetldst yle|" \
-e "s|@BGL_DOTNET_CLR@|$dotne tclr|" \
-e "s|@BGL_DOTNET_CLR_STYLE@| $dotnetclr style|" \
-e "s|@BGL_DOTNET_CLR_OPT@|$d otnetclrop t|" \
-e "s|@BGL_DOTNET_SHELL@|$dot netshell|" \
-e "s|@BGL_DOTNET_ASM@|$dotne tasm|" \
-e "s|@BGL_IMPORT@|extern|" \
-e "s|@BGL_EXPORTED_DECL@|ext ern|" \
-e "s|@BGL_EXPORTED_DEF@||" \
-e "s|@BGL_RUNTIME_DECL@|exte rn|" \
-e "s|@BGL_RUNTIME_DEF@||" \
-e "s|@OS_CLASS@|$osclass|" \
-e "s|@OS_NAME@|$osname|" \
-e "s|@OS_ARCH@|$osarch|" \
-e "s|@OS_VERSION@|$osversion |" \
-e "s|@OS_TMP@|$ostmp|" \
-e "s|@FILE_SEPARATOR@|$files eparator|" \
-e "s|@PATH_SEPARATOR@|$paths eparator|" \
-e "s|@STATIC_LIB_SUFFIX@|$st aticlibsuf |" \
-e "s|@SHARED_LIB_SUFFIX@|$sh aredsuffix |" \
-e "s|@UCS2_DISPLAYABLE@|$ucs 2displayab le|" \
-e "s|@GC_HAVE_BLOCKING@|$gch aveblockin g|" \
-e "s|@PTHREAD_HAVE_TIMEDLOCK @|$pthread timedlock| " \
> $p
fi
done
# bigloo_h, bigloo_gc_h
for p in $bigloo_h $bigloo_gc_h; do
if [ "$p " != " " ]; then
cp runtime/Include/`basename $p` $p
fi
done
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* bigloo_config.el */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $action = "all" -o $action = "bigloo_config_el" ]; then
# Tell what we are doning
echo "Configuring $bigloo_config_el:"
rm -f $bigloo_config_el 2> /dev/null
echo ";; Automatically generated file (don't edit) */" > $bigloo_config_el
echo ";; `date`" >> $bigloo_config_el
echo "" >> $bigloo_config_el
echo "(provide 'bmacs-config)" >> $bigloo_config_el
echo "(defvar bmacs-docdir \"$docdir\")" >> $bigloo_config_el
echo "(defvar bmacs-lispdir \"$emacslisppath\")" >> $bigloo_config_el
echo ""
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Makefile.config */
#* -------------------------- ---------- ---------- ---------- ----- */
#* This part of the configure script produces the file */
#* Makefile.config. This file contains machine dependant */
#* informations and location where Bigloo is to be installed. */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ $action = "all" -o $action = "Makefile.config" ]; then
# Tell what we are doning
echo "Configuring $makefile_cfg":
# We create an unexisting temporary file name
name=$tmp/foo
while( test -f "$name.s" -o -f "$name.o" ); do
name="$name"x;
done
# We first cleanup the file
rm -f $makefile_cfg 2> /dev/null
echo "# automatically generated, don't edit" > $makefile_cfg
echo "# `date`" >> $makefile_cfg
echo "" >> $makefile_cfg
# The Bigloo release number
echo "RELEASE=$release" >> $makefile_cfg
echo >> $makefile_cfg
# The tools
echo "AFILE_EXE=$afile" >> $makefile_cfg
echo "JFILE_EXE=$jfile" >> $makefile_cfg
echo "BTAGS_EXE=$btags" >> $makefile_cfg
echo "BDEPEND_EXE=$bdepend" >> $makefile_cfg
echo "BMAKE_EXE=$bmake" >> $makefile_cfg
echo "BPP_EXE=$bpp" >> $makefile_cfg
echo "BPROF_EXE=$bprof" >> $makefile_cfg
echo "MCO_EXE=$mco" >> $makefile_cfg
echo "JAS_EXE=$jas" >> $makefile_cfg
echo "BMEM_EXE=$bmem" >> $makefile_cfg
echo "BMEMRUN_EXE=$bmemrun" >> $makefile_cfg
echo "BDB_EXE=$bdb" >> $makefile_cfg
echo >> $makefile_cfg
# The OS
echo "POSIXOS=$posixos" >> $makefile_cfg
echo >> $makefile_cfg
# The rm command
echo "RM=/bin/rm" >> $makefile_cfg
echo >> $makefile_cfg
# The bee support
echo "INSTALLBEE=$bee" >> $makefile_cfg
echo >> $makefile_cfg
# The Boot directory
echo "BOOTDIR=$bootdir" >> $makefile_cfg
echo "BOOTBINDIR=$bootdir/bin" >> $makefile_cfg
echo "BOOTLIBDIR=$bootdir/lib/$ release" >> $makefile_cfg
echo >> $makefile_cfg
# Directories
echo "DESTDIR=" >> $makefile_cfg
echo "BINDIR=$bindir" >> $makefile_cfg
echo 'LIBDIR=$(DESTDIR)'"$libdi r" >> $makefile_cfg
echo 'GCDIR=$gclibdir' >> $makefile_cfg
echo "FILDIR=$fildir" >> $makefile_cfg
echo 'ZIPDIR=$(DESTDIR)'"$zipdi r" >> $makefile_cfg
echo 'SYSZIPDIR=$(DESTDIR)'"$sy szipdir" >> $makefile_cfg
echo 'DLLDIR=$(DESTDIR)'"$dlldi r" >> $makefile_cfg
echo 'SYSDLLDIR=$(DESTDIR)'"$sy sdlldir" >> $makefile_cfg
echo 'MANDIR=$(DESTDIR)'"$mandi r" >> $makefile_cfg
echo 'INFODIR=$(DESTDIR)'"$info dir" >> $makefile_cfg
echo 'DOCDIR=$(DESTDIR)'"$docdi r" >> $makefile_cfg
echo "TMP=$tmp" >> $makefile_cfg
echo >> $makefile_cfg
# Native backend
echo "NATIVEBACKEND=$nativeback end" >> $makefile_cfg
# The basename
echo "LIBRARYNAME=$libraryname" >> $makefile_cfg
echo >> $makefile_cfg
# The C compiler
echo "CC=$cc" >> $makefile_cfg
echo "CFLAGS=$coflags $cflags" >> $makefile_cfg
echo "CSTRIPFLAGS=$csflags" >> $makefile_cfg
echo "CPICFLAGS=$cpicflags" >> $makefile_cfg
echo "CFLAGS_P=$""(CFLAGS) $cpflags" >> $makefile_cfg
echo "CGCFLAGS=$cgcflags $cgcfinalflags $gcspecial" >> $makefile_cfg
echo "EXTRALIBS=$extralibs" >> $makefile_cfg
echo "EXTRAGCLIBS=$extragclibs" >> $makefile_cfg
echo "CLOSELIBS= # always empty, does not contain GC, override by makefiles" >> $makefile_cfg
echo >> $makefile_cfg
# The GC library
echo " GC dir: $gcincdir"
echo "GCLIB=$gclib" >> $makefile_cfg
if [ $customgc = "yes" ]; then
echo "GCCUSTOM=yes" >> $makefile_cfg
echo 'GCDIR=$(BOOTDIR)/gc-boehm ' >> $makefile_cfg
echo 'GCINCLUDE=-I$(GCDIR) -I$(GCDIR)/include -I$(GCDIR)/include/private ' >> $makefile_cfg
echo "GCCLOSELIB=-lbigloogc-""$ ""(RELEASE )" >> $makefile_cfg
echo "C_GCSTD=" >> $makefile_cfg
else
echo "GCCUSTOM=no" >> $makefile_cfg
echo "GCDIR=$gcincdir" >> $makefile_cfg
echo 'GCINCLUDE=-I$(GCDIR) -I$(GCDIR)/private' >> $makefile_cfg
echo "GCCLOSELIB=-l""$""(GCLIB) " >> $makefile_cfg
echo "C_GCSTD=Clib/inline-alloc .c" >> $makefile_cfg
echo "GCLIBDIR=$gclibdir" >> $makefile_cfg
fi
echo >> $makefile_cfg
# additional bigloo compiler link flags (some architecture such as AIX
# require a special to link huge executable)
lflags=`$autoconfdir/ldext raopt --user=$user --tmp=$tmp --cc="$cc" --posixos="$posixos --lflags=$lflags"`
echo "EXTRA_LD_OPT=$lflags" >> $makefile_cfg
if [ $sharedcompiler = "yes" ]; then
echo "SHRD_COMP=yes" >> $makefile_cfg;
else
echo "SHRD_COMP=no" >> $makefile_cfg;
fi
if [ $sharedbde = "yes" ]; then
echo "SHRD_BDE_OPT=" >> $makefile_cfg;
else
echo "SHRD_BDE_OPT=-static-bigl oo" >> $makefile_cfg;
fi
# Executable suffix
echo "EXE_SUFFIX=$exe" >> $makefile_cfg;
# The assembler
echo " checking $as"
as=`$autoconfdir/ascpp --user=$user --tmp=$tmp -as="$as" -cc="$cc" --name=$name`
if [ $? != "0" ]; then
echo "*** ERROR:configure:as. Aborting";
exit 1;
fi
if [ "$as " = " " ]; then
echo "*** ERROR:configure:$as:can't find as that invokes cpp,";
echo "set as variable."
rm -f $name.s $name.o
exit 1;
else
echo "AS=$as" >> $makefile_cfg
fi
echo >> $makefile_cfg
# Ar checking
echo " checking $ar $arflags"
(cd $tmp;
compile="$ar $arflags $name.a $name.o > /dev/null 2> /dev/null";
if eval $compile; then
/bin/rm -f $name.s $name.o $name.a
else
arflags="-q -c";
compile="$ar $arflags $name.a $name.o > /dev/null 2> /dev/null";
if eval $compile; then
/bin/rm -f $name.s $name.o $name.a
else
echo "*** ERROR:configure:ar:Can't automatically setup ar flags";
echo "Please, set ar flags up inside ./configure";
/bin/rm -f $name.s $name.o $name.a;
exit 1
fi
fi) || exit $*
echo "AR=$ar" >> $makefile_cfg
echo "ARFLAGS=$arflags" >> $makefile_cfg
# Does the system require ranlib?
if( test `$autoconfdir/ranlib --user=$user --tmp=$tmp --cc="$cc"` = "0" ); then
echo " ranlib: no"
echo "RANLIB=true" >> $makefile_cfg
else
echo " ranlib: yes"
echo "RANLIB=ranlib" >> $makefile_cfg
fi
# The shared libraries
if [ "$ldopt" = "no-share" ]; then
echo "SHAREDLIBRARYSUPPORT=no" >> $makefile_cfg
echo "LD=true# (true means no dynamic library)" >> $makefile_cfg
echo "LDPRELOADSUPPORT=no" >> $makefile_cfg
echo "LDSONAME=" >> $makefile_cfg
else
echo "SHAREDLIBRARYSUPPORT=yes" >> $makefile_cfg
echo "SHAREDLIBRARYCLOSED=$shar edlibraryc losed" >> $makefile_cfg
echo "LD=$ld $ldopt" >> $makefile_cfg
echo "LDFLAGS=$ldflags" >> $makefile_cfg
echo "LDLIBS=$ldlibs" >> $makefile_cfg
echo "LDCOMPLIBS=$ldcomplibs" >> $makefile_cfg
echo "LDPRELOADSUPPORT=$ldprelo ad" >> $makefile_cfg
# shared link additional soname option
ldsoname=`$autoconfdir/lds oname --user=$user --tmp=$tmp $libdir --cc="$cc" --ld="$ld" --posixos="$posixos" --soname="$ldsoname"`
echo "LDSONAME=$ldsoname" >> $makefile_cfg
fi
echo >> $makefile_cfg
# The suffix of shared library
echo "SHAREDSUFFIX=$sharedsuffi x" >> $makefile_cfg
echo >> $makefile_cfg
# The dlopen facility
if [ "$dlopen" != "0" ]; then
echo "DLOPENSUPPORT=yes" >> $makefile_cfg
else
echo "DLOPENSUPPORT=no" >> $makefile_cfg
fi
echo >> $makefile_cfg
# Does the system supports threads
echo " gcthread: $gcthread"
if [ "$gcthread" != "no" ]; then
echo "CGCTHREADFLAGS=$gcthread" >> $makefile_cfg
else
echo "CGCTHREADFLAGS=" >> $makefile_cfg
fi
# find out the C library for posix threads
echo " pthreadlibs: $pthreadlibs"
echo "PTHREADLIBS=$pthreadlibs" >> $makefile_cfg
# Patch the code of the thread when using non custom GC
if [ "$pthreadlibs" != "no" ]; then
# the default gc on mingw is built with thread support.
# there is no need to link with a special version of gc library
if [ $customgc != "yes" ]; then
gclibth=$stdgclib
else
if [ "$posixos" = "mingw" ]; then
gclibth=bigloogc
else
gclibth=bigloogc_fth
fi
fi
cat api/fthread/src/Misc/fthre ad.init.in \
| sed -e "s|@BIGLOOGC_FTH@|$gclibth |g" \
| sed -e "s|@PTHREADLIBS@|$pthreadl ibs|g" \
> lib/$release/fthread.init
cat api/pthread/src/Misc/pthre ad.init.in \
| sed -e "s|@BIGLOOGC_PTH@|$gclibth |g" \
| sed -e "s|@PTHREADLIBS@|$pthreadl ibs|g" \
> lib/$release/pthread.init
else
napis=;
for a in $apis; do
if [ "pthread" != "$a" -a "fthread" != "$a" ]; then
napis="$a $napis";
fi
done
apis=$napis;
if [ "$pthreadtimedlock" = "1" ]; then
echo " pthread_mutex_timedlock: yes"
else
echo " pthread_mutex_timedlock: no"
fi
fi
# SSL
echo " openssllibs: $openssllibs"
# Patch the code of the SSL
if [ "$openssllibs" != "no" ]; then
echo "OPENSSLLIBS=$openssllibs" >> $makefile_cfg
echo ";; automatically generated. Don't edit" > lib/$release/ssl.init
cat api/ssl/src/Misc/ssl.init. in \
| sed -e "s|@OPENSSLLIBS@|$openssll ibs|g" \
>> lib/$release/ssl.init
dtls=1
if [ "$openssldtls" == "no" ]; then
dtls=0;
fi
echo "/* automatically generated, Don't edit" > api/ssl/src/C/bglssl.h
cat api/ssl/src/C/bglssl.h.in | sed -e "s|@HAVEDTLS@|$dtls|g" \
>> api/ssl/src/C/bglssl.h
else
napis=;
for a in $apis; do
if [ "ssl" != $a ]; then
napis="$a $napis";
fi
done
apis=$napis;
echo "OPENSSLLIBS=" >> $makefile_cfg
fi
# SQLITE
echo " sqlitelibs: $sqlitelibs"
echo "SQLITELIBS=$sqlitelibs" >> $makefile_cfg
# Patch the code of the SQLITE
if [ "$sqlitelibs" != "no" ]; then
echo ";; automatically generated. Don't edit" > lib/$release/sqlite.init
cat api/sqlite/src/Misc/sqlite .init.in \
| sed -e "s|@SQLITELIBS@|$sqlitelib s|g" \
>> lib/$release/sqlite.init
fi
# Does the system supports strip
if( `$autoconfdir/strip --strip=$strip --user=$user --tmp=$tmp --cc="$cc"` ); then
echo " strip: $strip"
echo "STRIP=$strip" >> $makefile_cfg
echo "" >> $makefile_cfg
else
echo " strip: no"
echo "STRIP=true" >> $makefile_cfg
echo "" >> $makefile_cfg
fi
# Display emacs
echo " emacs: $emacsversion"
echo " emacslisppath: $emacslisppath"
echo "EMACS=$emacs" >> $makefile_cfg
echo "EMACSDIR=$emacslisppath" >> $makefile_cfg
echo "EMACSBRAND=$emacsversion" >> $makefile_cfg
echo "EWARN=$emacswarning" >> $makefile_cfg
echo >> $makefile_cfg
# bmask
echo "BMASK=$bmask" >> $makefile_cfg
echo >> $makefile_cfg
# The info version
if [ "$configureinfo" = "yes" ]; then
infoinfo=`$autoconfdir/inf o --user=$user \
--tmp=$tmp \
--makeinfo="$makeinfo" \
--texi2dvi="$texi2dvi" \
--texi2dviopt="$texi2dviop t" \
--texi2pdf="$texi2pdf" \
--texi2html="$texi2html" \
--texi2htmlopt="$texi2html opt"`
if [ "$?" = "0" ]; then
for p in $infoinfo; do
case $p in
"")
break;;
makeinfover=*)
makeinfover="`echo $p | sed 's/^[-a-z_.]*=//'`";;
texi2dvi=*)
texi2dvi="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2dviopt=*)
texi2dviopt="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2pdf=*)
texi2pdf="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2html=*)
texi2html="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2htmlopt=*)
texi2htmlopt="`echo $p | sed 's/^[^=]*=//'`";;
esac
done
if [ "$makeinfover" = "old" ]; then
makeinfoopt="-D oldinfo"
fi
echo "MAKEINFO=$makeinfo" >> $makefile_cfg
echo "MAKEINFOOPT=$makeinfoopt" >> $makefile_cfg
echo "TEXI2DVI=$texi2dvi" >> $makefile_cfg
echo "TEXI2DVIOPT=$texi2dviopt" >> $makefile_cfg
echo "TEXI2HTML=$texi2html" >> $makefile_cfg
echo "TEXI2HTMLOPT=$texi2htmlop t" >> $makefile_cfg
echo "TEXI2PDF=$texi2pdf" >> $makefile_cfg
else
echo " makeinfo: no"
makeinfo=no
makeinfoopt=
texi2dvi=
texi2dviopt=
texi2html=
texi2htmlopt=
texi2pdf=
echo "MAKEINFO=" >> $makefile_cfg
fi
fi
# The info installation
echo " checking install-info"
if [ "$iinfo " = " " ]; then
installinfo=`$autoconfdir/ installinf o --user=$user --tmp=$tmp --cc=$cc --exe=$exe`
else
installinfo=`$autoconfdir/ installinf o --user=$user --tmp=$tmp --cc=$cc --installinfo=$iinfo --exe=$exe`
fi
if [ "installinfo " = " " ]; then
echo " install-info: no"
echo "INSTALLINFO=\"\"" >> $makefile_cfg
else
installinfodir=`$autoconfd ir/install infodir --user=$user --tmp=$tmp --cc=$cc --installinfo=$installinfo --exe=$exe`
echo " install-info: $installinfo"
echo " install-info dir opt: $installinfodir"
echo "INSTALLINFO=$installinfo" >> $makefile_cfg
echo "INSTALLINFODIROPT=$instal linfodir" >> $makefile_cfg
fi
# The java configuration
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
if [ "$jvmbackend" = "yes" ]; then
$autoconfdir/ziptest --zip=$zip --zflags=$zflags --user=$user --tmp=$tmp
if [ $? = 0 ]; then
echo " zip: yes"
else
echo " zip: no"
echo "*** ERROR:configure:Can't configure JVM back-end"
exit 3
fi
$autoconfdir/jartest --jar=$jar --user=$user --tmp=$tmp
if [ $? = 0 ]; then
echo " jar: yes"
else
echo " jar: no"
echo "*** ERROR:configure:Can't configure JVM back-end"
exit 3
fi
if [ "$java_configured" = "no" ]; then
$autoconfdir/javatest --java=$java --jflags=$jflags --jvflags=$jvflags \
--javac=$javac --jcflags=$jcflags --user=$user --tmp=$tmp
if [ $? = 0 ]; then
echo " java: yes"
else
echo " java: no"
echo "*** ERROR:configure:Can't configure JVM back-end"
exit 3
fi
java_configured=yes
fi
else
java_configured=yes
fi
echo "" >> $makefile_cfg
echo "JVMBACKEND=yes" >> $makefile_cfg
echo "JAVA=$java" >> $makefile_cfg
echo "JAVA_VERSION=$java_versio n" >> $makefile_cfg
echo "JFLAGS=$jflags" >> $makefile_cfg
echo "JVFLAGS=$jvflags" >> $makefile_cfg
echo "JAVAC=$javac" >> $makefile_cfg
echo "JCFLAGS=$jcflags" >> $makefile_cfg
echo "ZIP=$zip" >> $makefile_cfg
echo "ZFLAGS=$zflags" >> $makefile_cfg
echo "JAR=$jar" >> $makefile_cfg
echo "JSHELL=$jshell" >> $makefile_cfg
echo "JVMRECETTEBOOTPATH=$jvmre cettebootp ath" >> $makefile_cfg
echo "JVMAPIBOOTPATH=$jvmapiboo tpath" >> $makefile_cfg
# Cygwin prefix
if [ "$posixos" = "cygwin" ]; then
echo "" >> $makefile_cfg
echo CYGWINPREFIX=`echo "$cygwindospath" | sed -e 's/\\\\/\\\\\\\\/g'` >> $makefile_cfg
bigloozip=$bootdir/lib/$re lease
bigloozip=`echo $bigloozip | sed -e 's/\/cygdrive\/\([a-z]\)\/ /\1:\//'` # corrects pathes like /cygdrive/...
bigloozip=`echo $bigloozip | sed -e "s/^\//$cygwindospath\\\\\ \\\\\\\\\\ \/"` # corrects pathes like /usr...
echo "CYGWINJVMPATH=-classpath \".;"`echo $bigloozip | sed -e 's/\//\\\\\\\\/g'`"\\\\big loo_s.zip\ "" >> $makefile_cfg
else
echo "CYGWINJVMPATH=" >> $makefile_cfg
fi
echo "JVMCLASSPATHSEP=\"$cpsep\ "" >> $makefile_cfg
else
echo "" >> $makefile_cfg
echo "JVMBACKEND=no" >> $makefile_cfg
fi
# The dotnet configuration
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
# Dotnet configuration
echo "" >> $makefile_cfg
echo "DOTNETBACKEND=yes" >> $makefile_cfg
echo "DOTNETCSCC=$dotnetcscc" >> $makefile_cfg
echo "DOTNETCSCCSTYLE=$dotnetcs ccstyle" >> $makefile_cfg
echo "DOTNETASM=$dotnetasm" >> $makefile_cfg
echo "DOTNETLD=$dotnetld" >> $makefile_cfg
echo "DOTNETLDSTYLE=$dotnetldst yle" >> $makefile_cfg
echo "DOTNETCLRSTYLE=$dotnetclr style" >> $makefile_cfg
echo "DOTNETCLROPT=$dotnetclrop t" >> $makefile_cfg
echo "DOTNETCLR=$dotnetclr" >> $makefile_cfg
echo "" >> $makefile_cfg
echo "DOTNETFTDLLPATH=-L../../. ./../../li b/$release " >> $makefile_cfg
echo "DOTNETLINKBIGLOODLL=-lbig loo_s-$rel ease.dll" >> $makefile_cfg
else
echo "" >> $makefile_cfg
echo "DOTNETBACKEND=no" >> $makefile_cfg
fi
fi
# Bigloo compilation flags
echo "" >> $makefile_cfg
echo "BFLAGS=$bflags" >> $makefile_cfg
echo "BOOTFLAGS=$bootflags" >> $makefile_cfg
# script extension
echo "" >> $makefile_cfg
case $posixos in
cygwin)
echo "SCRIPTEXTENSION=.bat" >> $makefile_cfg;;
*)
echo "SCRIPTEXTENSION=" >> $makefile_cfg;;
esac
# C Object suffix
echo "C_OBJ_EXTENSION=$cobj" >> $makefile_cfg
echo >> $makefile_cfg
# APIs
echo "APIS=$apis" >> $makefile_cfg
echo >> $makefile_cfg
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Ok, we are done now */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
bcke="native:yes"
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
bcke="$bcke JVM:yes"
else
bcke="$bcke JVM:no"
fi
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
bcke="$bcke .NET:yes"
else
bcke="$bcke .NET:no"
fi
echo >> configure.log
echo >> configure.log
echo "** Configuration summary **" >> configure.log
echo >> configure.log
echo "Release features:" >> configure.log
echo " Bigloo release number................. $release" >> configure.log
echo " Bigloo supported backends............. $bcke" >> configure.log
echo " Bigloo default backend................ $defaultbackend" >> configure.log
if [ $customgc = "yes" ];then
echo " Bigloo gc........................ ..... custom ($gclib-$release)" >> configure.log
else
echo " Bigloo gc........................ ..... standard ($gclib, $stdgcincdir, $gclibdir)" >> configure.log
fi
if [ "$pthreadlibs" = "no" ]; then
echo " support for native threads............ no" >> configure.log
else
echo " support for native threads............ yes" >> configure.log
fi
if [ "$openssllibs" = "no" ]; then
echo " Open SSL support................... ... no" >> configure.log
else
echo " Open SSL support................... ... yes (dtls $openssldtls)" >> configure.log
fi
if [ "$sqlitelibs" = "no" ]; then
echo " Sqlite .......................... ..... no" >> configure.log
else
echo " Sqlite .......................... ..... yes" >> configure.log
fi
if [ "$ldopt" = "no-share" ]; then
echo " support for dynamic libraries......... no" >> configure.log
else
echo " support for dynamic libraries......... yes" >> configure.log
fi
echo " Bee support................... ........ $bee" >> configure.log
echo >> configure.log
echo "Directories where Bigloo will be installed:" >> configure.log
echo " binaries.................. .......... .. $bindir" >> configure.log
echo " libraries................. .......... .. $libdir" >> configure.log
echo " files directory................. ...... $fildir" >> configure.log
echo " standard zip....................... ... $zipdir" >> configure.log
if [ "$syszipdir " != "$zipdir " ]; then
echo " standard zip (os dependent)........... $syszipdir" >> configure.log
fi
echo " standard dll....................... ... $dlldir" >> configure.log
if [ "$sysdlldir " != "$dlldir " ]; then
echo " standard dll (os dependent)........... $sysdlldir" >> configure.log
fi
echo " manual pages..................... ..... $mandir" >> configure.log
echo " info documentation............. ....... $infodir" >> configure.log
echo " lisp files..................... ....... $lispdir" >> configure.log
echo " temporary dir....................... .. $tmp" >> configure.log
echo >> configure.log
echo "Compilers and linkers:" >> configure.log
echo " C compiler used...................... . $cc" >> configure.log
echo " options for compiling................. $cflags" >> configure.log
echo " options for optimizing................ $coflags" >> configure.log
echo " options for stripping................. $csflags" >> configure.log
echo " options for PIC code.................. $cpicflags" >> configure.log
echo " options for profiling................. $cpflags" >> configure.log
echo " options for linking................... $extralibs" >> configure.log
echo " assembly.................. .......... .. $as" >> configure.log
echo " static library builder................ $ar" >> configure.log
echo " shared library builder................ $ld" >> configure.log
echo " options for building static libs...... $arflags" >> configure.log
echo " socket libraries................. ..... $socketlibs" >> configure.log
echo " pthread libraries................. .... $pthreadlibs" >> configure.log
echo " openssl libraries................. .... $openssllibs" >> configure.log
echo " sqlite libraries................. ..... $sqlitelibs" >> configure.log
if [ "$ldopt" != "no-share" ]; then
echo " suffix of shared libraries............ $sharedsuffix" >> configure.log
echo " options for linking with shared libs.. $ldopt" >> configure.log
fi
echo " dynamically linked compiler........... $sharedcompiler" >> configure.log
echo " dynamically linked bde tools.......... $sharedbde" >> configure.log
echo >> configure.log
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
echo "JVM:" >> configure.log
if [ "$posixos" = "cygwin" ]; then
echo " Cygwin dos path...................... . $cygwindospath" >> configure.log
fi
echo " java default shell.................... $jshell" >> configure.log
echo " javac..................... .......... .. $javac" >> configure.log
echo " options for compiling java............ $jcflags" >> configure.log
echo " java...................... .......... .. $java" >> configure.log
echo " options for running java.............. $jflags" >> configure.log
echo " options no byte code verification..... $jvflags" >> configure.log
echo " zip....................... .......... .. $zip" >> configure.log
echo " zip flags..................... ........ $zflags" >> configure.log
echo " jar....................... .......... .. $jar" >> configure.log
fi
echo >> configure.log
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
echo ".NET:" >> configure.log
if [ "$posixos" = "cygwin" ]; then
echo " Cygwin dos path...................... . $cygwindospath" >> configure.log
fi
echo " .NET default shell.................... $dotnetshell" >> configure.log
echo " .NET linker.................... ....... $dotnetld (style=$dotnetldstyle)" >> configure.log
echo " .C# compiler.................. ........ $dotnetcscc (style=$dotnetcsccstyle)" >> configure.log
echo " clr....................... .......... .. $dotnetclr (style=$dotnetclrstyle)" >> configure.log
echo " options to run the clr................ $dotnetclropt" >> configure.log
fi
echo >> configure.log
echo "GC configuration:" >> configure.log
if [ $customgc = "yes" ]; then
echo " options for compiling the collector... $cgcflags $cgcfinalflags $gcspecial" >> configure.log
echo " options for compiling with threads.... $gcthread" >> configure.log
else
echo " pre-installed standard GC............. $gclib" >> configure.log
fi
echo >> configure.log
echo "Emacs configuration:" >> configure.log
echo " emacs..................... .......... .. $emacs" >> configure.log
echo " emacs brand..................... ...... $emacsversion" >> configure.log
if [ $emacsversion = "generic" ]; then
echo " lisp directory................. ....... no support (update emacs)" >> configure.log
else
echo " lisp directory................. ....... $emacslisppath" >> configure.log
fi
echo >> configure.log
echo "Misc configuration:" >> configure.log
echo " mask for installed files.............. $bmask" >> configure.log
echo >> configure.log
echo "System configuration:" >> configure.log
echo " hardware tuning.................... ... $hardtune" >> configure.log
echo " operating system.................... .. $posixos" >> configure.log
echo " default executable name............... $aout" >> configure.log
echo >> configure.log
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Ok, we are done now */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if [ "$summary" = "yes" ]; then
echo
echo
echo "** Configuration summary **"
echo
echo "Release features:"
echo " Bigloo release number................. $release"
echo " Bigloo supported backends............. $bcke"
echo " Bigloo default backend................ $defaultbackend"
echo " Bigloo additional APIs................ $apis"
if [ $customgc = "yes" ];then
echo " Bigloo gc........................ ..... custom ($gclib-$release)"
else
echo " Bigloo gc........................ ..... standard ($gclib, $stdgcincdir)"
fi
echo " Bigloo tuning.................... ..... $mode $tuning"
if [ "$pthreadlibs" = "no" ]; then
echo " support for native threads............ no"
else
echo " support for native threads............ yes"
fi
if [ "$openssllibs" = "no" ]; then
echo " Open SSL support................... ... no"
else
echo " Open SSL support................... ... yes (dtls $openssldtls)"
fi
if [ "$sqlitelibs" = "no" ]; then
echo " Sqlite support ....................... no"
else
echo " Sqlite support................... ..... yes"
fi
if [ "$ldopt" = "no-share" ]; then
echo " support for dynamic libraries......... no"
else
echo " support for dynamic libraries......... yes"
fi
echo " Bee support................... ........ $bee"
echo
echo "Directories where Bigloo will be installed:"
echo " binaries.................. .......... .. $bindir"
echo " libraries................. .......... .. $libdir"
echo " files directory................. ...... $fildir"
echo " standard zip....................... ... $zipdir"
if [ "$syszipdir " != "$zipdir " ]; then
echo " standard zip (os dependent)........... $syszipdir"
fi
echo " standard dll....................... ... $dlldir"
if [ "$sysdlldir " != "$dlldir " ]; then
echo " standard dll (os dependent)........... $sysdlldir"
fi
echo " manual pages..................... ..... $mandir"
echo " info documentation............. ....... $infodir"
echo " lisp files..................... ....... $lispdir"
echo " temporary dir....................... .. $tmp"
echo
echo "Emacs configuration:"
echo " emacs..................... .......... .. $emacs"
echo " emacs brand..................... ...... $emacsversion"
if [ $emacsversion = "generic" ]; then
echo " lisp directory................. ....... no support (update emacs)"
else
echo " lisp directory................. ....... $emacslisppath"
fi
echo
fi
#!/bin/sh
#*========================
#* serrano/prgm/project/biglo
#* --------------------------
#* Author : Manuel Serrano */
#* Creation : Tue Jan 25 16:05:10 1994 */
#* Last change : Mon Dec 18 12:12:58 2006 (serrano) */
#* Copyright : 1994-2006 Manuel Serrano, see LICENSE file */
#* --------------------------
#* The Bigloo configuration file */
#* --------------------------
#* Please, dont talk to me about autoconf. I simply dont want */
#* to hear about it... */
#*========================
#*------------------------
#* Bigloo revision number */
#*------------------------
release=2.9a
#*------------------------
#* User variables */
#*------------------------
#*--- paths --------------------------
prefix=/usr/local
bindir=$prefix/bin
libdir=$prefix/lib
fildir=$libdir/bigloo/$rel
zipdir=$fildir
dlldir=$fildir
mandir=$prefix/man/man1
infodir=$prefix/info
docdir=$prefix/doc/bigloo-
tmpdir=/tmp
lispdir=
bee=partial
tmp=$TMPDIR
if [ "$tmp " = " " ]; then
tmp=/tmp
fi
#*--- C back-end user configure --------------------------
nativebackend=yes # set to "no" not to install the native (C) back-end
ccstyle=gcc
cc=$CC # left blank for default automatic configuration
cflags=$CFLAGS
lflags=
bflags="-O3"
bootflags=""
coflags="-O3"
cstrip="-s"
cpicflags="demanded" # Possible values for cpicflags are:
# - "no" not to use position independent code (recommended)
# - "demanded" auto configuration but with a preference to "no"
# - any legal C compiler option that enable PIC code.
# - blank (uninitalized) for automatic configuration of the
# position independent code compiler option
as=as
ar=ar
arflags=qc
ldstyle=gcc
ldflags=
ld=ld
ldlibs=-lc
ldcomplibs=-lc
strip=strip
longlong= # The C type to represent long long integers
stringsplit="0"
#*--- Java back-end user configuration --------------------------
jvmbackend=no # set to "no" not to install the Jvm back-end
zip=zip
jar="jar cmf"
zflags=
javac=javac
jcflags=-O
java=java
jflags=
jvflags=-noverify
jshell=sh
#*--- .NET back-end user configuration --------------------------
dotnetbackend=no # set to "yes" to install the .NET back-end
dotnetclrstyle=pnet
dotnetcsccstyle=pnet
dotnetldstyle=pnet
dotnetcscc=cscc
dotnetld=cscc
dotnetclr=ilrun
dotnetclropt="-S 4000 -C 256"
dotnetshell=sh
dotnetasm=ilasm
#*--- Misc user configuration --------------------------
shell=/bin/sh
emacs=
makeinfo=makeinfo
makeinfoopt="-U oldinfo"
texi2dvi=texi2dvi
texi2dviopt=-b
texi2html=texi2html
texi2htmlopt="-menu -monolithic -number"
texi2pdf=texi2pdf
iinfo=install-info
dlopenopt=-ldl
dirname=dirname
defaultbackend="native"
aout=""
abat=""
exe=""
cobj=o
specific=""
#*--- socket library (left empty for automatic configuration) ---------*/
socketlibs=
#*--- posix threads library (left blank for autoconfiguration) --------*/
pthreadlibs=
pthreadtimedlock=1
#*--- openssl library (left blank for autoconfiguration) --------------*/
openssllibs=
openssldtls=
#*--- sqlite library (left blank for autoconfiguration) ---------------*/
sqlitelibs=
#*--- gc source directory (left blank for default configuration) ------*/
customgc=yes
# the following two variables are relevant only when using
# standard (i.e. already existing and operational) Boehm's GC
# and when customgc=no
stdgclib=gc
stdgcincdir=/usr/include/g
stdint=
stdlibint=0
#*--- indent --------------------------
indent="indent -npro -bap -bad -nbc -bl -ncdb -nce -nfc1 -ip0 -nlp -npcs -nsc -nsob -cli0.5 -di0 -l80 -d1 -c0 -ts2 -st"
#*--- mask of Bigloo intalled files --------------------------
bmask=755
#*--- ld shared library option --------------------------
# set this variable to `no-share' if you don't want shared library
ldopt=
ldsoname=-soname
sharedsuffix=so
sharedlibraryclosed=no
#*--- should the compiler be dynamically linked? ---------------------*/
# the legal value for that variable is `yes' or `no'
sharedcompiler=no
sharedbde=no
#*--- forced OS --------------------------
posixos=
jvmrecettebootpath=
jvmapibootpath=
macosx=auto
#*--- cygwin specific configuration --------------------------
# The location where cygwin is installed
cygwindospath=
cygwindosjvm="yes"
cygwindosdotnet="yes"
#*--- migw specific configuration --------------------------
mingw="no"
#*--- api --------------------------
apis="fthread pthread ssl sqlite web multimedia mail calendar"
#*------------------------
#* Hacker variables */
#* --------------------------
#* Dont modifiy these variables unless you know what you are */
#* doing. */
#*------------------------
#*--- The basename of the compiler and tools --------------------------
bigloo=bigloo
afile=bglafile
jfile=bgljfile
btags=bgltags
bdepend=bgldepend
bmake=bglmake
bpp=bglpp
bprof=bglprof
mco=bglmco
jas=bgljas
bmem=bglmem
bmemrun=bglmemrun
bdb=bgldb
#*--- libraries --------------------------
libraryname=$bigloo
#--- additional user library used to link bigloo applications ---------*/
extralibs="-lm"
extragclibs="-lc"
#*--- custom GC configuration --------------------------
gcincdir=
gclibdir=
customgclib=bigloogc
gchaveblocking=1
#*------------------------
#* !!! DONT EDIT AFTER THIS LINE !!! */
#*------------------------
action=all
mode=standard
tuning=
makefile_cfg=Makefile.conf
autoconfdir=`dirname $0 2> /dev/null`/autoconf
pwd=`pwd`
bootdir=$pwd
cgcflags=""
cgcfinalflags="-DFINALIZE_
bigloo_h=
bigloo_gc_h=
bigloo_config_h=
bigloo_config_jvm=
bigloo_config_dotnet=
bigloo_config_el=
summary=yes
java_configured=no
dotnet_configured=no
os=posix
gcspecial=
gcthread=
hardtune=
emacswarning=
stacksizerequired=2
configureinfo="no"
dnscache=1
if [ $? != "0" ]; then
autoconfdir="autoconf"
fi
# Argument parsing
while : ; do
case $1 in
"")
break;;
--bootconfig)
bindir=$PWD/bin;
libdir=$PWD/lib;
fildir=$libdir/$release;
zipdir=$fildir;
dlldir=$fildir;
bootdir=$PWD;
mandir=$HOME/house/man
lispdir=$HOME/emacs/site-l
docdir=$PWD/manuals;
sharedcompiler=no;
sharedbde=yes;
infodir=$HOME/house/info;
java=java;
javac=javac;
ld=ld;
cflags="$cflags -Wpointer-arith -Wswitch -Wtrigraphs";
bootflags="-cg";
cpicflags="no";
jvmbackend="force";
dotnetbackend="force";
dotnetclr=mono;
dotnetclropt="";
dotnetcscc=cscc;
dotnetld=cscc;
dotnetasm=ilasm.pnet;
dotnetclrstyle=mono;
dotnetcsccstyle=mono;
dotnetldstyle=mono;
mode=standard;
configureinfo="yes";
bee="full";
havebdb=1;
action="all";;
--bootdir=*)
bootdir="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.h)
action="bigloo_config";;
--bigloo.h=*)
action="bigloo_config";
bigloo_h="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_gc.h=*)
action="bigloo_config";
bigloo_gc_h="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.h=*)
action="bigloo_config";
bigloo_config_h="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.jvm=*)
action="bigloo_config";
bigloo_config_jvm="`echo $1 | sed 's/^[^=]*=//'`";;
--bigloo_config.dotnet=*)
action="bigloo_config";
bigloo_config_dotnet="`ech
--bigloo_config.el=*)
action="bigloo_config_el";
bigloo_config_el="`echo $1 | sed 's/^[^=]*=//'`";;
--Makefile.config)
action="Makefile.config";;
--bindir=*)
bindir="`echo $1 | sed 's/^[^=]*=//'`";;
--libdir=*)
libdir="`echo $1 | sed 's/^[^=]*=//'`";
fildir=$libdir/bigloo/$rel
zipdir=$fildir;
dlldir=$fildir;;
--gcdir=*)
gclibdir="`echo $1 | sed 's/^[^=]*=//'`";;
--fildir=*)
fildir="`echo $1 | sed 's/^[^=]*=//'`";;
--zipdir=*)
zipdir="`echo $1 | sed 's/^[^=]*=//'`";;
--dlldir=*)
dlldir="`echo $1 | sed 's/^[^=]*=//'`";;
--mandir=*)
mandir="`echo $1 | sed 's/^[^=]*=//'`";;
--infodir=*)
infodir="`echo $1 | sed 's/^[^=]*=//'`";;
--docdir=*)
docdir="`echo $1 | sed 's/^[^=]*=//'`";;
--tmpdir=*)
tmpdir="`echo $1 | sed 's/^[^=]*=//'`";;
--tmp=*)
tmp="`echo $1 | sed 's/^[^=]*=//'`";;
--emacs=*)
emacs="`echo $1 | sed 's/^[^=]*=//'`";;
--xemacs=*)
emacs="`echo $1 | sed 's/^[^=]*=//'`";;
--indent=*)
indent="`echo $1 | sed 's/^[^=]*=//'`";;
--dirname=*)
dirname="`echo $1 | sed 's/^[^=]*=//'`";;
--lispdir=*)
lispdir="`echo $1 | sed 's/^[^=]*=//'`";;
--prefix=*)
prefix="`echo $1 | sed 's/^[^=]*=//'`";
bindir=$prefix/bin;
libdir=$prefix/lib;
fildir=$libdir/bigloo/$rel
zipdir=$fildir;
dlldir=$fildir;
mandir=$prefix/man/man1;
infodir=$prefix/info;
docdir=$prefix/doc/bigloo-
--cc=*)
cc="`echo $1 | sed 's/^[^=]*=//'`";;
--as=*)
as="`echo $1 | sed 's/^[^=]*=//'`";;
--ld=*)
ld="`echo $1 | sed 's/^[^=]*=//'`";;
--cflags=*)
cflags="`echo $1 | sed 's/^[^=]*=//'`";;
--lflags=*)
lflags="`echo $1 | sed 's/^[^=]*=//'`";;
--coflags=*)
coflags="`echo $1 | sed 's/^[^=]*=//'`";;
--ldlibs=*)
ldlibs="`echo $1 | sed 's/^[^=]*=//'`";;
--ldcomplibs=*)
ldcomplibs="`echo $1 | sed 's/^[^=]*=//'`";;
--ldflags=*)
ldflags="`echo $1 | sed 's/^[^=]*=//'`";;
--stringsplit=*)
stringsplit="`echo $1 | sed 's/^[^=]*=//'`";;
--native=*)
nativebackend="`echo $1 | sed 's/^[^=]*=//'`";;
--sharedcompiler=*)
sharedcompiler="`echo $1 | sed 's/^[^=]*=//'`";;
--sharedbde=*)
sharedbde="`echo $1 | sed 's/^[^=]*=//'`";;
--bee=partial)
bee="partial";;
--bee=full)
bee="full";;
--a.out=*)
aout="`echo $1 | sed 's/^[^=]*=//'`";;
--a.bat=*)
abat="`echo $1 | sed 's/^[^=]*=//'`";;
--jvm=*)
jvmbackend="`echo $1 | sed 's/^[^=]*=//'`";;
--java=*)
java="`echo $1 | sed 's/^[^=]*=//'`";;
--javac=*)
javac="`echo $1 | sed 's/^[^=]*=//'`";;
--javaprefix=*)
java="`echo $1 | sed 's/^[^=]*=//'`"/java;
javac="`echo $1 | sed 's/^[^=]*=//'`"/javac;
jar="`echo $1 | sed 's/^[^=]*=//'`/jar cmf";;
--javashell=sh)
jshell="sh";;
--javashell=msdos)
jshell="msdos";;
--native-default-backend)
defaultbackend="native";;
--jvm-default-backend)
defaultbackend="jvm";;
--dotnet=*)
dotnetbackend="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetld=*)
dotnetld="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetldlibopt=*)
dotnetldlibopt="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetldlibdiropt=*)
dotnetldlibdiropt="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetclr=*)
dotnetclr="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetclropt=*)
dotnetclropt="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetshell=sh)
jshell="sh";;
--dotnetshell=msdos)
jshell="msdos";;
--dotnetasm=*)
dotnetasm="`echo $1 | sed 's/^[^=]*=//'`";;
--no-share)
ldopt="no-share";;
--no-ldpreload)
ldpreload="no";;
--force-posixos=*)
posixos="`echo $1 | sed 's/^[^=]*=//'`";;
--os-win32)
os="win32";;
--os-macosx)
ld=gcc;
ldopt="";
sharedsuffix="dylib";
ldlibs="-lc -lbigloogc-$release -lbigloo_s-$release -lc";
ldcomplibs="-lc -lbigloogc-$release -lc";
sharedcompiler=yes;
sharedbde=yes;
ldflags="$ldflags -dynamiclib -single_module";;
--no-os-macosx)
macosx=false;;
--cygwin-dos-path=*)
cygwindospath="`echo $1 | sed 's/^[^=]*=//'`";;
--cygwin-dos-jvm=yes)
cygwindosjvm="yes";;
--cygwin-dos-jvm=no)
cygwindosjvm="no";;
--cygwin-dos-dotnet=yes)
cygwindosdotnet="yes";;
--cygwin-dos-dotnet=no)
cygwindosdotnet="no";;
--arch=athlon)
hardtune="athlon";
gcspecial=-DUSE_3DNOW_PREF
--arch=athlon-tbird)
hardtune="athlon-tbird";
gcspecial=-DUSE_3DNOW_PREF
--arch=athlon-xp)
hardtune="athlon-xp";
gcspecial=-DUSE_3DNOW_PREF
--arch=athlon-mp)
hardtune="athlon-mp";
gcspecial=-DUSE_3DNOW_PREF
--arch=k6-2)
hardtune="k6-2";
gcspecial=-DUSE_3DNOW_PREF
--arch=k6-3)
hardtune="k6-3";
gcspecial=-DUSE_3DNOW_PREF
--arch=pentium3)
hardtune="pentium3";
gcspecial=-DUSE_I686_PREFE
--arch=pentium4)
hardtune="pentium4";
gcspecial=-DUSE_I686_PREFE
--arch=i586)
hardtune="i586";;
--arch=i686)
hardtune="i686";;
--no-summary)
summary=no;;
--icc)
cc=icc;
as=icc;
ldopt="no-share";
coflags="$coflags -O3 -ip";
extralibs="";
cstrip="no";;
--pnet)
dotnetclrstyle=pnet;
dotnetcsccstyle=pnet;
dotnetldstyle=pnet;
dotnetclr=ilrun;
dotnetclropt="-S 4000 -C 256";
dotnetcscc=cscc;
dotnetld=cscc;
dotnetasm=ilasm;;
--mono)
dotnetclrstyle=mono;
dotnetcsccstyle=mono;
dotnetldstyle=mono;
dotnetclr=mono;
dotnetclropt="";
dotnetcscc=cscc;
dotnetld=cscc;
dotnetasm=ilasm;;
--dotnetldstyle=*)
dotnetldstyle="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetcsccstyle=*)
dotnetcsccstyle="`echo $1 | sed 's/^[^=]*=//'`";;
--dotnetclrstyle=*)
dotnetclrstyle="`echo $1 | sed 's/^[^=]*=//'`";;
--customgc=yes)
customgc=yes;;
--customgc=no)
customgc=no;;
--finalization=yes)
cgcfinalflags=;;
--finalization=no)
cgcfinalflags=-DFINALIZE_O
--stack-check=no)
stacksizerequired=0;;
--benchmark=no)
mode=standard;;
--benchmark=yes)
mode=benchmark;;
--cpicflags=*)
cpicflags="`echo $1 | sed 's/^[^=]*=//'`";;
--configureinfo=no)
configureinfo="no";;
--configureinfo=yes)
configureinfo="yes";;
--mingw=yes)
mingw="yes";;
--enable-*)
api="`echo $1 | sed 's/--[^-]*-//'`";
apis="$api $apis";;
--disable-*)
api="`echo $1 | sed 's/--[^-]*-//'`";
napis=;
for a in $apis; do
if [ $a != $api ]; then
napis="$a $napis";
fi
done
apis=$napis;;
-*)
if [ "$1" != "-h" -a "$1" != "-help" -a "$1" != "--help" ]; then
echo "*** ERROR: Illegal option \"$1\""
echo ""
echo ""
echo "Usage: configure [options]" >&2;
echo "" >&2;
fi
# Existing apis
eapis=
(cd $bootdir/api;
for p in *; do
if [ -d $p ]; then
if [ "$eapis " = " " ]; then
eapis="$p";
else
eapis="$eapis|$p";
fi
fi
done)
echo "Bigloo compiler:" >&2;
echo " --native=yes|no [default yes]" >&2;
echo " --jvm=yes|no|force [default no]" >&2;
echo " --dotnet=yes|no|force [default no]" >&2;
echo " --customgc=yes|no [default yes]" >&2;
echo " --bee=partial|full [default partial]" >&2;
echo "" >&2;
echo "API:" >&2;
echo " --enable-[$eapis]" >&2;
echo " --disable-[$eapis]" >&2;
echo "" >&2;
echo "Path:" >&2;
echo " --prefix=dir (sets bin, lib, zip, man, info and doc dirs)" >&2;
echo " --bindir=file" >&2;
echo " --libdir=file" >&2;
echo " --gcdir=dir (directory for non custom gc library)" >&2;
echo " --fildir=file" >&2;
echo " --zipdir=file" >&2;
echo " --dlldir=file" >&2;
echo " --mandir=file" >&2;
echo " --infodir=file" >&2;
echo " --docdir=file" >&2;
echo " --tmpdir=file (Bigloo tmp dir)" >&2;
echo " --tmp=file (Installation tmp dir)" >&2;
echo " --lispdir=file" >&2;
echo "" >&2;
echo "Tools and compilers:" >&2;
echo " --cc=comp [default gcc]" >&2;
echo " --ld=comp [default gcc]" >&2;
echo " --as=asm" >&2;
echo " --cflags=compilation flags" >&2;
echo " --lflags=compiler link flags" >&2;
echo " --coflags=optimization_fla
echo " --cpicflags=pic_flags" >&2;
echo " --ldlibs=ld_libs" >&2;
echo " --ldcomplibs=ld_compiler_l
echo " --ldflags=ld_flags" >&2;
echo " --emacs=file" >&2;
echo " --xemacs=file (deprecated, use \"--emacs\" option)" >&2;
echo " --indent=file" >&2;
echo " --icc (configure for icc)" >&2;
echo "" >&2;
echo "Host configuration:" >&2;
echo " --arch=[i586|i686|athlon|a
echo " --a.out=file" >&2;
echo " --a.bat=file" >&2;
echo " --dirname=file-or-command"
echo " --force-posixos=operating-
echo " --os-win32" >&2;
echo " --os-macosx (tune for MacOSX)" >&2;
echo " --no-os-macosx (disable MacOSX auto configuration)" >&2;
echo " --cygwin-dos-path=[dos path]" >&2;
echo " --cygwin-dos-jvm=yes|no [default yes]" >&2;
echo " --no-share (disable shared libraries support)" >&2;
echo " --no-ldpreload" >&2;
echo " --sharedbde=yes|no [default no] (link Bde tools against shared libraries)" >&2;
echo " --sharedcompiler=yes|no [default no] (link Bigloo against shared libraries)" >&2;
echo "" >&2;
echo "JVM configuration:" >&2;
echo " --java=file" >&2;
echo " --javac=file" >&2;
echo " --javaprefix=dir" >&2;
echo " --javashell=shell [should be sh or msdos (default sh)]" >&2;
echo " --native-default-backend" >&2;
echo " --jvm-default-backend" >&2;
echo "" >&2;
echo ".NET configuration:" >&2;
echo " --pnet (configure for GNU pnet)" >&2;
echo " --mono (configure for Ximian Mono)" >&2;
echo " --dotnetldstyle=style [should be pnet, mono]" >&2;
echo " --dotnetcsccstyle=style [should be pnet, mono]" >&2;
echo " --dotnetclrstyle=style [should be pnet, mono]" >&2;
echo " --dotnetcscc=file" >&2;
echo " --dotnetld=file" >&2;
echo " --dotnetclr=file" >&2;
echo " --dotnetclropt=options" >&2;
echo " --dotnetshell=shell [should be sh or msdos (default sh)]" >&2;
echo " --dotnetasm=asm [optional]" >&2;
echo "" >&2;
echo "Misc:" >&2;
echo " --finalization=yes|no [default no]" >&2;
echo " --benchmark=yes|no [default no] (must use --arch too)" >&2;
echo " --stack-check=no" >&2;
echo "" >&2;
echo "Configuration settings:" >&2;
echo " --bigloo.h[=file]" >&2;
echo " --bigloo_gc.h[=file]" >&2;
echo " --bigloo_config.h[=file]" >&2;
echo " --bigloo_config.jvm[=file]
echo " --Makefile.config=file" >&2;
echo " --no-summary" >&2;
echo " --bootconfig" >&2;
echo " --bootdir=dir" >&2;
echo " --configureinfo=yes|no [default no]" >&2;
exit 3;
esac
shift
done
# The bigloo.h file
if [ "$bigloo_h " = " " ]; then
bigloo_h=lib/$release/bigl
fi
# The bigloo_gc.h file
if [ "$bigloo_gc_h " = " " ]; then
bigloo_gc_h=lib/$release/b
fi
# The bigloo_config.h file
if [ "$bigloo_config_h " = " " ]; then
bigloo_config_h=lib/$relea
fi
# The bigloo_config.jvm file
if [ "$bigloo_config_jvm " = " " ]; then
bigloo_config_jvm=runtime/
fi
# The bigloo_config.dotnet file
if [ "$bigloo_config_dotnet " = " " ]; then
bigloo_config_dotnet=runti
fi
# The bigloo_bmacs.el file
if [ "$bigloo_config_el " = " " ]; then
bigloo_config_el=bmacs/bma
fi
# The gc directory
if [ "$gcincdir " = " " ]; then
gcincdir=../gc-boehm
fi
# Start configuring
if [ "$summary" = "yes" ]; then
echo "** Configure **"
echo
fi
# Cleaning
/bin/rm -f configure.log
#*------------------------
#* Testing the Posix OS */
#*------------------------
if [ "$posixos " = " " ]; then
posixos=`$autoconfdir/os`
fi
# Setting the default a.out production according to the OS
if [ "$aout " = " " ]; then
case $posixos in
cygwin|mingw)
aout=a.exe;;
*)
aout=a.out;;
esac
fi
if [ "$abat " = " " ]; then
case $posixos in
cygwin|mingw)
abat=a.bat;;
*)
abat=a.out;;
esac
fi
if [ $posixos = "cygwin" ]; then
exe=".exe";
jshell="msdos";
if [ "$cygwindospath " = " " ]; then
cygwindospath=`$autoconfdi
fi
if [ "$cygwindospath " = " " ]; then
echo "*** ERROR:Can't find out where cygwin is installed."
echo "Run configure with the --cygwin-dos-path option."
exit 1
else
cygwindospath=`echo "$cygwindospath" | sed -e 's|/$||g'`
if [ ! -d $cygwindospath ]; then
echo "*** WARNING:Can't find cygwindospath \"$cygwindospath\""
fi
cygwindospath=`echo "$cygwindospath" | sed -e 's/\\\\/\\\\\\\\/g'`
zipdir=`echo $zipdir | sed -e 's/\/cygdrive\/\([a-z]\)\/
zipdir=`echo $zipdir | sed -e "s/^\//$cygwindospath\\\\\
zipdir=`echo $zipdir | sed -e 's/\//\\\\\\\\/g'`
zipdir=`echo $zipdir | sed -e 's/\([^\\\\]\)\\\\\([^\\\\
syszipdir=$zipdir
syszipdirstr=`echo $syszipdir | sed -e 's|\\\\|\\\\\\\\|g'`
dlldir=`echo $dlldir | sed -e 's/\/cygdrive\/\([a-z]\)\/
dlldir=`echo $dlldir | sed -e "s/^\//$cygwindospath\\\\\
dlldir=`echo $dlldir | sed -e 's/\//\\\\\\\\/g'`
dlldir=`echo $dlldir | sed -e 's/\([^\\\\]\)\\\\\([^\\\\
sysdlldir=$dlldir
sysdlldirstr=`echo $sysdlldir | sed -e 's|\\\\|\\\\\\\\|g'`
fi
elif [ "$posixos" = "mingw" ]; then
exe=".exe"
os="win32"
ld="gcc"
ldlibs=""
ldcomplibs=""
ldflags="$ldflags -Wl,--enable-runtime-pseud
havedlopen=1
dlopen=""
cflags="$cflags -mthreads -D_MINGW_VER"
sharedsuffix="dll"
sharedlibraryclosed=yes
extralibs="$extralibs -Wl,--stack,8000000"
extragclibs=""
else
syszipdir=$zipdir
syszipdirstr=$zipdir
sysdlldir=$dlldir
sysdlldirstr=$dlldir
fi
#*------------------------
#* MacOSX autodetection */
#*------------------------
if [ "$macosx " = "auto " ]; then
autoconf/macosx --cc="$cc" --posixos="$posixos"
macosx=$?
if [ "$macosx" = "0" ]; then
if [ "$ld" = "ld" \
-a "$ldopt " = " " \
-a "$sharedsuffix" = "so" \
-a "$ldlibs" = "-lc" \
-a "$ldflags " = " " ]; then
echo "MacOS X tuning enabled";
ld=gcc;
ldopt="";
sharedsuffix="dylib";
ldlibs="-lc -lbigloogc-$release -lbigloo_s-$release -lc";
ldcomplibs="-lc -lbigloogc-$release -lc";
sharedcompiler=yes;
sharedbde=yes;
ldflags="$ldflags -dynamiclib -single_module";
tuning="MacOS X"
fi
fi
fi
#*------------------------
#* cgcflags */
#*------------------------
cgcflags=`$autoconfdir/gcf
#*------------------------
#* Emacs configuration */
#*------------------------
if [ "$emacs " = " " ]; then
emacs=emacs
emacsversion=`$autoconfdir
if [ "$emacsversion" = "false" ]; then
emacs=xemacs
emacsversion=`$autoconfdir
fi
else
emacsversion=`$autoconfdir
fi
if [ "$emacsversion" != "false" ]; then
if [ "$lispdir " = " " ]; then
emacslisppath=`$autoconfdi
else
emacslisppath=`$autoconfdi
fi
if [ "$emacslisppath" = "" ]; then
emacsversion="false";
fi
else
emacslisppath=""
fi
#*------------------------
#* If the operating system is win32 we have to turn the / into \ in */
#* path names */
#*------------------------
if [ $os = "win32" ]; then
if [ "$posixos" != "mingw" ]; then
bindir=`echo $bindir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
libdir=`echo $libdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
fildir=`echo $fildir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
zipdir=`echo $zipdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
dlldir=`echo $dlldir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
mandir=`echo $mandir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
infodir=`echo $infodir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
docdir=`echo $docdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
lispdir=`echo $lispdir | sed -e 's/\//\\\\\\\\/g' | sed -e 's/[.]//g'`
fi
fi
#*------------------------
#* We don't support shared libraries on cygwin yet. */
#*------------------------
if [ $posixos = "cygwin" ]; then
jvmrecettebootpath="-class
jvmapibootpath="-classpath
gchaveblocking=0
ldopt="no-share"
if [ "$cygwindosjvm" = "yes" ]; then
jshell="msdos"
fi
if [ "$cygwindosdotnet" = "yes" ]; then
dotnetshell="msdos"
fi
elif [ $posixos = "mingw" ]; then
ldopt=-shared
gchaveblocking=0
else
jvmrecettebootpath="-class
jvmapibootpath="-classpath
case $dotnetldstyle in
pnet|mono)
;;
*)
echo "*** Don't know how to link .NET application [" $dotnetldstyl "]";
exit 3;;
esac
fi
#*------------------------
#* all action */
#*------------------------
if [ $action = "all" ]; then
if [ ! -d bin ]; then
mkdir bin || exit 3
fi
if [ ! -d lib ]; then
mkdir lib || exit 3
fi
if [ ! -d lib/$release ]; then
mkdir lib/$release || exit 3
fi
fi
#*------------------------
#* Finding a user name */
#*------------------------
user=`$autoconfdir/user --posixos=$posixos`
#*------------------------
#* Testing C compiler */
#*------------------------
if [ "$cc " = " " ]; then
$autoconfdir/cctest --cc="gcc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
$autoconfdir/cctest --cc="cc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
echo "*** ERROR:configure:Can't configure a C compiler. Aborting";
else
cc=cc;
fi
else
cc=gcc
fi
else
$autoconfdir/cctest --cc="$cc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
echo "*** ERROR:configure:the C compiler ($cc) does not seem to work. Aborting";
exit 1;
fi
fi
#*------------------------
#* Benchmark mode */
#*------------------------
if [ "$mode" = "benchmark" ]; then
ccprefix="`echo $cc | sed 's/[0-9]*//g'`" # remove version numbers
case $hardtune in
i586|i686)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mcpu=$hardtune -mpreferred-stack-boundary
fi
gcspecial=-DDONT_ADD_BYTE_
pentium3|pentium4)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mpreferred-stack-boundary
fi
gcspecial="-DUSE_I686_PREF
athlon|athlon-mp|athlon-tb
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mpreferred-stack-boundary
fi
gcspecial="-DUSE_3DNOW_PRE
k6-2|k6-3)
if [ "$ccprefix" = "gcc" ]; then
coflags="$coflags -march=$hardtune -mpreferred-stack-boundary
fi
gcspecial="-DUSE_3DNOW_PRE
esac
fi
#*------------------------
#* Testing stack size */
#*------------------------
if [ $posixos != "cygwin" ]; then
if [ "$posixos" != "mingw" ]; then
if [ ! "$stacksizerequired" = "0" ]; then
$autoconfdir/stacksize --cc="$cc" --user=$user --tmp=$tmp --stacksize=$stacksizerequ
if [ $? != "0" ]; then
echo "*** ERROR:configure:the execution stack is too small.";
echo ""
echo "Bigloo REQUIRES a larger stack (it needs a stack of about $stacksizerequired MB to compile).";
echo "In general, it is possible to adjust the stack size by the means of";
echo "a shell command.";
echo "On most Unix systems, it is frequently called \"ulimit\" or \"unlimit\".";
echo "For instance, with Bash you should try \"ulimit -s 4096\"."
echo "With Zsh, try \"unlimit\"."
echo ""
echo "Another solution, if you know what you are doing,";
echo "is to use the configure option \"--stack-check=no\". This will";
echo "simply, disable stack size checking.";
exit 1;
fi
fi
fi
fi
#*------------------------
#* Multi-threading */
#*------------------------
# Does the system supports threads
if [ "$gcthread " = " " ]; then
gcthread=`$autoconfdir/thr
fi
# find out the C library for posix threads
if [ "$pthreadlibs " = " " ]; then
pthreadlibs=`$autoconfdir/
fi
# pthread_mutex_timedlock
if [ "$pthreadlibs" != "no" ]; then
pthreadtimedlock=`$autocon
fi
#*------------------------
#* OpenSSL */
#*------------------------
# find out the C library for openssl
if [ "$openssllibs " = " " ]; then
openssllibs=`$autoconfdir/
else
openssllibs=`$autoconfdir/
fi
if [ "$openssllibs" != "no" ]; then
openssldtls=`$autoconfdir/
fi
#*------------------------
#* sqlite */
#*------------------------
# find out the C library for sqlite
if [ "$sqlitelibs " = " " ]; then
sqlitelibs=`$autoconfdir/s
fi
if [ "$sqlitelibs" = "no" ]; then
napis=;
for a in $apis; do
if [ "sqlite" != "$a" ]; then
napis="$a $napis";
fi
done
apis=$napis;
fi
#*------------------------
#* bigloo_config.h / configure.java / configure.cs / ... */
#* --------------------------
#* This part of the configure script produces the files */
#* runtime/Include/bigloo_con
#* runtime/CSlib/configure.cs
#* dependant information used by Bigloo. */
#*------------------------
if [ $action = "all" -o $action = "bigloo_config" ]; then
# Tell what we are doing
echo "Configuring $bigloo_config_h, $bigloo_config_jvm, $bigloo_config_dotnet:"
# The pointer alignment
alignment=`$autoconfdir/al
if [ $? != "0" ]; then
echo "*** ERROR:configure:alignment.
exit 1;
else
echo " log2 ptr alignment: " $alignment
fi
# The -O C compiler options
coflags=`$autoconfdir/ccop
# The -s C linker options
if [ "$cstrip" != "no" ]; then
csflags=`$autoconfdir/ccst
else
csflags="";
fi
# The -p C compiler options
cpflags=`$autoconfdir/ccpr
# The stack direction
stackgrows=`$autoconfdir/s
if [ $? != "0" ]; then
echo "*** ERROR:configure:stack. Aborting";
exit 1;
else
if [ "$stackgrows" = "1" ]; then
echo " stack grows: down"
else
echo " stack grows: up"
fi
fi
# stdint
stdint=`$autoconfdir/stdin
if [ "$stdint" = "1" ]; then
echo " stdint: yes"
else
echo " stdint: no"
stdlibint=`$autoconfdir/st
if [ "$stdlibint" = "1" ]; then
echo " stdlibint: yes"
else
echo " stdlibint: no"
fi
fi
# setjmp/longjmp
prefix=`$autoconfdir/setjm
if [ $? != "0" ]; then
echo "*** ERROR:configure:setjmp. Aborting";
exit 1;
else
setjmp="$prefix"setjmp
longjmp="$prefix"longjmp
echo " setjmp: $setjmp longjmp: $longjmp"
if [ "$prefix" = "sig" ]; then
setjmp="sigsetjmp(__jb,1)"
else
setjmp="$setjmp(__jb)";
fi
fi
# Does the system have bcopy?
bcopy=`$autoconfdir/bcopy --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:bcopy. Aborting";
exit 1;
else
if [ "$bcopy" = "1" ]; then
echo " bcopy: yes"
havebcopy=1
else
echo " bcopy: no"
havebcopy=0
fi
fi
# The number of window register
window=`$autoconfdir/winre
if [ $? != "0" ]; then
echo "*** ERROR:configure:winreg. Aborting";
exit 1;
else
echo " nb register windows: " $window
fi
# Does the system have sigpipe?
sigpipe=`$autoconfdir/sigp
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigpipe. Aborting";
exit 1;
else
if [ "$sigpipe" = "0" ]; then
echo " sigpipe: no"
else
echo " sigpipe: yes"
fi
fi
# Does the system have sigsetmask?
sigsetmask=`$autoconfdir/s
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigsetmask
exit 1;
else
if [ "$sigsetmask" = "0" ]; then
echo " sigsetmask: no"
else
echo " sigsetmask: yes"
fi
fi
# Does the system have sigprocmask?
sigprocmask=`$autoconfdir/
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigprocmas
exit 1;
else
if [ $sigprocmask = "0" ]; then
echo " sigprocmask: no"
else
echo " sigprocmask: yes"
fi
fi
# A warning if neither sigsetmask nor sigprocmask is defined
if( test $sigsetmask = "0" -a $sigprocmask = "0"); then
echo "*** WARNING:sigsetmask nor sigprocmask available"
echo "(^C disabled in the interpreter)."
fi
# Does the system have alloca?
alloca=`$autoconfdir/alloc
if [ $? != "0" ]; then
echo "*** ERROR:configure:alloca. Aborting";
exit 1;
else
if [ $alloca = "1" ]; then
echo " alloca: yes"
else
echo " alloca: no"
fi
fi
# Does the system have mmap?
mmap=`$autoconfdir/mmap --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:mmap. Aborting";
exit 1;
else
if [ $mmap = "1" ]; then
echo " mmap: yes"
else
echo " mmap: no"
fi
fi
# Does the system have getcwd?
getcwd=`$autoconfdir/getcw
if [ $? != "0" ]; then
echo "*** ERROR:configure:getcwd. Aborting";
exit 1;
else
if [ $getcwd = "0" ]; then
echo " getcwd: no"
else
echo " getcwd: yes"
fi
fi
# Does the system have getwd?
getwd=`$autoconfdir/getwd --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:getwd. Aborting";
exit 1;
else
if [ $getwd = "0" ]; then
echo " getwd: no"
else
echo " getwd: yes"
fi
fi
# Where to find the socket api
socket=`$autoconfdir/socke
if [ $? != "0" ]; then
echo "*** ERROR:configure:socket. Aborting";
exit 1;
fi
socklen=`$autoconfdir/sock
if [ "$socket " = " " ]; then
echo " socket: yes"
else
echo " socket: $socket"
extralibs="$socket $extralibs"
fi
# Are the static constants aligned?
cnstalign=`$autoconfdir/cn
if [ $? != "0" ]; then
echo "*** ERROR:configure:cnstalign.
exit 1;
fi
enforcedcnstalign=`$autoco
if [ $? != "0" ]; then
echo "*** ERROR:configure:enforcedcn
exit 1;
else
if [ "$cnstalign" = "1" ]; then
echo " constant alignment: ok"
elif [ "$enforcedcnstalign" = "1" ]; then
echo " constant alignment: enforced"
else
echo "*** ERROR:configure:illegal alignment."
echo "It is then impossible install Bigloo on this architecture, sorry."
exit 1
fi
fi
# Endianness
endian=`$autoconfdir/bigen
if [ "$endian" = "1" ]; then
echo " Endianness: big"
else
echo " Endianness: little"
fi
# Does this system implements pipe?
pipe=`$autoconfdir/pipe --user=$user --tmp=$tmp --cc="$cc"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:pipe. Aborting";
exit 1;
else
if [ "$pipe" = "0" ]; then
echo " popen/pclose: no"
else
echo " popen/pclose: yes"
fi
fi
# Does this compiler implements labs?
# llabs=`$autoconfdir/labs --user=$user --tmp=$tmp --cc="$cc"`
# SE: fix, 27 oct 2006
labs=`$autoconfdir/labs --user=$user --tmp=$tmp --cc="$cc"`
if [ "$labs " != " " ]; then
echo " labs: yes [$labs]"
have_labs=1
else
echo " labs: no"
have_labs=0
labs=abs
fi
# Does this compiler implements longlong?
longlong=`$autoconfdir/lon
echo "#undef BGL_LONGLONG_T" >> $bigloo_config_h
if [ "$longlong " = " " ]; then
echo " long long: no"
longlong=long
have_llabs=0
llabs=abs
have_strtoll=0
strtoll=strtol
have_strtoull=0
strtoull=0
else
llabs=`$autoconfdir/llabs --user=$user --tmp=$tmp --cc="$cc" --longlong="$longlong"`
strtoll=`$autoconfdir/strt
strtoull=`$autoconfdir/str
echo " long long: yes [$longlong]"
if [ "$llabs " != " " ]; then
echo " llabs: yes [$llabs]"
have_llabs=1
else
echo " llabs: no"
have_llabs=0
llabs=abs
fi
if [ "$strtoll " != " " ]; then
echo " strtoll: yes [$strtoll]"
have_strtoll=1
else
echo " strtoll: no"
have_strtoll=0
strtoll="bgl_strtoll"
fi
if [ "$strtoull " != " " ]; then
echo " strtoull: yes [$strtoull]"
have_strtoull=1
else
echo " strtoull: no"
have_strtoull=0
strtoull="bgl_strtoull"
fi
fi
# Is sigchld available for us
sigchld=`$autoconfdir/sigc
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigchld. Aborting";
exit 1;
else
if [ "$sigchld" = "1" ]; then
echo " sigchld: yes"
else
sigchld=0
echo " sigchld: no"
fi
fi
# Is sigaction available
sigaction=`$autoconfdir/si
if [ $? != "0" ]; then
echo "*** ERROR:configure:sigaction.
exit 1;
else
if [ "$sigaction" = "1" ]; then
echo " sigaction: yes"
else
echo " sigaction: no"
fi
fi
# Is select available
select=`$autoconfdir/selec
if [ "$select" = "1" ]; then
echo " select: yes"
else
echo " select: no"
fi
# Is fcntl available
fcntl=`$autoconfdir/fcntl --user=$user --tmp=$tmp --cc="$cc"`
if [ "$fcntl" = "1" ]; then
echo " fcntl: yes"
else
echo " fcntl: no"
fi
# Is termio available
termio=`$autoconfdir/termi
if [ $? != "0" ]; then
echo "*** ERROR:configure:termio. Aborting";
exit 1;
else
if [ "$termio" = "1" ]; then
echo " termio: yes"
else
echo " termio: no"
fi
fi
# Is termio available
termios=`$autoconfdir/term
if [ $? != "0" ]; then
echo "*** ERROR:configure:termios. Aborting";
exit 1;
else
if [ "$termios" = "1" ]; then
echo " termios: yes"
else
echo " termios: no"
fi
fi
# Does the system support posix-file-ops
posixfileops=`$autoconfdir
if [ "$posixfileops" = "1" ]; then
echo " posix file operations: yes"
else
echo " posix file operations: no"
fi
# Does the system support sendfile
sendfile=`$autoconfdir/sen
if [ "$sendfile" = "1" ]; then
echo " sendfile: yes"
sendfile_rif=1;
sendfile_ros=1;
else
echo " sendfile: no"
sendfile_rif=0;
sendfile_ros=0;
fi
# Does the system support nanosleep
nanosleep=`$autoconfdir/sl
if [ "$nanosleep" = "1" ]; then
echo " nanosleep: yes"
else
echo " nanosleep: no"
fi
# Does the system support normalsleep
normalsleep=`$autoconfdir/
if [ "$normalSleep" = "1" ]; then
echo " normal sleep: yes"
else
echo " normal sleep: no"
fi
# The timezone variable
timezone=`$autoconfdir/tim
# The -pic C compiler options
if [ "$cpicflags" = "no" ]; then
cpicflags=""
else
if [ "$ldopt" != "no-share" ]; then
if [ "$cpicflags" = "demanded" -o "$cpicflags " = " " ]; then
if [ "$cpicflags" = "demanded" ]; then
cpicflags=`$autoconfdir/cc
else
cpicflags=`$autoconfdir/cc
fi
fi
else
cpicflags=""
fi
fi
if [ "$cpicflags " = " " ]; then
cpicflags=-DBGL_NO_PIC;
fi
# The shared libraries
if [ "$ldopt" = "no-share" ]; then
echo " shared library: no"
haveshlib=0
else
ldopt=`$autoconfdir/ldshar
if [ "$ldopt" = "no-share" ]; then
echo " shared library: no (because I don't know ld option)"
haveshlib=0
cpicflags="-DBGL_NO_PIC"
else
echo " shared library: yes"
haveshlib=1
ldpreload=`$autoconfdir/ld
echo " ld preload: $ldpreload"
fi
fi
# Does the system have dlopen?
if [ "$ldopt " != "no-share" ]; then
if [ "$posixos" = "mingw" ]; then
echo " dlopen: yes (mingw)"
havedlopen=1
dlopen=""
else
dlopen=`$autoconfdir/dlope
if [ "$dlopen" != "0" ]; then
echo " dlopen: yes [$dlopen]"
havedlopen=1
dlopen=$dlopen
extralibs="$dlopen $extralibs"
else
echo " dlopen: no"
havedlopen=0
dlopen=""
fi
fi
else
echo " dlopen: no"
havedlopen=0
dlopen=""
fi
# We check the standard GC if we have to use one
if [ "$customgc" = "no" ]; then
gclib=`$autoconfdir/gcstd --user=$user --tmp=$tmp --cc="$cc" --cflags="$coflags" --gcdir="$stdgcincdir" --gclib="$stdgclib" --gclibdir="$gclibdir" --dlopen=$dlopen`
if [ $? != "0" ]; then
echo "*** ERROR:configure:Standard GC. Aborting";
echo "You are trying to configure Bigloo so that it uses an existing"
echo "GC library. The configuration script is enable to make this"
echo "library working properly."
echo "Try to configure Bigloo with \"--customgc=yes\"."
exit 1;
fi
gcincdir=$stdgcincdir
else
gclib=$customgclib;
fi
# for now only the port is Unix
echo " operating system: unix"
if [ "$posixos" = "mingw" ]; then
echo " (well actually it's a win32 MinGW System ;-)"
fi
$autoconfdir/unix --user=$user --tmpdir=$tmpdir --posixos="$posixos" >> $bigloo_config_h
if [ $? != "0" ]; then
echo "*** ERROR:configure:os. Aborting";
exit 1;
fi
# which shell to use
`$shell -c "ls -l > /dev/null 2> /dev/null"`
if [ $? != "0" ]; then
echo "*** ERROR:configure:$shell. Aborting";
exit 1;
fi
# the C compiler style
echo " c compiler style: $ccstyle"
echo " c compiler: $cc"
echo " c flags: $cflags"
echo " c compiler optimization: $coflags"
echo " c linker strip: $csflags"
# the library files directory
echo " library directory: $libdir"
echo " files directory: $fildir"
echo " GC library: $gclib"
if [ $customgc = "yes" ]; then
echo " custom GC: yes"
isgccustom=1
else
echo " custom GC: no"
isgccustom=0
fi
# the zip directory
echo " zip directory: $syszipdir"
# the dll directory
echo " dll directory: $sysdlldir"
# additionals non bigloo library
echo " additional libraries: $extralibs"
# the C beautifier
if [ `$autoconfdir/indent --user=$user --tmp=$tmp --cc="$cc" --cflags="$cflags" --indent="$indent"` != "1" ]; then
echo " c beautifier: no"
indent=
else
echo " c beautifier: $indent"
fi
# the dirname command
dirname=`$autoconfdir/dirn
echo " dirname: $dirname"
# library basename
echo " library basename: $libraryname"
# double precision
prec=`$autoconfdir/doublep
if [ $? != "0" ]; then
echo "*** ERROR:configure:doubleprec
exit 1;
else
echo " double precision: $prec"
fi
# static link additional option
ldstaticopt=`$autoconfdir/
# shared link additional option
ldsharedopt=`$autoconfdir/
# bdb configuration
if [ "$bee" = "partial" ]; then
echo " bdb library installation: no"
havebdb=0
else
echo " bdb library installation: yes"
havebdb=1
fi
# Java configuration
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
if [ "$jshell" != "sh" ]; then
if [ "$jshell" != "msdos" ]; then
echo "*** ERROR:configure:Illegal Java shell \"$jshell\" (should be either \"sh\" or \"msdos\")";
exit 3
fi
fi
if [ "$jvmbackend" = "yes" ]; then
if [ "$posixos" = "cygwin" -a "$cygwindosjvm" = "yes" ]; then
cpsep=";";
else
cpsep=":";
fi
$autoconfdir/javatest --java=$java \
--jflags=$jflags \
--jvflags=$jvflags \
--javac=$javac \
--jcflags=$jcflags \
--user=$user \
--tmp=$tmp \
--cpsep="$cpsep"
if [ $? = 0 ]; then
echo " java: yes"
else
echo " java: no"
echo "*** ERROR:configure:Can't configure Java."
echo "Command:"
echo "$autoconfdir/javatest --java=$java --jflags=$jflags --jvflags=$jvflags --javac=$javac --jcflags=$jcflags --user=$user --tmp=$tmp --cpsep=\"$cpsep\""
echo "failed unexpectedly (see configure.log for details)."
echo ""
echo "To give up with the JVM backend, use:"
echo " ./configure --jvm=no"
exit 3
fi
fi
java_configured=yes
java_version=`$java -version 2>&1 | head -n 1`
if echo "$java_version" | grep "1.6" > /dev/null
then java_version=1.6
elif echo "$java_version" | grep "1.5" > /dev/null
then java_version=1.5
elif echo "$java_version" | grep "1.4" > /dev/null
then java_version=1.4
else
java_version=1.3
fi
else
java=java
jflags=
jvflags=
jshell=sh
jar=
fi
# .NET configuration
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
echo " dotnet: yes"
if [ "$dotnetshell" != "sh" ]; then
if [ "$dotnetshell" != "msdos" ]; then
echo "*** ERROR:configure:Illegal .NET shell \"$dotnetshell\" (should be either \"sh\" or \"msdos\")";
exit 3
fi
fi
if [ "$dotnetbackend" = "yes" ]; then
if [ "$posixos" = "cygwin" -a "$cygwindosdotnet" = "yes" ]; then
cpsep=";";
else
cpsep=":";
fi
$autoconfdir/dotnettest --clr=$dotnetclr \
--clropt="$dotnetclropt" \
--clrld=$dotnetclrld \
--cscc=$dotnetcscc \
--user=$user \
--tmp=$tmp \
--cpsep="$cpsep"
if [ $? = 0 ]; then
echo " .NET: yes"
else
echo " .NET: no"
echo "*** ERROR:configure:Can't configure .NET. Command:"
echo "$autoconfdir/dotnettest --clr=$dotnetclr --clropt=$dotnetclropt --clrld=$dotnetclrld --cscc=$dotnetcscc --user=$user --tmp=$tmp --cpsep=\"$cpsep\""
echo "failed unexpectedly (see configure.log for details)."
echo ""
echo "To give up with the .NET backend, use:"
echo " ./configure --dotnet=no"
exit 3
fi
fi
dotnet_configured=yes
else
echo " dotnet: no"
dotnetld=""
dotnetldstyle=""
dotnetclr=""
dotnetclrstyle=""
dotnetclropt=""
dotnetshell=""
dotnetasm=""
fi
# Posix Os
if eval uname > /dev/null 2> /dev/null; then
osname=`uname -s`
osarch=`uname -m`
osversion=`uname -r`
if [ "$posixos" = "mingw" ]; then
osclass="mingw"
else
osclass="unix"
fi
ostmp="$tmpdir"
fileseparator="/"
if [ "$posixos" = "mingw" ]; then
pathseparator=";"
else
pathseparator=":"
fi
staticlibsuf="a"
ucs2displayable=0
else
osname="unknown"
osarch="unknown"
osversion="unknown"
ostmp="/tmp"
fileseparator="/"
pathseparator=":"
staticlibsuf="a"
ucs2displayable=0
fi
echo
# bigloo_config_h, bigloo_config_jvm, bigloo_config_dotnet
for p in $bigloo_config_h $bigloo_config_jvm $bigloo_config_dotnet; do
if [ "$p " != " " ]; then
rm -f $p 2> /dev/null
rel=`echo $release | sed -e "s|[.]|_|"`;
cat autoconf/`basename $p`.in \
| sed -e "s|@CONFIGURE@|Automatical
-e "s|@BGL_RELEASE@|BGL_$rel|
-e "s|@BGL_RELEASE_NUMBER@|$r
-e "s|@BGL_SPECIFIC_VERSION@|
-e "s|@BGL_DEFAULT_BACK_END@|
-e "s|@BGL_DEFAULT_A_OUT@|$ao
-e "s|@BGL_DEFAULT_A_BAT@|$ab
-e "s|@STACK_GROWS_DOWN@|$sta
-e "s|@PTR_ALIGNMENT@|$alignm
-e "s|@HAVE_STDINT@|$stdint|"
-e "s|@HAVE_STDLIBINT@|$stdli
-e "s|@SETJMP@|$setjmp|" \
-e "s|@LONGJMP@|$longjmp|" \
-e "s|@HAVE_BCOPY@|$havebcopy
-e "s|@NB_WINDOW_REGISTER@|$w
-e "s|@HAVE_SIGPIPE@|$sigpipe
-e "s|@HAVE_SIGSETMASK@|$sigs
-e "s|@HAVE_SIGPROCMASK@|$sig
-e "s|@HAVE_ALLOCA@|$alloca|"
-e "s|@HAVE_MMAP@|$mmap|" \
-e "s|@HAVE_GETCWD@|$getcwd|"
-e "s|@HAVE_GETWD@|$getwd|" \
-e "s|@CONSTANT_ALIGNED@|$cns
-e "s|@BGL_BIG_ENDIAN@|$endia
-e "s|@HAVE_PIPE@|$pipe|" \
-e "s|@BGL_LONGLONG_T@|$longl
-e "s|@BGL_HAVE_LABS@|$have_l
-e "s|@BGL_LABS@|$labs|" \
-e "s|@BGL_HAVE_LLABS@|$have_
-e "s|@BGL_LLABS@|$llabs|" \
-e "s|@BGL_HAVE_STRTOLL@|$hav
-e "s|@BGL_STRTOLL@|$strtoll|
-e "s|@BGL_HAVE_STRTOULL@|$ha
-e "s|@BGL_STRTOULL@|$strtoul
-e "s|@HAVE_SIGCHLD@|$sigchld
-e "s|@HAVE_SIGACTION@|$sigac
-e "s|@BGL_HAVE_SELECT@|$sele
-e "s|@BGL_HAVE_FCNTL@|$fcntl
-e "s|@HAVE_TERMIO@|$termio|"
-e "s|@HAVE_TERMIOS@|$termios
-e "s|@POSIX_FILE_OPS@|$posix
-e "s|@BGL_HAVE_SENDFILE@|$se
-e "s|@BGL_SENDFILE_REQUIRE_I
-e "s|@BGL_SENDFILE_REQUIRE_O
-e "s|@BGL_NANOSLEEP@|$nanosl
-e "s|@BGL_SLEEP@|$normalslee
-e "s|@BGL_TIMEZONE@|$timezon
-e "s|@HAVE_SHARED_LIBRARY@|$
-e "s|@HAVE_DLOPEN@|$havedlop
-e "s|@DLOPEN_LD_OPT@|$dlopen
-e "s|@HAVE_SOCKLEN@|$socklen
-e "s|@SHELL@|$shell|" \
-e "s|@C_COMPILER_STYLE@|$ccs
-e "s|@C_COMPILER@|$cc|" \
-e "s|@C_FLAGS@|$cflags|" \
-e "s|@C_COMPILER_O_OPTION@|-
-e "s|@C_COMPILER_DEBUG_OPTIO
-e "s|@C_OBJECT_FILE_EXTENSIO
-e "s|@C_COMPILER_OPTIM_FLAGS
-e "s|@C_STRIP_FLAGS@|$csflag
-e "s|@C_LINKER_STYLE@|$ldsty
-e "s|@C_LINKER_O_OPTION@|-o |" \
-e "s|@C_LINKER_DEBUG_OPTION@
-e "s|@C_LINKER_OPTIM_FLAGS@|
-e "s|@C_PROFILE_FLAGS@|$cpfl
-e "s|@C_STRING_SPLIT@|$strin
-e "s|@BGL_LD_LIBRARY_DIR@|$l
-e "s|@BGL_NON_CUSTOM_GC_DIR@
-e "s|@LIBRARY_DIRECTORY@|$fi
-e "s|@BGL_GC_LIBRARY@|$gclib
-e "s|@BGL_GC_CUSTOM@|$isgccu
-e "s|@ZIP_DIRECTORY@|$syszip
-e "s|@DLL_DIRECTORY@|$sysdll
-e "s|@DNS_CACHE@|$dnscache|"
| sed \
-e "s|@USER_LIBRARIES@|$extra
-e "s|@C_BEAUTIFIER@|$indent|
-e "s|@DIRNAME_CMD@|$dirname|
-e "s|@LIBRARY_BASE_NAME@|$li
-e "s|@DOUBLE_PRECISION@|$pre
-e "s|@ADDITIONAL_STATIC_LINK
-e "s|@ADDITIONAL_SHARED_LINK
-e "s|@BGL_HAVE_BIGLOO_ABORT@
-e "s|@BGL_HAVE_BDB@|$havebdb
-e "s|@BGL_JAVA@|$java|" \
-e "s|@BGL_JAVA_OPT@|$jflags|
-e "s|@BGL_JAVA_VOPT@|$jvflag
-e "s|@BGL_JAR@|$jar|" \
-e "s|@BGL_JAVA_SHELL@|$jshel
-e "s|@BGL_DOTNET_LD@|$dotnet
-e "s|@BGL_DOTNET_LD_STYLE@|$
-e "s|@BGL_DOTNET_CLR@|$dotne
-e "s|@BGL_DOTNET_CLR_STYLE@|
-e "s|@BGL_DOTNET_CLR_OPT@|$d
-e "s|@BGL_DOTNET_SHELL@|$dot
-e "s|@BGL_DOTNET_ASM@|$dotne
-e "s|@BGL_IMPORT@|extern|" \
-e "s|@BGL_EXPORTED_DECL@|ext
-e "s|@BGL_EXPORTED_DEF@||" \
-e "s|@BGL_RUNTIME_DECL@|exte
-e "s|@BGL_RUNTIME_DEF@||" \
-e "s|@OS_CLASS@|$osclass|" \
-e "s|@OS_NAME@|$osname|" \
-e "s|@OS_ARCH@|$osarch|" \
-e "s|@OS_VERSION@|$osversion
-e "s|@OS_TMP@|$ostmp|" \
-e "s|@FILE_SEPARATOR@|$files
-e "s|@PATH_SEPARATOR@|$paths
-e "s|@STATIC_LIB_SUFFIX@|$st
-e "s|@SHARED_LIB_SUFFIX@|$sh
-e "s|@UCS2_DISPLAYABLE@|$ucs
-e "s|@GC_HAVE_BLOCKING@|$gch
-e "s|@PTHREAD_HAVE_TIMEDLOCK
> $p
fi
done
# bigloo_h, bigloo_gc_h
for p in $bigloo_h $bigloo_gc_h; do
if [ "$p " != " " ]; then
cp runtime/Include/`basename $p` $p
fi
done
fi
#*------------------------
#* bigloo_config.el */
#*------------------------
if [ $action = "all" -o $action = "bigloo_config_el" ]; then
# Tell what we are doning
echo "Configuring $bigloo_config_el:"
rm -f $bigloo_config_el 2> /dev/null
echo ";; Automatically generated file (don't edit) */" > $bigloo_config_el
echo ";; `date`" >> $bigloo_config_el
echo "" >> $bigloo_config_el
echo "(provide 'bmacs-config)" >> $bigloo_config_el
echo "(defvar bmacs-docdir \"$docdir\")" >> $bigloo_config_el
echo "(defvar bmacs-lispdir \"$emacslisppath\")" >> $bigloo_config_el
echo ""
fi
#*------------------------
#* Makefile.config */
#* --------------------------
#* This part of the configure script produces the file */
#* Makefile.config. This file contains machine dependant */
#* informations and location where Bigloo is to be installed. */
#*------------------------
if [ $action = "all" -o $action = "Makefile.config" ]; then
# Tell what we are doning
echo "Configuring $makefile_cfg":
# We create an unexisting temporary file name
name=$tmp/foo
while( test -f "$name.s" -o -f "$name.o" ); do
name="$name"x;
done
# We first cleanup the file
rm -f $makefile_cfg 2> /dev/null
echo "# automatically generated, don't edit" > $makefile_cfg
echo "# `date`" >> $makefile_cfg
echo "" >> $makefile_cfg
# The Bigloo release number
echo "RELEASE=$release" >> $makefile_cfg
echo >> $makefile_cfg
# The tools
echo "AFILE_EXE=$afile" >> $makefile_cfg
echo "JFILE_EXE=$jfile" >> $makefile_cfg
echo "BTAGS_EXE=$btags" >> $makefile_cfg
echo "BDEPEND_EXE=$bdepend" >> $makefile_cfg
echo "BMAKE_EXE=$bmake" >> $makefile_cfg
echo "BPP_EXE=$bpp" >> $makefile_cfg
echo "BPROF_EXE=$bprof" >> $makefile_cfg
echo "MCO_EXE=$mco" >> $makefile_cfg
echo "JAS_EXE=$jas" >> $makefile_cfg
echo "BMEM_EXE=$bmem" >> $makefile_cfg
echo "BMEMRUN_EXE=$bmemrun" >> $makefile_cfg
echo "BDB_EXE=$bdb" >> $makefile_cfg
echo >> $makefile_cfg
# The OS
echo "POSIXOS=$posixos" >> $makefile_cfg
echo >> $makefile_cfg
# The rm command
echo "RM=/bin/rm" >> $makefile_cfg
echo >> $makefile_cfg
# The bee support
echo "INSTALLBEE=$bee" >> $makefile_cfg
echo >> $makefile_cfg
# The Boot directory
echo "BOOTDIR=$bootdir" >> $makefile_cfg
echo "BOOTBINDIR=$bootdir/bin" >> $makefile_cfg
echo "BOOTLIBDIR=$bootdir/lib/$
echo >> $makefile_cfg
# Directories
echo "DESTDIR=" >> $makefile_cfg
echo "BINDIR=$bindir" >> $makefile_cfg
echo 'LIBDIR=$(DESTDIR)'"$libdi
echo 'GCDIR=$gclibdir' >> $makefile_cfg
echo "FILDIR=$fildir" >> $makefile_cfg
echo 'ZIPDIR=$(DESTDIR)'"$zipdi
echo 'SYSZIPDIR=$(DESTDIR)'"$sy
echo 'DLLDIR=$(DESTDIR)'"$dlldi
echo 'SYSDLLDIR=$(DESTDIR)'"$sy
echo 'MANDIR=$(DESTDIR)'"$mandi
echo 'INFODIR=$(DESTDIR)'"$info
echo 'DOCDIR=$(DESTDIR)'"$docdi
echo "TMP=$tmp" >> $makefile_cfg
echo >> $makefile_cfg
# Native backend
echo "NATIVEBACKEND=$nativeback
# The basename
echo "LIBRARYNAME=$libraryname"
echo >> $makefile_cfg
# The C compiler
echo "CC=$cc" >> $makefile_cfg
echo "CFLAGS=$coflags $cflags" >> $makefile_cfg
echo "CSTRIPFLAGS=$csflags" >> $makefile_cfg
echo "CPICFLAGS=$cpicflags" >> $makefile_cfg
echo "CFLAGS_P=$""(CFLAGS) $cpflags" >> $makefile_cfg
echo "CGCFLAGS=$cgcflags $cgcfinalflags $gcspecial" >> $makefile_cfg
echo "EXTRALIBS=$extralibs" >> $makefile_cfg
echo "EXTRAGCLIBS=$extragclibs"
echo "CLOSELIBS= # always empty, does not contain GC, override by makefiles" >> $makefile_cfg
echo >> $makefile_cfg
# The GC library
echo " GC dir: $gcincdir"
echo "GCLIB=$gclib" >> $makefile_cfg
if [ $customgc = "yes" ]; then
echo "GCCUSTOM=yes" >> $makefile_cfg
echo 'GCDIR=$(BOOTDIR)/gc-boehm
echo 'GCINCLUDE=-I$(GCDIR) -I$(GCDIR)/include -I$(GCDIR)/include/private
echo "GCCLOSELIB=-lbigloogc-""$
echo "C_GCSTD=" >> $makefile_cfg
else
echo "GCCUSTOM=no" >> $makefile_cfg
echo "GCDIR=$gcincdir" >> $makefile_cfg
echo 'GCINCLUDE=-I$(GCDIR) -I$(GCDIR)/private' >> $makefile_cfg
echo "GCCLOSELIB=-l""$""(GCLIB)
echo "C_GCSTD=Clib/inline-alloc
echo "GCLIBDIR=$gclibdir" >> $makefile_cfg
fi
echo >> $makefile_cfg
# additional bigloo compiler link flags (some architecture such as AIX
# require a special to link huge executable)
lflags=`$autoconfdir/ldext
echo "EXTRA_LD_OPT=$lflags" >> $makefile_cfg
if [ $sharedcompiler = "yes" ]; then
echo "SHRD_COMP=yes" >> $makefile_cfg;
else
echo "SHRD_COMP=no" >> $makefile_cfg;
fi
if [ $sharedbde = "yes" ]; then
echo "SHRD_BDE_OPT=" >> $makefile_cfg;
else
echo "SHRD_BDE_OPT=-static-bigl
fi
# Executable suffix
echo "EXE_SUFFIX=$exe" >> $makefile_cfg;
# The assembler
echo " checking $as"
as=`$autoconfdir/ascpp --user=$user --tmp=$tmp -as="$as" -cc="$cc" --name=$name`
if [ $? != "0" ]; then
echo "*** ERROR:configure:as. Aborting";
exit 1;
fi
if [ "$as " = " " ]; then
echo "*** ERROR:configure:$as:can't find as that invokes cpp,";
echo "set as variable."
rm -f $name.s $name.o
exit 1;
else
echo "AS=$as" >> $makefile_cfg
fi
echo >> $makefile_cfg
# Ar checking
echo " checking $ar $arflags"
(cd $tmp;
compile="$ar $arflags $name.a $name.o > /dev/null 2> /dev/null";
if eval $compile; then
/bin/rm -f $name.s $name.o $name.a
else
arflags="-q -c";
compile="$ar $arflags $name.a $name.o > /dev/null 2> /dev/null";
if eval $compile; then
/bin/rm -f $name.s $name.o $name.a
else
echo "*** ERROR:configure:ar:Can't automatically setup ar flags";
echo "Please, set ar flags up inside ./configure";
/bin/rm -f $name.s $name.o $name.a;
exit 1
fi
fi) || exit $*
echo "AR=$ar" >> $makefile_cfg
echo "ARFLAGS=$arflags" >> $makefile_cfg
# Does the system require ranlib?
if( test `$autoconfdir/ranlib --user=$user --tmp=$tmp --cc="$cc"` = "0" ); then
echo " ranlib: no"
echo "RANLIB=true" >> $makefile_cfg
else
echo " ranlib: yes"
echo "RANLIB=ranlib" >> $makefile_cfg
fi
# The shared libraries
if [ "$ldopt" = "no-share" ]; then
echo "SHAREDLIBRARYSUPPORT=no" >> $makefile_cfg
echo "LD=true# (true means no dynamic library)" >> $makefile_cfg
echo "LDPRELOADSUPPORT=no" >> $makefile_cfg
echo "LDSONAME=" >> $makefile_cfg
else
echo "SHAREDLIBRARYSUPPORT=yes"
echo "SHAREDLIBRARYCLOSED=$shar
echo "LD=$ld $ldopt" >> $makefile_cfg
echo "LDFLAGS=$ldflags" >> $makefile_cfg
echo "LDLIBS=$ldlibs" >> $makefile_cfg
echo "LDCOMPLIBS=$ldcomplibs" >> $makefile_cfg
echo "LDPRELOADSUPPORT=$ldprelo
# shared link additional soname option
ldsoname=`$autoconfdir/lds
echo "LDSONAME=$ldsoname" >> $makefile_cfg
fi
echo >> $makefile_cfg
# The suffix of shared library
echo "SHAREDSUFFIX=$sharedsuffi
echo >> $makefile_cfg
# The dlopen facility
if [ "$dlopen" != "0" ]; then
echo "DLOPENSUPPORT=yes" >> $makefile_cfg
else
echo "DLOPENSUPPORT=no" >> $makefile_cfg
fi
echo >> $makefile_cfg
# Does the system supports threads
echo " gcthread: $gcthread"
if [ "$gcthread" != "no" ]; then
echo "CGCTHREADFLAGS=$gcthread"
else
echo "CGCTHREADFLAGS=" >> $makefile_cfg
fi
# find out the C library for posix threads
echo " pthreadlibs: $pthreadlibs"
echo "PTHREADLIBS=$pthreadlibs"
# Patch the code of the thread when using non custom GC
if [ "$pthreadlibs" != "no" ]; then
# the default gc on mingw is built with thread support.
# there is no need to link with a special version of gc library
if [ $customgc != "yes" ]; then
gclibth=$stdgclib
else
if [ "$posixos" = "mingw" ]; then
gclibth=bigloogc
else
gclibth=bigloogc_fth
fi
fi
cat api/fthread/src/Misc/fthre
| sed -e "s|@BIGLOOGC_FTH@|$gclibth
| sed -e "s|@PTHREADLIBS@|$pthreadl
> lib/$release/fthread.init
cat api/pthread/src/Misc/pthre
| sed -e "s|@BIGLOOGC_PTH@|$gclibth
| sed -e "s|@PTHREADLIBS@|$pthreadl
> lib/$release/pthread.init
else
napis=;
for a in $apis; do
if [ "pthread" != "$a" -a "fthread" != "$a" ]; then
napis="$a $napis";
fi
done
apis=$napis;
if [ "$pthreadtimedlock" = "1" ]; then
echo " pthread_mutex_timedlock: yes"
else
echo " pthread_mutex_timedlock: no"
fi
fi
# SSL
echo " openssllibs: $openssllibs"
# Patch the code of the SSL
if [ "$openssllibs" != "no" ]; then
echo "OPENSSLLIBS=$openssllibs"
echo ";; automatically generated. Don't edit" > lib/$release/ssl.init
cat api/ssl/src/Misc/ssl.init.
| sed -e "s|@OPENSSLLIBS@|$openssll
>> lib/$release/ssl.init
dtls=1
if [ "$openssldtls" == "no" ]; then
dtls=0;
fi
echo "/* automatically generated, Don't edit" > api/ssl/src/C/bglssl.h
cat api/ssl/src/C/bglssl.h.in | sed -e "s|@HAVEDTLS@|$dtls|g" \
>> api/ssl/src/C/bglssl.h
else
napis=;
for a in $apis; do
if [ "ssl" != $a ]; then
napis="$a $napis";
fi
done
apis=$napis;
echo "OPENSSLLIBS=" >> $makefile_cfg
fi
# SQLITE
echo " sqlitelibs: $sqlitelibs"
echo "SQLITELIBS=$sqlitelibs" >> $makefile_cfg
# Patch the code of the SQLITE
if [ "$sqlitelibs" != "no" ]; then
echo ";; automatically generated. Don't edit" > lib/$release/sqlite.init
cat api/sqlite/src/Misc/sqlite
| sed -e "s|@SQLITELIBS@|$sqlitelib
>> lib/$release/sqlite.init
fi
# Does the system supports strip
if( `$autoconfdir/strip --strip=$strip --user=$user --tmp=$tmp --cc="$cc"` ); then
echo " strip: $strip"
echo "STRIP=$strip" >> $makefile_cfg
echo "" >> $makefile_cfg
else
echo " strip: no"
echo "STRIP=true" >> $makefile_cfg
echo "" >> $makefile_cfg
fi
# Display emacs
echo " emacs: $emacsversion"
echo " emacslisppath: $emacslisppath"
echo "EMACS=$emacs" >> $makefile_cfg
echo "EMACSDIR=$emacslisppath" >> $makefile_cfg
echo "EMACSBRAND=$emacsversion"
echo "EWARN=$emacswarning" >> $makefile_cfg
echo >> $makefile_cfg
# bmask
echo "BMASK=$bmask" >> $makefile_cfg
echo >> $makefile_cfg
# The info version
if [ "$configureinfo" = "yes" ]; then
infoinfo=`$autoconfdir/inf
--tmp=$tmp \
--makeinfo="$makeinfo" \
--texi2dvi="$texi2dvi" \
--texi2dviopt="$texi2dviop
--texi2pdf="$texi2pdf" \
--texi2html="$texi2html" \
--texi2htmlopt="$texi2html
if [ "$?" = "0" ]; then
for p in $infoinfo; do
case $p in
"")
break;;
makeinfover=*)
makeinfover="`echo $p | sed 's/^[-a-z_.]*=//'`";;
texi2dvi=*)
texi2dvi="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2dviopt=*)
texi2dviopt="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2pdf=*)
texi2pdf="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2html=*)
texi2html="`echo $p | sed 's/^[-a-z0-9_.]*=//'`";;
texi2htmlopt=*)
texi2htmlopt="`echo $p | sed 's/^[^=]*=//'`";;
esac
done
if [ "$makeinfover" = "old" ]; then
makeinfoopt="-D oldinfo"
fi
echo "MAKEINFO=$makeinfo" >> $makefile_cfg
echo "MAKEINFOOPT=$makeinfoopt"
echo "TEXI2DVI=$texi2dvi" >> $makefile_cfg
echo "TEXI2DVIOPT=$texi2dviopt"
echo "TEXI2HTML=$texi2html" >> $makefile_cfg
echo "TEXI2HTMLOPT=$texi2htmlop
echo "TEXI2PDF=$texi2pdf" >> $makefile_cfg
else
echo " makeinfo: no"
makeinfo=no
makeinfoopt=
texi2dvi=
texi2dviopt=
texi2html=
texi2htmlopt=
texi2pdf=
echo "MAKEINFO=" >> $makefile_cfg
fi
fi
# The info installation
echo " checking install-info"
if [ "$iinfo " = " " ]; then
installinfo=`$autoconfdir/
else
installinfo=`$autoconfdir/
fi
if [ "installinfo " = " " ]; then
echo " install-info: no"
echo "INSTALLINFO=\"\"" >> $makefile_cfg
else
installinfodir=`$autoconfd
echo " install-info: $installinfo"
echo " install-info dir opt: $installinfodir"
echo "INSTALLINFO=$installinfo"
echo "INSTALLINFODIROPT=$instal
fi
# The java configuration
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
if [ "$jvmbackend" = "yes" ]; then
$autoconfdir/ziptest --zip=$zip --zflags=$zflags --user=$user --tmp=$tmp
if [ $? = 0 ]; then
echo " zip: yes"
else
echo " zip: no"
echo "*** ERROR:configure:Can't configure JVM back-end"
exit 3
fi
$autoconfdir/jartest --jar=$jar --user=$user --tmp=$tmp
if [ $? = 0 ]; then
echo " jar: yes"
else
echo " jar: no"
echo "*** ERROR:configure:Can't configure JVM back-end"
exit 3
fi
if [ "$java_configured" = "no" ]; then
$autoconfdir/javatest --java=$java --jflags=$jflags --jvflags=$jvflags \
--javac=$javac --jcflags=$jcflags --user=$user --tmp=$tmp
if [ $? = 0 ]; then
echo " java: yes"
else
echo " java: no"
echo "*** ERROR:configure:Can't configure JVM back-end"
exit 3
fi
java_configured=yes
fi
else
java_configured=yes
fi
echo "" >> $makefile_cfg
echo "JVMBACKEND=yes" >> $makefile_cfg
echo "JAVA=$java" >> $makefile_cfg
echo "JAVA_VERSION=$java_versio
echo "JFLAGS=$jflags" >> $makefile_cfg
echo "JVFLAGS=$jvflags" >> $makefile_cfg
echo "JAVAC=$javac" >> $makefile_cfg
echo "JCFLAGS=$jcflags" >> $makefile_cfg
echo "ZIP=$zip" >> $makefile_cfg
echo "ZFLAGS=$zflags" >> $makefile_cfg
echo "JAR=$jar" >> $makefile_cfg
echo "JSHELL=$jshell" >> $makefile_cfg
echo "JVMRECETTEBOOTPATH=$jvmre
echo "JVMAPIBOOTPATH=$jvmapiboo
# Cygwin prefix
if [ "$posixos" = "cygwin" ]; then
echo "" >> $makefile_cfg
echo CYGWINPREFIX=`echo "$cygwindospath" | sed -e 's/\\\\/\\\\\\\\/g'` >> $makefile_cfg
bigloozip=$bootdir/lib/$re
bigloozip=`echo $bigloozip | sed -e 's/\/cygdrive\/\([a-z]\)\/
bigloozip=`echo $bigloozip | sed -e "s/^\//$cygwindospath\\\\\
echo "CYGWINJVMPATH=-classpath \".;"`echo $bigloozip | sed -e 's/\//\\\\\\\\/g'`"\\\\big
else
echo "CYGWINJVMPATH=" >> $makefile_cfg
fi
echo "JVMCLASSPATHSEP=\"$cpsep\
else
echo "" >> $makefile_cfg
echo "JVMBACKEND=no" >> $makefile_cfg
fi
# The dotnet configuration
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
# Dotnet configuration
echo "" >> $makefile_cfg
echo "DOTNETBACKEND=yes" >> $makefile_cfg
echo "DOTNETCSCC=$dotnetcscc" >> $makefile_cfg
echo "DOTNETCSCCSTYLE=$dotnetcs
echo "DOTNETASM=$dotnetasm" >> $makefile_cfg
echo "DOTNETLD=$dotnetld" >> $makefile_cfg
echo "DOTNETLDSTYLE=$dotnetldst
echo "DOTNETCLRSTYLE=$dotnetclr
echo "DOTNETCLROPT=$dotnetclrop
echo "DOTNETCLR=$dotnetclr" >> $makefile_cfg
echo "" >> $makefile_cfg
echo "DOTNETFTDLLPATH=-L../../.
echo "DOTNETLINKBIGLOODLL=-lbig
else
echo "" >> $makefile_cfg
echo "DOTNETBACKEND=no" >> $makefile_cfg
fi
fi
# Bigloo compilation flags
echo "" >> $makefile_cfg
echo "BFLAGS=$bflags" >> $makefile_cfg
echo "BOOTFLAGS=$bootflags" >> $makefile_cfg
# script extension
echo "" >> $makefile_cfg
case $posixos in
cygwin)
echo "SCRIPTEXTENSION=.bat" >> $makefile_cfg;;
*)
echo "SCRIPTEXTENSION=" >> $makefile_cfg;;
esac
# C Object suffix
echo "C_OBJ_EXTENSION=$cobj" >> $makefile_cfg
echo >> $makefile_cfg
# APIs
echo "APIS=$apis" >> $makefile_cfg
echo >> $makefile_cfg
#*------------------------
#* Ok, we are done now */
#*------------------------
bcke="native:yes"
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
bcke="$bcke JVM:yes"
else
bcke="$bcke JVM:no"
fi
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
bcke="$bcke .NET:yes"
else
bcke="$bcke .NET:no"
fi
echo >> configure.log
echo >> configure.log
echo "** Configuration summary **" >> configure.log
echo >> configure.log
echo "Release features:" >> configure.log
echo " Bigloo release number................. $release" >> configure.log
echo " Bigloo supported backends............. $bcke" >> configure.log
echo " Bigloo default backend................ $defaultbackend" >> configure.log
if [ $customgc = "yes" ];then
echo " Bigloo gc........................
else
echo " Bigloo gc........................
fi
if [ "$pthreadlibs" = "no" ]; then
echo " support for native threads............ no" >> configure.log
else
echo " support for native threads............ yes" >> configure.log
fi
if [ "$openssllibs" = "no" ]; then
echo " Open SSL support...................
else
echo " Open SSL support...................
fi
if [ "$sqlitelibs" = "no" ]; then
echo " Sqlite ..........................
else
echo " Sqlite ..........................
fi
if [ "$ldopt" = "no-share" ]; then
echo " support for dynamic libraries......... no" >> configure.log
else
echo " support for dynamic libraries......... yes" >> configure.log
fi
echo " Bee support...................
echo >> configure.log
echo "Directories where Bigloo will be installed:" >> configure.log
echo " binaries..................
echo " libraries.................
echo " files directory.................
echo " standard zip.......................
if [ "$syszipdir " != "$zipdir " ]; then
echo " standard zip (os dependent)........... $syszipdir" >> configure.log
fi
echo " standard dll.......................
if [ "$sysdlldir " != "$dlldir " ]; then
echo " standard dll (os dependent)........... $sysdlldir" >> configure.log
fi
echo " manual pages.....................
echo " info documentation.............
echo " lisp files.....................
echo " temporary dir.......................
echo >> configure.log
echo "Compilers and linkers:" >> configure.log
echo " C compiler used......................
echo " options for compiling.................
echo " options for optimizing................
echo " options for stripping.................
echo " options for PIC code.................. $cpicflags" >> configure.log
echo " options for profiling.................
echo " options for linking...................
echo " assembly..................
echo " static library builder................ $ar" >> configure.log
echo " shared library builder................ $ld" >> configure.log
echo " options for building static libs...... $arflags" >> configure.log
echo " socket libraries.................
echo " pthread libraries.................
echo " openssl libraries.................
echo " sqlite libraries.................
if [ "$ldopt" != "no-share" ]; then
echo " suffix of shared libraries............ $sharedsuffix" >> configure.log
echo " options for linking with shared libs.. $ldopt" >> configure.log
fi
echo " dynamically linked compiler........... $sharedcompiler" >> configure.log
echo " dynamically linked bde tools.......... $sharedbde" >> configure.log
echo >> configure.log
if [ "$jvmbackend" = "yes" -o "$jvmbackend" = "force" ]; then
echo "JVM:" >> configure.log
if [ "$posixos" = "cygwin" ]; then
echo " Cygwin dos path......................
fi
echo " java default shell.................... $jshell" >> configure.log
echo " javac.....................
echo " options for compiling java............ $jcflags" >> configure.log
echo " java......................
echo " options for running java.............. $jflags" >> configure.log
echo " options no byte code verification..... $jvflags" >> configure.log
echo " zip.......................
echo " zip flags.....................
echo " jar.......................
fi
echo >> configure.log
if [ "$dotnetbackend" = "yes" -o "$dotnetbackend" = "force" ]; then
echo ".NET:" >> configure.log
if [ "$posixos" = "cygwin" ]; then
echo " Cygwin dos path......................
fi
echo " .NET default shell.................... $dotnetshell" >> configure.log
echo " .NET linker....................
echo " .C# compiler..................
echo " clr.......................
echo " options to run the clr................ $dotnetclropt" >> configure.log
fi
echo >> configure.log
echo "GC configuration:" >> configure.log
if [ $customgc = "yes" ]; then
echo " options for compiling the collector... $cgcflags $cgcfinalflags $gcspecial" >> configure.log
echo " options for compiling with threads.... $gcthread" >> configure.log
else
echo " pre-installed standard GC............. $gclib" >> configure.log
fi
echo >> configure.log
echo "Emacs configuration:" >> configure.log
echo " emacs.....................
echo " emacs brand.....................
if [ $emacsversion = "generic" ]; then
echo " lisp directory.................
else
echo " lisp directory.................
fi
echo >> configure.log
echo "Misc configuration:" >> configure.log
echo " mask for installed files.............. $bmask" >> configure.log
echo >> configure.log
echo "System configuration:" >> configure.log
echo " hardware tuning....................
echo " operating system....................
echo " default executable name............... $aout" >> configure.log
echo >> configure.log
#*------------------------
#* Ok, we are done now */
#*------------------------
if [ "$summary" = "yes" ]; then
echo
echo
echo "** Configuration summary **"
echo
echo "Release features:"
echo " Bigloo release number................. $release"
echo " Bigloo supported backends............. $bcke"
echo " Bigloo default backend................ $defaultbackend"
echo " Bigloo additional APIs................ $apis"
if [ $customgc = "yes" ];then
echo " Bigloo gc........................
else
echo " Bigloo gc........................
fi
echo " Bigloo tuning....................
if [ "$pthreadlibs" = "no" ]; then
echo " support for native threads............ no"
else
echo " support for native threads............ yes"
fi
if [ "$openssllibs" = "no" ]; then
echo " Open SSL support...................
else
echo " Open SSL support...................
fi
if [ "$sqlitelibs" = "no" ]; then
echo " Sqlite support ....................... no"
else
echo " Sqlite support...................
fi
if [ "$ldopt" = "no-share" ]; then
echo " support for dynamic libraries......... no"
else
echo " support for dynamic libraries......... yes"
fi
echo " Bee support...................
echo
echo "Directories where Bigloo will be installed:"
echo " binaries..................
echo " libraries.................
echo " files directory.................
echo " standard zip.......................
if [ "$syszipdir " != "$zipdir " ]; then
echo " standard zip (os dependent)........... $syszipdir"
fi
echo " standard dll.......................
if [ "$sysdlldir " != "$dlldir " ]; then
echo " standard dll (os dependent)........... $sysdlldir"
fi
echo " manual pages.....................
echo " info documentation.............
echo " lisp files.....................
echo " temporary dir.......................
echo
echo "Emacs configuration:"
echo " emacs.....................
echo " emacs brand.....................
if [ $emacsversion = "generic" ]; then
echo " lisp directory.................
else
echo " lisp directory.................
fi
echo
fi
ASKER
Imagine it's the section...
if [ "$cc " = " " ]; then
$autoconfdir/cctest --cc="gcc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
$autoconfdir/cctest --cc="cc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
echo "*** ERROR:configure:Can't configure a C compiler. Aborting";
else
...causing the problem, since gcc can't apparently compile anything?
if [ "$cc " = " " ]; then
$autoconfdir/cctest --cc="gcc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
$autoconfdir/cctest --cc="cc" --user=$user --tmp=$tmp
if [ $? != "0" ]; then
echo "*** ERROR:configure:Can't configure a C compiler. Aborting";
else
...causing the problem, since gcc can't apparently compile anything?
ASKER
AND cctest contains this:
#!/bin/sh
#*======================== ========== ========== ========== ========== =====*/
#* serrano/prgm/project/biglo o/autoconf /cctest */
#* -------------------------- ---------- ---------- ---------- ----- */
#* Author : Manuel Serrano */
#* Creation : Thu Jan 14 10:31:33 1999 */
#* Last change : Wed Mar 6 06:27:48 2002 (serrano) */
#* -------------------------- ---------- ---------- ---------- ----- */
#* Checking the C compiler */
#*======================== ========== ========== ========== ========== =====*/
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* flags */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
cc=gcc
cflags=
tmp=/tmp
user=bigloo
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* We parse the arguments */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
while : ; do
case $1 in
"")
break;;
--user=*)
user="`echo $1 | sed 's/^[-a-z]*=//'`";;
--cc=*|-cc=*)
cc="`echo $1 | sed 's/^[-a-z]*=//'`";;
--cflags=*|-cflags=*)
cflags="`echo $1 | sed 's/^[-a-z]*=//'`";;
--tmp=*|-tmp=*)
tmp="`echo $1 | sed 's/^[-a-z]*=//'`";;
-*)
echo "Unknown option \"$1\", ignored" >&2;;
esac
shift
done
file=$tmp/actest$user
aout=$tmp/Xactest$user
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* compile */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
compile="$cc $cflags $file.c -o $aout >/dev/null 2> /dev/null"
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* The test C file */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if( test -f $file.c ); then
rm -f $file.c || exit $?
fi
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Test */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
cat > $file.c <<EOF
direction( int new_addr )
{
static int *old_addr;
static int flag = 0;
if( !flag )
{
old_addr = &new_addr;
flag = 1;
direction( 2 );
}
else
{
old_addr > &new_addr ? puts( "1" ) : puts( "0" );
}
}
main( int argc, char *argv[] )
{
direction( 1 );
}
EOF
#*------------------------ ---------- ---------- ---------- ---------- -----*/
#* Compilation test */
#*------------------------ ---------- ---------- ---------- ---------- -----*/
if eval $compile 2> /dev/null; then
\rm -f $file.*
exit 0
else
\rm -f $file.*
exit 1
fi
#!/bin/sh
#*========================
#* serrano/prgm/project/biglo
#* --------------------------
#* Author : Manuel Serrano */
#* Creation : Thu Jan 14 10:31:33 1999 */
#* Last change : Wed Mar 6 06:27:48 2002 (serrano) */
#* --------------------------
#* Checking the C compiler */
#*========================
#*------------------------
#* flags */
#*------------------------
cc=gcc
cflags=
tmp=/tmp
user=bigloo
#*------------------------
#* We parse the arguments */
#*------------------------
while : ; do
case $1 in
"")
break;;
--user=*)
user="`echo $1 | sed 's/^[-a-z]*=//'`";;
--cc=*|-cc=*)
cc="`echo $1 | sed 's/^[-a-z]*=//'`";;
--cflags=*|-cflags=*)
cflags="`echo $1 | sed 's/^[-a-z]*=//'`";;
--tmp=*|-tmp=*)
tmp="`echo $1 | sed 's/^[-a-z]*=//'`";;
-*)
echo "Unknown option \"$1\", ignored" >&2;;
esac
shift
done
file=$tmp/actest$user
aout=$tmp/Xactest$user
#*------------------------
#* compile */
#*------------------------
compile="$cc $cflags $file.c -o $aout >/dev/null 2> /dev/null"
#*------------------------
#* The test C file */
#*------------------------
if( test -f $file.c ); then
rm -f $file.c || exit $?
fi
#*------------------------
#* Test */
#*------------------------
cat > $file.c <<EOF
direction( int new_addr )
{
static int *old_addr;
static int flag = 0;
if( !flag )
{
old_addr = &new_addr;
flag = 1;
direction( 2 );
}
else
{
old_addr > &new_addr ? puts( "1" ) : puts( "0" );
}
}
main( int argc, char *argv[] )
{
direction( 1 );
}
EOF
#*------------------------
#* Compilation test */
#*------------------------
if eval $compile 2> /dev/null; then
\rm -f $file.*
exit 0
else
\rm -f $file.*
exit 1
fi
Hi,
Try reinstalling gcc if you haven't already. It is defintely that section that causes it as a result of the cctest script.
Regards,
Lee
Try reinstalling gcc if you haven't already. It is defintely that section that causes it as a result of the cctest script.
Regards,
Lee
ASKER
Not really sure how to do that? It came pre-packaged with MinGW.
Also, another wrench: if I run gcc in a CMD.EXE command prompt, it works fine. If I run it within MinGW, it doesn't.
Also, another wrench: if I run gcc in a CMD.EXE command prompt, it works fine. If I run it within MinGW, it doesn't.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Complete wipe of MSYS/MinGW and reinstall seems to mysteriously fix the problem. I'm still having issues, but I'll bring it up in another question since this one went for a while. Thanks for your suggestions.
Unless I have read that incorrectly it doesn't look as if you have /usr/bin in your path which is where gcc lives in cygwin. Could you run echo $PATH to check?
Regards,
Lee