-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfigure.ac
More file actions
169 lines (154 loc) · 4.12 KB
/
Copy pathconfigure.ac
File metadata and controls
169 lines (154 loc) · 4.12 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
dnl configure.ac
dnl
dnl Autoconf configuration
dnl
dnl Use autoconf to process this into a configure script
dnl
dnl (C) Copyright 2016-2017 Fred Gleason <fredg@paravelsystems.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License version 2 as
dnl published by the Free Software Foundation.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public
dnl License along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
AC_INIT(rivendell-producer,m4_esyscmd(cat PACKAGE_VERSION))
AM_INIT_AUTOMAKE
AC_SUBST(RPM_RELEASE,1)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
#
# Basic Compiler Checks
#
AC_PROG_CXX
AC_LANG(C++)
#
# Check for Qt4 (Mandatory)
#
PKG_CHECK_MODULES(QT4,QtGui QtCore QtNetwork,[],[AC_MSG_ERROR([*** Qt4 not found ***])])
AC_CHECK_PROG(MOC_NAME,moc-qt4,[moc-qt4],[moc])
AC_SUBST(MOC,$MOC_NAME)
#
# Check for Rivendell C API (Mandatory)
#
PKG_CHECK_MODULES(RIVWEBCAPI,rivwebcapi,[],[AC_MSG_ERROR([*** Rivendell C API not found ***])])
#
# Check for Secret Rabbit Code
#
PKG_CHECK_MODULES(SRC,samplerate,[],[AC_MSG_ERROR([*** libsamplerate not found ***])])
#
# Check for LibCurl
#
PKG_CHECK_MODULES(CURL,libcurl,[],[AC_MSG_ERROR([*** LibCurl not found ***])])
#
# Check for MPEG Audio Decoder
#
PKG_CHECK_MODULES(MAD,mad,[],[AC_MSG_ERROR([*** MAD not found ***])])
#
# Check for ALSA
#
PKG_CHECK_MODULES(ALSA,alsa,[ALSA_FOUND=y],[PKGCONFIG_FAILED=y])
if test $ALSA_FOUND ; then
if test -z $ALSA_DISABLED ; then
AC_DEFINE(ALSA,yes)
USING_ALSA=yes
fi
fi
#
# Check for Windows MME
#
AC_CHECK_HEADER(windows.h,[MME_FOUND=yes],[])
if test $MME_FOUND ; then
if test -z $MME_DISABLED ; then
AC_DEFINE(MME)
AC_SUBST(MME_LIBS,-lwinmm)
USING_MME=yes
else
AC_SUBST(MME_LIBS,"")
fi
else
AC_SUBST(MME_LIBS,"")
fi
#
# Determine the target architecture
#
AR_GCC_TARGET()
AC_SUBST(VENDOR,$ar_gcc_distro)
AC_SUBST(ARCH,$ar_gcc_arch)
if test $ar_gcc_os = mingw32 ; then
AC_DEFINE(WIN32)
AC_SUBST(RESOURCES,"icons.o")
AC_SUBST(LDFLAGS,"-mwindows")
AC_DEFINE(MINGW32,"yes")
else
AC_SUBST(RESOURCES,"")
AC_SUBST(LDFLAGS,"")
fi
#
# Determine Distro
#
AR_GET_DISTRO()
AC_SUBST(DISTRO,$ar_gcc_distro)
#
# Configure RPM Build
#
AC_CHECK_PROG(RPMBUILD_FOUND,rpmbuild,[yes],[])
if test -z $RPMBUILD_FOUND ; then
AC_SUBST(RPMBUILD,rpm)
else
AC_SUBST(RPMBUILD,rpmbuild)
fi
if test -d /usr/src/redhat ; then
AC_SUBST(RPM_ROOT,/usr/src/redhat)
AC_SUBST(VENDOR,redhat)
else
AC_SUBST(RPM_ROOT,/usr/src/packages)
AC_SUBST(VENDOR,suse)
fi
AC_CONFIG_FILES([ \
conf/Makefile \
icons/Makefile \
src/Makefile \
src/common/Makefile \
src/rdadminb/Makefile \
src/rdlibraryb/Makefile \
src/rdlogeditb/Makefile \
xdg/Makefile \
Makefile \
rivendell-producer.nsi \
rivendell-producer.spec \
version.txt \
])
AC_OUTPUT()
#
# Link Common Elements
#
./link_common.sh rdadminb
./link_common.sh rdlibraryb
./link_common.sh rdlogeditb
AC_MSG_NOTICE()
AC_MSG_NOTICE("|-----------------------------------------------------|")
AC_MSG_NOTICE("| *** RIVENDELL-PRODUCER CONFIGURATION SUMMARY *** |")
AC_MSG_NOTICE("|-----------------------------------------------------|")
AC_MSG_NOTICE("| Audio Outputs: |")
if test -z $USING_ALSA ; then
AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... No |")
else
AC_MSG_NOTICE("| Advanced Linux Sound Architecture (ALSA) ... Yes |")
fi
if test -z $USING_MME ; then
AC_MSG_NOTICE("| Windows Multimedia Extensions (MME) ... No |")
else
AC_MSG_NOTICE("| Windows Multimedia Extensions (MME) ... Yes |")
fi
AC_MSG_NOTICE("|-----------------------------------------------------|")
AC_MSG_NOTICE()
AC_MSG_NOTICE()
AC_MSG_NOTICE(Now enter 'make' to build the software.)
AC_MSG_NOTICE()