Added ability to specify matdb location
* src/scdataviz.c:
Modified to use new MATDBFILE macro passed on command-line.
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
+AC_ARG_ENABLE([matdbfile],
+[ --enable-matdbfile=location Specify matdb location],
+[CFLAGS="$CFLAGS -DMATDBFILE=${enableval}"],
+[CFLAGS="$CFLAGS -DMATDBFILE=matdb.txt"])
+
AC_ARG_ENABLE([maemo],
[ --enable-maemo=device Enable maemo build],
[case "${enableval}" in
AC_ARG_ENABLE([maemo],
[ --enable-maemo=device Enable maemo build],
[case "${enableval}" in
along with this program. If not, see <http://www.gnu.org/licenses/>.
** Started on Thu Jul 17 11:03:27 2008 Johnny Q. Hacker
along with this program. If not, see <http://www.gnu.org/licenses/>.
** Started on Thu Jul 17 11:03:27 2008 Johnny Q. Hacker
-** Last update Thu Oct 15 21:51:34 2009 Johnny Q. Hacker
+** Last update Thu Oct 15 22:28:18 2009 Johnny Q. Hacker
g_hash_table_foreach(propmap->mdb->materials, &inner_link_materials, propmap);
}
g_hash_table_foreach(propmap->mdb->materials, &inner_link_materials, propmap);
}
+
+#define xstr(s) str(s)
+#define str(s) #s
+
+#ifndef MATDBFILE
+#define MATDBFILE matdb.txt
+#endif
+
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *graph;
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *graph;
- GString *file = g_string_new("matdb.txt");
+ GString *file = g_string_new(xstr(MATDBFILE));
int err=0;
struct matdb *mdb = read_matdb_dotcode(file, &err);
//fprintf(stderr, "read_matdb_dotcode(%s, %d)=%x", file->str, err,
int err=0;
struct matdb *mdb = read_matdb_dotcode(file, &err);
//fprintf(stderr, "read_matdb_dotcode(%s, %d)=%x", file->str, err,