TDE web development programs
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.
 
 
 
 
 
 

285 lines
8.1 KiB

  1. #MIN_CONFIG(3.3)
  2. KDE_ENABLE_HIDDEN_VISIBILITY
  3. KDE_INIT_DOXYGEN([KDE Utils API Reference], [Version $VERSION])
  4. dnl If the quanta executable name and the data dirs are changed from the default "quanta",
  5. dnl the following changes are needed:
  6. dnl - change the quanta_datadir
  7. dnl - change the QUANTA_PACKAGE and QUANTA_VERSION in quanta/src/quanta.h
  8. dnl - change the KDE_ICON in quanta/data/icons/Makefile.am
  9. dnl - create a .desktop file and the corresponding icons
  10. dnl - make sure the .desktop file is installed in the quanta/src/Makefile.am
  11. dnl (kdelnk_DATA = quanta.desktop line)
  12. dnl - change the bin_PROGRAMS and the _SOURCES, _LDADD, _METASOURCES, _LDFLAGS
  13. dnl below it in the quanta/src/Makefile.am, so it reflects the new executable name
  14. AM_INIT_AUTOMAKE(@MODULENAME@, @VERSION@)
  15. KDE_ENABLE_HIDDEN_VISIBILITY
  16. quanta_datadir='${kde_datadir}/quanta'
  17. package="quanta"
  18. AC_SUBST(package)
  19. AC_SUBST(quanta_datadir)
  20. AM_CONDITIONAL(QUANTAUIRC_HOOK, test "x$package" != "xquanta")
  21. dnl These are common macros that you might or might not want to use
  22. dnl Checks for header files.
  23. AC_HEADER_DIRENT
  24. AC_HEADER_STDC
  25. AC_HEADER_TIME
  26. AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdlib.h paths.h sys/statvfs.h sys/statfs.h sys/vfs.h sys/mount.h sys/param.h stdarg.h)
  27. AC_CHECK_FUNCS(usleep)
  28. AC_CHECK_FUNCS(statvfs)
  29. AC_DEFINE_UNQUOTED(PREFIX,"$prefix",[Define the PREFIX to be used later])
  30. dnl
  31. dnl The following new parameters were added to offer
  32. dnl the ability to specify the location of the libxml
  33. dnl library during linking and compilation.
  34. dnl Mathieu Lacage 30/03/2000
  35. dnl
  36. KDE_PKG_CHECK_MODULES(LIBXML, libxml-2.0,
  37. have_libxml=yes, have_libxml=no)
  38. if test "x$have_libxml" != "xyes"; then
  39. LIBXML_PREFIX=""
  40. AC_ARG_WITH(libxml-prefix,
  41. [ --with-libxml-prefix=[PFX] Specify location of libxml],
  42. LIBXML_PREFIX="$withval"
  43. )
  44. if test "x${LIBXML_PREFIX}" != "x"
  45. then
  46. AC_MSG_RESULT(Using a libxml prefix of ${LIBXML_PREFIX})
  47. fi
  48. dnl Test for libxml2 version
  49. XML_CONFIG="xml2-config"
  50. AC_MSG_CHECKING(for libxml libraries >= "2.6.0")
  51. XML_WARNING=""
  52. if test "x$LIBXML_PREFIX" != "x"
  53. then
  54. if ${LIBXML_PREFIX}/bin/xml2-config --libs print > /dev/null 2>&1
  55. then
  56. XML_CONFIG=${LIBXML_PREFIX}/bin/xml2-config
  57. else
  58. XML_WARNING="1"
  59. XML_CONFIG=xml2-config
  60. fi
  61. fi
  62. AC_DEFUN([VERSION_TO_NUMBER],
  63. [`$1 | sed -e 's/libxml //' | $AWK 'BEGIN { FS = "."; } { printf "%d",
  64. ([$]1* 1000 + [$]2) * 1000 + [$]3;}'`])
  65. dnl
  66. dnl test version and init our variables
  67. dnl
  68. if test "x$XML_CONFIG" != "x"
  69. then
  70. vers=VERSION_TO_NUMBER($XML_CONFIG --version)
  71. if test "$vers" -lt VERSION_TO_NUMBER(echo "2.6.0")
  72. then
  73. CXXFLAGS="$CXXFLAGS -DLIBXML_2_5"
  74. AC_MSG_RESULT(not found - assuming 2.5.x)
  75. else
  76. AC_MSG_RESULT(found)
  77. fi
  78. LIBXML_LIBS="`$XML_CONFIG --libs`"
  79. LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
  80. LIBXML_PREFIX="$XML_CONFIG --prefix"
  81. else
  82. AC_MSG_ERROR(Could not find libxml2 anywhere, check ftp://xmlsoft.org/.)
  83. fi
  84. if test "x${XML_WARNING}" != "x"
  85. then
  86. AC_MSG_RESULT(
  87. !!Warning!! using xml2-config in default path
  88. )
  89. fi
  90. fi
  91. AC_SUBST(LIBXML_LIBS)
  92. AC_SUBST(LIBXML_CFLAGS)
  93. KDE_PKG_CHECK_MODULES(LIBXSLT, libexslt,
  94. have_libexslt=yes, have_libexslt=no)
  95. if test "x$have_libexslt" != "xyes"; then
  96. LIBXSLT_PREFIX=""
  97. AC_ARG_WITH(libxslt-prefix,
  98. [ --with-libxslt-prefix=[PFX] Specify location of libxslt],
  99. LIBXSLT_PREFIX="$withval"
  100. )
  101. if test "x${LIBXSLT_PREFIX}" != "x"
  102. then
  103. AC_MSG_RESULT(Using a libxslt prefix of ${LIBXSLT_PREFIX})
  104. fi
  105. dnl
  106. dnl find libxslt
  107. dnl
  108. XSLT_CONFIG="xslt-config"
  109. XSLT_WARNING=""
  110. AC_SUBST(LIBXSLT_REQUIRED_VERSION)
  111. AC_MSG_CHECKING(for libxslt libraries >= $LIBXSLT_REQUIRED_VERSION)
  112. if test "x$LIBXSLT_PREFIX" != "x"
  113. then
  114. if ${LIBXSLT_PREFIX}/bin/xslt-config --libs print > /dev/null 2>&1
  115. then
  116. XSLT_CONFIG=${LIBXSLT_PREFIX}/bin/xslt-config
  117. else
  118. XSLT_WARNING="1"
  119. XSLT_CONFIG=xslt-config
  120. fi
  121. fi
  122. AC_DEFUN([VERSION_TO_NUMBER],
  123. [`$1 | sed -e 's/libxslt //' | $AWK 'BEGIN { FS = "."; } { printf "%d",
  124. ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
  125. dnl
  126. dnl test version and init our variables
  127. dnl
  128. if test "x$XSLT_CONFIG" != "x"
  129. then
  130. vers=VERSION_TO_NUMBER($XSLT_CONFIG --version)
  131. if test "$vers" -ge VERSION_TO_NUMBER(echo $LIBXSLT_REQUIRED_VERSION)
  132. then
  133. LIBXSLT_LIBS="-lexslt `$XSLT_CONFIG --libs`"
  134. LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
  135. AC_MSG_RESULT(found)
  136. if test "x$LIBXSLT_PREFIX" != "x"
  137. then
  138. AC_MSG_RESULT(
  139. Don't forget to make sure that ${LIBXSLT_PREFIX}/lib has been added
  140. to your LD_LIBRARY_PATH environment variable)
  141. else
  142. LIBXSLT_PREFIX="$XSLT_CONFIG --prefix"
  143. fi
  144. else
  145. AC_MSG_ERROR(You need at least libxslt $LIBXSLT_REQUIRED_VERSION for this
  146. version of xsldbg)
  147. fi
  148. else
  149. AC_MSG_ERROR(Could not find libxslt anywhere, check
  150. ftp://xmlsoft.org/XSLT/.)
  151. fi
  152. if test "x${XSLT_WARNING}" != "x"
  153. then
  154. AC_MSG_RESULT(
  155. !!Warning!! using xslt-config in default path
  156. )
  157. fi
  158. fi
  159. AC_SUBST(LIBXSLT_LIBS)
  160. AC_SUBST(LIBXSLT_CFLAGS)
  161. dnl **********
  162. dnl check whether we need the qextmdi lib
  163. dnl (Shamlesly stolen from gideon souorces and
  164. dnl modified for quanta by fredi)
  165. dnl **********
  166. AC_DEFUN([QUANTA_CHECK_MDI],
  167. [
  168. AC_MSG_CHECKING(whether to use tdemdi lib from tdelibs)
  169. AC_CACHE_VAL(ac_cv_mdi_setup,
  170. [
  171. AC_LANG_SAVE
  172. AC_LANG_CPLUSPLUS
  173. save_CXXFLAGS="$CXXFLAGS"
  174. CXXFLAGS="$KDE_INCLUDES $TQT_INCLUDES"
  175. AC_TRY_LINK([
  176. #include <tdeversion.h>
  177. ],
  178. [
  179. #if TDE_VERSION < ((3<<16) | (3<<8) | (92))
  180. KDE_choke me
  181. #endif
  182. ],
  183. ac_cv_mdi_setup=yes,
  184. ac_cv_mdi_setup=no
  185. )
  186. CXXFLAGS="$save_CXXFLAGS"
  187. AC_LANG_RESTORE
  188. ])
  189. if test "$ac_cv_mdi_setup" = "yes"; then
  190. LIB_KMDI="-ltdemdi"
  191. QEXTMDI_SUBDIR=""
  192. KMDI_INCLUDES=""
  193. AC_MSG_RESULT(yes)
  194. else
  195. LIB_KMDI='$(top_builddir)/lib/compatibility/tdemdi/libquantatdemdi.la'
  196. QEXTMDI_SUBDIR="tdemdi"
  197. KMDI_INCLUDES='-I$(top_srcdir)/lib/compatibility/tdemdi/qextmdi'
  198. CXXFLAGS="$CXXFLAGS -DCOMPAT_KMDI"
  199. AC_MSG_RESULT(no)
  200. fi
  201. AC_SUBST(LIB_KMDI)
  202. AC_SUBST(KMDI_INCLUDES)
  203. AC_SUBST(QEXTMDI_SUBDIR)
  204. AM_CONDITIONAL(include_qextmdi, test -n "$QEXTMDI_SUBDIR")
  205. ])
  206. dnl Check if tdemdi is present, if not use giden's one
  207. QUANTA_CHECK_MDI
  208. KDE_CHECK_HEADER(cvsservice_stub.h, [cvsservice_stub_h="found"], [cvsservice_stub_h="none"])
  209. AM_CONDITIONAL(include_cvsservice, test "$cvsservice_stub_h" = "found")
  210. if test "$cvsservice_stub_h" = "found"; then
  211. CXXFLAGS="$CXXFLAGS -DENABLE_CVSSERVICE"
  212. fi
  213. #check for TDENewStuffSecure headers
  214. KNEWSTUFF_INCLUDES=""
  215. LIB_KNEWSTUFF="-ltdenewstuff"
  216. KDE_CHECK_HEADER(tdenewstuff/knewstuffsecure.h, [knewstuffsecure_h="found"], [knewstuffsecure_h="none"])
  217. AM_CONDITIONAL(include_knewstuff, test "$knewstuffsecure_h" != "found")
  218. AC_SUBST(KNEWSTUFF_INCLUDES)
  219. AC_SUBST(LIB_KNEWSTUFF)
  220. AC_ARG_ENABLE(editors, [ --enable-editors Enable selection of other editors aside of Kate],
  221. [enable_editors=$enableval], [enable_editors="no"])
  222. if test "$enable_editors" = "yes"; then
  223. CXXFLAGS="$CXXFLAGS -DENABLE_EDITORS"
  224. fi
  225. AC_SUBST(enable_editors)
  226. AC_CHECK_PROGS(TAR, gnutar gtar tar, [AM_MISSING_PROG(tar)])
  227. AC_CHECK_PROG(GZIP_COMMAND, gzip, gzip)
  228. # Check for ICU CXXFLAGS
  229. KDE_FIND_PATH(pkg-config, PKGCONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  230. AC_MSG_WARN([Could not find pkg-config])
  231. ])
  232. if test -n "$PKGCONFIG"; then
  233. ICU_VERSION=`$PKGCONFIG icu-uc --modversion 2>/dev/null`
  234. if test -n "$ICU_VERSION"; then
  235. ICU_CXXFLAGS=`$PKGCONFIG icu-uc --variable=CXXFLAGS`
  236. fi
  237. fi
  238. if test -z "$ICU_VERSION"; then
  239. KDE_FIND_PATH(icu-config, ICU_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
  240. AC_MSG_WARN([Could not find icu-config])
  241. ])
  242. if test -n "$ICU_CONFIG"; then
  243. ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
  244. fi
  245. fi
  246. AC_SUBST(ICU_CXXFLAGS)