[xiph-cvs] cvs commit: ices/m4 shout.m4

Brendan brendan at xiph.org
Fri Jun 13 15:19:02 PDT 2003



brendan     03/06/13 18:19:02

  Modified:    m4       shout.m4
  Log:
  Remove shout version check, it's redundant. This method of testing only works
  with libshout 2.0 anyway.
  
  test -a doesn't short-circuit, switched to && test.
  
  closed the m4_ifdef macro too late to ever run the actual header/link tests
  if PKG_CHECK_MODULES existed.

Revision  Changes    Path
1.2       +30 -25    ices/m4/shout.m4

Index: shout.m4
===================================================================
RCS file: /cvs/ice/ices/m4/shout.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -u -r1.1 -r1.2
--- shout.m4	13 Jun 2003 19:22:16 -0000	1.1
+++ shout.m4	13 Jun 2003 22:19:02 -0000	1.2
@@ -14,46 +14,51 @@ SHOUT_LIBS=""
 # Step 1: Use pkg-config if available
 m4_ifdef([PKG_CHECK_MODULES],
   [# PKG_CHECK_MODULES available
-  PKG_CHECK_MODULES([SHOUT], [shout >= 2.0])
+  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 >= 2.0'`
+  if test "$PKGCONFIG" != "none" && `$PKGCONFIG --exists shout`
   then
-    SHOUT_CFLAGS=`$PKGCONFIG --cflags`
-    SHOUT_LIBS=`$PKGCONFIG --libs`
+    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" -a `$SHOUTCONFIG --package` = "libshout"
+    if test "$SHOUTCONFIG" != "none" && test `$SHOUTCONFIG --package` = "libshout"
     then
       SHOUT_CFLAGS=`$SHOUTCONFIG --cflags`
       SHOUT_LIBS=`$SHOUTCONFIG --libs`
       have_shout="maybe"
     fi
   fi
+  ])
 
-  if test "$have_shout" != "no"
-  then
-    ac_save_CFLAGS="$CFLAGS"
-    ac_save_LIBS="$LIBS"
-    CFLAGS="$CFLAGS $SHOUT_CFLAGS"
-    LIBS="$LIBS $SHOUT_LIBS"
-    AC_CHECK_HEADER([shout/shout.h], [
-      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"
-      ])
+# Now try actually using libshout
+if test "$have_shout" != "no"
+then
+  ac_save_CFLAGS="$CFLAGS"
+  ac_save_LIBS="$LIBS"
+  CFLAGS="$CFLAGS $SHOUT_CFLAGS"
+  LIBS="$LIBS $SHOUT_LIBS"
+  AC_CHECK_HEADER([shout/shout.h], [
+    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"
     ])
-    CFLAGS="$ac_save_CFLAGS"
-    LIBS="$ac_save_LIBS"
-  fi
-
-  if test "$have_shout" != "yes"
-  then
-    ifelse([$2], , :, [$2])
-  fi
   ])
+  CFLAGS="$ac_save_CFLAGS"
+  LIBS="$ac_save_LIBS"
+fi
+
+if test "$have_shout" != "yes"
+then
+  ifelse([$2], , :, [$2])
+fi
 ])dnl XIPH_PATH_SHOUT

<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