[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1627
Date       : Mon Jul 31 23:58:08 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/Makefile.am
   M /Trunk/XaraLX/Makefile.am
   M /Trunk/XaraLX/PreComp/Makefile.am
   M /Trunk/XaraLX/configure.in
   M /Trunk/XaraLX/filters/SVGFilter/Makefile.am
   M /Trunk/XaraLX/filters/SVGFilter/configure.in
   M /Trunk/XaraLX/tools/Makefile.am
   M /Trunk/XaraLX/wxOil/Makefile.am
   M /Trunk/XaraLX/wxXtra/Makefile.am
   M /Trunk/XaraLX/xarlib/Makefile.am

Extensive rework of build system (sadly necessary to fix Gerry's build problem).* Removed libtool
* Made static builds work without hard-coded paths
* Removed extraneous duplication on compiler option lines


Diff:
Index: Trunk/XaraLX/tools/Makefile.am
===================================================================
--- Trunk/XaraLX/tools/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/tools/Makefile.am	(revision 1627)
@@ -5,6 +5,8 @@
 # of the other Makefile.am variables
 noinst_LIBRARIES	= libTools.a
 
+libTools_a_CXXFLAGS = $(XARALXCXXFLAGS) $(XARAFLAGS)
+
 # the application source, library search path, and link libraries
 libTools_a_SOURCES = opdrbrsh.cpp zoomtool.cpp zoomops.cpp blndtool.cpp opbevel.cpp \
 	dragtool.cpp viewmod.cpp selector.cpp selinfo.cpp tranlate.cpp oprotate.cpp \
Index: Trunk/XaraLX/filters/SVGFilter/configure.in
===================================================================
--- Trunk/XaraLX/filters/SVGFilter/configure.in	(revision 1626)
+++ Trunk/XaraLX/filters/SVGFilter/configure.in	(revision 1627)
@@ -111,16 +111,6 @@
 
 # -----------------------------------------------------------------------------
 
-# Set up our XarLib build flags
-# Change this to be hopefully like wxWidgets above
-# Only do this if we are not inside a local build tree
-if test "$LocalXarLibEnable" != "yes"; then
-	PKG_CHECK_MODULES(XARLIB, [Xar])
-else
-	XARLIB_CFLAGS=""
-	XARLIB_LIBS=""
-fi
-
 # Setup our build flags (if not set by user)
 CPPFLAGS="-Wall -Wno-unknown-pragmas -g -fexceptions $DEBUG_FLAGS -DUSE_STD_ALLOC -DUSE_XARLIB"
 
@@ -132,6 +122,21 @@
 CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS"
 LDFLAGS="$LDFLAGS $WX_LIBS"
 
+# Set up our XarLib build flags
+# Change this to be hopefully like wxWidgets above
+# Only do this if we are not inside a local build tree
+if test "$LocalXarLibEnable" != "yes"; then
+	PKG_CHECK_MODULES(XARLIB, [Xar])
+else
+	# stops CPPFLAGS etc being set twice which upsets static link it seems, also drop 
+	XARLIB_CFLAGS="$CXXFLAGS"
+	XARLIB_LIBS="$WX_LIBS"
+	unset CPPFLAGS
+	unset CXXFLAGS
+	unset LDFLAGS
+fi
+
+
 AC_PROG_CXX
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
Index: Trunk/XaraLX/filters/SVGFilter/Makefile.am
===================================================================
--- Trunk/XaraLX/filters/SVGFilter/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/filters/SVGFilter/Makefile.am	(revision 1627)
@@ -5,8 +5,8 @@
 # note includes are built, so no need to refer to topdir
 XARLIB_CFLAGS2 = -DEXCLUDE_FROM_XARLIB -DUSE_NATIVE_XLONG -DBUILDSHADOWS -DOLD_MATRIX_TRANSFORMATIONS -DVECTOR_STROKING -DEXCLUDE_FROM_XARLIB -DNEW_SHADOW_RENDER -DNO_XARACMS \
 				-DNEW_FEATURES -DSHOWPORTNOTE -DDO_EXPORT \
-				-I../../xarlib/include
-XARLIB_LIBS2 = -L../../xarlib/.libs -lXar
+				-I../../xarlib/include $(WX_CXXFLAGS)
+XARLIB_LIBS2 = -L../../xarlib -lXar
 else
 XARLIB_CFLAGS2 =
 XARLIB_LIBS2 =
@@ -16,13 +16,13 @@
 svgfilter_SOURCES = svgfilter.cpp svgfilter.h import.cpp svgimporter.cpp \
 		    svgimporter.h export.cpp utils.cpp utils.h styles.cpp \
 		    styles.h version.h
-svgfilter_CPPFLAGS = $(XARLIB_CFLAGS) $(XARLIB_CFLAGS2) $(LIBXML2_CFLAGS)
-svgfilter_LDADD = $(XARLIB_LIBS) $(XARLIB_LIBS2) $(LIBXML2_LIBS)
+svgfilter_CPPFLAGS = $(XARLIB_CFLAGS2) $(LIBXML2_CFLAGS) $(XARLIB_CFLAGS)
+svgfilter_LDADD = $(XARLIB_LIBS2) $(LIBXML2_LIBS) $(XARLIB_LIBS)
 
 svgfilterui_SOURCES = svgfilterui.cpp svgfilterui.h svgexportdialog.cpp \
 		      svgexportdialog.h version.h
-svgfilterui_CPPFLAGS = $(LIBXML2_CFLAGS)
-svgfilterui_LDADD = $(LIBXML2_LIBS)
+svgfilterui_CPPFLAGS = $(XARLIB_CFLAGS) $(XARLIB_CFLAGS2) $(LIBXML2_CFLAGS)
+svgfilterui_LDADD = $(XARLIB_LIBS) $(XARLIB_LIBS2) $(LIBXML2_LIBS)
 
 EXTRA_DIST = svgfilterui.pjd svgfilter.xml svgfilterc.xml \
 	     images/*.png samples/*.xar tests/*.svg
Index: Trunk/XaraLX/Kernel/Makefile.am
===================================================================
--- Trunk/XaraLX/Kernel/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/Kernel/Makefile.am	(revision 1627)
@@ -5,6 +5,8 @@
 # of the other Makefile.am variables
 noinst_LIBRARIES	= libKernel.a
 
+libKernel_a_CXXFLAGS = $(XARALXCXXFLAGS) $(XARAFLAGS)
+
 # the application source, library search path, and link libraries
 libKernel_a_SOURCES = app.cpp arrows.cpp attr.cpp attraggl.cpp attrappl.cpp attrbev.cpp \
 	attrmap.cpp attrmgr.cpp basedoc.cpp beveler.cpp bevtrap.cpp biasgain.cpp \
Index: Trunk/XaraLX/xarlib/Makefile.am
===================================================================
--- Trunk/XaraLX/xarlib/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/xarlib/Makefile.am	(revision 1627)
@@ -12,7 +12,7 @@
 pkgincludedir=$(includedir)/xarlib
 
 # Main target
-lib_LTLIBRARIES = libXar.la
+lib_LIBRARIES = libXar.a
 
 # have to use the -I flags to point at the three directories concerned as I
 # can't get this file to compile pretranslated source files.
@@ -24,7 +24,7 @@
 
 # make sure this does NOT have our include files in the path
 # xarlib needs to be first
-libXar_la_CXXFLAGS = $(XARLIBFLAGS)
+libXar_a_CXXFLAGS =  $(XARALXCXXFLAGS) $(XARLIBFLAGS)
 
 # Ensure these all begin with "../<directory>/" even if in the current directory
 XARLIBCPP = \
@@ -152,7 +152,9 @@
 INSTHEADERS = $(addprefix include/xarlib/, $(notdir $(XARLIBHEADERS)) )
 INSTCPP = $(notdir $(XARLIBCPP) )
 
-libXar_la_SOURCES = $(XARLIBCPP) $(INSTHEADERS)
+libXar_a_SOURCES = $(XARLIBCPP) $(INSTHEADERS)
+# Only build the static library until we have an API/ABI nailed down
+#libXar_a_LIBADD = $(WX_LIBS2)
 
 pkginclude_HEADERS = $(INSTHEADERS)
 
@@ -169,7 +171,7 @@
 # Generate a directory of includes which has "xarlib/" in the include path
 $(INSTHEADERS) : $(XARLIBHEADERS)
 	@mkdir -p include/xarlib && \
-	echo $(libXar_la_SOURCES) > /tmp/bar && \
+	echo $(libXar_a_SOURCES) > /tmp/bar && \
 	j=xarlib/$(filter %/$(notdir $@), $(XARLIBHEADERS) ) && \
 	echo "Building xarlib header $@ from $(TOPDIR)/$$j" && \
 	perl -pe 's,^[ 	]*#include[ 	]+\",#include \"xarlib/,' <$(TOPDIR)/$$j >$@ 
@@ -183,15 +185,14 @@
 	ls -la $(TOPDIR)/$$j && \
 	#perl -pe 's,^[ 	]*#include[ 	]+\",#include \"xarlib/,' <$(TOPDIR)/$$j >$@ 
 
-# Only build the static library until we have an API/ABI nailed down
-libXar_la_LDFLAGS = -static
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = Xar.pc
 
+# Unser this as it upsets CXXLINK which causes linking to fail for no apparent reason
+AM_CXXFLAGS =
+
 bin_PROGRAMS = expandxar
 expandxar_SOURCES = ExpandXar/expandxar.cpp
-expandxar_LDADD = libXar.la $(WX_LIBS)
-#expandxar_LDFLAGS = -all-static
-expandxar_LDFLAGS = -static
-expandxar_CXXFLAGS = $(XARLIBFLAGS)
+expandxar_LDADD = libXar.a $(WX_LIBS)
+expandxar_CXXFLAGS = $(XARALXCXXFLAGS) $(XARLIBFLAGS)
Index: Trunk/XaraLX/configure.in
===================================================================
--- Trunk/XaraLX/configure.in	(revision 1626)
+++ Trunk/XaraLX/configure.in	(revision 1627)
@@ -122,10 +122,11 @@
 
 # Disable generation of shared libtool libraries - that's libXar. Note this has NOTHING to
 # do with static-exec (the executables)
-AC_DISABLE_SHARED
+#AC_DISABLE_SHARED
 # We don't need dlopen right now and it's not supported on Darwin
 # AC_LIBTOOL_DLOPEN
-AC_PROG_LIBTOOL
+#AC_PROG_LIBTOOL
+AC_PROG_RANLIB
 
 AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(void*)
@@ -194,6 +195,7 @@
 	WX_CPPFLAGS="`$WXCONFIG --static=$StaticEnable --debug=$DebugEnable --unicode=yes --cppflags`"
 	WX_CXXFLAGS="`$WXCONFIG --static=$StaticEnable --debug=$DebugEnable --unicode=yes --cxxflags | sed -e 's/-fno-exceptions//'`"
 	WX_LIBS="`$WXCONFIG --static=$StaticEnable --debug=$DebugEnable --unicode=yes --libs std`"
+	WX_LIBS2="`echo $WX_LIBS | sed -e 's/-pthread//g'`"
 
 	# See if we are running on GTK
 	WX_GTK="no"
@@ -376,6 +378,13 @@
 	AC_CONFIG_SUBDIRS([filters/SVGFilter])
 fi
 
+# Do not pass CXXFLAGS, CFLAGS in. This sets up CXXLINK which breaks XARLIB compilation. Instead set
+XARALXCXXFLAGS="$CXXFLAGS"
+XARALXCPPFLAGS="$CPPFLAGS"
+CXXFLAGS=""
+CPPFLAGS=""
+
+
 AM_CONDITIONAL(PRECOMPILE_ENABLE, [test "$PrecompileEnable" = "yes"])
 AM_CONDITIONAL(STATIC_ENABLE, [test "$StaticEnable" = "yes"])
 AM_CONDITIONAL(DARWIN_LINK, [test "$DarwinLink" = "yes"])
@@ -384,8 +393,11 @@
 AM_CONDITIONAL(XARLIB_ENABLE, [test "$XarLibEnable" = "yes"])
 AM_CONDITIONAL(FILTERS_ENABLE, [test "$FiltersEnable" = "yes"])
 
+AC_SUBST(XARALXCXXFLAGS)
+AC_SUBST(XARALXCPPFLAGS)
 AC_SUBST(TOPDIR)
 AC_SUBST(WX_LIBS)
+AC_SUBST(WX_LIBS2)
 AC_SUBST(XRCINCLUDE)
 AC_SUBST(XARALANGUAGE)
 AC_SUBST(WXRC)
Index: Trunk/XaraLX/wxXtra/Makefile.am
===================================================================
--- Trunk/XaraLX/wxXtra/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/wxXtra/Makefile.am	(revision 1627)
@@ -14,7 +14,7 @@
 # make sure this does NOT have our include files in the path
 # Don't use GTK includes for now - you will need this with sub-2.6.3 but that's not supported
 # right now
-libwxXtra_a_CXXFLAGS = @GTK_CFLAGS@
+libwxXtra_a_CXXFLAGS = @GTK_CFLAGS@ $(XARALXCXXFLAGS)
 
 # Don't load the GTK libraries into wxXtra any more - you will need this with sub-2.6.3 but
 # that's not supported right now
Index: Trunk/XaraLX/wxOil/Makefile.am
===================================================================
--- Trunk/XaraLX/wxOil/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/wxOil/Makefile.am	(revision 1627)
@@ -12,6 +12,8 @@
 MOSTLYCLEANFILES = $(TOPDIR)/wxOil/resources.h resources.h xrc/dialogs.xrc xrc/strings.xrc xrc/strings.lst xrc/xaralx.po xrc/resources.xrs xrc/xrc.check
 noinst_LIBRARIES	= libwxOil.a
 
+libwxOil_a_CXXFLAGS = $(XARALXCXXFLAGS) $(XARAFLAGS)
+
 # the application source, library search path, and link libraries
 libwxOil_a_SOURCES = \
 	varstr.cpp \
Index: Trunk/XaraLX/PreComp/Makefile.am
===================================================================
--- Trunk/XaraLX/PreComp/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/PreComp/Makefile.am	(revision 1627)
@@ -2,7 +2,7 @@
 CLEANFILES		= camtypes.h.gch
 
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(XARAFLAGS)
+        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(XARALXCXXFLAGS) $(XARAFLAGS)
 
 include ./$(DEPDIR)/camtypes.h.Po
 
Index: Trunk/XaraLX/Makefile.am
===================================================================
--- Trunk/XaraLX/Makefile.am	(revision 1626)
+++ Trunk/XaraLX/Makefile.am	(revision 1627)
@@ -35,6 +35,10 @@
 MOSTLYCLEANFILES=wxOil/xrc/xrc.d wxOil/xrc/xrc.stamp Resources/*
 
 bin_PROGRAMS		= XaraLX
+
+XaraLX_CXXFLAGS = $(XARALXCXXFLAGS)
+XaraLX_CPPFLAGS = $(XARALXCPPFLAGS)
+
 if DARWIN_LINK
     XaraLX_SOURCES	= Kernel/*.o wxOil/*.o tools/*.o wxXtra/*.o
     XaraLX_LDSOURCE = $(XaraLX_SOURCES)
@@ -45,47 +49,6 @@
 XaraLX_LDFLAGS		= --debug -L$(srcdir)/$(CDRAW_LIB_DIR) $(WX_LIBS) $(LIBS) $(LIBXML2_LIBS) -lCDraw
 XaraLX_LD			?= $(CXX)
 
-if STATIC_ENABLE
-	XaraLX_LDFLAGS	= -pthread \
-		-L$(srcdir) -lCDraw \
-		/usr/local/lib/libwx_gtk2u_xrc-2.6.a \
-		/usr/local/lib/libwx_gtk2u_qa-2.6.a \
-		/usr/local/lib/libwx_gtk2u_html-2.6.a \
-		/usr/local/lib/libwx_gtk2u_adv-2.6.a \
-		/usr/local/lib/libwx_gtk2u_core-2.6.a \
-		/usr/local/lib/libwxregexu-2.6.a \
-		/usr/local/lib/libwx_baseu_xml-2.6.a \
-		/usr/local/lib/libwx_baseu_net-2.6.a \
-		/usr/local/lib/libwx_baseu-2.6.a \
-		/usr/X11R6/lib/libXrandr.a \
-		/usr/X11R6/lib/libXext.a \
-		/usr/X11R6/lib/libXinerama.a \
-		/usr/X11R6/lib/libXxf86vm.a \
-		-lgtk-x11-2.0 \
-		-lgdk-x11-2.0 \
-		-latk-1.0 \
-		-lgdk_pixbuf-2.0 \
-		-lpangoxft-1.0 \
-		-lpangox-1.0 \
-		-lpangoft2-1.0 \
-		-lfontconfig \
-		-lfreetype \
-		-lpango-1.0 \
-		-lgobject-2.0 \
-		-lgmodule-2.0 \
-		-lgthread-2.0 \
-		-lglib-2.0 \
-		/usr/lib/libpng.a \
-		/usr/lib/libjpeg.a \
-		/usr/lib/libtiff.a \
-		/usr/lib/libexpat.a \
-		/usr/lib/libz.a \
-		/usr/lib/libxml2.a \
-		/usr/lib/libm.a \
-		-ldl \
-		-static-libgcc
-endif
-
 XaraLX$(EXEEXT) : $(XaraLX_SOURCES)
 	$(XaraLX_LD) $(XaraLX_LDSOURCE) $(XaraLX_LDFLAGS) -o $@
 


Xara