1#/********************************************************** 2# * 3# * mp3splt - utility using libmp3splt, 4# * for mp3/ogg splitting without decoding 5# * 6# * Copyright (c) 2002-2005 M. Trotta - <mtrotta@users.sourceforge.net> 7# * Copyright (c) 2005-2014 Munteanu Alexandru - m@ioalex.net 8# * 9# * http://mp3splt.sourceforge.net 10# * 11# *********************************************************/ 12 13#/********************************************************** 14# 15# This program is free software; you can redistribute it and/or modify 16# it under the terms of the GNU General Public License as published by 17# the Free Software Foundation; either version 2 of the License, or 18# (at your option) any later version. 19# 20# This program is distributed in the hope that it will be useful, 21# but WITHOUT ANY WARRANTY; without even the implied warranty of 22# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23# GNU General Public License for more details. 24# 25# You should have received a copy of the GNU General Public License 26# along with this program; if not, write to the Free Software 27# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28# 29# *********************************************************/ 30 31################################################# 32# Basic initialisations 33################################################# 34 35m4_define([minimum_libmp3splt_version],[0.9.2]) 36 37AC_PREREQ(2.56) 38AC_INIT(mp3splt, 2.6.2, mtrotta@users.sourceforge.net) 39 40AC_CONFIG_SRCDIR([src/mp3splt.c]) 41AM_INIT_AUTOMAKE 42AM_CONFIG_HEADER([config.h]) 43AM_MAINTAINER_MODE([enable]) 44 45################################################# 46# Check for programs 47################################################# 48 49AC_PROG_CC 50AC_PROG_INSTALL 51AC_PROG_LN_S 52 53AC_CHECK_HEADERS([unistd.h]) 54AM_GNU_GETTEXT([external]) 55AM_GNU_GETTEXT_VERSION([0.13.1]) 56 57AC_DEFINE_UNQUOTED([LIBMP3SPLT_WITH_SONAME], "libmp3splt0", [libmp3splt library with soname]) 58 59################################################################# 60# Check for functions 61################################################################# 62 63AC_CHECK_FUNCS([getline]) 64 65################################################################# 66# Check for the type of the host 67################################################################# 68 69AM_CONDITIONAL(WIN32,false) 70AC_MSG_CHECKING(the host) 71case $host in 72 *linux*) 73 HOST="Linux-based system" 74 ;; 75 *openbsd*) 76 HOST="OpenBSD" 77 ;; 78 *netbsd*) 79 HOST="NetBSD" 80 ;; 81 *freebsd*) 82 HOST="FreeBSD" 83 ;; 84 *mingw*) 85 HOST="Mingw" 86 AM_CONDITIONAL(WIN32,true) 87 ;; 88 *solaris*) 89 HOST="Solaris" 90 LIBS="$LIBS -lsocket" 91 ;; 92 *) 93 HOST="Other" 94 LIBS="$LIBS" 95 ;; 96esac 97AC_MSG_RESULT($HOST) 98 99################################################# 100#Check for libmp3splt 101 102PKG_CHECK_MODULES([LIBMP3SPLT], [libmp3splt = minimum_libmp3splt_version], 103[], 104[ AC_MSG_ERROR(libmp3splt version minimum_libmp3splt_version needed : 105 106Download the latest version of libmp3splt at http://mp3splt.sourceforge.net/ 107) ]) 108 109################################################# 110#Check for --enable-oggsplt_symlink 111 112AC_ARG_ENABLE(oggsplt_symlink, 113AC_HELP_STRING([--enable-oggsplt_symlink], [Enable symlink of oggsplt to mp3splt. ]), 114[enable_ogg_symlink=$enableval],[enable_ogg_symlink="no"]) 115 116if test "x$enable_ogg_symlink" = xyes;then 117 AM_CONDITIONAL(DO_OGG_SYMLINK, true) 118else 119 AM_CONDITIONAL(DO_OGG_SYMLINK, false) 120fi 121 122################################################# 123#Check for --enable-flacsplt_symlink 124 125AC_ARG_ENABLE(flacsplt_symlink, 126AC_HELP_STRING([--enable-flacsplt_symlink], [Enable symlink of flacsplt to mp3splt. ]), 127[enable_flac_symlink=$enableval],[enable_flac_symlink="no"]) 128 129if test "x$enable_flac_symlink" = xyes;then 130 AM_CONDITIONAL(DO_FLAC_SYMLINK, true) 131else 132 AM_CONDITIONAL(DO_FLAC_SYMLINK, false) 133fi 134 135 136################################################################# 137# Check for some debugging, warnings and optimise options 138################################################################# 139 140AC_ARG_ENABLE(c-debug, [AC_HELP_STRING([--enable-c-debug],[ Enable debugging symbols. ]) ], 141 [enable_c_debug=$enableval],[enable_c_debug="no"]) 142if test "x$enable_c_debug" = xyes;then 143 CFLAGS="$CFLAGS -g -Wall" 144fi 145 146AC_ARG_ENABLE(optimise, [AC_HELP_STRING([--enable-optimise],[ Enable O3 optimise. ]) ], 147 [enable_optimise=$enableval],[enable_optimise="no"]) 148if test "x$enable_optimise" = xyes;then 149 CFLAGS="$CFLAGS -O3" 150fi 151 152AC_ARG_ENABLE(extra-warnings, [AC_HELP_STRING([--enable-extra-warnings],[ Enable extra warnings. ]) ], 153 [enable_extra_warnings=$enableval],[enable_extra_warnings="no"]) 154if test "x$enable_extra_warnings" = xyes;then 155 CFLAGS="$CFLAGS -Wall -Wextra -Wswitch-enum -Wswitch-default -Wfloat-equal -Wbad-function-cast -Wcast-qual -Wunreachable-code" 156fi 157 158################################################# 159# Generate Makefiles 160################################################# 161 162AC_OUTPUT(Makefile src/Makefile po/Makefile.in doc/Makefile) 163 164################################################# 165# Output configuration 166################################################# 167 168echo 169echo "---------------------------------------------------------" 170echo "Configuration:" 171echo 172echo " install path: ${prefix}" 173echo " oggsplt symlink: ${enable_ogg_symlink}" 174echo " flacsplt symlink: ${enable_flac_symlink}" 175echo 176echo "---------------------------------------------------------" 177echo 178 179