Re: [AD] allegro-config on OS X

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


On Monday, May 16, 2005, at 04:01  am, Peter Wang wrote:

On 16/05/05, Peter Hull <peter.hull90@xxxxxxxxxx> wrote:

I suspect, though I haven't tested it yet, that a similar thing happens
for make STATICLINK=1 install: if that was the last thing installed,
allegro-config --libs defaults to the static version. You have to
specify --shared or --static to guarantee the version that is used.

Is this 'defaulting' behaviour correct and if so, is it desirable?



Incorrect and not desirable.

Patch attached. HOWEVER,
The Unix version does the same, but arguably with more justification. If you have ./configure --enable-dgblib=yes --enable-dbgprog=yes then allegro-config --libs will give you the debug version
and if you have
./configure --enable-static=yes --enable-shared=no then allegro-config --libs will give you the static version

Any thoughts?

Pete

Index: makefile.osx
===================================================================
RCS file: /cvsroot/alleg/allegro/makefile.osx,v
retrieving revision 1.50
diff -u -r1.50 makefile.osx
--- makefile.osx        23 Apr 2005 08:25:31 -0000      1.50
+++ makefile.osx        16 May 2005 21:20:15 -0000
@@ -192,15 +192,11 @@


 # XXX: Un-hardcode the @prefix@ substitution.
-$(INSTALLDIR)/bin/allegro-config: $(LIB_NAME)
+$(INSTALLDIR)/bin/allegro-config:
        install -d $(INSTALLDIR)/bin
-ifdef STATICLINK
- @sed -e "s/@LINK_WITH_STATIC_LIBS@/yes/" misc/allegro-config.in >temp
-else
@sed -e "s/@LINK_WITH_STATIC_LIBS@/no/" misc/allegro-config.in >temp
-endif
        @sed -e "s/@prefix@xxxxxxxxxx/" temp > temp2
-       @sed -e "s/@LIB_TO_LINK@/$(VERSION)/" temp2 > temp
+       @sed -e "s/@LIB_TO_LINK@/alleg/" temp2 > temp
        @sed -e "s/@LDFLAGS@//" temp > temp2
        @sed -e "s/@LIBS@/$(STATIC_LIBRARIES)/" temp2 > temp
        @sed -e "s/@INCLUDE_PREFIX@/\/usr\/local/" temp >temp2





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