dnl Process this file with autoconf to produce a configure script. AC_INIT(src/ices.c) AM_INIT_AUTOMAKE(ices,2.0) AC_PROG_CC AM_PROG_LIBTOOL dnl Set some options based on environment SOCKET_LIBS= if test -z "$GCC"; then case $host in *-*-irix*) DEBUG="-g -signed -D_REENTRANT" CFLAGS="-O2 -w -signed -D_REENTRANT" PROFILE="-p -g3 -O2 -signed -D_REENTRANT" ;; *-*-solaris*) DEBUG="-v -g -D_REENTRANT" CFLAGS="-xO4 -fast -w -fsimple -native -xcg92 -D_REENTRANT" PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc -D_REENTRANT" SOCKET_LIBS="-lnsl -lsocket -lresolv" ;; *) DEBUG="-g -D_REENTRANT" CFLAGS="-O -D_REENTRANT" PROFILE="-g -p -D_REENTRANT" ;; esac else case $host in *-*-linux*) DEBUG="-g -Wall -fsigned-char -D_REENTRANT -D_GNU_SOURCE" CFLAGS="-O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE" PROFILE="-Wall -W -pg -g -O20 -ffast-math -fsigned-char -D_REENTRANT -D_GNU_SOURCE" ;; sparc-sun-solaris*) DEBUG="-g -Wall -fsigned-char -mv8 -D_REENTRANT" CFLAGS="-O20 -ffast-math -fsigned-char -mv8 -D_REENTRANT" PROFILE="-pg -g -O20 -fsigned-char -mv8 -D_REENTRANT" SOCKET_LIBS="-lnsl -lsocket -lresolv" ;; *-pc-solaris*) DEBUG="-g -Wall -fsigned-char -D_REENTRANT" CFLAGS="-O20 -ffast-math -fsigned-char -D_REENTRANT" PROFILE="-pg -g -O20 -fsigned-char -D_REENTRANT" SOCKET_LIBS="-lnsl -lsocket -lresolv" ;; *) DEBUG="-g -Wall -fsigned-char -D_REENTRANT" CFLAGS="-O20 -fsigned-char -D_REENTRANT" PROFILE="-O20 -g -pg -fsigned-char -D_REENTRANT" ;; esac fi dnl Checks for programs. dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADER(stdint.h, AC_DEFINE(HAVE_STDINT_H, 1),,) dnl Check for OSS AC_CHECK_HEADER(sys/soundcard.h, have_oss=yes, have_oss=no) AC_CHECK_HEADER(machine/soundcard.h, have_oss=yes, ) AM_CONDITIONAL(HAVE_OSS,test "$have_oss" = yes) if test "$have_oss" = yes; then OSS_CFLAGS="-DHAVE_OSS" fi dnl Check for Sun audio AC_CHECK_HEADER(sys/audioio.h, have_sun_audio=yes, have_sun_audio=no) AM_CONDITIONAL(HAVE_SUN_AUDIO,test "$have_sun_audio" = yes) if test "$have_sun_audio" = yes; then SUN_CFLAGS="-DHAVE_SUN_AUDIO" fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Check for types dnl Checks for library functions. dnl -- configure options -- AC_ARG_WITH(xml-config, [ --with-xml-config=PATH use xml-config in PATH to find libxml ], [if ! test -x "$with_xml_config" then AC_MSG_ERROR([$with_xml_config cannot be executed]) fi XMLCONFIG="$with_xml_config"] ) if test -z "$XMLCONFIG" then AC_CHECK_PROGS(XMLCONFIG, [xml2-config xml-config]) fi if test -n "$XMLCONFIG" then XML_LIBS="`$XMLCONFIG --libs`" XML_CFLAGS="`$XMLCONFIG --cflags`" save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$LIBS $XML_LIBS" CFLAGS="$CFLAGS $XML_CFLAGS" AC_CHECK_FUNC(xmlParseFile,, [AC_MSG_ERROR([There was a problem linking with libxml])]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" save_LIBS= save_CFLAGS= else AC_MSG_ERROR([xml-config could not be found]) fi AM_PATH_OGG(, AC_MSG_ERROR(must have Ogg installed!)) AM_PATH_VORBIS(, AC_MSG_ERROR(must have Vorbis installed!)) AM_PATH_SHOUT(, AC_MSG_ERROR(must have libshout installed!)) dnl Make substitutions AC_SUBST(OSS_CFLAGS) AC_SUBST(SUN_CFLAGS) AC_SUBST(SOCKET_LIBS) AC_SUBST(XML_LIBS) AC_SUBST(SHOUT_LIBS) AC_SUBST(OGG_CFLAGS) AC_SUBST(VORBIS_CFLAGS) AC_SUBST(SHOUT_CLFAGS) AC_SUBST(XML_CFLAGS) AC_SUBST(LIBTOOL_DEPS) AC_SUBST(OPT) AC_SUBST(LIBS) AC_SUBST(DEBUG) AC_SUBST(CFLAGS) AC_SUBST(PROFILE) AC_OUTPUT(Makefile conf/Makefile src/Makefile src/avl/Makefile src/thread/Makefile src/net/Makefile src/log/Makefile src/timing/Makefile)