Commit 1e262d1e authored by Karl Heyes's avatar Karl Heyes
Browse files

updates to the building of ices, uses a better pthread check and fixes

some issues in the ogg/vorbis/shout macros.

svn path=/trunk/ices/; revision=4480
parent b3d03462
......@@ -4,13 +4,13 @@ AUTOMAKE_OPTIONS = foreign dist-zip
SUBDIRS = src conf
EXTRA_DIST = README AUTHORS COPYING TODO
EXTRA_DIST = README AUTHORS COPYING TODO m4
# SCCS Definitions (for BitKeeper)
GET = true
debug:
$(MAKE) all CFLAGS="@DEBUG@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@"
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@"
$(MAKE) all CFLAGS="@PROFILE@"
......@@ -49,7 +49,7 @@ fi
echo "Generating configuration files for $package, please wait...."
echo " aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
aclocal -I m4 $ACLOCAL_FLAGS
#echo " autoheader"
#autoheader
echo " libtoolize --automake"
......
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/ices.c)
AC_PREREQ(2.52)
AM_INIT_AUTOMAKE(ices,2.0)
......@@ -14,46 +15,25 @@ if test -z "$GCC"; then
case $host in
*-*-irix*)
DEBUG="-g -signed -D_REENTRANT"
CFLAGS="-O2 -w -signed -D_REENTRANT"
XIPH_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"
XIPH_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"
XIPH_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
AC_DEFINE(_GNU_SOURCE, ,[Define if you have POSIX and GNU specifications])
XIPH_CFLAGS="-ffast-math -fsigned-char"
DEBUG="-g"
PROFILE="-g -pg"
fi
dnl Checks for programs.
......@@ -102,6 +82,9 @@ dnl Check for types
dnl Checks for library functions.
AC_CHECK_LIB(nsl, gethostbyname, LIBS="-lnsl $LIBS",)
AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS",)
dnl -- configure options --
AC_ARG_WITH(xml-config,
......@@ -120,22 +103,30 @@ 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"
XIPH_CFLAGS="$XIPH_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!))
LIBS="$LIBS $OGG_LIBS"
XIPH_CFLAGS="$XIPH_CFLAGS $OGG_CFLAGS"
AM_PATH_VORBIS(, AC_MSG_ERROR(must have Vorbis installed!))
LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS"
XIPH_CFLAGS="$XIPH_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS"
ACX_PTHREAD([
LIBS="$LIBS $PTHREAD_LIBS"
XIPH_CFLAGS="$XIPH_CFLAGS $PTHREAD_CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
])
AM_PATH_SHOUT(, AC_MSG_ERROR(must have libshout installed!))
LIBS="$LIBS $SHOUT_LIBS"
XIPH_CFLAGS="$XIPH_CFLAGS $SHOUT_CFLAGS"
dnl Make substitutions
......@@ -154,7 +145,7 @@ AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(OPT)
AC_SUBST(LIBS)
AC_SUBST(DEBUG)
AC_SUBST(CFLAGS)
dnl AC_SUBST(CFLAGS)
AC_SUBST(PROFILE)
AC_SUBST(XIPH_CFLAGS)
......
......@@ -26,23 +26,24 @@ endif
SUBDIRS = avl thread net log timing
bin_PROGRAMS = ices
AM_CFLAGS = @XIPH_CFLAGS@
noinst_HEADERS = config.h input.h inputmodule.h im_playlist.h signals.h stream.h reencode.h encode.h playlist_basic.h logging.h im_stdinpcm.h $(ossheaders) $(sunheaders) $(alsaheaders) event.h stream_shared.h metadata.h audio.h resample.h
ices_SOURCES = input.c config.c stream.c ices.c signals.c im_playlist.c reencode.c encode.c playlist_basic.c im_stdinpcm.c $(osssources) $(sunsources) $(alsasources) stream_shared.c savefile.c metadata.c stream_rewrite.c playlist_script.c audio.c resample.c
ices_LDADD = net/libicenet.la thread/libicethread.la log/libicelog.la\
avl/libiceavl.la timing/libicetiming.la
avl/libiceavl.la timing/libicetiming.la @ALSA_LIBS@
LIBS = @LIBS@ -lpthread @SOCKET_LIBS@ @XML_LIBS@ @OGG_LIBS@ @VORBIS_LIBS@\
@VORBISENC_LIBS@ @SHOUT_LIBS@ @ALSA_LIBS@
## LIBS = @LIBS@ @SOCKET_LIBS@ @XML_LIBS@ @OGG_LIBS@ @VORBIS_LIBS@\
## @VORBISENC_LIBS@ @SHOUT_LIBS@ @ALSA_LIBS@
CFLAGS = @CFLAGS@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@
## CFLAGS = @CFLAGS@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@
INCLUDES = -Inet -Ithread -Iavl -Ilog -Itiming $(OSS_CFLAGS) $(SUN_CFLAGS) $(ALSA_CFLAGS)
debug:
$(MAKE) all CFLAGS="@DEBUG@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@"
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@ @XML_CFLAGS@ @OGG_CFLAGS@ @VORBIS_CFLAGS@ @SHOUT_CFLAGS@"
$(MAKE) all CFLAGS="@PROFILE@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment