source: configure.ac @ b09a0e

Revision b09a0e, 4.0 KB checked in by Jaromil <jaromil@…>, 15 months ago (diff)

documentation for a new release

  • Property mode set to 100644
Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59c)
5AC_INIT(frei0r-plugins, [1.3.0], [frei0r-devel@piksel.no])
6AC_CONFIG_MACRO_DIR([m4])
7
8AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
9
10# Checks for programs.
11AC_PROG_CXX
12AC_PROG_CC
13AC_PROG_CC_C99
14LT_INIT([disable-static])
15
16
17AC_CONFIG_HEADERS([include/config.h])
18
19if test "x${prefix}" = "xNONE"; then
20   prefix=${ac_default_prefix}
21fi
22PACKAGE_LIB_DIR="${prefix}/lib/frei0r-1"
23AC_SUBST(PACKAGE_LIB_DIR)
24PACKAGE_DATA_DIR="${prefix}/share/frei0r-1"
25AC_SUBST(PACKAGE_DATA_DIR)
26
27AC_MSG_CHECKING([host platform])
28case $host_os in
29    *linux*)
30        AC_MSG_RESULT([Linux])
31        have_linux=yes
32        ;;
33    *freebsd*)
34        AC_MSG_RESULT([FreeBSD])
35        have_freebsd=yes
36        ;;
37    *darwin*)
38        AC_MSG_RESULT([Darwin/OSX])
39        have_darwin=yes
40        ;;
41    *)
42        AC_MSG_RESULT([ $host_os ? ... let us try])
43        ;;
44esac
45
46AC_ARG_ENABLE(cpuflags,
47               [  --enable-cpuflags       compile with advanced cpu instructions (yes)],
48               [
49                if test ! x$enableval = xyes; then
50                    have_cpuflags=no
51                else
52                    have_cpuflags=yes;
53                fi ],[ have_cpuflags=yes ])
54
55if test x$have_cpuflags = xyes; then
56  if test x$have_linux = xyes; then
57     CPUFLAGS=`cat /proc/cpuinfo | grep flags`
58     if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then
59       have_mmx=yes
60       AC_DEFINE(HAVE_MMX,1,[define if enabling MMX acceleration])
61     fi
62     if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then
63       have_sse=yes
64       AC_DEFINE(HAVE_SSE,1,[define if enabling SSE acceleration])
65     fi
66     if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then
67       have_sse=yes
68       AC_DEFINE(HAVE_SSE2,1,[define if enabling SSE2 acceleration])
69     fi
70     if grep "^flags.* ssse3" /proc/cpuinfo > /dev/null; then
71       have_ssse3=yes
72       AC_DEFINE(HAVE_SSSE3,1,[define if enabling SSSE3 acceleration])
73     fi
74  fi
75  if test x$have_freebsd = xyes; then
76        if sysctl -n hw.instruction_sse; then
77            have_mmx=yes
78            AC_DEFINE(HAVE_MMX,1,[define if enabling MMX acceleration])
79        fi
80  fi
81fi
82
83# Checks for header files.
84AC_HEADER_STDC
85AC_CHECK_HEADERS([float.h inttypes.h limits.h stdlib.h string.h])
86
87# Checks for typedefs, structures, and compiler characteristics.
88AC_HEADER_STDBOOL
89AC_C_CONST
90AC_C_INLINE
91
92# Checks for library functions.
93AC_FUNC_MALLOC
94AC_CHECK_FUNCS([floor memset pow sqrt])
95
96HAVE_OPENCV=false
97PKG_CHECK_MODULES(OPENCV, opencv >= 1.0.0, [HAVE_OPENCV=true], [true])
98AM_CONDITIONAL([HAVE_OPENCV], [test x$HAVE_OPENCV = xtrue])
99if test x$HAVE_OPENCV = xtrue; then
100#    OPENCV_CFLAGS="$OPENCV_CFLAGS -DOPENCV_PREFIX=`pkg-config opencv --variable=prefix`"
101    AC_DEFINE(HAVE_OPENCV,1,[compiled including opencv])
102    AC_DEFINE(OPENCV_DATA_DIR,[${prefix}/share/opencv],opencv data prefix)
103fi
104AC_SUBST(HAVE_OPENCV)
105
106HAVE_GAVL=false
107PKG_CHECK_MODULES(GAVL, gavl >= 0.2.3, [HAVE_GAVL=true], [true])
108AM_CONDITIONAL([HAVE_GAVL], [test x$HAVE_GAVL = xtrue])
109
110AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
111
112
113AC_CONFIG_FILES([
114  frei0r.pc
115  Makefile
116  include/Makefile
117  src/Makefile
118  doc/Makefile
119])
120
121AC_OUTPUT
122
123echo
124echo
125echo "Compile $PACKAGE $VERSION for ${host}"
126echo
127echo "    - INSTALL prefix: $prefix"
128
129if test x$have_cpuflags = xyes; then
130echo "    - CPU optimization: YES"
131else
132echo "    - CPU optimization: NO"
133fi
134
135if test x$HAVE_OPENCV = xtrue; then
136echo "    - opencv: YES"
137echo "              data dir: $OPENCV_DATA_DIR"
138else
139echo "    - opencv: NO"
140echo "              opencv >= 1.0.0 not found - this program enables optional"
141echo "              plugin with the Open Source Computer Vision library >= 1.0.0"
142echo "              http://opencvlibrary.sourceforge.net/"
143fi
144
145if test x$HAVE_GAVL = xtrue; then
146echo "    - gavl: YES"
147else
148echo "    - gavl: NO"
149echo "            gavl >= 0.2.3 not found - this program enables optional"
150echo "            plugin with the gmerlin audio video library >= 0.2.3"
151echo "            http://gmerlin.sourceforge.net/"
152fi
153
154echo
155echo "Now you can run make."
156echo
157echo
Note: See TracBrowser for help on using the repository browser.