Alien-SVN
view release on metacpan or search on metacpan
src/subversion/build/ac-macros/sqlite.m4 view on Meta::CPAN
AC_EGREP_CPP(SQLITE_VERSION_OKAY,[
#include "$sqlite_amalg"
#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num
SQLITE_VERSION_OKAY
#endif],
[AC_MSG_RESULT([amalgamation found and is okay])
_SVN_SQLITE_DSO_LIBS
AC_DEFINE(SVN_SQLITE_INLINE, 1,
[Defined if svn should use the amalgamated version of sqlite])
SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`"
if test -n "$svn_sqlite_dso_ldflags"; then
SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread"
else
SVN_SQLITE_LIBS="-lpthread"
fi
svn_lib_sqlite="yes"],
[AC_MSG_RESULT([unsupported amalgamation SQLite version])])
fi
])
dnl SVN_SQLITE_VERNUM_PARSE(version_string, result_var)
dnl
dnl Parse a x.y[.z] version string version_string into a number result_var.
AC_DEFUN(SVN_SQLITE_VERNUM_PARSE,
[
version_string="$1"
major=`expr $version_string : '\([[0-9]]*\)'`
minor=`expr $version_string : '[[0-9]]*\.\([[0-9]]*\)'`
micro=`expr $version_string : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test -z "$micro"; then
micro=0
fi
$2=`expr $major \* 1000000 \
\+ $minor \* 1000 \
\+ $micro`
])
dnl SVN_SQLITE_MIN_VERNUM_PARSE()
dnl
dnl Parse a x.y.z version string SQLITE_MINIMUM_VER into a number
dnl sqlite_min_ver_num.
AC_DEFUN(SVN_SQLITE_MIN_VERNUM_PARSE,
[
SVN_SQLITE_VERNUM_PARSE([$SQLITE_MINIMUM_VER], [sqlite_min_ver_num])
])
dnl SVN_DOWNLOAD_SQLITE()
dnl no sqlite found, print out a message telling the user what to do
AC_DEFUN(SVN_DOWNLOAD_SQLITE,
[
echo ""
echo "An appropriate version of sqlite could not be found. We recommmend"
echo "${SQLITE_RECOMMENDED_VER}, but require at least ${SQLITE_MINIMUM_VER}."
echo "Please either install a newer sqlite on this system"
echo ""
echo "or"
echo ""
echo "get the sqlite ${SQLITE_RECOMMENDED_VER} amalgamation from:"
echo " ${SQLITE_URL}"
echo "unpack the archive using unzip and rename the resulting"
echo "directory to:"
echo "$abs_srcdir/sqlite-amalgamation"
if test x"$abs_srcdir" != x"$abs_builddir"; then
echo "or to:"
echo "$abs_builddir/sqlite-amalgamation"
fi
echo ""
AC_MSG_ERROR([Subversion requires SQLite])
])
dnl _SVN_SQLITE_DSO_LIBS() dnl Find additional libraries that the
dnl sqlite amalgamation code should link in order to load
dnl shared libraries. Copied from build/libtool.m4
AC_DEFUN(_SVN_SQLITE_DSO_LIBS,
[
case $host_os in
beos* | mingw* | pw32* | cegcc* | cygwin*)
svn_sqlite_dso_ldflags=
;;
darwin*)
# if libdl is installed we need to link against it
AC_CHECK_LIB([dl], [dlopen],
[lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl"],[
svn_sqlite_dso_ldflags=
])
;;
*)
AC_CHECK_FUNC([shl_load],
[svn_sqlite_dso_ldflags=],
[AC_CHECK_LIB([dld], [shl_load],
[svn_sqlite_dso_ldflags="-ldld"],
[AC_CHECK_FUNC([dlopen],
[svn_sqlite_dso_ldflags=],
[AC_CHECK_LIB([dl], [dlopen],
[svn_sqlite_dso_ldflags="-ldl"],
[AC_CHECK_LIB([svld], [dlopen],
[svn_sqlite_dso_ldflags="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
[svn_sqlite_dso_ldflags="-ldld"])
])
])
])
])
])
;;
esac
AC_MSG_CHECKING([additional libraries for sqlite])
if test -n "$svn_sqlite_dso_ldflags"; then
AC_MSG_RESULT(${svn_sqlite_dso_ldflags})
else
AC_MSG_RESULT(none)
fi
])
( run in 1.438 second using v1.01-cache-2.11-cpan-d7f47b0818f )