Re: 4.3 coexistence (was Re: [AD] load_datafile_object using index)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> This reminds me.. would it be ok to rename the libraries in
> new_api_branch, like this:
>
> allegro/4.2
> liballd-4.2.0.so
> liballd.so.4.2
> liballeg-4.2.0.so
> liballeg.so.4.2
>
> In the above, change 4.2 to 4.3.
>
> For the following:
>
> liballd.a
> liballeg.a
> liballd_unsharable.a
> liballeg_unsharable.a
>
> Add a 4.3 somewhere as well, I'd simply do:
>
> liballd-4.3.a
> liballeg-4.3.a
> liballd_unsharable-4.3.a
> liballeg_unsharable-4.3.a
>
> I have no idea about proper unix naming conventions of libraries though.

Neither do I, but this sounds sensible - and desirable.

> Then, for the includes, not sure. Maybe modify allegro.h (and the other
> top-level includes) to recognize an ALLEGRO_FORCE_VERSION #define, and
> depending on that, include the proper sub-header. Like, at the beginning
> of allegro.h:
>
> #if ALLEGRO_FORCE_VERSION=4.3
> #include <allegro4.3/allegro.h>
> #else
> .. the normal 4.2 allegro.h contents go here
> #endif

Makes sense. Or, just have a toplevel allegro.h that always includes, say,
allegro-4.2/allegro.h or allegro-4.3/allegro.h based on a preprocessor
symbol.
Could even switch between the compatibility layer defaulting to on or off
in this way.

> Finally, allegro-config would be named allegro-config-4.3.

There actually should be no need: it already has a --version switch that
has the pretention of being possible to use to link to a different version
of the library. Except that it doesn't really work because the headerfiles
would not match.
Maybe we could use something like `allegro-config --cflags --version=4.3`
to automatically use the correct headerfiles?

> With the above changes, it would be easier to switch between 4.2 and
> 4.3. I'm aware that I can fiddle around with static linking and modify
> modules pathes and so on.. but well, I'm just too lazy I guess. And I
> seem to constantly mess things up with such a solution :P

Well, I usually do ./configure --enable-static --disable-shared
--disable-modules when testing things... it's a nnoying though, and being
able to have more than one version of Allegro installed would be a great
thing.

Evert





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/