Re: [AD] binary compatibility check for 4.2.x

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


On Sun, 2006-03-12 at 21:19 +1100, Peter Wang wrote:
> On 2006-03-12, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > On Sat, 2006-03-11 at 08:53 +1100, Peter Wang wrote:
> > > 
> > > The syntax would be @libdir@ if you were wanting configure to make the
> > > substitution.
> > > 
> > 
> > Inside configure.in?
> 
> Inside alunixac.h.  For example, makefile is produced from makefile.in
> by substuting variables surrounded by '@' chars.  But it appears
> alunixac.h does not get that kind of substitution because it's an
> AC_CONFIG_HEADER rather than an AC_CONFIG_FILE (and they have different
> purposes).
> 
> > 
> > My idea was, to get an entry:
> > 
> > #define ALLEGRO_MODULES_PATH "/usr/local/lib/allegro"
> > 
> > into alunixac.h. Or should we rather use a -D compiler switch?
> 
> That's probably fine.
> 

Ok, the attached patch should work then.

-- 
Elias Pschernig
Index: makefile.in
===================================================================
--- makefile.in	(revision 5750)
+++ makefile.in	(working copy)
@@ -58,7 +58,7 @@
 ACLOCAL_M4 = aclocal.m4
 
 INCLUDES = -I. -Iinclude -Iinclude/allegro -I$(srcdir)/include -I$(srcdir)/include/allegro
-DEFS = @DEFS@
+DEFS = -DALLEGRO_MODULES_PATH=\"$(libdir)/allegro\" @DEFS@
 CPPFLAGS = @CPPFLAGS@
 override LDFLAGS += @LDFLAGS@
 PROG_LDFLAGS = @PROG_LDFLAGS@
Index: src/unix/umodules.c
===================================================================
--- src/unix/umodules.c	(revision 5750)
+++ src/unix/umodules.c	(working copy)
@@ -44,7 +44,12 @@
 /* where to look for modules.lst */
 static char *module_path[] =
 {
-   "/usr/local/lib/allegro/", "/usr/lib/allegro/", NULL
+#ifdef ALLEGRO_MODULES_PATH
+   ALLEGRO_MODULES_PATH,
+#else
+   #error ALLEGRO_WITH_MODULES is defined, but not ALLEGRO_MODULES_PATH
+#endif
+   NULL
 };
 
 


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