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.
724 lines
22 KiB
724 lines
22 KiB
15 years ago
|
dnl =======================================================
|
||
|
dnl FILE: ./admin/configure.in.min
|
||
|
dnl =======================================================
|
||
|
|
||
|
dnl This file is part of the KDE libraries/packages
|
||
|
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
|
||
|
|
||
|
dnl This file is free software; you can redistribute it and/or
|
||
|
dnl modify it under the terms of the GNU Library General Public
|
||
|
dnl License as published by the Free Software Foundation; either
|
||
|
dnl version 2 of the License, or (at your option) any later version.
|
||
|
|
||
|
dnl This library is distributed in the hope that it will be useful,
|
||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
dnl Library General Public License for more details.
|
||
|
|
||
|
dnl You should have received a copy of the GNU Library General Public License
|
||
|
dnl along with this library; see the file COPYING.LIB. If not, write to
|
||
|
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifh Floor,
|
||
|
dnl Boston, MA 02110-1301, USA.
|
||
|
|
||
|
# Original Author was Kalle@kde.org
|
||
|
# I lifted it in some mater. (Stephan Kulow)
|
||
|
# I used much code from Janos Farkas
|
||
|
|
||
|
dnl Process this file with autoconf to produce a configure script.
|
||
|
|
||
|
AC_INIT(acinclude.m4) dnl a source file from your sub dir
|
||
|
|
||
|
dnl This is so we can use kde-common
|
||
|
AC_CONFIG_AUX_DIR(admin)
|
||
|
|
||
|
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
|
||
|
unset CDPATH
|
||
|
|
||
|
dnl Checking host/target/build systems, for make, install etc.
|
||
|
AC_CANONICAL_SYSTEM
|
||
|
dnl Perform program name transformation
|
||
|
AC_ARG_PROGRAM
|
||
|
|
||
|
dnl Automake doc recommends to do this only here. (Janos)
|
||
|
AM_INIT_AUTOMAKE(tellico, 1.3.2.1) dnl searches for some needed programs
|
||
|
|
||
|
KDE_SET_PREFIX
|
||
|
|
||
|
dnl generate the config header
|
||
|
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
|
||
|
|
||
|
dnl Checks for programs.
|
||
|
AC_CHECK_COMPILERS
|
||
|
AC_ENABLE_SHARED(yes)
|
||
|
AC_ENABLE_STATIC(no)
|
||
|
KDE_PROG_LIBTOOL
|
||
|
|
||
|
dnl for NLS support. Call them in this order!
|
||
|
dnl WITH_NLS is for the po files
|
||
|
AM_KDE_WITH_NLS
|
||
|
|
||
|
KDE_USE_QT(3.3)
|
||
|
AC_PATH_KDE
|
||
|
dnl =======================================================
|
||
|
dnl FILE: configure.in.in
|
||
|
dnl =======================================================
|
||
|
|
||
|
#MIN_CONFIG(3.3)
|
||
|
|
||
|
dnl PACKAGE set before
|
||
|
|
||
|
dnl AM_KDE_MIN_VERSION(MIN-VERSION-MAJOR, MIN-VERSION-MINOR, MIN-VERSION-MICRO)
|
||
|
dnl (taken from KMyMoney2)
|
||
|
dnl
|
||
|
AC_DEFUN([AM_KDE_MIN_VERSION],
|
||
|
[
|
||
|
AC_MSG_CHECKING([for KDE version $1.$2.$3 or later])
|
||
|
AC_LANG_SAVE
|
||
|
AC_LANG_CPLUSPLUS
|
||
|
save_CXXFLAGS=$CXXFLAGS
|
||
|
CXXFLAGS="$CXXFLAGS -I$srcdir $all_includes"
|
||
|
AC_TRY_COMPILE([
|
||
|
#include "kdeversion.h"
|
||
|
#if !( KDE_IS_VERSION( $1, $2, $3 ) )
|
||
|
#error KDE version does not meet minimum requirement
|
||
|
#endif
|
||
|
], [], AC_MSG_RESULT(yes), AC_MSG_ERROR(no))
|
||
|
CXXFLAGS=$save_CXXFLAGS
|
||
|
AC_LANG_RESTORE
|
||
|
])
|
||
|
AM_KDE_MIN_VERSION(3,3,1)
|
||
|
|
||
|
dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__
|
||
|
dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__
|
||
|
dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS -DQT_NO_ASCII_CAST -DQT_NO_TRANSLATION" dnl __kdevelop[exc]__
|
||
|
|
||
|
dnl KDE_NEED_FLEX dnl __kdevelop__
|
||
|
dnl AC_PROG_YACC dnl __kdevelop__
|
||
|
|
||
|
AC_MSG_CHECKING(for ushort in <sys/types.h>)
|
||
|
AC_CACHE_VAL(bt_cv_type_ushort, [
|
||
|
AC_TRY_COMPILE([
|
||
|
#include <sys/types.h>
|
||
|
],[
|
||
|
ushort i;
|
||
|
], bt_cv_type_ushort=yes, bt_cv_type_ushort=no)])
|
||
|
AC_MSG_RESULT($bt_cv_type_ushort)
|
||
|
if test "$bt_cv_type_ushort" = "yes" ; then
|
||
|
AC_DEFINE(HAVE_USHORT, 1, [Define if ushort is defined in <sys/types.h>])
|
||
|
fi
|
||
|
|
||
|
AC_MSG_CHECKING(for boolean in <sys/types.h>)
|
||
|
AC_CACHE_VAL(bt_cv_type_boolean, [
|
||
|
AC_TRY_COMPILE([
|
||
|
#include <sys/types.h>
|
||
|
],[
|
||
|
boolean f;
|
||
|
], bt_cv_type_boolean=yes, bt_cv_type_boolean=no)])
|
||
|
AC_MSG_RESULT($bt_cv_type_boolean)
|
||
|
if test "$bt_cv_type_boolean" = "yes" ; then
|
||
|
AC_DEFINE(HAVE_BOOLEAN, 1, [Define if boolean is defined in <sys/types.h>])
|
||
|
fi
|
||
|
|
||
|
AC_MSG_CHECKING(for strdup declaration in <string.h>)
|
||
|
AC_EGREP_HEADER([strdup *\(], string.h, bt_cv_decl_strdup=yes, bt_cv_decl_strdup=no)
|
||
|
AC_MSG_RESULT($bt_cv_decl_strdup)
|
||
|
if test "$bt_cv_decl_strdup" = "yes" ; then
|
||
|
AC_DEFINE(HAVE_STRDUP_DECL, 1, [Define if strdup is declared in <string.h>])
|
||
|
fi
|
||
|
|
||
|
dnl Checks for library functions.
|
||
|
AC_FUNC_ALLOCA
|
||
|
AC_FUNC_VPRINTF
|
||
|
AC_CHECK_FUNCS(strlwr strupr)
|
||
|
|
||
|
AC_CHECK_SIZEOF(unsigned int, 4)
|
||
|
AC_CHECK_SIZEOF(unsigned short, 2)
|
||
|
AC_CHECK_SIZEOF(unsigned char, 1)
|
||
|
AC_CHECK_SIZEOF(char, 1)
|
||
|
|
||
|
AC_CACHE_CHECK([for std::vector::at(std::size_t)],
|
||
|
ac_cv_cxx_have_vector_at, [
|
||
|
AC_LANG_SAVE
|
||
|
AC_LANG_CPLUSPLUS
|
||
|
AC_TRY_COMPILE([
|
||
|
#include <vector>
|
||
|
],[
|
||
|
std::vector<int> v(1);
|
||
|
v.at(0);
|
||
|
return 0;
|
||
|
],ac_cv_cxx_have_vector_at=yes, ac_cv_cxx_have_vector_at=no)
|
||
|
AC_LANG_RESTORE
|
||
|
])
|
||
|
if test "$ac_cv_cxx_have_vector_at" = "yes"; then
|
||
|
AC_DEFINE(HAVE_VECTOR_AT,1,[Define if you have the 'std::vector::at(std::size_t)' function])
|
||
|
fi
|
||
|
|
||
|
KDE_FIND_PATH(xml2-config, XML_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
|
||
|
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.]])
|
||
|
])
|
||
|
|
||
|
if test -n "$XML_CONFIG"; then
|
||
|
vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
||
|
if test -n "$vers" && test "$vers" -ge 2006000
|
||
|
then
|
||
|
LIBXML_LIBS="`$XML_CONFIG --libs`"
|
||
|
LIBXML_RPATH=
|
||
|
for args in $LIBXML_LIBS; do
|
||
|
case $args in
|
||
|
-L*)
|
||
|
LIBXML_RPATH="$LIBXML_RPATH $args"
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"`
|
||
|
LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
|
||
|
else
|
||
|
AC_MSG_ERROR([[You need at least libxml 2.6.0.]])
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(LIBXML_LIBS)
|
||
|
AC_SUBST(LIBXML_CFLAGS)
|
||
|
AC_SUBST(LIBXML_RPATH)
|
||
|
|
||
|
AC_ARG_WITH([xml-catalog],
|
||
|
AC_HELP_STRING([--with-xml-catalog=CATALOG],
|
||
|
[path to XML catalog, default=without-xml-catalog]),,
|
||
|
[with_xml_catalog=no])
|
||
|
|
||
|
if test x"$with_xml_catalog" != xno; then
|
||
|
KDE_FIND_PATH(xmlcatalog, XMLCATALOG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
|
||
|
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.]])
|
||
|
])
|
||
|
|
||
|
AC_SUBST(XMLCATALOG)
|
||
|
|
||
|
if test x"$with_xml_catalog" = xyes; then
|
||
|
XML_CATALOG_FILE="/etc/xml/catalog"
|
||
|
else
|
||
|
XML_CATALOG_FILE="$with_xml_catalog"
|
||
|
fi
|
||
|
|
||
|
AC_MSG_CHECKING([for XML catalog])
|
||
|
if test -f "$XML_CATALOG_FILE"; then
|
||
|
AC_MSG_RESULT([$XML_CATALOG_FILE])
|
||
|
else
|
||
|
AC_MSG_ERROR([$XML_CATALOG_FILE not found])
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(XML_CATALOG_FILE)
|
||
|
fi
|
||
|
|
||
|
KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
|
||
|
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.]])
|
||
|
])
|
||
|
|
||
|
if test -n "$XSLT_CONFIG"; then
|
||
|
vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
|
||
|
if test -n "$vers" && test "$vers" -ge 1000019; then
|
||
|
LIBXSLT_LIBS="`$XSLT_CONFIG --libs`"
|
||
|
LIBXSLT_RPATH=
|
||
|
for args in $LIBXSLT_LIBS; do
|
||
|
case $args in
|
||
|
-L*)
|
||
|
LIBXSLT_RPATH="$LIBXSLT_RPATH $args"
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"`
|
||
|
LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
|
||
|
else
|
||
|
AC_MSG_ERROR([[You need at least libxslt 1.0.19.]])
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(LIBXSLT_LIBS)
|
||
|
AC_SUBST(LIBXSLT_CFLAGS)
|
||
|
AC_SUBST(LIBXSLT_RPATH)
|
||
|
|
||
|
dnl ---------- TAGLIB CHECK ----------
|
||
|
|
||
|
AC_DEFUN([AC_HAVE_TAGLIB],
|
||
|
[
|
||
|
AC_DEFINE(HAVE_TAGLIB, 1, [Define to 1 if you have the TagLib library])
|
||
|
TAGLIB_CFLAGS=[`$TAGLIB_CONFIG --cflags`]
|
||
|
TAGLIB_LIBS=[`$TAGLIB_CONFIG --libs`]
|
||
|
TAGLIB_RPATH=
|
||
|
for args in $TAGLIB_LIBS; do
|
||
|
case $args in
|
||
|
-L*)
|
||
|
TAGLIB_RPATH="$TAGLIB_RPATH $args"
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
TAGLIB_RPATH=`echo $TAGLIB_RPATH | sed -e "s/-L/-R/g"`
|
||
|
])
|
||
|
|
||
|
AC_DEFUN([AC_NO_TAGLIB],
|
||
|
[
|
||
|
TAGLIB_CFLAGS=""
|
||
|
TAGLIB_LIBS=""
|
||
|
TAGLIB_RPATH=""
|
||
|
])
|
||
|
|
||
|
KDE_FIND_PATH(taglib-config, TAGLIB_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
|
||
|
if test -n "$TAGLIB_CONFIG"; then
|
||
|
AC_HAVE_TAGLIB
|
||
|
else
|
||
|
AC_NO_TAGLIB
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(TAGLIB_CFLAGS)
|
||
|
AC_SUBST(TAGLIB_LIBS)
|
||
|
AC_SUBST(TAGLIB_RPATH)
|
||
|
|
||
|
dnl ---------- END TAGLIB CHECK ----------
|
||
|
|
||
|
dnl ---------- YAZ CHECK ----------
|
||
|
|
||
|
AC_DEFUN([AC_HAVE_YAZ],
|
||
|
[
|
||
|
AC_DEFINE(HAVE_YAZ, 1, [Define to 1 if you have the yaz library])
|
||
|
YAZ_CFLAGS=[`$YAZ_CONFIG --cflags`]
|
||
|
YAZ_LIBS=[`$YAZ_CONFIG --libs`]
|
||
|
YAZ_RPATH=
|
||
|
for args in $YAZ_LIBS; do
|
||
|
case $args in
|
||
|
-L*)
|
||
|
YAZ_RPATH="$YAZ_RPATH $args"
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
YAZ_RPATH=`echo $YAZ_RPATH | sed -e "s/-L/-R/g"`
|
||
|
])
|
||
|
|
||
|
AC_DEFUN([AC_NO_YAZ],
|
||
|
[
|
||
|
YAZ_CFLAGS=""
|
||
|
YAZ_LIBS=""
|
||
|
YAZ_RPATH=""
|
||
|
])
|
||
|
|
||
|
KDE_FIND_PATH(yaz-config, YAZ_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin])
|
||
|
if test -n "$YAZ_CONFIG"; then
|
||
|
AC_HAVE_YAZ
|
||
|
else
|
||
|
AC_NO_YAZ
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(YAZ_CFLAGS)
|
||
|
AC_SUBST(YAZ_LIBS)
|
||
|
AC_SUBST(YAZ_RPATH)
|
||
|
|
||
|
dnl ---------- END YAZ CHECK ----------
|
||
|
|
||
|
dnl ---------- KCDDB CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(libkcddb,
|
||
|
AC_HELP_STRING([--disable-libkcddb], [disable libkcddb, default=enable if found]),
|
||
|
[enable_libkcddb=$enableval],
|
||
|
[enable_libkcddb=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_libkcddb = xyes; then
|
||
|
|
||
|
AC_LANG_SAVE
|
||
|
AC_LANG_CPLUSPLUS
|
||
|
|
||
|
ac_save_libs="$LIBS"
|
||
|
ac_save_cxxflags="$CXXFLAGS"
|
||
|
|
||
|
LIBS="$LIBS $all_libraries -lkcddb"
|
||
|
CXXFLAGS="$CXXFLAGS $all_includes"
|
||
|
|
||
|
AC_MSG_CHECKING(for libkcddb library and headers)
|
||
|
AC_TRY_LINK(
|
||
|
[
|
||
|
#ifdef QT_NO_CAST_ASCII
|
||
|
#undef QT_NO_CAST_ASCII
|
||
|
#endif
|
||
|
#include <libkcddb/cddb.h>
|
||
|
],
|
||
|
[KCDDB::CDDB c],
|
||
|
[kcddb=yes],
|
||
|
[kcddb=no]
|
||
|
)
|
||
|
AC_MSG_RESULT($kcddb)
|
||
|
|
||
|
LIBS="$ac_save_libs"
|
||
|
CXXFLAGS="$ac_save_cxxflags"
|
||
|
AC_LANG_RESTORE
|
||
|
|
||
|
if test x$kcddb = xyes; then
|
||
|
AC_DEFINE(HAVE_KCDDB, 1, [Define to 1 if you have libkcddb])
|
||
|
KCDDB_LIBS="-lkcddb"
|
||
|
else
|
||
|
KCDDB_LIBS=
|
||
|
fi
|
||
|
|
||
|
dnl -- kcddb was disabled ---
|
||
|
else
|
||
|
KCDDB_LIBS=
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(KCDDB_LIBS)
|
||
|
|
||
|
dnl ---------- END KCDDB CHECK ----------
|
||
|
|
||
|
dnl ---------- KCAL CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(libkcal,
|
||
|
AC_HELP_STRING([--disable-libkcal], [disable libkcal, default=enable if found]),
|
||
|
[enable_libkcal=$enableval],
|
||
|
[enable_libkcal=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_libkcal = xyes; then
|
||
|
|
||
|
AC_LANG_SAVE
|
||
|
AC_LANG_CPLUSPLUS
|
||
|
|
||
|
ac_save_libs="$LIBS"
|
||
|
ac_save_cxxflags="$CXXFLAGS"
|
||
|
|
||
|
LIBS="$LIBS $all_libraries -lkcal"
|
||
|
CXXFLAGS="$CXXFLAGS $all_includes"
|
||
|
|
||
|
AC_MSG_CHECKING(for libkcal library and headers)
|
||
|
AC_TRY_LINK(
|
||
|
[
|
||
|
#ifdef QT_NO_CAST_ASCII
|
||
|
#undef QT_NO_CAST_ASCII
|
||
|
#endif
|
||
|
#include <libkcal/todo.h>
|
||
|
],
|
||
|
[KCal::Todo t],
|
||
|
[kcal=yes],
|
||
|
[kcal=no]
|
||
|
)
|
||
|
AC_MSG_RESULT($kcal)
|
||
|
|
||
|
LIBS="$ac_save_libs"
|
||
|
CXXFLAGS="$ac_save_cxxflags"
|
||
|
AC_LANG_RESTORE
|
||
|
|
||
|
if test x$kcal = xyes; then
|
||
|
AC_DEFINE(HAVE_KCAL, 1, [Define to 1 if you have libkcal])
|
||
|
KCAL_LIBS="-lkcal"
|
||
|
else
|
||
|
KCAL_LIBS=
|
||
|
fi
|
||
|
|
||
|
dnl -- libkcal was disabled ---
|
||
|
else
|
||
|
KCAL_LIBS=
|
||
|
fi
|
||
|
|
||
|
AC_SUBST(KCAL_LIBS)
|
||
|
|
||
|
dnl ---------- END KCAL CHECK ----------
|
||
|
|
||
|
AC_ARG_WITH([btparse],
|
||
|
AC_HELP_STRING([--with-btparse], [Link against libbtparse
|
||
|
as a shared lib (shared) or build it statically (static), default=static]),
|
||
|
[case "${withval}" in
|
||
|
shared) btparse=shared ;;
|
||
|
static) btparse=static ;;
|
||
|
yes) btparse=shared ;;
|
||
|
*) AC_MSG_ERROR(bad value ${withval} for --with-btparse) ;;
|
||
|
esac],
|
||
|
[btparse=static])
|
||
|
|
||
|
AM_CONDITIONAL(USE_LIBBTPARSE, test x$btparse = xshared)
|
||
|
|
||
|
if test x$btparse = xshared; then
|
||
|
KDE_CHECK_LIB(btparse, bt_initialize, [], [AC_MSG_ERROR(could not find libbtparse)])
|
||
|
fi
|
||
|
|
||
|
dnl ---------- AMAZON CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(amazon,
|
||
|
AC_HELP_STRING([--disable-amazon], [disable Amazon.com searching, default=enable]),
|
||
|
[enable_amazon=$enableval],
|
||
|
[enable_amazon=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_amazon = xyes; then
|
||
|
AC_DEFINE(AMAZON_SUPPORT, 1, [Define to 1 if Amazon.com searching should be enabled])
|
||
|
fi
|
||
|
|
||
|
dnl ---------- END AMAZON CHECK ----------
|
||
|
|
||
|
dnl ---------- IMDB CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(imdb,
|
||
|
AC_HELP_STRING([--disable-imdb], [disable IMDb searching, default=enable]),
|
||
|
[enable_imdb=$enableval],
|
||
|
[enable_imdb=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_imdb = xyes; then
|
||
|
AC_DEFINE(IMDB_SUPPORT, 1, [Define to 1 if IMDb searching should be enabled])
|
||
|
fi
|
||
|
|
||
|
dnl ---------- END IMDB CHECK ----------
|
||
|
|
||
|
dnl ---------- CDTEXT CHECK ----------
|
||
|
dnl Not sure if my code for CDText works on all platforms, allow disabling
|
||
|
|
||
|
AC_ARG_ENABLE(cdtext,
|
||
|
AC_HELP_STRING([--disable-cdtext], [disable cdtext, default=enable (Linux only)]),
|
||
|
[enable_cdtext=$enableval],
|
||
|
[enable_cdtext=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_cdtext = xyes; then
|
||
|
AC_DEFINE(USE_CDTEXT, 1, [Define to 1 if you want to compile CD-Text support])
|
||
|
fi
|
||
|
|
||
|
dnl ---------- OpenOffice.org CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(ooo,
|
||
|
AC_HELP_STRING([--enable-ooo], [enable support for OpenOffice.org, default=disable]),
|
||
|
[enable_ooo=$enableval],
|
||
|
[enable_ooo=no]
|
||
|
)
|
||
|
|
||
|
AM_CONDITIONAL(WITH_OOO, test x$enable_ooo = xyes)
|
||
|
|
||
|
dnl Options: OpenOffice.org installation
|
||
|
AC_ARG_WITH([ooo-dir],
|
||
|
AC_HELP_STRING([--with-ooo-dir=DIR],
|
||
|
[where the OpenOffice.org program files are installed]),
|
||
|
[ac_ooo_libdir="${withval}/program"
|
||
|
ac_ooo_datadir="${withval}/program"])
|
||
|
AC_ARG_WITH([ooo-libdir],
|
||
|
AC_HELP_STRING([--with-ooo-libdir=DIR],
|
||
|
[where the OpenOffice.org program libraries are installed (<ooo-dir>/program)]),
|
||
|
[ac_ooo_libdir="${withval}"])
|
||
|
AC_ARG_WITH([ooo-datadir],
|
||
|
AC_HELP_STRING([--with-ooo-datadir=DIR],
|
||
|
[where the OpenOffice.org data files are installed (<ooo-dir>/program)]),
|
||
|
[ac_ooo_datadir="${withval}"])
|
||
|
|
||
|
dnl Options: OpenOffice.org SDK
|
||
|
AC_ARG_WITH([ooo-sdk-dir],
|
||
|
AC_HELP_STRING([--with-ooo-sdk-dir=DIR],
|
||
|
[where the OpenOffice.org SDK is installed]),
|
||
|
[ac_ooo_sdk_bindir="${withval}/linux/bin"
|
||
|
ac_ooo_sdk_includes="${withval}/include"])
|
||
|
AC_ARG_WITH([ooo-sdk-bindir],
|
||
|
AC_HELP_STRING([--with-ooo-sdk-bindir=DIR],
|
||
|
[where the OpenOffice.org SDK binaries are installed (<ooo-sdk-dir>/linux/bin)]),
|
||
|
[ac_ooo_sdk_bindir="${withval}"])
|
||
|
AC_ARG_WITH([ooo-sdk-includes],
|
||
|
AC_HELP_STRING([--with-ooo-sdk-includes=DIR],
|
||
|
[where the OpenOffice.org SDK includes are installed (<ooo-sdk-dir>/include)]),
|
||
|
[ac_ooo_sdk_includes="${withval}"])
|
||
|
|
||
|
if test x$enable_ooo = xyes; then
|
||
|
|
||
|
dnl Check for UNO cpp binding
|
||
|
KDE_FIND_PATH(cppumaker, CPPUMAKER, [$ac_ooo_sdk_bindir ${prefix}/bin ${exec_prefix}/bin /usr/bin /usr/local/bin /opt/local/bin], [
|
||
|
AC_MSG_ERROR([[cppumaker not found, try '--with-ooo-sdk-dir=location_of_ODK']])
|
||
|
])
|
||
|
|
||
|
dnl Check for ODK includes
|
||
|
ac_cppflags_safe="$CPPFLAGS"
|
||
|
CPPFLAGS="-I$ac_ooo_sdk_includes"
|
||
|
KDE_CHECK_HEADERS([sal/config.h],
|
||
|
[OFFICE_SDK_includes="$CPPFLAGS"],
|
||
|
AC_MSG_ERROR([[OpenOffice.org SDK include files not found, try '--with-ooo-sdk-dir=location_of_ODK']]))
|
||
|
CPPFLAGS="$ac_cppflags_safe"
|
||
|
|
||
|
dnl OpenOffice.org libraries
|
||
|
if test -n "$ac_ooo_libdir" ; then
|
||
|
OFFICE_libadd="-L$ac_ooo_libdir"
|
||
|
OFFICE_libdir="$ac_ooo_libdir"
|
||
|
fi
|
||
|
|
||
|
dnl OpenOffice.org types.rdb
|
||
|
AC_CHECK_FILE([$ac_ooo_datadir/types.rdb],
|
||
|
[OFFICE_registry="$ac_ooo_datadir"/types.rdb],
|
||
|
AC_MSG_ERROR([[types.rdb not found, try '--with-ooo-dir=OpenOffice.org_installation_path']]))
|
||
|
|
||
|
dnl Substitute the values
|
||
|
AC_SUBST(OFFICE_SDK_includes)
|
||
|
AC_SUBST(OFFICE_libadd)
|
||
|
AC_SUBST(OFFICE_libdir)
|
||
|
AC_SUBST(OFFICE_registry)
|
||
|
AC_SUBST(CPPUMAKER)
|
||
|
|
||
|
fi
|
||
|
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/core"
|
||
|
CXXFLAGS="$CXXFLAGS -I\$(top_srcdir)/src/core"
|
||
|
|
||
|
dnl ---------- EXEMPI CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(exempi,
|
||
|
AC_HELP_STRING([--disable-exempi], [disable exempi, default=enable if found]),
|
||
|
[enable_libexempi=$enableval],
|
||
|
[enable_libexempi=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_libexempi = xyes; then
|
||
|
KDE_PKG_CHECK_MODULES(EXEMPI,
|
||
|
[exempi-2.0 >= 1.99.0],
|
||
|
[have_exempi=yes],
|
||
|
[have_exempi=no])
|
||
|
AC_SUBST(EXEMPI_LIBS)
|
||
|
AC_SUBST(EXEMPI_CFLAGS)
|
||
|
else
|
||
|
have_exempi="no (disabled)"
|
||
|
fi
|
||
|
|
||
|
test "$have_exempi" = "yes" && AC_DEFINE(HAVE_EXEMPI, 1, [Define to 1 if exempi is available])
|
||
|
|
||
|
|
||
|
dnl ---------- END EXEMPI CHECK ----------
|
||
|
|
||
|
dnl ---------- POPPLER CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(poppler,
|
||
|
AC_HELP_STRING([--disable-poppler], [disable poppler, default=enable if found]),
|
||
|
[enable_libpoppler=$enableval],
|
||
|
[enable_libpoppler=yes]
|
||
|
)
|
||
|
|
||
|
if test x$enable_libpoppler = xyes; then
|
||
|
KDE_PKG_CHECK_MODULES(POPPLER,
|
||
|
[poppler-qt >= 0.5],
|
||
|
[have_poppler=yes],
|
||
|
[have_poppler=no])
|
||
|
AC_SUBST(POPPLER_LIBS)
|
||
|
AC_SUBST(POPPLER_CFLAGS)
|
||
|
else
|
||
|
have_poppler="no (disabled)"
|
||
|
fi
|
||
|
|
||
|
test "$have_poppler" = "yes" && AC_DEFINE(HAVE_POPPLER, 1, [Define to 1 if poppler is available])
|
||
|
|
||
|
|
||
|
dnl ---------- END POPPLER CHECK ----------
|
||
|
|
||
|
dnl ---------- WEBCAM CHECK ----------
|
||
|
|
||
|
AC_ARG_ENABLE(webcam,
|
||
|
AC_HELP_STRING([--enable-webcam], [enable support for webcams (experimental), default=disable]),
|
||
|
[enable_webcam=$enableval],
|
||
|
[enable_webcam=no]
|
||
|
)
|
||
|
|
||
|
AM_CONDITIONAL(ENABLE_WEBCAM, test $enable_webcam = yes)
|
||
|
if test x$enable_webcam = xyes; then
|
||
|
AC_DEFINE(ENABLE_WEBCAM, 1, [Define to 1 if webcam support is enabled])
|
||
|
fi
|
||
|
|
||
|
dnl ---------- END WEBCAM CHECK ----------
|
||
|
KDE_CREATE_SUBDIRSLIST
|
||
|
AC_CONFIG_FILES([ Makefile ])
|
||
|
AC_CONFIG_FILES([ doc/Makefile ])
|
||
|
AC_CONFIG_FILES([ doc/en/Makefile ])
|
||
|
AC_CONFIG_FILES([ doc/fr/Makefile ])
|
||
|
AC_CONFIG_FILES([ icons/Makefile ])
|
||
|
AC_CONFIG_FILES([ po/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/barcode/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/cite/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/cite/ooo/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/collections/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/commands/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/core/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/fetch/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/fetch/scripts/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/gui/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/newstuff/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/rtf2html/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/tests/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/translators/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/translators/btparse/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/translators/pilotdb/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/translators/pilotdb/libflatfile/Makefile ])
|
||
|
AC_CONFIG_FILES([ src/translators/pilotdb/libpalm/Makefile ])
|
||
|
AC_CONFIG_FILES([ xslt/Makefile ])
|
||
|
AC_CONFIG_FILES([ xslt/entry-templates/Makefile ])
|
||
|
AC_CONFIG_FILES([ xslt/report-templates/Makefile ])
|
||
|
AC_OUTPUT
|
||
|
echo ""
|
||
|
|
||
|
if test -z "$TAGLIB_CONFIG"; then
|
||
|
echo " *******************************************************"
|
||
|
echo " *** You don't have the TagLib headers on your system"
|
||
|
echo " *** Support for reading audio files is disabled"
|
||
|
echo " *******************************************************"
|
||
|
echo ""
|
||
|
fi
|
||
|
|
||
|
if test -z "$YAZ_CONFIG"; then
|
||
|
echo " *******************************************************"
|
||
|
echo " *** You don't have the yaz headers on your system"
|
||
|
echo " *** Support for z39.50 searches is disabled"
|
||
|
echo " *******************************************************"
|
||
|
echo ""
|
||
|
fi
|
||
|
|
||
|
if test x$kcddb != xyes; then
|
||
|
echo " *******************************************************"
|
||
|
echo " *** You don't have the kcddb headers on your system"
|
||
|
echo " *** Support for fetching CDDB info is disabled"
|
||
|
echo " *******************************************************"
|
||
|
echo ""
|
||
|
fi
|
||
|
|
||
|
if test x$kcal != xyes; then
|
||
|
echo " *******************************************************"
|
||
|
echo " *** You don't have the kcal headers on your system"
|
||
|
echo " *** Support for interacting with KOrganizer is disabled"
|
||
|
echo " *******************************************************"
|
||
|
echo ""
|
||
|
fi
|
||
|
|
||
|
if test x$have_exempi != xyes; then
|
||
|
echo " *******************************************************"
|
||
|
echo " *** You don't have the exempi headers on your system"
|
||
|
echo " *** Support for importing some PDF metadata is disabled"
|
||
|
echo " *******************************************************"
|
||
|
echo ""
|
||
|
fi
|
||
|
|
||
|
if test x$have_poppler != xyes; then
|
||
|
echo " *******************************************************"
|
||
|
echo " *** You don't have the poppler headers on your system"
|
||
|
echo " *** Support for searching inside PDF files is disabled"
|
||
|
echo " *******************************************************"
|
||
|
echo ""
|
||
|
fi
|
||
|
|
||
|
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
|
||
|
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
|
||
|
# And if so, warn when they don't match
|
||
|
if test "$kde_libs_prefix" != "$given_prefix"; then
|
||
|
echo ""
|
||
|
echo "Warning: you chose to install this package in $given_prefix,"
|
||
|
echo "but KDE was found in $kde_libs_prefix."
|
||
|
echo "For this to work, you will need to tell KDE about the new prefix,"
|
||
|
echo "by ensuring that KDEDIRS contains it, e.g."
|
||
|
echo " export KDEDIRS=$given_prefix:$kde_libs_prefix"
|
||
|
echo "Then restart KDE."
|
||
|
echo ""
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
if test "$all_tests" = "bad"; then
|
||
|
if test ! "$cache_file" = "/dev/null"; then
|
||
|
echo ""
|
||
|
echo "Please remove the file $cache_file after changing your setup"
|
||
|
echo "so that configure will find the changes next time."
|
||
|
echo ""
|
||
|
fi
|
||
|
else
|
||
|
echo ""
|
||
|
echo "Good - your configure finished. Start make now"
|
||
|
echo ""
|
||
|
fi
|