-
Notifications
You must be signed in to change notification settings - Fork 11
/
configure.ac
67 lines (53 loc) · 2.13 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
dnl -*- Autoconf -*-
dnl Process this file with autoconf to produce a configure script.
AC_INIT([ODR-PadEnc], [3.0.0], [http://opendigitalradio.org/])
AC_CONFIG_AUX_DIR(.)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([tar-ustar foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADER([config.h])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
LT_INIT
AX_CXX_COMPILE_STDCXX(11,noext,mandatory)
AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Wduplicated-cond], [CXXFLAGS="$CXXFLAGS -Wduplicated-cond"], [], ["-Werror"])
AX_CHECK_COMPILE_FLAG([-Wduplicated-branches], [CXXFLAGS="$CXXFLAGS -Wduplicated-branches"], [], ["-Werror"])
AX_CHECK_COMPILE_FLAG([-Wlogical-op], [CXXFLAGS="$CXXFLAGS -Wlogical-op"], [], ["-Werror"])
AX_CHECK_COMPILE_FLAG([-Wrestrict], [CXXFLAGS="$CXXFLAGS -Wrestrict"], [], ["-Werror"])
AX_CHECK_COMPILE_FLAG([-pedantic], [CXXFLAG_PEDANTIC="-pedantic"], [], ["-Werror"])
AX_CHECK_COMPILE_FLAG([-Wpedantic], [CXXFLAG_PEDANTIC="-Wpedantic"], [], ["-Werror"])
CXXFLAGS="$CXXFLAGS $CXXFLAG_PEDANTIC"
AX_CHECK_COMPILE_FLAG(["-Wformat=2"], [CXXFLAGS="$CXXFLAGS -Wformat=2"], [], ["-Werror"])
AC_LANG_POP([C++])
AC_CHECK_LIB([m], [sin])
if pkg-config MagickWand; then
MAGICKWAND_CFLAGS=`pkg-config MagickWand --cflags`
MAGICKWAND_LDADD=`pkg-config MagickWand --libs`
AC_SUBST(MAGICKWAND_CFLAGS)
AC_SUBST(MAGICKWAND_LDADD)
else
AC_MSG_WARN(MagickWand not found)
fi
AS_IF([ pkg-config MagickWand ],
AC_DEFINE(HAVE_MAGICKWAND, [1], [Define if MagickWand is available]))
AS_IF([ pkg-config "MagickWand < 7" ],
AC_DEFINE(HAVE_MAGICKWAND_LEGACY, [1], [Define if a legacy (prior to version 7) MagickWand is available]))
AM_CONDITIONAL([IS_GIT_REPO], [test -d '.git'])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
enabled=""
disabled=""
AS_IF([ pkg-config MagickWand ],
[enabled="$enabled magickwand"],
[disabled="$disabled magickwand"])
echo
echo "***********************************************"
echo "Features enabled:"
echo " Enabled: $enabled"
echo " Disabled: $disabled"
echo
echo "ODR-PadEnc configured, please run make"
echo