1 dnl configure.ac file for the openspeak project
4 AC_INIT([openspeak], [0.1], [bugs@openspeak-project.org])
8 AC_CONFIG_SRCDIR([client/src/ClientApplication.cpp])
9 AC_CONFIG_HEADER([config.h])
11 AM_INIT_AUTOMAKE([openspeak], [0.1])
13 dnl Check what we need to build
16 dnl Find and check the C and C++ compiler
26 dnl check some std/stl stuff
27 AC_CHECK_LIB(stdc++, main,, AC_MSG_ERROR(openSpeak requires libstdc++))
28 AC_CHECK_HEADERS(string vector map queue,,AC_MSG_ERROR(STL classes might be missing))
30 dnl Checks for header files.
32 AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stddef.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h])
34 dnl Checks for typedefs, structures, and compiler characteristics.
41 AC_CHECK_TYPES([ptrdiff_t])
43 dnl Checks for library functions.
46 AC_FUNC_SELECT_ARGTYPES
47 AC_CHECK_FUNCS([gethostbyname gettimeofday memset mkdir select socket strchr strtoul])
49 dnl Include third party libraries
50 if test "$OS_WITH_CLIENT" = "yes"; then
52 dnl Check for the alsa library
53 AC_CHECK_LIB([asound], [snd_pcm_open],, AC_MSG_ERROR([
54 Alsa couldn't be found.
55 Please install it before trying it again.]))
57 dnl Check for the portaudio header and the lib
58 AC_CHECK_HEADERS([portaudio.h],, AC_MSG_ERROR([
59 Portaudio couldn't be found.
60 Please install it before trying it again.
61 You can find Portaudio at http://www.portaudio.com]))
62 AC_CHECK_LIB([portaudio], [Pa_Initialize],,AC_MSG_ERROR([
63 Portaudio couldn't be found.
64 Please install it before trying it again.
65 You can find Portaudio at http://www.portaudio.com]))
70 dnl Check for wxWidgets
72 AM_PATH_WXCONFIG([2.8.0], [wx=1], [wx=0], [])
73 if test "$wx" != 1; then
75 wxWidgets must be installed on your system
76 but wx-config script couldn't be found.
78 Please check that wx-config is in path, the directory
79 where wxWidgets libraries are installed (returned by
80 'wx-config --libs' command) is in LD_LIBRARY_PATH or
81 equivalent variable and wxWidgets version is 2.8.0 or above
86 if test "$OS_WITH_DEBUG" = "yes"; then
87 CPPFLAGS="$CPPFLAGS -DOS_DEBUG -ggdb3 -Wall"
90 AC_CONFIG_FILES([Makefile
99 echo "-----| Configuration finished |-----"
101 echo " You're building:"
102 echo " Client: $OS_WITH_CLIENT"
103 echo " Server: $OS_WITH_SERVER"
105 echo " Debug logging: $OS_WITH_DEBUG"
107 echo " Type 'make' to build openSpeak."