Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / libid3tag / configure.ac
bloba0a02370f98a0f8dd5b0dabac47b5ec139c808f9
1 dnl -*- m4 -*-
2 dnl
3 dnl libid3tag - ID3 tag manipulation library
4 dnl Copyright (C) 2000-2004 Underbit Technologies, Inc.
5 dnl
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.
10 dnl
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.
15 dnl
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
19 dnl
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])
25 AC_PREREQ(2.53)
27 AC_CONFIG_SRCDIR([id3tag.h])
29 AM_INIT_AUTOMAKE
31 AM_CONFIG_HEADER([config.h])
33 dnl System type.
35 AC_CANONICAL_HOST
37 dnl Checks for programs.
39 AC_PROG_CC
41 if test "$GCC" = yes
42 then
43     case "$host" in
44         *-*-mingw*)
45             case "$build" in
46                 *-*-cygwin*)
47                     CPPFLAGS="$CPPFLAGS -mno-cygwin"
48                     LDFLAGS="$LDFLAGS -mno-cygwin"
49                     ;;
50             esac
51     esac
53 dnl    case "$host" in
54 dnl     *-*-cygwin* | *-*-mingw*)
55 dnl         LDFLAGS="$LDFLAGS -no-undefined -mdll"
56 dnl         ;;
57 dnl    esac
60 dnl Support for libtool.
62 dnl AC_DISABLE_SHARED
63 dnl AC_LIBTOOL_WIN32_DLL
64 AC_PROG_LIBTOOL
66 AC_SUBST(LIBTOOL_DEPS)
68 dnl Compiler options.
70 arch=""
71 debug=""
72 optimize=""
73 profile=""
75 set -- $CFLAGS
76 CFLAGS=""
78 if test "$GCC" = yes
79 then
80     CFLAGS="-Wall"
83 while test $# -gt 0
85     case "$1" in
86         -Wall)
87             if test "$GCC" = yes
88             then
89                 :
90             else
91                 CFLAGS="$CFLAGS $1"
92             fi
93             shift
94             ;;
95         -g)
96             debug="-g"
97             shift
98             ;;
99         -mno-cygwin)
100             shift
101             ;;
102         -m*)
103             arch="$arch $1"
104             shift
105             ;;
106         -fomit-frame-pointer)
107             shift
108             ;;
109         -O*|-f*)
110             optimize="$1"
111             shift
112             ;;
113         *)
114             CFLAGS="$CFLAGS $1"
115             shift
116             ;;
117     esac
118 done
120 dnl Checks for header files.
122 AC_HEADER_STDC
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.
134 AC_C_CONST
135 AC_C_INLINE
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
150 AC_CACHE_SAVE
152 AC_MSG_CHECKING([whether to enable profiling])
153 AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling],
154                          [generate profiling code]),
156     case "$enableval" in
157         yes) profile="-pg" ;;
158     esac
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]),
168     case "$enableval" in
169         yes)
170             AC_DEFINE(DEBUG, 1,
171                 [Define to enable diagnostic debugging support.])
172             optimize=""
173             ;;
174         no)
175             if test -n "$profile"
176             then
177     AC_MSG_ERROR(--enable-profiling and --disable-debugging are incompatible)
178             fi
180             AC_DEFINE(NDEBUG, 1,
181                 [Define to disable debugging assertions.])
182             debug=""
183             if test "$GCC" = yes
184             then
185                 optimize="$optimize -fomit-frame-pointer"
186             fi
187             ;;
188     esac
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  \
204         libid3tag.list])
205 AC_OUTPUT