forked from os-autoinst/os-autoinst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
58 lines (52 loc) · 1.48 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Process this file with autoconf to create configure.
AC_PREREQ([2.65])
# ====================
# Version informations
# ====================
m4_define([autoinst_version_major],[1])
m4_define([autoinst_version_minor],[1])
m4_define([autoinst_version_micro],[0])
m4_define([autoinst_version],[autoinst_version_major.autoinst_version_minor.autoinst_version_micro])
# =============
# Automake init
# =============
AC_INIT([os-autoinst],[autoinst_version],[https://github.com/os-autoinst/os-autoinst])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 foreign dist-xz])
AM_SILENT_RULES([yes])
# ===============
# Basic app check
# ===============
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX([11], [], [mandatory])
AC_PROG_LIBTOOL
AC_PROG_MKDIR_P
PKG_PROG_PKG_CONFIG([0.20])
AC_MSG_CHECKING([perl CFLAGS])
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
AC_MSG_RESULT([$PERL_CFLAGS])
AC_SUBST([PERL_CFLAGS])
# ================================
# Find dependencies via pkg-config
# ================================
# Use preferably the "opencv4", otherwise fall back to "opencv"
PKG_CHECK_MODULES(
[OPENCV],
[opencv4 >= 4.0],
[AC_DEFINE([HAVE_OPENCV_4], [1], [Using opencv4 package])],
[PKG_CHECK_MODULES(
[OPENCV],
[opencv >= 2.4],
[AC_DEFINE([HAVE_OPENCV], [1], [Using opencv package])]
)]
)
PKG_CHECK_MODULES([THEORAENC], [theoraenc >= 1.1])
PKG_CHECK_MODULES([FFTW], [fftw3])
PKG_CHECK_MODULES([SNDFILE], [sndfile])
AC_CONFIG_FILES([
Makefile
t/Makefile
debugviewer/Makefile
snd2png/Makefile
])
AC_OUTPUT