Hello,

While hacking around in EFL it's taking much time to do a "make
install" after changes to see the result in my app. Because of this I
like the --uninstalled option from pkg-config. I noticed that EFL uses
its own little helper scripts to get includes and libs. I modified the
evas script for a --uninstalled option. This is only a raw sketch of my
idea, but it seems to work. But the best solution is, in my eyes, to
use pkg-config.

Here is what I've changed:

Index: configure.in
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/configure.in,v
retrieving revision 1.199
diff -u -u -r1.199 configure.in
--- configure.in        4 Dec 2006 20:34:29 -0000       1.199
+++ configure.in        21 Jan 2007 14:49:53 -0000
@@ -50,6 +50,14 @@
 fi
 AC_SUBST(PACKAGE_DATA_DIR)
 
+dnl Set PACKAGE SOURCE DIR in config.h.
+packagesrcdir=`cd $srcdir && pwd`
+
+dnl Subst PACKAGE_SOURCE_DIR
+PACKAGE_SOURCE_DIR="${packagesrcdir}"
+AC_SUBST(PACKAGE_SOURCE_DIR)
+AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}","")
+
 x_dir=""
 x_cflags=""
 x_libs=""

########### next file ########

Index: evas-config.in
===================================================================
RCS file: /var/cvs/e/e17/libs/evas/evas-config.in,v
retrieving revision 1.12
diff -u -u -r1.12 evas-config.in
--- evas-config.in      18 Nov 2006 02:54:34 -0000      1.12
+++ evas-config.in      21 Jan 2007 14:50:31 -0000
@@ -3,9 +3,11 @@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 exec_prefix_set=no
+uninstalled=no
+srcdir="@PACKAGE_SOURCE_DIR@/src"
 
 usage="\
-Usage: evas-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version]
[--libs] [--cflags]" +Usage: evas-config [--prefix[=DIR]]
[--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--uninstalled]" 
 if test $# -eq 0; then
       echo "${usage}" 1>&2
@@ -25,6 +27,9 @@
         exec_prefix=$optarg
       fi
       ;;
+    --uninstalled)
+      uninstalled=yes
+      ;;
     --prefix)
       echo $prefix
       ;;
@@ -39,14 +44,30 @@
       echo @VERSION@
       ;;
     --cflags)
-      if test @prefix@/include != /usr/include ; then
-        includes="[EMAIL PROTECTED]@/include"
+      if test $uninstalled = no; then
+        if test -e "$srcdir/lib/Evas.h"; then
+          includes="-I$srcdir/lib"
+        else
+          if test @prefix@/include != /usr/include ; then
+            includes="[EMAIL PROTECTED]@/include"
+          fi
+        fi
+      else
+        includes="-I$srcdir/lib"
       fi
       echo $includes
       ;;
     --libs)
-      [EMAIL PROTECTED]@
-      echo $libdirs -levas @pthread_libs@ @dlopen_libs@ @eet_libs@
@FREETYPE_LIBS@ @FONTCONFIG_LIBS@
+      if test $uninstalled = no; then
+        if test -e "$srcdir/lib/libevas.la"; then
+          libdirs="[EMAIL PROTECTED]@ $srcdir/lib/libevas.la"
+        else
+          libdirs="[EMAIL PROTECTED]@ -levas"
+        fi
+      else
+        libdirs="[EMAIL PROTECTED]@ $srcdir/lib/libevas.la"
+      fi
+      echo $libdirs @pthread_libs@ @dlopen_libs@ @eet_libs@
@FREETYPE_LIBS@ @FONTCONFIG_LIBS@ ;;
     *)
       echo "${usage}" 1>&2

Then you simply need to symlink evas-config to a $PATH and compiling
against evas works wihout make install.

What do you think? For sure all *-config scripts needs to be modified
to get it working.

And could someone explain why not use pkg-config. It's perfect for this
work.

regards
Andreas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to