Re: [AD] allegro-config not working under macosx

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


On 2007-05-27, Grzegorz Adam Hankiewicz <gradha@xxxxxxxxxx> wrote:
> Hi.
> 
> I wanted to run allegro on a macbook. The 4.2 branch compiles and
> installs without problems, the examples run too. However, the
> allegro-config script installed into /usr/local/bin doesn't work because
> there are some @ variables which don't get substituted correctly.
> 
> This script is sed'ed from misc/allegro-config.in through makefile.osx.
> Variables like @libdir@ or @includedir@ are not modified, so I can't run
> allegro-config from other makefiles and get the correct switches for
> compilation.

How's this?

Peter
--- makefile.osx	(revision 7927)
+++ makefile.osx	(local)
@@ -202,7 +202,6 @@ $(INSTALLDIR)/lib/lib$(VERSION)-$(shared
 endif
 
 
-# XXX: Un-hardcode the @prefix@ substitution.
 $(INSTALLDIR)/bin/allegro-config: $(LIB_NAME)
 	install -d $(INSTALLDIR)/bin
 ifdef STATICLINK
@@ -210,11 +209,15 @@ ifdef STATICLINK
 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#@prefix@xxxxxxxxxx)#" temp > temp2
+	@sed -e "s#@INCLUDE_PREFIX@#$(INSTALLDIR)#" temp2 > temp
+	@sed -e "s#@includedir@xxxxxxxxxx#" temp > temp2
+	@sed -e "s#@libdir@xxxxxxxxxx#" temp2 > temp
+	@sed -e "s#@bindir@xxxxxxxxxx#" temp > temp2
 	@sed -e "s/@LIB_TO_LINK@/$(VERSION)/" 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
+	@cat temp > temp2
 	@sed -e "s/@FRAMEWORKS@/-framework Cocoa -framework $(FRAMEWORK_NAME) -l$(VERSION)-main/" temp2 > temp
 	@sed -e "s/accepts_frameworks=no/accepts_frameworks=yes/" temp > temp2
 	@sed -e "s/{lib_type} \$$allegro_libs/{lib_type}_s \$$allegro_libs/" temp2 > temp


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