]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
build: Convert ogg detection to new macros.
authorAndre Noll <maan@systemlinux.org>
Sun, 20 Apr 2014 22:18:25 +0000 (22:18 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Mar 2015 16:45:41 +0000 (16:45 +0000)
configure.ac

index 3768da57ddf2d8362ea64f8a1d9b4a41b03c2584..0cecd25d957c612bd4a13ffdb6431b4879e8c107 100644 (file)
@@ -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
        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
 ####################################################### 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,
 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])])
 
 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"
 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"
        OLD_CPPFLAGS="$CPPFLAGS"
        OLD_LDFLAGS="$LDFLAGS"
        OLD_LIBS="$LIBS"