summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--configure.in2
-rw-r--r--libogg.spec1
-rw-r--r--ogg-config.in100
-rw-r--r--ogg.m499
5 files changed, 41 insertions, 162 deletions
diff --git a/Makefile.am b/Makefile.am
index 4f05782..cd5d775 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,6 @@ AUTOMAKE_OPTIONS = foreign dist-zip
SUBDIRS = src include doc win32
-bin_SCRIPTS = ogg-config
m4datadir = $(datadir)/aclocal
m4data_DATA = ogg.m4
diff --git a/configure.in b/configure.in
index 4dbf952..89ef323 100644
--- a/configure.in
+++ b/configure.in
@@ -227,4 +227,4 @@ AC_SUBST(PROFILE)
AC_SUBST(CC)
AC_SUBST(RANLIB)
-AC_OUTPUT(Makefile ogg-config src/Makefile doc/Makefile include/Makefile include/ogg/Makefile include/ogg/config_types.h win32/Makefile)
+AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile include/ogg/Makefile include/ogg/config_types.h win32/Makefile)
diff --git a/libogg.spec b/libogg.spec
index c62bd72..05c80f8 100644
--- a/libogg.spec
+++ b/libogg.spec
@@ -61,7 +61,6 @@ make DESTDIR=$RPM_BUILD_ROOT install
/usr/lib/libogg.a
/usr/lib/libogg.so
/usr/share/aclocal/ogg.m4
-/usr/bin/ogg-config
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
diff --git a/ogg-config.in b/ogg-config.in
deleted file mode 100644
index 702337c..0000000
--- a/ogg-config.in
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-
-# ogg-config
-#
-# Tool for retrieving the library/include paths Ogg was compiled with.
-#
-# Written 21 October 2000 by Jack Moffitt <jack@icecast.org>
-# Based *HEAVILY* on xmms-config from the XMMS package
-# which was
-# Based *HEAVILY* on gtk-config from the GTK+ library package.
-#
-# This work is released under the GNU GPL, version 2 or later.
-
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-exec_prefix_set=no
-data_dir="@datadir@/@PACKAGE@"
-
-version="@VERSION@"
-include_dir="@includedir@"
-ogg_include_dir="@includedir@/@PACKAGE@"
-lib_dir="@libdir@"
-
-usage()
-{
- cat <<EOF
-Usage: ogg-config [OPTIONS]
-Options:
- [--prefix[=DIR]]
- [--version]
- [--libs]
- [--cflags]
-
-EOF
- exit $1
-}
-
-if test $# -eq 0; then
- usage 1 1>&2
-fi
-
-while test $# -gt 0; do
- case "$1" in
- -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- case $1 in
- --prefix=*)
- prefix=$optarg
- ;;
-
- --prefix)
- echo_prefix=yes
- ;;
-
- --version)
- echo $version
- ;;
-
- --cflags)
- echo_cflags=yes
- ;;
-
- --libs)
- echo_libs=yes
- ;;
-
- *)
- usage 1 1>&2
- ;;
- esac
- shift
-done
-
-if test "$echo_prefix" = "yes"; then
- echo $prefix
-fi
-
-if test "$echo_exec_prefix" = "yes"; then
- echo $exec_prefix
-fi
-
-if test "$include_dir" != "/usr/include"; then
- cflags="-I$include_dir"
-fi
-
-if test "$lib_dir" != "/usr/lib"; then
- libs="-L$lib_dir -logg"
-else
- libs="-logg"
-fi
-
-if test "$echo_cflags" = "yes"; then
- echo $cflags
-fi
-
-if test "$echo_libs" = "yes"; then
- echo $libs
-fi
diff --git a/ogg.m4 b/ogg.m4
index d519de5..509f73b 100644
--- a/ogg.m4
+++ b/ogg.m4
@@ -2,47 +2,35 @@
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
-dnl AM_PATH_OGG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl AM_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
AC_DEFUN(AM_PATH_OGG,
[dnl
-dnl Get the cflags and libraries from the ogg-config script
+dnl Get the cflags and libraries
dnl
AC_ARG_WITH(ogg-prefix,[ --with-ogg-prefix=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
if test x$ogg_prefix != x ; then
- ogg_args="$ogg_args --prefix=$ogg_prefix"
- if test x${OGG_CONFIG+set} != xset ; then
- OGG_CONFIG=$ogg_prefix/bin/ogg-config
- fi
+ ogg_args="$ogg_args --prefix=$ogg_prefix"
+ OGG_CFLAGS="-I$ogg_prefix/include"
+ OGG_LIBS="-L$ogg_prefix/lib"
fi
- AC_PATH_PROG(OGG_CONFIG, ogg-config, no)
- min_ogg_version=ifelse([$1], ,1.0.0,$1)
- AC_MSG_CHECKING(for Ogg - version >= $min_ogg_version)
+ OGG_LIBS="$OGG_LIBS -logg"
+
+ AC_MSG_CHECKING(for Ogg)
no_ogg=""
- if test "$OGG_CONFIG" = "no" ; then
- no_esd=yes
- else
- OGG_CFLAGS=`$OGG_CONFIG $oggconf_args --cflags`
- OGG_LIBS=`$OGG_CONFIG $oggconf_args --libs`
- ogg_major_version=`$OGG_CONFIG $ogg_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- ogg_minor_version=`$OGG_CONFIG $ogg_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- ogg_micro_version=`$OGG_CONFIG $ogg_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_oggtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $OGG_LIBS"
+
+ if test "x$enable_oggtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $OGG_CFLAGS"
+ LIBS="$LIBS $OGG_LIBS"
dnl
-dnl Now check if the installed Ogg is sufficiently new. (Also sanity
-dnl checks the results of ogg-config to some extent
+dnl Now check if the installed Ogg is sufficiently new.
dnl
rm -f conf.oggtest
AC_TRY_RUN([
@@ -60,49 +48,42 @@ int main ()
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
- fi
fi
+
if test "x$no_ogg" = x ; then
AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
+ ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
- if test "$OGG_CONFIG" = "no" ; then
- echo "*** The ogg-config script installed by Ogg could not be found"
- echo "*** If Ogg was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the OGG_CONFIG environment variable to the"
- echo "*** full path to ogg-config."
+ if test -f conf.oggtest ; then
+ :
else
- if test -f conf.oggtest ; then
- :
- else
- echo "*** Could not run Ogg test program, checking why..."
- CFLAGS="$CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $OGG_LIBS"
- AC_TRY_LINK([
+ echo "*** Could not run Ogg test program, checking why..."
+ CFLAGS="$CFLAGS $OGG_CFLAGS"
+ LIBS="$LIBS $OGG_LIBS"
+ AC_TRY_LINK([
#include <stdio.h>
#include <ogg/ogg.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding Ogg or finding the wrong"
- echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
- echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
- echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
+], [ return 0; ],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding Ogg or finding the wrong"
+ echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
+ echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
+ echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
fi
OGG_CFLAGS=""
OGG_LIBS=""
- ifelse([$3], , :, [$3])
+ ifelse([$2], , :, [$2])
fi
AC_SUBST(OGG_CFLAGS)
AC_SUBST(OGG_LIBS)