Skip to content

Commit

Permalink
Fallback to pkg-config for finding id3tag
Browse files Browse the repository at this point in the history
I am not sure the pkg-config package for id3tag is widespread, but
it's better to still fall back to calling pkg-config:

- it might work better on systems having the pkg-config package.
- it provides a useful error message with ways to bypass the check
  specifying the values manually.
  • Loading branch information
cwendling authored and sthibaul committed Jun 20, 2023
1 parent 5d5594c commit 0bc4696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PKG_CHECK_MODULES([XML2], [libxml-2.0])
PKG_CHECK_MODULES([MAD], [mad])
PKG_CHECK_MODULES([PULSE], [libpulse])
PKG_CHECK_MODULES([ASOUND], [alsa])
AC_CHECK_HEADER(id3tag.h,, [PKG_CHECK_MODULES([ID3TAG], [id3tag])])

# Checks for header files.
AC_CHECK_HEADERS([fcntl.h libintl.h locale.h stdlib.h string.h strings.h \
Expand Down Expand Up @@ -130,12 +131,6 @@ AC_CHECK_HEADERS([locale.h])
AC_CHECK_HEADERS([malloc.h])
AC_CHECK_HEADERS([stdio_ext.h])
AC_CHECK_HEADER_STDBOOL
AC_CHECK_HEADER(id3tag.h, [], [
AC_MSG_ERROR([id3tag.h was not found
*** You must first install libid3tag before you can build this package.
*** If libid3tag is already installed, you may need to use the CPPFLAGS
*** environment variable to specify its installed location, e.g. -I<dir>.])
])
AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_FUNCS([getcwd])
AC_CHECK_FUNCS([mempcpy])
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ AM_CPPFLAGS = $(CDIO_CFLAGS) \
$(XML2_CFLAGS) \
$(MAD_CFLAGS) \
$(PULSE_CFLAGS) \
$(ID3TAG_CFLAGS) \
$(ASOUND_CFLAGS)

AM_CFLAGS = -I . -D LOCALEDIR=\"$(prefix)/share/locale\" -Wall -Wextra \
Expand All @@ -29,6 +30,7 @@ LIBS += $(CDIO_LIBS) \
$(XML2_LIBS) \
$(MAD_LIBS) \
$(PULSE_LIBS) \
$(ID3TAG_LIBS) \
$(ASOUND_LIBS)

bin_PROGRAMS = daisy-player
Expand Down

0 comments on commit 0bc4696

Please sign in to comment.