2008-03-03 08:22:58 +01:00
|
|
|
AC_PREREQ(2.57)
|
|
|
|
|
|
|
|
######################
|
2009-04-27 22:58:42 +02:00
|
|
|
# aegisub version info
|
2008-03-03 08:22:58 +01:00
|
|
|
######################
|
2008-12-16 03:17:29 +01:00
|
|
|
m4_define([aegisub_version_major], [2])
|
2009-07-14 20:15:11 +02:00
|
|
|
m4_define([aegisub_version_minor], [2])
|
|
|
|
m4_define([aegisub_version_revision], [0])
|
2008-12-16 03:17:29 +01:00
|
|
|
m4_define([aegisub_version], [aegisub_version_major.aegisub_version_minor.aegisub_version_revision-dev])
|
2009-01-06 11:44:49 +01:00
|
|
|
m4_define([aegisub_version_data], [aegisub_version_major.aegisub_version_minor])
|
2009-01-29 04:52:47 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
###################
|
|
|
|
# Required packages
|
|
|
|
###################
|
2009-06-09 22:47:28 +02:00
|
|
|
m4_define([libavcodec_required_version], [52.27.0]) # (r18642)
|
|
|
|
m4_define([libavformat_required_version], [52.32.0]) # (r18642)
|
|
|
|
m4_define([libavutil_required_version], [50.3.0]) # (r18642)
|
|
|
|
m4_define([libpostproc_required_version], [51.2.0]) # (r18642)
|
|
|
|
m4_define([libswscale_required_version], [0.7.1]) # (r18642)
|
2009-01-28 04:19:53 +01:00
|
|
|
|
2008-12-27 10:32:47 +01:00
|
|
|
m4_define([lua_auto4_required_version], [5.1])
|
2009-06-10 06:45:57 +02:00
|
|
|
m4_define([portaudio_required_version], [19])
|
2009-01-28 04:19:53 +01:00
|
|
|
m4_define([pulseaudio_required_version], [0.5])
|
2008-03-03 08:54:19 +01:00
|
|
|
|
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])
|
|
|
|
m4_define([pkgconfig_required_version], [0.20])
|
2009-07-23 22:20:03 +02:00
|
|
|
m4_define([wx_required_version], [2.9.0])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
#######
|
|
|
|
# Setup
|
|
|
|
#######
|
|
|
|
AC_INIT([Aegisub], [aegisub_version],, [aegisub])
|
2009-03-09 01:58:38 +01:00
|
|
|
AC_CONFIG_SRCDIR([src/main.cpp])
|
2008-03-03 08:22:58 +01:00
|
|
|
AM_INIT_AUTOMAKE
|
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
|
|
|
###########################
|
|
|
|
# Check target architecture
|
|
|
|
###########################
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([for target architecture])
|
|
|
|
case x"$target" in
|
|
|
|
xNONE | x)
|
|
|
|
target_or_host="$host" ;;
|
|
|
|
*)
|
|
|
|
target_or_host="$target" ;;
|
|
|
|
esac
|
|
|
|
AC_MSG_RESULT([$target_or_host])
|
|
|
|
|
|
|
|
case "$target_or_host" in
|
|
|
|
*-*-darwin*)
|
|
|
|
build_darwin="yes"
|
|
|
|
;;
|
|
|
|
|
2008-04-10 18:15:26 +02:00
|
|
|
*-*-linux*)
|
|
|
|
build_linux="yes"
|
|
|
|
;;
|
|
|
|
|
2008-03-27 00:58:39 +01:00
|
|
|
*)
|
2008-03-29 23:30:30 +01:00
|
|
|
build_default="yes"
|
2008-03-27 00:58:39 +01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-04-29 01:25:42 +02:00
|
|
|
case "$target_or_host" in
|
|
|
|
ppc-*-* | powerpc-*)
|
2009-04-29 02:49:38 +02:00
|
|
|
arch_ppc="yes"
|
2009-04-29 01:25:42 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
i*86-*-*)
|
2009-04-29 02:49:38 +02:00
|
|
|
arch_x86="yes"
|
2009-04-29 01:25:42 +02:00
|
|
|
;;
|
|
|
|
|
|
|
|
x86_64-*-*)
|
2009-04-29 02:49:38 +02:00
|
|
|
arch_x86="yes"
|
|
|
|
arch_x86_64="yes"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2009-04-29 01:25:42 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test "$build_darwin" = "yes"; then
|
|
|
|
if test "$arch_x86" = "yes"; then
|
|
|
|
DARWIN_ARCH="intel"
|
2009-04-29 02:49:38 +02:00
|
|
|
elif test "$arch_ppc" = "yes"; then
|
2009-04-29 01:25:42 +02:00
|
|
|
DARWIN_ARCH="ppc"
|
|
|
|
fi
|
|
|
|
AC_SUBST(DARWIN_ARCH)
|
|
|
|
fi
|
2009-02-17 07:37:39 +01:00
|
|
|
|
2009-02-10 22:25:32 +01:00
|
|
|
# Used for universalchardet.
|
2008-12-17 04:52:33 +01:00
|
|
|
AC_AGI_MDCPUCFG($target_or_host)
|
|
|
|
|
2009-02-10 22:25:32 +01:00
|
|
|
# For conditional file building and options in Makefile(s).
|
2008-03-27 00:58:39 +01:00
|
|
|
AM_CONDITIONAL([BUILD_DARWIN], [test "$build_darwin" = "yes"])
|
2008-03-29 23:30:30 +01:00
|
|
|
AM_CONDITIONAL([BUILD_DEFAULT], [test "$build_default" = "yes"])
|
|
|
|
|
2009-02-10 22:25:32 +01:00
|
|
|
# FontConfig is used on Darwin for the fontlister, freetype for !Windows case.
|
2008-04-13 19:44:54 +02:00
|
|
|
AM_CONDITIONAL([FONTLISTER_FONTCONFIG], [test "$build_darwin" != "yes"])
|
|
|
|
AM_CONDITIONAL([FONTLISTER_FREETYPE], [test "$build_darwin" = "yes"])
|
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(
|
|
|
|
AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian]),
|
|
|
|
AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian]),
|
|
|
|
AC_DEFINE([HAVE_DYNAMIC_ENDIAN], [1], [Unknown endian]),
|
2008-07-05 15:01:39 +02:00
|
|
|
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-06 11:44:49 +01:00
|
|
|
|
2009-01-29 22:32:39 +01:00
|
|
|
# These cannot be set before AC_INIT()
|
|
|
|
AEGISUB_VERSION_MAJOR=aegisub_version_major
|
|
|
|
AEGISUB_VERSION_MINOR=aegisub_version_minor
|
|
|
|
AEGISUB_VERSION=aegisub_version
|
2009-02-12 01:39:53 +01:00
|
|
|
# Used for gettext.
|
2009-01-29 22:32:39 +01:00
|
|
|
AEGISUB_VERSION_DATA=aegisub_version_data
|
|
|
|
|
2009-01-29 04:52:47 +01:00
|
|
|
# Suffix used for data paths.
|
2009-01-06 11:44:49 +01:00
|
|
|
AC_DEFINE_UNQUOTED(AEGISUB_VERSION_DATA, ["$AEGISUB_VERSION_DATA"], [Data path suffix.])
|
2009-01-07 09:48:33 +01:00
|
|
|
AC_SUBST(AEGISUB_VERSION_DATA)
|
2009-01-06 11:44:49 +01:00
|
|
|
|
2009-01-29 04:52:47 +01:00
|
|
|
# Shared data and Documents location.
|
2009-01-06 11:44:49 +01:00
|
|
|
aegisubdatadir="$datadir/$PACKAGE/aegisub_version_data"
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_SUBST(aegisubdatadir)
|
2009-01-29 04:52:47 +01:00
|
|
|
aegisubdocdir="$datadir/doc/$PACKAGE/aegisub_version_data"
|
2009-01-06 11:44:49 +01:00
|
|
|
AC_SUBST(aegisubdocdir)
|
2009-01-29 04:52:47 +01:00
|
|
|
|
|
|
|
# Name of aegisub binary.
|
|
|
|
AEGISUB_COMMAND="aegisub-$AEGISUB_VERSION_MAJOR.$AEGISUB_VERSION_MINOR"
|
2009-01-06 11:44:49 +01:00
|
|
|
AC_SUBST(AEGISUB_COMMAND)
|
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
|
2009-01-06 11:44:49 +01:00
|
|
|
AC_ARG_WITH(desktop-dir, [ --with-desktop-dir=PATH desktop file locations (default: PREFIX/share)])
|
2009-01-07 06:27:16 +01:00
|
|
|
if ! test -z "$with_desktop_dir" ; then
|
2009-01-06 11:44:49 +01:00
|
|
|
DESKTOP_DATADIR=$with_desktop_dir
|
|
|
|
else
|
|
|
|
DESKTOP_DATADIR="$datadir"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(DESKTOP_DATADIR, test "$with_desktop_dir" != "no")
|
|
|
|
AC_SUBST(DESKTOP_DATADIR)
|
|
|
|
|
|
|
|
|
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.
|
2009-01-04 05:38:32 +01:00
|
|
|
if test "$prefix" = "NONE"; then
|
|
|
|
prefix="$ac_default_prefix"
|
|
|
|
fi
|
|
|
|
|
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
|
2009-01-05 12:07:14 +01:00
|
|
|
AC_ARG_WITH(build-credit, [ --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])
|
|
|
|
if test "$use_build_credit" = "yes"; then
|
|
|
|
if test "$with_build_credit" = "yes" || test -z "$with_build_credit"; then
|
|
|
|
AC_MSG_FAILURE([You must set a value eg --with-build-credit=<username>])
|
|
|
|
else
|
|
|
|
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=])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
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
|
2009-07-11 05:45:03 +02:00
|
|
|
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_PROG_INSTALL
|
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
|
|
|
|
#################
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2009-01-02 09:48:13 +01:00
|
|
|
# XXX: This needs to be fixed to handle mixed revisions properly
|
2009-04-21 20:48:59 +02:00
|
|
|
# There is probably a better way to handle it as well...
|
2008-12-31 06:07:58 +01:00
|
|
|
AC_MSG_CHECKING([for svn version])
|
|
|
|
if test -d "$srcdir/.svn"; then
|
2009-01-02 09:48:13 +01:00
|
|
|
SVN_REVISION=`svnversion $srcdir | sed "s/\(^@<:@0-9@:>@*\).*/\1/"`
|
2009-01-29 04:56:23 +01:00
|
|
|
`echo $SVN_REVISION > $srcdir/svn_revision`
|
2008-12-31 06:52:52 +01:00
|
|
|
AC_MSG_RESULT([$SVN_REVISION from "svnversion $srcdir"])
|
|
|
|
elif test -f "$srcdir/svn_revision"; then
|
|
|
|
SVN_REVISION=`cat $srcdir/svn_revision`
|
|
|
|
AC_MSG_RESULT([$SVN_REVISION from "$srcdir/svn_revision"])
|
2008-12-31 06:07:58 +01:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT([not found])
|
2009-04-11 09:51:50 +02:00
|
|
|
AC_MSG_FAILURE([unable to get SVN Revision from $srcdir/svn_version or 'svnversion $srcdir'])
|
2008-03-06 02:16:07 +01:00
|
|
|
fi
|
2008-03-04 17:59:01 +01:00
|
|
|
|
2009-02-12 01:39:53 +01:00
|
|
|
# This is required in order for the config file to work correctly.
|
2009-01-02 09:48:13 +01:00
|
|
|
AC_DEFINE_UNQUOTED([BUILD_SVN_REVISION], [$SVN_REVISION], [SVN Revision number, used for config.dat and verison.cpp])
|
|
|
|
|
2009-02-12 01:39:53 +01:00
|
|
|
# Used on OSX and Unix for packing building.
|
2008-12-31 06:52:52 +01:00
|
|
|
PACKAGE_STRING="${PACKAGE_STRING}-r$SVN_REVISION"
|
|
|
|
PACKAGE_VERSION="${PACKAGE_VERSION}-r$SVN_REVISION"
|
|
|
|
VERSION="${VERSION}-r$SVN_REVISION"
|
2008-12-31 06:07:58 +01:00
|
|
|
|
2009-02-12 01:39:53 +01:00
|
|
|
# Used in version.cpp
|
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)
|
|
|
|
|
2008-12-31 06:52:52 +01:00
|
|
|
AC_SUBST(SVN_REVISION)
|
|
|
|
AC_SUBST(BUILD_DATE)
|
2008-12-31 06:07:58 +01:00
|
|
|
|
2008-03-04 17:59:01 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
###################################################
|
|
|
|
# Check for pthreads and setup variables / compiler
|
|
|
|
###################################################
|
|
|
|
ACX_PTHREAD([], [AC_MSG_FAILURE([aegisub requires pthreads])])
|
|
|
|
#LIBS="$PTHREAD_LIBS $LIBS";
|
|
|
|
#CFLAGS="$CFLAGS $PTHREAD_CFLAGS";
|
|
|
|
CC="$PTHREAD_CC";
|
|
|
|
|
|
|
|
|
|
|
|
######################
|
|
|
|
# Check compiler flags
|
|
|
|
######################
|
2009-02-10 21:50:28 +01:00
|
|
|
AC_ARG_ENABLE(compiler-flags, [ --disable-compiler-flags
|
|
|
|
Disable *all* additional compiler flags. (default=no)])
|
|
|
|
|
|
|
|
if test "$enable_compiler_flags" != "no"; then
|
|
|
|
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])
|
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([-fpermissive])
|
|
|
|
AC_CXX_FLAG([-fno-strict-aliasing])
|
2009-02-14 20:08:44 +01:00
|
|
|
AC_CXX_FLAG([-pipe])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-02-14 20:05:40 +01:00
|
|
|
# -O* messes with debugging.
|
|
|
|
if test "$enable_debug" != "yes"; then
|
|
|
|
AC_C_FLAG([-O2])
|
|
|
|
AC_CXX_FLAG([-O2])
|
|
|
|
fi
|
2009-02-11 17:50:16 +01:00
|
|
|
fi
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
######################################
|
|
|
|
# Check Headers / Features / Libraries
|
|
|
|
######################################
|
|
|
|
AC_PATH_XTRA
|
|
|
|
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
|
|
|
|
|
|
|
AC_CHECK_FUNC([strlcpy], [
|
|
|
|
AC_DEFINE([HAVE_STRLCPY], [1], [strlcpy() exists in the c library.])
|
|
|
|
], [])
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_LIBTOOL_DLOPEN_SELF
|
|
|
|
AC_MSG_CHECKING([[whether preprocessor supports #pragma once]])
|
|
|
|
AC_PREPROC_IFELSE(
|
|
|
|
[AC_LANG_PROGRAM([[#pragma once]])],
|
|
|
|
[
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE([HAVE_PRAGMA_ONCE], [1], [Preprocessor support for #pragma once])
|
|
|
|
],
|
|
|
|
[AC_MSG_RESULT([no])])
|
|
|
|
|
2008-03-06 19:18:09 +01:00
|
|
|
AX_OPENMP([], [with_openmp="no"])
|
|
|
|
AM_CONDITIONAL([HAVE_OPENMP], [test "$with_openmp" != "no"])
|
|
|
|
AC_SUBST(OPENMP_CXXFLAGS)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
|
2008-03-21 22:01:03 +01:00
|
|
|
|
|
|
|
##############################
|
|
|
|
# Program Support and Features
|
|
|
|
##############################
|
2008-04-11 17:17:00 +02:00
|
|
|
#################
|
|
|
|
## Wide Character
|
|
|
|
#################
|
2008-03-21 22:01:03 +01:00
|
|
|
AC_CHECK_HEADER([wchar.h],,[AC_MSG_FAILURE([aegisub requires wide character support])])
|
|
|
|
|
2008-04-11 17:17:00 +02:00
|
|
|
|
|
|
|
#########
|
|
|
|
## OpenGL
|
|
|
|
#########
|
2008-03-21 22:01:03 +01:00
|
|
|
AX_CHECK_GL
|
|
|
|
if test ! "$GL_LIBS"; then
|
|
|
|
AC_MSG_FAILURE([aegisub requires GL support.])
|
|
|
|
fi
|
|
|
|
AC_SUBST(GL_CFLAGS)
|
|
|
|
AC_SUBST(GL_LIBS)
|
|
|
|
|
2009-04-27 22:58:42 +02:00
|
|
|
|
2008-03-22 20:43:23 +01:00
|
|
|
#XXX: This needs to be fixed for OSX.
|
|
|
|
AC_AGI_COMPILE([OpenGL], [opengl], [$GL_CFLAGS], [$GL_LIBS],[
|
|
|
|
int main(void) {
|
|
|
|
return 0;
|
|
|
|
}])
|
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_opengl" = "no"; then
|
2008-03-22 20:43:23 +01:00
|
|
|
AC_MSG_FAILURE([Please install a working OpenGL library.])
|
|
|
|
fi
|
|
|
|
|
2008-07-05 15:01:39 +02:00
|
|
|
AC_AGI_COMPILE([OpenGLU], [openglu], [$GL_CFLAGS], [$GL_LIBS -lGLU],[
|
|
|
|
#include <GL/glu.h>
|
|
|
|
int main(void) {
|
|
|
|
return 0;
|
|
|
|
}])
|
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_openglu" = "no" && test "$build_darwin" != "yes"; then
|
2008-07-05 15:01:39 +02:00
|
|
|
AC_MSG_FAILURE([Please install a working OpenGL GLU library.])
|
|
|
|
fi
|
2008-06-21 18:14:13 +02:00
|
|
|
|
2008-04-11 17:17:00 +02:00
|
|
|
|
|
|
|
###########
|
|
|
|
## Freetype
|
|
|
|
###########
|
2008-12-27 10:32:47 +01:00
|
|
|
PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version,
|
2008-03-21 22:01:03 +01:00
|
|
|
AC_DEFINE(WITH_FREETYPE2, 1, [Enable FreeType 2 support.]),
|
2008-12-27 10:32:47 +01:00
|
|
|
[AC_MSG_FAILURE([aegisub requires >= FreeType2 freetype_required_version])])
|
2008-03-21 22:01:03 +01:00
|
|
|
|
2008-03-23 00:10:55 +01:00
|
|
|
AC_AGI_COMPILE([Freetype], [freetype], [$FREETYPE_CFLAGS], [$FREETYPE_LIBS],[
|
|
|
|
#include <ft2build.h>
|
|
|
|
#include FT_FREETYPE_H
|
|
|
|
int main(void) {
|
|
|
|
FT_Library ft;
|
|
|
|
if (FT_Init_FreeType(&ft)) { return 1; }
|
2008-04-14 22:47:22 +02:00
|
|
|
return 0;
|
2008-03-23 00:10:55 +01:00
|
|
|
}])
|
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_freetype" = "no"; then
|
2008-03-23 00:10:55 +01:00
|
|
|
AC_MSG_FAILURE([Please install a working Freetype library.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2008-04-11 17:17:00 +02:00
|
|
|
#############
|
|
|
|
## Fontconfig
|
|
|
|
#############
|
2009-01-29 05:15:25 +01:00
|
|
|
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
|
2008-03-21 22:01:03 +01:00
|
|
|
|
2008-03-23 01:36:36 +01:00
|
|
|
AC_AGI_COMPILE([FontConfig], [fontconfig], [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS],[
|
|
|
|
#include <fontconfig/fontconfig.h>
|
|
|
|
int main(void) {
|
|
|
|
int fc = FcInit();
|
|
|
|
FcConfig* config;
|
|
|
|
config = FcConfigGetCurrent();
|
|
|
|
if ((!config) || (!fc)) { return 1;}
|
|
|
|
return 0;
|
|
|
|
}])
|
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_fontconfig" = "no"; then
|
2008-03-23 01:36:36 +01:00
|
|
|
AC_MSG_FAILURE([Please install a working Fontconfig library.])
|
|
|
|
fi
|
2008-03-21 22:01:03 +01:00
|
|
|
|
2009-02-03 06:28:39 +01:00
|
|
|
AC_DEFINE(WITH_FONTCONFIG, 1, [Enable FontConfig support.])
|
2009-01-29 05:15:25 +01:00
|
|
|
AC_SUBST(FONTCONFIG_CFLAGS)
|
|
|
|
AC_SUBST(FONTCONFIG_LIBS)
|
|
|
|
|
|
|
|
|
2008-03-21 22:01:03 +01:00
|
|
|
|
2008-04-11 17:17:00 +02:00
|
|
|
########
|
|
|
|
## iconv
|
|
|
|
########
|
|
|
|
AC_ARG_VAR([ICONV_CFLAGS], [CFLAGS to use for iconv (default: CPPFLAGS)])
|
|
|
|
AC_ARG_VAR([ICONV_LDFLAGS], [LDFLAGS to use for iconv (default: LDFLAGS -liconv)])
|
|
|
|
|
|
|
|
if test -z "$ICONV_LDFLAGS"; then
|
2008-04-11 18:13:08 +02:00
|
|
|
if test "$build_linux" = "yes"; then
|
2008-04-11 17:17:00 +02:00
|
|
|
ICONV_LDFLAGS="$LDFLAGS"
|
|
|
|
else
|
|
|
|
ICONV_LDFLAGS="$LDFLAGS -liconv";
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ICONV_CFLAGS"; then
|
|
|
|
ICONV_CFLAGS="$CPPFLAGS";
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_AGI_COMPILE([iconv], [iconv], [$ICONV_CFLAGS], [$ICONV_LDFLAGS],[
|
|
|
|
#include <iconv.h>
|
|
|
|
int main(void) {
|
|
|
|
iconv_t ic;
|
|
|
|
ic = iconv_open ("UTF-8", "UTF-8");
|
|
|
|
if (!ic) return 1;
|
|
|
|
return 0;
|
|
|
|
} ])
|
|
|
|
|
|
|
|
AC_SUBST(ICONV_LDFLAGS)
|
|
|
|
AC_SUBST(ICONV_CFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-06-29 20:56:46 +02:00
|
|
|
###############
|
|
|
|
# Audio Players
|
|
|
|
###############
|
2008-03-13 04:25:29 +01:00
|
|
|
#######
|
|
|
|
## ALSA
|
|
|
|
#######
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)], alsa_disabled="(disabled)")
|
2009-04-12 12:28:42 +02:00
|
|
|
|
|
|
|
AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA (default: CPPFLAGS)])
|
|
|
|
AC_ARG_VAR([ALSA_LDFLAGS], [LDFLAGS to use for ALSA (default: -lasound)])
|
|
|
|
|
|
|
|
if test -z "$ALSA_LDFLAGS"; then
|
|
|
|
ALSA_LDFLAGS="-lasound";
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$ALSA_CFLAGS"; then
|
|
|
|
ALSA_CFLAGS="$CPPFLAGS";
|
|
|
|
fi
|
|
|
|
|
2009-01-15 02:02:57 +01:00
|
|
|
if test "$with_alsa" != "no"; then
|
2009-04-12 12:28:42 +02:00
|
|
|
aegisub_save_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$ALSA_LDFLAGS"
|
2009-01-15 02:02:57 +01:00
|
|
|
AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LDFLAGS="-lasound"; with_alsa="yes"], [with_alsa="no"])
|
2009-04-12 12:28:42 +02:00
|
|
|
LDFLAGS="$aegisub_save_LDFLAGS"
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
2009-01-15 02:02:57 +01:00
|
|
|
|
|
|
|
if test "$with_alsa" != "no"; then
|
2008-03-03 08:54:19 +01:00
|
|
|
AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support])
|
2009-04-12 12:08:28 +02:00
|
|
|
found_audio_player="yes"
|
2008-03-03 08:54:19 +01:00
|
|
|
fi
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"])
|
2009-02-22 23:04:21 +01:00
|
|
|
AC_SUBST(ALSA_LDFLAGS)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-15 02:02:57 +01:00
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
############
|
|
|
|
## PortAudio
|
|
|
|
############
|
2009-01-12 01:20:47 +01:00
|
|
|
|
2009-06-10 06:45:57 +02:00
|
|
|
AC_ARG_WITH(portaudio,[ --without-portaudio build without PortAudio v19 audio provider.
|
|
|
|
(default: auto)], pulseaudio_disabled="(disabled)")
|
2009-01-12 01:20:47 +01:00
|
|
|
if test "$with_portaudio" != "no"; then
|
2009-06-10 06:45:57 +02:00
|
|
|
PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= portaudio_required_version, [with_portaudio="yes"], [with_portaudio="no"])
|
2009-01-12 01:20:47 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$with_portaudio" != "no"; then
|
2009-06-10 06:45:57 +02:00
|
|
|
AC_AGI_COMPILE([PortAudio], [portaudio], [$PORTAUDIO_CFLAGS], [$PORTAUDIO_LIBS],[
|
2008-03-23 23:23:59 +01:00
|
|
|
#include <portaudio.h>
|
|
|
|
int main(void) {
|
|
|
|
PaError err = Pa_Initialize();
|
|
|
|
if (err != paNoError) return 1;
|
|
|
|
return 0;
|
2009-01-12 01:20:47 +01:00
|
|
|
} ])
|
|
|
|
fi
|
2008-03-23 23:23:59 +01:00
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_portaudio" = "no" && test "$with_portaudio" = "yes"; then
|
2008-04-20 16:53:59 +02:00
|
|
|
AC_MSG_WARN([PortAudio detected, but it doesn't work...])
|
2008-03-23 23:23:59 +01:00
|
|
|
with_portaudio="no"
|
|
|
|
fi
|
|
|
|
|
2009-06-10 06:45:57 +02:00
|
|
|
if test "$agi_cv_with_portaudio" = "yes" && test "$with_portaudio" = "yes"; then
|
|
|
|
AC_DEFINE(WITH_PORTAUDIO, 1, [Enable PortAudio v19 support])
|
2009-04-12 12:08:28 +02:00
|
|
|
found_audio_player="yes"
|
2008-03-03 08:54:19 +01:00
|
|
|
fi
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
AM_CONDITIONAL([HAVE_PORTAUDIO], [test "$with_portaudio" != "no"])
|
|
|
|
|
2008-03-23 23:23:59 +01:00
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
#############
|
|
|
|
## PulseAudio
|
|
|
|
#############
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_ARG_WITH(pulseaudio,[ --without-pulseaudio build without PulseAudio audio provider.
|
|
|
|
(default: auto)], pulseaudio_disabled="(disabled)")
|
2009-01-13 10:43:24 +01:00
|
|
|
if test "$with_pulseaudio" != "no"; then
|
2009-01-28 04:19:53 +01:00
|
|
|
PKG_CHECK_MODULES(LIBPULSE, libpulse >= pulseaudio_required_version, [with_pulseaudio="yes"], [with_pulseaudio="no"])
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
2008-03-24 00:07:47 +01:00
|
|
|
|
2009-01-13 10:43:24 +01:00
|
|
|
if test "$with_pulseaudio" != "no"; then
|
|
|
|
AC_AGI_COMPILE([PuleseAudio], [pulseaudio], [$LIBPULSE_CFLAGS], [$LIBPULSE_LIBS],[
|
2008-03-24 00:07:47 +01:00
|
|
|
#include <pulse/pulseaudio.h>
|
|
|
|
int main(void) {
|
2009-01-13 10:43:24 +01:00
|
|
|
pa_threaded_mainloop *mainloop = pa_threaded_mainloop_new();
|
|
|
|
if (!mainloop) return 1;
|
|
|
|
return 0;
|
|
|
|
} ])
|
|
|
|
fi
|
2008-03-24 00:07:47 +01:00
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_pulseaudio" = "no" && test "$with_pulseaudio" = "yes"; then
|
2008-04-20 16:53:59 +02:00
|
|
|
AC_MSG_WARN([PulseAudio detected, but it doesn't work...])
|
2008-03-24 00:07:47 +01:00
|
|
|
with_pulseaudio="no"
|
2009-01-28 22:58:53 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$agi_cv_with_pulseaudio" = "yes" && test "$with_pulseaudio" = "yes"; then
|
2009-01-13 10:43:24 +01:00
|
|
|
AC_DEFINE(WITH_PULSEAUDIO, 1, [Enable PulseAudio support])
|
2009-04-12 12:08:28 +02:00
|
|
|
found_audio_player="yes"
|
2008-03-24 00:07:47 +01:00
|
|
|
fi
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
AM_CONDITIONAL([HAVE_PULSEAUDIO], [test "$with_pulseaudio" != "no"])
|
2009-01-13 10:43:24 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
#########
|
|
|
|
## OpenAL
|
|
|
|
#########
|
2008-03-11 08:24:10 +01:00
|
|
|
AC_ARG_WITH(openal,[ --without-openal build without OpenAL audio provider.
|
2008-03-04 01:59:02 +01:00
|
|
|
(default: auto)], openal_disabled="(disabled)")
|
2009-01-14 05:58:35 +01:00
|
|
|
if test "$with_openal" != "no"; then
|
|
|
|
PKG_CHECK_MODULES(OPENAL, openal >= 0.0.8, [with_openal=yes], [with_openal=no])
|
2008-03-04 01:59:02 +01:00
|
|
|
fi
|
2008-03-24 00:37:57 +01:00
|
|
|
|
2009-01-14 05:58:35 +01:00
|
|
|
if test "$with_openal" != "no"; then
|
|
|
|
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
|
|
|
} ])
|
|
|
|
fi
|
2008-03-24 00:37:57 +01:00
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_openal" = "no" && test "$with_openal" = "yes"; then
|
2008-04-20 16:53:59 +02:00
|
|
|
AC_MSG_WARN([OpenAL detected, but it doesn't work...])
|
2008-03-24 00:37:57 +01:00
|
|
|
with_openal="no"
|
2009-01-28 22:58:53 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "$agi_cv_with_openal" = "yes" && test "$with_openal" = "yes"; then
|
2009-04-12 12:08:28 +02:00
|
|
|
found_audio_player="yes"
|
2008-03-04 01:59:02 +01:00
|
|
|
AC_DEFINE(WITH_OPENAL, 1, [Enable OpenAL support])
|
|
|
|
fi
|
|
|
|
|
2009-01-14 05:58:35 +01:00
|
|
|
AM_CONDITIONAL([HAVE_OPENAL], [test "$with_openal" != "no"])
|
2008-03-07 16:45:12 +01:00
|
|
|
|
|
|
|
|
2008-10-28 03:18:14 +01:00
|
|
|
#########################
|
|
|
|
# Video / Audio Providers
|
|
|
|
#########################
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-01 13:47:20 +01:00
|
|
|
AC_ARG_WITH(ffmpeg, [ --without-ffmpeg build without FFMPEG support.
|
2009-01-05 12:07:14 +01:00
|
|
|
Disables FFMPEG and FFmpegSource A/V providers.
|
2009-01-28 19:22:01 +01:00
|
|
|
(default: auto)], [ffmpeg_disabled="(disabled)"; with_ffmpeg="no"])
|
2009-01-06 14:59:15 +01:00
|
|
|
|
2008-03-03 22:52:41 +01:00
|
|
|
if test "$with_ffmpeg" != "no"; then
|
2009-01-28 04:19:53 +01:00
|
|
|
PKG_CHECK_MODULES(LIBAVCODEC, libavcodec >= libavcodec_required_version, [], [with_ffmpeg="no"])
|
|
|
|
PKG_CHECK_MODULES(LIBAVFORMAT, libavformat >= libavformat_required_version, [], [with_ffmpeg="no"])
|
|
|
|
PKG_CHECK_MODULES(LIBSWSCALE, libswscale >= libswscale_required_version, [], [with_ffmpeg="no"])
|
2009-01-28 19:22:01 +01:00
|
|
|
PKG_CHECK_MODULES(LIBAVUTIL, libavutil >= libavutil_required_version, [], [with_ffmpeg="no"])
|
2009-01-28 04:19:53 +01:00
|
|
|
fi
|
2008-03-30 08:11:45 +02:00
|
|
|
|
2009-01-28 04:19:53 +01:00
|
|
|
if test "$with_ffmpeg" != "no" && test "$enable_old_ffmpeg" != "yes"; then
|
2009-01-28 19:22:01 +01:00
|
|
|
AC_AGI_COMPILE([FFMPEG], [ffmpeg], [$LIBSWSCALE_CFLAGS $LIBAVCODEC_CFLAGS $LIBAVFORMAT_CFLAGS $LIBAVUTIL_CFLAGS], [$LIBSWSCALE_LIBS $LIBAVCODEC_LIBS $LIBAVFORMAT_LIBS $LIBAVUTIL_LIBS],[
|
2009-01-28 04:19:53 +01:00
|
|
|
extern "C" {
|
|
|
|
#include <libavformat/avformat.h>
|
|
|
|
#include <libavcodec/avcodec.h>
|
|
|
|
#include <libswscale/swscale.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
int main (void) {
|
|
|
|
AVFormatContext *fc = NULL;
|
|
|
|
AVCodec *c = NULL;
|
|
|
|
SwsContext *swsc = NULL;
|
|
|
|
|
|
|
|
av_register_all();
|
|
|
|
fc = av_alloc_format_context();
|
|
|
|
if (fc == NULL) {
|
|
|
|
printf("avformat failure\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
av_free(fc);
|
|
|
|
|
|
|
|
avcodec_init();
|
|
|
|
avcodec_register_all();
|
|
|
|
c = avcodec_find_decoder(CODEC_ID_PCM_S16LE);
|
|
|
|
if (c == NULL) {
|
|
|
|
printf("avcodec failure\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
swsc = sws_getContext(704, 480, PIX_FMT_RGB32, 704, 480, PIX_FMT_YUV420P, SWS_BILINEAR, NULL, NULL, NULL);
|
|
|
|
if (swsc == NULL) {
|
|
|
|
printf("swscale failure\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
sws_freeContext(swsc);
|
2008-03-03 09:57:08 +01:00
|
|
|
|
2009-01-28 04:19:53 +01:00
|
|
|
return 0;
|
|
|
|
} ])
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
2008-03-03 09:57:08 +01:00
|
|
|
|
2009-01-29 00:17:02 +01:00
|
|
|
if test "$agi_cv_with_ffmpeg" = "no" && test "$with_ffmpeg" != "no"; then
|
2009-01-28 22:58:53 +01:00
|
|
|
AC_MSG_WARN([FFMPEG detected, but it doesn't work...])
|
|
|
|
with_ffmpeg="no"
|
|
|
|
fi
|
2008-10-28 03:18:14 +01:00
|
|
|
|
2009-01-29 00:17:02 +01:00
|
|
|
if test "$agi_cv_with_ffmpeg" = "yes" && test "$with_ffmpeg" != "no"; then
|
2009-01-28 22:58:53 +01:00
|
|
|
with_ffmpeg="yes"
|
|
|
|
fi
|
2009-01-28 04:19:53 +01:00
|
|
|
|
2009-01-28 19:22:01 +01:00
|
|
|
if test "$agi_cv_with_ffmpeg" = "no" || test "$with_ffmpeg" = "no"; then
|
2009-01-28 04:19:53 +01:00
|
|
|
ffmpegsource_provider_disabled="(disabled, requires FFMPEG)"
|
|
|
|
ffmpeg_provider_disabled="(disabled, requires FFMPEG)"
|
2009-01-28 19:22:01 +01:00
|
|
|
with_ffmpeg="no"
|
2009-01-28 04:19:53 +01:00
|
|
|
fi
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-28 22:58:53 +01:00
|
|
|
AM_CONDITIONAL([HAVE_FFMPEG], [test "$agi_cv_with_ffmpeg" = "yes"])
|
2009-02-22 23:04:21 +01:00
|
|
|
AC_SUBST(LIBAVFORMAT_LIBS)
|
|
|
|
AC_SUBST(LIBAVFORMAT_CFLAGS)
|
|
|
|
AC_SUBST(LIBAVCODEC_LIBS)
|
|
|
|
AC_SUBST(LIBAVCODEC_CFLAGS)
|
|
|
|
AC_SUBST(LIBSWSCALE_LIBS)
|
|
|
|
AC_SUBST(LIBSWSCALE_CFLAGS)
|
|
|
|
AC_SUBST(LIBAVUTIL_LIBS)
|
|
|
|
AC_SUBST(LIBAVUTIL_CFLAGS)
|
2009-01-28 22:58:53 +01:00
|
|
|
|
2009-01-01 13:47:20 +01:00
|
|
|
AC_ARG_WITH(provider-ffmpegsource, [ --without-provider-ffmpegsource
|
2009-01-05 12:07:14 +01:00
|
|
|
build without FFmpegSource A/V provider.
|
2009-01-28 04:19:53 +01:00
|
|
|
(default: auto)], ffmpegsource_provider_disabled="(disabled)", with_provider_ffmpegsource="yes")
|
|
|
|
|
|
|
|
if test "$agi_cv_with_ffmpeg" = "yes" && test "$with_provider_ffmpegsource" = "yes"; then
|
|
|
|
PKG_CHECK_MODULES(LIBPOSTPROC, libpostproc >= libpostproc_required_version, [], [with_libpostproc="no"])
|
|
|
|
|
|
|
|
AC_AGI_COMPILE([postproc], [postproc], [$LIBPOSTPROC_CFLAGS], [$LIBPOSTPROC_LIBS],[
|
|
|
|
extern "C" {
|
|
|
|
#include <libpostproc/postprocess.h>
|
|
|
|
}
|
2008-10-28 03:18:14 +01:00
|
|
|
|
2009-01-28 04:19:53 +01:00
|
|
|
int main (void) {
|
|
|
|
pp_context_t *PPContext = pp_get_context(704,480, 0);
|
2008-10-28 03:18:14 +01:00
|
|
|
|
2009-01-28 04:19:53 +01:00
|
|
|
if (!PPContext) return 1;
|
|
|
|
pp_free_context(PPContext);
|
|
|
|
return 0;
|
|
|
|
} ])
|
|
|
|
|
|
|
|
if test "$agi_cv_with_postproc" = "yes"; then
|
2008-10-28 03:18:14 +01:00
|
|
|
found_video_provider="yes"
|
|
|
|
AC_DEFINE(WITH_FFMPEGSOURCE, 1, [Enable FFmpegSource2 Video Provider])
|
2008-12-27 12:45:38 +01:00
|
|
|
else
|
|
|
|
with_provider_ffmpegsource="no"
|
2008-10-28 03:18:14 +01:00
|
|
|
fi
|
2009-01-28 04:19:53 +01:00
|
|
|
else
|
|
|
|
with_provider_ffmpegsource="no"
|
2008-10-28 03:18:14 +01:00
|
|
|
fi
|
|
|
|
|
2009-04-11 20:06:23 +02:00
|
|
|
AM_CONDITIONAL([HAVE_PROVIDER_FFMPEGSOURCE], [test "$with_provider_ffmpegsource" = "yes"])
|
2009-01-28 04:19:53 +01:00
|
|
|
AC_SUBST(LIBPOSTPROC_LIBS)
|
|
|
|
AC_SUBST(LIBPOSTPROC_CFLAGS)
|
2008-10-28 03:18:14 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
###################
|
|
|
|
# Subtitle Provider
|
|
|
|
###################
|
2008-03-13 04:25:29 +01:00
|
|
|
|
2008-03-23 23:56:21 +01:00
|
|
|
AC_ARG_ENABLE(libass, [ --disable-libass disable libass support (default=enabled)],libass_disabled="(disabled)")
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-03-23 23:56:21 +01:00
|
|
|
if test "$enable_libass" != "no"; then
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_iconv" = "yes"; then
|
2008-03-23 23:56:21 +01:00
|
|
|
LIBASS_LIBS="-L../libass -lass_aegisub"
|
|
|
|
LIBASS_CFLAGS="-I../libass"
|
|
|
|
with_libass="yes"
|
2008-03-21 22:01:03 +01:00
|
|
|
else
|
2008-03-23 23:56:21 +01:00
|
|
|
AC_MSG_WARN([libiconv is required for libass support.])
|
2008-03-22 08:33:57 +01:00
|
|
|
with_libass="no"
|
2008-03-21 22:01:03 +01:00
|
|
|
fi
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
|
|
|
|
2009-01-14 07:06:37 +01:00
|
|
|
if test "$with_libass" = "yes" || test "$enable_libass" != "no"; then
|
2008-03-03 08:54:19 +01:00
|
|
|
AC_DEFINE(WITH_LIBASS, 1, [Enable libass Subtitle Provider])
|
2008-04-01 20:49:01 +02:00
|
|
|
else
|
|
|
|
with_libass="no"
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
|
|
|
|
2009-02-22 23:04:21 +01:00
|
|
|
AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"])
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_SUBST(LIBASS_LIBS)
|
|
|
|
AC_SUBST(LIBASS_CFLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-12-16 02:59:38 +01:00
|
|
|
AC_ARG_ENABLE(csri, [ --disable-csri disable CSRI (ASA) support (default=enabled)], csri_disabled="(disabled)")
|
2008-04-13 07:10:27 +02:00
|
|
|
|
|
|
|
if test "$enable_csri" != "no"; then
|
|
|
|
PKG_CHECK_MODULES(CSRI, csri >= 0.1.0, with_csri="yes", with_csri="no")
|
2009-01-14 07:10:03 +01:00
|
|
|
PKG_CHECK_MODULES(ASA, asa >= 0.3.2, with_asa="yes", with_asa="no")
|
|
|
|
if test "$with_csri" = "yes" && test "$with_asa" = "yes"; then
|
2008-04-13 07:10:27 +02:00
|
|
|
AC_DEFINE(WITH_CSRI, 1, [Enable CSRI (ASA) Subtitle Provider])
|
|
|
|
fi
|
|
|
|
else
|
2008-12-16 02:59:38 +01:00
|
|
|
with_csri="no"
|
2008-04-13 07:10:27 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([WITH_CSRI], [test "$with_csri" = "yes"])
|
|
|
|
|
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
###########
|
|
|
|
## Hunspell
|
|
|
|
###########
|
2008-03-07 17:38:55 +01:00
|
|
|
AC_ARG_WITH(hunspell, [ --without-hunspell build without hunspell support (default: auto)], hunspell_disabled="(disabled)")
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-04-25 04:28:05 +02:00
|
|
|
if test "$with_hunspell" != "no"; then
|
2009-01-15 02:04:55 +01:00
|
|
|
PKG_CHECK_MODULES(HUNSPELL, hunspell >= 1.2.0, [with_hunspell="yes"], [with_hunspell="no"])
|
2008-04-25 04:28:05 +02:00
|
|
|
AC_AGI_COMPILE([Hunspell], [hunspell], [$HUNSPELL_CFLAGS], [$HUNSPELL_LIBS],[
|
2008-03-23 16:54:33 +01:00
|
|
|
#include <hunspell.hxx>
|
|
|
|
int main(void) {
|
|
|
|
Hunspell *hunspell;
|
2008-04-25 22:47:13 +02:00
|
|
|
hunspell = new Hunspell(".", ".");
|
2008-03-23 16:54:33 +01:00
|
|
|
if (!hunspell) return 1;
|
|
|
|
return 0;
|
2008-04-25 04:28:05 +02:00
|
|
|
} ])
|
|
|
|
fi
|
2008-03-23 16:54:33 +01:00
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_hunspell" = "no" && test "$with_hunspell" = "yes"; then
|
2008-04-20 16:53:59 +02:00
|
|
|
AC_MSG_WARN([Hunspell detected, but it doesn't work...])
|
2009-01-15 02:04:55 +01:00
|
|
|
with_hunspell="no"
|
2008-04-25 04:28:05 +02:00
|
|
|
fi
|
|
|
|
|
2009-01-28 22:58:53 +01:00
|
|
|
if test "$agi_cv_with_hunspell" = "yes" && test "$with_hunspell" = "yes"; then
|
2008-04-20 16:52:09 +02:00
|
|
|
AC_DEFINE(WITH_HUNSPELL, 1, [Enable Hunspell support.])
|
2008-03-23 16:54:33 +01:00
|
|
|
fi
|
|
|
|
|
2008-04-25 04:28:05 +02:00
|
|
|
AM_CONDITIONAL([HAVE_HUNSPELL], [test "$with_hunspell" != "no"])
|
|
|
|
|
2008-03-23 16:54:33 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
######################
|
|
|
|
## universalchardetect
|
|
|
|
######################
|
2008-03-30 17:37:12 +02:00
|
|
|
AC_ARG_ENABLE(univchardet, [ --disable-univchardet disble universalchardet support.], univchardet_disabled="(disabled)")
|
2008-03-20 23:24:28 +01:00
|
|
|
if test "$enable_univchardet" != "no"; then
|
2008-03-05 19:52:09 +01:00
|
|
|
with_univchardet="yes"
|
|
|
|
AC_DEFINE(WITH_UNIVCHARDET, 1, [Enable universalchardet support])
|
|
|
|
else
|
|
|
|
with_univchardet="no"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([HAVE_UNIVCHARDET], [test "$with_univchardet" != "no"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
############
|
|
|
|
# Automation
|
|
|
|
############
|
2008-03-13 04:25:29 +01:00
|
|
|
|
2008-04-01 03:56:49 +02:00
|
|
|
AC_ARG_WITH(lua,
|
2008-06-16 06:50:48 +02:00
|
|
|
[ --without-lua build without lua 5.1 (auto4)], [lua51_disabled="(disabled)"])
|
2008-04-01 03:56:49 +02:00
|
|
|
|
2008-03-20 22:24:01 +01:00
|
|
|
AC_ARG_VAR([LUA_CFLAGS], [CFLAGS to use for LUA 5.1 (default: CPPFLAGS)])
|
|
|
|
AC_ARG_VAR([LUA_LDFLAGS], [LDFLAGS to use for LUA 5.1 (default: -llua)])
|
2008-04-01 03:56:49 +02:00
|
|
|
|
2008-03-20 22:24:01 +01:00
|
|
|
if test -z "$LUA_LDFLAGS"; then
|
|
|
|
LUA_LDFLAGS="-llua";
|
|
|
|
fi
|
2008-03-13 08:35:39 +01:00
|
|
|
|
2008-04-01 03:56:49 +02:00
|
|
|
aegisub_save_LIBS="$LIBS"
|
|
|
|
LIBS="$LUA_LDFLAGS"
|
2008-03-03 22:52:41 +01:00
|
|
|
if test "$with_lua" != no; then
|
2008-04-01 03:56:49 +02:00
|
|
|
AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [],[
|
2008-03-20 22:24:01 +01:00
|
|
|
extern "C" {
|
|
|
|
#include <lua.h>
|
|
|
|
#include <lauxlib.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
int main () {
|
|
|
|
lua_State *L = luaL_newstate();
|
|
|
|
lua_pushstring(L, "test");
|
|
|
|
int res = lua_objlen(L, -1) == 4;
|
|
|
|
lua_close(L);
|
|
|
|
return !res;
|
2008-04-01 03:56:49 +02:00
|
|
|
}])
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
2008-04-01 03:56:49 +02:00
|
|
|
LIBS="$aegisub_save_LIBS"
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-12-16 03:03:01 +01:00
|
|
|
if test "$agi_cv_with_lua" = "yes"; then
|
2008-03-03 08:22:58 +01:00
|
|
|
with_auto4="yes"
|
2008-03-05 05:09:04 +01:00
|
|
|
with_automation="yes"
|
|
|
|
AC_DEFINE(WITH_AUTO4_LUA, 1, [Enable Automation (auto4), requires lua])
|
2008-03-03 08:22:58 +01:00
|
|
|
else
|
|
|
|
with_auto4="no"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([HAVE_AUTO4_LUA], [test "$with_auto4" != "no"])
|
2008-03-31 21:28:56 +02:00
|
|
|
AC_SUBST(LUA_CFLAGS)
|
|
|
|
AC_SUBST(LUA_LDFLAGS)
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
# Automation setup
|
2008-03-05 05:09:04 +01:00
|
|
|
if test "$with_automation" = "yes"; then
|
|
|
|
AC_DEFINE(WITH_AUTOMATION, 1, [Enable Automation support, requires any automation language.])
|
|
|
|
fi
|
2008-03-11 06:01:30 +01:00
|
|
|
AM_CONDITIONAL([HAVE_AUTOMATION], [test "$with_automation" = "yes"])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
|
2008-03-13 04:25:29 +01:00
|
|
|
|
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])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-15 02:14:41 +01:00
|
|
|
if test "$have_wxconfig" = "no"; then
|
|
|
|
AC_MSG_FAILURE([wxWidgets detection failed, please set --with-wx* or add the libraries to your LDFLAGS, CXX/CFLAGS.])
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
|
|
|
|
2009-01-01 13:43:17 +01:00
|
|
|
AC_ARG_ENABLE(check-wx-opengl, [ --disable-check-wx-opengl
|
|
|
|
Force wxwidgets OpenGL support. ])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-01 13:43:17 +01:00
|
|
|
if test "$enable_check_wx_opengl" != "no"; then
|
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
|
|
|
} ])
|
|
|
|
fi
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-15 02:14:41 +01:00
|
|
|
if test "$with_agi_cv_wxopengl" = "no" || test "$enable_check_wx_opengl" = "yes"; then
|
2008-03-25 01:24:39 +01:00
|
|
|
AC_MSG_FAILURE([wxWidgets OpenGL support missing])
|
2008-03-03 08:22:58 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2009-01-01 13:47:20 +01:00
|
|
|
AC_ARG_ENABLE(check-wx-stc, [ --disable-check-wx-stc Force wxwidgets StyledTextCtrl support.])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-01-01 13:43:17 +01:00
|
|
|
if test "$enable_check_wx_stc" != "no"; then
|
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
|
|
|
} ])
|
|
|
|
fi
|
2008-03-25 01:24:39 +01:00
|
|
|
|
2009-01-15 02:14:41 +01:00
|
|
|
if test "$with_agi_cv_wxstc" = "no" || test "$enable_check_wx_stc:" = "yes"; then
|
2008-03-25 01:24:39 +01:00
|
|
|
AC_MSG_FAILURE([wxWidgets StyledTextCtrl support missing])
|
|
|
|
fi
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
|
2009-01-01 13:32:58 +01:00
|
|
|
######################################################
|
|
|
|
# Debugging support
|
|
|
|
# This is added last so it doesn't slow down configure
|
|
|
|
# If you want it earlier add it to your CXXFLAGS.
|
|
|
|
######################################################
|
|
|
|
|
2009-01-29 21:39:40 +01:00
|
|
|
AC_ARG_VAR([DEBUG_FLAGS], [Debug flag to use with --enable-debug (default: -g)])
|
2009-01-01 13:32:58 +01:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on debugging])
|
2009-02-22 06:38:46 +01:00
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug enable debugging (default=no)])
|
2009-01-01 13:32:58 +01:00
|
|
|
if test "$enable_debug" = "yes"; then
|
2009-02-22 23:01:14 +01:00
|
|
|
if test -z "$DEBUG_FLAGS"; then
|
|
|
|
DEBUG_FLAGS="-g";
|
|
|
|
fi
|
|
|
|
|
2009-01-01 13:32:58 +01:00
|
|
|
AC_MSG_RESULT([yes ($DEBUG_FLAGS)])
|
|
|
|
CPPFLAGS="$DEBUG_FLAGS $CPPFLAGS"
|
2009-01-04 05:48:55 +01:00
|
|
|
msg_debug="($DEBUG_FLAGS)"
|
2009-02-17 10:08:27 +01:00
|
|
|
|
2009-02-17 03:27:31 +01:00
|
|
|
# This turns on some internal (to aegisub) debugging features.
|
2009-02-17 10:08:27 +01:00
|
|
|
# A debug version of wxWidgets is required.
|
|
|
|
if $WX_CONFIG_PATH --debug; then
|
|
|
|
AC_CXX_FLAG([-D_DEBUG])
|
|
|
|
fi
|
2009-01-01 13:32:58 +01:00
|
|
|
else
|
2009-01-04 05:48:55 +01:00
|
|
|
enable_debug="no"
|
2009-01-01 13:32:58 +01:00
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
2009-02-22 23:04:21 +01:00
|
|
|
AC_SUBST(DEBUG_FLAGS)
|
2009-01-01 13:32:58 +01:00
|
|
|
|
2009-02-17 07:37:39 +01:00
|
|
|
if test "$enable_debug" = "yes"; then
|
|
|
|
PACKAGE_DEBUG="-debug"
|
|
|
|
fi
|
2009-02-22 23:04:21 +01:00
|
|
|
AC_SUBST(PACKAGE_DEBUG)
|
2009-02-17 07:37:39 +01:00
|
|
|
|
2009-01-01 13:32:58 +01:00
|
|
|
|
2009-01-29 21:39:40 +01:00
|
|
|
###########
|
|
|
|
# Profiling
|
|
|
|
###########
|
|
|
|
|
2009-01-29 21:46:05 +01:00
|
|
|
AC_ARG_VAR([PROFILE_FLAGS], [Profile flag(s) to use with --enable-profile (default: -pg)])
|
2009-01-29 21:39:40 +01:00
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on profiling])
|
2009-02-22 06:38:46 +01:00
|
|
|
AC_ARG_ENABLE(profile, [ --enable-profile enable profiling (default=no)])
|
2009-01-29 21:46:05 +01:00
|
|
|
if test "$enable_profile" = "yes"; then
|
2009-02-22 23:01:14 +01:00
|
|
|
if test -z "$PROFILE_FLAGS"; then
|
|
|
|
PROFILE_FLAGS="-pg";
|
|
|
|
fi
|
2009-01-29 21:39:40 +01:00
|
|
|
AC_MSG_RESULT([yes ($PROFILE_FLAGS)])
|
|
|
|
CPPFLAGS="$PROFILE_FLAGS $CPPFLAGS"
|
|
|
|
else
|
|
|
|
enable_profile="no"
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2009-02-22 06:38:46 +01:00
|
|
|
######
|
|
|
|
# gcov
|
|
|
|
######
|
|
|
|
|
|
|
|
AC_ARG_VAR([GCOV_FLAGS], [gcov flag(s) to use with --enable-gcov (default: -ftest-coverage -fprofile-arcs)])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on gcov])
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_ARG_ENABLE(gcov, [ --enable-gcov enable gcov (default=no)])
|
|
|
|
|
2009-02-22 06:38:46 +01:00
|
|
|
if test "$enable_gcov" = "yes"; then
|
2009-02-22 23:01:14 +01:00
|
|
|
if test -z "$GCOV_FLAGS"; then
|
|
|
|
GCOV_FLAGS="-fprofile-arcs -ftest-coverage";
|
|
|
|
fi
|
2009-02-22 06:38:46 +01:00
|
|
|
AC_MSG_RESULT([yes ($GCOV_FLAGS)])
|
2009-02-22 23:01:14 +01:00
|
|
|
CFLAGS="$CFLAGS $GCOV_FLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $GCOV_FLAGS"
|
2009-02-22 06:38:46 +01:00
|
|
|
else
|
|
|
|
enable_gcov="no"
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
################
|
|
|
|
# Electric Fence
|
|
|
|
################
|
|
|
|
|
|
|
|
AC_ARG_VAR([EFENCE_LDFLAGS], [Electric Fence ldflag(s) to use with --enable-profile (default: -lefence)])
|
|
|
|
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_MSG_CHECKING([whether to turn on Electric Fence])
|
|
|
|
AC_ARG_ENABLE(efence, [ --enable-efence enable Electric Fence (default=no)])
|
2009-02-22 06:38:46 +01:00
|
|
|
if test "$enable_efence" = "yes"; then
|
2009-02-22 23:01:14 +01:00
|
|
|
if test -z "$EFENCE_LDFLAGS"; then
|
|
|
|
EFENCE_LDFLAGS="-lefence";
|
|
|
|
fi
|
2009-02-22 06:38:46 +01:00
|
|
|
AC_MSG_RESULT([yes ($EFENCE_LDFLAGS)])
|
|
|
|
else
|
|
|
|
enable_efence="no"
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_SUBST(EFENCE_LDFLAGS)
|
2009-02-22 06:38:46 +01:00
|
|
|
|
|
|
|
##########
|
|
|
|
# ccmalloc
|
|
|
|
##########
|
|
|
|
|
|
|
|
AC_ARG_VAR([CCMALLOC_LIBS], [ccmalloc libs(s) to use with --enable-ccmalloc (default: $prefix/lib/ccmalloc-c++.o)])
|
|
|
|
AC_ARG_VAR([CCMALLOC_LDFLAGS], [ccmalloc ldflag(s) to use with --enable-ccmalloc (default: -lccmalloc)])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether to turn on ccmalloc])
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_ARG_ENABLE(ccmalloc, [ --enable-ccmalloc enable ccmalloc (default=no)])
|
2009-02-22 06:38:46 +01:00
|
|
|
if test "$enable_ccmalloc" = "yes"; then
|
2009-02-22 23:01:14 +01:00
|
|
|
if test -z "$CCMALLOC_LIBS"; then
|
|
|
|
CCMALLOC_LIBS="$prefix/lib/ccmalloc-c++.o";
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$CCMALLOC_LDFLAGS"; then
|
|
|
|
CCMALLOC_LDFLAGS="-lccmalloc";
|
|
|
|
fi
|
2009-02-22 06:38:46 +01:00
|
|
|
AC_MSG_RESULT([yes ($CCMALLOC_LIBS $CCMALLOC_LDFLAGS)])
|
|
|
|
else
|
|
|
|
enable_ccmalloc="no"
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
fi
|
2009-02-22 23:01:14 +01:00
|
|
|
AC_SUBST(CCMALLOC_LDFLAGS)
|
|
|
|
AC_SUBST(CCMALLOC_LIBS)
|
2009-02-22 06:38:46 +01:00
|
|
|
|
|
|
|
if test "$enable_efence" = "yes" && test "$enable_ccmalloc" = "yes"; then
|
|
|
|
AC_MSG_FAILURE([Please enable Electric Fence _or_ ccmalloc otherwise strange things will happen.])
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
##############################
|
|
|
|
# Internationalisation support
|
|
|
|
##############################
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_PROG_INTLTOOL
|
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
|
2009-01-12 23:52:52 +01:00
|
|
|
if test "$build_darwin" = "yes"; then
|
|
|
|
GETTEXT_PACKAGE="aegisub"
|
|
|
|
else
|
|
|
|
GETTEXT_PACKAGE="aegisub${AEGISUB_VERSION_MAJOR}${AEGISUB_VERSION_MINOR}"
|
|
|
|
fi
|
2009-01-06 11:44:49 +01:00
|
|
|
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
|
2009-01-06 11:44:49 +01:00
|
|
|
[The basename for our gettext translation domains.])
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
|
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
|
|
|
####################################################################
|
|
|
|
|
|
|
|
AC_ARG_WITH(provider-video, [ --with-provider-video=(ffmpegsource|ffmpeg)
|
|
|
|
Default Video Provider. (default: ffmpegsource)])
|
|
|
|
AC_ARG_WITH(provider-audio, [ --with-provider-audio=(ffmpegsource|ffmpeg)
|
|
|
|
Default Audio Provider. (default: ffmpegsource)])
|
|
|
|
AC_ARG_WITH(player-audio, [ --with-player-audio=(alsa|openal|portaudio|pulseaudio)
|
|
|
|
Default Audio Player (default: Linux/ALSA,
|
|
|
|
Darwin/OpenAL, */PortAudio.])
|
|
|
|
|
|
|
|
# Default Video Provider.
|
2009-01-05 12:40:52 +01:00
|
|
|
if ! test -z "$with_provider_video"; then
|
2009-01-05 12:07:14 +01:00
|
|
|
default_provider_video="$with_provider_video"
|
|
|
|
else
|
|
|
|
if test "$with_provider_ffmpegsource" = "yes"; then
|
|
|
|
default_provider_video="ffmpegsource"
|
|
|
|
elif test "$with_provider_ffmpeg" = "yes"; then
|
|
|
|
default_provider_video="ffmpeg"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([DEFAULT_PROVIDER_VIDEO], ["$default_provider_video"], [Default Video Provider.])
|
|
|
|
|
|
|
|
|
|
|
|
# Default Audio Provider.
|
2009-01-05 12:40:52 +01:00
|
|
|
if ! test -z "$with_provider_audio"; then
|
2009-01-05 12:07:14 +01:00
|
|
|
default_provider_audio="$with_provider_audio"
|
|
|
|
else
|
|
|
|
if test "$with_provider_ffmpegsource" = "yes"; then
|
|
|
|
default_provider_audio="ffmpegsource"
|
|
|
|
elif test "$with_provider_ffmpeg" = "yes"; then
|
|
|
|
default_provider_audio="ffmpeg"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([DEFAULT_PROVIDER_AUDIO], ["$default_provider_audio"], [Default Video Provider.])
|
|
|
|
|
|
|
|
|
|
|
|
# Default Subtitle Provider.
|
2009-01-05 12:40:52 +01:00
|
|
|
if ! test -z "$with_provider_subtitle"; then
|
2009-01-05 12:07:14 +01:00
|
|
|
default_provider_subtitle="$with_provider_subtitle"
|
|
|
|
else
|
|
|
|
if test "$with_libass" = "yes"; then
|
|
|
|
default_provider_subtitle="libass"
|
|
|
|
elif test "$with_csri" = "yes"; then
|
|
|
|
default_provider_subtitle="csri"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([DEFAULT_PROVIDER_SUBTITLE], ["$default_provider_subtitle"], [Default Subtitle Provider.])
|
|
|
|
|
|
|
|
|
|
|
|
# Default audio player.
|
2009-01-05 12:40:52 +01:00
|
|
|
if ! test -z "$with_player_audio"; then
|
2009-01-05 12:07:14 +01:00
|
|
|
default_player_audio="$with_player_audio"
|
|
|
|
else
|
|
|
|
if test "$build_linux" = "yes" && test "$with_alsa" = "yes"; then
|
|
|
|
default_player_audio="alsa"
|
|
|
|
elif test "$build_darwin" = "yes" && test "$with_openal" = "yes"; then
|
|
|
|
default_player_audio="openal"
|
|
|
|
elif test "$with_portaudio" = "yes"; then
|
|
|
|
default_player_audio="portaudio"
|
|
|
|
elif test "$with_pulseaudio" = "yes"; then
|
|
|
|
default_player_audio="pulseaudio"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([DEFAULT_PLAYER_AUDIO], ["$default_player_audio"], [Default audio player.])
|
|
|
|
|
|
|
|
|
2009-04-12 12:48:20 +02:00
|
|
|
|
|
|
|
###############
|
|
|
|
# Misc settings
|
|
|
|
###############
|
|
|
|
AM_CONDITIONAL([FOUND_AUDIO_PLAYER], [test "$found_audio_player" = "yes"])
|
|
|
|
AM_CONDITIONAL([FOUND_VIDEO_PROVIDER], [test "$found_video_provider" = "yes"])
|
|
|
|
|
|
|
|
|
2008-12-31 06:52:52 +01:00
|
|
|
# Makefiles
|
|
|
|
AC_CONFIG_FILES([
|
2008-03-05 19:52:09 +01:00
|
|
|
Makefile
|
2009-03-09 01:58:38 +01:00
|
|
|
src/Makefile
|
|
|
|
src/bitmaps/Makefile
|
|
|
|
src/libresrc/Makefile
|
|
|
|
src/libosxutil/Makefile
|
2008-03-05 19:52:09 +01:00
|
|
|
universalchardet/Makefile
|
2009-07-14 00:30:49 +02:00
|
|
|
libffms/Makefile
|
2008-03-21 22:01:03 +01:00
|
|
|
libass/Makefile
|
2008-03-05 19:52:09 +01:00
|
|
|
automation/Makefile
|
|
|
|
po/Makefile.in
|
2009-01-07 06:27:16 +01:00
|
|
|
desktop/Makefile
|
2008-03-03 08:22:58 +01: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
|
2008-12-31 06:52:52 +01:00
|
|
|
scripts/osx-bundle.sed
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|
2008-03-03 08:22:58 +01:00
|
|
|
|
2009-04-12 12:08:28 +02:00
|
|
|
if test -z "$found_audio_player"; then
|
2008-03-03 08:22:58 +01:00
|
|
|
AC_MSG_NOTICE([
|
|
|
|
|
|
|
|
***********************************************************************
|
|
|
|
* 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/
|
|
|
|
* - ALSA (Linux only) (Currently broken)
|
|
|
|
* * http://www.alsa-project.org/
|
|
|
|
* - PortAudio (version 18 only, version 19 is not compatible)
|
|
|
|
* * http://www.portaudio.com/
|
|
|
|
***********************************************************************
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -z "$found_video_provider"; then
|
|
|
|
AC_MSG_NOTICE([
|
|
|
|
|
|
|
|
***********************************************************************
|
|
|
|
* 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:
|
|
|
|
* - FFmpeg (libavcodec + libavformat)
|
|
|
|
* * http://ffmpeg.mplayerhq.hu/
|
|
|
|
***********************************************************************
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
2009-01-05 12:07:14 +01:00
|
|
|
Configure settings
|
2009-01-04 05:48:55 +01:00
|
|
|
Install prefix: $prefix
|
|
|
|
SVN Revision: $SVN_REVISION
|
|
|
|
Debug $enable_debug $msg_debug
|
2009-01-29 21:47:49 +01:00
|
|
|
CXXFLAGS $CXXFLAGS
|
2009-01-04 05:48:55 +01:00
|
|
|
CPPFLAGS $CPPFLAGS
|
|
|
|
LDFLAGS $LDFLAGS
|
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
Default Settings
|
|
|
|
Video Provider: $default_provider_video
|
|
|
|
Audio Provider: $default_provider_audio
|
|
|
|
Subtitle Provider: $default_provider_subtitle
|
|
|
|
Audio Player: $default_player_audio
|
|
|
|
|
|
|
|
Scripting Engines
|
2008-12-16 02:59:38 +01:00
|
|
|
auto4 Lua: $with_auto4 $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
|
2008-03-03 08:22:58 +01:00
|
|
|
PortAudio: $with_portaudio $portaudio_disabled
|
|
|
|
PulseAudio: $with_pulseaudio $pulseaudio_disabled
|
|
|
|
|
2008-12-16 02:59:38 +01:00
|
|
|
A/V Support
|
|
|
|
FFMPEG: $with_ffmpeg $ffmpeg_disabled
|
|
|
|
(required for video providers)
|
|
|
|
|
2009-06-10 04:09:00 +02:00
|
|
|
A/V Providers
|
|
|
|
FFmpegSource: $with_provider_ffmpegsource $ffmpegsource_provider_disabled
|
2008-03-03 08:22:58 +01:00
|
|
|
|
|
|
|
Subtitle Providers:
|
2009-01-05 12:07:14 +01:00
|
|
|
CSRI (ASA): $with_csri $csri_disabled $csri_default
|
|
|
|
libASS $with_libass $libass_disabled $libass_default
|
2008-12-16 02:59:38 +01:00
|
|
|
(both require iconv and fontconfig)
|
2008-03-23 23:56:21 +01:00
|
|
|
|
2009-01-05 12:07:14 +01:00
|
|
|
Misc Packages
|
2008-12-16 02:59:38 +01:00
|
|
|
Hunspell: $with_hunspell $with_hunspell_version $hunspell_disabled
|
2008-03-20 23:24:28 +01:00
|
|
|
universalchardet: $with_univchardet $univchardet_disabled
|
2008-03-03 08:22:58 +01:00
|
|
|
]);
|