[xiph-cvs] cvs commit: ices/m4 shout.m4
Brendan
brendan at xiph.org
Wed Jun 25 10:04:59 PDT 2003
brendan 03/06/25 13:04:59
Modified: m4 shout.m4
Log:
Copy latest libshout shout.m4 macro
We really need a CVS "m4" module.
Revision Changes Path
1.4 +27 -32 ices/m4/shout.m4
Index: shout.m4
===================================================================
RCS file: /cvs/ice/ices/m4/shout.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -u -r1.3 -r1.4
--- shout.m4 22 Jun 2003 02:38:55 -0000 1.3
+++ shout.m4 25 Jun 2003 17:04:59 -0000 1.4
@@ -2,49 +2,44 @@ dnl XIPH_PATH_SHOUT
dnl Jack Moffitt <jack at icecast.org> 08-06-2001
dnl Rewritten for libshout 2
dnl Brendan Cully <brendan at xiph.org> 20030612
-dnl
+dnl
+dnl $Id: shout.m4,v 1.4 2003/06/25 17:04:59 brendan Exp $
+
# XIPH_PATH_SHOUT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
# Test for libshout, and define SHOUT_CFLAGS and SHOUT_LIBS
AC_DEFUN([XIPH_PATH_SHOUT],
[dnl
-have_shout="no"
+xt_have_shout="no"
SHOUT_CFLAGS=""
SHOUT_LIBS=""
-# seed pkg-config with the default libshout location
-PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-/usr/local/lib/pkgconfig}
-export PKG_CONFIG_PATH
+# NB: PKG_CHECK_MODULES exits if pkg-config is unavailable on the targe
+# system, so we can't use it.
# Step 1: Use pkg-config if available
-m4_ifdef([PKG_CHECK_MODULES],
- [# PKG_CHECK_MODULES available
- PKG_CHECK_MODULES([SHOUT], [shout])
- have_shout="maybe"],
- [# PKG_CHECK_MODULES is unavailable, search for pkg-config program
- AC_PATH_PROG([PKGCONFIG], [pkg-config], [none])
- if test "$PKGCONFIG" != "none" && `$PKGCONFIG --exists shout`
+AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
+if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`
+then
+ SHOUT_CFLAGS=`$PKGCONFIG --cflags shout`
+ SHOUT_LIBS=`$PKGCONFIG --libs shout`
+ xt_have_shout="maybe"
+else
+ if test "$PKGCONFIG" != "no"
then
- SHOUT_CFLAGS=`$PKGCONFIG --cflags shout`
- SHOUT_LIBS=`$PKGCONFIG --libs shout`
- have_shout="maybe"
- else
- if test "$PKGCONFIG" != "none"
- then
- AC_MSG_NOTICE([$PKGCONFIG couldn't find libshout. Try adjusting PKG_CONFIG_PATH.])
- fi
- # Step 2: try shout-config
- AC_PATH_PROG([SHOUTCONFIG], [shout-config], [none])
- if test "$SHOUTCONFIG" != "none" && test `$SHOUTCONFIG --package` = "libshout"
- then
- SHOUT_CFLAGS=`$SHOUTCONFIG --cflags`
- SHOUT_LIBS=`$SHOUTCONFIG --libs`
- have_shout="maybe"
- fi
+ AC_MSG_NOTICE([$PKGCONFIG couldn't find libshout. Try adjusting PKG_CONFIG_PATH.])
fi
- ])
+ # pkg-config unavailable, try shout-config
+ AC_PATH_PROG([SHOUTCONFIG], [shout-config], [no])
+ if test "$SHOUTCONFIG" != "no" && test `$SHOUTCONFIG --package` = "libshout"
+ then
+ SHOUT_CFLAGS=`$SHOUTCONFIG --cflags`
+ SHOUT_LIBS=`$SHOUTCONFIG --libs`
+ xt_have_shout="maybe"
+ fi
+fi
# Now try actually using libshout
-if test "$have_shout" != "no"
+if test "$xt_have_shout" != "no"
then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
@@ -54,14 +49,14 @@ then
AC_DEFINE([HAVE_SHOUT_SHOUT_H], 1, [Define if you have <shout/shout.h>])
AC_CHECK_FUNC([shout_new], [
ifelse([$1], , :, [$1])
- have_shout="yes"
+ xt_have_shout="yes"
])
])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
-if test "$have_shout" != "yes"
+if test "$xt_have_shout" != "yes"
then
ifelse([$2], , :, [$2])
fi
<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