Blame docs/build-shared-library.md

Packit bfcc33
This page is mostly intended for people that want to build a system library that gets distributed via RPMs or other means. This is currently in a experimental phase, as we currently do not really guarantee any ABI forward compatibility. The C API was rewritten to make this possible in the future, but we want to wait some more time till we can call this final and stable.
Packit bfcc33
Packit bfcc33
Building via autotools
Packit bfcc33
--
Packit bfcc33
Packit bfcc33
You want to build a system library only via autotools, since it will create the proper `libtool` files to make it loadable on multiple systems. We hope this works correctly, but nobody of the `libsass` core team has much knowledge in this area. Therefore we are open for comments or improvements by people that have more experience in that matter (like package maintainers from various linux distributions).
Packit bfcc33
Packit bfcc33
```bash
Packit bfcc33
apt-get install autoconf libtool
Packit bfcc33
git clone https://github.com/sass/libsass.git
Packit bfcc33
cd libsass
Packit bfcc33
autoreconf --force --install
Packit bfcc33
./configure \
Packit bfcc33
  --disable-tests \
Packit bfcc33
  --disable-static \
Packit bfcc33
  --enable-shared \
Packit bfcc33
  --prefix=/usr
Packit bfcc33
make -j5 install
Packit bfcc33
cd ..
Packit bfcc33
```
Packit bfcc33
Packit bfcc33
This should install these files
Packit bfcc33
```bash
Packit bfcc33
# $ ls -la /usr/lib/libsass.*
Packit bfcc33
/usr/lib/libsass.la
Packit bfcc33
/usr/lib/libsass.so -> libsass.so.0.0.9
Packit bfcc33
/usr/lib/libsass.so.0 -> libsass.so.0.0.9
Packit bfcc33
/usr/lib/libsass.so.0.0.9
Packit bfcc33
# $ ls -la /usr/include/sass*
Packit bfcc33
/usr/include/sass.h
Packit bfcc33
/usr/include/sass2scss.h
Packit bfcc33
/usr/include/sass/context.h
Packit bfcc33
/usr/include/sass/functions.h
Packit bfcc33
/usr/include/sass/values.h
Packit bfcc33
```