[xiph-cvs] cvs commit: libshout/m4 xiph_clean_ccflags.m4
Brendan
brendan at xiph.org
Thu Jun 12 09:59:43 PDT 2003
brendan 03/06/12 12:59:43
Modified: . configure.in
Added: m4 xiph_clean_ccflags.m4
Log:
Dirty little autoconf macro to remove duplicate compiler/linker flags.
Documented at the top of the m4 file.
Modify libshout configure to clean the flags that will be stored in shout-config
and/or shout.pc
Revision Changes Path
1.47 +3 -3 libshout/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/configure.in,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -p -u -r1.46 -r1.47
--- configure.in 10 Jun 2003 00:56:18 -0000 1.46
+++ configure.in 12 Jun 2003 16:59:43 -0000 1.47
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-# $Id: configure.in,v 1.46 2003/06/10 00:56:18 brendan Exp $
+# $Id: configure.in,v 1.47 2003/06/12 16:59:43 brendan Exp $
m4_define(libshout_major, 2)
m4_define(libshout_minor, 0)
@@ -185,8 +185,8 @@ AM_CONDITIONAL([HAVE_PKGCONFIG], [test "
# Build shout-config, shout.pc
SHOUT_VERSION="$VERSION"
SHOUT_LIBS="-lshout"
-SHOUT_LIBDEPS="$VORBIS_LIBS $OGG_LIBS $PTHREAD_LIBS"
-SHOUT_CFLAGS="$VORBIS_CFLAGS $OGG_CFLAGS $PTHREAD_CFLAGS"
+XIPH_CLEAN_CCFLAGS([$VORBIS_LIBS $OGG_LIBS $PTHREAD_LIBS], [SHOUT_LIBDEPS])
+XIPH_CLEAN_CCFLAGS([$VORBIS_CFLAGS $OGG_CFLAGS $PTHREAD_CFLAGS], [SHOUT_CFLAGS])
AC_SUBST(SHOUT_LIBDEPS)
AC_SUBST(SHOUT_CFLAGS)
AC_CONFIG_LIBCONFIG_IN_STATIC
<p><p>1.1 libshout/m4/xiph_clean_ccflags.m4
Index: xiph_clean_ccflags.m4
===================================================================
dnl xiph_clean_ccflags
dnl Brendan Cully <brendan at xiph.org> 20030612
dnl
# XIPH_CLEAN_CCFLAGS(flag-list, dest-shell-var-name)
# Filters out duplicate compiler flags
# Operates right-to-left on -l flags, left-to-right on everything else
# eg XIPH_CLEAN_CCFLAGS([-L/opt/lib -lfoo -lm -L/opt/lib -lbar -lm], [MY_LDFLAGS])
# => MY_LDFLAGS="-L/opt/lib -lfoo -lbar -lm"
AC_DEFUN([XIPH_CLEAN_CCFLAGS],
[
xcc_FLAGS="$1"
xcc_REV_FLAGS=''
for flag in $xcc_FLAGS
do
case $flag in
-l*)
xcc_REV_FLAGS="$flag $xcc_REV_FLAGS"
;;
*)
if echo $xcc_REV_FLAGS | grep -v -- $flag > /dev/null
then
xcc_REV_FLAGS="$flag $xcc_REV_FLAGS"
fi
esac
done
for flag in $xcc_REV_FLAGS
do
if echo $2 | grep -v -- $flag > /dev/null
then
$2="$flag $$2"
fi
done
])
<p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list