Import version 0.1 to GIT
[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 AC_ARG_ENABLE(graphicsmagick,
51         [AS_HELP_STRING(
52                 [--disable-graphicsmagick],
53                 [Disable building graphicsmagick]
54         )],
55         [enable_graphicsmagick=$enableval], [enable_graphicsmagick="yes"])
56 if test x"$enable_graphicsmagick" = x"yes"
57 then
58         PKG_CHECK_MODULES(GRAPHICSMAGICK, GraphicsMagick >= 1.3.16, , enable_graphicsmagick=no)
59 fi
60 if test x"$enable_graphicsmagick" = x"yes"
61 then
62         somethingmagick=yes
63 fi
64
65 AC_ARG_ENABLE(imagemagick,
66         [AS_HELP_STRING(
67                 [--disable-imagemagick],
68                 [Disable building imagemagick]
69         )],
70         [enable_imagemagick=$enableval], [enable_imagemagick="yes"])
71 if test x"$enable_imagemagick" = x"yes"
72 then
73         PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick >= 6.0.0, , enable_imagemagick=no)
74 fi
75 if test x"$enable_imagemagick" = x"yes"
76 then
77         somethingmagick=yes
78 fi
79
80 AM_CONDITIONAL(ENABLE_MAGICK, test x"$somethingmagick" = x"yes")
81
82 AC_ARG_ENABLE(opencv,
83         [AS_HELP_STRING(
84                 [--disable-opencv],
85                 [Disable building opencv]
86         )],
87         [enable_opencv=$enableval], [enable_opencv="yes"])
88 if test x"$enable_opencv" = x"yes"
89 then
90         PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1, , enable_opencv=no)
91 fi
92 AM_CONDITIONAL(ENABLE_OPENCV, test x"$enable_opencv" = x"yes")
93
94 AC_OUTPUT(
95     libcolorize.pc
96     lib/Makefile
97     src/Makefile
98     tools/Makefile
99     gui/Makefile
100     Makefile)
101
102 AS_IF([test "x$have_windows" == xno],[AC_MSG_NOTICE( Compiling for Unix )],[AC_MSG_NOTICE([ Compiling for Windows ])])
103
104 AS_IF([test "x$enable_gui" == xyes],[AC_MSG_NOTICE( Compiled with GTK (GUI) )],[AC_MSG_NOTICE([
105
106 ** Not compiled with GTK (GUI) support **
107
108 In order to use GUI, GTK+ 2.0 or higher must be installed.
109
110 ])])
111 AS_IF([test "x$somethingmagick" == xyes],[AC_MSG_NOTICE( Compiled with ImageMagick or GraphicsMagick )],[AC_MSG_NOTICE([
112
113 ** Not compiled with GraphicsMagick and ImageMagick support **
114
115 Only PPM image files can be loaded and saved.
116
117 ])])
118 AS_IF([test "x$enable_opencv" == xyes],[AC_MSG_NOTICE( Compiled with OpenCV )],[AC_MSG_NOTICE([
119
120 ** Not compiled with OpenCV support **
121
122 It will not be possible to calculate motion flow vectors to improve colorization of moving objects.
123
124 ])])
125 AS_IF([test "x$with_debug_algo" == xyes],[AC_MSG_NOTICE( Compiled with debugging )],[])
126