1
0

configure.ac 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #-----------------------------------------------------------------------
  2. # Supports the following non-standard switches.
  3. #
  4. # --enable-threadsafe
  5. # --enable-readline
  6. # --enable-dynamic-extensions
  7. #
  8. AC_PREREQ(2.61)
  9. AC_INIT(sqlite, 3.7.5, http://www.sqlite.org)
  10. AC_CONFIG_SRCDIR([sqlite3.c])
  11. # Use automake.
  12. AM_INIT_AUTOMAKE([foreign])
  13. AC_SYS_LARGEFILE
  14. # Check for required programs.
  15. AC_PROG_CC
  16. AC_PROG_RANLIB
  17. AC_PROG_LIBTOOL
  18. AC_PROG_MKDIR_P
  19. # Check for library functions that SQLite can optionally use.
  20. AC_CHECK_FUNCS([fdatasync usleep fullfsync localtime_r gmtime_r])
  21. AC_FUNC_STRERROR_R
  22. AC_CONFIG_FILES([Makefile sqlite3.pc])
  23. AC_SUBST(BUILD_CFLAGS)
  24. #-----------------------------------------------------------------------
  25. # --enable-readline
  26. #
  27. AC_ARG_ENABLE(readline, [AS_HELP_STRING(
  28. [--enable-readline],
  29. [use readline in shell tool (yes, no) [default=yes]])],
  30. [], [enable_readline=yes])
  31. if test x"$enable_readline" != xno ; then
  32. sLIBS=$LIBS
  33. LIBS=""
  34. AC_SEARCH_LIBS(tgetent, curses ncurses ncursesw, [], [])
  35. AC_SEARCH_LIBS(readline, readline, [], [enable_readline=no])
  36. AC_CHECK_FUNCS(readline, [], [])
  37. READLINE_LIBS=$LIBS
  38. LIBS=$sLIBS
  39. fi
  40. AC_SUBST(READLINE_LIBS)
  41. #-----------------------------------------------------------------------
  42. #-----------------------------------------------------------------------
  43. # --enable-threadsafe
  44. #
  45. AC_ARG_ENABLE(threadsafe, [AS_HELP_STRING(
  46. [--enable-threadsafe], [build a thread-safe library [default=yes]])],
  47. [], [enable_threadsafe=yes])
  48. THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0
  49. if test x"$enable_threadsafe" != "xno"; then
  50. THREADSAFE_FLAGS="-D_REENTRANT=1 -DSQLITE_THREADSAFE=1"
  51. AC_SEARCH_LIBS(pthread_create, pthread)
  52. fi
  53. AC_SUBST(THREADSAFE_FLAGS)
  54. #-----------------------------------------------------------------------
  55. #-----------------------------------------------------------------------
  56. # --enable-dynamic-extensions
  57. #
  58. AC_ARG_ENABLE(dynamic-extensions, [AS_HELP_STRING(
  59. [--enable-dynamic-extensions], [support loadable extensions [default=yes]])],
  60. [], [enable_dynamic_extensions=yes])
  61. if test x"$enable_dynamic_extensions" != "xno"; then
  62. AC_SEARCH_LIBS(dlopen, dl)
  63. else
  64. DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
  65. fi
  66. AC_MSG_CHECKING([for whether to support dynamic extensions])
  67. AC_MSG_RESULT($enable_dynamic_extensions)
  68. AC_SUBST(DYNAMIC_EXTENSION_FLAGS)
  69. #-----------------------------------------------------------------------
  70. AC_CHECK_FUNCS(posix_fallocate)
  71. #-----------------------------------------------------------------------
  72. # UPDATE: Maybe it's better if users just set CFLAGS before invoking
  73. # configure. This option doesn't really add much...
  74. #
  75. # --enable-tempstore
  76. #
  77. # AC_ARG_ENABLE(tempstore, [AS_HELP_STRING(
  78. # [--enable-tempstore],
  79. # [in-memory temporary tables (never, no, yes, always) [default=no]])],
  80. # [], [enable_tempstore=no])
  81. # AC_MSG_CHECKING([for whether or not to store temp tables in-memory])
  82. # case "$enable_tempstore" in
  83. # never ) TEMP_STORE=0 ;;
  84. # no ) TEMP_STORE=1 ;;
  85. # always ) TEMP_STORE=3 ;;
  86. # yes ) TEMP_STORE=3 ;;
  87. # * )
  88. # TEMP_STORE=1
  89. # enable_tempstore=yes
  90. # ;;
  91. # esac
  92. # AC_MSG_RESULT($enable_tempstore)
  93. # AC_SUBST(TEMP_STORE)
  94. #-----------------------------------------------------------------------
  95. AC_OUTPUT