You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to do what I mentioned in the subject. stklos.c is very small, and a simple C program embedding STklos couldbe even smaller, since it wouldn't need to process command line options.
But I found a problem:
Currnetly it seems that the STklos build process doesn't use libtool. If I change src/Makefile.am to build libstklos and add LT_INIT to configure.ac, the configure script stops detecting the OS (???):
SUMMARY
*******
System: -
OS nick: _
OS type:
Install prefix : /usr/local
C compiler: gcc
Compilation flags: -g -O2
Loader: /usr/bin/ld -m elf_x86_64
Thread support: pthreads
Case sensitivity: true (by default)
Control fx parameters: yes
System libraries used: libffi libpcre libgmp libgc
Compiled libraries:
And then (of course) compilation fails, because it depends on those variables.
I tried to understand how configure.ac detects the operating system, and I really don't get it: as far as I understand, the "OS" variable is not available, except on Windows (is that correct). But it is used in configure.ac:
BUILD_OS=$os-$version
BUILD_ARCH=`uname -m`
OS_NAME=$OS
case $OS in
LINUX) ...
The only variables related to operating systems that I thought would come from autotools would be $host_os and $build_os, which people ten do recommend using as follows:
AC_CANONICAL_HOST
build_linux=no
build_windows=no
build_mac=no
case "${host_os}" in
linux*)
build_linux=yes
;;
cygwin*|mingw*)
build_windows=yes
;;
darwin*)
build_mac=yes
;;
*)
AC_MSG_ERROR(["$host_os is not supported"])
;;
esac
AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
AM_CONDITIONAL([WINDOWS], [test "$build_windows" = "yes"])
AM_CONDITIONAL([OSX], [test "$build_mac" = "yes"])
But I'm really no autotools expert.
How's the status of supported platforms today, and how can we make configure.ac better?
It would be really nice to have a libstklos separate from the binary.
The text was updated successfully, but these errors were encountered:
Ah, I see - utils/shlib-options sets those variables! I put LT_INIT after utils/shlib-options is used, and it seems to work. I'll keep working on this, maybe we'll have embedded STklos soon.
jpellegrini
changed the title
Split stlkos into library + exacutable REPL, and we'd have embedded STklos
Split stlkos into library + executable REPL, and we'd have embedded STklos
Sep 18, 2021
Hi @egallesio !
I was trying to do what I mentioned in the subject.
stklos.c
is very small, and a simple C program embedding STklos couldbe even smaller, since it wouldn't need to process command line options.But I found a problem:
Currnetly it seems that the STklos build process doesn't use libtool. If I change
src/Makefile.am
to buildlibstklos
and addLT_INIT
toconfigure.ac
, the configure script stops detecting the OS (???):And then (of course) compilation fails, because it depends on those variables.
I tried to understand how
configure.ac
detects the operating system, and I really don't get it: as far as I understand, the "OS
" variable is not available, except on Windows (is that correct). But it is used inconfigure.ac
:The only variables related to operating systems that I thought would come from autotools would be
$host_os
and$build_os
, which people ten do recommend using as follows:But I'm really no autotools expert.
How's the status of supported platforms today, and how can we make
configure.ac
better?It would be really nice to have a
libstklos
separate from the binary.The text was updated successfully, but these errors were encountered: