~ubuntu-dev/ubuntu/lucid/mpd/lucid-201002101854

« back to all changes in this revision

Viewing changes to src/libid3tag/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Charles Majola
  • Date: 2005-02-15 10:43:58 UTC
  • Revision ID: james.westby@ubuntu.com-20050215104358-w8b7yaqqfmsoxj5k
Tags: upstream-0.11.5
ImportĀ upstreamĀ versionĀ 0.11.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
21
 
 
22
dnl Process this file with autoconf to produce a configure script.
 
23
 
 
24
AC_INIT([ID3 Tag], [0.15.1b], [support@underbit.com], [libid3tag])
 
25
AC_PREREQ(2.53)
 
26
 
 
27
AC_CONFIG_SRCDIR([id3tag.h])
 
28
 
 
29
AM_INIT_AUTOMAKE
 
30
 
 
31
AM_CONFIG_HEADER([config.h])
 
32
 
 
33
dnl System type.
 
34
 
 
35
AC_CANONICAL_HOST
 
36
 
 
37
dnl Checks for programs.
 
38
 
 
39
AC_PROG_CC
 
40
 
 
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
 
52
 
 
53
dnl    case "$host" in
 
54
dnl     *-*-cygwin* | *-*-mingw*)
 
55
dnl         LDFLAGS="$LDFLAGS -no-undefined -mdll"
 
56
dnl         ;;
 
57
dnl    esac
 
58
fi
 
59
 
 
60
dnl Support for libtool.
 
61
 
 
62
AC_DISABLE_SHARED
 
63
dnl AC_LIBTOOL_WIN32_DLL
 
64
AC_PROG_LIBTOOL
 
65
 
 
66
AC_SUBST(LIBTOOL_DEPS)
 
67
 
 
68
dnl Compiler options.
 
69
 
 
70
arch=""
 
71
debug=""
 
72
optimize=""
 
73
profile=""
 
74
 
 
75
set -- $CFLAGS
 
76
CFLAGS=""
 
77
 
 
78
if test "$GCC" = yes
 
79
then
 
80
    CFLAGS="-Wall"
 
81
fi
 
82
 
 
83
while test $# -gt 0
 
84
do
 
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
 
119
 
 
120
dnl Checks for header files.
 
121
 
 
122
AC_HEADER_STDC
 
123
AC_CHECK_HEADERS(assert.h unistd.h)
 
124
 
 
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>.])
 
130
])
 
131
 
 
132
dnl Checks for typedefs, structures, and compiler characteristics.
 
133
 
 
134
AC_C_CONST
 
135
AC_C_INLINE
 
136
 
 
137
dnl Checks for library functions.
 
138
 
 
139
AC_CHECK_FUNCS(ftruncate)
 
140
 
 
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>.])
 
146
])
 
147
 
 
148
dnl handle --enable and --disable options
 
149
 
 
150
AC_CACHE_SAVE
 
151
 
 
152
AC_MSG_CHECKING([whether to enable profiling])
 
153
AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling],
 
154
                         [generate profiling code]),
 
155
[
 
156
    case "$enableval" in
 
157
        yes) profile="-pg" ;;
 
158
    esac
 
159
])
 
160
AC_MSG_RESULT(${enable_profiling-no})
 
161
 
 
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]),
 
167
[
 
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
 
179
 
 
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
 
189
])
 
190
AC_MSG_RESULT(${enable_debugging-default})
 
191
AM_CONDITIONAL(DEBUG, test ${enable_debugging-default} = yes)
 
192
 
 
193
dnl Create output files.
 
194
 
 
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"
 
199
 
 
200
dnl LTLIBOBJS=`echo "$LIBOBJS" | sed -e 's/\.o/.lo/g'`
 
201
dnl AC_SUBST(LTLIBOBJS)
 
202
 
 
203
AC_CONFIG_FILES([Makefile \
 
204
        libid3tag.list])
 
205
AC_OUTPUT