File: configure.ac

package info (click to toggle)
sidplayfp 1.4.4-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 908 kB
  • sloc: cpp: 4,662; sh: 3,891; makefile: 79
file content (90 lines) | stat: -rw-r--r-- 2,191 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
dnl Process this file with autoconf to produce a configure script.
AC_INIT([sidplayfp], [1.4.4], [], [], [http://sourceforge.net/projects/sidplay-residfp/])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE


AC_CANONICAL_HOST

AC_PROG_RANLIB

dnl Checks for programs.
AC_PROG_CXX

dnl Use C++ for tests.
AC_LANG([C++])


dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN


dnl Audio subsystem

AUDIO_LDFLAGS=""

PKG_CHECK_MODULES(ALSA,
    [alsa >= 1.0],
    [AC_DEFINE([HAVE_ALSA], 1, [Define to 1 if you have libasound (-lasound).])],
    [AC_MSG_WARN([$ALSA_PKG_ERRORS])]
)

PKG_CHECK_MODULES(PULSE,
    [libpulse-simple >= 1.0],
    [AC_DEFINE([HAVE_PULSE], 1, [Define to 1 if you have libpulse-simple (-lpulse-simple).])],
    [AC_MSG_WARN([$PULSE_PKG_ERRORS])]
)


dnl Checks what version of Unix we have and soundcard support
AC_CHECK_HEADERS([sys/ioctl.h linux/soundcard.h machine/soundcard.h \
sys/soundcard.h soundcard.h])

AC_CHECK_HEADERS([dsound.h mmsystem.h], [], [], [#include <windows.h>])

AS_IF([test "$ac_cv_header_dsound_h" = "yes"],
    [AUDIO_LDFLAGS="$AUDIO_LDFLAGS -ldsound -ldxguid"]
)

AS_IF([test "$ac_cv_header_mmsystem_h" = "yes"],
    [AUDIO_LDFLAGS="$AUDIO_LDFLAGS -lwinmm"]
)

# NetBSD/OpenBSD OSS audio emulation
AS_IF([test "x$ac_cv_header_soundcard_h" = "xyes"],
    [AUDIO_LDFLAGS="$AUDIO_LDFLAGS -lossaudio"]
)

AC_SUBST(AUDIO_LDFLAGS)

AC_CHECK_FUNCS([strncasecmp strcasecmp])

PKG_CHECK_MODULES(SIDPLAYFP, [libsidplayfp >= 1.0])
PKG_CHECK_MODULES(STILVIEW, [libstilview >= 1.0])

# hack?
saveCPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $SIDPLAYFP_CFLAGS"

AC_CHECK_HEADERS([sidplayfp/builders/residfp.h sidplayfp/builders/resid.h sidplayfp/builders/hardsid.h])

CPPFLAGS=$saveCPPFLAGS

AC_MSG_CHECKING([for debugging])
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [compile for debugging @<:@no/yes, default=no@:>@])],
 [], [enable_debug=no])

AS_IF([test "x$enable_debug" = "xno"],
  [AC_MSG_RESULT([Build without debugging messages]); debug_flags=-DNDEBUG]
)

AC_SUBST([debug_flags])

AC_CONFIG_FILES([
Makefile
])

AC_OUTPUT