configure.ac 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_SRCDIR([sqlite3.scm.in])
  6. AC_CONFIG_AUX_DIR([build-aux])
  7. AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability])
  8. AM_SILENT_RULES([yes])
  9. dnl We require pkg.m4 (from pkg-config) and guile.m4 (from Guile.)
  10. dnl Make sure they are available.
  11. m4_pattern_forbid([PKG_CHECK_MODULES])
  12. m4_pattern_forbid([GUILE_PKG])
  13. GUILE_PKG([2.2 2.0])
  14. GUILE_PROGS
  15. PKG_CHECK_MODULES([SQLITE], [sqlite3])
  16. SQLITE_LIBDIR="`"$PKG_CONFIG" sqlite3 --variable libdir`"
  17. AC_SUBST([SQLITE_LIBDIR])
  18. AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable])
  19. GUILE_CHECK([retval],
  20. [(dynamic-func \"sqlite3_open_v2\"
  21. (dynamic-link \"$SQLITE_LIBDIR/libsqlite3\"))])
  22. if test "$retval" != 0; then
  23. AC_MSG_RESULT([no])
  24. AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3'])
  25. else
  26. AC_MSG_RESULT([yes])
  27. fi
  28. AC_CONFIG_FILES([Makefile sqlite3.scm])
  29. AC_CONFIG_FILES([env], [chmod +x env])
  30. AC_OUTPUT