This repository has been archived by the owner on May 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
90 lines (74 loc) · 2.49 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([butt], [0.1.15], [BUG-REPORT-ADDRESS])
AM_INIT_AUTOMAKE([subdir-objects foreign])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
LDFLAGS="$LDFLAGS -L/usr/local/lib"
# Checks for libraries.
AC_CHECK_LIB([ogg], [ogg_stream_init], [],
[AC_MSG_ERROR([**** Could not find libogg ****])]
)
AC_CHECK_LIB([vorbis], [vorbis_info_init], [],
[AC_MSG_ERROR([**** Could not find libvorbis ****])]
)
AC_CHECK_LIB([vorbisenc], [vorbis_encode_init], [],
[AC_MSG_ERROR([**** Could not find libvorbisenc ****])]
)
AC_CHECK_LIB([opus], [opus_encoder_create], [],
[AC_MSG_ERROR([**** Could not find libopus ****])]
)
AC_CHECK_LIB([mp3lame], [lame_init], [],
[AC_MSG_ERROR([**** Could not find libmp3lame ****])]
)
AC_CHECK_LIB([FLAC], [FLAC__stream_encoder_new], [],
[AC_MSG_ERROR([**** Could not find libFLAC ****])]
)
AC_CHECK_LIB([portaudio], [Pa_Initialize], [],
[AC_MSG_ERROR([**** Could not find libportaudio ****])]
)
AC_CHECK_LIB([pthread], [pthread_create], [],
[AC_MSG_ERROR([**** Could not find libpthread ****])]
)
AC_CHECK_LIB([samplerate], [src_new], [],
[AC_MSG_ERROR([**** Could not find samplerate ****])]
)
AC_CHECK_LIB([fdk-aac], [aacEncOpen], [],
[AC_MSG_ERROR([**** Could not find libfdk-aac ****])]
)
AC_CHECK_HEADER([winsock2.h],
[
LIBS="$LIBS -lws2_32"
host_os="windows"
],
)
AM_CONDITIONAL(WINDOWS, test "$host_os" = "windows")
AC_CHECK_PROG([FLTKCONFIG],[fltk-config], [fltk-config])
if test "$FLTKCONFIG" = "fltk-config"; then
AC_CHECK_LIB([fltk], [main],
[
LIBS="$LIBS `fltk-config --ldflags --use-images`"
CXXFLAGS="$CXXFLAGS `fltk-config --cxxflags`"
],
[AC_MSG_ERROR([**** Could not find libfltk ****])]
)
else
AC_MSG_ERROR([**** Could not find fltk-config ****])
fi
# Checks for header files.
AC_PATH_X
AC_CHECK_HEADERS([fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gethostbyaddr gethostbyname memset pow select socket strchr strdup strpbrk strrchr strstr])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT