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