aboutsummaryrefslogtreecommitdiff
path: root/gtk/configure.ac
blob: fc79c8c13e79e92bc7712acc778045b76c88165e (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
AC_INIT([fmplayer], [0.1.0])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AM_SILENT_RULES([yes])
AC_PROG_CC_C99
AC_PROG_RANLIB
AM_PROG_AR
AM_PROG_AS

PKG_CHECK_MODULES([JACK], [jack soxr], [jack_found=yes], [jack_found=no])
PKG_CHECK_MODULES([PULSE], [libpulse], [pulse_found=yes], [pulse_found=no])
PKG_CHECK_MODULES([ALSA], [alsa], [alsa_found=yes], [alsa_found=no])
PKG_CHECK_MODULES([GTK3], [gtk+-3.0 cairo])
PKG_CHECK_MODULES([SNDFILE], [sndfile])

AS_IF([test "x$jack_found" = "xno" -a "x$pulse_found" = "xno" -a "x$alsa_found" = "xno"], [
  AC_MSG_ERROR([No audio output backend found])
])

AM_CONDITIONAL([ENABLE_JACK], [test "x$jack_found" = "xyes"])
AS_IF([test "x$jack_found" = "xyes"], [
  AC_DEFINE([ENABLE_JACK])
])
AM_CONDITIONAL([ENABLE_PULSE], [test "x$pulse_found" = "xyes"])
AS_IF([test "x$pulse_found" = "xyes"], [
  AC_DEFINE([ENABLE_PULSE])
])
AM_CONDITIONAL([ENABLE_ALSA], [test "x$alsa_found" = "xyes"])
AS_IF([test "x$alsa_found" = "xyes"], [
  AC_DEFINE([ENABLE_ALSA])
])

AC_ARG_ENABLE([neon], AS_HELP_STRING([--enable-neon], [Enable NEON optimized functions for SSG sinc filtering and fmdsp palette lookup. Tested on Cortex-A53 (Raspberry PI 3)]))
AM_CONDITIONAL([ENABLE_NEON], [test "x$enable_neon" = "xyes"])
AS_IF([test "x$enable_neon" = "xyes"], [
  AC_DEFINE([ENABLE_NEON])
])

AC_CHECK_HEADER([emmintrin.h], [emmintrin_found=yes])
AM_CONDITIONAL([ENABLE_SSE], [test "x$emmintrin_found" = "xyes"])
AS_IF([test "x$emmintrin_found" = "xyes"], [
  AC_DEFINE([ENABLE_SSE])
])

AC_ARG_ENABLE([opengl], AS_HELP_STRING([--enable-opengl], [Enable OpenGL rendering for Oscilloscope view (default: enable if found)]))
AS_IF([test "x$enable_opengl" != "xno"], [
  AC_CHECK_LIB([GL], [glGetString], [opengl_found=yes])
  AC_CHECK_HEADER([GL/glcorearb.h], , [opengl_found=])
  AS_IF([test "x$enable_opengl" = "x" -a "x$opengl_found" = "xyes"], [
    enable_opengl=yes
  ])
  AS_IF([test "x$enable_opengl" = "xyes" -a "x$opengl_found" != "xyes"], [
    AC_MSG_ERROR([OpenGL header/library not found (-lGL, GL/glcorearb.h)], [1])
  ])
])
AM_CONDITIONAL([ENABLE_OPENGL], [test "x$enable_opengl" = "xyes"])

AC_CONFIG_FILES([Makefile])
AC_OUTPUT