AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h ctype.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h \
- string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h sys/ipc.h unistd.h utime.h malloc.h], \
+ string.h sys/socket.h sys/time.h sys/timeb.h sys/un.h sys/ipc.h unistd.h utime.h], \
[], [AC_MSG_ERROR([$ac_header not found])])
AC_CHECK_HEADER(linux/soundcard.h, [extras="$extras para_fade"],
AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
fi
+########################################################################### osx
+
+AC_MSG_CHECKING(for CoreAudio (MacOs))
+AC_TRY_LINK([
+ #include <CoreAudio/CoreAudio.h>
+],[
+ AudioDeviceID id;
+],[have_core_audio=yes],[have_core_audio=no])
+AC_MSG_RESULT($have_core_audio)
+if test ${have_core_audio} = yes; then
+ f1="-framework CoreAudio"
+ f2="-framework AudioToolbox"
+ f3="-framework AudioUnit"
+ f4="-framework CoreServices"
+ f="$f1 $f2 $f3 $f4"
+ audiod_errlist_objs="$audiod_errlist_objs osx_writer"
+ audiod_cmdline_objs="$audiod_cmdline_objs osx_write.cmdline"
+ audiod_ldflags="$audiod_ldflags $f"
+
+ write_errlist_objs="$write_errlist_objs osx_writer"
+ write_cmdline_objs="$write_cmdline_objs osx_write.cmdline"
+ write_ldflags="$write_ldflags $f"
+ write_writers="$write_writers osx"
+ AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on MacOs)
+fi
########################################################################### gtk2
pkg_modules="gtk+-2.0 >= 2.0.0"