Changeset: 170d19a880d1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=170d19a880d1
Modified Files:
configure.ag
sql/backends/monet5/bamloader/bam_wrapper.c
sql/backends/monet5/bamloader/bam_wrapper.h
Branch: bamloader
Log Message:
Both Fedora and Ubuntu install samtools include files in /usr/include/samtools.
Fix configure and C sources to use <samtools/bam.h> etc.
Also let configure print about whether samtools was found in summary
at the end.
diffs (71 lines):
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2389,7 +2389,8 @@ AC_SUBST(MSEED_LIBS, $MSEED_LIBS)
AM_CONDITIONAL(HAVE_MSEED, test x"$have_mseed" != xno)
# samtools, only used by sql
-have_samtools="auto"
+org_have_samtools="auto"
+have_samtools=$org_have_samtools
AC_ARG_WITH(samtools,
AS_HELP_STRING([--with-samtools=DIR],
[samtools (providing bam library) are installed in DIR]),
@@ -2408,14 +2409,17 @@ if test "x$have_samtools" != xno; then
save_LDFLAGS="$LDFLAGS"
CPPFLAGS="$CPPFLAGS $SAMTOOLS_CFLAGS"
LDFLAGS="$LDFLAGS $SAMTOOLS_LIBS"
- AC_CHECK_HEADER(bam.h,
- AC_CHECK_HEADER(bgzf.h,
+ AC_CHECK_HEADER(samtools/bam.h,
+ AC_CHECK_HEADER(samtools/bgzf.h,
AC_CHECK_LIB(bam, bam_header_read,
AC_DEFINE(HAVE_SAMTOOLS, 1, [Define if you have
the samtools (providing the bam library)]),
- [ if test "x$have_samtoouls" != xauto; then
AC_MSG_ERROR([-lbam library not found]); fi; have_samtools=no ],
- [-lpthread -lz]),
- [ if test "x$have_samtools" != xauto; then
AC_MSG_ERROR([bgzf.h header not found]); fi; have_samtools=no ]),
- [ if test "x$have_samtools" != xauto; then AC_MSG_ERROR([bam.h
header not found]); fi; have_samtools=no ])
+ [ if test "x$have_samtools" != xauto; then
AC_MSG_ERROR([-lbam library not found]); fi
+ have_samtools=no; why_have_samtools="(bam
library not found)" ],
+ [-lm -lpthread -lz]),
+ [ if test "x$have_samtools" != xauto; then
AC_MSG_ERROR([samtools/bgzf.h header not found]); fi
+ have_samtools=no; why_have_samtools="(samtools/bgzf.h
header not found)" ]),
+ [ if test "x$have_samtools" != xauto; then
AC_MSG_ERROR([samtools/bam.h header not found]); fi
+ have_samtools=no; why_have_samtools="(samtools/bam.h header
not found)" ])
LDFLAGS="$save_LDFLAGS"
CPPFLAGS="$save_CPPFLAGS"
if test "x$have_samtools" = "xyes" -o "x$have_samtools" = "xauto"; then
@@ -3476,6 +3480,7 @@ for comp in \
'raptor ' \
'readline ' \
'rubygem ' \
+ 'samtools ' \
'setsockopt ' \
'sphinxclient ' \
'unixodbc ' \
diff --git a/sql/backends/monet5/bamloader/bam_wrapper.c
b/sql/backends/monet5/bamloader/bam_wrapper.c
--- a/sql/backends/monet5/bamloader/bam_wrapper.c
+++ b/sql/backends/monet5/bamloader/bam_wrapper.c
@@ -25,8 +25,8 @@
#include "mal_exception.h"
#include "stream.h"
-#include "bam.h"
-#include "kstring.h"
+#include <samtools/bam.h>
+#include <samtools/kstring.h>
#include "bam_globals.h"
#include "bam_wrapper.h"
diff --git a/sql/backends/monet5/bamloader/bam_wrapper.h
b/sql/backends/monet5/bamloader/bam_wrapper.h
--- a/sql/backends/monet5/bamloader/bam_wrapper.h
+++ b/sql/backends/monet5/bamloader/bam_wrapper.h
@@ -28,7 +28,7 @@
#include "gdk.h"
-#include "bam.h"
+#include <samtools/bam.h>
#define BW_FP_BUF_SIZE 128
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list