source: libpipi/trunk/configure.ac @ 2244

Last change on this file since 2244 was 2228, checked in by Sam Hocevar, 15 years ago
  • Import image loading features from PWNtcha. As they are more than 4-year old, they will certainly require some cleanup, eg. pkg-config transitions.
File size: 2.6 KB
Line 
1# $Id$
2
3AC_INIT(libpipi, 0.0)
4AC_CONFIG_AUX_DIR(.auto)
5AM_INIT_AUTOMAKE([no-define tar-ustar])
6dnl AM_MAINTAINER_MODE
7
8AM_CONFIG_HEADER(config.h)
9
10AM_PROG_CC_C_O
11AC_PROG_CPP
12
13LT_MAJOR="0"
14LT_MINOR="99"
15LT_MICRO="13"
16AC_SUBST(LT_MAJOR)
17AC_SUBST(LT_MINOR)
18AC_SUBST(LT_MICRO)
19LT_VERSION="$LT_MAJOR:$LT_MINOR:$LT_MICRO"
20AC_SUBST(LT_VERSION)
21AC_LIBTOOL_WIN32_DLL
22AM_PROG_LIBTOOL
23AC_LIBTOOL_CXX
24
25AC_C_CONST
26AC_C_INLINE
27
28AC_CHECK_HEADERS(stdio.h stdarg.h inttypes.h endian.h stdint.h)
29
30# Optimizations
31CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
32# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
33CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
34
35# Use DevIL?
36#AC_CHECK_HEADERS(IL/il.h,
37# [ac_cv_my_have_il="yes"],
38# [ac_cv_my_have_il="no"])
39#CPPFLAGS="${save_CPPFLAGS}"
40#AM_CONDITIONAL(USE_IL, test "${ac_cv_my_have_il}" = "yes")
41
42# Use Windows?
43#AC_CHECK_HEADERS(olectl.h,
44# [ac_cv_my_have_ole="yes"],
45# [ac_cv_my_have_ole="no"])
46#CPPFLAGS="${save_CPPFLAGS}"
47#AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
48
49# Use SDL?
50ac_cv_my_have_sdl="no"
51save_CPPFLAGS="${CPPFLAGS}"
52AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
53if test "${SDL_CONFIG}" != "no"; then
54  CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
55fi
56AC_CHECK_HEADERS(SDL_image.h,
57 [ac_cv_my_have_sdl="yes"],
58 [ac_cv_my_have_sdl="no"])
59CPPFLAGS="${save_CPPFLAGS}"
60AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
61
62# Use OpenCV?
63ac_cv_my_have_opencv="no"
64save_CPPFLAGS="${CPPFLAGS}"
65AC_PATH_PROG(OPENCV_CONFIG, opencv-config, no)
66if test "${OPENCV_CONFIG}" != "no"; then
67  CPPFLAGS="${CPPFLAGS} `opencv-config --cflags`"
68fi
69AC_CHECK_HEADERS(cv.h,
70 [ac_cv_my_have_opencv="yes"],
71 [ac_cv_my_have_opencv="no"])
72CPPFLAGS="${save_CPPFLAGS}"
73AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
74
75# Use Imlib2?
76ac_cv_my_have_imlib2="no"
77IMLIB2="no"
78PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"])
79AC_MSG_RESULT($ac_cv_my_have_imlib2)
80if test "${ac_cv_my_have_imlib2}" != "no"; then
81  AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
82fi
83AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
84
85if 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
86  AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
87fi
88
89AC_CONFIG_FILES([
90  Makefile
91  pipi/Makefile
92  genethumb/Makefile
93])
94AC_CONFIG_FILES([
95  pipi/pipi.pc
96])
97
98AC_OUTPUT
99
Note: See TracBrowser for help on using the repository browser.