Fix use of $tmp_using_* in configure.ac #222

Closed
opened 2024-11-17 13:05:31 +01:00 by sox_ng · 0 comments
Owner

Fix use of $tmp_using_* in configure.ac

Description

PLD Linux changes the use of $tmp_using_{amrnb,amrwb,sndfile}:

-AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [using_sndfile=$tmp_using_sndfile])
+AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [if test "x$tmp_using_sndfile" = "xno"; then using_sndfile=no; fi])

Analysis

Jan Palus explains on 2024-10-14:

The purpose of AC_OPTIONAL_FORMAT is to enable or disable some format
support. Let's take sndfile as an example handled by the patch,
possible options are:

--without-sndfile/--with-sndfile=no: disables sndfile support

--with-sndfile: enable sndfile support by compiling sources shipped with
sox and statically linked into it

--with-sndfile=dyn: enable sndfile support by dynamically linking system library

(no option given): default to 'dyn' if --with-dyn-default was passed or 'yes' otherwise meaning static linking

The value of option (dyn/yes/no) is stored in using_sndfile variable.

Now to the actual issue. See unmodified AC_OPTIONAL_FORMAT invocation for sndfile:

AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [using_sndfile=$tmp_using_sndfile])

it discards value stored in using_sndfile entirely which breaks one scenario: --with-sndfile=dyn was passed but --with-dyn-default wasn't.
Despite user request to link sndfile dynamically it will be statically linked instead.

Conclusion

Applied as 6cff968

# Fix use of $tmp_using_* in configure.ac ## Links * [PLD Linux patch `sox-dyn`](https://git.pld-linux.org/?p=packages/sox.git;f=sox-dyn.patch;a=blob_plain;h=4dce103) ## Description PLD Linux changes the use of $tmp_using_{amrnb,amrwb,sndfile}: ``` -AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [using_sndfile=$tmp_using_sndfile]) +AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [if test "x$tmp_using_sndfile" = "xno"; then using_sndfile=no; fi]) ``` ## Analysis Jan Palus explains on 2024-10-14: > The purpose of AC_OPTIONAL_FORMAT is to enable or disable some format support. Let's take sndfile as an example handled by the patch, possible options are: > > --without-sndfile/--with-sndfile=no: disables sndfile support > > --with-sndfile: enable sndfile support by compiling sources shipped with > sox and statically linked into it > > --with-sndfile=dyn: enable sndfile support by dynamically linking system library > > (no option given): default to 'dyn' if --with-dyn-default was passed or 'yes' otherwise meaning static linking > > The value of option (dyn/yes/no) is stored in using_sndfile variable. > > Now to the actual issue. See unmodified AC_OPTIONAL_FORMAT invocation for sndfile: > > AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [using_sndfile=$tmp_using_sndfile]) > > it discards value stored in using_sndfile entirely which breaks one scenario: --with-sndfile=dyn was passed but --with-dyn-default wasn't. > Despite user request to link sndfile dynamically it will be statically linked instead. ## Conclusion Applied as 6cff968
sox_ng changed title from dummy to Fix use of $tmp_using_* in configure.ac 2024-11-17 13:05:57 +01:00
sox_ng added this to the micro milestone 2024-11-17 13:05:58 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sox_ng/sox_ng#222
No description provided.