[MPlayer-dev-eng] configuration patch to allow setting of ar from the commandline
Marc Hoffman
mmhoffm at gmail.com
Thu Aug 16 15:04:56 CEST 2007
On 8/15/07, Diego Biurrun <diego at biurrun.de> wrote:
> On Wed, Aug 15, 2007 at 08:50:52PM -0400, Marc Hoffman wrote:
> > On 8/15/07, Diego Biurrun <diego at biurrun.de> wrote:
> > > On Wed, Aug 15, 2007 at 11:34:11AM -0400, mmh wrote:
> > > >
> > > > patch to allow toplevel configuration change of the librarian. Needed
> > > > for cross compilation on some platforms where ar has a different
> > > > implementation e.g. macosx->linux.
> > >
> > > Apply.
> >
> > I need to do the same with ranlib, can I bring that out as well?
>
> Yes.
Done and commited. I was thinking it might be real nice to configure
those automatically somehow. I'm not sure how one might go about
this. Here is a stab at it just so you get the idea. Most configure
environments support this type of target option and default tools
setup.
.e.g. given on the commandline --target=xxx-yyy-zzz then:
_cc=${_target}-gcc
...
You really do need to run the commandline twice or, make it have this
type of semantics when its the first ac_option.
Marc
sorry for the inline patch I'm posting from gmail
yoda:~/dev/mplayer mmh$ svn diff configure
Index: configure
===================================================================
--- configure (revision 24079)
+++ configure (working copy)
@@ -671,8 +671,21 @@
_stream_cache=yes
_def_stream_cache="#define USE_STREAM_CACHE 1"
_need_shmem=yes
+
for ac_option do
case "$ac_option" in
+ --target=*)
+ _target=`echo $ac_option | cut -d '=' -f 2`
+ _cc=${_target}-gcc
+ _ar=${_target}-ar
+ _ranlib=${_target}-ranlib
+ _as=${_target}-as
+ ;;
+ esac
+done
+
+for ac_option do
+ case "$ac_option" in
--help|-help|-h)
show_help
;;
More information about the MPlayer-dev-eng
mailing list