configure.ac 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. dnl -*- Autoconf -*-
  2. AC_INIT([Guile-SQLite3], [0.1.0],
  3. [guile-user@gnu.org], [guile-sqlite3],
  4. [https://notabug.org/civodul/guile-sqlite3])
  5. AC_CONFIG_MACRO_DIR([/usr/local/share/aclocal])
  6. AC_CONFIG_SRCDIR([sqlite3.scm.in])
  7. AC_CONFIG_AUX_DIR([build-aux])
  8. AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability])
  9. AM_SILENT_RULES([yes])
  10. dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
  11. dnl Make sure they are available.
  12. m4_pattern_forbid([PKG_CHECK_MODULES])
  13. m4_pattern_forbid([GUILE_PKG])
  14. GUILE_PKG([3.0 2.2 2.0])
  15. GUILE_PROGS
  16. PKG_CHECK_MODULES([SQLITE], [sqlite3])
  17. SQLITE_LIBDIR="`"$PKG_CONFIG" sqlite3 --variable libdir`"
  18. AC_SUBST([SQLITE_LIBDIR])
  19. AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable])
  20. GUILE_CHECK([retval],
  21. [(dynamic-func \"sqlite3_open_v2\"
  22. (dynamic-link \"$SQLITE_LIBDIR/libsqlite3\"))])
  23. if test "$retval" != 0; then
  24. AC_MSG_RESULT([no])
  25. AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3'])
  26. else
  27. AC_MSG_RESULT([yes])
  28. fi
  29. AC_CONFIG_FILES([Makefile sqlite3.scm])
  30. AC_CONFIG_FILES([env], [chmod +x env])
  31. AC_OUTPUT