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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1647
Date       : Wed Aug  2 16:33:35 BST 2006

Changed paths:
   M /Trunk/XaraLX/configure.in
   M /Trunk/XaraLX/filters/SVGFilter/configure.in

Autoconf tweek to get function level linking working


Diff:
Index: Trunk/XaraLX/filters/SVGFilter/configure.in
===================================================================
--- Trunk/XaraLX/filters/SVGFilter/configure.in	(revision 1646)
+++ Trunk/XaraLX/filters/SVGFilter/configure.in	(revision 1647)
@@ -198,7 +198,37 @@
 LIBXML2_LIBS="`$XML2CONFIG --libs`"
 
 # -----------------------------------------------------------------------------
+# from Xara configure.in: setup static linking
 
+if test "$StaticEnable" = "yes"; then
+	#	if test PrecompileEnable == "yes"; then
+		CPPFLAGS+=" -ffunction-sections -fdata-sections"
+		CXXFLAGS+=" -ffunction-sections -fdata-sections"
+		WX_LIBS+=" --gc-sections"
+	fi
+	
+	Force as much as possible to be statically linked
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lXrandr/-Wl,-Bstatic -lXrandr -Wl,-Bdynamic/g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lXext/-Wl,-Bstatic -lXext -Wl,-Bdynamic/g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lXinerama/-Wl,-Bstatic -lXinerama -Wl,-Bdynamic/g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lXxf86vm/-Wl,-Bstatic -lXxf86vm -Wl,-Bdynamic/g'`"	
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lXrender/-Wl,-Bstatic -lXrender -Wl,-Bdynamic/g'`"	
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lexpat/-Wl,-Bstatic -lexpat -Wl,-Bdynamic/g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-ljpeg/-Wl,-Bstatic -ljpeg -Wl,-Bdynamic/g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lpng/-Wl,-Bstatic -lpng -Wl,-Bdynamic/g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-ltiff/-Wl,-Bstatic -ltiff -Wl,-Bdynamic/g'`"
+	# These are handled by explicitly linking xml2 (see below)
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lxml2//g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lz//g'`"
+	WX_LIBS="`echo $WX_LIBS | sed -e 's/-lm//g'`"
+	# libxml2 linking needs fix-up too
+	LIBXML2_LIBS="`echo $LIBXML2_LIBS | sed -e 's/-lxml2/-Wl,-Bstatic -lxml2 -Wl,-Bdynamic/g'`"
+	LIBXML2_LIBS="`echo $LIBXML2_LIBS | sed -e 's/-lz/-Wl,-Bstatic -lz -Wl,-Bdynamic/g'`"
+	LIBXML2_LIBS="`echo $LIBXML2_LIBS | sed -e 's/-lm/-Wl,-Bstatic -lm -Wl,-Bdynamic/g'`"
+fi
+
+# -----------------------------------------------------------------------------
+
 TOPDIR=$srcdir;
 if test `echo $srcdir | cut -c1` != "/"; then
 	TOPDIR="../$srcdir";
Index: Trunk/XaraLX/configure.in
===================================================================
--- Trunk/XaraLX/configure.in	(revision 1646)
+++ Trunk/XaraLX/configure.in	(revision 1647)
@@ -318,9 +318,9 @@
 	CPPFLAGS="$CPPFLAGS -static -static-libgcc"
 	CXXFLAGS="$CXXFLAGS -static -static-libgcc"
 	if test PrecompileEnable == "yes"; then
-		CPPFLAGS+="-ffunction-sections -fdata-sections"
-		CXXFLAGS+="-ffunction-sections -fdata-sections"
-		LDFLAGS="--gc-sections"
+		CPPFLAGS+=" -ffunction-sections -fdata-sections"
+		CXXFLAGS+=" -ffunction-sections -fdata-sections"
+		WX_LIBS+=" --gc-sections"
 	fi
 
 	# Force as much as possible to be statically linked


Xara