-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfigure.ac
121 lines (97 loc) · 2.8 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
AC_PREREQ([2.68])
AC_INIT([VC2REFERENCE],[0.1.0.2])
AC_CANONICAL_TARGET
case $target in
x86_64-*)
TARGET="x86_64"
;;
*)
TARGET="unknown"
;;
esac
if test "$TARGET" != "x86_64" ; then
AC_MSG_ERROR([Only x86_64 architecture is supported])
fi;
AS_NANO(VC2REFERENCE_CVS=no,VC2REFERENCE_CVS=yes)
AM_INIT_AUTOMAKE([1.11 silent-rules subdir-objects])
AM_SILENT_RULES([yes])
# Version number that will be appended to the library filename
VC2REFERENCE_MAJORMINOR=0.1
AC_SUBST(VC2REFERENCE_MAJORMINOR)
AC_CONFIG_HEADERS([config.h])
AM_PROG_AR
LT_PREREQ([2.2.6])
LT_INIT(disable-static win32-dll)
AC_PROG_CXX
AM_PROG_CC_C_O
AC_CONFIG_SRCDIR([src/Library/Utils.h])
AC_CONFIG_MACRO_DIR([m4])
ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS"
AC_SUBST(ACLOCAL_AMFLAGS)
AC_MSG_CHECKING(whether to enable frame decoder)
AC_ARG_ENABLE([frame-decoder],
[ --enable-frame-decoder Turn on frame decoder],
[case "${enableval}" in
yes) framedecoder=true ;;
no) framedecoder=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-frame-decoder]) ;;
esac],[framedecoder=false])
AM_CONDITIONAL([ENABLE_FRAME_DECODER], [test "x$framedecoder" = "xtrue"])
VC2REFERENCE_CFLAGS="$VC2REFERENCE_CFLAGS -g -Og -DDEBUG"
CXXFLAGS="-Og"
VC2REFERENCE_LDFLAGS="$VC2REFERENCE_LDFLAGS"
LIBBOOST_VER="1.49.0"
AX_BOOST_BASE($LIBBOOST_VER, HAVE_BOOST=yes, HAVE_BOOST=no)
if test "x${HAVE_BOOST}" != xyes ; then
AC_MSG_ERROR([Boost library is required])
fi
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_THREAD
AX_BOOST_SYSTEM
AX_CXX_HAVE_SSTREAM
# Check for pkg-config
PKG_PROG_PKG_CONFIG([0.26])
IS_LINUX=no
AC_CANONICAL_HOST
case $host_os in
linux*)
IS_LINUX=yes
;;
esac
AM_CONDITIONAL(IS_LINUX, test x${IS_LINUX} = xyes)
AC_SUBST(IS_LINUX)
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AX_CREATE_STDINT_H([src/vc2reference-stdint.h])
AC_APPEND_SUPPORTED_CFLAGS(VC2REFERENCE_CFLAGS, [-Wall])
VC2REFERENCE_CFLAGS="$VC2REFERENCE_CFLAGS -I\$(top_srcdir)"
AC_SUBST(VC2REFERENCE_CFLAGS)
VC2REFERENCE_LDFLAGS="$VC2REFERENCE_LDFLAGS"
AC_APPEND_SUPPORTED_LDFLAGS(VC2REFERENCE_LDFLAGS, [-Wl,--no-undefined])
if test "x$IS_LINUX" = "xno"
then
AC_APPEND_SUPPORTED_LDFLAGS(VC2REFERENCE_LDFLAGS, [-Qunused-arguments])
fi
AC_SUBST(VC2REFERENCE_LDFLAGS)
VC2REFERENCE_LIBS="\$(top_builddir)/src/Libaray/libVC2-$VC2REFERENCE_MAJORMINOR.la"
AC_SUBST(VC2REFERENCE_LIBS)
AC_SUBST(VC2REFERENCE_PKG_DEPS)
pkgconfigdir="\$(libdir)/pkgconfig"
AC_SUBST(pkgconfigdir)
vc2referencebindir="\$(libdir)/vc2reference/"
AC_SUBST(vc2referencebindir)
configfiledir="\$(sysconfdir)/vc2reference"
AC_SUBST(configfiledir)
AC_CONFIG_FILES([
Makefile
tests/Makefile
tools/Makefile
src/Makefile
src/boost/Makefile
src/tclap/Makefile
src/Library/Makefile
src/DecodeStream/Makefile
src/EncodeStream/Makefile
src/DecodeFrame/Makefile
])
AC_OUTPUT