Bibletime – a bible study tool
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.in.in 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. AC_INIT(acinclude.m4) dnl a source file from your sub dir
  2. dnl This is so we can use kde-common
  3. AC_CONFIG_AUX_DIR(admin)
  4. dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
  5. unset CDPATH
  6. dnl Checking host/target/build systems, for make, install etc.
  7. AC_CANONICAL_SYSTEM
  8. dnl Perform program name transformation
  9. AC_ARG_PROGRAM
  10. dnl Automake doc recommends to do this only here. (Janos)
  11. AM_INIT_AUTOMAKE(bibletime, 1.6.6.0) dnl searches for some needed programs
  12. KDE_SET_PREFIX
  13. KDE_USE_TQT(3.0)
  14. dnl generate the config header
  15. AC_CONFIG_HEADER([config.h]) dnl at the distribution this done
  16. dnl Checks for programs.
  17. AC_CHECK_COMPILERS
  18. CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"
  19. AC_ENABLE_SHARED(no)
  20. AC_ENABLE_STATIC(yes)
  21. KDE_PROG_LIBTOOL
  22. AM_MAINTAINER_MODE
  23. dnl for NLS support. Call them in this order!
  24. dnl WITH_NLS is for the po files
  25. AM_KDE_WITH_NLS
  26. AC_PATH_KDE
  27. dnl in this space add everything you want to check for;
  28. dnl examples are specific headers, libraries, etc.
  29. dnl everything to compile and run a KDE program is already checked
  30. CPPFLAGS="$CPPFLAGS -DTQT_NO_ASCII_CAST -DTQT_NO_COMPAT -Wall -I\$(top_srcdir)/ -I\$(top_srcdir)/bibletime -I\$(top_builddir)/bibletime"
  31. AC_CHECK_STATIC_LINKING(ac_use_static)
  32. AC_CHECK_SWORD(1.5.9, [$ac_use_static])
  33. AC_CHECK_CLUCENE([$ac_use_static])
  34. AC_ARG_ENABLE(howto,
  35. AC_HELP_STRING([--enable-howto],
  36. [install Bible Study Howto (default=yes)]),
  37. ,
  38. enable_howto=yes
  39. )
  40. HOWTODIR=""
  41. if test "x$enable_howto" = xyes; then
  42. HOWTODIR="howto"
  43. fi
  44. AC_SUBST(HOWTODIR)
  45. dnl Check for the used distribution
  46. AC_CHECK_DISTRIBUTION
  47. dnl Check for sword FTBFS on some 64bit architectures
  48. AC_LANG_SAVE
  49. AC_LANG_CPLUSPLUS
  50. AC_MSG_CHECKING([if Sword needs __SANE_USERSPACE_TYPES__])
  51. AC_TRY_COMPILE([
  52. #include <signal.h>
  53. #include <$ac_cv_sword_incdir/sysdata.h>
  54. ],[],
  55. AC_MSG_RESULT(no),
  56. [AC_MSG_RESULT(yes)
  57. sword_needs_sane_userspace_types=yes])
  58. if test "x$sword_needs_sane_userspace_types" = xyes; then
  59. AC_MSG_CHECKING([if Sword builds with __SANE_USERSPACE_TYPES__])
  60. AC_TRY_COMPILE([
  61. #define __SANE_USERSPACE_TYPES__
  62. #include <signal.h>
  63. #include <$ac_cv_sword_incdir/sysdata.h>
  64. ],[],
  65. AC_MSG_RESULT(yes),
  66. [AC_MSG_RESULT(no)
  67. AC_MSG_ERROR(Sword causes FTBFS on this architecture!)])
  68. CXXFLAGS="$CXXFLAGS -D__SANE_USERSPACE_TYPES__"
  69. fi
  70. AC_LANG_RESTORE
  71. dnl Check bibletime API version
  72. AC_LANG_SAVE
  73. AC_LANG_CPLUSPLUS
  74. cxx_flags_safe="$CXXFLAGS"
  75. cflags_safe="$CFLAGS"
  76. CXXFLAGS="$CXXFLAGS -I$ac_cv_sword_incdir"
  77. CFLAGS="$CFLAGS -I$ac_cv_sword_incdir"
  78. AC_MSG_CHECKING([if Sword provides the old API])
  79. AC_TRY_COMPILE([#include <versekey.h>
  80. static sword::VerseKey staticKey;
  81. sword::sbook current_book;
  82. ],[current_book = staticKey.books[1][1];],
  83. AC_MSG_RESULT(yes),
  84. [AC_MSG_RESULT(no)
  85. AC_DEFINE(SWORD_MULTIVERSE,1,[no])])
  86. CXXFLAGS="$cxx_flags_safe"
  87. CFLAGS="$cflags_safe"
  88. AC_LANG_RESTORE
  89. dnl Check bibletime API version
  90. AC_LANG_SAVE
  91. AC_LANG_CPLUSPLUS
  92. cxx_flags_safe="$CXXFLAGS"
  93. cflags_safe="$CFLAGS"
  94. CXXFLAGS="$CXXFLAGS -I$ac_cv_sword_incdir"
  95. CFLAGS="$CFLAGS -I$ac_cv_sword_incdir"
  96. AC_MSG_CHECKING([if Sword provides API 1.7.x])
  97. AC_TRY_COMPILE([#include <versekey.h>
  98. static sword::VerseKey staticKey;
  99. sword::VerseKey keyBound;
  100. ],[keyBound = staticKey.getUpperBound();],
  101. [AC_MSG_RESULT(yes)
  102. AC_DEFINE(SWORD_API_1_7,1,[Defined if sword api is 1.7.x or newer])],
  103. AC_MSG_RESULT(no))
  104. CXXFLAGS="$cxx_flags_safe"
  105. CFLAGS="$cflags_safe"
  106. AC_LANG_RESTORE
  107. dnl add here all your Makefiles. They are created by configure
  108. AC_CONFIG_FILES([ README ])
  109. AC_CONFIG_FILES([ INSTALL ])
  110. AC_CONFIG_FILES([ bibletime.lsm ])
  111. AC_CONFIG_FILES([ bibletime.spec ])
  112. AC_CONFIG_FILES([ bibletime.desktop ])