55 lines
1 KiB
Text
55 lines
1 KiB
Text
dnl
|
|
dnl PortAudio configure.in script
|
|
dnl
|
|
dnl Dominic Mazzoni
|
|
dnl
|
|
|
|
dnl Require autoconf >= 2.13
|
|
AC_PREREQ(2.13)
|
|
|
|
dnl Init autoconf and make sure configure is being called
|
|
dnl from the right directory
|
|
AC_INIT([pa_common/portaudio.h])
|
|
|
|
dnl Checks for programs
|
|
AC_PROG_CC
|
|
AC_PROG_RANLIB
|
|
AC_PROG_INSTALL
|
|
AC_PATH_PROG(AR, ar, no)
|
|
if [[ $AR = "no" ]] ; then
|
|
AC_MSG_ERROR("Could not find ar - needed to create a library");
|
|
fi
|
|
|
|
dnl Extra variables we want to substitute
|
|
AC_SUBST(OTHER_OBJS)
|
|
TARGETS="tests"
|
|
|
|
dnl Determine the host operating system / platform
|
|
AC_CANONICAL_HOST
|
|
|
|
case "${host_os}" in
|
|
darwin* )
|
|
dnl Mac OS X configuration
|
|
|
|
OTHER_OBJS="pa_mac_core/pa_mac_core.o";
|
|
LIBS="-lm";
|
|
;;
|
|
|
|
*)
|
|
dnl Unix OSS configuration
|
|
|
|
AC_CHECK_LIB(pthread, pthread_create,
|
|
,
|
|
AC_MSG_ERROR([libpthread not found!]))
|
|
|
|
OTHER_OBJS="pa_unix_oss/pa_unix_oss.o";
|
|
LIBS="-lm -lpthread";
|
|
esac
|
|
|
|
AC_OUTPUT([Makefile])
|
|
|
|
echo ""
|
|
echo "Finished configure."
|
|
|
|
echo ""
|
|
echo "Type 'make' to build PortAudio and examples."
|