forked from BramvdKroef/clessc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
61 lines (53 loc) · 1.67 KB
/
configure.ac
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
AC_INIT([LESS CSS Compiler], [1.0], [[email protected]], [clessc], [https://github.com/BramvdKroef/clessc])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_PROG_RANLIB
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
# libpng support
AC_ARG_WITH([libpng],
[AS_HELP_STRING([--without-libpng],
[Compile without libpng])])
AS_IF([test "x$with_libpng" != "xno"], [
PKG_CHECK_MODULES([LIBPNG], [libpng >= 1.2],
[AC_DEFINE(WITH_LIBPNG, 1, [Compile with libpng])],
[AC_MSG_FAILURE(
[libpng not found, use configure with --without-libpng to disable
png support])]
)
])
# libjpeg support
AC_ARG_WITH([libjpeg],
[AS_HELP_STRING([--without-libjpeg],
[Compile without libjpeg])])
LIBJPEG_LIBS=
AS_IF([test "x$with_libjpeg" != "xno"], [
AC_CHECK_LIB([jpeg], [jpeg_mem_src],
[AC_CHECK_HEADER([jpeglib.h],
[],
[AC_MSG_FAILURE([libjpeg headers were not found in the compiler's include path.])])
AC_SUBST([LIBJPEG_LIBS], ["-ljpeg"])
AC_DEFINE(WITH_LIBJPEG, 1, [Compile with libjpeg])],
[AC_MSG_FAILURE(
[libjpeg not found, use configure with --without-libjpeg to disable
jpeg support])]
)
])
# google glog support
AC_ARG_WITH([libglog],
[AS_HELP_STRING([--without-libglog],
[Compile without libglog])])
AS_IF([test "x$with_libglog" != "xno"], [
PKG_CHECK_MODULES([LIBGLOG], [libglog >= 0.3],
[AC_DEFINE(WITH_LIBGLOG, 1, [Compile with libglog])],
[AC_MSG_FAILURE(
[libglog not found, use configure with --without-libglog to disable
glog support (glog is only needed for debugging)])]
)
])
AC_CONFIG_FILES([
Makefile
src/Makefile
tests/Makefile
])
AC_OUTPUT