1 dnl This file is part of the KDE libraries/packages
2 dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
3 dnl modified by Walter Tasin (tasin@kdevelop.org)
4 dnl for c++ console applications
6 dnl This file is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Library General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2 of the License, or (at your option) any later version.
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 dnl Library General Public License for more details.
16 dnl You should have received a copy of the GNU Library General Public License
17 dnl along with this library; see the file COPYING.LIB. If not, write to
18 dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 dnl Boston, MA 02111-1307, USA.
21 # Original Author was Kalle@kde.org
22 # I lifted it in some mater. (Stephan Kulow)
23 # I used much code from Janos Farkas
25 dnl Process this file with autoconf to produce a configure script.
27 AC_INIT(acinclude.m4) dnl a source file from your sub dir
29 dnl This is so we can use kde-common
30 AC_CONFIG_AUX_DIR(admin)
32 dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
35 dnl Checking host/target/build systems, for make, install etc.
37 dnl Perform program name transformation
40 dnl Automake doc recommends to do this only here. (Janos)
41 AM_INIT_AUTOMAKE(taglib,1.4)
43 dnl almost the same like KDE_SET_PEFIX but the path is /usr/local
46 dnl make /usr/local the default for the installation
47 AC_PREFIX_DEFAULT(/usr/local)
49 if test "x$prefix" = "xNONE"; then
50 prefix=$ac_default_prefix
51 ac_configure_args="$ac_configure_args --prefix $prefix"
56 dnl without this order in this file, automake will be confused!
58 AM_CONFIG_HEADER(config.h)
60 dnl checks for programs.
61 dnl first check for c/c++ compilers
64 dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__
65 dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__
66 CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__
68 dnl create only shared libtool-libraries
71 dnl set the following to yes, if you want to create static
72 dnl libtool-libraries, too.
75 dnl create a working libtool-script
78 dnl activate the next macro call for DLOPEN tests and setting LIBDL
79 dnl (n.b. KDE_MISC_TESTS does the same to you, so use either this or the next one)
82 dnl activate the next macro call for some additional tests
83 dnl (compat, crypt, socket, nsl, dlopen, ...)
84 dnl KDE_MISC_TESTS dnl __kdevelop__
86 dnl KDE_NEED_FLEX dnl __kdevelop__
87 dnl AC_PROG_YACC dnl __kdevelop__
89 dnl KDE_CHECK_EXTRA_LIBS
90 all_libraries="$all_libraries $USER_LDFLAGS"
91 all_includes="$all_includes $USER_INCLUDES"
92 AC_SUBST(all_includes)
93 AC_SUBST(all_libraries)
97 #AM_INIT_AUTOMAKE(taglib,1.0)
98 dnl don't remove the below
99 dnl AC_OUTPUT(taglib-config)
100 dnl AC_OUTPUT(taglib.pc)
102 AC_DEFUN([AC_HAVE_ZLIB],
104 AC_DEFINE(HAVE_ZLIB, 1, [have zlib])
108 AC_DEFUN([AC_NO_ZLIB],
110 AC_DEFINE(HAVE_ZLIB, 0, [have zlib])
114 AC_CHECK_HEADER(zlib.h, AC_HAVE_ZLIB, AC_NO_ZLIB)
115 AM_CONDITIONAL(link_zlib, test x$have_zlib = xtrue)
117 AC_DEFUN([AC_HAVE_CPPUNIT],
119 AC_DEFINE(HAVE_CPPUNIT, 1, [have cppunit])
123 AC_DEFUN([AC_NO_CPPUNIT],
125 AC_DEFINE(HAVE_CPPUNIT, 0, [have cppunit])
131 AC_CHECK_HEADER(cppunit/extensions/HelperMacros.h, AC_HAVE_CPPUNIT, AC_NO_CPPUNIT)
133 AM_CONDITIONAL(build_tests, test x$have_cppunit = xtrue)