From: Andre Noll Date: Sun, 20 Apr 2014 22:18:25 +0000 (+0000) Subject: build: Convert ogg detection to new macros. X-Git-Tag: v0.5.5~44^2~15 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=273803ad81b08361351d41aa74b204ada053df4a build: Convert ogg detection to new macros. --- diff --git a/configure.ac b/configure.ac index 3768da57..0cecd25d 100644 --- a/configure.ac +++ b/configure.ac @@ -315,15 +315,15 @@ if test ${have_core_audio} = yes; then AC_SUBST(core_audio_ldflags) AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X) fi +########################################################################### ogg +STASH_FLAGS +LIB_ARG_WITH([ogg], [-logg]) +HAVE_OGG=yes +AC_CHECK_HEADERS([ogg/ogg.h], [], [HAVE_OGG=no]) +AC_CHECK_LIB([ogg], [ogg_stream_init], [], [HAVE_OGG=no]) +LIB_SUBST_FLAGS(ogg) +UNSTASH_FLAGS ####################################################### ogg/vorbis/speex/opus -have_ogg="yes" -OLD_CPPFLAGS="$CPPFLAGS" -OLD_LDFLAGS="$LDFLAGS" -OLD_LIBS="$LIBS" -AC_ARG_WITH(ogg_headers, [AS_HELP_STRING(--with-ogg-headers=dir, - [look for ogg headers also in dir])]) -AC_ARG_WITH(ogg_libs, [AS_HELP_STRING(--with-ogg-libs=dir, - [look for ogg libs also in dir])]) AC_ARG_WITH(vorbis_headers, [AS_HELP_STRING(--with-vorbis-headers=dir, [look for vorbis headers also in dir])]) AC_ARG_WITH(vorbis_libs, [AS_HELP_STRING(--with-vorbis-libs=dir, @@ -337,24 +337,10 @@ AC_ARG_WITH(opus_headers, [AS_HELP_STRING(--with-opus-headers=dir, AC_ARG_WITH(opus_libs, [AS_HELP_STRING(--with-opus-libs=dir, [look for opus libs also in dir])]) -if test -n "$with_ogg_headers"; then - ogg_cppflags="-I$with_ogg_headers" - CPPFLAGS="$CPPFLAGS $ogg_cppflags" -fi -if test -n "$with_ogg_libs"; then - ogg_libs="-L$with_ogg_libs" - LDFLAGS="$LDFLAGS $ogg_libs" -fi -AC_CHECK_HEADERS([ogg/ogg.h], [], [ have_ogg="no"; ]) -AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ]) -CPPFLAGS="$OLD_CPPFLAGS" -LDFLAGS="$OLD_LDFLAGS" -LIBS="$OLD_LIBS" - have_vorbis="yes" have_speex="yes" have_opus="yes" -if test "$have_ogg" = "yes"; then +if test "$HAVE_OGG" = 'yes'; then OLD_CPPFLAGS="$CPPFLAGS" OLD_LDFLAGS="$LDFLAGS" OLD_LIBS="$LIBS"