From 93502ff44099a3372c30e135cc007f3b8becc4dd Mon Sep 17 00:00:00 2001
From: Dan Scott <dscott@laurentian.ca>
Date: Sun, 23 Oct 2011 16:58:53 -0700
Subject: [PATCH] Make idlval build, rather than be dead code

The tool "idlval" contained in Open-ILS/src/c-apps can be used to check
the correctness of fieldmapper definitions in files like
Open-ILS/examples/fm_IDL.xml - but currently does not have a build
target, nor does it compile cleanly due to the use of unspecified
OpenSRF header files. This commit adds a build target, fixes the compile
problems, and installs the tool in the bin directory.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
---
 Open-ILS/src/c-apps/Makefile.am | 7 ++++++-
 Open-ILS/src/c-apps/idlval.c    | 4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Open-ILS/src/c-apps/Makefile.am b/Open-ILS/src/c-apps/Makefile.am
index 813ea38968..003b5efc59 100644
--- a/Open-ILS/src/c-apps/Makefile.am
+++ b/Open-ILS/src/c-apps/Makefile.am
@@ -7,7 +7,7 @@
 AM_CFLAGS = $(DEF_CFLAGS) -DOSRF_LOG_PARAMS -I@top_srcdir@/include/
 AM_LDFLAGS = $(DEF_LDFLAGS) -L$(DBI_LIBS) -lopensrf
 
-bin_PROGRAMS = oils_dataloader dump_idl test_json_query test_qstore
+bin_PROGRAMS = oils_dataloader dump_idl idlval test_json_query test_qstore
 oils_dataloader_SOURCES = oils_dataloader.c
 oils_dataloader_LDFLAGS = $(AM_LDFLAGS) -loils_idl
 oils_dataloader_DEPENDENCIES = liboils_idl.la liboils_utils.la
@@ -16,6 +16,11 @@ dump_idl_SOURCES = dump_idl.c
 dump_idl_LDFLAGS = $(AM_LDFLAGS) -loils_idl
 dump_idl_DEPENDENCIES = liboils_idl.la liboils_utils.la
 
+idlval_SOURCES = idlval.c oils_sql.c
+idlval_CFLAGS = $(AM_CFLAGS)
+idlval_LDFLAGS = $(AM_LDFLAGS) -loils_idl -loils_utils
+idlval_DEPENDENCIES = liboils_idl.la liboils_utils.la
+
 test_json_query_SOURCES = test_json_query.c oils_sql.c
 test_json_query_CFLAGS = $(AM_CFLAGS)
 test_json_query_LDFLAGS = $(AM_LDFLAGS) -loils_idl -loils_utils
diff --git a/Open-ILS/src/c-apps/idlval.c b/Open-ILS/src/c-apps/idlval.c
index 38ce79ee17..eeceaa2434 100644
--- a/Open-ILS/src/c-apps/idlval.c
+++ b/Open-ILS/src/c-apps/idlval.c
@@ -29,8 +29,8 @@ GNU General Public License for more details.
 #include <libxml/debugXML.h>
 #include <libxml/xmlmemory.h>
 
-#include "utils.h"
-#include "osrf_hash.h"
+#include <opensrf/utils.h>
+#include <opensrf/osrf_hash.h>
 
 /* Represents the command line */
 struct Opts {
-- 
2.11.0