summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 4bcf972b6b8dabb37304d0fcc682672499cd5820 (plain)
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
# Filename: configure.in

AC_INIT([dgedit], m4_esyscmd([cat version.h | cut -d'"' -f2 | xargs echo -n]))dnl"

AC_CONFIG_SRCDIR([src/dgedit.cc])
AM_INIT_AUTOMAKE

AC_PROG_CXX
#AM_PROG_CC_C_O

AC_PROG_LIBTOOL
AM_PROG_LIBTOOL

AM_CONFIG_HEADER(config.h)
AC_STDC_HEADERS

need_jack=no

dnl ======================
dnl Init pkg-config
dnl ======================
PKG_PROG_PKG_CONFIG(0.23)

HUGIN_PARM="-DDISABLE_HUGIN"
AC_ARG_WITH(debug,  [  --with-debug            Build with debug support])
if test x$with_debug == xyes; then
    AC_MSG_WARN([*** Building with debug support!])
    CXXFLAGS="$CXXFLAGS -Wall -Werror -g"
    HUGIN_PARM=""
fi
CXXFLAGS="$CXXFLAGS $HUGIN_PARM"


dnl ======================
dnl Check for Qt
dnl ======================
PKG_CHECK_MODULES(QT, Qt5Widgets Qt5Core Qt5Gui Qt5Xml >= 5.0)
AC_CHECK_PROGS(QT_MOC, [moc5 moc-qt5 moc], [])
AC_CHECK_PROGS(QT_RCC, [rcc5 rcc-qt5 rcc], [])
AC_CHECK_PROGS(QT_UIC, [uic5 uic-qt5 uic], [])
if (test "$QT_MOC" = ""); then
  AC_MSG_ERROR([QT5 moc is required.])
fi
if (test "$QT_RCC" = ""); then
  AC_MSG_ERROR([QT5 rcc is required.])
fi
if (test "$QT_UIC" = ""); then
  AC_MSG_ERROR([QT5 uic is required.])
fi
CXXFLAGS="$CXXFLAGS -fPIC"
CXXFLAGS="$CXXFLAGS -std=c++14"

dnl ======================
dnl Check for libao
dnl ======================
PKG_CHECK_MODULES(AO, ao >= 0.8.8)

dnl ======================
dnl Check for sndfile
dnl ======================
PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.20)

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(LDFLAGS)

AC_OUTPUT(
	Makefile
	tools/Makefile
	src/Makefile
  icons/Makefile)