new class skeleton layed in place: KmkExtPlayer
[kmk.git] / configure.in
blob4fa3e849526e9ba05320281f7c69dce280b9d487
1 dnl    This file is part of the KDE libraries/packages
2 dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
3  
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.
8  
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`
31 unset CDPATH
33 dnl Checking host/target/build systems, for make, install etc.
34 AC_CANONICAL_SYSTEM 
35 dnl Perform program name transformation
36 AC_ARG_PROGRAM
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
41 KDE_SET_PREFIX
43 dnl generate the config header
44 AM_CONFIG_HEADER(config.h) dnl at the distribution this done
46 dnl Checks for programs.
47 AC_CHECK_COMPILERS
48 AC_ENABLE_SHARED(yes)
49 AC_ENABLE_STATIC(no)
50 KDE_PROG_LIBTOOL
52 dnl for NLS support. Call them in this order!
53 dnl WITH_NLS is for the po files
54 AM_KDE_WITH_NLS
56 KDE_USE_QT(3.2.0)
57 AC_PATH_KDE
58 #MIN_CONFIG(3.2.0)
60 dnl PACKAGE set before
61 AC_C_BIGENDIAN
62 AC_CHECK_KDEMAXPATHLEN
64 ###############################################################################
65 # BEGIN TAGLIB CHECK
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"
76     no_kmk=yes
77 else
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"
86         no_kmk=yes
87     fi
90 AC_SUBST(taglib_includes)
91 AC_SUBST(taglib_libs)
93 ###############################################################################
94 # END TAGLIB CHECK
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 ])
102 AC_OUTPUT
103 if test "$all_tests" = "bad"; then
104   if test ! "$cache_file" = "/dev/null"; then
105     echo ""    
106     echo "Please remove the file $cache_file after changing your setup"
107     echo "so that configure will find the changes next time."
108     echo ""
109   fi
110 else
111   echo ""
112   echo "Good - your configure finished. Start make now"
113   echo ""