[xiph-cvs] cvs commit: libshout/m4 xiph_compiler.m4 acx_pthread.m4 gccinclude.m4 xiph_clean_ccflags.m4
Brendan
brendan at xiph.org
Mon Jun 23 17:58:10 PDT 2003
brendan 03/06/23 20:58:10
Modified: . Makefile.am
m4 acx_pthread.m4
Added: m4 xiph_compiler.m4
Removed: m4 gccinclude.m4 xiph_clean_ccflags.m4
Log:
A load of changes by Karl
Revision Changes Path
1.16 +1 -1 libshout/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/libshout/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -u -r1.15 -r1.16
--- Makefile.am 18 Jun 2003 03:55:40 -0000 1.15
+++ Makefile.am 24 Jun 2003 00:58:10 -0000 1.16
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include src examples
EXTRA_DIST = INSTALL shout.m4 m4/ac_config_libconfig_in.m4 m4/acx_pthread.m4 \
- m4/gccinclude.m4 m4/ogg.m4 m4/vorbis.m4 m4/xiph_clean_ccflags.m4
+ m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4
docdir = $(datadir)/doc/$(PACKAGE)
doc_DATA = COPYING README examples/example.c
<p><p>1.5 +2 -1 libshout/m4/acx_pthread.m4
Index: acx_pthread.m4
===================================================================
RCS file: /usr/local/cvsroot/libshout/m4/acx_pthread.m4,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -u -r1.4 -r1.5
--- acx_pthread.m4 26 Mar 2003 02:24:00 -0000 1.4
+++ acx_pthread.m4 24 Jun 2003 00:58:10 -0000 1.5
@@ -162,7 +162,7 @@ if test "x$acx_pthread_ok" = xyes; then
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ PTHREAD_CPPFLAGS="$flag $PTHREAD_CPPFLAGS"
fi
AC_CHECK_TYPES(pthread_rwlock_t,,,[#include <pthread.h>])
@@ -177,6 +177,7 @@ fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CPPFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
<p><p>1.1 libshout/m4/xiph_compiler.m4
Index: xiph_compiler.m4
===================================================================
dnl xiph_compiler.m4
dnl $Id: xiph_compiler.m4,v 1.1 2003/06/24 00:58:10 brendan Exp $
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"
# the cat<<EOF construct makes sure echo doesn't pick, say, -n
AC_DEFUN([XIPH_CLEAN_CCFLAGS],
[AC_REQUIRE([AC_PROG_FGREP])
xcc_REV_FLAGS=''
for flag in $1
do
case "$flag" in
-l*)
xcc_REV_FLAGS="$flag $xcc_REV_FLAGS"
;;
*)
if { cat <<EOF
$xcc_REV_FLAGS
EOF
} | $FGREP -v -e " $flag " > /dev/null
then
xcc_REV_FLAGS="$flag $xcc_REV_FLAGS"
fi
esac
done
for flag in $xcc_REV_FLAGS
do
if { cat <<EOF
$2
EOF
} | $FGREP -v -e " $flag " > /dev/null
then
$2="$flag $$2"
fi
done
])dnl XIPH_CLEAN_CCFLAGS
dnl XIPH_FUNC_VA_COPY
dnl Karl Heyes
dnl
# XIPH_FUNC_VA_COPY
# Test for implementation of va_copy, or define appropriately if missing
AC_DEFUN([XIPH_FUNC_VA_COPY],
[dnl
AC_MSG_CHECKING([for va_copy])
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; va_copy(ap1, ap2);],
AC_MSG_RESULT([va_copy]),
[dnl
AH_TEMPLATE([va_copy], [define if va_copy is not available])
AC_TRY_LINK([#include <stdarg.h>], [va_list ap1, ap2; __va_copy(ap1, ap2);],
[dnl
AC_DEFINE([va_copy], [__va_copy])
AC_MSG_RESULT([__va_copy])],
[dnl
AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))])
AC_MSG_RESULT([memcpy])
])
])
])
])dnl XIPH_FUNC_VA_COPY
dnl XIPH_C_ATTRIBUTE
dnl Karl Heyes
dnl
# XIPH_C_ATTRIBUTE
# Define __attribute__ to be empty if the compiler does not support it
AC_DEFUN([XIPH_C_ATTRIBUTE],
[dnl
AC_TRY_COMPILE([int func(void) __attribute__((unused));],
[int x __attribute__ ((unused));],,[dnl
AC_DEFINE([__attribute__(x)],, [Define to empty if __attribute__ is not supported])
])
])dnl XIPH_C_ATTRIBUTE
dnl XIPH_GCC_INCLUDE_WARNING
dnl Karl Heyes
dnl
# XIPH_GCC_INCLUDE_WARNING(include-dir, action-if-warning, action-if-not)
# Tests whether GCC emits a warning if explicitly asked to put include-dir
# in its include path, because GCC is already including that path by default
AC_DEFUN([XIPH_GCC_INCLUDE_WARNING],
[AC_REQUIRE([AC_PROG_CC])
xgiw_warning=no
if test x"$GCC" = "xyes"
then
save_cflags="$CFLAGS"
CFLAGS="-Werror -I$1"
AC_TRY_COMPILE(,,,xgiw_warning=yes)
CFLAGS="$save_cflags"
fi
if test "$xgiw_warning" = "yes"
then
ifelse([$2],,:,[$2])
else
ifelse([$3],,:,[$3])
fi
])dnl XIPH_GCC_INCLUDE_WARNING
dnl XIPH_VAR_APPEND
dnl Karl Heyes
dnl
# XIPH_VAR_APPEND(shell-var, list)
# Append each item in list to shell-var iff shell-var doesn't already have it
# eg XIPH_VAR_APPEND([CFLAGS], [-O2 -I/opt/packages/include])
AC_DEFUN([XIPH_VAR_APPEND],
[dnl
AC_REQUIRE([AC_PROG_FGREP])
for arg in $2
do
if { cat <<EOF
$$1
EOF
} | $FGREP -v -e " $arg " > /dev/null
then
$1="$$1 $arg"
fi
done
])dnl XIPH_VAR_APPEND
dnl XIPH_VAR_PREPEND
dnl Karl Heyes
dnl
# XIPH_VAR_PREPEND(shell-var, list)
# see XIPH_VAR_APPEND
AC_DEFUN([XIPH_VAR_PREPEND],
[dnl
AC_REQUIRE([AC_PROG_FGREP])
xvp_compare="$1"
filtered=""
for arg in $2
do
if { cat <<EOF
$compare
EOF
} | $FGREP -v -e " $arg " > /dev/null
then
compare="$arg $compare"
filtered="$filtered $arg"
fi
done
$1="$filtered $$1"
])dnl XIPH_VAR_PREPEND
<p><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