[xiph-cvs] cvs commit: m4 ac_config_libconfig_in.m4
Brendan
brendan at xiph.org
Fri Jun 27 19:16:48 PDT 2003
brendan 03/06/27 22:16:47
Modified: . configure.in shout.pc.in
. ac_config_libconfig_in.m4
Log:
Karl's extension to shout-config, shout.pc
Adds cppflags and cflags-only variables
Revision Changes Path
1.54 +5 -2 libshout/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/configure.in,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -p -u -r1.53 -r1.54
--- configure.in 26 Jun 2003 16:03:37 -0000 1.53
+++ configure.in 28 Jun 2003 02:16:47 -0000 1.54
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-# $Id: configure.in,v 1.53 2003/06/26 16:03:37 brendan Exp $
+# $Id: configure.in,v 1.54 2003/06/28 02:16:47 brendan Exp $
m4_define(libshout_major, 2)
m4_define(libshout_minor, 0)
@@ -137,12 +137,15 @@ eval shout_includedir="$includedir"
prefix="$save_prefix"
SHOUT_VERSION="$VERSION"
-SHOUT_CFLAGS="-I$shout_includedir $VORBIS_CFLAGS $PTHREAD_CFLAGS $PTHREAD_CPPFLAGS"
+SHOUT_CPPFLAGS="-I$shout_includedir $VORBIS_CFLAGS $PTHREAD_CPPFLAGS"
+SHOUT_CFLAGS="$PTHREAD_CFLAGS"
SHOUT_LIBS="-lshout"
+XIPH_CLEAN_CCFLAGS([$SHOUT_CPPFLAGS], [SHOUT_CPPFLAGS])
XIPH_CLEAN_CCFLAGS([$SHOUT_CFLAGS], [SHOUT_CFLAGS])
XIPH_CLEAN_CCFLAGS([$VORBIS_LIBS $PTHREAD_LIBS $LIBS], [SHOUT_LIBDEPS])
AC_SUBST(SHOUT_LIBDEPS)
+AC_SUBST(SHOUT_CPPFLAGS)
AC_SUBST(SHOUT_CFLAGS)
AC_CONFIG_LIBCONFIG_IN_STATIC
AC_CONFIG_LIBCONFIG_IN([shout])
<p><p>1.3 +3 -1 libshout/shout.pc.in
Index: shout.pc.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/shout.pc.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -u -r1.2 -r1.3
--- shout.pc.in 26 Jun 2003 16:03:37 -0000 1.2
+++ shout.pc.in 28 Jun 2003 02:16:47 -0000 1.3
@@ -4,9 +4,11 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
+cppflags=@SHOUT_CPPFLAGS@
+cflags_only=@SHOUT_CFLAGS@
Name: Shout
Description: Audio streaming library for icecast encoders
Version: @VERSION@
Libs: -L${libdir} -lshout @SHOUT_LIBDEPS@
-Cflags: @SHOUT_CFLAGS@
+Cflags: @SHOUT_CPPFLAGS@ @SHOUT_CFLAGS@
<p><p>1.4 +21 -3 m4/ac_config_libconfig_in.m4
Index: ac_config_libconfig_in.m4
===================================================================
RCS file: /usr/local/cvsroot/m4/ac_config_libconfig_in.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -u -r1.3 -r1.4
--- ac_config_libconfig_in.m4 26 Jun 2003 16:03:37 -0000 1.3
+++ ac_config_libconfig_in.m4 28 Jun 2003 02:16:47 -0000 1.4
@@ -36,6 +36,8 @@ echo ' [[--prefix[=DIR]]]' >>$LIB
echo ' [[--exec-prefix[=DIR]]]' >>$LIBCONFIG_FILE
echo ' [[--package]]' >>$LIBCONFIG_FILE
echo ' [[--version]]' >>$LIBCONFIG_FILE
+echo ' [[--cppflags]]' >>$LIBCONFIG_FILE
+echo ' [[--cflags-only]]' >>$LIBCONFIG_FILE
echo ' [[--cflags]]' >>$LIBCONFIG_FILE
echo ' [[--libs]]' >>$LIBCONFIG_FILE
echo ' [[--help]]' >>$LIBCONFIG_FILE
@@ -53,7 +55,7 @@ echo 'h=""' >>$LIBCONFIG_FILE
echo 'for i' >>$LIBCONFIG_FILE
echo 'do' >>$LIBCONFIG_FILE
echo ' case $i in' >>$LIBCONFIG_FILE
-options="prefix exec-prefix eprefix package version cflags libs bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir infodir mandir target host build pkgdatadir pkglibdir pkgincludedir template-version help"
+options="prefix exec-prefix eprefix package version cppflags cflags-only cflags libs bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir infodir mandir target host build pkgdatadir pkglibdir pkgincludedir template-version help"
echo ' --prefix=*) prefix=`echo $i | sed -e "s/--prefix=//"` ;;' >>$LIBCONFIG_FILE
echo ' --exec-prefix=*) exec_prefix=`echo $i | sed -e "s/--exec-prefix=//"` ;;' >>$LIBCONFIG_FILE
echo ' --eprefix=*) exec_prefix=`echo $i | sed -e "s/--eprefix=//"` ;;' >>$LIBCONFIG_FILE
@@ -61,6 +63,7 @@ for option in $options ; do
case $option in
exec-prefix) echo " --$option) echo_exec_prefix=\"yes\" ;;" >>$LIBCONFIG_FILE ;;
template-version) echo " --$option) echo_template_version=\"yes\" ;;" >>$LIBCONFIG_FILE ;;
+ cflags-only) echo " --$option) echo_cflags_only=\"yes\" ;;" >>$LIBCONFIG_FILE ;;
*) echo " --$option) echo_$option=\"yes\" ;;" >>$LIBCONFIG_FILE ;;
esac
done
@@ -92,18 +95,21 @@ for option in $options extra; do
case $option in
exec-prefix) echo "if test x\$echo_exec_prefix = xyes ; then" >>$LIBCONFIG_FILE ;;
template-version) echo "if test x\$echo_template_version = xyes ; then" >>$LIBCONFIG_FILE ;;
+ cflags-only) echo "if test x\$echo_cflags_only = xyes ; then" >>$LIBCONFIG_FILE ;;
*) echo "if test x\$echo_$option = xyes ; then" >>$LIBCONFIG_FILE ;;
esac
case $option in
exec-prefix | eprefix) echo ' o="$o $exec_prefix"' >>$LIBCONFIG_FILE ;;
template-version) echo ' o="$o $template_version"' >>$LIBCONFIG_FILE ;;
+ cflags-only) echo ' o="$o $cflags"' >>$LIBCONFIG_FILE ;;
+ cppflags) echo ' o="$o $cppflags"' >>$LIBCONFIG_FILE ;;
cflags)
# echo ' i=`eval echo "$includedir"`' >>$LIBCONFIG_FILE ;
# echo ' i=`eval echo "$i"`' >>$LIBCONFIG_FILE ;
# echo ' if test "_$i" != "_/usr/include" ; then' >>$LIBCONFIG_FILE ;
# echo ' o="$o -I$includedir"' >>$LIBCONFIG_FILE ;
# echo ' fi' >>$LIBCONFIG_FILE ;
- echo ' o="$o $cflags"' >>$LIBCONFIG_FILE ;;
+ echo ' o="$o $cppflags $cflags"' >>$LIBCONFIG_FILE ;;
libs) echo ' o="$o -L$libdir $libs"' >>$LIBCONFIG_FILE ;;
help) echo ' h="1"' >>$LIBCONFIG_FILE ;;
pkgdatadir) echo " o=\"$o \${datadir}/\${package}\"" >>$LIBCONFIG_FILE ;;
@@ -135,7 +141,9 @@ echo ' --prefix \$prefix
echo ' --exec_prefix or... ' >>$LIBCONFIG_FILE
echo ' --eprefix \$exec_prefix $exec_prefix' >>$LIBCONFIG_FILE
echo ' --version \$version $version' >>$LIBCONFIG_FILE
-echo ' --cflags -I\$includedir unless it is /usr/include' >>$LIBCONFIG_FILE
+echo ' --cppflags C preprocessor flags' >>$LIBCONFIG_FILE
+echo ' --cflags-only C compiler flags' >>$LIBCONFIG_FILE
+echo ' --cflags C preprocessor and compiler flags' >>$LIBCONFIG_FILE
echo ' --libs -L\$libdir \$LIBS $libs' >>$LIBCONFIG_FILE
echo ' --package \$package $package' >>$LIBCONFIG_FILE
echo ' --bindir \$bindir $bindir' >>$LIBCONFIG_FILE
@@ -177,6 +185,15 @@ dnl we're going to need uppercase, lower
dnl string `MODULE'
m4_pushdef([MODULE_UP], m4_translit([$1], [a-z], [A-Z]))dnl
m4_pushdef([MODULE_DOWN], m4_translit([$1], [A-Z], [a-z]))dnl
+if test -z "$MODULE_DOWN[]_cppflags" ; then
+ if test -n "$MODULE_UP[]_CPPFLAGS" ; then
+ MODULE_DOWN[]_cppflags="$MODULE_UP[]_CPPFLAGS"
+ else
+dnl AC_MSG_WARN([variable `MODULE_DOWN[]_cppflags' undefined])
+ MODULE_DOWN[]_cppflags=''
+ fi
+fi
+AC_SUBST(MODULE_DOWN[]_cppflags)
if test -z "$MODULE_DOWN[]_cflags" ; then
if test -n "$MODULE_UP[]_CFLAGS" ; then
MODULE_DOWN[]_cflags="$MODULE_UP[]_CFLAGS"
@@ -204,6 +221,7 @@ if test -z "$MODULE_UP[]_VERSION" ; then
fi
AC_SUBST(MODULE_UP[]_VERSION)dnl
echo 'if test x$echo_module_$1 = xyes ; then' >>$LIBCONFIG_FILE
+AC_CONFIG_LIBCONFIG_IN_MODULES_VARS([cppflags], [MODULE_DOWN[]_cppflags], [cppflags])
AC_CONFIG_LIBCONFIG_IN_MODULES_VARS([cflags], [MODULE_DOWN[]_cflags], [cflags])
AC_CONFIG_LIBCONFIG_IN_MODULES_VARS([libs], [MODULE_DOWN[]_libs], [libs])
AC_CONFIG_LIBCONFIG_IN_MODULES_VARS([version], [MODULE_UP[]_VERSION], [modversion])
<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