Add autotools build scripts and new shairplay program
[deb_shairplay.git] / configure.ac
CommitLineData
ad58f7a2
JVH
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.61)
5AC_INIT([shairplay], [0.9.0], [juhovh@iki.fi])
6AC_CONFIG_MACRO_DIR([m4])
7AC_CONFIG_SRCDIR([src/shairplay.c])
8AC_CONFIG_HEADER([config.h])
9AM_INIT_AUTOMAKE([foreign])
10
11# Checks for programs.
12AC_PROG_CC
13AC_PROG_LIBTOOL
14
15# Checks for libraries.
16
17# Checks for header files.
18AC_HEADER_STDC
19
20# Checks for typedefs, structures, and compiler characteristics.
21
22# Checks for library functions.
23
24
25
26# Custom check for os, similar to webkit
27AC_MSG_CHECKING([for native Win32])
28case "$host" in
29 *-*-mingw*)
30 os_win32=yes
31 ;;
32 *)
33 os_win32=no
34 ;;
35esac
36AC_MSG_RESULT([$os_win32])
37
38case "$host" in
39 *-*-linux*)
40 os_linux=yes
41 ;;
42 *-*-freebsd*)
43 os_freebsd=yes
44 ;;
45 *-*-darwin*)
46 os_darwin=yes
47 ;;
48esac
49
50case "$host_os" in
51 gnu* | linux* | k*bsd*-gnu)
52 os_gnu=yes
53 ;;
54 *)
55 os_gnu=no
56 ;;
57esac
58
59# OS conditionals
60AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"])
61AM_CONDITIONAL([OS_UNIX],[test "$os_win32" = "no"])
62AM_CONDITIONAL([OS_LINUX],[test "$os_linux" = "yes"])
63AM_CONDITIONAL([OS_GNU],[test "$os_gnu" = "yes"])
64AM_CONDITIONAL([OS_FREEBSD],[test "$os_freebsd" = "yes"])
65
66# Custom check for libao
67PKG_CHECK_MODULES([libao], [ao >= 1.1.0], [HAVE_LIBAO=1], [HAVE_LIBAO=0])
68AM_CONDITIONAL([USE_LIBAO], [test "$HAVE_LIBAO" -eq 1])
69
70
71
72AC_CONFIG_FILES(
73 [Makefile]
74 [include/Makefile]
75 [src/Makefile]
76 [src/lib/Makefile]
77 [src/lib/alac/Makefile]
78 [src/lib/crypto/Makefile]
79)
80AC_OUTPUT