From 28b6f5b46c1fc7981550be98fa7980d0692dd403 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 1 Oct 2006 22:11:25 +0200 Subject: [PATCH] add --with-oggvorbis-libs and --with-oggvorbis-headers options for configure Also, reset the LIBS variable after each test. --- Makefile.in | 5 +++++ NEWS | 4 ++-- configure.ac | 61 ++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/Makefile.in b/Makefile.in index 7d692a7e..4ac0de93 100644 --- a/Makefile.in +++ b/Makefile.in @@ -154,6 +154,11 @@ ortp_recv.o: ortp_recv.c ortp_send.o: ortp_send.c $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ortp_cppflags@ $< +oggdec.o: oggdec.c + $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $< +ogg_afh.o: ogg_afh.c + $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $< + mp3dec.o: mp3dec.c $(CC) -c $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $< diff --git a/NEWS b/NEWS index 377065ad..f1470cd0 100644 --- a/NEWS +++ b/NEWS @@ -12,8 +12,8 @@ until now for reasons beyond the scope of this changelog entry. - new output plugin for Mac Os: the osx writer - rename configure command line options from --enable-xxx-headers to --with-xxx-headers and --enable-xxx-libs to --with-xxx-libs - - configure: new command line options: --with-mad-headers - and --with-mad-libs + - configure: new command line options: --with-mad-headers, + --with-mad-libs, --with-oggvorbis-headers, and --with-oggvorbis-libs - some robustness fixes - dymamic audio format recognition for audiod - para_server: new command line option: --autoplay_delay diff --git a/configure.ac b/configure.ac index ec7f1a93..efd27d4e 100644 --- a/configure.ac +++ b/configure.ac @@ -147,7 +147,6 @@ client_ldflags="$client_ldflags $SSL_LDFLAGS $SSL_LIBS" audiod_ldflags="$audiod_ldflags $SSL_LDFLAGS $SSL_LIBS" ########################################################################### ucred - AC_MSG_CHECKING(for struct ucred) AC_TRY_LINK([ #include @@ -186,7 +185,6 @@ if test ${have_core_audio} = yes; then AC_DEFINE(HAVE_CORE_AUDIO, 1, define to 1 on Mac Os X) fi ########################################################################### gtk2 - pkg_modules="gtk+-2.0 >= 2.0.0" build_para_krell="yes" PKG_CHECK_MODULES(GTK, [$pkg_modules], [], [build_para_krell="no"]) @@ -198,7 +196,6 @@ if test build_para_krell = "yes"; then else AC_MSG_WARN([can not build para_krell]) fi - ########################################################################### sdl # FIXME AC_CHECK_LIB([SDL_image], [SDL_Init], [extras="$extras para_sdl_gui"], [ @@ -211,6 +208,7 @@ AC_CHECK_HEADER(SDL/SDL.h, [], have_mysql="yes" OLD_CPPFLAGS="$CPPFLAGS" OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" AC_ARG_WITH(mysql_headers, [AC_HELP_STRING(--with-mysql-headers=dir, [look for mysql.h also in dir])]) if test -n "$with_mysql_headers"; then @@ -241,23 +239,34 @@ else fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" ########################################################################### ogg have_ogg="yes" -AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ - have_ogg="no" -]) -AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ - have_ogg="no" -]) -AC_CHECK_HEADERS([ogg/ogg.h vorbis/codec.h], [], [ - have_ogg="no" -]) +OLD_CPPFLAGS="$CPPFLAGS" +OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" +AC_ARG_WITH(oggvorbis_headers, [AC_HELP_STRING(--with-oggvorbis-headers=dir, + [look for vorbis/codec.h also in dir])]) +if test -n "$with_oggvorbis_headers"; then + oggvorbis_cppflags="-I$with_oggvorbis_headers" + CPPFLAGS="$CPPFLAGS $oggvorbis_cppflags" +fi +AC_ARG_WITH(oggvorbis_libs, [AC_HELP_STRING(--with-oggvorbis-libs=dir, + [look for oggvorbis libs also in dir])]) +if test -n "$with_oggvorbis_libs"; then + oggvorbis_libs="-L$with_oggvorbis_libs" + LDFLAGS="$LDFLAGS $oggvorbis_libs" +fi + +AC_CHECK_LIB([ogg], [ogg_stream_init], [], [ have_ogg="no" ]) +AC_CHECK_LIB([vorbis], [vorbis_info_init], [], [ have_ogg="no" ]) +AC_CHECK_HEADERS([ogg/ogg.h vorbis/codec.h], [], [ have_ogg="no" ]) if test "$have_ogg" = "yes"; then AC_DEFINE(HAVE_OGGVORBIS, 1, define to 1 to turn on ogg vorbis support) filters="$filters oggdec" - server_ldflags="$server_ldflags -logg -lvorbis -lvorbisfile" - filter_ldflags="$filter_ldflags -lvorbis -lvorbisfile" - audiod_ldflags="$audiod_ldflags -lvorbis -lvorbisfile" + server_ldflags="$server_ldflags $oggvorbis_libs -logg -lvorbis -lvorbisfile" + filter_ldflags="$filter_ldflags $oggvorbis_libs -lvorbis -lvorbisfile" + audiod_ldflags="$audiod_ldflags $oggvorbis_libs -lvorbis -lvorbisfile" filter_cmdline_objs="$filter_cmdline_objs oggdec_filter.cmdline" audiod_cmdline_objs="$audiod_cmdline_objs oggdec_filter.cmdline" @@ -269,13 +278,19 @@ if test "$have_ogg" = "yes"; then audiod_audio_formats="ogg" server_audio_formats="$server_audio_formats ogg" filter_filters="$filter_filters oggdec" + AC_SUBST(oggvorbis_cppflags) + AC_SUBST(oggvorbis_libs) else AC_MSG_WARN([no ogg vorbis support in para_server/para_filter]) fi +CPPFLAGS="$OLD_CPPFLAGS" +LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" ########################################################################### faad have_faad=yes OLD_CPPFLAGS="$CPPFLAGS" OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" AC_ARG_WITH(faad_headers, [AC_HELP_STRING(--with-faad-headers=dir, [look for neaacdec.h also in dir])]) if test -n "$with_faad_headers"; then @@ -309,10 +324,13 @@ else fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" ########################################################################### mad have_mad="yes" OLD_CPPFLAGS="$CPPFLAGS" OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" + AC_ARG_WITH(mad_headers, [AC_HELP_STRING(--with-mad-headers=dir, [look for mad.h also in dir])]) if test -n "$with_mad_headers"; then @@ -351,8 +369,12 @@ else fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" ########################################################################### alsa have_alsa="yes" +OLD_CPPFLAGS="$CPPFLAGS" +OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" msg="=> no alsa support for para_audiod/para_write" AC_CHECK_HEADERS([alsa/asoundlib.h], [], [ AC_MSG_WARN([no alsa/asoundlib $msg]) @@ -372,10 +394,14 @@ if test "$have_alsa" = "yes"; then write_ldflags="$write_ldflags -lasound" writers="$writers alsa" fi +CPPFLAGS="$OLD_CPPFLAGS" +LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" ########################################################################### ortp have_ortp="yes" OLD_CPPFLAGS="$CPPFLAGS" OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" AC_ARG_WITH(ortp_headers, [AC_HELP_STRING(--with-ortp-headers=dir, [look for ortp/ortp.h also in dir])]) if test -n "$with_ortp_headers"; then @@ -413,10 +439,12 @@ else fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" ########################################################################### zmw build_slider="yes" OLD_CPPFLAGS="$CPPFLAGS" OLD_LD_FLAGS="$LDFLAGS" +OLD_LIBS="$LIBS" PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.4], [], [build_slider="no"]) CPPFLAGS="$GTK_CFLAGS $GLIB_CFLAGS" LDFLAGS="$LDFLAGS $GTK_LIBS" @@ -429,6 +457,7 @@ else fi CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" +LIBS="$OLD_LIBS" @@ -512,7 +541,7 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs)) AC_OUTPUT AC_MSG_NOTICE([creating Makefile.deps]) -gcc -MM -MG $mysql_cppflags $faad_cppflags $mad_cppflags $ortp_cppflags *.c > Makefile.deps +gcc -MM -MG $mysql_cppflags $faad_cppflags $mad_cppflags $ortp_cppflags $oggvorbis_cppflags *.c > Makefile.deps AC_MSG_NOTICE([ paraslash configuration: ~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.39.5