[build] Improved runtime check of data files
commite7c007047afff352efcdd1f6e1455a0f83e0d193
authorNicola Fontana <ntd@entidi.it>
Sat, 22 May 2010 19:41:15 +0000 (22 21:41 +0200)
committerNicola Fontana <ntd@entidi.it>
Sat, 22 May 2010 19:41:15 +0000 (22 21:41 +0200)
tree0074d8583421ec8f2e7226d67e41cd87a95e5a02
parent87ebcf69e5e22288d9babb4edef6e3d52170f219
[build] Improved runtime check of data files

Instead of hardcode srcdir and builddir, check the file using the caller
path and hacking around it.

If argv[0] contains LT_OBJDIR (usually ".libs"), assume the program has
been run uninstalled and check for data in the parent directory of the
called binary. Otherwise, use PKGDATADIR, defined to $(pkgdatadir) with
the preprocessor flags.
demo/Makefile.am
demo/adg-demo.c
demo/cpml-demo.c
demo/demo.c
demo/demo.h