Skip to content

Commit

Permalink
fix sqlite3
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanxw committed Feb 5, 2022
1 parent 4413b3a commit 142204d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: seqminer
Type: Package
Title: Efficiently Read Sequence Data (VCF Format, BCF Format, METAL
Format and BGEN Format) into R
Version: 8.3
Date: 2021-11-7
Version: 8.4
Date: 2022-02-5
Authors@R: c(person("Xiaowei", "Zhan", email = "zhanxw@gmail.com", role = c("aut", "cre")),
person("Dajiang", "Liu", email = "dajiang.liu@gmail.com", role = "aut"),
person("Attractive Chaos", email = "attractor@live.co.uk", role = "cph", comment = "We have used the following software and made minimal necessary changes: Tabix, Heng Li <lh3@live.co.uk> (MIT license). We removed standard IO related functions, e.g. printf, fprintf ; also changed its un-safe pointer arithmetics."),
Expand Down
42 changes: 23 additions & 19 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for seqminer 8.0.
# Generated by GNU Autoconf 2.69 for seqminer 8.3.
#
# Report bugs to <zhanxw@gmail.com>.
#
Expand Down Expand Up @@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='seqminer'
PACKAGE_TARNAME='seqminer'
PACKAGE_VERSION='8.0'
PACKAGE_STRING='seqminer 8.0'
PACKAGE_VERSION='8.3'
PACKAGE_STRING='seqminer 8.3'
PACKAGE_BUGREPORT='zhanxw@gmail.com'
PACKAGE_URL=''

Expand Down Expand Up @@ -1242,7 +1242,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures seqminer 8.0 to adapt to many kinds of systems.
\`configure' configures seqminer 8.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1304,7 +1304,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of seqminer 8.0:";;
short | recursive ) echo "Configuration of seqminer 8.3:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1384,7 +1384,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
seqminer configure 8.0
seqminer configure 8.3
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1686,7 +1686,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by seqminer $as_me 8.0, which was
It was created by seqminer $as_me 8.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2041,6 +2041,10 @@ if test -z "${R_HOME}"; then
echo "could not determine R_HOME"
exit 1
fi
CC=`"${R_HOME}/bin/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`


CC=`"${R_HOME}/bin/R" CMD config CC`
Expand Down Expand Up @@ -3092,13 +3096,13 @@ fi


LIB_SQLITE=""
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite" >&5
$as_echo_n "checking for sqlite3_open in -lsqlite... " >&6; }
if ${ac_cv_lib_sqlite_sqlite3_open+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_open in -lsqlite3" >&5
$as_echo_n "checking for sqlite3_open in -lsqlite3... " >&6; }
if ${ac_cv_lib_sqlite3_sqlite3_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsqlite $LIBS"
LIBS="-lsqlite3 $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand All @@ -3118,17 +3122,17 @@ return sqlite3_open ();
}
_ACEOF
if ac_fn_cxx_try_link "$LINENO"; then :
ac_cv_lib_sqlite_sqlite3_open=yes
ac_cv_lib_sqlite3_sqlite3_open=yes
else
ac_cv_lib_sqlite_sqlite3_open=no
ac_cv_lib_sqlite3_sqlite3_open=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite_sqlite3_open" >&5
$as_echo "$ac_cv_lib_sqlite_sqlite3_open" >&6; }
if test "x$ac_cv_lib_sqlite_sqlite3_open" = xyes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_open" >&5
$as_echo "$ac_cv_lib_sqlite3_sqlite3_open" >&6; }
if test "x$ac_cv_lib_sqlite3_sqlite3_open" = xyes; then :

for ac_header in sqlite3.h
do :
Expand All @@ -3142,7 +3146,7 @@ _ACEOF

$as_echo "#define HAVE_SQLITE 1" >>confdefs.h

LIB_SQLITE="-lsqlite"
LIB_SQLITE="-lsqlite3"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use system-wide sqlite library" >&5
$as_echo "$as_me: Will use system-wide sqlite library" >&6;}

Expand Down Expand Up @@ -3771,7 +3775,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by seqminer $as_me 8.0, which was
This file was extended by seqminer $as_me 8.3, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -3833,7 +3837,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
seqminer config.status 8.0
seqminer config.status 8.3
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if test -z "${R_HOME}"; then
echo "could not determine R_HOME"
exit 1
fi
CC=`"${R_HOME}/bin/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS`
LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`

dnl adopted from: https://github.com/cran/dfmta/blob/master/configure.ac
AC_DEFUN([AX_GET_R_CONF_VAR],[$1=`"${R_HOME}/bin/R" CMD config $1`])
Expand Down Expand Up @@ -58,7 +62,7 @@ AC_CHECK_LIB([sqlite3], [sqlite3_open], [
AC_CHECK_HEADERS([sqlite3.h], [
HAVE_SQLITE=1
AC_DEFINE([HAVE_SQLITE], [1], [Define to 1 if you have sqlite library])
LIB_SQLITE="-lsqlite"
LIB_SQLITE="-lsqlite3"
AC_MSG_NOTICE([Will use system-wide sqlite library])
])
], [AC_MSG_NOTICE([Will build sqlite library from the package])])
Expand Down
2 changes: 1 addition & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ endif

ifeq (@HAVE_SQLITE@,1)
SQLITE_OBJ=
PKG_LIBS+=-lsqlite
PKG_LIBS+=-lsqlite3
else
SQLITE_OBJ = sqlite/sqlite3.o
endif
Expand Down

0 comments on commit 142204d

Please sign in to comment.