configure seems to ignore CPPFLAGS and LDFLAGS

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

configure seems to ignore CPPFLAGS and LDFLAGS

Colin Sheaff-2
I have an account on a shared webserver, so no access to root.
I've installed lame/libmad and they've successfully been compiled from source. However when I try to include them in a sox compile, configure seems to ignore them, but compiles fine:
$ ./configure --prefix="/home/xxxx/users/.home/data/sox" CPPFLAGS="-I/home/xxxx/users/.home/data/data/ffmpeg/include -I/home/xxxx/users/.home/data/lame/include -I/home/xxxx/users/.home/data/libmad" LDFLAGS="-L/home/xxxx/users/.home/data/ffmpeg/lib -L/home/xxxx/users/.home/data/lame/lib -L/home/xxxx/users/.home/data/libmad"
...
OPTIONAL FILE FORMATS
amrnb......................no
amrwb......................no
ffmpeg.....................no
flac.......................no
gsm........................yes (in-tree)
lpc10......................yes (in-tree)
mp3........................no
 id3tag....................no
 lame......................no
 mad.......................no
oggvorbis..................no
sndfile....................no
wavpack....................no
...


when I try to convert a wav to mp3, './sox FAIL formats: no handler for file extension `mp3''. Is there some other way to force 'configure' to recognize third-party libraries in non-standard locations?

Thanks for your time,
Colin

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: configure seems to ignore CPPFLAGS and LDFLAGS

Jan Stary
On Dec 02 22:23:17, Colin Sheaff wrote:

> I have an account on a shared webserver, so no access to root.
> I've installed lame/libmad and they've successfully been compiled from
> source. However when I try to include them in a sox compile, configure
> seems to ignore them, but compiles fine:
> $ ./configure --prefix="/home/xxxx/users/.home/data/sox"
> CPPFLAGS="-I/home/xxxx/users/.home/data/data/ffmpeg/include
> -I/home/xxxx/users/.home/data/lame/include
> -I/home/xxxx/users/.home/data/libmad"
> LDFLAGS="-L/home/xxxx/users/.home/data/ffmpeg/lib
> -L/home/xxxx/users/.home/data/lame/lib -L/home/xxxx/users/.home/data/libmad"
> ...

I think your problem is in how the environmental variables are passed.
Now, './configure --help' says './configure [OPTION] ... [VAR=VALUE] ...',
which is exactly what you are doing. I has not worked for me too, on
various systems.

What works for me on OpenBSD is this:
env CPPFLAGS='-I...' LDLFGAS='-L...' ./configure [OPTIONS]

> > OPTIONAL FILE FORMATS
> > amrnb......................no
> > amrwb......................no
> > ffmpeg.....................no
> > flac.......................no
> > gsm........................yes (in-tree)
> > lpc10......................yes (in-tree)
> > mp3........................no
> >  id3tag....................no
> >  lame......................no
> >  mad.......................no
> > oggvorbis..................no
> > sndfile....................no
> > wavpack....................no

> when I try to convert a wav to mp3, './sox FAIL formats: no handler for
> file extension `mp3''.

Yeah, ./configure hasn't found any of the external libraries,
'make' compiled SoX without them, so now you have a SoX that
indeed cannot handle mp3.

> Is there some other way to force 'configure' to
> recognize third-party libraries in non-standard locations?

See above. Make sure the output of './configure' mentions
that the libraries you want in fact have been found before
you 'make'.

On a general note, you might want to put some nicer structure
to your own installed libraries. For some reason, you seem
to install stuff under "/home/xxxx/users/.home/data/PROGRAM".
What I usually do in situations where I cannot install system-wide
is replicate the usual unix directory hierarchy under my $HOME,
that is, create $HOME/include, $HOME/bin, $HOME/man, etc,
and then install everything as usual, except with --prefix=$HOME
instead of the usual --prefix=/usr/local

Then I configure further installations with

        env
        CPPFLAGS='-I/usr/local/include -I$HOME/include'
        LDFLAGS='-L/usr/local/lib -L$HOME/lib'
        ./configure --prefix=$HOME ...

(Note how you don't need to -Iincludedir and -Llibdir
for each and every installed library that you want to use now,
but simply specify the one directory where they all are.)

        Jan


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: configure seems to ignore CPPFLAGS and LDFLAGS

Colin Sheaff-2
On a general note, you might want to put some nicer structure
to your own installed libraries. For some reason, you seem
to install stuff under "/home/xxxx/users/.home/data/PROGRAM".
What I usually do in situations where I cannot install system-wide
is replicate the usual unix directory hierarchy under my $HOME,
that is, create $HOME/include, $HOME/bin, $HOME/man, etc,
and then install everything as usual, except with --prefix=$HOME
instead of the usual --prefix=/usr/local

 
This particular host system allows me to create multiple users under the account 'xxxx', so 'ls /home/xxxx' returns: containers, data, domains etc, logs, ssl, stats, users.
The directory 'data' is soft linked to all the accounts, so installing there makes it available to all my sub users. The directory '/home/xxxx' is owned by root, so I can't make new directories there, unfortunately. But yeah I should probably do something a bit smarter in how I install the libs. Maybe $HOME/data/libs and $HOME/data/include. That should work. Good advice, thanks.

Colin

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users