sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* symlinks
@ 2020-08-11 14:12 Jan Stary
  2020-08-11 14:25 ` symlinks Måns Rullgård
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stary @ 2020-08-11 14:12 UTC (permalink / raw)
  To: sox-users

I am confused by the following commit:

commit fc20c26b2500acb6690f03d610d406bffb8944a9
Author: Mans Rullgard <mans@mansr.com>
Date:   Mon Aug 10 21:38:11 2020 +0100

    build: fix symlink selection
    
    The configure test whether to enable the play/rec links is broken,
    and the makefile uses the same condition for both play/rec and soxi.
    Fix both problems.

diff --git a/configure.ac b/configure.ac
index 9f55b5f8..12af65b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -647,13 +647,13 @@ AC_MSG_RESULT($enable_symlinks)
 enable_playrec_symlinks=no
 if test "$enable_symlinks" = "yes"; then
   SYMLINKS=yes
-  if test false \
-      -o "$enable_alsa" = yes \
-      -o "$enable_ao" = yes \
-      -o "$enable_coreaudio" = yes \
-      -o "$enable_oss" = yes \
-      -o "$enable_pulseaudio" = yes \
-      -o "$enable_sndio" = yes \
+  if test "" \
+      -o "$using_alsa" = yes \
+      -o "$using_ao" = yes \
+      -o "$using_coreaudio" = yes \
+      -o "$using_oss" = yes \
+      -o "$using_pulseaudio" = yes \
+      -o "$using_sndio" = yes \
     ; then
     PLAYRECLINKS=yes
     enable_playrec_symlinks=yes

How is using alsa/oss/sndio/whatever
related to creating symlinks (or not)?

Why do we have both SYMLINKS and PLAYRECLINKS?
Why is this different for play/rec vs soxi (also below)?

Naively, I would assume we want to create symlinks
for each of play, rec, soxi, or none of them.

	Jan


diff --git a/src/Makefile.am b/src/Makefile.am
index 1c5000df..25198232 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -145,11 +145,16 @@ EXTRA_DIST = monkey.wav optional-fmts.am \
 
 all: sox$(EXEEXT) play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT) sox_sample_test$(EXEEXT) example0$(EXEEXT) example1$(EXEEXT) example2$(EXEEXT) example3$(EXEEXT) example4$(EXEEXT) example5$(EXEEXT) example6$(EXEEXT)
 
-play$(EXEEXT) rec$(EXEEXT) soxi$(EXEEXT): sox$(EXEEXT)
+play$(EXEEXT) rec$(EXEEXT): sox$(EXEEXT)
 	if test "$(PLAYRECLINKS)" = "yes"; then	\
 		test -f sox$(EXEEXT) && ( $(RM) $@ && $(LN_S) sox$(EXEEXT) $@ ) || $(LN_S) sox $@; \
 	fi
 
+soxi$(EXEEXT): sox$(EXEEXT)
+	if test "$(SYMLINKS)" = "yes"; then	\
+		test -f sox$(EXEEXT) && ( $(RM) $@ && $(LN_S) sox$(EXEEXT) $@ ) || $(LN_S) sox $@; \
+	fi
+
 install-exec-hook:
 	if test "$(PLAYRECLINKS)" = "yes"; then	\
 		cd $(DESTDIR)$(bindir); $(RM) play$(EXEEXT) rec$(EXEEXT); $(LN_S) sox$(EXEEXT) play$(EXEEXT); $(LN_S) sox$(EXEEXT) rec$(EXEEXT); \



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: symlinks
  2020-08-11 14:12 symlinks Jan Stary
@ 2020-08-11 14:25 ` Måns Rullgård
  2020-08-11 15:30   ` symlinks Jan Stary
  0 siblings, 1 reply; 7+ messages in thread
From: Måns Rullgård @ 2020-08-11 14:25 UTC (permalink / raw)
  To: Jan Stary; +Cc: sox-users

Jan Stary <hans@stare.cz> writes:

> I am confused by the following commit:
>
> commit fc20c26b2500acb6690f03d610d406bffb8944a9
> Author: Mans Rullgard <mans@mansr.com>
> Date:   Mon Aug 10 21:38:11 2020 +0100
>
>     build: fix symlink selection
>
>     The configure test whether to enable the play/rec links is broken,
>     and the makefile uses the same condition for both play/rec and soxi.
>     Fix both problems.
>
> diff --git a/configure.ac b/configure.ac
> index 9f55b5f8..12af65b0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -647,13 +647,13 @@ AC_MSG_RESULT($enable_symlinks)
>  enable_playrec_symlinks=no
>  if test "$enable_symlinks" = "yes"; then
>    SYMLINKS=yes
> -  if test false \
> -      -o "$enable_alsa" = yes \
> -      -o "$enable_ao" = yes \
> -      -o "$enable_coreaudio" = yes \
> -      -o "$enable_oss" = yes \
> -      -o "$enable_pulseaudio" = yes \
> -      -o "$enable_sndio" = yes \
> +  if test "" \
> +      -o "$using_alsa" = yes \
> +      -o "$using_ao" = yes \
> +      -o "$using_coreaudio" = yes \
> +      -o "$using_oss" = yes \
> +      -o "$using_pulseaudio" = yes \
> +      -o "$using_sndio" = yes \
>      ; then
>      PLAYRECLINKS=yes
>      enable_playrec_symlinks=yes
>
> How is using alsa/oss/sndio/whatever
> related to creating symlinks (or not)?
>
> Why do we have both SYMLINKS and PLAYRECLINKS?
> Why is this different for play/rec vs soxi (also below)?
>
> Naively, I would assume we want to create symlinks
> for each of play, rec, soxi, or none of them.

There is no point in creating play/rec symlinks when no audio devices
are supported since they can't work then.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: symlinks
  2020-08-11 14:25 ` symlinks Måns Rullgård
@ 2020-08-11 15:30   ` Jan Stary
  2020-08-11 15:44     ` symlinks Måns Rullgård
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stary @ 2020-08-11 15:30 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: sox-users

On Aug 11 15:25:36, mans@mansr.com wrote:
> Jan Stary <hans@stare.cz> writes:
> 
> > I am confused by the following commit:
> >
> > commit fc20c26b2500acb6690f03d610d406bffb8944a9
> > Author: Mans Rullgard <mans@mansr.com>
> > Date:   Mon Aug 10 21:38:11 2020 +0100
> >
> >     build: fix symlink selection
> >
> >     The configure test whether to enable the play/rec links is broken,
> >     and the makefile uses the same condition for both play/rec and soxi.
> >     Fix both problems.
> >
> > diff --git a/configure.ac b/configure.ac
> > index 9f55b5f8..12af65b0 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -647,13 +647,13 @@ AC_MSG_RESULT($enable_symlinks)
> >  enable_playrec_symlinks=no
> >  if test "$enable_symlinks" = "yes"; then
> >    SYMLINKS=yes
> > -  if test false \
> > -      -o "$enable_alsa" = yes \
> > -      -o "$enable_ao" = yes \
> > -      -o "$enable_coreaudio" = yes \
> > -      -o "$enable_oss" = yes \
> > -      -o "$enable_pulseaudio" = yes \
> > -      -o "$enable_sndio" = yes \
> > +  if test "" \
> > +      -o "$using_alsa" = yes \
> > +      -o "$using_ao" = yes \
> > +      -o "$using_coreaudio" = yes \
> > +      -o "$using_oss" = yes \
> > +      -o "$using_pulseaudio" = yes \
> > +      -o "$using_sndio" = yes \
> >      ; then
> >      PLAYRECLINKS=yes
> >      enable_playrec_symlinks=yes
> >
> > How is using alsa/oss/sndio/whatever
> > related to creating symlinks (or not)?
> >
> > Why do we have both SYMLINKS and PLAYRECLINKS?
> > Why is this different for play/rec vs soxi (also below)?
> >
> > Naively, I would assume we want to create symlinks
> > for each of play, rec, soxi, or none of them.
> 
> There is no point in creating play/rec symlinks
> when no audio devices are supported since they can't work then.

The current build system seems to omit sunaudio and waveaudio
from the list above, but with the rationale you describe,
they should be there too, right? Or is this intended?

Anyway, the manpages still get symlinked even if play/rec don't,
e.g. when all the drivers ar explicitly disabled. Is that intended?

$ cat /tmp/c
--with-alsa=no
--with-ao=no
--with-coreaudio=no
--with-oss=no
--with-pulseaudio=no
--with-sndio=no
--with-sunaudio=no
--with-waveaudio=no

$ env AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 \
	./configure `cat /tmp/c` --prefix=$HOME

[...]

OPTIONAL DEVICE DRIVERS
ao (Xiph)..................no
alsa (Linux)...............no
coreaudio (Mac OS X).......no
sndio (OpenBSD)............no
oss........................no
pulseaudio.................no
sunaudio...................no
waveaudio (MS-Windows).....no

$ env AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.16 make install
[...]
cd /home/hans/share/man/man1 && rm -f play.1 && ln -s sox.1 play.1
cd /home/hans/share/man/man1 && rm -f rec.1 && ln -s sox.1 rec.1

	Jan



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: symlinks
  2020-08-11 15:30   ` symlinks Jan Stary
@ 2020-08-11 15:44     ` Måns Rullgård
  2020-08-11 17:25       ` symlinks Jan Stary
  0 siblings, 1 reply; 7+ messages in thread
From: Måns Rullgård @ 2020-08-11 15:44 UTC (permalink / raw)
  To: Jan Stary; +Cc: sox-users

Jan Stary <hans@stare.cz> writes:

> On Aug 11 15:25:36, mans@mansr.com wrote:
>> Jan Stary <hans@stare.cz> writes:
>> 
>> > I am confused by the following commit:
>> >
>> > commit fc20c26b2500acb6690f03d610d406bffb8944a9
>> > Author: Mans Rullgard <mans@mansr.com>
>> > Date:   Mon Aug 10 21:38:11 2020 +0100
>> >
>> >     build: fix symlink selection
>> >
>> >     The configure test whether to enable the play/rec links is broken,
>> >     and the makefile uses the same condition for both play/rec and soxi.
>> >     Fix both problems.
>> >
>> > diff --git a/configure.ac b/configure.ac
>> > index 9f55b5f8..12af65b0 100644
>> > --- a/configure.ac
>> > +++ b/configure.ac
>> > @@ -647,13 +647,13 @@ AC_MSG_RESULT($enable_symlinks)
>> >  enable_playrec_symlinks=no
>> >  if test "$enable_symlinks" = "yes"; then
>> >    SYMLINKS=yes
>> > -  if test false \
>> > -      -o "$enable_alsa" = yes \
>> > -      -o "$enable_ao" = yes \
>> > -      -o "$enable_coreaudio" = yes \
>> > -      -o "$enable_oss" = yes \
>> > -      -o "$enable_pulseaudio" = yes \
>> > -      -o "$enable_sndio" = yes \
>> > +  if test "" \
>> > +      -o "$using_alsa" = yes \
>> > +      -o "$using_ao" = yes \
>> > +      -o "$using_coreaudio" = yes \
>> > +      -o "$using_oss" = yes \
>> > +      -o "$using_pulseaudio" = yes \
>> > +      -o "$using_sndio" = yes \
>> >      ; then
>> >      PLAYRECLINKS=yes
>> >      enable_playrec_symlinks=yes
>> >
>> > How is using alsa/oss/sndio/whatever
>> > related to creating symlinks (or not)?
>> >
>> > Why do we have both SYMLINKS and PLAYRECLINKS?
>> > Why is this different for play/rec vs soxi (also below)?
>> >
>> > Naively, I would assume we want to create symlinks
>> > for each of play, rec, soxi, or none of them.
>> 
>> There is no point in creating play/rec symlinks
>> when no audio devices are supported since they can't work then.
>
> The current build system seems to omit sunaudio and waveaudio
> from the list above, but with the rationale you describe,
> they should be there too, right? Or is this intended?

Sorry, I missed that.

> Anyway, the manpages still get symlinked even if play/rec don't,
> e.g. when all the drivers ar explicitly disabled. Is that intended?

I missed that too.  The whole thing is a mess.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: symlinks
  2020-08-11 15:44     ` symlinks Måns Rullgård
@ 2020-08-11 17:25       ` Jan Stary
  2020-08-11 17:27         ` symlinks Måns Rullgård
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stary @ 2020-08-11 17:25 UTC (permalink / raw)
  To: Måns Rullgård; +Cc: sox-users

> >> > How is using alsa/oss/sndio/whatever
> >> > related to creating symlinks (or not)?
> >> >
> >> > Why do we have both SYMLINKS and PLAYRECLINKS?
> >> > Why is this different for play/rec vs soxi (also below)?
> >> >
> >> > Naively, I would assume we want to create symlinks
> >> > for each of play, rec, soxi, or none of them.
> >> 
> >> There is no point in creating play/rec symlinks
> >> when no audio devices are supported since they can't work then.
> >
> > The current build system seems to omit sunaudio and waveaudio
> > from the list above, but with the rationale you describe,
> > they should be there too, right? Or is this intended?
> 
> Sorry, I missed that.
> 
> > Anyway, the manpages still get symlinked even if play/rec don't,
> > e.g. when all the drivers ar explicitly disabled. Is that intended?
> 
> I missed that too.  The whole thing is a mess.

I don't think the complexity is worth it at all.

Why not just create a symlink for play, rec, and soxi,
and a symlink for the play.1 and rec.1 manpages, always?

In the worst case, we create a needless symlink.
(And than the user plugs a soundcard in and runs play,
which is no longer needless, as opposed to recompiling).

The alternative is this mess we have now.



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: symlinks
  2020-08-11 17:25       ` symlinks Jan Stary
@ 2020-08-11 17:27         ` Måns Rullgård
  2020-08-12  7:08           ` symlinks Jan Stary
  0 siblings, 1 reply; 7+ messages in thread
From: Måns Rullgård @ 2020-08-11 17:27 UTC (permalink / raw)
  To: Jan Stary; +Cc: sox-users

Jan Stary <hans@stare.cz> writes:

>> >> > How is using alsa/oss/sndio/whatever
>> >> > related to creating symlinks (or not)?
>> >> >
>> >> > Why do we have both SYMLINKS and PLAYRECLINKS?
>> >> > Why is this different for play/rec vs soxi (also below)?
>> >> >
>> >> > Naively, I would assume we want to create symlinks
>> >> > for each of play, rec, soxi, or none of them.
>> >> 
>> >> There is no point in creating play/rec symlinks
>> >> when no audio devices are supported since they can't work then.
>> >
>> > The current build system seems to omit sunaudio and waveaudio
>> > from the list above, but with the rationale you describe,
>> > they should be there too, right? Or is this intended?
>> 
>> Sorry, I missed that.
>> 
>> > Anyway, the manpages still get symlinked even if play/rec don't,
>> > e.g. when all the drivers ar explicitly disabled. Is that intended?
>> 
>> I missed that too.  The whole thing is a mess.
>
> I don't think the complexity is worth it at all.
>
> Why not just create a symlink for play, rec, and soxi,
> and a symlink for the play.1 and rec.1 manpages, always?
>
> In the worst case, we create a needless symlink.
> (And than the user plugs a soundcard in and runs play,
> which is no longer needless, as opposed to recompiling).

If sox was built without any audio device support, only rebuilding it is
going to make 'play' or 'rec' do anything useful.

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: symlinks
  2020-08-11 17:27         ` symlinks Måns Rullgård
@ 2020-08-12  7:08           ` Jan Stary
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Stary @ 2020-08-12  7:08 UTC (permalink / raw)
  To: Måns Rullgård

On Aug 11 18:27:24, mans@mansr.com wrote:
> > I don't think the complexity is worth it at all.
> >
> > Why not just create a symlink for play, rec, and soxi,
> > and a symlink for the play.1 and rec.1 manpages, always?
> >
> > In the worst case, we create a needless symlink.
> > (And than the user plugs a soundcard in and runs play,
> > which is no longer needless, as opposed to recompiling).
> 
> If sox was built without any audio device support, only rebuilding it is
> going to make 'play' or 'rec' do anything useful.

Right; sorry.

Still, I would just install the symlinks anyway,
even if they don't do anything. The simplification
of the build/install is imho worth an extra symlink.

Jan



_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-12  7:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 14:12 symlinks Jan Stary
2020-08-11 14:25 ` symlinks Måns Rullgård
2020-08-11 15:30   ` symlinks Jan Stary
2020-08-11 15:44     ` symlinks Måns Rullgård
2020-08-11 17:25       ` symlinks Jan Stary
2020-08-11 17:27         ` symlinks Måns Rullgård
2020-08-12  7:08           ` symlinks Jan Stary

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).