Skip to content

Commit 9d45096

Browse files
committed
moving to using autotools
1 parent b1f4f43 commit 9d45096

File tree

8 files changed

+1148
-0
lines changed

8 files changed

+1148
-0
lines changed

AUTHORS

Whitespace-only changes.

COPYING

+674
Large diffs are not rendered by default.

ChangeLog

Whitespace-only changes.

INSTALL

+370
Large diffs are not rendered by default.

Makefile.am

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
bin_PROGRAMS = shairport
2+
shairport_SOURCES = shairport.c daemon.c rtsp.c mdns.c mdns_external.c mdns_tinysvcmdns.c common.c rtp.c player.c alac.c audio.c audio_dummy.c audio_pipe.c tinysvcmdns.c mdns_avahi.c getopt_long.c
3+
4+
if USE_ALSA
5+
shairport_SOURCES += audio_alsa.c
6+
endif
7+
8+
if USE_SNDIO
9+
shairport_SOURCES += audio_sndio.c
10+
endif
11+
12+
if USE_AO
13+
shairport_SOURCES += audio_ao.c
14+
endif
15+
16+
if USE_PULSE
17+
shairport_SOURCES += audio_pulse.c
18+
endif
19+
20+
if USE_DNS_SD
21+
shairport_SOURCES += mdns_dns_sd.c
22+
endif

NEWS

Whitespace-only changes.

README

Whitespace-only changes.

configure.ac

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# -*- Autoconf -*-
2+
# Process this file with autoconf to produce a configure script.
3+
4+
AC_PREREQ([2.50])
5+
AC_INIT([shairport], [1.0], [[email protected]])
6+
AM_INIT_AUTOMAKE
7+
AC_CONFIG_SRCDIR([shairport.c])
8+
AC_CONFIG_HEADERS([config.h])
9+
10+
# Checks for programs.
11+
AC_PROG_CC
12+
AC_PROG_INSTALL
13+
14+
# Checks for libraries.
15+
# This is a bit messy, because if the relevant library is requested, a compiler flag is defined, a file is included in the compilation
16+
# and the relevant link files are added.
17+
18+
# Look for avahi flag
19+
AC_ARG_WITH(avahi, [ --with-avahi = choose Avahi-based mDNS support], [
20+
AC_MSG_RESULT(Including Avahi mDNS support)
21+
HAS_AVAHI=1
22+
AC_DEFINE([CONFIG_AVAHI], 1, [Needed by the compiler.])
23+
AC_CHECK_LIB([avahi-client], [avahi_client_new], , AC_MSG_ERROR(Avahi support requires the avahi-client library!))
24+
AC_CHECK_LIB([avahi-common],[avahi_strerror], , AC_MSG_ERROR(Avahi support requires the avahi-common library!))], )
25+
AM_CONDITIONAL([USE_AVAHI], [test "x$HAS_AVAHI" = "x1"])
26+
27+
# Look for ALSA flag
28+
AC_ARG_WITH(alsa, [ --with-alsa = choose native ALSA API support (GNU/Linux only)],
29+
[AC_MSG_RESULT(Including an ALSA back end)
30+
HAS_ALSA=1
31+
AC_DEFINE([CONFIG_ALSA], 1, [Needed by the compiler.])
32+
AC_CHECK_LIB([asound], [snd_pcm_open], , AC_MSG_ERROR(ALSA support requires the asound library!))], )
33+
AM_CONDITIONAL([USE_ALSA], [test "x$HAS_ALSA" = "x1"])
34+
35+
# Look for SNDIO flag
36+
AC_ARG_WITH(sndio, [ --with-sndio = choose native SNDIO API support (FreeBSD)], [
37+
AC_MSG_RESULT(Including a SNDIO back end --- N.B. this is untested)
38+
HAS_SNDIO=1
39+
AC_DEFINE([CONFIG_SNDIO], 1, [Needed by the compiler.])
40+
AC_CHECK_LIB([sndio], [sio_open], , AC_MSG_ERROR(SNDIO support requires the sndio library!))], )
41+
AM_CONDITIONAL([USE_SNDIO], [test "x$HAS_SNDIO" = "x1"])
42+
43+
# Look for AO flag
44+
AC_ARG_WITH(ao, [ --with-ao = choose native AO (Audio Output?) API support], [
45+
AC_MSG_RESULT(Including an ao back end)
46+
HAS_AO=1
47+
AC_DEFINE([CONFIG_AO], 1, [Needed by the compiler.])
48+
AC_CHECK_LIB([ao], [ao_initialize], , AC_MSG_ERROR(AO support requires the ao library!))], )
49+
AM_CONDITIONAL([USE_AO], [test "x$HAS_AO" = "x1"])
50+
51+
# Look for pulseaudio flag
52+
AC_ARG_WITH(pulseaudio, [ --with-pulseaudio = choose native PulseAudio API support], [
53+
AC_MSG_RESULT(Including a PulseAudio back end)
54+
HAS_PULSE=1
55+
AC_DEFINE([CONFIG_PULSE], 1, [Needed by the compiler.])
56+
AC_CHECK_LIB([pulse-simple], [pa_simple_new], , AC_MSG_ERROR(PulseAudio support requires the pulse-simple library!))], )
57+
AM_CONDITIONAL([USE_PULSE], [test "x$HAS_PULSE" = "x1"])
58+
59+
60+
# Look for dns_sd flag
61+
AC_ARG_WITH(dns_sd, [ --with-dns_sd = choose dns_sd mDNS support], [
62+
AC_MSG_RESULT(Including dns_sd for mDNS support)
63+
HAS_DNS_SD=1
64+
AC_DEFINE([CONFIG_HAVE_DNS_SD_H], 1, [Needed by the compiler.])
65+
AC_CHECK_LIB([dns_sd], [DNSServiceRefDeallocate], , AC_MSG_ERROR(dns_sd support requires the dns_sd library!))], )
66+
AM_CONDITIONAL([USE_DNS_SD], [test "x$HAS_DNS_SD" = "x1"])
67+
68+
AC_CHECK_LIB([crypto], [MD5_Init])
69+
AC_CHECK_LIB([ssl], [SSL_library_init])
70+
AC_CHECK_LIB([pthread],[pthread_create])
71+
AC_CHECK_LIB([m],[exp])
72+
73+
# Checks for header files.
74+
AC_HEADER_STDC
75+
AC_CHECK_HEADERS([getopt_long.h])
76+
77+
# Checks for typedefs, structures, and compiler characteristics.
78+
79+
# Checks for library functions.
80+
81+
AC_CONFIG_FILES([Makefile])
82+
AC_OUTPUT

0 commit comments

Comments
 (0)