annotate src/libid3tag-0.15.1b/configure.ac @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 545efbb81310
children
rev   line source
cannam@85 1 dnl -*- m4 -*-
cannam@85 2 dnl
cannam@85 3 dnl libid3tag - ID3 tag manipulation library
cannam@85 4 dnl Copyright (C) 2000-2004 Underbit Technologies, Inc.
cannam@85 5 dnl
cannam@85 6 dnl This program is free software; you can redistribute it and/or modify
cannam@85 7 dnl it under the terms of the GNU General Public License as published by
cannam@85 8 dnl the Free Software Foundation; either version 2 of the License, or
cannam@85 9 dnl (at your option) any later version.
cannam@85 10 dnl
cannam@85 11 dnl This program is distributed in the hope that it will be useful,
cannam@85 12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 14 dnl GNU General Public License for more details.
cannam@85 15 dnl
cannam@85 16 dnl You should have received a copy of the GNU General Public License
cannam@85 17 dnl along with this program; if not, write to the Free Software
cannam@85 18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
cannam@85 19 dnl
cannam@85 20 AC_REVISION([$Id: configure.ac,v 1.12 2004/01/23 23:22:46 rob Exp $])dnl
cannam@85 21
cannam@85 22 dnl Process this file with autoconf to produce a configure script.
cannam@85 23
cannam@85 24 AC_INIT([ID3 Tag], [0.15.1b], [support@underbit.com], [libid3tag])
cannam@85 25 AC_PREREQ(2.53)
cannam@85 26
cannam@85 27 AC_CONFIG_SRCDIR([id3tag.h])
cannam@85 28
cannam@85 29 AM_INIT_AUTOMAKE
cannam@85 30
cannam@85 31 AM_CONFIG_HEADER([config.h])
cannam@85 32
cannam@85 33 dnl System type.
cannam@85 34
cannam@85 35 AC_CANONICAL_HOST
cannam@85 36
cannam@85 37 dnl Checks for programs.
cannam@85 38
cannam@85 39 AC_PROG_CC
cannam@85 40
cannam@85 41 if test "$GCC" = yes
cannam@85 42 then
cannam@85 43 case "$host" in
cannam@85 44 *-*-mingw*)
cannam@85 45 case "$build" in
cannam@85 46 *-*-cygwin*)
cannam@85 47 CPPFLAGS="$CPPFLAGS -mno-cygwin"
cannam@85 48 LDFLAGS="$LDFLAGS -mno-cygwin"
cannam@85 49 ;;
cannam@85 50 esac
cannam@85 51 esac
cannam@85 52
cannam@85 53 dnl case "$host" in
cannam@85 54 dnl *-*-cygwin* | *-*-mingw*)
cannam@85 55 dnl LDFLAGS="$LDFLAGS -no-undefined -mdll"
cannam@85 56 dnl ;;
cannam@85 57 dnl esac
cannam@85 58 fi
cannam@85 59
cannam@85 60 dnl Support for libtool.
cannam@85 61
cannam@85 62 dnl AC_DISABLE_SHARED
cannam@85 63 dnl AC_LIBTOOL_WIN32_DLL
cannam@85 64 AC_PROG_LIBTOOL
cannam@85 65
cannam@85 66 AC_SUBST(LIBTOOL_DEPS)
cannam@85 67
cannam@85 68 dnl Compiler options.
cannam@85 69
cannam@85 70 arch=""
cannam@85 71 debug=""
cannam@85 72 optimize=""
cannam@85 73 profile=""
cannam@85 74
cannam@85 75 set -- $CFLAGS
cannam@85 76 CFLAGS=""
cannam@85 77
cannam@85 78 if test "$GCC" = yes
cannam@85 79 then
cannam@85 80 CFLAGS="-Wall"
cannam@85 81 fi
cannam@85 82
cannam@85 83 while test $# -gt 0
cannam@85 84 do
cannam@85 85 case "$1" in
cannam@85 86 -Wall)
cannam@85 87 if test "$GCC" = yes
cannam@85 88 then
cannam@85 89 :
cannam@85 90 else
cannam@85 91 CFLAGS="$CFLAGS $1"
cannam@85 92 fi
cannam@85 93 shift
cannam@85 94 ;;
cannam@85 95 -g)
cannam@85 96 debug="-g"
cannam@85 97 shift
cannam@85 98 ;;
cannam@85 99 -mno-cygwin)
cannam@85 100 shift
cannam@85 101 ;;
cannam@85 102 -m*)
cannam@85 103 arch="$arch $1"
cannam@85 104 shift
cannam@85 105 ;;
cannam@85 106 -fomit-frame-pointer)
cannam@85 107 shift
cannam@85 108 ;;
cannam@85 109 -O*|-f*)
cannam@85 110 optimize="$1"
cannam@85 111 shift
cannam@85 112 ;;
cannam@85 113 *)
cannam@85 114 CFLAGS="$CFLAGS $1"
cannam@85 115 shift
cannam@85 116 ;;
cannam@85 117 esac
cannam@85 118 done
cannam@85 119
cannam@85 120 dnl Checks for header files.
cannam@85 121
cannam@85 122 AC_HEADER_STDC
cannam@85 123 AC_CHECK_HEADERS(assert.h unistd.h)
cannam@85 124
cannam@85 125 AC_CHECK_HEADER(zlib.h, [], [
cannam@85 126 AC_MSG_ERROR([zlib.h was not found
cannam@85 127 *** You must first install zlib (libz) before you can build this package.
cannam@85 128 *** If zlib is already installed, you may need to use the CPPFLAGS
cannam@85 129 *** environment variable to specify its installed location, e.g. -I<dir>.])
cannam@85 130 ])
cannam@85 131
cannam@85 132 dnl Checks for typedefs, structures, and compiler characteristics.
cannam@85 133
cannam@85 134 AC_C_CONST
cannam@85 135 AC_C_INLINE
cannam@85 136
cannam@85 137 dnl Checks for library functions.
cannam@85 138
cannam@85 139 AC_CHECK_FUNCS(ftruncate)
cannam@85 140
cannam@85 141 AC_CHECK_LIB(z, compress2, [], [
cannam@85 142 AC_MSG_ERROR([libz was not found
cannam@85 143 *** You must first install zlib (libz) before you can build this package.
cannam@85 144 *** If zlib is already installed, you may need to use the LDFLAGS
cannam@85 145 *** environment variable to specify its installed location, e.g. -L<dir>.])
cannam@85 146 ])
cannam@85 147
cannam@85 148 dnl handle --enable and --disable options
cannam@85 149
cannam@85 150 AC_CACHE_SAVE
cannam@85 151
cannam@85 152 AC_MSG_CHECKING([whether to enable profiling])
cannam@85 153 AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling],
cannam@85 154 [generate profiling code]),
cannam@85 155 [
cannam@85 156 case "$enableval" in
cannam@85 157 yes) profile="-pg" ;;
cannam@85 158 esac
cannam@85 159 ])
cannam@85 160 AC_MSG_RESULT(${enable_profiling-no})
cannam@85 161
cannam@85 162 AC_MSG_CHECKING([whether to enable debugging])
cannam@85 163 AC_ARG_ENABLE(debugging, AC_HELP_STRING([--enable-debugging],
cannam@85 164 [enable diagnostic debugging support])
cannam@85 165 AC_HELP_STRING([--disable-debugging],
cannam@85 166 [do not enable debugging and use more optimization]),
cannam@85 167 [
cannam@85 168 case "$enableval" in
cannam@85 169 yes)
cannam@85 170 AC_DEFINE(DEBUG, 1,
cannam@85 171 [Define to enable diagnostic debugging support.])
cannam@85 172 optimize=""
cannam@85 173 ;;
cannam@85 174 no)
cannam@85 175 if test -n "$profile"
cannam@85 176 then
cannam@85 177 AC_MSG_ERROR(--enable-profiling and --disable-debugging are incompatible)
cannam@85 178 fi
cannam@85 179
cannam@85 180 AC_DEFINE(NDEBUG, 1,
cannam@85 181 [Define to disable debugging assertions.])
cannam@85 182 debug=""
cannam@85 183 if test "$GCC" = yes
cannam@85 184 then
cannam@85 185 optimize="$optimize -fomit-frame-pointer"
cannam@85 186 fi
cannam@85 187 ;;
cannam@85 188 esac
cannam@85 189 ])
cannam@85 190 AC_MSG_RESULT(${enable_debugging-default})
cannam@85 191 AM_CONDITIONAL(DEBUG, test ${enable_debugging-default} = yes)
cannam@85 192
cannam@85 193 dnl Create output files.
cannam@85 194
cannam@85 195 test -n "$arch" && CFLAGS="$CFLAGS $arch"
cannam@85 196 test -n "$debug" && CFLAGS="$CFLAGS $debug"
cannam@85 197 test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
cannam@85 198 test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
cannam@85 199
cannam@85 200 dnl LTLIBOBJS=`echo "$LIBOBJS" | sed -e 's/\.o/.lo/g'`
cannam@85 201 dnl AC_SUBST(LTLIBOBJS)
cannam@85 202
cannam@85 203 AC_CONFIG_FILES([Makefile msvc++/Makefile \
cannam@85 204 libid3tag.list])
cannam@85 205 AC_OUTPUT