Skip to content

Commit

Permalink
build: drop support for external lib*123
Browse files Browse the repository at this point in the history
Take a step away from a feature that is not needed by the initial prompter
anymore. It simplifies confgure.ac a little bit, which is good.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@5387 35dc7657-300d-0410-a2e5-dc2837fedb53
  • Loading branch information
thor committed Dec 28, 2023
1 parent f26bfa5 commit de05d98
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
18 changes: 2 additions & 16 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,11 @@ check_PROGRAMS =
AM_CPPFLAGS = -DPKGLIBDIR="\"$(pkglibdir)\""
AM_CPPFLAGS += $(LTDLINCL)

# Automake cannot handle dependencies behind an autoconf expansion.
# So we need elaborate ifelsery here to make it see the libtool
# files for dependency rule generation. That is stupid. One point
# for those usurping build systems with new flaws.
if BUILD_LIBMPG123
# Central place defining the mpg123 libraries to be used. You could
# put -lmpg123 in here to use an external one (for whatever reason).
LIBMPG123 = src/libmpg123/libmpg123.la
else
LIBMPG123 = @LIBMPG123_LD@
endif
if BUILD_LIBOUT123
LIBOUT123 = src/libout123/libout123.la
else
LIBOUT123 = @LIBOUT123_LD@
endif
if BUILD_LIBSYN123
LIBSYN123 = src/libsyn123/libsyn123.la
else
LIBSYN123 = @LIBSYN123_LD@
endif

# Include Make modules from subdirectories.
include src/Makemodule.am
Expand Down
5 changes: 0 additions & 5 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
-- Get rid of SIZE_P, OFF_P and friends.
-- Only enforce dummy module together with libout123, to be able
to build individual modules using --disable-components logic.
-- Allow building of programs with installed mpg123 libraries (--enable-programs,
using pkg-config to locate libmpg123 et al., prompted by
https://github.com/madebr/mpg123/pull/11). Use with care (will fail on
version mismatch). Also handle that fmt123.h is installed identically
by each library component.
- out123:
-- added --libversion

Expand Down
33 changes: 0 additions & 33 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -473,58 +473,25 @@ AM_CONDITIONAL([BUILD_LIBSYN123], [ test "x$build_libsyn123" = xyes ])
AM_CONDITIONAL([NEED_LIB], [ test "x$build_libmpg123" = xyes || test "x$build_libout123" = xyes || test "x$build_libout123_modules" = xyes || test "x$build_libsyn123" = xyes ])
AM_CONDITIONAL([NEED_MAINLIB], [ test "x$build_libmpg123" = xyes || test "x$build_libout123" = xyes || test "x$build_libsyn123" = xyes ])

dnl Some support for using separately installed lib*123. This is not perfect,
dnl with per-library CFLAGS just being lumped into global CFLAGS. So do not
dnl expect to mix differing prefixes with possibly conflicting versions of
dnl the libraries. The expectation is a version matching this source distribution,
dnl anyway.

missing_lib=no

components=""

if test "x$build_programs" = xyes; then
components="$components programs"
fi

use_extlib=no
LIBMPG123_LD=abugifused
if test "x$build_libmpg123" = xyes; then
components="$components libmpg123"
elif test "x$build_programs" = xyes; then
use_extlib=yes
PKG_CHECK_MODULES(LIBMPG123_PKG, libmpg123, HAVE_LIBMPG123="yes", HAVE_LIBMPG123="no" missing_lib=yes)
LIBMPG123_LD="$LIBMPG123_PKG_LIBS"
fi
LIBOUT123_LD=abugifused
if test "x$build_libout123" = xyes; then
components="$components libout123"
elif test "x$build_programs" = xyes; then
use_extlib=yes
PKG_CHECK_MODULES(LIBOUT123_PKG, libout123, HAVE_LIBOUT123="yes", HAVE_LIBOUT123="no" missing_lib=yes)
LIBOUT123_LD="$LIBOUT123_PKG_LIBS"
fi
if test "x$build_libout123_modules" = xyes; then
components="$components libout123-modules"
fi
LIBSYN123=abugifused
if test "x$build_libsyn123" = xyes; then
components="$components libsyn123"
elif test "x$build_programs" = xyes; then
use_extlib=yes
PKG_CHECK_MODULES(LIBSYN123_PKG, libsyn123, HAVE_LIBSYN123="yes", HAVE_LIBSYN123="no" missing_lib=yes)
LIBSYN123_LD="$LIBSYN123_PKG_LIBS"
fi

if test "x$missing_lib" = xyes; then
AC_MSG_ERROR([Missing an external mpg123 library for the programs.])
fi

dnl Stupid names because @foo@ cannot coexist with foo.
AC_SUBST(LIBMPG123_LD)
AC_SUBST(LIBOUT123_LD)
AC_SUBST(LIBSYN123_LD)

components=$(echo $components)

dnl ############## Configurable Options
Expand Down

0 comments on commit de05d98

Please sign in to comment.