+++ /dev/null
-# DO NOT RUN ACLOCAL TO GENERATE THIS FILE!
-# Some of the macros have been changed from the stock versions.
-# Namely, CHECK_SSL.
-
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_lib_mysql.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_LIB_MYSQL([MINIMUM-VERSION])
-#
-# DESCRIPTION
-#
-# This macro provides tests of availability of MySQL client library of
-# particular version or newer.
-#
-# AX_LIB_MYSQL macro takes only one argument which is optional. If there
-# is no required version passed, then macro does not run version test.
-#
-# The --with-mysql option takes one of three possible values:
-#
-# no - do not check for MySQL client library
-#
-# yes - do check for MySQL library in standard locations (mysql_config
-# should be in the PATH)
-#
-# path - complete path to mysql_config utility, use this option if
-# mysql_config can't be found in the PATH
-#
-# This macro calls:
-#
-# AC_SUBST(MYSQL_CFLAGS)
-# AC_SUBST(MYSQL_LDFLAGS)
-# AC_SUBST(MYSQL_VERSION)
-#
-# And sets:
-#
-# HAVE_MYSQL
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AX_LIB_MYSQL],
-[
- AC_ARG_WITH([mysql],
- AC_HELP_STRING([--with-mysql=@<:@ARG@:>@],
- [use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config]
- ),
- [
- if test "$withval" = "no"; then
- want_mysql="no"
- elif test "$withval" = "yes"; then
- want_mysql="yes"
- else
- want_mysql="yes"
- MYSQL_CONFIG="$withval"
- fi
- ],
- [want_mysql="yes"]
- )
-
- MYSQL_CFLAGS=""
- MYSQL_LDFLAGS=""
- MYSQL_VERSION=""
-
- dnl
- dnl Check MySQL libraries (libpq)
- dnl
-
- if test "$want_mysql" = "yes"; then
-
- if test -z "$MYSQL_CONFIG" -o test; then
- AC_PATH_PROG([MYSQL_CONFIG], [mysql_config], [no])
- fi
-
- if test "$MYSQL_CONFIG" != "no"; then
- AC_MSG_CHECKING([for MySQL libraries])
-
- MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`"
- MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`"
-
- MYSQL_VERSION=`$MYSQL_CONFIG --version`
-
- AC_DEFINE([HAVE_MYSQL], [1],
- [Define to 1 if MySQL libraries are available])
-
- found_mysql="yes"
- AC_MSG_RESULT([yes])
- else
- found_mysql="no"
-dnl AC_MSG_RESULT([no])
- fi
- fi
-
- dnl
- dnl Check if required version of MySQL is available
- dnl
-
-
- mysql_version_req=ifelse([$1], [], [], [$1])
-
- if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then
-
- AC_MSG_CHECKING([if MySQL version is >= $mysql_version_req])
-
- dnl Decompose required version string of MySQL
- dnl and calculate its number representation
- mysql_version_req_major=`expr $mysql_version_req : '\([[0-9]]*\)'`
- mysql_version_req_minor=`expr $mysql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
- mysql_version_req_micro=`expr $mysql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- if test "x$mysql_version_req_micro" = "x"; then
- mysql_version_req_micro="0"
- fi
-
- mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \
- \+ $mysql_version_req_minor \* 1000 \
- \+ $mysql_version_req_micro`
-
- dnl Decompose version string of installed MySQL
- dnl and calculate its number representation
- mysql_version_major=`expr $MYSQL_VERSION : '\([[0-9]]*\)'`
- mysql_version_minor=`expr $MYSQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
- mysql_version_micro=`expr $MYSQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- if test "x$mysql_version_micro" = "x"; then
- mysql_version_micro="0"
- fi
-
- mysql_version_number=`expr $mysql_version_major \* 1000000 \
- \+ $mysql_version_minor \* 1000 \
- \+ $mysql_version_micro`
-
- mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number`
- if test "$mysql_version_check" = "1"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- fi
-
- AC_SUBST([MYSQL_VERSION])
- AC_SUBST([MYSQL_CFLAGS])
- AC_SUBST([MYSQL_LDFLAGS])
-])
-
-#
-# SYNOPSIS
-#
-# CHECK_SSL
-#
-# DESCRIPTION
-#
-# This macro will check various standard spots for OpenSSL including
-# a user-supplied directory. The user uses '--with-ssl' or
-# '--with-ssl=/path/to/ssl' as arguments to configure.
-#
-# If OpenSSL is found the include directory gets added to CFLAGS and
-# CXXFLAGS as well as '-DHAVE_SSL', '-lssl' & '-lcrypto' get added to
-# LIBS, and the libraries location gets added to LDFLAGS. Finally
-# 'HAVE_SSL' gets set to 'yes' for use in your Makefile.in I use it
-# like so (valid for gmake):
-#
-# HAVE_SSL = @HAVE_SSL@
-# ifeq ($(HAVE_SSL),yes)
-# SRCS+= @srcdir@/my_file_that_needs_ssl.c
-# endif
-#
-# For bsd 'bmake' use:
-#
-# .if ${HAVE_SSL} == "yes"
-# SRCS+= @srcdir@/my_file_that_needs_ssl.c
-# .endif
-#
-# LAST MODIFICATION
-#
-# 2003-01-28
-#
-# COPYLEFT
-#
-# Copyright (c) 2003 Mark Ethan Trostler <trostler@juniper.net>
-#
-# Copying and distribution of this file, with or without
-# modification, are permitted in any medium without royalty provided
-# the copyright notice and this notice are preserved.
-
-AC_DEFUN(CHECK_SSL,
-[AC_ARG_WITH(ssl,
-
-[
-AC_HELP_STRING([--with-ssl=@<:@DIR@:>@], [look for OpenSSL in DIR (Use when it's not found with the default search path)])
-],
-
-[ AS_IF([test "x$with_ssl" != xno],
- [ AC_MSG_CHECKING([for OpenSSL])
- for dir in $with_ssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
- ssldir="$dir"
- if test -f "$dir/include/openssl/ssl.h"; then
- found_ssl="yes";
- CFLAGS="$CFLAGS -I$ssldir/include/";
- break;
- fi
- if test -f "$dir/include/ssl.h"; then
- found_ssl="yes";
- CFLAGS="$CFLAGS -I$ssldir/include/";
- break;
- fi
- done
- if test x_$found_ssl != x_yes; then
- AC_MSG_RESULT(no)
- else
- AC_MSG_RESULT(yes)
- LIBS="$LIBS -lssl -lcrypto";
- LDFLAGS="$LDFLAGS -L$ssldir/lib";
- HAVE_SSL="yes";
- AC_SUBST(HAVE_SSL)
- fi
- ],
- AC_MSG_NOTICE([ssl support disabled])
-)],
-[
- AC_MSG_CHECKING([for OpenSSL])
- for dir in /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
- ssldir="$dir"
- if test -f "$dir/include/openssl/ssl.h"; then
- found_ssl="yes";
- CFLAGS="$CFLAGS -I$ssldir/include/";
- break;
- fi
- if test -f "$dir/include/ssl.h"; then
- found_ssl="yes";
- CFLAGS="$CFLAGS -I$ssldir/include/";
- break;
- fi
- done
- if test x_$found_ssl != x_yes; then
- AC_MSG_RESULT(no)
- else
- AC_MSG_RESULT(yes)
- LIBS="$LIBS -lssl -lcrypto";
- LDFLAGS="$LDFLAGS -L$ssldir/lib";
- HAVE_SSL="yes";
- AC_SUBST(HAVE_SSL)
- fi
-])
-])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/type_socklen_t.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# TYPE_SOCKLEN_T
-#
-# DESCRIPTION
-#
-# Check whether sys/socket.h defines type socklen_t. Please note that some
-# systems require sys/types.h to be included before sys/socket.h can be
-# compiled.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Lars Brinkhoff <lars@nocrew.org>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([TYPE_SOCKLEN_T],
-[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
-[
- AC_TRY_COMPILE(
- [#include <sys/types.h>
- #include <sys/socket.h>],
- [socklen_t len = 42; return 0;],
- ac_cv_type_socklen_t=yes,
- ac_cv_type_socklen_t=no)
-])
- if test $ac_cv_type_socklen_t != yes; then
- AC_DEFINE(socklen_t, int, [Substitute for socklen_t])
- fi
-])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/lib_socket_nsl.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# LIB_SOCKET_NSL
-#
-# DESCRIPTION
-#
-# This macro figures out what libraries are required on this platform to
-# link sockets programs.
-#
-# The common cases are not to need any extra libraries, or to need
-# -lsocket and -lnsl. We need to avoid linking with libnsl unless we need
-# it, though, since on some OSes where it isn't necessary it will totally
-# break networking. Unisys also includes gethostbyname() in libsocket but
-# needs libnsl for socket().
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Russ Allbery <rra@stanford.edu>
-# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz>
-# Copyright (c) 2008 Warren Young <warren@etr-usa.com>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([LIB_SOCKET_NSL],
-[
- AC_SEARCH_LIBS([gethostbyname], [nsl])
- AC_SEARCH_LIBS([socket], [socket], [], [
- AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket -lnsl $LIBS"],
- [], [-lnsl])])
-])
-
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ac_func_snprintf.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AC_FUNC_SNPRINTF
-#
-# DESCRIPTION
-#
-# Checks for a fully C99 compliant snprintf, in particular checks whether
-# it does bounds checking and returns the correct string length; does the
-# same check for vsnprintf. If no working snprintf or vsnprintf is found,
-# request a replacement and warn the user about it. Note: the mentioned
-# replacement is freely available and may be used in any project
-# regardless of it's license.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 RĂ¼diger Kuhlmann <info@ruediger-kuhlmann.de>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AC_FUNC_SNPRINTF],
-[AC_CHECK_FUNCS(snprintf vsnprintf)
-AC_MSG_CHECKING(for working snprintf)
-AC_CACHE_VAL(ac_cv_have_working_snprintf,
-[AC_TRY_RUN(
-[#include <stdio.h>
-
-int main(void)
-{
- char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
- char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
- int i;
- i = snprintf (bufs, 2, "%s", "111");
- if (strcmp (bufs, "1")) exit (1);
- if (i != 3) exit (1);
- i = snprintf (bufd, 2, "%d", 111);
- if (strcmp (bufd, "1")) exit (1);
- if (i != 3) exit (1);
- exit(0);
-}], ac_cv_have_working_snprintf=yes, ac_cv_have_working_snprintf=no, ac_cv_have_working_snprintf=cross)])
-AC_MSG_RESULT([$ac_cv_have_working_snprintf])
-AC_MSG_CHECKING(for working vsnprintf)
-AC_CACHE_VAL(ac_cv_have_working_vsnprintf,
-[AC_TRY_RUN(
-[#include <stdio.h>
-#include <stdarg.h>
-
-int my_vsnprintf (char *buf, const char *tmpl, ...)
-{
- int i;
- va_list args;
- va_start (args, tmpl);
- i = vsnprintf (buf, 2, tmpl, args);
- va_end (args);
- return i;
-}
-
-int main(void)
-{
- char bufs[5] = { 'x', 'x', 'x', '\0', '\0' };
- char bufd[5] = { 'x', 'x', 'x', '\0', '\0' };
- int i;
- i = my_vsnprintf (bufs, "%s", "111");
- if (strcmp (bufs, "1")) exit (1);
- if (i != 3) exit (1);
- i = my_vsnprintf (bufd, "%d", 111);
- if (strcmp (bufd, "1")) exit (1);
- if (i != 3) exit (1);
- exit(0);
-}], ac_cv_have_working_vsnprintf=yes, ac_cv_have_working_vsnprintf=no, ac_cv_have_working_vsnprintf=cross)])
-AC_MSG_RESULT([$ac_cv_have_working_vsnprintf])
-if test x$ac_cv_have_working_snprintf$ac_cv_have_working_vsnprintf != "xyesyes"; then
- AC_LIBOBJ(snprintf)
- AC_MSG_WARN([Replacing missing/broken (v)snprintf() with version from http://www.ijs.si/software/snprintf/.])
- AC_DEFINE(PREFER_PORTABLE_SNPRINTF, 1, "enable replacement (v)snprintf if system (v)snprintf is broken")
-fi])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_lib_postgresql.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_LIB_POSTGRESQL([MINIMUM-VERSION])
-#
-# DESCRIPTION
-#
-# This macro provides tests of availability of PostgreSQL 'libpq' library
-# of particular version or newer.
-#
-# AX_LIB_POSTGRESQL macro takes only one argument which is optional. If
-# there is no required version passed, then macro does not run version
-# test.
-#
-# The --with-postgresql option takes one of three possible values:
-#
-# no - do not check for PostgreSQL client library
-#
-# yes - do check for PostgreSQL library in standard locations (pg_config
-# should be in the PATH)
-#
-# path - complete path to pg_config utility, use this option if pg_config
-# can't be found in the PATH
-#
-# This macro calls:
-#
-# AC_SUBST(POSTGRESQL_CFLAGS)
-# AC_SUBST(POSTGRESQL_LDFLAGS)
-# AC_SUBST(POSTGRESQL_VERSION)
-#
-# And sets:
-#
-# HAVE_POSTGRESQL
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AX_LIB_POSTGRESQL],
-[
- AC_ARG_WITH([postgresql],
- AC_HELP_STRING([--with-postgresql=@<:@ARG@:>@],
- [use PostgreSQL library @<:@default=yes@:>@, optionally specify path to pg_config]
- ),
- [
- if test "$withval" = "no"; then
- want_postgresql="no"
- elif test "$withval" = "yes"; then
- want_postgresql="yes"
- else
- want_postgresql="yes"
- PG_CONFIG="$withval"
- fi
- ],
- [want_postgresql="yes"]
- )
-
- POSTGRESQL_CFLAGS=""
- POSTGRESQL_LDFLAGS=""
- POSTGRESQL_VERSION=""
-
- dnl
- dnl Check PostgreSQL libraries (libpq)
- dnl
-
- if test "$want_postgresql" = "yes"; then
-
- if test -z "$PG_CONFIG" -o test; then
- AC_PATH_PROG([PG_CONFIG], [pg_config], [])
- fi
-
- if test ! -x "$PG_CONFIG"; then
- PG_CONFIG="no"
- found_postgresql="no"
- fi
-
- if test "$PG_CONFIG" != "no"; then
- AC_MSG_CHECKING([for PostgreSQL libraries])
-
- POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`"
- POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq"
-
- POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'`
-
- AC_DEFINE([HAVE_POSTGRESQL], [1],
- [Define to 1 if PostgreSQL libraries are available])
-
- found_postgresql="yes"
- AC_MSG_RESULT([yes])
- else
- found_postgresql="no"
-dnl AC_MSG_RESULT([no])
- fi
- fi
-
- dnl
- dnl Check if required version of PostgreSQL is available
- dnl
-
-
- postgresql_version_req=ifelse([$1], [], [], [$1])
-
- if test "$found_postgresql" = "yes" -a -n "$postgresql_version_req"; then
-
- AC_MSG_CHECKING([if PostgreSQL version is >= $postgresql_version_req])
-
- dnl Decompose required version string of PostgreSQL
- dnl and calculate its number representation
- postgresql_version_req_major=`expr $postgresql_version_req : '\([[0-9]]*\)'`
- postgresql_version_req_minor=`expr $postgresql_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
- postgresql_version_req_micro=`expr $postgresql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- if test "x$postgresql_version_req_micro" = "x"; then
- postgresql_version_req_micro="0"
- fi
-
- postgresql_version_req_number=`expr $postgresql_version_req_major \* 1000000 \
- \+ $postgresql_version_req_minor \* 1000 \
- \+ $postgresql_version_req_micro`
-
- dnl Decompose version string of installed PostgreSQL
- dnl and calculate its number representation
- postgresql_version_major=`expr $POSTGRESQL_VERSION : '\([[0-9]]*\)'`
- postgresql_version_minor=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'`
- postgresql_version_micro=`expr $POSTGRESQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- if test "x$postgresql_version_micro" = "x"; then
- postgresql_version_micro="0"
- fi
-
- postgresql_version_number=`expr $postgresql_version_major \* 1000000 \
- \+ $postgresql_version_minor \* 1000 \
- \+ $postgresql_version_micro`
-
- postgresql_version_check=`expr $postgresql_version_number \>\= $postgresql_version_req_number`
- if test "$postgresql_version_check" = "1"; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- fi
-
- AC_SUBST([POSTGRESQL_VERSION])
- AC_SUBST([POSTGRESQL_CFLAGS])
- AC_SUBST([POSTGRESQL_LDFLAGS])
-])
-
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_lib_sqlite3.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_LIB_SQLITE3([MINIMUM-VERSION])
-#
-# DESCRIPTION
-#
-# Test for the SQLite 3 library of a particular version (or newer)
-#
-# This macro takes only one optional argument, required version of SQLite
-# 3 library. If required version is not passed, 3.0.0 is used in the test
-# of existance of SQLite 3.
-#
-# If no intallation prefix to the installed SQLite library is given the
-# macro searches under /usr, /usr/local, and /opt.
-#
-# This macro calls:
-#
-# AC_SUBST(SQLITE3_CFLAGS)
-# AC_SUBST(SQLITE3_LDFLAGS)
-# AC_SUBST(SQLITE3_VERSION)
-#
-# And sets:
-#
-# HAVE_SQLITE3
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AX_LIB_SQLITE3],
-[
- AC_ARG_WITH([sqlite3],
- AC_HELP_STRING(
- [--with-sqlite3=@<:@ARG@:>@],
- [use SQLite 3 library @<:@default=yes@:>@, optionally specify the prefix for sqlite3 library]
- ),
- [
- if test "$withval" = "no"; then
- WANT_SQLITE3="no"
- elif test "$withval" = "yes"; then
- WANT_SQLITE3="yes"
- ac_sqlite3_path=""
- else
- WANT_SQLITE3="yes"
- ac_sqlite3_path="$withval"
- fi
- ],
- [WANT_SQLITE3="yes"]
- )
-
- SQLITE3_CFLAGS=""
- SQLITE3_LDFLAGS=""
- SQLITE3_VERSION=""
-
- if test "x$WANT_SQLITE3" = "xyes"; then
-
- ac_sqlite3_header="sqlite3.h"
-
- sqlite3_version_req=ifelse([$1], [], [3.0.0], [$1])
- sqlite3_version_req_shorten=`expr $sqlite3_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
- sqlite3_version_req_major=`expr $sqlite3_version_req : '\([[0-9]]*\)'`
- sqlite3_version_req_minor=`expr $sqlite3_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
- sqlite3_version_req_micro=`expr $sqlite3_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
- if test "x$sqlite3_version_req_micro" = "x" ; then
- sqlite3_version_req_micro="0"
- fi
-
- sqlite3_version_req_number=`expr $sqlite3_version_req_major \* 1000000 \
- \+ $sqlite3_version_req_minor \* 1000 \
- \+ $sqlite3_version_req_micro`
-
- AC_MSG_CHECKING([for SQLite3 library >= $sqlite3_version_req])
-
- if test "$ac_sqlite3_path" != ""; then
- ac_sqlite3_ldflags="-L$ac_sqlite3_path/lib"
- ac_sqlite3_cppflags="-I$ac_sqlite3_path/include"
- else
- for ac_sqlite3_path_tmp in /usr /usr/local /opt ; do
- if test -f "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header" \
- && test -r "$ac_sqlite3_path_tmp/include/$ac_sqlite3_header"; then
- ac_sqlite3_path=$ac_sqlite3_path_tmp
- ac_sqlite3_cppflags="-I$ac_sqlite3_path_tmp/include"
- ac_sqlite3_ldflags="-L$ac_sqlite3_path_tmp/lib"
- break;
- fi
- done
- fi
-
- ac_sqlite3_ldflags="$ac_sqlite3_ldflags -lsqlite3"
-
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $ac_sqlite3_cppflags"
-
- AC_COMPILE_IFELSE(
- [
- AC_LANG_PROGRAM([[@%:@include <sqlite3.h>]],
- [[
-#if (SQLITE_VERSION_NUMBER >= $sqlite3_version_req_number)
-/* Everything is okay */
-#else
-# error SQLite version is too old
-#endif
- ]]
- )
- ],
- [
- AC_MSG_RESULT([yes])
- success="yes"
- ],
- [
- AC_MSG_RESULT([not found])
- succees="no"
- ]
- )
-
- CPPFLAGS="$saved_CPPFLAGS"
-
- if test "$success" = "yes"; then
-
- found_sqlite=yes
- SQLITE3_CFLAGS="$ac_sqlite3_cppflags"
- SQLITE3_LDFLAGS="$ac_sqlite3_ldflags"
-
- ac_sqlite3_header_path="$ac_sqlite3_path/include/$ac_sqlite3_header"
-
- dnl Retrieve SQLite release version
- if test "x$ac_sqlite3_header_path" != "x"; then
- ac_sqlite3_version=`cat $ac_sqlite3_header_path \
- | grep '#define.*SQLITE_VERSION.*\"' | sed -e 's/.* "//' \
- | sed -e 's/"//'`
- if test $ac_sqlite3_version != ""; then
- SQLITE3_VERSION=$ac_sqlite3_version
- else
- AC_MSG_WARN([Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!])
- fi
- fi
-
- AC_SUBST(SQLITE3_CFLAGS)
- AC_SUBST(SQLITE3_LDFLAGS)
- AC_SUBST(SQLITE3_VERSION)
- AC_DEFINE([HAVE_SQLITE3], [], [Have the SQLITE3 library])
- fi
- fi
-])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_c___attribute__.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_C___ATTRIBUTE__
-#
-# DESCRIPTION
-#
-# Provides a test for the compiler support of __attribute__ extensions.
-# Defines HAVE___ATTRIBUTE__ if it is found.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Stepan Kasal <skasal@redhat.com>
-# Copyright (c) 2008 Christian Haggstrom
-# Copyright (c) 2008 Ryan McCabe <ryan@numb.org>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_C___ATTRIBUTE__], [
- AC_CACHE_CHECK([for __attribute__], [ax_cv___attribute__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdlib.h>
- static void foo(void) __attribute__ ((unused));
- static void
- foo(void) {
- exit(1);
- }
- ]], [])],
- [ax_cv___attribute__=yes],
- [ax_cv___attribute__=no]
- )
- ])
- if test "$ax_cv___attribute__" = "yes"; then
- AC_DEFINE([HAVE___ATTRIBUTE__], 1, [define if your compiler has __attribute__])
- fi
-])
-
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_gcc_malloc_call.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_GCC_MALLOC_CALL
-#
-# DESCRIPTION
-#
-# The macro will compile a test program to see whether the compiler does
-# understand the per-function postfix pragma.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_GCC_MALLOC_CALL],[dnl
-AC_CACHE_CHECK(
- [whether the compiler supports function __attribute__((__malloc__))],
- ax_cv_gcc_malloc_call,[
- AC_TRY_COMPILE([__attribute__((__malloc__))
- int f(int i) { return i; }],
- [],
- ax_cv_gcc_malloc_call=yes, ax_cv_gcc_malloc_call=no)])
- if test "$ax_cv_gcc_malloc_call" = yes; then
- AC_DEFINE([GCC_MALLOC_CALL],[__attribute__((__malloc__))],
- [most gcc compilers know a function __attribute__((__malloc__))])
- fi
-])
-
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_gcc_option.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_GCC_OPTION(OPTION,EXTRA-OPTIONS,TEST-PROGRAM,ACTION-IF-SUCCESSFUL,ACTION-IF-NOT-SUCCESFUL)
-#
-# DESCRIPTION
-#
-# AX_GCC_OPTION checks wheter gcc accepts the passed OPTION. If it accepts
-# the OPTION then ACTION-IF-SUCCESSFUL will be executed, otherwise
-# ACTION-IF-UNSUCCESSFUL.
-#
-# NOTE: This macro will be obsoleted by AX_C_CHECK_FLAG AX_CXX_CHECK_FLAG,
-# AX_CPP_CHECK_FLAG, AX_CXXCPP_CHECK_FLAG and AX_LD_CHECK_FLAG.
-#
-# A typical usage should be the following one:
-#
-# AX_GCC_OPTION([-fomit-frame-pointer],[],[],[
-# AC_MSG_NOTICE([The option is supported])],[
-# AC_MSG_NOTICE([No luck this time])
-# ])
-#
-# The macro doesn't discriminate between languages so, if you are testing
-# for an option that works for C++ but not for C you should use '-x c++'
-# as EXTRA-OPTIONS:
-#
-# AX_GCC_OPTION([-fno-rtti],[-x c++],[],[ ... ],[ ... ])
-#
-# OPTION is tested against the following code:
-#
-# int main()
-# {
-# return 0;
-# }
-#
-# The optional TEST-PROGRAM comes handy when the default main() is not
-# suited for the option being checked
-#
-# So, if you need to test for -fstrict-prototypes option you should
-# probably use the macro as follows:
-#
-# AX_GCC_OPTION([-fstrict-prototypes],[-x c++],[
-# int main(int argc, char ** argv)
-# {
-# (void) argc;
-# (void) argv;
-#
-# return 0;
-# }
-# ],[ ... ],[ ... ])
-#
-# Note that the macro compiles but doesn't link the test program so it is
-# not suited for checking options that are passed to the linker, like:
-#
-# -Wl,-L<a-library-path>
-#
-# In order to avoid such kind of problems you should think about usinguse
-# the AX_*_CHECK_FLAG family macros
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
-# Copyright (c) 2008 Bogdan Drozdowski <bogdandr@op.pl>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_GCC_OPTION], [
- AC_REQUIRE([AC_PROG_CC])
-
- AC_MSG_CHECKING([if gcc accepts $1 option])
-
- AS_IF([ test "x$GCC" = "xyes" ],[
- AS_IF([ test -z "$3" ],[
- ax_gcc_option_test="int main()
-{
- return 0;
-}"
- ],[
- ax_gcc_option_test="$3"
- ])
-
- # Dump the test program to file
- cat <<EOF > conftest.c
-$ax_gcc_option_test
-EOF
-
- # Dump back the file to the log, useful for debugging purposes
- AC_TRY_COMMAND(cat conftest.c 1>&AS_MESSAGE_LOG_FD)
-
- AS_IF([ AC_TRY_COMMAND($CC $2 $1 -c conftest.c 1>&AS_MESSAGE_LOG_FD) ],[
- AC_MSG_RESULT([yes])
- $4
- ],[
- AC_MSG_RESULT([no])
- $5
- ])
- ],[
- AC_MSG_RESULT([no gcc available])
- ])
-])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_with_perl.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_WITH_PERL([VALUE-IF-NOT-FOUND],[PATH])
-#
-# DESCRIPTION
-#
-# Locates an installed Perl binary, placing the result in the precious
-# variable $PERL. Accepts a present $PERL, then --with-perl, and failing
-# that searches for perl in the given path (which defaults to the system
-# path). If perl is found, $PERL is set to the full path of the binary; if
-# it is not found $PERL is set to VALUE-IF-NOT-FOUND if provided,
-# unchanged otherwise.
-#
-# A typical use could be the following one:
-#
-# AX_WITH_PERL
-#
-# LAST MODIFICATION
-#
-# 2008-05-05
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AX_WITH_PERL],[
- AX_WITH_PROG(PERL,perl,$1,$2)
-])
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_with_prog.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_WITH_PROG([VARIABLE],[program],[VALUE-IF-NOT-FOUND],[PATH])
-#
-# DESCRIPTION
-#
-# Locates an installed program binary, placing the result in the precious
-# variable VARIABLE. Accepts a present VARIABLE, then --with-program, and
-# failing that searches for program in the given path (which defaults to
-# the system path). If program is found, VARIABLE is set to the full path
-# of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND
-# if provided, unchanged otherwise.
-#
-# A typical example could be the following one:
-#
-# AX_WITH_PROG(PERL,perl)
-#
-# NOTE: This macro is based upon the original AX_WITH_PYTHON macro from
-# Dustin J. Mitchell <dustin@cs.uchicago.edu>.
-#
-# LAST MODIFICATION
-#
-# 2008-05-05
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
-# Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu>
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved.
-
-AC_DEFUN([AX_WITH_PROG],[
- AC_PREREQ([2.61])
-
- pushdef([VARIABLE],$1)
- pushdef([EXECUTABLE],$2)
- pushdef([VALUE_IF_NOT_FOUND],$3)
- pushdef([PATH_PROG],$4)
-
- AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable)
-
- AS_IF(test -z "$VARIABLE",[
- AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided)
- AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[[PATH]]]]],absolute path to EXECUTABLE executable), [
- AS_IF([test "$withval" != "yes"],[
- VARIABLE="$withval"
- AC_MSG_RESULT($VARIABLE)
- ],[
- VARIABLE=""
- AC_MSG_RESULT([no])
- ])
- ],[
- AC_MSG_RESULT([no])
- ])
-
- AS_IF(test -z "$VARIABLE",[
- AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
- ])
- ])
-
- popdef([PATH_PROG])
- popdef([VALUE_IF_NOT_FOUND])
- popdef([EXECUTABLE])
- popdef([VARIABLE])
-])
-
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_path_lib_pcre.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PATH_LIB_PCRE [(A/NA)]
-#
-# DESCRIPTION
-#
-# check for pcre lib and set PCRE_LIBS and PCRE_CFLAGS accordingly.
-#
-# also provide --with-pcre option that may point to the $prefix of the
-# pcre installation - the macro will check $pcre/include and $pcre/lib to
-# contain the necessary files.
-#
-# the usual two ACTION-IF-FOUND / ACTION-IF-NOT-FOUND are supported and
-# they can take advantage of the LIBS/CFLAGS additions.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_PATH_LIB_PCRE],[dnl
-AC_MSG_CHECKING([lib pcre])
-AC_ARG_WITH(pcre,
-AS_HELP_STRING([--with-pcre], [Use system pcre]),,
- with_pcre="yes")
-if test ".$with_pcre" = ".no" ; then
- AC_MSG_RESULT([disabled])
- m4_ifval($2,$2)
-else
- AC_MSG_RESULT([(testing)])
- AC_CHECK_LIB(pcre, pcre_study)
- if test "$ac_cv_lib_pcre_pcre_study" = "yes" ; then
- PCRE_LIBS="-lpcre"
- AC_MSG_CHECKING([lib pcre])
- AC_MSG_RESULT([$PCRE_LIBS])
- m4_ifval($1,$1)
- else
- OLDLDFLAGS="$LDFLAGS" ; LDFLAGS="$LDFLAGS -L$with_pcre/lib"
- OLDCPPFLAGS="$CPPFLAGS" ; CPPFLAGS="$CPPFLAGS -I$with_pcre/include"
- AC_CHECK_LIB(pcre, pcre_compile)
- CPPFLAGS="$OLDCPPFLAGS"
- LDFLAGS="$OLDLDFLAGS"
- if test "$ac_cv_lib_pcre_pcre_compile" = "yes" ; then
- AC_MSG_RESULT(.setting PCRE_LIBS -L$with_pcre/lib -lpcre)
- PCRE_LIBS="-L$with_pcre/lib -lpcre"
- test -d "$with_pcre/include" && PCRE_CFLAGS="-I$with_pcre/include"
- AC_MSG_CHECKING([lib pcre])
- AC_MSG_RESULT([$PCRE_LIBS])
- m4_ifval($1,$1)
- else
- AC_MSG_CHECKING([lib pcre])
- AC_MSG_RESULT([no, (WARNING)])
- m4_ifval($2,$2)
- fi
- fi
-fi
-AC_SUBST([PCRE_LIBS])
-AC_SUBST([PCRE_CFLAGS])
-])
-# ===========================================================================
-# http://autoconf-archive.cryp.to/ax_ld_check_flag.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_LD_CHECK_FLAG(FLAG-TO-CHECK,[PROLOGUE],[BODY],[ACTION-IF-SUCCESS],[ACTION-IF-FAILURE])
-#
-# DESCRIPTION
-#
-# This macro tests if the C++ compiler supports the flag FLAG-TO-CHECK. If
-# successfull execute ACTION-IF-SUCCESS otherwise ACTION-IF-FAILURE.
-# PROLOGUE and BODY are optional and should be used as in AC_LANG_PROGRAM
-# macro.
-#
-# Example:
-#
-# AX_LD_CHECK_FLAG([-Wl,-L/usr/lib],[],[],[
-# ...
-# ],[
-# ...
-# ])
-#
-# This code is inspired from KDE_CHECK_COMPILER_FLAG macro. Thanks to
-# Bogdan Drozdowski <bogdandr@op.pl> for testing and bug fixes.
-#
-# LAST MODIFICATION
-#
-# 2008-04-12
-#
-# COPYLEFT
-#
-# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-# Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# As a special exception, the respective Autoconf Macro's copyright owner
-# gives unlimited permission to copy, distribute and modify the configure
-# scripts that are the output of Autoconf when processing the Macro. You
-# need not follow the terms of the GNU General Public License when using
-# or distributing such scripts, even though portions of the text of the
-# Macro appear in them. The GNU General Public License (GPL) does govern
-# all other use of the material that constitutes the Autoconf Macro.
-#
-# This special exception to the GPL applies to versions of the Autoconf
-# Macro released by the Autoconf Macro Archive. When you make and
-# distribute a modified version of the Autoconf Macro, you may extend this
-# special exception to the GPL to apply to your modified version as well.
-
-AC_DEFUN([AX_LD_CHECK_FLAG],[
- AC_PREREQ([2.61])
- AC_REQUIRE([AC_PROG_CXX])
- AC_REQUIRE([AC_PROG_SED])
-
- flag=`echo "$1" | $SED 'y% .=/+-(){}<>:*,%_______________%'`
-
- AC_CACHE_CHECK([whether the linker accepts the $1 flag],
- [ax_cv_ld_check_flag_$flag],[
-
- #AC_LANG_PUSH([C])
-
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $1"
- AC_LINK_IFELSE([
- AC_LANG_PROGRAM([$2],[$3])
- ],[
- eval "ax_cv_ld_check_flag_$flag=yes"
- ],[
- eval "ax_cv_ld_check_flag_$flag=no"
- ])
-
- LDFLAGS="$save_LDFLAGS"
-
- #AC_LANG_POP
-
- ])
-
- AS_IF([eval "test \"`echo '$ax_cv_ld_check_flag_'$flag`\" = yes"],[
- :
- $4
- ],[
- :
- $5
- ])
-])