Fresco/Prague/config Prague-build-config.in,1.3,1.4 Prague-config.in,1.4,1.5

Tobias Hunger <[email protected]> Sat, 06 Dec 2003 11:26:50 +0000
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Prague/config
In directory purcel:/tmp/cvs-serv308/Prague/config

Modified Files:
	Prague-build-config.in Prague-config.in 
Log Message:
Do not reorder elements in --cppfalgs and --libs but use the first occurence.
There should only be -I, -L, -l and -D flags there and those will work
if we only allow the first occurence. Closes bug283.


Index: Prague-build-config.in
===================================================================
RCS file: /cvs/fresco/Fresco/Prague/config/Prague-build-config.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Prague-build-config.in	12 Nov 2003 22:38:13 -0000	1.3
+++ Prague-build-config.in	6 Dec 2003 11:26:47 -0000	1.4
@@ -40,14 +40,18 @@
       ;;
     --cppflags)
       echo @CPPFLAGS@ -I@abs_top_builddir@/include -I@abs_top_srcdir@/include |\
-          sed -e "s/ /\n/g" | sort -u | xargs echo -n
+          sed -e 's/^ *-//; s/ \+-/\n/g' | awk 'a[$0]++==0 { print "-"$0; }' |\
+          xargs echo -n
+      echo
       ;;
     --cxxflags)
       echo @CXXFLAGS@
       ;;
     --libs)
       echo -L@abs_top_builddir@/lib -lPrague @LIBS@ |\
-          sed -e "s/ /\n/g" | sort -u | xargs echo -n
+          sed -e 's/^ *-//; s/ \+-/\n/g' | awk 'a[$0]++==0 { print "-"$0; }' |\
+          xargs echo -n
+      echo
       ;;
     *)
       echo "${usage}" 1>&2

Index: Prague-config.in
===================================================================
RCS file: /cvs/fresco/Fresco/Prague/config/Prague-config.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Prague-config.in	12 Nov 2003 22:38:13 -0000	1.4
+++ Prague-config.in	6 Dec 2003 11:26:47 -0000	1.5
@@ -40,14 +40,18 @@
       ;;
     --cppflags)
       echo @CPPFLAGS@ -I@includedir@ |\
-          sed -e "s/ /\n/g" | sort -u | xargs echo -n
+          sed -e 's/^ *-//; s/ \+-/\n/g' | awk 'a[$0]++==0 { print "-"$0; }' |\
+          xargs echo -n
+      echo
       ;;
     --cxxflags)
       echo @CXXFLAGS@
       ;;
     --libs)
       echo -L@libdir@ -lPrague @LIBS@  |\
-          sed -e "s/ /\n/g" | sort -u | xargs echo -n
+          sed -e 's/^ *-//; s/ \+-/\n/g' | awk 'a[$0]++==0 { print "-"$0; }' |\
+          xargs echo -n
+      echo
       ;;
     *)
       echo "${usage}" 1>&2