3 dnl libid3tag - ID3 tag manipulation library
4 dnl Copyright (C) 2000-2004 Underbit Technologies, Inc.
6 dnl This program is free software; you can redistribute it and/or modify
7 dnl it under the terms of the GNU General Public License as published by
8 dnl the Free Software Foundation; either version 2 of the License, or
9 dnl (at your option) any later version.
11 dnl This program 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
14 dnl GNU General Public License for more details.
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 AC_REVISION([$Id: configure.ac,v 1.12 2004/01/23 23:22:46 rob Exp $])dnl
22 dnl Process this file with autoconf to produce a configure script.
24 AC_INIT([ID3 Tag], [0.15.1b], [support@underbit.com], [libid3tag])
27 AC_CONFIG_SRCDIR([id3tag.h])
31 AM_CONFIG_HEADER([config.h])
37 dnl Checks for programs.
47 CPPFLAGS="$CPPFLAGS -mno-cygwin"
48 LDFLAGS="$LDFLAGS -mno-cygwin"
54 dnl *-*-cygwin* | *-*-mingw*)
55 dnl LDFLAGS="$LDFLAGS -no-undefined -mdll"
60 dnl Support for libtool.
63 dnl AC_LIBTOOL_WIN32_DLL
66 AC_SUBST(LIBTOOL_DEPS)
106 -fomit-frame-pointer)
120 dnl Checks for header files.
123 AC_CHECK_HEADERS(assert.h unistd.h)
125 AC_CHECK_HEADER(zlib.h, [], [
126 AC_MSG_ERROR([zlib.h was not found
127 *** You must first install zlib (libz) before you can build this package.
128 *** If zlib is already installed, you may need to use the CPPFLAGS
129 *** environment variable to specify its installed location, e.g. -I<dir>.])
132 dnl Checks for typedefs, structures, and compiler characteristics.
137 dnl Checks for library functions.
139 AC_CHECK_FUNCS(ftruncate)
141 AC_CHECK_LIB(z, compress2, [], [
142 AC_MSG_ERROR([libz was not found
143 *** You must first install zlib (libz) before you can build this package.
144 *** If zlib is already installed, you may need to use the LDFLAGS
145 *** environment variable to specify its installed location, e.g. -L<dir>.])
148 dnl handle --enable and --disable options
152 AC_MSG_CHECKING([whether to enable profiling])
153 AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling],
154 [generate profiling code]),
157 yes) profile="-pg" ;;
160 AC_MSG_RESULT(${enable_profiling-no})
162 AC_MSG_CHECKING([whether to enable debugging])
163 AC_ARG_ENABLE(debugging, AC_HELP_STRING([--enable-debugging],
164 [enable diagnostic debugging support])
165 AC_HELP_STRING([--disable-debugging],
166 [do not enable debugging and use more optimization]),
171 [Define to enable diagnostic debugging support.])
175 if test -n "$profile"
177 AC_MSG_ERROR(--enable-profiling and --disable-debugging are incompatible)
181 [Define to disable debugging assertions.])
185 optimize="$optimize -fomit-frame-pointer"
190 AC_MSG_RESULT(${enable_debugging-default})
191 AM_CONDITIONAL(DEBUG, test ${enable_debugging-default} = yes)
193 dnl Create output files.
195 test -n "$arch" && CFLAGS="$CFLAGS $arch"
196 test -n "$debug" && CFLAGS="$CFLAGS $debug"
197 test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
198 test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
200 dnl LTLIBOBJS=`echo "$LIBOBJS" | sed -e 's/\.o/.lo/g'`
201 dnl AC_SUBST(LTLIBOBJS)
203 AC_CONFIG_FILES([Makefile msvc++/Makefile \