forked from jamierumbelow/sassphp
-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathconfig.m4
25 lines (19 loc) · 920 Bytes
/
config.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
PHP_ARG_ENABLE(sass, [whether to enable sass extension],
[ --enable-sass Enable sass extension], yes, yes)
if test "$PHP_SASS" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH(sass, lib/libexec, LIBSASS_SHARED_LIBADD)
CFLAGS="-I$(pwd)/lib/libsass/include $CFLAGS"
CXXFLAGS="-I$(pwd)/lib/libsass/include $CXXFLAGS"
LDFLAGS="-lsass -L"`pwd`"/lib/libsass/lib/ -lstdc++"
# manually extract sass version as the non-autotool'ed
# sass_version.h that comes with libsass doesn't contain
# the version
sass_version=$(cd lib/libsass && ./version.sh)
if test "x$sass_version" != "x" ; then
# escape hell. This is what we need to pass to the
# compiler: -DLIBSASS_VERSION="\"'3.2.5\""
CFLAGS="-DLIBSASS_VERSION=\"\\\"$sass_version\\\"\" $CFLAGS"
CXXFLAGS="-DLIBSASS_VERSION=\"\\\"$sass_version\\\"\" $CXXFLAGS"
fi
PHP_NEW_EXTENSION(sass, src/sass.c src/utilities.c, $ext_shared)
fi