File: configure.ac

package info (click to toggle)
bino 1.6.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,636 kB
  • sloc: cpp: 21,288; sh: 4,849; makefile: 314; sed: 16
file content (426 lines) | stat: -rw-r--r-- 16,585 bytes parent folder | download
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
dnl Process this file with autoconf to produce a configure script.

dnl configure.ac
dnl
dnl This file is part of bino, a 3D video player.
dnl
dnl Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018
dnl Martin Lambers <marlam@marlam.de>
dnl Frédéric Devernay <Frederic.Devernay@inrialpes.fr>
dnl Binocle <http://binocle.com> (author: Olivier Letz <oletz@binocle.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 as published by
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
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 License
dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.

dnl Autotools init stuff
AC_PREREQ([2.63])
AC_INIT([Bino], [1.6.6], [bino-list@nongnu.org], [bino], [https://bino3d.org/])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_TARGET
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AM_INIT_AUTOMAKE([1.11.1 color-tests silent-rules tar-pax no-texinfo.tex -Wall -Wno-portability])
AM_SILENT_RULES([yes])
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_LN_S
AC_LANG([C++])
AC_C_BIGENDIAN

dnl Check if the C++ compiler works. Autoconf will not do that for us!?
AC_MSG_CHECKING([whether the C++ compiler works])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [COMPILER_WORKS=1], [COMPILER_WORKS=0])
if test "$COMPILER_WORKS" = "1"; then
    AC_MSG_RESULT([yes])
else
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([The C++ compiler was not found or does not work.])
fi

dnl Useful definitions
AC_DEFINE_UNQUOTED([PLATFORM], ["${target}"], [Platform triplet])

dnl Special handling of W32
case "${target}" in *-*-mingw32*) w32="yes" ;; *) w32="no " ;; esac
if test "$w32" = "yes"; then
    CXXFLAGS="-mthreads $CXXFLAGS"
    LDFLAGS="-mthreads -mwindows $LDFLAGS"
    AC_ARG_VAR([WINDRES], [windres command])
    if test -z "$WINDRES"; then
        AC_CHECK_TOOLS([WINDRES], [windres])
    fi
    if test -z "$WINDRES"; then
        AC_MSG_ERROR([windres not found])
    fi
    AC_ARG_VAR([MAKENSIS], [makensis command])
    if test -z "$MAKENSIS"; then
        AC_CHECK_TOOLS([MAKENSIS], [makensis])
    fi
    if test -z "$MAKENSIS"; then
        AC_MSG_WARN([optional tool makensis not found])
    fi
else
    MAKENSIS=""
fi
AM_CONDITIONAL([HAVE_MAKENSIS], [test -n "$MAKENSIS"])
AM_CONDITIONAL([W32], [test "$w32" = "yes"])

dnl Configure switches
AC_ARG_ENABLE([debug],
    [AS_HELP_STRING([--enable-debug], [Enable debugging checks. Disabled by default.])],
    [if test "$enableval" = "yes"; then ndebug=0; else ndebug=1; fi], [ndebug=1])
if test "$ndebug" = "1"; then
    AC_DEFINE_UNQUOTED([NDEBUG], [1], [Define to 1 to disable assertions and other debugging checks.])
fi

dnl Feature checks needed by the base modules
AC_LANG_PUSH([C])
dnl - dbg
AC_CHECK_FUNCS([backtrace sigaction])
dnl - end
dnl AC_C_BIGENDIAN
dnl - fio
dnl case "${target}" in *-*-mingw*) LIBS="$LIBS -lshlwapi" ;; esac
dnl AC_CHECK_FUNCS([fdatasync fnmatch fseeko ftello getpwuid link mmap posix_fadvise readdir_r symlink])
dnl - opt
case "${target}" in *-*-mingw*) CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE" ;; esac
AC_CHECK_DECLS([optreset], [], [], [#include <getopt.h>])
dnl - pth
AC_MSG_CHECKING([for GCC atomic builtins])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
    [[int b, x = 0; b = __sync_bool_compare_and_swap(&x, 0, 1);]])],
    HAVE_GCC_ATOMIC_BUILTINS=1, HAVE_GCC_ATOMIC_BUILTINS=0)
if test "$HAVE_GCC_ATOMIC_BUILTINS" = "1"; then
    AC_MSG_RESULT([yes])
else
    AC_MSG_RESULT([no])
    AC_MSG_ERROR([GCC atomic builtins not found. Please use a newer compiler.])
fi
AC_SEARCH_LIBS([pthread_create], [pthread])
CPPFLAGS_bak="$CPPFLAGS"
LDFLAGS_bak="$LDFLAGS"
CPPFLAGS="-pthread $CPPFLAGS"
LDFLAGS="-pthread $LDFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [], [CPPFLAGS="$CPPFLAGS_bak"; LDFLAGS="$LDFLAGS_bak"])
dnl - str
AM_ICONV([])
AC_CHECK_FUNCS([nl_langinfo vasprintf wcswidth])
dnl - sys
dnl AC_CHECK_FUNCS([nanosleep sysconf sched_yield])
dnl - tmr
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_CHECK_FUNCS([clock_gettime])
AC_LANG_POP([C])

dnl Gettext
AC_LANG_PUSH([C])
AM_ICONV([])
if test "$am_cv_func_iconv" != "yes"; then
    AC_MSG_WARN([required library libiconv not found])
fi
AM_GNU_GETTEXT([external])
AC_LANG_POP([C])

dnl pkg-config (required to detect libraries)
PKG_PROG_PKG_CONFIG([])
if test -z "$PKG_CONFIG"; then
    AC_MSG_WARN([required tool pkg-config not found])
    AC_MSG_WARN([required libraries cannot be detected])
    AC_MSG_WARN([please install pkg-config; Debian package: pkg-config])
fi

dnl FFmpeg
PKG_CHECK_MODULES([libavformat], [libavformat >= 52.110.0 libavcodec libavutil], [HAVE_LIBAVFORMAT=1], [HAVE_LIBAVFORMAT=0])
if test "$HAVE_LIBAVFORMAT" != "1"; then
    AC_MSG_WARN([required library libavformat >= 52.110.0 not found:])
    AC_MSG_WARN([$libavformat_PKG_ERRORS])
    AC_MSG_WARN([libavformat >= 52.110.0 is provided by libav >= 0.7 or FFmpeg >= 0.7])
fi
PKG_CHECK_MODULES([libavdevice], [libavdevice >= 52.5.0], [HAVE_LIBAVDEVICE=1], [HAVE_LIBAVDEVICE=0])
if test "$HAVE_LIBAVDEVICE" != "1"; then
    AC_MSG_WARN([required library libavdevice >= 52.5.0 not found:])
    AC_MSG_WARN([$libavdevice_PKG_ERRORS])
    AC_MSG_WARN([libavdevice >= 52.5.0 is provided by libav >= 0.7 or FFmpeg >= 0.7])
fi
PKG_CHECK_MODULES([libswscale], [libswscale >= 0.14.1 libavutil], [HAVE_LIBSWSCALE=1], [HAVE_LIBSWSCALE=0])
if test "$HAVE_LIBSWSCALE" != "1"; then
    AC_MSG_WARN([required library libswscale >= 0.14.1 not found:])
    AC_MSG_WARN([$libswscale_PKG_ERRORS])
    AC_MSG_WARN([libswscale >= 0.14.1 is provided by libav >= 0.7 or FFmpeg >= 0.7])
fi
AC_CHECK_FUNCS([sysconf])

dnl libass
LIBASS_PKGCONFIG_VERSION="\"\""
PKG_CHECK_MODULES([libass], [libass >= 0.9.9], [HAVE_LIBASS=1], [HAVE_LIBASS=0])
if test "$HAVE_LIBASS" != "1"; then
    AC_MSG_WARN([required library libass not found:])
    AC_MSG_WARN([$libass_PKG_ERRORS])
    AC_MSG_WARN([libass is provided by LibASS; Debian package: libass-dev])
else
    LIBASS_PKGCONFIG_VERSION="\"`$PKG_CONFIG --modversion libass`\""
fi
AC_DEFINE_UNQUOTED([LIBASS_PKGCONFIG_VERSION], [$LIBASS_PKGCONFIG_VERSION], [libass version])

dnl OpenAL
PKG_CHECK_MODULES([libopenal], [openal >= 0.0], [HAVE_LIBOPENAL=1], [HAVE_LIBOPENAL=0])
if test "$HAVE_LIBOPENAL" = "1"; then
    CPPFLAGS_BAK="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $libopenal_CFLAGS"
    AC_CHECK_HEADERS([AL/al.h])
    CPPFLAGS="$CPPFLAGS_BAK"
else
    AC_MSG_WARN([required library libopenal not found:])
    AC_MSG_WARN([$libopenal_PKG_ERRORS])
    AC_MSG_WARN([libopenal is provided by OpenAL; Debian package: libopenal-dev])
fi

dnl Qt
qt_version=""
AC_ARG_WITH([qt-version],
    [AS_HELP_STRING([--with-qt-version], [Choose Qt version. Currently 4 or 5; 5 is the default.])],
    [qt_version="$withval"], [qt_version="5"])
if test "$qt_version" != "4" -a "$qt_version" != "5"; then
    AC_MSG_WARN([unknown Qt version requested, falling back to Qt 5.])
    qt_version="5"
fi
AC_ARG_VAR([RCC], [rcc command])
AC_ARG_VAR([MOC], [moc command])
if test "$qt_version" = "4"; then
    PKG_CHECK_MODULES([libqtopengl], [QtOpenGL >= 4.6], [HAVE_LIBQTOPENGL=1], [HAVE_LIBQTOPENGL=0])
    if test "$HAVE_LIBQTOPENGL" != "1"; then
        AC_MSG_WARN([required library QtOpenGL not found:])
        AC_MSG_WARN([$libqtopengl_PKG_ERRORS])
        AC_MSG_WARN([QtOpenGL is provided by Qt])
    else
        if test -z "$RCC"; then
            AC_CHECK_TOOLS([RCC], [rcc-qt4 rcc])
        fi
        if test -z "$MOC"; then
            AC_CHECK_TOOLS([MOC], [moc-qt4 moc])
        fi
    fi
    dnl Check if we are running on X11. Needed for GLXEW.
    AC_MSG_CHECKING([whether Qt uses X11])
    CPPFLAGS_BAK="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $libqtopengl_CFLAGS"
    AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM([[
         #include <QGLWidget>
         #ifndef Q_WS_X11
          error: No X11
         #endif]],
        [[int x = 0;]])],
        [NEED_LIBX11="yes"],[NEED_LIBX11="no"])
    CPPFLAGS="$CPPFLAGS_BAK"
    AC_MSG_RESULT([$NEED_LIBX11])
    dnl With Qt4, we use X11 functions directly, and thus need to link with -lX11
    if test "$NEED_LIBX11" = "yes"; then
        AC_DEFINE([HAVE_X11], [1], [Whether we are running on X11])
        PKG_CHECK_MODULES([libX11], [x11 >= 0.0], [HAVE_LIBX11=1], [HAVE_LIBX11=0])
        if test "$HAVE_LIBX11" != "1"; then
            AC_MSG_WARN([required library libX11 not found:])
            AC_MSG_WARN([$libX11_PKG_ERRORS])
        else
            libqtopengl_CFLAGS="$libqtopengl_CFLAGS $libX11_CFLAGS"
            libqtopengl_LIBS="$libqtopengl_LIBS $libX11_LIBS"
        fi
    else
        AC_DEFINE([HAVE_X11], [0], [Whether we are running on X11])
    fi
else
    PKG_CHECK_MODULES([libqtopengl], [Qt5OpenGL >= 5.1], [HAVE_LIBQTOPENGL=1], [HAVE_LIBQTOPENGL=0])
    if test -z "$RCC"; then
        AC_CHECK_TOOLS([RCC], [rcc-qt5 rcc])
    fi
    if test -z "$MOC"; then
        AC_CHECK_TOOLS([MOC], [moc-qt5 moc])
    fi
    dnl Qt5 on Linux requires -fPIC / -pie with gcc, but does not record this fact
    dnl in the pkg-config files (which is a bug in my opinion). Work around that.
    AC_MSG_CHECKING([whether Qt needs -fPIC and -pie])
    if test -n "`$PKG_CONFIG --variable=qt_config Qt5Core | $GREP reduce_relocations`"; then
        AC_MSG_RESULT([yes])
        CXXFLAGS="$CXXFLAGS -fPIC"
        LDFLAGS="$LDFLAGS -pie"
    else
        AC_MSG_RESULT([no])
    fi
    dnl Check if we are running on X11. Needed for GLXEW.
    AC_MSG_CHECKING([whether Qt uses X11])
    if test -n "`$PKG_CONFIG --variable=qt_config Qt5Core | $GREP xcb`"; then
        AC_DEFINE([HAVE_X11], [1], [Whether we are running on X11])
        AC_MSG_RESULT([yes])
    else
        AC_DEFINE([HAVE_X11], [0], [Whether we are running on X11])
        AC_MSG_RESULT([no])
    fi
fi
if test "$HAVE_LIBQTOPENGL" = "1"; then
    if test -z "$RCC" -o -z "$MOC"; then
        AC_MSG_WARN([required tools rcc and/or moc not found; Qt not usable])
        HAVE_LIBQTOPENGL="0"
    fi
fi

dnl Equalizer
dnl We assume that Equalizer does not use an included GLEW!
AC_ARG_WITH([equalizer],
    [AS_HELP_STRING([--without-equalizer], [Disable multi-display support via Equalizer (enabled by default)])],
    [if test "$withval" = "yes"; then equalizer="yes"; else equalizer="no"; fi], [equalizer="yes"])
if test "$equalizer" = "yes"; then
    PKG_CHECK_MODULES([libEqualizer], [Equalizer >= 0.9.3], [HAVE_LIBEQUALIZER=1], [HAVE_LIBEQUALIZER=0])
    if test "$HAVE_LIBEQUALIZER" != "1"; then
        AC_MSG_WARN([optional library libEqualizer not found:])
        AC_MSG_WARN([$libEqualizer_PKG_ERRORS])
        AC_MSG_WARN([libEqualizer is provided by Equalizer])
	equalizer="no"
    fi
else
    HAVE_LIBEQUALIZER=0
fi
AC_DEFINE_UNQUOTED([HAVE_LIBEQUALIZER], [$HAVE_LIBEQUALIZER], [Have Equalizer?])
AM_CONDITIONAL([HAVE_LIBEQUALIZER], [test "$HAVE_LIBEQUALIZER" = "1"])

dnl glew
dnl With Equalizer, we need glewmx, since that is what Equalizer uses.
dnl Without Equalizer, glew (without mx) is ok to use, too.
PKG_CHECK_MODULES([libglewmx], [glewmx >= 1.6.0], [HAVE_LIBGLEWMX=1], [HAVE_LIBGLEWMX=0])
if test "$HAVE_LIBGLEWMX" != "1"; then
    AC_MSG_WARN([required library libglewmx >= 1.6.0 not found:])
    AC_MSG_WARN([$libglewmx_PKG_ERRORS])
    AC_MSG_WARN([libglewmx is provided by glew; Debian package: libglewmx-dev])
fi
AM_CONDITIONAL([HAVE_LIBGLEWMX], [test "$HAVE_LIBGLEWMX" = "1"])
if test "$HAVE_LIBGLEWMX" != "1" -a "$HAVE_LIBEQUALIZER" != "1"; then
    AC_MSG_NOTICE([trying to use libglew instead of libglewmx])
    PKG_CHECK_MODULES([libglew], [glew >= 1.6.0], [HAVE_LIBGLEW=1], [HAVE_LIBGLEW=0])
    if test "$HAVE_LIBGLEW" != "1"; then
        AC_MSG_WARN([required library libglew >= 1.6.0 not found:])
        AC_MSG_WARN([$libglew_PKG_ERRORS])
        AC_MSG_WARN([libglew is provided by glew; Debian package: libglew-dev])
    fi
fi

dnl libXNVCtrl
AC_ARG_WITH([xnvctrl],
    [AS_HELP_STRING([--with-xnvctrl], [Enable NVIDIA Quadro SDI output (disabled by default)])],
    [if test "$withval" = "yes"; then xnvctrl="yes"; else xnvctrl="no"; fi], [xnvctrl="no"])
if test "$xnvctrl" = "yes"; then
    CPPFLAGS_BAK="$CPPFLAGS"
    CPPFLAGS="$CPPFLAGS $libX11_CFLAGS $xnvctrl_CFLAGS"
    AC_SUBST([xnvctrl_CFLAGS])
    AC_CHECK_HEADERS([NVCtrl/NVCtrl.h NVCtrl/NVCtrlLib.h],
                     [HAVE_LIBXNVCTRL=1],
                     [HAVE_LIBXNVCTRL=0],
                     [#include <GL/glx.h>])
    if test "$HAVE_LIBXNVCTRL" = "1"; then
        LDFLAGS_BAK="$LDFLAGS"
        LDFLAGS="$LDFLAGS $xnvctrl_LDFLAGS"
        AC_SUBST([xnvctrl_LDFLAGS])
        AC_CHECK_LIB([XNVCtrl],
                     [XNVCTRLQueryAttribute],
                     [HAVE_LIBXNVCTRL=1],
                     [HAVE_LIBXNVCTRL=0],
                     [-lX11 -lXext])
        LDFLAGS="$LDFLAGS_BAK"
    fi
    CPPFLAGS="$CPPFLAGS_BAK"
    if test "$HAVE_LIBXNVCTRL" != "1"; then
        AC_MSG_WARN([optional library libXNVCtrl not found])
        AC_MSG_WARN([libXNVCtrl is provided by NVIDIA; Debian package: libxnvctrl-dev])
        xnvctrl="no"
    fi
else
    HAVE_LIBXNVCTRL=0
fi
AC_DEFINE_UNQUOTED([HAVE_LIBXNVCTRL], [$HAVE_LIBXNVCTRL], [Have NVIDIA libXNVCtrl for Quadro SDI output?])
AM_CONDITIONAL([HAVE_LIBXNVCTRL], [test "$HAVE_LIBXNVCTRL" = "1"])

dnl OpenGL
dnl We need to explicitly link with OpenGL since we use its functions directly.
dnl However, this is most probably not necessary on Windows and Mac OS X (for
dnl now), so we just use a pkg-config check (which usually only works on Linux)
dnl and ignore a failure.
PKG_CHECK_MODULES([libgl], [gl >= 0.0], [HAVE_LIBGL=1], [HAVE_LIBGL=0])

dnl LIRC
LIRC_PKGCONFIG_VERSION="\"\""
AC_ARG_WITH([lirc],
    [AS_HELP_STRING([--without-lirc], [Disable remote control support via lirc (enabled by default)])],
    [if test "$withval" = "yes"; then lirc="yes"; else lirc="no"; fi], [lirc="yes"])
if test "$lirc" = "yes"; then
    PKG_CHECK_MODULES([lirc], [lirc >= 0.0], [HAVE_LIRC=1], [HAVE_LIRC=0])
    if test "$HAVE_LIRC" != "1"; then
        PKG_CHECK_MODULES([lirc], [liblircclient0 >= 0.0], [HAVE_LIRC=1], [HAVE_LIRC=0])
        if test "$HAVE_LIRC" != "1"; then
            AC_MSG_WARN([optional library lirc not found:])
            AC_MSG_WARN([$lirc_PKG_ERRORS])
            AC_MSG_WARN([lirc is provided by LIRC; Debian package: liblircclient-dev])
            lirc="no"
        else
            LIRC_PKGCONFIG_VERSION="\"`$PKG_CONFIG --modversion liblircclient0`\""
        fi
    else
        LIRC_PKGCONFIG_VERSION="\"`$PKG_CONFIG --modversion lirc`\""
    fi
else
    HAVE_LIRC=0
fi
AC_DEFINE_UNQUOTED([HAVE_LIRC], [$HAVE_LIRC], [Have lirc?])
AC_DEFINE_UNQUOTED([LIRC_PKGCONFIG_VERSION], [$LIRC_PKGCONFIG_VERSION], [lirc version])
AM_CONDITIONAL([HAVE_LIRC], [test "$HAVE_LIRC" = "1"])

dnl Icon and Menu tools. It is ok if these are missing.
GTK_UPDATE_ICON_CACHE=""
AC_ARG_VAR([GTK_UPDATE_ICON_CACHE], [gtk-update-icon-cache command])
AC_CHECK_PROGS([GTK_UPDATE_ICON_CACHE], [gtk-update-icon-cache])
UPDATE_DESKTOP_DATABASE=""
AC_ARG_VAR([UPDATE_DESKTOP_DATABASE], [update-desktop-database command])
AC_CHECK_PROGS([UPDATE_DESKTOP_DATABASE], [update-desktop-database])

dnl Check if all libraries were found
if test "$am_cv_func_iconv" != "yes" \
    -o "$HAVE_LIBAVFORMAT" != "1" \
    -o "$HAVE_LIBAVDEVICE" != "1" \
    -o "$HAVE_LIBSWSCALE" != "1" \
    -o "$HAVE_LIBASS" != "1" \
    -o "$HAVE_LIBOPENAL" != "1" \
    -o "$HAVE_LIBQTOPENGL" != "1" \
    -o \( "$HAVE_LIBGLEWMX" != "1" -a "$HAVE_LIBGLEW" != "1" \) \
    -o \( "$equalizer" = "yes" -a "$HAVE_LIBEQUALIZER" != "1" \) \
    -o \( "$xnvctrl" = "yes" -a "$HAVE_LIBXNVCTRL" != "1" \) \
    -o \( "$lirc" = "yes" -a "$HAVE_LIRC" != "1" \) ; then
    AC_MSG_ERROR([One or more libraries were not found. See messages above.])
fi

dnl Output
AC_CONFIG_FILES([Makefile	\
	po/Makefile.in		\
	src/base/Makefile	\
	src/Makefile		\
	doc/Makefile		\
	pkg/macosx/Info.plist	\
	])
AC_OUTPUT

dnl Print configuration for user to check
echo "Configuration:"
echo "NLS:                      $USE_NLS"
echo "Equalizer:                $equalizer"
echo "NVIDIA Quadro SDI output: $xnvctrl"
echo "lirc:                     $lirc"