-
Notifications
You must be signed in to change notification settings - Fork 9
/
configure.in
125 lines (115 loc) · 2.96 KB
/
configure.in
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
AC_PREREQ(2.59)
AC_INIT(mod_small_light, 1.1.1)
AC_PROG_CC
# apxs
AC_ARG_WITH(
apxs,
AC_HELP_STRING([--with-apxs=FILE], [location of the apxs program]),
[if test -x $withval; then
APXS=$withval
AC_SUBST(APXS)
else
AC_MSG_ERROR([apxs not found])
fi],
AC_MSG_ERROR([--with-apxs option must be specified])
)
# imlib2
AC_MSG_CHECKING(whether to enable imlib2 support)
AC_ARG_WITH(
imlib2,
AC_HELP_STRING([--without-imlib2], [disable imlib2 support]),
ENABLE_IMLIB2=$withval,
ENABLE_IMLIB2="auto"
)
AC_MSG_RESULT($ENABLE_IMLIB2)
if test "$ENABLE_IMLIB2" != "no"; then
AC_ARG_WITH(
imlib2-config,
AC_HELP_STRING([--with-imlib2-config=FILE], [location of the imlib2-config program]),
[if test -x $withval; then
IMLIB2_CONFIG=$withval
else
AC_MSG_ERROR([imlib2-config not found])
fi]
)
if test "$IMLIB2_CONFIG" = ""; then
AC_PATH_PROG(
IMLIB2_CONFIG,
imlib2-config,
[],
/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
)
if test "$IMLIB2_CONFIG" = ""; then
AC_MSG_ERROR([imlib2 not found])
fi
fi
AC_SUBST(IMLIB2_CONFIG)
CFLAGS_IMLIB2="-DENABLE_IMLIB2"
AC_SUBST(CFLAGS_IMLIB2)
fi
# ImageMagick
AC_MSG_CHECKING(whether to enable Wand support)
AC_ARG_WITH(
Wand,
AC_HELP_STRING([--without-Wand], [disable Wand support]),
ENABLE_WAND=$withval,
ENABLE_WAND="auto"
)
AC_MSG_RESULT($ENABLE_WAND)
if test "$ENABLE_WAND" != "no"; then
AC_ARG_WITH(
Wand-config,
AC_HELP_STRING([--with-Wand-config=FILE], [location of the Wand-config program]),
[if test -x $withval; then
WAND_CONFIG=$withval
else
AC_MSG_ERROR([Wand-config not found])
fi]
)
if test "$WAND_CONFIG" = ""; then
AC_PATH_PROG(
WAND_CONFIG,
Wand-config,
[],
/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
)
if test "$WAND_CONFIG" = ""; then
AC_MSG_ERROR([Wand not found])
fi
fi
AC_SUBST(WAND_CONFIG)
CFLAGS_WAND="-DENABLE_WAND"
AC_SUBST(CFLAGS_WAND)
fi
# libjpeg
AC_MSG_CHECKING(whether to enable jpeg support)
AC_ARG_WITH(
jpeg,
AC_HELP_STRING([--without-jpeg], [disable jpeg support]),
ENABLE_JPEG=$withval,
ENABLE_JPEG="auto"
)
AC_MSG_RESULT($ENABLE_JPEG)
if test "$ENABLE_JPEG" != "no"; then
HAVE_JPEG=yes
AC_CHECK_HEADER(
jpeglib.h,
[],
[HAVE_JPEG="no"]
)
AC_CHECK_LIB(
jpeg, jpeg_start_compress,
[],
[HAVE_JPEG="no"]
)
if test "$ENABLE_JPEG" != "auto" && test "$HAVE_JPEG" = "no"; then
AC_MSG_ERROR([libjpeg not found])
fi
if test "$HAVE_JPEG" = "yes"; then
CFLAGS_JPEG="-DENABLE_JPEG"
AC_SUBST(CFLAGS_JPEG)
LIBS_JPEG="-ljpeg"
AC_SUBST(LIBS_JPEG)
fi
fi
AC_OUTPUT(Makefile)