source: libpipi/trunk/configure.ac @ 2693

Last change on this file since 2693 was 2693, checked in by Sam Hocevar, 15 years ago
  • Start working on "pipi", a command-line libpipi tool. It will be similar to convert, display, mogrify, animate etc. It can already convert between image formats (eg. "pipi src.png -o dest.jpeg").
File size: 3.1 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 getopt.h)
29
30ac_cv_have_getopt_long="no"
31AC_CHECK_FUNCS(getopt_long,
32 [ac_cv_have_getopt_long="yes"],
33 [AC_CHECK_LIB(gnugetopt, getopt_long,
34   [ac_cv_have_getopt_long="yes"
35    GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
36if test "$ac_cv_have_getopt_long" != "no"; then
37  AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)
38fi
39AM_CONDITIONAL(NEED_GETOPT_LONG, test "$ac_cv_have_getopt_long" = "no")
40AC_SUBST(GETOPT_LIBS)
41
42# Optimizations
43CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
44# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
45CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
46
47# Use DevIL?
48#AC_CHECK_HEADERS(IL/il.h,
49# [ac_cv_my_have_il="yes"],
50# [ac_cv_my_have_il="no"])
51#CPPFLAGS="${save_CPPFLAGS}"
52#AM_CONDITIONAL(USE_IL, test "${ac_cv_my_have_il}" = "yes")
53
54# Use Windows?
55#AC_CHECK_HEADERS(olectl.h,
56# [ac_cv_my_have_ole="yes"],
57# [ac_cv_my_have_ole="no"])
58#CPPFLAGS="${save_CPPFLAGS}"
59#AM_CONDITIONAL(USE_OLE, test "${ac_cv_my_have_ole}" = "yes")
60
61# Use SDL?
62ac_cv_my_have_sdl="no"
63save_CPPFLAGS="${CPPFLAGS}"
64AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
65if test "${SDL_CONFIG}" != "no"; then
66  CPPFLAGS="${CPPFLAGS} `sdl-config --cflags`"
67fi
68AC_CHECK_HEADERS(SDL_image.h,
69 [ac_cv_my_have_sdl="yes"],
70 [ac_cv_my_have_sdl="no"])
71CPPFLAGS="${save_CPPFLAGS}"
72if test "${ac_cv_my_have_sdl}" != "no"; then
73  AC_DEFINE(USE_SDL, 1, Define to 1 to use SDL_image)
74fi
75AM_CONDITIONAL(USE_SDL, test "${ac_cv_my_have_sdl}" = "yes")
76
77# Use OpenCV?
78ac_cv_my_have_opencv="no"
79OPENCV="no"
80PKG_CHECK_MODULES(OPENCV, opencv, [ac_cv_my_have_opencv="yes"])
81if test "${ac_cv_my_have_opencv}" != "no"; then
82  AC_DEFINE(USE_OPENCV, 1, Define to 1 to use OpenCV)
83fi
84AM_CONDITIONAL(USE_OPENCV, test "${ac_cv_my_have_opencv}" = "yes")
85
86# Use Imlib2?
87ac_cv_my_have_imlib2="no"
88IMLIB2="no"
89PKG_CHECK_MODULES(IMLIB2, imlib2, [ac_cv_my_have_imlib2="yes"])
90if test "${ac_cv_my_have_imlib2}" != "no"; then
91  AC_DEFINE(USE_IMLIB2, 1, Define to 1 to use Imlib2)
92fi
93AM_CONDITIONAL(USE_IMLIB2, test "${ac_cv_my_have_imlib2}" = "yes")
94
95if 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
96  AC_MSG_ERROR([[cannot find DevIL, OLE, SDL_Image, Imlib2 or OpenCV, please install one of them]])
97fi
98
99AC_CONFIG_FILES([
100  Makefile
101  pipi/Makefile
102  src/Makefile
103  genethumb/Makefile
104  examples/Makefile
105  test/Makefile
106])
107AC_CONFIG_FILES([
108  pipi/pipi.pc
109])
110
111AC_OUTPUT
112
Note: See TracBrowser for help on using the repository browser.