source: pwntcha/trunk/configure.ac @ 435

Last change on this file since 435 was 435, checked in by Sam Hocevar, 15 years ago
  • Win32 support!!
File size: 1.9 KB
Line 
1# $Id: configure.ac 253 2004-08-09 20:08:52Z sam $
2
3AC_INIT(src/main.c)
4
5AC_PREREQ(2.50)
6AC_CONFIG_AUX_DIR(autotools)
7AC_CANONICAL_SYSTEM
8
9AM_INIT_AUTOMAKE(pwntcha, 0.3)
10AM_CONFIG_HEADER(config.h)
11
12AC_PROG_CC
13AM_PROG_CC_C_O
14AC_PROG_CXX
15AC_STDC_HEADERS
16
17AC_C_CONST
18AC_C_INLINE
19AC_TYPE_SIZE_T
20
21AC_CHECK_FUNCS(getopt_long)
22
23# Use Windows?
24AC_CHECK_HEADERS(olectl.h,
25 [ac_cv_my_have_ole="yes"],
26 [ac_cv_my_have_ole="no"])
27CPPFLAGS="${save_CPPFLAGS}"
28AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
29
30# Use SDL?
31ac_cv_my_have_sdl="no"
32save_CPPFLAGS="${CPPFLAGS}"
33AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
34if test "${SDL_CONFIG}" != "no"; then
35  CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
36fi
37AC_CHECK_HEADERS(SDL_image.h,
38 [ac_cv_my_have_sdl="yes"],
39 [ac_cv_my_have_sdl="no"])
40CPPFLAGS="${save_CPPFLAGS}"
41AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
42
43# Use OpenCV?
44ac_cv_my_have_opencv="no"
45save_CPPFLAGS="${CPPFLAGS}"
46AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
47if test "${OPENCV_CONFIG}" != "no"; then
48  CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
49fi
50AC_CHECK_HEADERS(cv.h,
51 [ac_cv_my_have_opencv="yes"],
52 [ac_cv_my_have_opencv="no"])
53CPPFLAGS="${save_CPPFLAGS}"
54AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
55
56# Use Imlib2?
57ac_cv_my_have_imlib2="no"
58save_CPPFLAGS="${CPPFLAGS}"
59AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
60if test "${IMLIB2_CONFIG}" != "no"; then
61  CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
62fi
63AC_CHECK_HEADERS(Imlib2.h,
64 [ac_cv_my_have_imlib2="yes"],
65 [ac_cv_my_have_imlib2="no"])
66CPPFLAGS="${save_CPPFLAGS}"
67AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
68
69if test "${ac_cv_my_have_sdl}" = "yes" -a "${ac_cv_my_have_imlib2}" = "no" -a "${ac_cv_my_have_opencv}" = "no"; then
70  AC_MSG_ERROR([[cannot find SDL_Image, Imlib2 or OpenCV, please install one of them]])
71fi
72
73AC_OUTPUT([
74  Makefile
75  src/Makefile
76  extras/Makefile
77  share/Makefile
78])
79
Note: See TracBrowser for help on using the repository browser.