Tellico – collection manager for books, videos, music
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 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  1. #MIN_CONFIG(3.3)
  2. KDE_ENABLE_HIDDEN_VISIBILITY
  3. AM_INIT_AUTOMAKE(tellico,1.3.6)
  4. dnl AM_KDE_MIN_VERSION(MIN-VERSION-MAJOR, MIN-VERSION-MINOR, MIN-VERSION-MICRO)
  5. dnl (taken from KMyMoney2)
  6. dnl
  7. AC_DEFUN([AM_KDE_MIN_VERSION],
  8. [
  9. AC_MSG_CHECKING([for KDE version $1.$2.$3 or later])
  10. AC_LANG_SAVE
  11. AC_LANG_CPLUSPLUS
  12. save_CXXFLAGS=$CXXFLAGS
  13. CXXFLAGS="$CXXFLAGS -I$srcdir $all_includes"
  14. AC_TRY_COMPILE([
  15. #include "tdeversion.h"
  16. #if !( KDE_IS_VERSION( $1, $2, $3 ) )
  17. #error KDE version does not meet minimum requirement
  18. #endif
  19. ], [], AC_MSG_RESULT(yes), AC_MSG_ERROR(no))
  20. CXXFLAGS=$save_CXXFLAGS
  21. AC_LANG_RESTORE
  22. ])
  23. AM_KDE_MIN_VERSION(3,3,1)
  24. dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __tdevelop[noopt]__
  25. dnl CFLAGS="$NOOPT_CFLAGS" dnl __tdevelop[noopt]__
  26. dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS -DTQT_NO_ASCII_CAST -DTQT_NO_TRANSLATION" dnl __tdevelop[exc]__
  27. dnl KDE_NEED_FLEX dnl __tdevelop__
  28. dnl AC_PROG_YACC dnl __tdevelop__
  29. AC_MSG_CHECKING(for ushort in <sys/types.h>)
  30. AC_CACHE_VAL(bt_cv_type_ushort, [
  31. AC_TRY_COMPILE([
  32. #include <sys/types.h>
  33. ],[
  34. ushort i;
  35. ], bt_cv_type_ushort=yes, bt_cv_type_ushort=no)])
  36. AC_MSG_RESULT($bt_cv_type_ushort)
  37. if test "$bt_cv_type_ushort" = "yes" ; then
  38. AC_DEFINE(HAVE_USHORT, 1, [Define if ushort is defined in <sys/types.h>])
  39. fi
  40. AC_MSG_CHECKING(for boolean in <sys/types.h>)
  41. AC_CACHE_VAL(bt_cv_type_boolean, [
  42. AC_TRY_COMPILE([
  43. #include <sys/types.h>
  44. ],[
  45. boolean f;
  46. ], bt_cv_type_boolean=yes, bt_cv_type_boolean=no)])
  47. AC_MSG_RESULT($bt_cv_type_boolean)
  48. if test "$bt_cv_type_boolean" = "yes" ; then
  49. AC_DEFINE(HAVE_BOOLEAN, 1, [Define if boolean is defined in <sys/types.h>])
  50. fi
  51. AC_MSG_CHECKING(for strdup declaration in <string.h>)
  52. AC_EGREP_HEADER([strdup *\(], string.h, bt_cv_decl_strdup=yes, bt_cv_decl_strdup=no)
  53. AC_MSG_RESULT($bt_cv_decl_strdup)
  54. if test "$bt_cv_decl_strdup" = "yes" ; then
  55. AC_DEFINE(HAVE_STRDUP_DECL, 1, [Define if strdup is declared in <string.h>])
  56. fi
  57. dnl Checks for library functions.
  58. AC_FUNC_ALLOCA
  59. AC_FUNC_VPRINTF
  60. AC_CHECK_FUNCS(strlwr strupr)
  61. AC_CHECK_SIZEOF(unsigned int, 4)
  62. AC_CHECK_SIZEOF(unsigned short, 2)
  63. AC_CHECK_SIZEOF(unsigned char, 1)
  64. AC_CHECK_SIZEOF(char, 1)
  65. AC_CACHE_CHECK([for std::vector::at(std::size_t)],
  66. ac_cv_cxx_have_vector_at, [
  67. AC_LANG_SAVE
  68. AC_LANG_CPLUSPLUS
  69. AC_TRY_COMPILE([
  70. #include <vector>
  71. ],[
  72. std::vector<int> v(1);
  73. v.at(0);
  74. return 0;
  75. ],ac_cv_cxx_have_vector_at=yes, ac_cv_cxx_have_vector_at=no)
  76. AC_LANG_RESTORE
  77. ])
  78. if test "$ac_cv_cxx_have_vector_at" = "yes"; then
  79. AC_DEFINE(HAVE_VECTOR_AT,1,[Define if you have the 'std::vector::at(std::size_t)' function])
  80. fi
  81. KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  82. AC_MSG_ERROR([[Could not find xml2-config anywhere, check ftp://xmlsoft.org/ for libxml >= 2.6.0. If you are using pre-packaged libraries, be sure to have the development files installed as well, which may be called libxml2-devel or something similar.]])
  83. ])
  84. if test -n "$XML_CONFIG"; then
  85. vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  86. if test -n "$vers" && test "$vers" -ge 2006000
  87. then
  88. LIBXML_LIBS="`$XML_CONFIG --libs`"
  89. LIBXML_RPATH=
  90. for args in $LIBXML_LIBS; do
  91. case $args in
  92. -L*)
  93. LIBXML_RPATH="$LIBXML_RPATH $args"
  94. ;;
  95. esac
  96. done
  97. LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"`
  98. LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
  99. else
  100. AC_MSG_ERROR([[You need at least libxml 2.6.0.]])
  101. fi
  102. fi
  103. AC_SUBST(LIBXML_LIBS)
  104. AC_SUBST(LIBXML_CFLAGS)
  105. AC_SUBST(LIBXML_RPATH)
  106. AC_ARG_WITH([xml-catalog],
  107. AC_HELP_STRING([--with-xml-catalog=CATALOG],
  108. [path to XML catalog, default=without-xml-catalog]),,
  109. [with_xml_catalog=no])
  110. if test x"$with_xml_catalog" != xno; then
  111. KDE_FIND_PATH(xmlcatalog, XMLCATALOG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  112. AC_MSG_ERROR([[Could not find xmlcatalog anywhere, check ftp://xmlsoft.org/ for libxml2 >= 2.4.23. If you are using pre-packaged libraries, be sure to have the utility files installed as well, which may be called libxml2-utils or something similar.]])
  113. ])
  114. AC_SUBST(XMLCATALOG)
  115. if test x"$with_xml_catalog" = xyes; then
  116. XML_CATALOG_FILE="/etc/xml/catalog"
  117. else
  118. XML_CATALOG_FILE="$with_xml_catalog"
  119. fi
  120. AC_MSG_CHECKING([for XML catalog])
  121. if test -f "$XML_CATALOG_FILE"; then
  122. AC_MSG_RESULT([$XML_CATALOG_FILE])
  123. else
  124. AC_MSG_ERROR([$XML_CATALOG_FILE not found])
  125. fi
  126. AC_SUBST(XML_CATALOG_FILE)
  127. fi
  128. KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  129. AC_MSG_ERROR([[Could not find xslt-config anywhere, check ftp://xmlsoft.org/ for libxslt >= 1.0.19. If you are using pre-packaged libraries, be sure to have the development files installed as well, which may be called libxslt-devel or something similar.]])
  130. ])
  131. if test -n "$XSLT_CONFIG"; then
  132. vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  133. if test -n "$vers" && test "$vers" -ge 1000019; then
  134. LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
  135. LIBXSLT_RPATH=
  136. for args in $LIBXSLT_LIBS; do
  137. case $args in
  138. -L*)
  139. LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
  140. ;;
  141. esac
  142. done
  143. LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"`
  144. LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
  145. else
  146. AC_MSG_ERROR([[You need at least libxslt 1.0.19.]])
  147. fi
  148. fi
  149. AC_SUBST(LIBXSLT_LIBS)
  150. AC_SUBST(LIBXSLT_CFLAGS)
  151. AC_SUBST(LIBXSLT_RPATH)
  152. dnl ---------- TAGLIB CHECK ----------
  153. AC_DEFUN([AC_HAVE_TAGLIB],
  154. [
  155. AC_DEFINE(HAVE_TAGLIB, 1, [Define to 1 if you have the TagLib library])
  156. TAGLIB_CFLAGS=[`$TAGLIB_CONFIG --cflags`]
  157. TAGLIB_LIBS=[`$TAGLIB_CONFIG --libs`]
  158. TAGLIB_RPATH=
  159. for args in $TAGLIB_LIBS; do
  160. case $args in
  161. -L*)
  162. TAGLIB_RPATH="$TAGLIB_RPATH $args"
  163. ;;
  164. esac
  165. done
  166. TAGLIB_RPATH=`echo $TAGLIB_RPATH | sed -e "s/-L/-R/g"`
  167. ])
  168. AC_DEFUN([AC_NO_TAGLIB],
  169. [
  170. TAGLIB_CFLAGS=""
  171. TAGLIB_LIBS=""
  172. TAGLIB_RPATH=""
  173. ])
  174. KDE_FIND_PATH(taglib-config, TAGLIB_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
  175. if test -n "$TAGLIB_CONFIG"; then
  176. AC_HAVE_TAGLIB
  177. else
  178. AC_NO_TAGLIB
  179. fi
  180. AC_SUBST(TAGLIB_CFLAGS)
  181. AC_SUBST(TAGLIB_LIBS)
  182. AC_SUBST(TAGLIB_RPATH)
  183. dnl ---------- END TAGLIB CHECK ----------
  184. dnl ---------- YAZ CHECK ----------
  185. AC_DEFUN([AC_HAVE_YAZ],
  186. [
  187. AC_DEFINE(HAVE_YAZ, 1, [Define to 1 if you have the yaz library])
  188. YAZ_CFLAGS=[`$YAZ_CONFIG --cflags`]
  189. YAZ_LIBS=[`$YAZ_CONFIG --libs`]
  190. YAZ_RPATH=
  191. for args in $YAZ_LIBS; do
  192. case $args in
  193. -L*)
  194. YAZ_RPATH="$YAZ_RPATH $args"
  195. ;;
  196. esac
  197. done
  198. YAZ_RPATH=`echo $YAZ_RPATH | sed -e "s/-L/-R/g"`
  199. ])
  200. AC_DEFUN([AC_NO_YAZ],
  201. [
  202. YAZ_CFLAGS=""
  203. YAZ_LIBS=""
  204. YAZ_RPATH=""
  205. ])
  206. KDE_FIND_PATH(yaz-config, YAZ_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
  207. if test -n "$YAZ_CONFIG"; then
  208. AC_HAVE_YAZ
  209. else
  210. AC_NO_YAZ
  211. fi
  212. AC_SUBST(YAZ_CFLAGS)
  213. AC_SUBST(YAZ_LIBS)
  214. AC_SUBST(YAZ_RPATH)
  215. dnl ---------- END YAZ CHECK ----------
  216. dnl ---------- KCDDB CHECK ----------
  217. AC_ARG_ENABLE(libkcddb,
  218. AC_HELP_STRING([--disable-libkcddb], [disable libkcddb, default=enable if found]),
  219. [enable_libkcddb=$enableval],
  220. [enable_libkcddb=yes]
  221. )
  222. if test x$enable_libkcddb = xyes; then
  223. AC_LANG_SAVE
  224. AC_LANG_CPLUSPLUS
  225. ac_save_libs="$LIBS"
  226. ac_save_cxxflags="$CXXFLAGS"
  227. LIBS="$LIBS $all_libraries -lkcddb"
  228. CXXFLAGS="$CXXFLAGS $all_includes"
  229. AC_MSG_CHECKING(for libkcddb library and headers)
  230. AC_TRY_LINK(
  231. [
  232. #ifdef TQT_NO_CAST_ASCII
  233. #undef TQT_NO_CAST_ASCII
  234. #endif
  235. #include <libkcddb/cddb.h>
  236. ],
  237. [KCDDB::CDDB c],
  238. [kcddb=yes],
  239. [kcddb=no]
  240. )
  241. AC_MSG_RESULT($kcddb)
  242. LIBS="$ac_save_libs"
  243. CXXFLAGS="$ac_save_cxxflags"
  244. AC_LANG_RESTORE
  245. if test x$kcddb = xyes; then
  246. AC_DEFINE(HAVE_KCDDB, 1, [Define to 1 if you have libkcddb])
  247. KCDDB_LIBS="-lkcddb"
  248. else
  249. KCDDB_LIBS=
  250. fi
  251. dnl -- kcddb was disabled ---
  252. else
  253. KCDDB_LIBS=
  254. fi
  255. AC_SUBST(KCDDB_LIBS)
  256. dnl ---------- END KCDDB CHECK ----------
  257. dnl ---------- KCAL CHECK ----------
  258. AC_ARG_ENABLE(libkcal,
  259. AC_HELP_STRING([--disable-libkcal], [disable libkcal, default=enable if found]),
  260. [enable_libkcal=$enableval],
  261. [enable_libkcal=yes]
  262. )
  263. if test x$enable_libkcal = xyes; then
  264. AC_LANG_SAVE
  265. AC_LANG_CPLUSPLUS
  266. ac_save_libs="$LIBS"
  267. ac_save_cxxflags="$CXXFLAGS"
  268. LIBS="$LIBS $all_libraries -lkcal"
  269. CXXFLAGS="$CXXFLAGS $all_includes"
  270. AC_MSG_CHECKING(for libkcal library and headers)
  271. AC_TRY_LINK(
  272. [
  273. #ifdef TQT_NO_CAST_ASCII
  274. #undef TQT_NO_CAST_ASCII
  275. #endif
  276. #include <libkcal/todo.h>
  277. ],
  278. [KCal::Todo t],
  279. [kcal=yes],
  280. [kcal=no]
  281. )
  282. AC_MSG_RESULT($kcal)
  283. LIBS="$ac_save_libs"
  284. CXXFLAGS="$ac_save_cxxflags"
  285. AC_LANG_RESTORE
  286. if test x$kcal = xyes; then
  287. AC_DEFINE(HAVE_KCAL, 1, [Define to 1 if you have libkcal])
  288. KCAL_LIBS="-lkcal -ltderesources"
  289. else
  290. KCAL_LIBS=
  291. fi
  292. dnl -- libkcal was disabled ---
  293. else
  294. KCAL_LIBS=
  295. fi
  296. AC_SUBST(KCAL_LIBS)
  297. dnl ---------- END KCAL CHECK ----------
  298. AC_ARG_WITH([btparse],
  299. AC_HELP_STRING([--with-btparse], [Link against libbtparse
  300. as a shared lib (shared) or build it statically (static), default=static]),
  301. [case "${withval}" in
  302. shared) btparse=shared ;;
  303. static) btparse=static ;;
  304. yes) btparse=shared ;;
  305. *) AC_MSG_ERROR(bad value ${withval} for --with-btparse) ;;
  306. esac],
  307. [btparse=static])
  308. AM_CONDITIONAL(USE_LIBBTPARSE, test x$btparse = xshared)
  309. if test x$btparse = xshared; then
  310. KDE_CHECK_LIB(btparse, bt_initialize, [], [AC_MSG_ERROR(could not find libbtparse)])
  311. fi
  312. dnl ---------- AMAZON CHECK ----------
  313. AC_ARG_ENABLE(amazon,
  314. AC_HELP_STRING([--disable-amazon], [disable Amazon.com searching, default=enable]),
  315. [enable_amazon=$enableval],
  316. [enable_amazon=yes]
  317. )
  318. if test x$enable_amazon = xyes; then
  319. AC_DEFINE(AMAZON_SUPPORT, 1, [Define to 1 if Amazon.com searching should be enabled])
  320. fi
  321. dnl ---------- END AMAZON CHECK ----------
  322. dnl ---------- IMDB CHECK ----------
  323. AC_ARG_ENABLE(imdb,
  324. AC_HELP_STRING([--disable-imdb], [disable IMDb searching, default=enable]),
  325. [enable_imdb=$enableval],
  326. [enable_imdb=yes]
  327. )
  328. if test x$enable_imdb = xyes; then
  329. AC_DEFINE(IMDB_SUPPORT, 1, [Define to 1 if IMDb searching should be enabled])
  330. fi
  331. dnl ---------- END IMDB CHECK ----------
  332. dnl ---------- CDTEXT CHECK ----------
  333. dnl Not sure if my code for CDText works on all platforms, allow disabling
  334. AC_ARG_ENABLE(cdtext,
  335. AC_HELP_STRING([--disable-cdtext], [disable cdtext, default=enable (Linux only)]),
  336. [enable_cdtext=$enableval],
  337. [enable_cdtext=yes]
  338. )
  339. if test x$enable_cdtext = xyes; then
  340. AC_DEFINE(USE_CDTEXT, 1, [Define to 1 if you want to compile CD-Text support])
  341. fi
  342. dnl ---------- OpenOffice.org CHECK ----------
  343. AC_ARG_ENABLE(ooo,
  344. AC_HELP_STRING([--enable-ooo], [enable support for OpenOffice.org, default=disable]),
  345. [enable_ooo=$enableval],
  346. [enable_ooo=no]
  347. )
  348. AM_CONDITIONAL(WITH_OOO, test x$enable_ooo = xyes)
  349. dnl Options: OpenOffice.org installation
  350. AC_ARG_WITH([ooo-dir],
  351. AC_HELP_STRING([--with-ooo-dir=DIR],
  352. [where the OpenOffice.org program files are installed]),
  353. [ac_ooo_libdir="${withval}/program"
  354. ac_ooo_datadir="${withval}/program"
  355. ac_ooo_basisdir="${withval}/basis3.0"])
  356. AC_ARG_WITH([ooo-libdir],
  357. AC_HELP_STRING([--with-ooo-libdir=DIR],
  358. [where the OpenOffice.org program libraries are installed (<ooo-dir>/program)]),
  359. [ac_ooo_libdir="${withval}"])
  360. AC_ARG_WITH([ooo-datadir],
  361. AC_HELP_STRING([--with-ooo-datadir=DIR],
  362. [where the OpenOffice.org data files are installed (<ooo-dir>/program)]),
  363. [ac_ooo_datadir="${withval}"])
  364. dnl Options: OpenOffice.org SDK
  365. AC_ARG_WITH([ooo-sdk-dir],
  366. AC_HELP_STRING([--with-ooo-sdk-dir=DIR],
  367. [where the OpenOffice.org SDK is installed]),
  368. [ac_ooo_sdk_bindir="${withval}/linux/bin"
  369. ac_ooo_sdk_includes="${withval}/include"])
  370. AC_ARG_WITH([ooo-sdk-bindir],
  371. AC_HELP_STRING([--with-ooo-sdk-bindir=DIR],
  372. [where the OpenOffice.org SDK binaries are installed (<ooo-sdk-dir>/linux/bin)]),
  373. [ac_ooo_sdk_bindir="${withval}"])
  374. AC_ARG_WITH([ooo-sdk-includes],
  375. AC_HELP_STRING([--with-ooo-sdk-includes=DIR],
  376. [where the OpenOffice.org SDK includes are installed (<ooo-sdk-dir>/include)]),
  377. [ac_ooo_sdk_includes="${withval}"])
  378. if test x$enable_ooo = xyes; then
  379. dnl Check for UNO cpp binding
  380. KDE_FIND_PATH(cppumaker, CPPUMAKER, [$ac_ooo_sdk_bindir ${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
  381. AC_MSG_ERROR([[cppumaker not found, try '--with-ooo-sdk-dir=location_of_ODK']])
  382. ])
  383. dnl Check for ODK includes
  384. ac_cppflags_safe="$CPPFLAGS"
  385. CPPFLAGS="-I$ac_ooo_sdk_includes"
  386. KDE_CHECK_HEADERS([sal/config.h],
  387. [OFFICE_SDK_includes="$CPPFLAGS"],
  388. AC_MSG_ERROR([[OpenOffice.org SDK include files not found, try '--with-ooo-sdk-dir=location_of_ODK']]))
  389. CPPFLAGS="$ac_cppflags_safe"
  390. dnl OpenOffice.org libraries
  391. if test -n "$ac_ooo_libdir" ; then
  392. OFFICE_libadd="-L$ac_ooo_libdir"
  393. OFFICE_libdir="$ac_ooo_libdir"
  394. fi
  395. dnl OpenOffice.org types.rdb
  396. AC_CHECK_FILE([$ac_ooo_datadir/types.rdb],
  397. [OFFICE_registry="$ac_ooo_datadir"/types.rdb],
  398. AC_MSG_ERROR([[types.rdb not found, try '--with-ooo-dir=OpenOffice.org_installation_path']]))
  399. AC_FIND_FILE([offapi.rdb],
  400. [$ac_ooo_basisdir/program $ac_ooo_libdir $ac_ooo_datadir],
  401. offapi_dir)
  402. if test "$offapi_dir" != "NO"; then
  403. OFFICE_registry="$OFFICE_registry $offapi_dir/offapi.rdb"
  404. fi
  405. dnl Substitute the values
  406. AC_SUBST(OFFICE_SDK_includes)
  407. AC_SUBST(OFFICE_libadd)
  408. AC_SUBST(OFFICE_libdir)
  409. AC_SUBST(OFFICE_registry)
  410. AC_SUBST(CPPUMAKER)
  411. fi
  412. CFLAGS="$CFLAGS -I\$(top_srcdir)/src/core"
  413. CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/src/core"
  414. dnl ---------- EXEMPI CHECK ----------
  415. AC_ARG_ENABLE(exempi,
  416. AC_HELP_STRING([--disable-exempi], [disable exempi, default=enable if found]),
  417. [enable_libexempi=$enableval],
  418. [enable_libexempi=yes]
  419. )
  420. if test x$enable_libexempi = xyes; then
  421. KDE_PKG_CHECK_MODULES(EXEMPI,
  422. [exempi-2.0 >= 1.99.0],
  423. [have_exempi=yes],
  424. [have_exempi=no])
  425. AC_SUBST(EXEMPI_LIBS)
  426. AC_SUBST(EXEMPI_CFLAGS)
  427. else
  428. have_exempi="no (disabled)"
  429. fi
  430. test "$have_exempi" = "yes" && AC_DEFINE(HAVE_EXEMPI, 1, [Define to 1 if exempi is available])
  431. dnl ---------- END EXEMPI CHECK ----------
  432. dnl ---------- POPPLER CHECK ----------
  433. AC_ARG_ENABLE(poppler,
  434. AC_HELP_STRING([--disable-poppler], [disable poppler, default=enable if found]),
  435. [enable_libpoppler=$enableval],
  436. [enable_libpoppler=yes]
  437. )
  438. if test x$enable_libpoppler = xyes; then
  439. KDE_PKG_CHECK_MODULES(POPPLER,
  440. [poppler-tqt >= 0.5],
  441. [have_poppler=yes],
  442. [have_poppler=no])
  443. AC_SUBST(POPPLER_LIBS)
  444. AC_SUBST(POPPLER_CFLAGS)
  445. else
  446. have_poppler="no (disabled)"
  447. fi
  448. test "$have_poppler" = "yes" && AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if poppler is available])
  449. dnl ---------- END POPPLER CHECK ----------
  450. dnl ---------- WEBCAM CHECK ----------
  451. AC_ARG_ENABLE(webcam,
  452. AC_HELP_STRING([--enable-webcam], [enable support for webcams (experimental), default=disable]),
  453. [enable_webcam=$enableval],
  454. [enable_webcam=no]
  455. )
  456. if test x$enable_webcam = xyes; then
  457. KDE_CHECK_HEADERS(
  458. [libv4l1-videodev.h],
  459. [videodev_header="libv4l1-videodev.h"],
  460. [
  461. KDE_CHECK_HEADERS([linux/videodev.h],
  462. [videodev_header="linux/videodev.h"],
  463. [enable_webcam="no"])
  464. ])
  465. fi
  466. AM_CONDITIONAL(ENABLE_WEBCAM, test $enable_webcam = yes)
  467. if test x$enable_webcam = xyes; then
  468. AC_DEFINE(ENABLE_WEBCAM, 1, [Define to 1 if webcam support is enabled])
  469. AC_DEFINE_UNQUOTED(VIDEODEV_HEADER, ["$videodev_header"], [Define header name for videodev])
  470. fi
  471. dnl ---------- END WEBCAM CHECK ----------
  472. dnl ---------- SAX CHECK ----------
  473. AC_ARG_ENABLE(sax,
  474. AC_HELP_STRING([--enable-sax], [enable SAX document loading (experimental), default=disable]),
  475. [enable_sax=$enableval],
  476. [enable_sax=no]
  477. )
  478. if test x$enable_sax = xyes; then
  479. AC_DEFINE(SAX_SUPPORT, 1, [Define to 1 if the XML loader should use SAX])
  480. fi
  481. dnl ---------- END SAX CHECK ----------
  482. dnl -------- fix TQTDCOPIDLNG ---------
  483. if test "$kde_cv_tqt" = "no"; then
  484. if test -z "$TQTDCOPIDLNG"; then
  485. KDE_FIND_PATH(dcopidlng, TQTDCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
  486. fi
  487. fi