diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 02:37:40 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 02:37:40 +0000 |
commit | 9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0 (patch) | |
tree | d088b5210e77d9fa91d954d8550e00e372b47378 /configure.in.in | |
download | ktorrent-9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0.tar.gz ktorrent-9ad5c7b5e23b4940e7a3ea3ca3a6fb77e6a8fab0.zip |
Updated to final KDE3 ktorrent release (2.2.6)
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1077377 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'configure.in.in')
-rw-r--r-- | configure.in.in | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/configure.in.in b/configure.in.in new file mode 100644 index 0000000..81026cc --- /dev/null +++ b/configure.in.in @@ -0,0 +1,204 @@ +#MIN_CONFIG(3.3) + +AM_INIT_AUTOMAKE(ktorrent,2.2.6) + +dnl #### Check for FSEEK variants +AC_SYS_LARGEFILE +AC_FUNC_FSEEKO +AC_CHECK_FUNCS(fopen64, ktorrent_cv_func_fopen64=yes, ktorrent_cv_func_fopen64=no) +AC_CHECK_FUNCS(fseeko64, ktorrent_cv_func_fseek64=yes, ktorrent_cv_func_fseek64=no) +AC_CHECK_FUNCS(ftello64, ktorrent_cv_func_ftell64=yes, ktorrent_cv_func_ftell64=no) +AC_CHECK_FUNCS(fstat64, ktorrent_cv_func_fstat64=yes, ktorrent_cv_func_fstat64=no) +AC_CHECK_FUNCS(stat64, ktorrent_cv_func_stat64=yes, ktorrent_cv_func_stat64=no) +AC_CHECK_FUNCS(ftruncate64, ktorrent_cv_func_ftruncate64=yes, ktorrent_cv_func_ftruncate64=no) +AC_CHECK_FUNCS(lseek64, ktorrent_cv_func_lseek64=yes, ktorrent_cv_func_lseek64=no) +AC_CHECK_FUNCS(mmap64, ktorrent_cv_func_mmap64=yes, ktorrent_cv_func_mmap64=no) +AC_CHECK_FUNCS(munmap64, ktorrent_cv_func_munmap64=yes, ktorrent_cv_func_munmap64=no) +AC_CHECK_FUNCS(posix_fallocate, ktorrent_cv_func_posix_fallocate=yes,ktorrent_cv_func_posix_fallocate=no) +AC_CHECK_FUNCS(posix_fallocate64, ktorrent_cv_func_posix_fallocate64=yes,ktorrent_cv_func_posix_fallocate64=no) +AC_CHECK_FUNCS(statvfs, ktorrent_cv_func_statvfs=yes,ktorrent_cv_func_statvfs=no) +AC_CHECK_FUNCS(statvfs64, ktorrent_cv_func_statvfs64=yes,ktorrent_cv_func_statvfs64=no) + +AC_LANG_PUSH([C++]) +AC_CHECK_HEADERS([xfs/xfs.h]) +AC_CHECK_TYPES([__u64, __s64], [], [], [#include <xfs/xfs.h>]) +AC_LANG_POP + +if test "$ktorrent_cv_func_posix_fallocate" = yes ; then + AC_DEFINE(HAVE_POSIX_FALLOCATE, 1) +else + AC_DEFINE(HAVE_POSIX_FALLOCATE, 0) +fi + +if test "$ktorrent_cv_func_posix_fallocate64" = yes ; then + AC_DEFINE(HAVE_POSIX_FALLOCATE64, 1) +else + AC_DEFINE(HAVE_POSIX_FALLOCATE64, 0) +fi + +if test "$ktorrent_cv_func_fopen64" = yes ; then + AC_DEFINE(HAVE_FOPEN64, 1) +else + AC_DEFINE(HAVE_FOPEN64, 0) +fi + +if test "$ktorrent_cv_func_fseek64" = yes -a "$ktorrent_cv_func_ftell64" = yes; then + AC_DEFINE(HAVE_FSEEKO64, 1) +else + AC_DEFINE(HAVE_FSEEKO64, 0) +fi + +if test "$ktorrent_cv_func_fstat64" = yes -a "$ktorrent_cv_func_stat64" = yes ; then + AC_DEFINE(HAVE_STAT64,1) +else + AC_DEFINE(HAVE_STAT64,0) +fi + +if test "$ktorrent_cv_func_ftruncate64" = yes ; then + AC_DEFINE(HAVE_FTRUNCATE64,1) +else + AC_DEFINE(HAVE_FTRUNCATE64,0) +fi + +if test "$ktorrent_cv_func_lseek64" = yes ; then + AC_DEFINE(HAVE_LSEEK64,1) +else + AC_DEFINE(HAVE_LSEEK64,0) +fi + +if test "$ktorrent_cv_func_mmap64" = yes ; then + AC_DEFINE(HAVE_MMAP64, 1) +else + AC_DEFINE(HAVE_MMAP64, 0) +fi + +if test "$ktorrent_cv_func_munmap64" = yes ; then + AC_DEFINE(HAVE_MUNMAP64, 1) +else + AC_DEFINE(HAVE_MUNMAP64, 0) +fi + +if test "$ktorrent_cv_func_statvfs" = yes ; then + AC_DEFINE(HAVE_STATVFS, 1) +else + AC_DEFINE(HAVE_STATVFS, 0) +fi + +if test "$ktorrent_cv_func_statvfs64" = yes ; then + AC_DEFINE(HAVE_STATVFS64, 1) +else + AC_DEFINE(HAVE_STATVFS64, 0) +fi + +KDE_CHECK_LIB(gmp, __gmpz_init, [have_gmp=yes], + [ + have_gmp=no + AC_MSG_ERROR(libgmp is required to install this program) + ]) + +KDE_CHECK_HEADER(gmp.h, [have_gmp=yes], + [ + have_gmp=no + AC_MSG_ERROR(libgmp is required to install this program) + ]) + +KDE_CHECK_HEADER(GeoIP.h, [have_system_geoip=yes], [have_system_geoip=no]) + +KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION]) + +AC_ARG_ENABLE( + memleak-check, + [AS_HELP_STRING(--enable-memleak-check,[Enable memory leak checking])], + [CXXFLAGS="$CXXFLAGS -DKT_LEAKTRACE"]) + +AC_ARG_ENABLE( + profile, + [AS_HELP_STRING(--enable-profile,[Enable profiling])], + [CXXFLAGS="$CXXFLAGS -DKT_PROFILE"]) + + +AC_ARG_ENABLE(geoip, + [AS_HELP_STRING(--enable-geoip,[Enables builtin GeoIP database installation])], + [case "${enableval}" in + yes) geoip=true ;; + no) geoip=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-geoip) ;; + esac],[geoip=true]) + +AC_ARG_ENABLE(system-geoip, + [AS_HELP_STRING(--enable-system-geoip,[Enables use of system-wide GeoIP database (implies --disable-geoip) (no by default)])], + [case "${enableval}" in + yes) if test "$have_system_geoip" = yes; then + system_geoip=true + geoip=false + else + AC_MSG_ERROR(cannot enable system geoip. GeoIP library headers were not found on your system) + fi ;; + no) system_geoip=true ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-geoip) ;; + esac],[system_geoip=false]) + +AM_CONDITIONAL(ENABLE_GEOIP, test x$geoip = xtrue) +AM_CONDITIONAL(USE_SYSTEM_GEOIP, test x$system_geoip = xtrue) + +if test x$system_geoip = xtrue; then + AC_DEFINE(USE_SYSTEM_GEOIP, 1, [Use system geoip]) +fi + + +AC_ARG_ENABLE(builtin-country-flags, + [AS_HELP_STRING(--enable-builtin-country-flags,[Install and prefer builtin country flags to the ones provided by KDE (yes by default)])], + [case "${enableval}" in + yes) builtin_country_flags=true ;; + no) builtin_country_flags=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-builtin-country-flags) ;; + esac],[builtin_country_flags=true]) + +AM_CONDITIONAL(ENABLE_BUILTIN_COUNTRY_FLAGS, test x$builtin_country_flags = xtrue) + +AC_ARG_ENABLE(torrent-mimetype, + [ --enable-torrent-mimetype Enables the installation of the torrent mimetype which uses a KTorrent based icon], + [case "${enableval}" in + yes) mimetype_install=true ;; + no) mimetype_install=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-torrent-mimetype) ;; + esac],[mimetype_install=false]) + +AM_CONDITIONAL(ENABLE_TORRENT_MIMETYPE, test x$mimetype_install = xtrue) + +## -- BEGIN -- ADDED BY Kevin --- + +# Check for pkg-config manually first, as if its not installed the +# PKG_PROG_PKG_CONFIG macro won't be defined. +AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no) + +if test x"$have_pkg_config" = "xno"; then + AC_MSG_ERROR(pkg-config is required to install this program) +fi + +m4_pattern_allow(PKG_CONFIG_MIN_VERSION) +PKG_PROG_PKG_CONFIG + +PKG_CHECK_MODULES( AVAHI, avahi-client >= 0.6.10, +[ + AC_SUBST(AVAHI_CFLAGS) + AC_SUBST(AVAHI_LIBS) + avahi=true +], +[ + missing_avahi_warning=yes + avahi=false +]) + +PKG_CHECK_MODULES( AVAHI_QT3, avahi-qt3 >= 0.6.10, +[ + AC_SUBST(AVAHI_QT3_CFLAGS) + AC_SUBST(AVAHI_QT3_LIBS) + avahi=true +], +[ + missing_avahi_warning=yes + avahi=false +]) + +AM_CONDITIONAL(COMPILE_ZEROCONF, test x$avahi = xtrue) |