-
Notifications
You must be signed in to change notification settings - Fork 28
/
configure.ac
108 lines (94 loc) · 2.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
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
# $Id: configure.ac 253 2004-08-09 20:08:52Z sam $
AC_INIT(pwntcha, 0.6)
AC_CONFIG_AUX_DIR(.auto)
AM_INIT_AUTOMAKE([no-define tar-ustar])
AM_CONFIG_HEADER(config.h)
AC_PREREQ(2.50)
dnl AC_CANONICAL_SYSTEM
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_RANLIB
AC_STDC_HEADERS
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_CHECK_FUNCS(getopt_long)
# Use DevIL?
AC_CHECK_HEADERS(IL/il.h,
[ac_cv_my_have_il="yes"],
[ac_cv_my_have_il="no"])
CPPFLAGS="${save_CPPFLAGS}"
AM_CONDITIONAL(USE_IL, test "${ac_cv_my_have_il}" = "yes")
# Use Windows?
AC_CHECK_HEADERS(olectl.h,
[ac_cv_my_have_ole="yes"],
[ac_cv_my_have_ole="no"])
CPPFLAGS="${save_CPPFLAGS}"
AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
# Use SDL?
ac_cv_my_have_sdl="no"
save_CPPFLAGS="${CPPFLAGS}"
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
if test "${SDL_CONFIG}" != "no"; then
CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
fi
AC_CHECK_HEADERS(SDL_image.h,
[ac_cv_my_have_sdl="yes"],
[ac_cv_my_have_sdl="no"])
CPPFLAGS="${save_CPPFLAGS}"
AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
# Use OpenCV?
ac_cv_my_have_opencv="no"
save_CPPFLAGS="${CPPFLAGS}"
pkg-config opencv --exists
if test "$?" != "1"; then
OPENCV_CONFIG="pkg-config opencv"
else
OPENCV_CONFIG="no"
fi
#AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
if test "${OPENCV_CONFIG}" != "no"; then
CPPFLAGS="${CPPFLAGS} `pkg-config opencv --cflags`"
fi
AC_CHECK_HEADERS(cv.h,
[ac_cv_my_have_opencv="yes"],
[ac_cv_my_have_opencv="no"])
CPPFLAGS="${save_CPPFLAGS}"
AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
# Use Imlib2?
ac_cv_my_have_imlib2="no"
save_CPPFLAGS="${CPPFLAGS}"
AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
if test "${IMLIB2_CONFIG}" != "no"; then
CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
fi
AC_CHECK_HEADERS(Imlib2.h,
[ac_cv_my_have_imlib2="yes"],
[ac_cv_my_have_imlib2="no"])
CPPFLAGS="${save_CPPFLAGS}"
AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
if test "${ac_cv_my_have_il}" = "no" -a "${ac_cv_my_have_ole}" = "no" -a "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then
AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
fi
AC_OUTPUT([
Makefile
src/Makefile
src/authimage/Makefile
src/clubic/Makefile
src/htmlformguide/Makefile
src/java/Makefile
src/linuxfr/Makefile
src/livejournal/Makefile
src/lmt/Makefile
src/movabletype/Makefile
src/paypal/Makefile
src/phpbb/Makefile
src/scode/Makefile
src/slashdot/Makefile
src/ticketmaster/Makefile
src/tickets/Makefile
src/vbulletin/Makefile
src/xanga/Makefile
extras/Makefile
])