1 dnl This file is part of the KDE libraries/packages
2 dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
4 dnl This file is free software; you can redistribute it and/or
5 dnl modify it under the terms of the GNU Library General Public
6 dnl License as published by the Free Software Foundation; either
7 dnl version 2 of the License, or (at your option) any later version.
9 dnl This library is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 dnl Library General Public License for more details.
14 dnl You should have received a copy of the GNU Library General Public License
15 dnl along with this library; see the file COPYING.LIB. If not, write to
16 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 dnl Boston, MA 02111-1307, USA.
19 # Original Author was Kalle@kde.org
20 # I lifted it in some mater. (Stephan Kulow)
21 # I used much code from Janos Farkas
23 dnl Process this file with autoconf to produce a configure script.
25 AC_INIT(acinclude.m4) dnl a source file from your sub dir
27 dnl This is so we can use kde-common
28 AC_CONFIG_AUX_DIR(admin)
30 dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
33 dnl Checking host/target/build systems, for make, install etc.
35 dnl Perform program name transformation
38 dnl Automake doc recommends to do this only here. (Janos)
39 AM_INIT_AUTOMAKE(kmk, 0.24-alpha-0) dnl searches for some needed programs
43 dnl generate the config header
44 AM_CONFIG_HEADER(config.h) dnl at the distribution this done
46 dnl Checks for programs.
52 dnl for NLS support. Call them in this order!
53 dnl WITH_NLS is for the po files
60 dnl PACKAGE set before
62 AC_CHECK_KDEMAXPATHLEN
64 ###############################################################################
66 ###############################################################################
68 TAGLIB_REQ_VERSION="1.4";
69 AC_DEFUN([VERSION_TO_NUMBER], [`$1 | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1* 1000 + [$]2) * 1000 + [$]3;}'`])
71 AC_PATH_PROG(TAGLIB_CONFIG, taglib-config, no)
73 if test "x$TAGLIB_CONFIG" = "xno" ; then
74 kmk_error_notaglib=yes
75 DO_NOT_COMPILE="$DO_NOT_COMPILE kmk"
78 AC_DEFINE(HAVE_TAGLIB, 1, [have TagLib])
79 taglib_includes=[`$TAGLIB_CONFIG --cflags`]
80 taglib_libs=[`$TAGLIB_CONFIG --libs`]
81 taglib_version=[`$TAGLIB_CONFIG --version`]
83 if test VERSION_TO_NUMBER(echo $taglib_version) -lt VERSION_TO_NUMBER(echo $TAGLIB_REQ_VERSION); then
84 kmk_error_taglibold=yes
85 DO_NOT_COMPILE="$DO_NOT_COMPILE kmk"
90 AC_SUBST(taglib_includes)
93 ###############################################################################
95 ###############################################################################
96 KDE_CREATE_SUBDIRSLIST
97 AC_CONFIG_FILES([ Makefile ])
98 AC_CONFIG_FILES([ doc/Makefile ])
99 AC_CONFIG_FILES([ doc/en/Makefile ])
100 AC_CONFIG_FILES([ po/Makefile ])
101 AC_CONFIG_FILES([ src/Makefile ])
103 if test "$all_tests" = "bad"; then
104 if test ! "$cache_file" = "/dev/null"; then
106 echo "Please remove the file $cache_file after changing your setup"
107 echo "so that configure will find the changes next time."
112 echo "Good - your configure finished. Start make now"