Fix run length encoding of marked image, bump to version 0.8
[colorize.git] / configure.ac
1 dnl Process this file with autoconf to produce a configure script
2 AC_INIT([colorize],
3         m4_esyscmd([./git-version-gen .tarball-version]),
4         [authors@their.domains])
5
6 AM_INIT_AUTOMAKE([dist-bzip2])
7
8 AC_CONFIG_MACRO_DIR([m4])
9
10 dnl kernel style compile messages
11 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
12
13 dnl checks for programs
14 AC_PROG_MAKE_SET
15 AC_PROG_CC
16 AC_PROG_CXX
17 AC_PROG_INSTALL
18 LT_INIT
19
20 dnl checks for header files
21 AC_HEADER_STDC
22
23 dnl Checks for typedefs, structures and compiler characteristics
24
25 AC_CANONICAL_HOST
26
27 have_windows="no"
28 case "$host_os" in
29         mingw*)
30                 have_windows="yes"
31         ;;
32 esac 
33 AM_CONDITIONAL(HAVE_WINDOWS, test x"$have_windows" = x"yes")
34
35 dnl checks for libraries
36 AC_ARG_ENABLE(gui,
37         [AS_HELP_STRING(
38                 [--disable-gui],
39                 [Disable building gui]
40         )],
41         [enable_gui=$enableval], [enable_gui="yes"])
42 if test x"$enable_gui" = x"yes"
43 then
44         PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.0, , enable_gui=no)
45 fi
46 AM_CONDITIONAL(ENABLE_GUI, test x"$enable_gui" = x"yes")
47
48 somethingmagick=no
49
50 # disabled due to problems with api compatibilty with imagemagick
51 #AC_ARG_ENABLE(graphicsmagick,
52 #       [AS_HELP_STRING(
53 #               [--disable-graphicsmagick],
54 #               [Disable building graphicsmagick]
55 #       )],
56 #       [enable_graphicsmagick=$enableval], [enable_graphicsmagick="yes"])
57 #if test x"$enable_graphicsmagick" = x"yes"
58 #then
59 #       PKG_CHECK_MODULES(GRAPHICSMAGICK, GraphicsMagick >= 1.3.16, , enable_graphicsmagick=no)
60 #fi
61 #if test x"$enable_graphicsmagick" = x"yes"
62 #then
63 #       somethingmagick=yes
64 #fi
65
66 AC_ARG_ENABLE(imagemagick,
67         [AS_HELP_STRING(
68                 [--disable-imagemagick],
69                 [Disable building imagemagick]
70         )],
71         [enable_imagemagick=$enableval], [enable_imagemagick="yes"])
72 if test x"$enable_imagemagick" = x"yes"
73 then
74         PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick >= 6.0.0, , enable_imagemagick=no)
75 fi
76 if test x"$enable_imagemagick" = x"yes"
77 then
78         somethingmagick=yes
79 fi
80
81 AM_CONDITIONAL(ENABLE_MAGICK, test x"$somethingmagick" = x"yes")
82
83 AC_ARG_ENABLE(opencv,
84         [AS_HELP_STRING(
85                 [--disable-opencv],
86                 [Disable building opencv]
87         )],
88         [enable_opencv=$enableval], [enable_opencv="yes"])
89 if test x"$enable_opencv" = x"yes"
90 then
91         PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1, , enable_opencv=no)
92 fi
93 AM_CONDITIONAL(ENABLE_OPENCV, test x"$enable_opencv" = x"yes")
94
95 AC_OUTPUT(
96     libcolorize.pc
97     lib/Makefile
98     src/Makefile
99     tools/Makefile
100     gui/Makefile
101     gui/buttons/Makefile
102     Makefile)
103
104 AS_IF([test "x$have_windows" == xno],[AC_MSG_NOTICE( Compiling for Unix )],[AC_MSG_NOTICE([ Compiling for Windows ])])
105
106 AS_IF([test "x$enable_gui" == xyes],[AC_MSG_NOTICE( Compiling with GTK (GUI) )],[AC_MSG_NOTICE([
107
108 ** Not compiling with GTK (GUI) support **
109
110 In order to use GUI, GTK+ 2.0 or higher must be installed.
111
112 ])])
113 AS_IF([test "x$somethingmagick" == xyes],[AC_MSG_NOTICE( Compiling with ImageMagick )],[AC_MSG_NOTICE([
114
115 ** Not compiling with ImageMagick support **
116
117 Only PPM image files can be loaded and saved.
118
119 ])])
120 AS_IF([test "x$enable_opencv" == xyes],[AC_MSG_NOTICE( Compiling with OpenCV )],[AC_MSG_NOTICE([
121
122 ** Not compiling with OpenCV support **
123
124 It will not be possible to calculate motion flow vectors to improve colorization of moving objects.
125
126 ])])
127 AS_IF([test "x$with_debug_algo" == xyes],[AC_MSG_NOTICE( Compiling with debugging )],[])
128