Commit 99255fc4 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter
Browse files

consider install prefix when searching for packages, patch by Mathias

2007-03-17  Jürg Billeter  <j@bitron.ch>

	* compiler/valacompiler.vala, compiler/Makefile.am, vapi/config.vala:
	  consider install prefix when searching for packages, patch by
	  Mathias Hasselmann
	* configure.ac: add AM_PROG_CC_C_O
	* autogen.sh, MAINTAINERS: added
	* Makefile.am: dist MAINTAINERS

svn path=/trunk/; revision=243
parent dc6d6847
2007-03-17 Jürg Billeter <j@bitron.ch>
* compiler/valacompiler.vala, compiler/Makefile.am, vapi/config.vala:
consider install prefix when searching for packages, patch by
Mathias Hasselmann
* configure.ac: add AM_PROG_CC_C_O
* autogen.sh, MAINTAINERS: added
* Makefile.am: dist MAINTAINERS
2007-03-17 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala, vala/valacodegnerator.vala,
......
Jürg Billeter <j@bitron.ch>
Raffaele Sandrini <rasa@gmx.ch>
......@@ -11,4 +11,7 @@ SUBDIRS = \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = vala-1.0.pc
EXTRA_DIST = vala-1.0.pc.in
EXTRA_DIST = \
MAINTAINERS \
vala-1.0.pc.in \
$(NULL)
#!/bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
$srcdir/configure "$@"
......@@ -21,7 +21,9 @@ valac.vala.stamp: $(filter %.vala,$(valac_SOURCES))
$(VALAC) --vapidir $(srcdir)/../vapi --vapidir ../ccode --pkg ccode --vapidir ../vala --pkg vala --pkg config $^
touch $@
valac_CPPFLAGS = -include config.h
valac_CPPFLAGS = \
-include config.h \
-DPACKAGE_DATADIR=\"$(pkgdatadir)\"
valac_LDADD = \
$(GLIB_LIBS) \
......
......@@ -59,8 +59,8 @@ class Vala.Compiler {
}
private ref string get_package_path (string! pkg) {
var basename = "%s.vala".printf (pkg);
string basename = "%s.vala".printf (pkg);
if (vapi_directories != null) {
foreach (string vapidir in vapi_directories) {
var filename = Path.build_filename (vapidir, basename);
......@@ -69,17 +69,22 @@ class Vala.Compiler {
}
}
}
var filename = Path.build_filename ("/usr/local/share/vala/vapi", basename);
string filename = Path.build_filename (Config.PACKAGE_DATADIR, "vapi", basename);
if (File.test (filename, FileTest.EXISTS)) {
return filename;
}
filename = Path.build_filename ("/usr/local/share/vala/vapi", basename);
if (File.test (filename, FileTest.EXISTS)) {
return filename;
}
filename = Path.build_filename ("/usr/share/vala/vapi", basename);
if (File.test (filename, FileTest.EXISTS)) {
return filename;
}
return null;
}
......
......@@ -5,6 +5,7 @@ AM_INIT_AUTOMAKE([dist-bzip2])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
......
......@@ -22,5 +22,6 @@
[CCode (cprefix = "", cheader_filename = "config.h")]
namespace Config {
public const string PACKAGE_VERSION;
public const string PACKAGE_VERSION;
public const string PACKAGE_DATADIR;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment