2008-03-03 08:22:58 +01:00
|
|
|
AC_PREREQ(2.57)
|
|
|
|
|
|
|
|
###################
|
|
|
|
# Required packages
|
|
|
|
###################
|
2009-09-03 09:10:57 +02:00
|
|
|
m4_define([curl_required_version], [7.18.2])
|
2012-02-20 19:22:20 +01:00
|
|
|
m4_define([ffms2_required_version], [2.16])
|
2011-12-22 22:25:49 +01:00
|
|
|
m4_define([fftw3_required_version], [3.3])
|
2008-03-03 08:22:58 +01:00
|
|
|
m4_define([fontconfig_required_version], [2.4])
|
2008-12-27 10:32:47 +01:00
|
|
|
m4_define([freetype_required_version], [9.7.0])
|
2011-12-22 22:25:49 +01:00
|
|
|
m4_define([hunspell_required_version], [1.2.0])
|
2011-12-22 22:22:13 +01:00
|
|
|
m4_define([libass_required_version], [0.9.7])
|
2011-12-22 22:25:49 +01:00
|
|
|
m4_define([libpulse_required_version], [0.5])
|
2011-12-22 22:22:13 +01:00
|
|
|
m4_define([lua_auto4_required_version], [5.1])
|
2008-12-27 10:32:47 +01:00
|
|
|
m4_define([pkgconfig_required_version], [0.20])
|
2011-12-22 22:22:13 +01:00
|
|
|
m4_define([portaudio_required_version], [19])
|
2012-04-27 21:07:57 +02:00
|
|
|
m4_define([wx_required_version], [2.9.3])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
#######
|
|
|
|
# Setup
|
|
|
|
#######
|
|
|
|
AC_INIT([Aegisub], [aegisub_version],, [aegisub])
|
2011-12-22 22:21:20 +01:00
|
|
|
: ${CFLAGS=""}
|
|
|
|
: ${CXXFLAGS=""}
|
2009-03-09 01:58:38 +01:00
|
|
|
AC_CONFIG_SRCDIR([src/main.cpp])
|
2009-01-04 07:31:48 +01:00
|
|
|
AC_CONFIG_HEADER([acconf.h])
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_GNU_SOURCE
|
|
|
|
AC_CANONICAL_HOST
|
2008-12-31 06:07:58 +01:00
|
|
|
|
2008-03-27 00:58:39 +01:00
|
|
|
###########################
|
2011-12-22 22:23:35 +01:00
|
|
|
# Check host architecture
|
2008-03-27 00:58:39 +01:00
|
|
|
###########################
|
2010-12-05 20:12:42 +01:00
|
|
|
build_darwin="no"
|
|
|
|
build_linux="no"
|
2011-12-24 01:36:19 +01:00
|
|
|
build_bsd="no"
|
2010-12-05 20:12:42 +01:00
|
|
|
build_default="no"
|
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_CASE([$host],
|
2012-08-19 23:33:50 +02:00
|
|
|
[*-*-darwin*], [build_darwin="yes"],
|
2011-12-22 22:24:01 +01:00
|
|
|
[*-*-linux*], [build_linux="yes"],
|
2011-12-24 01:36:19 +01:00
|
|
|
[*-*-*bsd*], [build_bsd="yes"],
|
2011-12-22 22:24:01 +01:00
|
|
|
[build_default="yes"])
|
|
|
|
|
2009-02-10 22:25:32 +01:00
|
|
|
# Used for universalchardet.
|
2011-12-22 22:23:35 +01:00
|
|
|
AC_AGI_MDCPUCFG($host)
|
2008-12-17 04:52:33 +01:00
|
|
|
|
2011-12-24 01:36:19 +01:00
|
|
|
AC_SUBST(build_bsd)
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(build_linux)
|
|
|
|
AC_SUBST(build_darwin)
|
|
|
|
AC_SUBST(build_default)
|
2008-03-27 00:58:39 +01:00
|
|
|
|
2009-02-10 22:25:32 +01:00
|
|
|
# Handle endianess.
|
2008-07-04 02:41:28 +02:00
|
|
|
AC_C_BIGENDIAN(
|
2011-12-22 22:21:03 +01:00
|
|
|
AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian]),
|
|
|
|
AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian]),
|
|
|
|
AC_DEFINE([HAVE_DYNAMIC_ENDIAN], [1], [Unknown endian]),
|
|
|
|
AC_DEFINE([HAVE_UNIVERSAL_ENDIAN], [1], [Universal Endian (MAC Universal PPC/Intel Binaries, uses HAVE_DYNAMIC_ENDIAN)])
|
2008-07-04 02:41:28 +02:00
|
|
|
)
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
########################
|
|
|
|
# Configurable variables
|
|
|
|
########################
|
2009-01-29 04:52:47 +01:00
|
|
|
# Name of aegisub binary.
|
2012-08-19 23:33:50 +02:00
|
|
|
# On OS X everything goes in an app bundle so no point in versioning the executable
|
|
|
|
AS_IF([test x$build_darwin = xyes],
|
|
|
|
[AEGISUB_COMMAND="aegisub"],
|
|
|
|
[AEGISUB_COMMAND="aegisub-3.0"])
|
2009-01-06 11:44:49 +01:00
|
|
|
AC_SUBST(AEGISUB_COMMAND)
|
2012-08-19 23:33:50 +02:00
|
|
|
AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegisub executable])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-29 04:52:47 +01:00
|
|
|
# Handle location of desktop files: http://freedesktop.org/wiki/Specifications/desktop-entry-spec
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(desktop-dir,
|
|
|
|
AS_HELP_STRING([--with-desktop-dir=PATH],[desktop file locations [PREFIX/share/applications]]))
|
|
|
|
|
2011-12-22 22:21:20 +01:00
|
|
|
P_DESKTOP=${with_desktop_dir:-$datarootdir/applications}
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(P_DESKTOP)
|
|
|
|
|
|
|
|
# Handle location of icons: http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(icon-dir,
|
|
|
|
AS_HELP_STRING([--with-icon-dir=PATH],[icon locations [PREFIX/share/icons]]))
|
|
|
|
|
2011-12-22 22:21:20 +01:00
|
|
|
P_ICON=${with_icon_dir:-$datarootdir/icons}
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(P_ICON)
|
2009-01-06 11:44:49 +01:00
|
|
|
|
2009-01-29 04:52:47 +01:00
|
|
|
# Install prefix
|
2009-01-06 11:44:49 +01:00
|
|
|
# If a user doesn't supply --prefix then it is set to NONE so we
|
|
|
|
# set it to $ac_default_prefix if it hasn't been supplied.
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_CASE([x$prefix], [xNONE | x], [prefix="$ac_default_prefix"], [])
|
2009-01-04 05:38:32 +01:00
|
|
|
|
2009-01-01 13:58:47 +01:00
|
|
|
# Install prefix used by wxStandardPaths::SetInstallPrefix.
|
|
|
|
AC_DEFINE_UNQUOTED([INSTALL_PREFIX], ["$prefix"], [Default install prefix, or --prefix.])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-29 04:52:47 +01:00
|
|
|
# Build credit
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(build-credit,
|
|
|
|
AS_HELP_STRING([--with-build-credit=NAME],[Build credit shown in the program title.]),
|
|
|
|
[use_build_credit="yes"])
|
|
|
|
|
2009-01-02 10:13:22 +01:00
|
|
|
AC_MSG_CHECKING([whether BUILD_CREDIT has been set])
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$use_build_credit = xyes],
|
|
|
|
AS_IF([test x$with_build_credit = xyes || test -z "$with_build_credit"], [
|
2009-01-02 10:13:22 +01:00
|
|
|
AC_MSG_FAILURE([You must set a value eg --with-build-credit=<username>])
|
2011-12-22 22:24:01 +01:00
|
|
|
], [
|
2009-01-02 10:13:22 +01:00
|
|
|
AC_MSG_RESULT([yes ($with_build_credit)])
|
|
|
|
AC_DEFINE_UNQUOTED([BUILD_CREDIT], ["$with_build_credit"], [Build credit supplied in application title using --with-build-credit=])
|
2011-12-22 22:24:01 +01:00
|
|
|
]),
|
|
|
|
[AC_MSG_RESULT([no])])
|
2009-01-02 10:13:22 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
####################
|
|
|
|
# Check for programs
|
|
|
|
####################
|
|
|
|
CHECK_GNU_MAKE
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_LANG(C++)
|
2009-07-19 20:33:08 +02:00
|
|
|
AM_PROG_CC_C_O
|
2010-12-05 20:12:42 +01:00
|
|
|
# This is reported to be required on Ubuntu, I haven't had time to check.
|
2009-07-11 05:45:03 +02:00
|
|
|
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_PROG_INSTALL
|
2009-12-25 05:31:59 +01:00
|
|
|
AC_PROG_RANLIB
|
2008-12-27 10:32:47 +01:00
|
|
|
PKG_PROG_PKG_CONFIG([pkgconfig_required_version])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-03-04 17:59:01 +01:00
|
|
|
#################
|
|
|
|
# Developers only
|
|
|
|
#################
|
2012-08-19 23:05:38 +02:00
|
|
|
AC_MSG_CHECKING([for version])
|
|
|
|
. $srcdir/build/version.sh "$srcdir/.."
|
|
|
|
AC_MSG_RESULT([$BUILD_GIT_VERSION_STRING $VERSION_SOURCE])
|
2010-01-21 01:29:26 +01:00
|
|
|
|
2008-12-31 06:07:58 +01:00
|
|
|
AC_MSG_CHECKING([for build date])
|
|
|
|
BUILD_DATE=`date "+%Y-%m-%d %H:%M %Z"`
|
|
|
|
AC_MSG_RESULT($BUILD_DATE)
|
|
|
|
|
2012-08-19 23:05:38 +02:00
|
|
|
AC_SUBST([BUILD_GIT_VERSION_STRING])
|
|
|
|
AC_SUBST([BUILD_DATE])
|
2008-12-31 06:07:58 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
###################################################
|
|
|
|
# Check for pthreads and setup variables / compiler
|
|
|
|
###################################################
|
2009-09-05 21:53:18 +02:00
|
|
|
ACX_PTHREAD([], [AC_MSG_FAILURE([You must have working pthreads.])])
|
2011-12-22 22:24:01 +01:00
|
|
|
CC="$PTHREAD_CC"
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
######################
|
|
|
|
# Check compiler flags
|
|
|
|
######################
|
2011-12-22 22:24:01 +01:00
|
|
|
AC_ARG_ENABLE(compiler-flags, AS_HELP_STRING([--disable-compiler-flags],[Disable *all* additional compiler flags. [no]]))
|
2009-02-10 21:50:28 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_compiler_flags != xno], [
|
2009-02-10 21:50:28 +01:00
|
|
|
AC_C_FLAG([-Wall])
|
|
|
|
AC_C_FLAG([-Wextra],[AC_C_FLAG([-W])])
|
|
|
|
AC_C_FLAG([-Wno-unused-parameter])
|
|
|
|
AC_C_FLAG([-std=gnu99])
|
2009-02-14 20:08:44 +01:00
|
|
|
AC_C_FLAG([-pipe])
|
2012-01-08 02:04:05 +01:00
|
|
|
AC_C_FLAG([-g])
|
2009-02-10 21:50:28 +01:00
|
|
|
AC_CXX_FLAG([-Wall])
|
|
|
|
AC_CXX_FLAG([-Wextra],[AC_CXX_FLAG([-W])])
|
|
|
|
AC_CXX_FLAG([-Wno-unused-parameter])
|
|
|
|
AC_CXX_FLAG([-Wno-long-long])
|
|
|
|
AC_CXX_FLAG([-fno-strict-aliasing])
|
2009-02-14 20:08:44 +01:00
|
|
|
AC_CXX_FLAG([-pipe])
|
2012-01-08 02:04:05 +01:00
|
|
|
AC_CXX_FLAG([-g])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-02-14 20:05:40 +01:00
|
|
|
# -O* messes with debugging.
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_debug = xyes], [
|
|
|
|
AC_C_FLAG([-O0])
|
|
|
|
AC_CXX_FLAG([-O0])
|
|
|
|
], [
|
|
|
|
AC_C_FLAG([-O2])
|
|
|
|
AC_CXX_FLAG([-O2])
|
|
|
|
])
|
|
|
|
])
|
2009-02-11 17:50:16 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
######################################
|
|
|
|
# Check Headers / Features / Libraries
|
|
|
|
######################################
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_VOLATILE
|
|
|
|
AC_CHECK_LIB([m], [main])
|
2008-10-28 03:18:14 +01:00
|
|
|
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_AGI_COMPILE([pragma once], [pragma_once], [], [],[
|
|
|
|
#pragma once
|
|
|
|
int main(void) {}
|
|
|
|
])
|
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$agi_cv_pragma_once = xno],
|
|
|
|
[AC_MSG_FAILURE([Aegisub requires #pragma once to work correctly.])])
|
2010-12-05 20:12:42 +01:00
|
|
|
|
2011-12-22 22:19:41 +01:00
|
|
|
AC_CHECK_HEADER([wchar.h],,[AC_MSG_FAILURE([aegisub requires wide character support])])
|
|
|
|
|
2010-06-16 09:49:35 +02:00
|
|
|
AC_CHECK_HEADERS([sys/time.h])
|
|
|
|
|
2008-03-21 22:01:03 +01:00
|
|
|
##############################
|
|
|
|
# Program Support and Features
|
|
|
|
##############################
|
2011-12-22 22:24:40 +01:00
|
|
|
#########################
|
|
|
|
### Required Dependencies
|
|
|
|
#########################
|
|
|
|
|
2011-12-22 22:21:03 +01:00
|
|
|
AC_PATH_XTRA
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$no_x = xyes && test x$build_darwin != xyes],
|
|
|
|
[AC_MSG_FAILURE([You must have a working copy of X installed.])])
|
2011-12-22 22:21:03 +01:00
|
|
|
|
2008-03-21 22:01:03 +01:00
|
|
|
AX_CHECK_GL
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$no_gl = xyes], [AC_MSG_FAILURE([Aegisub requires GL support.])])
|
2008-03-21 22:01:03 +01:00
|
|
|
AC_SUBST(GL_CFLAGS)
|
|
|
|
AC_SUBST(GL_LIBS)
|
|
|
|
|
2009-09-03 08:53:55 +02:00
|
|
|
PKG_CHECK_MODULES(LIBCURL, libcurl >= curl_required_version,,
|
|
|
|
[AC_MSG_FAILURE([aegisub requires >= cURL curl_required_version])])
|
|
|
|
|
2008-12-27 10:32:47 +01:00
|
|
|
PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version,
|
2011-12-22 22:20:15 +01:00
|
|
|
AC_DEFINE(WITH_FREETYPE2, 1, [Enable FreeType 2 support.]),
|
|
|
|
[AC_MSG_FAILURE([Aegisub requires >= FreeType2 freetype_required_version])])
|
2008-03-23 00:10:55 +01:00
|
|
|
|
2011-12-22 22:20:15 +01:00
|
|
|
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version,
|
|
|
|
[AC_DEFINE(WITH_FONTCONFIG, 1, [Enable FontConfig support.])],
|
|
|
|
[AC_MSG_FAILURE([Aegisub requires fontconfig >= fontconfig_required_version])])
|
2009-01-29 05:15:25 +01:00
|
|
|
|
2008-04-11 17:17:00 +02:00
|
|
|
########
|
|
|
|
## iconv
|
|
|
|
########
|
2011-12-22 22:21:20 +01:00
|
|
|
AC_ARG_VAR([ICONV_CFLAGS], [CFLAGS to use for iconv []])
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_ARG_VAR([ICONV_LIBS], [LIBS to use for iconv [-liconv]])
|
|
|
|
|
|
|
|
AS_IF([test -z "$ICONV_LIBS"], AC_SEARCH_LIBS([iconv_open], [iconv]))
|
2008-04-11 17:17:00 +02:00
|
|
|
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_AGI_COMPILE([iconv], [iconv], [$ICONV_CFLAGS], [$ICONV_LIBS],[
|
2008-04-11 17:17:00 +02:00
|
|
|
#include <iconv.h>
|
|
|
|
int main(void) {
|
|
|
|
iconv_t ic;
|
|
|
|
ic = iconv_open ("UTF-8", "UTF-8");
|
|
|
|
if (!ic) return 1;
|
|
|
|
return 0;
|
|
|
|
} ])
|
|
|
|
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_SUBST(ICONV_LIBS)
|
2008-04-11 17:17:00 +02:00
|
|
|
AC_SUBST(ICONV_CFLAGS)
|
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$agi_cv_with_iconv = xno], [AC_MSG_FAILURE([Please install a working iconv library.])])
|
2011-01-09 02:37:34 +01:00
|
|
|
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_AGI_COMPILE([iconv (const)], [iconv_const], [$ICONV_CFLAGS], [$ICONV_LIBS],[
|
2010-06-06 04:40:29 +02:00
|
|
|
#include <iconv.h>
|
|
|
|
int main(void) {
|
2010-06-06 05:24:01 +02:00
|
|
|
iconv_t cd = iconv_open("UTF-16", "UTF-8");
|
|
|
|
const char *in = "in";
|
|
|
|
char *out = new char();
|
|
|
|
size_t res, inbytesleft, outbytesleft;
|
|
|
|
res = iconv(cd, &in, &inbytesleft, &out, &outbytesleft);
|
2010-06-06 04:40:29 +02:00
|
|
|
return 0;
|
|
|
|
} ])
|
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$agi_cv_with_iconv_const = xyes],
|
|
|
|
[AC_DEFINE(AGI_ICONV_CONST, 1, [Enable if iconv expects the in argument to be const])])
|
2010-06-06 04:40:29 +02:00
|
|
|
|
2008-06-29 20:56:46 +02:00
|
|
|
###############
|
|
|
|
# Audio Players
|
|
|
|
###############
|
2008-03-13 04:25:29 +01:00
|
|
|
#######
|
|
|
|
## ALSA
|
|
|
|
#######
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(alsa,
|
2011-12-22 22:22:05 +01:00
|
|
|
AS_HELP_STRING([--without-alsa],
|
2011-12-22 22:25:49 +01:00
|
|
|
[build without ALSA audio player [auto]]))
|
2009-04-12 12:28:42 +02:00
|
|
|
|
2011-12-22 22:21:20 +01:00
|
|
|
AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA []])
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_ARG_VAR([ALSA_LIBS], [LIBS to use for ALSA [-lasound -lrt]])
|
2009-04-12 12:28:42 +02:00
|
|
|
|
2011-12-22 22:24:40 +01:00
|
|
|
ALSA_LIBS=${ALSA_LIBS:--lasound -lrt}
|
2009-04-12 12:28:42 +02:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$with_alsa = xno],
|
|
|
|
[alsa_disabled="(disabled)"],
|
2011-12-22 22:24:40 +01:00
|
|
|
[AC_CHECK_LIB([asound], [snd_pcm_open], [with_alsa="yes"], [with_alsa="no"], $ALSA_LIBS)])
|
2009-01-15 02:02:57 +01:00
|
|
|
|
2011-12-22 22:24:10 +01:00
|
|
|
AS_IF([test x$with_alsa = xyes], AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support]))
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:21:20 +01:00
|
|
|
AC_SUBST(ALSA_CFLAGS)
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_SUBST(ALSA_LIBS)
|
2011-12-22 22:21:20 +01:00
|
|
|
AC_SUBST(with_alsa)
|
2009-01-15 02:02:57 +01:00
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
#########
|
|
|
|
## OpenAL
|
|
|
|
#########
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(openal,
|
2011-12-22 22:22:05 +01:00
|
|
|
AS_HELP_STRING([--without-openal],
|
2011-12-22 22:25:49 +01:00
|
|
|
[build without OpenAL audio player [auto]]))
|
2010-12-05 20:12:42 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$build_darwin = xyes], [
|
2010-12-05 20:12:42 +01:00
|
|
|
OPENAL_LIBS="-framework OpenAL"
|
|
|
|
OPENAL_CFLAGS=""
|
|
|
|
AC_SUBST(OPENAL_LIBS)
|
|
|
|
AC_SUBST(OPENAL_CFLAGS)
|
|
|
|
with_openal="yes"
|
2011-12-22 22:24:01 +01:00
|
|
|
],
|
|
|
|
[test x$with_openal = xno], [openal_disabled="(disabled)"],
|
|
|
|
[PKG_CHECK_MODULES(OPENAL, openal >= 0.0.8, [with_openal=yes], [with_openal=no])])
|
2008-03-24 00:37:57 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$with_openal != xno], [
|
2009-01-14 05:58:35 +01:00
|
|
|
AC_AGI_COMPILE([OpenAL], [openal], [$OPENAL_CFLAGS], [$OPENAL_LIBS],[
|
2008-03-24 00:37:57 +01:00
|
|
|
#if defined(__APPLE__)
|
|
|
|
#include <OpenAL/AL.h>
|
|
|
|
#include <OpenAL/ALC.h>
|
|
|
|
#else
|
|
|
|
#include <AL/al.h>
|
|
|
|
#include <AL/alc.h>
|
|
|
|
#endif
|
|
|
|
int main(void) {
|
|
|
|
ALCdevice *device = alcOpenDevice(0);
|
|
|
|
if (!device) return 1;
|
|
|
|
ALCcontext *context = alcCreateContext(device, 0);
|
|
|
|
if (!context) return 1;
|
|
|
|
return 0;
|
2009-01-14 05:58:35 +01:00
|
|
|
} ])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2008-03-24 00:37:57 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$agi_cv_with_openal = xno && test x$with_openal = xyes], [
|
|
|
|
AC_MSG_WARN([OpenAL detected, but it doesn''t work...])
|
2008-03-24 00:37:57 +01:00
|
|
|
with_openal="no"
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2009-01-28 22:58:53 +01:00
|
|
|
|
2011-12-22 22:24:10 +01:00
|
|
|
AS_IF([test x$agi_cv_with_openal = xyes && test x$with_openal = xyes],
|
|
|
|
AC_DEFINE(WITH_OPENAL, 1, [Enable OpenAL support]))
|
2008-03-04 01:59:02 +01:00
|
|
|
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(with_openal)
|
2008-03-07 16:45:12 +01:00
|
|
|
|
2009-09-09 00:06:07 +02:00
|
|
|
######
|
|
|
|
## OSS
|
|
|
|
######
|
2011-12-22 22:24:51 +01:00
|
|
|
AC_ARG_VAR([OSS_CFLAGS], [CFLAGS to use for OSS [auto]])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(oss,
|
2011-12-22 22:22:05 +01:00
|
|
|
AS_HELP_STRING([--without-oss],
|
2011-12-22 22:25:49 +01:00
|
|
|
[build without OSS audio player [auto]]))
|
2011-12-22 22:20:24 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$with_oss = xno], [oss_disabled="(disabled)"], [
|
2011-12-22 22:24:51 +01:00
|
|
|
AS_IF([test -z "$OSS_CFLAGS" && test -f "/etc/oss.conf"], [
|
2009-09-09 00:06:07 +02:00
|
|
|
. /etc/oss.conf
|
2011-12-22 22:24:51 +01:00
|
|
|
OSS_CFLAGS="-I${OSSLIBDIR}/include/sys"
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2010-06-12 07:48:02 +02:00
|
|
|
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [with_oss="yes"], [with_oss="no"])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2009-09-09 00:06:07 +02:00
|
|
|
|
2011-12-22 22:24:10 +01:00
|
|
|
AS_IF([test x$with_oss = xyes], AC_DEFINE(WITH_OSS, 1, [Enable OSS support]))
|
2009-09-09 00:06:07 +02:00
|
|
|
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(with_oss)
|
2009-09-09 00:06:07 +02:00
|
|
|
|
2011-12-07 00:48:18 +01:00
|
|
|
###################
|
2011-12-22 22:25:49 +01:00
|
|
|
# Simple pkg-config stuff
|
2008-03-03 08:22:58 +01:00
|
|
|
###################
|
2011-12-22 22:25:49 +01:00
|
|
|
AGI_OPT_PKG(libpulse, [build without PulseAudio audio player [auto]], [Enable PulseAudio support])
|
|
|
|
AGI_OPT_PKG(portaudio-2.0, [build without PortAudio v19 audio player [auto]], [Enable PortAudio v19 support])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:25:49 +01:00
|
|
|
AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 support])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:25:49 +01:00
|
|
|
AGI_OPT_PKG(libass, [build without libass subtitle provider [auto]], [Enable libass support])
|
2008-03-23 16:54:33 +01:00
|
|
|
|
2011-12-22 22:25:49 +01:00
|
|
|
AGI_OPT_PKG(fftw3, [build without fftw support [auto]], [Enable fftw support])
|
|
|
|
AGI_OPT_PKG(hunspell, [build without hunspell spell-checking [auto]], [Enable Hunspell support])
|
2008-04-25 04:28:05 +02:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
############
|
|
|
|
# Automation
|
|
|
|
############
|
2008-04-01 03:56:49 +02:00
|
|
|
AC_ARG_WITH(lua,
|
2011-12-22 22:22:05 +01:00
|
|
|
AS_HELP_STRING([--without-lua],
|
|
|
|
[build without lua 5.1 (auto4)]))
|
2008-04-01 03:56:49 +02:00
|
|
|
|
2011-12-22 22:26:39 +01:00
|
|
|
AS_IF([test x$with_lua = xno], [$with_auto4_lua="no"; lua_disabled="(disabled)"], [
|
|
|
|
# First try pkg-config with several names
|
|
|
|
PKG_CHECK_MODULES(LUA, lua >= 5.1, [with_auto4_lua="yes"], [
|
|
|
|
PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [with_auto4_lua="yes"], [
|
|
|
|
PKG_CHECK_MODULES(LUA, lua-5.1 >= 5.1, [with_auto4_lua="yes"], [
|
|
|
|
# Still not found so try to autodetect
|
|
|
|
AS_IF([test -z "$LUA_CFLAGS"],
|
|
|
|
[AGI_FIND_HEADER([LUA], [lua.hpp],
|
|
|
|
[/usr/include/lua5.1 /usr/include/lua51 /usr/local/include/lua51 /usr/local/include/lua5.1 /usr/include /usr/local/include])])
|
|
|
|
|
|
|
|
AS_IF([test -z "$LUA_LIBS"],
|
|
|
|
[AGI_FIND_LIB([LUA], [lua51 lua-5.1 lua5.1 lua], [])])
|
|
|
|
|
|
|
|
AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [$LUA_LIBS],[
|
2009-10-09 16:43:14 +02:00
|
|
|
#include <lua.hpp>
|
|
|
|
|
2008-03-20 22:24:01 +01:00
|
|
|
int main () {
|
|
|
|
lua_State *L = luaL_newstate();
|
|
|
|
lua_pushstring(L, "test");
|
|
|
|
int res = lua_objlen(L, -1) == 4;
|
|
|
|
lua_close(L);
|
|
|
|
return !res;
|
2011-12-22 22:26:39 +01:00
|
|
|
}])
|
|
|
|
AS_IF([test x$agi_cv_with_lua = xno && test x$with_lua = xyes],
|
|
|
|
[AC_MSG_FAILURE([--with-lua was specified, but lua could not be found. Try setting LUA_CLFAGS and LUA_LIBS manually])])
|
|
|
|
with_auto4_lua=$agi_cv_with_lua
|
|
|
|
])])])
|
|
|
|
])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$with_auto4_lua = xyes], AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires lua]))
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(with_auto4_lua)
|
2008-03-31 21:28:56 +02:00
|
|
|
AC_SUBST(LUA_CFLAGS)
|
2011-12-22 22:26:39 +01:00
|
|
|
AC_SUBST(LUA_LIBS)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2012-01-08 02:05:01 +01:00
|
|
|
######################################################
|
|
|
|
# Debugging support
|
|
|
|
######################################################
|
|
|
|
AC_MSG_CHECKING([whether to turn on debugging])
|
|
|
|
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[enable debugging [no]]))
|
|
|
|
AC_MSG_RESULT([${enable_debug:=no}])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to use exception handling in debug mode])
|
|
|
|
AC_ARG_ENABLE(debug-exceptions, AS_HELP_STRING([--enable-debug-exceptions],[enable exception handling in debug mode [no]]))
|
|
|
|
AC_MSG_RESULT([${enabled_debug_exceptions:=no}])
|
|
|
|
|
|
|
|
AS_IF([test x$enable_debug_exceptions = xyes],
|
|
|
|
[AC_DEFINE(WITH_EXCEPTIONS, 1,
|
|
|
|
[Enable exception handling in debug mode. (--enable-debug) This is always enabled when debug mode is off.])])
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
################
|
|
|
|
# Widget support
|
|
|
|
################
|
2009-07-23 22:20:03 +02:00
|
|
|
WX_CONFIG_OPTIONS
|
|
|
|
WX_STANDARD_OPTIONS([debug])
|
|
|
|
WX_DEBUG=$DEBUG
|
|
|
|
WX_UNICODE=$UNICODE
|
|
|
|
WX_CONFIG_CHECK([wx_required_version],,,[std,gl,stc],[$WXCONFIG_FLAGS])
|
2012-05-14 15:21:58 +02:00
|
|
|
AC_SUBST(WX_CONFIG_PATH)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2012-05-13 02:57:50 +02:00
|
|
|
AS_IF([test x$WX_VERSION = x],
|
|
|
|
[AC_MSG_FAILURE([wxWidgets detection failed, please set --with-wx* or add the libraries to your LIBS, CXX/CFLAGS.])])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(slow-wx-checks,
|
|
|
|
AS_HELP_STRING([--disable-slow-wx-checks],[Disable slow-running checks for wx components.]))
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_slow_wx_checks != xno], [
|
2008-04-13 07:52:24 +02:00
|
|
|
AC_AGI_LINK([wxWidgets OpenGL support], [wxopengl], [wx/glcanvas.h], [$GL_CFLAGS $WX_CFLAGS], [$GL_LIBS $WX_LIBS],[
|
2008-03-25 01:24:39 +01:00
|
|
|
#include <wx/glcanvas.h>
|
|
|
|
int main(void) {
|
|
|
|
wxGLCanvas *canvas;
|
2008-07-13 20:42:48 +02:00
|
|
|
wxGLContext *context;
|
2008-03-25 01:24:39 +01:00
|
|
|
return 0;
|
2008-04-13 07:52:24 +02:00
|
|
|
} ])
|
|
|
|
AC_AGI_LINK([wxWidgets StyledTextCtrl support], [wxstc], [wx/stc/stc.h], [$WX_CFLAGS], [$WX_LIBS],[
|
2008-03-25 01:24:39 +01:00
|
|
|
#include <wx/stc/stc.h>
|
|
|
|
int main(void) {
|
|
|
|
wxStyledTextCtrl *canvas;
|
|
|
|
return 0;
|
2008-04-13 07:52:24 +02:00
|
|
|
} ])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2011-12-06 22:59:10 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$with_agi_cv_wxopengl = xno], AC_MSG_FAILURE([wxWidgets OpenGL support missing]))
|
|
|
|
AS_IF([test x$with_agi_cv_wxstc = xno], AC_MSG_FAILURE([wxWidgets StyledTextCtrl support missing]))
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2012-01-08 02:05:01 +01:00
|
|
|
# This turns on some internal (to aegisub) debugging features.
|
|
|
|
# A debug version of wxWidgets is required.
|
|
|
|
AS_IF([test x$enable_debug = xyes],
|
|
|
|
[PACKAGE_DEBUG="-debug"
|
|
|
|
AS_IF([$WX_CONFIG_PATH --debug],[AC_CXX_FLAG([-D_DEBUG])])])
|
|
|
|
|
|
|
|
AC_SUBST(PACKAGE_DEBUG)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-08-06 06:35:35 +02:00
|
|
|
############################
|
|
|
|
# Precompiled Header Support
|
2011-12-22 22:24:01 +01:00
|
|
|
# Only works with gcc! (and clang)
|
2009-08-06 06:35:35 +02:00
|
|
|
############################
|
|
|
|
AC_MSG_CHECKING([whether to use precompiled headers])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(gcc-prec, AS_HELP_STRING([--disable-gcc-prec],[disable GCC precompiled headers]))
|
2012-01-10 20:10:00 +01:00
|
|
|
AC_MSG_RESULT([${enable_gcc_prec:=yes}])
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(enable_gcc_prec)
|
2012-06-23 19:22:08 +02:00
|
|
|
AC_PCH_FLAG([-Winvalid-pch])
|
|
|
|
AC_PCH_FLAG([-fpch-deps])
|
|
|
|
AC_PCH_FLAG([-fpch-preprocess])
|
2009-08-06 06:35:35 +02:00
|
|
|
|
2009-01-29 21:39:40 +01:00
|
|
|
###########
|
|
|
|
# Profiling
|
|
|
|
###########
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_VAR([PROFILE_FLAGS], [Profile flag(s) to use with --enable-profile [-pg]])
|
2009-01-29 21:39:40 +01:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on profiling])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(profile, AS_HELP_STRING([--enable-profile],[enable profiling [no]]))
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_profile = xyes], [
|
2011-12-22 22:21:20 +01:00
|
|
|
PROFILE_FLAGS=${PROFILE_FLAGS:--pg}
|
2009-01-29 21:39:40 +01:00
|
|
|
AC_MSG_RESULT([yes ($PROFILE_FLAGS)])
|
2011-12-22 22:21:20 +01:00
|
|
|
CFLAGS="$PROFILE_FLAGS $CFLAGS"
|
2011-12-22 22:24:01 +01:00
|
|
|
], [
|
2009-01-29 21:39:40 +01:00
|
|
|
enable_profile="no"
|
|
|
|
AC_MSG_RESULT([no])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2009-01-29 21:39:40 +01:00
|
|
|
|
|
|
|
|
2009-02-22 06:38:46 +01:00
|
|
|
######
|
|
|
|
# gcov
|
|
|
|
######
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_VAR([GCOV_CFLAGS], [gcov cflag(s) to use with --enable-gcov [-ftest-coverage -fprofile-arcs]])
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_ARG_VAR([GCOV_LIBS], [gcov ldflag(s) to use with --enable-gcov [-lgcov]])
|
2009-02-22 06:38:46 +01:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on gcov])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[enable gcov [no]]))
|
2009-02-22 23:01:14 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_gcov = xyes], [
|
2011-12-22 22:21:20 +01:00
|
|
|
GCOV_CFLAGS=${GCOV_CLFAGS:--fprofile-arcs -ftest-coverage}
|
2011-12-22 22:24:40 +01:00
|
|
|
GCOV_LIBS=${GCOV_LIBS:--lgcov}
|
2009-10-20 05:35:42 +02:00
|
|
|
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_MSG_RESULT([yes ($GCOV_CFLAGS) ($GCOV_LIBS)])
|
2009-10-20 05:35:42 +02:00
|
|
|
CFLAGS="$CFLAGS $GCOV_CFLAGS"
|
2011-12-22 22:24:40 +01:00
|
|
|
LIBS="$LIBS $GCOV_LIBS"
|
2011-12-22 22:24:01 +01:00
|
|
|
], [
|
2009-02-22 06:38:46 +01:00
|
|
|
enable_gcov="no"
|
|
|
|
AC_MSG_RESULT([no])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2009-02-22 06:38:46 +01:00
|
|
|
|
|
|
|
################
|
|
|
|
# Electric Fence
|
|
|
|
################
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_ARG_VAR([EFENCE_LIBS], [Electric Fence ldflag(s) to use with --enable-profile [-lefence]])
|
2009-02-22 06:38:46 +01:00
|
|
|
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_MSG_CHECKING([whether to turn on Electric Fence])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(efence, AS_HELP_STRING([--enable-efence],[enable Electric Fence [no]]))
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_efence = xyes], [
|
2011-12-22 22:24:40 +01:00
|
|
|
EFENCE_LIBS=${EFENCE_LIBS:--lefence}
|
|
|
|
AC_MSG_RESULT([yes ($EFENCE_LIBS)])
|
2011-12-22 22:24:01 +01:00
|
|
|
], [
|
2009-02-22 06:38:46 +01:00
|
|
|
enable_efence="no"
|
|
|
|
AC_MSG_RESULT([no])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2011-12-22 22:24:40 +01:00
|
|
|
AC_SUBST(EFENCE_LIBS)
|
2009-02-22 06:38:46 +01:00
|
|
|
|
|
|
|
##########
|
|
|
|
# ccmalloc
|
|
|
|
##########
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_VAR([CCMALLOC_LIBS], [ccmalloc libs(s) to use with --enable-ccmalloc [$prefix/lib/ccmalloc-c++.o]])
|
|
|
|
AC_ARG_VAR([CCMALLOC_LDFLAGS], [ccmalloc ldflag(s) to use with --enable-ccmalloc [-lccmalloc]])
|
2009-02-22 06:38:46 +01:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on ccmalloc])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(ccmalloc, AS_HELP_STRING([--enable-ccmalloc],[enable ccmalloc [no]]))
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_ccmalloc = xyes], [
|
2011-12-22 22:21:20 +01:00
|
|
|
CCMALLOC_LIBS=${CCMALLOC_LIBS:-$prefix/lib/ccmalloc-c++.o}
|
|
|
|
CCMALLOC_LDFLAGS=${CCMALLOC_LDFLAGS:--lccmalloc}
|
2009-02-22 06:38:46 +01:00
|
|
|
AC_MSG_RESULT([yes ($CCMALLOC_LIBS $CCMALLOC_LDFLAGS)])
|
2011-12-22 22:24:01 +01:00
|
|
|
], [
|
2009-02-22 06:38:46 +01:00
|
|
|
enable_ccmalloc="no"
|
|
|
|
AC_MSG_RESULT([no])
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_SUBST(CCMALLOC_LDFLAGS)
|
|
|
|
AC_SUBST(CCMALLOC_LIBS)
|
2009-02-22 06:38:46 +01:00
|
|
|
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test x$enable_efence = xyes && test x$enable_ccmalloc = xyes],
|
|
|
|
[AC_MSG_FAILURE([Please enable Electric Fence _or_ ccmalloc otherwise strange things will happen.])])
|
2009-02-22 06:38:46 +01:00
|
|
|
|
2010-12-05 20:12:42 +01:00
|
|
|
########
|
|
|
|
# ccache
|
|
|
|
########
|
|
|
|
AC_MSG_CHECKING([whether to enable ccache])
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_ENABLE(ccache, AS_HELP_STRING([--enable-ccache],[enable ccache [no]]))
|
2011-12-22 22:24:01 +01:00
|
|
|
AC_MSG_RESULT(${enable_ccache:=no})
|
2010-12-05 20:12:42 +01:00
|
|
|
AC_SUBST(enable_ccache)
|
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
##############################
|
|
|
|
# Internationalisation support
|
|
|
|
##############################
|
2010-12-05 20:12:42 +01:00
|
|
|
AM_GNU_GETTEXT([external])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2012-06-21 04:09:40 +02:00
|
|
|
################
|
|
|
|
# Update checker
|
|
|
|
################
|
|
|
|
AC_MSG_CHECKING([whether to enable the update checker])
|
|
|
|
AC_ARG_ENABLE(update-checker,
|
|
|
|
AS_HELP_STRING([--disable-update-checker], [disable the update checker [no]]))
|
|
|
|
AC_MSG_RESULT(${enable_update_checker:=yes})
|
|
|
|
AS_IF([test "x$enable_update_checker" != "xno"],
|
|
|
|
[AC_DEFINE([WITH_UPDATE_CHECKER], [],
|
|
|
|
[Whether to enable the update checker])])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for update checker server])
|
|
|
|
AC_ARG_WITH(update-server,
|
|
|
|
AS_HELP_STRING([--with-update-server=HOSTNAME],
|
|
|
|
[Server to use for the update checker
|
|
|
|
[updates.aegisub.org]]))
|
|
|
|
AC_MSG_RESULT(${with_update_server:=updates.aegisub.org})
|
|
|
|
AC_DEFINE_UNQUOTED([UPDATE_CHECKER_SERVER], ["$with_update_server"],
|
|
|
|
[Server for the update checker])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for update checker base URL])
|
|
|
|
AC_ARG_WITH(update-url,
|
|
|
|
AS_HELP_STRING([--with-update-url=HOSTNAME],
|
|
|
|
[Base path to use for the update checker [/trunk]]))
|
|
|
|
AC_MSG_RESULT(${with_update_url:=/trunk})
|
|
|
|
AC_DEFINE_UNQUOTED([UPDATE_CHECKER_BASE_URL], ["$with_update_url"],
|
|
|
|
[Base path for the update checker])
|
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
####################################################################
|
|
|
|
# Default settings for Providers/Players
|
|
|
|
# * This is done at the end to preserve sanity rather than littering
|
2009-01-06 04:48:36 +01:00
|
|
|
# it above.
|
2009-01-05 12:07:14 +01:00
|
|
|
####################################################################
|
2011-12-22 22:20:24 +01:00
|
|
|
AC_ARG_WITH(player-audio,
|
2012-04-06 03:55:22 +02:00
|
|
|
AS_HELP_STRING([--with-player-audio=(ALSA|OpenAL|PortAudio|PulseAudio|OSS)],
|
2011-12-22 22:20:24 +01:00
|
|
|
[Default Audio Player [Linux/ALSA, Darwin/OpenAL, 1:*/OSS, 2:*/PortAudio]]))
|
2009-01-05 12:07:14 +01:00
|
|
|
|
|
|
|
# Default audio player.
|
2011-12-22 22:24:01 +01:00
|
|
|
AS_IF([test -z "$with_player_audio"], [
|
2012-04-06 03:55:22 +02:00
|
|
|
AS_IF([test x$build_linux = xyes && test x$with_alsa = xyes], [DEFAULT_PLAYER_AUDIO="ALSA"],
|
|
|
|
[test x$build_darwin = xyes && test x$with_openal = xyes], [DEFAULT_PLAYER_AUDIO="OpenAL"],
|
|
|
|
[test x$with_portaudio = xyes], [DEFAULT_PLAYER_AUDIO="PortAudio"],
|
|
|
|
[test x$with_oss = xyes], [DEFAULT_PLAYER_AUDIO="OSS"],
|
|
|
|
[test x$with_alsa = xyes], [DEFAULT_PLAYER_AUDIO="ALSA"],
|
|
|
|
[test x$with_openal = xyes], [DEFAULT_PLAYER_AUDIO="OpenAL"],
|
|
|
|
[test x$with_libpulse = xyes], [DEFAULT_PLAYER_AUDIO="PulseAudio"])],
|
|
|
|
[DEFAULT_PLAYER_AUDIO="$with_player_audio"])
|
|
|
|
AC_SUBST(DEFAULT_PLAYER_AUDIO)
|
2009-01-05 12:07:14 +01:00
|
|
|
|
2010-06-12 07:48:02 +02:00
|
|
|
# Set some friendly strings if some of the above aren't detected.
|
2012-04-06 03:55:22 +02:00
|
|
|
DEFAULT_PLAYER_AUDIO=${DEFAULT_PLAYER_AUDIO:-NONE}
|
2010-06-12 07:48:02 +02:00
|
|
|
|
2009-04-12 12:48:20 +02:00
|
|
|
###############
|
2011-12-22 22:21:20 +01:00
|
|
|
# Misc settings
|
2009-04-12 12:48:20 +02:00
|
|
|
###############
|
2008-12-31 06:52:52 +01:00
|
|
|
# Files that need substitution.
|
|
|
|
AC_CONFIG_FILES([
|
2009-01-07 06:27:16 +01:00
|
|
|
desktop/aegisub.desktop
|
2012-04-06 03:55:22 +02:00
|
|
|
src/libresrc/default_config_platform.json
|
2009-07-25 11:35:44 +02:00
|
|
|
tools/osx-bundle.sed
|
2010-12-05 20:12:42 +01:00
|
|
|
Makefile.inc
|
2008-12-31 06:52:52 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2012-04-06 03:55:22 +02:00
|
|
|
AS_IF([test x"$DEFAULT_PLAYER_AUDIO" = xNONE], AC_MSG_NOTICE([
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
***********************************************************************
|
|
|
|
* No supported audio player interface was found on your system.
|
|
|
|
* If you want audio support in Aegisub you need to install one of
|
|
|
|
* these libraries:
|
|
|
|
* - PulseAudio
|
|
|
|
* * http://pulseaudio.org/
|
2011-11-30 00:18:07 +01:00
|
|
|
* - ALSA (Linux only)
|
2008-03-03 08:22:58 +01:00
|
|
|
* * http://www.alsa-project.org/
|
2011-11-30 00:18:07 +01:00
|
|
|
* - PortAudio (version 19 only)
|
2008-03-03 08:22:58 +01:00
|
|
|
* * http://www.portaudio.com/
|
|
|
|
***********************************************************************
|
2011-12-22 22:24:01 +01:00
|
|
|
]))
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2011-12-22 22:25:49 +01:00
|
|
|
AS_IF([test x$with_ffms2 != xyes], [AC_MSG_NOTICE([
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
***********************************************************************
|
|
|
|
* No supported video/audio reader interface was found on your system.
|
|
|
|
* You will not be able to open any video or audio files in Aegisub
|
|
|
|
* unless you install a supported video/audio provider.
|
|
|
|
* You will however still be able to open "dummy" video, ie. a blank,
|
|
|
|
* virtual video clip with subtitles overlaid.
|
|
|
|
* Currently we only support one video/audio provider on non-Windows
|
|
|
|
* systems:
|
2011-07-16 05:36:28 +02:00
|
|
|
* - FFMS2
|
|
|
|
* * http://code.google.com/p/ffmpegsource/
|
2008-03-03 08:22:58 +01:00
|
|
|
***********************************************************************
|
2011-12-22 22:24:01 +01:00
|
|
|
])])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
2009-01-05 12:07:14 +01:00
|
|
|
Configure settings
|
2009-01-04 05:48:55 +01:00
|
|
|
Install prefix: $prefix
|
2012-08-19 23:05:38 +02:00
|
|
|
Revision: $BUILD_GIT_VERSION_STRING
|
2012-01-08 02:04:05 +01:00
|
|
|
Debug $enable_debug
|
2011-12-22 22:21:20 +01:00
|
|
|
CFLAGS $CFLAGS
|
2009-01-29 21:47:49 +01:00
|
|
|
CXXFLAGS $CXXFLAGS
|
2009-01-04 05:48:55 +01:00
|
|
|
CPPFLAGS $CPPFLAGS
|
|
|
|
LDFLAGS $LDFLAGS
|
2011-12-22 22:24:40 +01:00
|
|
|
LIBS $LIBS
|
2009-01-04 05:48:55 +01:00
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
Default Settings
|
2012-04-06 03:55:22 +02:00
|
|
|
Audio Player: $DEFAULT_PLAYER_AUDIO
|
2009-01-05 12:07:14 +01:00
|
|
|
|
|
|
|
Scripting Engines
|
2010-12-05 20:12:42 +01:00
|
|
|
auto4 Lua: $with_auto4_lua $lua51_disabled
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
Audio Players
|
2008-03-03 08:22:58 +01:00
|
|
|
ALSA: $with_alsa $alsa_disabled
|
2008-03-04 01:59:02 +01:00
|
|
|
OpenAL: $with_openal $openal_disabled
|
2009-09-09 00:06:07 +02:00
|
|
|
OSS: $with_oss $oss_disabled
|
2008-03-03 08:22:58 +01:00
|
|
|
PortAudio: $with_portaudio $portaudio_disabled
|
2011-12-22 22:25:49 +01:00
|
|
|
PulseAudio: $with_libpulse $libpulse_disabled
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-06-10 04:09:00 +02:00
|
|
|
A/V Providers
|
2011-12-22 22:25:49 +01:00
|
|
|
FFMS2: $with_ffms2 $ffms2_disabled
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
Subtitle Providers:
|
2011-07-16 05:36:28 +02:00
|
|
|
libass $with_libass $libass_disabled
|
2008-03-23 23:56:21 +01:00
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
Misc Packages
|
2011-12-22 22:20:54 +01:00
|
|
|
Hunspell: $with_hunspell $hunspell_disabled
|
2011-12-22 22:25:49 +01:00
|
|
|
FFTW3: $with_fftw3 $fftw3_disabled
|
2011-12-22 22:24:01 +01:00
|
|
|
])
|