forked from alexkay/spek
-
Notifications
You must be signed in to change notification settings - Fork 18
/
configure.ac
105 lines (92 loc) · 2.4 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
AC_INIT([spek],[0.8.2.3])
AC_CONFIG_SRCDIR([src/spek.cc])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11.1 foreign no-dist-gzip dist-xz serial-tests])
AM_SILENT_RULES([yes])
AC_LANG([C++])
AC_PROG_CXX
CXXFLAGS="$CXXFLAGS -std=gnu++11 -Wall -Wextra"
AC_PROG_CXXCPP
AC_PROG_LIBTOOL
AC_PROG_RANLIB
AC_PROG_INSTALL
IT_PROG_INTLTOOL([0.40.0])
AC_CANONICAL_HOST
AC_MSG_CHECKING([the OS])
AS_CASE([$host],
[*-*-mingw*], [
os="WIN"
AC_DEFINE([OS_WIN], [1], [Windows])
],
[*-*-darwin*], [
os="OSX"
AC_DEFINE([OS_OSX], [1], [OS X])
],
[*], [
os="UNIX"
AC_DEFINE([OS_UNIX], [1], [Unix])
]
)
AC_MSG_RESULT([$os])
AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
AC_ARG_ENABLE(
[valgrind],
AS_HELP_STRING([--enable-valgrind], [Run tests under valgrind]),
[use_valgrind=$enableval],
[use_valgrind=auto]
)
AS_IF(
[test "x$use_valgrind" = xyes -a "x$HAVE_VALGRIND" = xno], [AC_MSG_ERROR([Valgrind not found])],
[AM_CONDITIONAL([USE_VALGRIND], [test "x$use_valgrind" != xno -a x$HAVE_VALGRIND = xyes])]
)
AM_COND_IF([USE_VALGRIND], [use_valgrind=yes], [use_valgrind=no])
AC_CHECK_LIB(m, log10)
PKG_CHECK_MODULES(AVFORMAT, [libavformat >= 57.33.100])
PKG_CHECK_MODULES(AVCODEC, [libavcodec >= 57.33.100])
PKG_CHECK_MODULES(AVUTIL, [libavutil >= 51.17])
AM_OPTIONS_WXCONFIG
reqwx=3.0.0
AM_PATH_WXCONFIG($reqwx, wx=1)
if test "$wx" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed (returned by
'wx-config --libs' or 'wx-config --static --libs' command)
is in LD_LIBRARY_PATH or equivalent variable and
wxWidgets version is $reqwx or above.
])
fi
GETTEXT_PACKAGE=spek
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext Package])
AC_SUBST(GETTEXT_PACKAGE)
AM_GNU_GETTEXT_VERSION([0.18.1])
AM_PO_SUBDIRS
AC_CONFIG_FILES([
Makefile
data/spek.desktop.in
data/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/scalable/Makefile
dist/osx/Info.plist
dist/win/spek.wxs
man/Makefile
po/Makefile.in
src/Makefile
tests/Makefile
web/version
])
AC_OUTPUT
cat <<EOF
${PACKAGE}-${VERSION}
Install Prefix: ${prefix}
C++ Compiler: ${CXX}
OS: ${os}
wxWidgets: ${WX_VERSION}
Use Valgrind: ${use_valgrind}
EOF