Remove autotools build system
This commit is contained in:
parent
936b39303d
commit
c965171663
28 changed files with 0 additions and 8153 deletions
12
Makefile
12
Makefile
|
@ -1,12 +0,0 @@
|
|||
include header.mk
|
||||
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
osx-bundle:
|
||||
$(BIN_SHELL) tools/osx-bundle.sh "$(AEGISUB_COMMAND)" "$(BIN_WX_CONFIG)" "$(FONTCONFIG_CONF_DIR)" DICT_DIR=$(DICT_DIR)
|
||||
|
||||
osx-dmg: osx-bundle
|
||||
codesign -s 'Mac Developer' --deep Aegisub.app || true
|
||||
$(BIN_SHELL) tools/osx-dmg.sh "$(BUILD_VERSION_STRING)"
|
||||
endif
|
||||
|
||||
include Makefile.target
|
139
Makefile.inc.in
139
Makefile.inc.in
|
@ -1,139 +0,0 @@
|
|||
#########################
|
||||
# AEGISUB FEATURE SUPPORT
|
||||
#########################
|
||||
HAVE_ALSA = @with_alsa@
|
||||
HAVE_FFMS2 = @with_ffms2@
|
||||
HAVE_HUNSPELL = @with_hunspell@
|
||||
HAVE_LIBPULSE = @with_libpulse@
|
||||
HAVE_OPENAL = @with_openal@
|
||||
HAVE_OSS = @with_oss@
|
||||
HAVE_PORTAUDIO = @with_portaudio@
|
||||
HAVE_UCHARDET = @with_uchardet@
|
||||
|
||||
##############
|
||||
# BUILD OUTPUT
|
||||
##############
|
||||
PROGRAM := $(PROGRAM)
|
||||
LIB := $(LIB)
|
||||
|
||||
###################
|
||||
# PLATFORM SETTINGS
|
||||
###################
|
||||
BUILD_DARWIN = @build_darwin@
|
||||
|
||||
#######
|
||||
# FLAGS
|
||||
#######
|
||||
CFLAGS = @CFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CFLAGS_DEP = -MMD -MP
|
||||
LIBS = @LIBS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
INSTALL_FLAGS = -m 644
|
||||
LIB_SHARED_LINK = -shared -Wl,-soname -Wl,$(LIB_SHARED_FULL)
|
||||
LIB_SHARED_LINK_OSX = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -compatibility_version $(LIB_VERSION) -current_version $(LIB_VERSION) -Wl,-single_module -mmacosx-version-min=10.8 -install_name ${CURDIR}/$(LIB_SHARED_FULL)
|
||||
|
||||
#########
|
||||
# STRINGS
|
||||
#########
|
||||
AEGISUB_COMMAND = @AEGISUB_COMMAND@
|
||||
AEGISUB_CATALOG = @AEGISUB_CATALOG@
|
||||
BUILD_DATE = @BUILD_DATE@
|
||||
BUILD_VERSION_STRING = @BUILD_GIT_VERSION_STRING@
|
||||
|
||||
#######
|
||||
# PATHS
|
||||
#######
|
||||
prefix = ${P_PREFIX}
|
||||
exec_prefix = ${P_PREFIX_EXEC}
|
||||
datarootdir = ${P_DATAROOT}
|
||||
P_PREFIX = @prefix@
|
||||
P_PREFIX_EXEC = @exec_prefix@
|
||||
P_BINDIR = @bindir@
|
||||
P_DATAROOT = @datarootdir@
|
||||
P_LOCALE = @localedir@
|
||||
|
||||
P_DESKTOP = @P_DESKTOP@
|
||||
P_ICON = @P_ICON@
|
||||
P_DATA = $(P_DATAROOT)/aegisub/
|
||||
|
||||
###############
|
||||
# LIBRARY FLAGS
|
||||
###############
|
||||
CFLAGS_WX = @WX_CFLAGS@
|
||||
CXXFLAGS_WX = @WX_CXXFLAGS@
|
||||
CPPFLAGS_WX = @WX_CPPFLAGS@
|
||||
LIBS_WX = @WX_LIBS@ -lz
|
||||
|
||||
CPPFLAGS_BOOST = @BOOST_CPPFLAGS@
|
||||
LIBS_BOOST = @BOOST_LDFLAGS@ @BOOST_FILESYSTEM_LIB@ @BOOST_LOCALE_LIB@ @BOOST_REGEX_LIB@ @BOOST_SYSTEM_LIB@ @BOOST_THREAD_LIB@ @BOOST_CHRONO_LIB@
|
||||
|
||||
CFLAGS_FFMS2 = @FFMS2_CFLAGS@
|
||||
CFLAGS_FFTW3 = @FFTW3_CFLAGS@
|
||||
CFLAGS_FONTCONFIG = @FONTCONFIG_CFLAGS@
|
||||
CFLAGS_FREETYPE = @FREETYPE_CFLAGS@
|
||||
CFLAGS_GL = @GL_CFLAGS@
|
||||
CFLAGS_HUNSPELL = @HUNSPELL_CFLAGS@
|
||||
CFLAGS_ICONV = @ICONV_CFLAGS@
|
||||
CFLAGS_ICU = @ICU_I18N_CFLAGS@
|
||||
CFLAGS_LIBASS = @LIBASS_CFLAGS@
|
||||
CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
|
||||
CFLAGS_LUA = @LUAJIT_CFLAGS@
|
||||
CFLAGS_OPENAL = @OPENAL_CFLAGS@
|
||||
CFLAGS_OSS = @OSS_CFLAGS@
|
||||
CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
|
||||
CFLAGS_PTHREAD = @PTHREAD_CFLAGS@
|
||||
CFLAGS_UCHARDET = @UCHARDET_CFLAGS@
|
||||
|
||||
LIBS_ALSA = @ALSA_LIBS@
|
||||
LIBS_FFMS2 = @FFMS2_LIBS@
|
||||
LIBS_FFTW3 = @FFTW3_LIBS@
|
||||
LIBS_FONTCONFIG = @FONTCONFIG_LIBS@
|
||||
LIBS_FREETYPE = @FREETYPE_LIBS@
|
||||
LIBS_GL = @GL_LIBS@
|
||||
LIBS_HUNSPELL = @HUNSPELL_LIBS@
|
||||
LIBS_ICONV = @ICONV_LIBS@
|
||||
LIBS_ICU = @ICU_UC_LIBS@ @ICU_I18N_LIBS@
|
||||
LIBS_LIBASS = @LIBASS_LIBS@
|
||||
LIBS_LIBPULSE = @LIBPULSE_LIBS@
|
||||
LIBS_LUA = @LUAJIT_LIBS@
|
||||
LIBS_OPENAL = @OPENAL_LIBS@
|
||||
LIBS_PORTAUDIO = @PORTAUDIO_LIBS@
|
||||
LIBS_PTHREAD = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
|
||||
LIBS_UCHARDET = @UCHARDET_LIBS@
|
||||
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
LIBS_LUA = $(TOP)vendor/luajit/src/libluajit.a
|
||||
endif
|
||||
|
||||
FONTCONFIG_CONF_DIR = @FONTCONFIG_CONF_DIR@
|
||||
|
||||
#####################
|
||||
# DEBUG / DEVELOPMENT
|
||||
#####################
|
||||
PRECOMPILED_HEADER = @enable_gcc_prec@
|
||||
|
||||
##########
|
||||
# BINARIES
|
||||
##########
|
||||
BIN_AR = ar
|
||||
BIN_RANLIB = ranlib
|
||||
BIN_LN = ln
|
||||
BIN_RM = rm
|
||||
BIN_SHELL = @SHELL@
|
||||
BIN_MV = mv
|
||||
BIN_SED = sed
|
||||
BIN_INSTALL = @INSTALL@
|
||||
BIN_MSGMERGE = @MSGMERGE@
|
||||
BIN_XGETTEXT = @XGETTEXT@
|
||||
BIN_MSGFMT = @MSGFMT@
|
||||
BIN_CC = @CC@
|
||||
BIN_CXX = @CXX@
|
||||
BIN_CP = cp
|
||||
BIN_MKDIR = mkdir
|
||||
BIN_MKDIR_P = mkdir -p
|
||||
BIN_ECHO = echo
|
||||
BIN_TOUCH = touch
|
||||
BIN_LUA = @LUA@
|
||||
BIN_WX_CONFIG = @WX_CONFIG_PATH@
|
121
Makefile.target
121
Makefile.target
|
@ -1,121 +0,0 @@
|
|||
ifneq (yes, $(INCLUDING_CHILD_MAKEFILES))
|
||||
COMMANDS := all install clean distclean test depclean osx-bundle osx-dmg test-automation test-libaegisub
|
||||
.PHONY: $(COMMANDS)
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
# Would be nice to move this somewhere else (Makefile.inc?)
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
CFLAGS += -mmacosx-version-min=10.8 -gfull
|
||||
CXXFLAGS += -mmacosx-version-min=10.8 -gfull
|
||||
LDFLAGS += -mmacosx-version-min=10.8 -Wl,-dead_strip -pagezero_size 10000 -image_base 100000000
|
||||
LIB_SHARED_LINK = $(LIB_SHARED_LINK_OSX)
|
||||
endif
|
||||
|
||||
LIB_TARGETS := $(addprefix $(TOP)lib/,$(LIB:%=lib%.a))
|
||||
|
||||
# Handle per-target flags in the form foo_CFLAGS := -w by mapping them to all
|
||||
# of the objects a target depends on. This has potentially dumb results if
|
||||
# multiple targets use a single object file, so don't do that.
|
||||
define set_target_flags
|
||||
OBJ += $($1_OBJ)
|
||||
|
||||
$($1_OBJ): CPPFLAGS := $(CPPFLAGS) $($1_CPPFLAGS)
|
||||
$($1_OBJ): CXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
|
||||
$($1_OBJ): OBJCXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
|
||||
|
||||
ifeq (yes, $(PRECOMPILED_HEADER))
|
||||
ifdef $1_PCH
|
||||
CLEANFILES += $($1_PCH).gch
|
||||
$($1_OBJ): CXXFLAGS += -include $($1_PCH) $(PCHFLAGS)
|
||||
$($1_OBJ): $($1_PCH).gch
|
||||
$($1_PCH).gch: $($1_PCH)
|
||||
$($1_PCH).gch: CPPFLAGS := $(CPPFLAGS) $($1_CPPFLAGS)
|
||||
$($1_PCH).gch: CXXFLAGS := $(CXXFLAGS) $($1_CXXFLAGS)
|
||||
else
|
||||
$($1_OBJ): CXXFLAGS += -include acconf.h
|
||||
endif
|
||||
else
|
||||
$($1_OBJ): CXXFLAGS += -include acconf.h
|
||||
endif
|
||||
endef
|
||||
$(foreach target,$(LIB),$(eval $(call set_target_flags,$(target),$(TOP)lib/lib$(target).a)))
|
||||
$(foreach target,$(PROGRAM),$(eval $(call set_target_flags,$(notdir $(target)),$(target))))
|
||||
|
||||
# Create the build and install targets for programs
|
||||
# Not done with a pattern rule since the pattern would be just %: and doing that
|
||||
# leads to make trying to use gcc to make any nonexistent targets rather than
|
||||
# erroring
|
||||
define create_program_targets
|
||||
ifdef $1_INSTALLNAME
|
||||
install: $(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME)
|
||||
$(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME): $(dir $2)$($1_INSTALLNAME)
|
||||
@$(BIN_MKDIR) -p $(DESTDIR)$(P_BINDIR)
|
||||
@$(BIN_INSTALL) $(dir $2)$($1_INSTALLNAME) $(DESTDIR)$(P_BINDIR)/$($1_INSTALLNAME)
|
||||
$(dir $2)$($1_INSTALLNAME): $($1_OBJ)
|
||||
$(BIN_CXX) -o $(dir $2)$($1_INSTALLNAME) $(LDFLAGS) $($1_OBJ) $(LIBS) $($1_LIBS)
|
||||
all: $(dir $2)$($1_INSTALLNAME)
|
||||
else
|
||||
$2: $($1_OBJ)
|
||||
$(BIN_CXX) -o $2 $(LDFLAGS) $($1_OBJ) $(LIBS) $($1_LIBS)
|
||||
all: $2
|
||||
endif
|
||||
$(eval CLEANFILES += $(filter-out %/,$2 $(dir $2)$($1_INSTALLNAME)))
|
||||
endef
|
||||
$(foreach target,$(PROGRAM),$(eval $(call create_program_targets,$(notdir $(target)),$(target))))
|
||||
|
||||
# The dependency files which will be automatically generated by gcc.
|
||||
# The filter is due to that libraries also appear in OBJ
|
||||
DEP := $(filter %.d,$(OBJ:%.o=%.d))
|
||||
|
||||
# If the goal is a relative path to a file, convert it to an absolute path
|
||||
ifneq ($(filter-out $(COMMANDS),$(MAKECMDGOALS)),)
|
||||
ABSGOAL := $(abspath $(MAKECMDGOALS))
|
||||
ifneq ($(MAKECMDGOALS),$(ABSGOAL))
|
||||
$(MAKECMDGOALS): $(ABSGOAL) ;
|
||||
endif
|
||||
endif
|
||||
|
||||
# Primary build targets
|
||||
all: $(LIB_TARGETS)
|
||||
|
||||
clean:
|
||||
$(BIN_RM) -f $(OBJ) $(CLEANFILES) $(LIB_TARGETS)
|
||||
|
||||
distclean: clean
|
||||
$(BIN_RM) -rf $(DISTCLEANFILES) $(DEP)
|
||||
|
||||
depclean: clean
|
||||
$(BIN_RM) -rf $(DEP)
|
||||
|
||||
install:
|
||||
|
||||
# The actual build rules
|
||||
.SUFFIXES:
|
||||
|
||||
CXX_CMD = $(CXX_ENV) $(BIN_CXX) $(CFLAGS_DEP) $(CPPFLAGS)
|
||||
CC_CMD = $(CXX_ENV) $(BIN_CC) $(CFLAGS_DEP) $(CPPFLAGS)
|
||||
POST_FLAGS = $($@_FLAGS) -c -o $@ $<
|
||||
|
||||
%.o: %.c ; $(CC_CMD) $(CFLAGS) $(POST_FLAGS)
|
||||
%.o: %.cpp ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
|
||||
%.o: %.cxx ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
|
||||
%.o: %.cc ; $(CXX_CMD) $(CXXFLAGS) $(POST_FLAGS)
|
||||
%.o: %.mm ; $(CXX_CMD) $(OBJCXXFLAGS) $(POST_FLAGS)
|
||||
%.o: %.m ; $(CC_CMD) $(CFLAGS) -fmodules $(POST_FLAGS)
|
||||
|
||||
%.gch: %
|
||||
@$(BIN_RM) -f $@
|
||||
$(CXX_ENV) $(BIN_CXX) $(CPPFLAGS) $(CXXFLAGS) -x c++-header $<
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
||||
# Libraries contain all object files they depend on (but they may depend on other files)
|
||||
# Not using libtool on OS X because it has an unsilenceable warning about a
|
||||
# compatibility issue with BSD 4.3 (wtf)
|
||||
lib%.a: $$($$*_OBJ)
|
||||
@$(BIN_MKDIR_P) $(dir $@)
|
||||
$(BIN_AR) cru $@ $(filter %.o,$^)
|
||||
$(BIN_RANLIB) $@
|
||||
|
||||
-include $(DEP)
|
||||
endif
|
15
acinclude.m4
15
acinclude.m4
|
@ -1,15 +0,0 @@
|
|||
m4_include([m4macros/ac_agi.m4])
|
||||
m4_include([m4macros/ac_flag.m4])
|
||||
m4_include([m4macros/agi_find_libheader.m4])
|
||||
m4_include([m4macros/ax_boost_base.m4])
|
||||
m4_include([m4macros/ax_boost_chrono.m4])
|
||||
m4_include([m4macros/ax_boost_filesystem.m4])
|
||||
m4_include([m4macros/ax_boost_locale.m4])
|
||||
m4_include([m4macros/ax_boost_regex.m4])
|
||||
m4_include([m4macros/ax_boost_system.m4])
|
||||
m4_include([m4macros/ax_boost_thread.m4])
|
||||
m4_include([m4macros/ax_check_gl.m4])
|
||||
m4_include([m4macros/ax_lang_compiler_ms.m4])
|
||||
m4_include([m4macros/ax_pthread.m4])
|
||||
m4_include([m4macros/check_gnu_make.m4])
|
||||
m4_include([m4macros/wxwin.m4])
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo Running autoreconf...
|
||||
autoreconf -ivf "$@"
|
||||
|
||||
echo Now run ./configure and then make to build Aegisub
|
|
@ -1,28 +0,0 @@
|
|||
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||
|
||||
DATA_AUTOMATION := \
|
||||
$(sort $(wildcard $(d)autoload/*)) \
|
||||
$(sort $(wildcard $(d)demos/*)) \
|
||||
$(sort $(wildcard $(d)include/*.lua)) \
|
||||
$(sort $(wildcard $(d)include/aegisub/*))
|
||||
|
||||
DATA_AUTOMATION_REL := $(subst $(d),,$(DATA_AUTOMATION))
|
||||
DATA_AUTOMATION_INSTALLED = $(addprefix $(DESTDIR)$(P_DATA)/automation/, $(DATA_AUTOMATION_REL))
|
||||
|
||||
$(DESTDIR)$(P_DATA)/automation/%: $(d)%
|
||||
$(MKDIR_INSTALL)
|
||||
|
||||
aegisub-lua_OBJ := $(d)tests/aegisub.o $(TOP)lib/libaegisub.a $(TOP)lib/libluabins.a $(LIBS_LUA)
|
||||
aegisub-lua_CPPFLAGS := $(CPPFLAGS_BOOST) $(CFLAGS_LUA) -I$(TOP)libaegisub/include -I$(TOP)src $(CXXFLAGS_WX)
|
||||
aegisub-lua_LIBS := $(LIBS_WX) $(LIBS_BOOST) $(LIBS_ICU) $(LIBS_PTHREAD)
|
||||
|
||||
PROGRAM += $(d)aegisub-lua
|
||||
|
||||
test-automation: $(PROGRAM)
|
||||
eval `luarocks path`; cd $(TOP)automation; ./aegisub-lua tests/busted.lua -p 'moon' tests/modules
|
||||
|
||||
test: test-automation
|
||||
|
||||
install: $(DATA_AUTOMATION_INSTALLED)
|
||||
|
||||
include $(TOP)Makefile.target
|
1476
config.guess
vendored
1476
config.guess
vendored
File diff suppressed because it is too large
Load diff
1808
config.sub
vendored
1808
config.sub
vendored
File diff suppressed because it is too large
Load diff
630
configure.ac
630
configure.ac
|
@ -1,630 +0,0 @@
|
|||
AC_PREREQ(2.57)
|
||||
|
||||
###################
|
||||
# Required packages
|
||||
###################
|
||||
m4_define([boost_required_version], [1.50.0])
|
||||
m4_define([curl_required_version], [7.18.2])
|
||||
m4_define([ffms2_required_version], [2.16])
|
||||
m4_define([fftw3_required_version], [3.3])
|
||||
m4_define([fontconfig_required_version], [2.4])
|
||||
m4_define([freetype_required_version], [9.7.0])
|
||||
m4_define([hunspell_required_version], [1.2.0])
|
||||
m4_define([icu_required_version], [4.8.1.1])
|
||||
m4_define([libass_required_version], [0.9.7])
|
||||
m4_define([libpulse_required_version], [0.5])
|
||||
m4_define([pkgconfig_required_version], [0.20])
|
||||
m4_define([portaudio_required_version], [19])
|
||||
m4_define([wx_required_version], [3.0.0])
|
||||
|
||||
#######
|
||||
# Setup
|
||||
#######
|
||||
AC_INIT([Aegisub], [aegisub_version],, [aegisub])
|
||||
: ${CFLAGS=""}
|
||||
: ${CXXFLAGS=""}
|
||||
AC_CONFIG_SRCDIR([src/main.cpp])
|
||||
AC_CONFIG_HEADER([acconf.h])
|
||||
AC_GNU_SOURCE
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
###########################
|
||||
# Check host architecture
|
||||
###########################
|
||||
build_darwin="no"
|
||||
build_linux="no"
|
||||
|
||||
AS_CASE([$host],
|
||||
[*-*-darwin*], [build_darwin="yes"],
|
||||
[*-*-linux*], [build_linux="yes"])
|
||||
|
||||
AC_SUBST(build_darwin)
|
||||
|
||||
########################
|
||||
# Configurable variables
|
||||
########################
|
||||
# Name of aegisub binary.
|
||||
# This is tagged with the version on release branches.
|
||||
AEGISUB_COMMAND="aegisub"
|
||||
AC_SUBST(AEGISUB_COMMAND)
|
||||
AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegisub executable])
|
||||
|
||||
# Name of gettext catalog.
|
||||
AEGISUB_CATALOG="aegisub"
|
||||
AC_SUBST(AEGISUB_CATALOG)
|
||||
AC_DEFINE_UNQUOTED([AEGISUB_CATALOG], ["${AEGISUB_CATALOG}"], [Name of the Aegisub gettext catalog])
|
||||
|
||||
# Handle location of desktop files: http://freedesktop.org/wiki/Specifications/desktop-entry-spec
|
||||
AC_ARG_WITH(desktop-dir,
|
||||
AS_HELP_STRING([--with-desktop-dir=PATH],[desktop file locations [PREFIX/share/applications]]))
|
||||
|
||||
P_DESKTOP=${with_desktop_dir:-$datarootdir/applications}
|
||||
AC_SUBST(P_DESKTOP)
|
||||
|
||||
# Handle location of icons: http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
|
||||
AC_ARG_WITH(icon-dir,
|
||||
AS_HELP_STRING([--with-icon-dir=PATH],[icon locations [PREFIX/share/icons]]))
|
||||
|
||||
P_ICON=${with_icon_dir:-$datarootdir/icons}
|
||||
AC_SUBST(P_ICON)
|
||||
|
||||
# Install prefix
|
||||
# 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.
|
||||
AS_CASE([x$prefix], [xNONE | x], [prefix="$ac_default_prefix"], [])
|
||||
|
||||
# Install prefix used by wxStandardPaths::SetInstallPrefix.
|
||||
AC_DEFINE_UNQUOTED([INSTALL_PREFIX], ["$prefix"], [Default install prefix, or --prefix.])
|
||||
|
||||
# Build credit
|
||||
AC_ARG_WITH(build-credit,
|
||||
AS_HELP_STRING([--with-build-credit=NAME],[Build credit shown in the program title.]),
|
||||
[use_build_credit="yes"])
|
||||
|
||||
AC_MSG_CHECKING([whether BUILD_CREDIT has been set])
|
||||
AS_IF([test x$use_build_credit = xyes],
|
||||
AS_IF([test x$with_build_credit = xyes || test -z "$with_build_credit"], [
|
||||
AC_MSG_FAILURE([You must set a value eg --with-build-credit=<username>])
|
||||
], [
|
||||
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=])
|
||||
]),
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
####################
|
||||
# Check for programs
|
||||
####################
|
||||
CHECK_GNU_MAKE
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_LANG(C++)
|
||||
AM_PROG_CC_C_O
|
||||
# This is reported to be required on Ubuntu, I haven't had time to check.
|
||||
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
PKG_PROG_PKG_CONFIG([pkgconfig_required_version])
|
||||
|
||||
#################
|
||||
# Developers only
|
||||
#################
|
||||
AC_MSG_CHECKING([for version])
|
||||
. $srcdir/build/version.sh "$srcdir"
|
||||
AC_MSG_RESULT([$BUILD_GIT_VERSION_STRING $VERSION_SOURCE])
|
||||
|
||||
AC_MSG_CHECKING([for build date])
|
||||
BUILD_DATE=`date "+%Y-%m-%d %H:%M %Z"`
|
||||
AC_MSG_RESULT($BUILD_DATE)
|
||||
|
||||
AC_SUBST([BUILD_GIT_VERSION_STRING])
|
||||
AC_SUBST([BUILD_DATE])
|
||||
|
||||
###################################################
|
||||
# Check for pthreads and setup variables / compiler
|
||||
###################################################
|
||||
AS_IF([test x$build_darwin != xyes], [
|
||||
ACX_PTHREAD([], [AC_MSG_FAILURE([You must have working pthreads.])])
|
||||
CC="$PTHREAD_CC"
|
||||
])
|
||||
|
||||
######################
|
||||
# Check compiler flags
|
||||
######################
|
||||
AC_ARG_ENABLE(compiler-flags, AS_HELP_STRING([--disable-compiler-flags],[Disable *all* additional compiler flags. [no]]))
|
||||
|
||||
AS_IF([test x$enable_compiler_flags != xno], [
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -std=gnu99 -pipe -g"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -pipe -g"
|
||||
AC_CXX_FLAG([-std=c++11])
|
||||
AC_CXX_FLAG([-Wno-c++11-narrowing])
|
||||
AC_C_FLAG([-Wno-unused-local-typedefs])
|
||||
AC_CXX_FLAG([-Wno-unused-local-typedefs])
|
||||
|
||||
# -O* messes with debugging.
|
||||
AS_IF([test x$enable_debug = xyes], [
|
||||
CFLAGS="$CFLAGS -O0"
|
||||
CXXFLAGS="$CXXFLAGS -O0"
|
||||
], [
|
||||
CFLAGS="$CFLAGS -O3"
|
||||
CXXFLAGS="$CXXFLAGS -O3"
|
||||
])
|
||||
])
|
||||
|
||||
AC_ARG_WITH([libc++], AS_HELP_STRING([--with-libc++],[Use libc++ rather than libstdc++. [auto]]))
|
||||
AS_IF([test x$with_libc__ != xno], [
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_ld_flag_save="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -stdlib=libc++"
|
||||
AC_MSG_CHECKING([[whether $CXX supports -stdlib=libc++]])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]])], [
|
||||
AC_MSG_RESULT([yes])
|
||||
CXXFLAGS="$CXXFLAGS -stdlib=libc++"
|
||||
], [
|
||||
AS_IF([test x$with_libc__ = xyes], [
|
||||
AC_MSG_FAILURE([no])
|
||||
], [
|
||||
LDFLAGS="$ac_ld_flag_save"
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
######################################
|
||||
# Check Headers / Features / Libraries
|
||||
######################################
|
||||
AC_CHECK_LIB([m], [main])
|
||||
AC_CHECK_LIB([dl], [dlclose])
|
||||
AC_CHECK_HEADERS([sys/time.h])
|
||||
|
||||
AC_ARG_ENABLE(sanity-checks,
|
||||
AS_HELP_STRING([--disable-sanity-checks],[Skip verifying that found libraries work.]))
|
||||
|
||||
##############################
|
||||
# Program Support and Features
|
||||
##############################
|
||||
#########################
|
||||
### Required Dependencies
|
||||
#########################
|
||||
|
||||
AS_IF([test x$build_darwin != xyes], [
|
||||
AC_PATH_XTRA
|
||||
AS_IF([test x$no_x = xyes],
|
||||
[AC_MSG_FAILURE([You must have a working copy of X installed.])])
|
||||
|
||||
AX_CHECK_GL
|
||||
AS_IF([test x$no_gl = xyes], [AC_MSG_FAILURE([Aegisub requires GL support.])])
|
||||
], [
|
||||
AC_CHECK_HEADERS([OpenGL/gl.h])
|
||||
])
|
||||
AC_SUBST(GL_CFLAGS)
|
||||
AC_SUBST(GL_LIBS)
|
||||
|
||||
PKG_CHECK_MODULES(FREETYPE, freetype2 >= freetype_required_version)
|
||||
|
||||
AS_IF([test x$build_darwin != xyes], [
|
||||
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= fontconfig_required_version)
|
||||
FONTCONFIG_CONF_DIR=$($PKG_CONFIG --variable=confdir fontconfig)
|
||||
AC_SUBST(FONTCONFIG_CONF_DIR)
|
||||
])
|
||||
|
||||
PKG_CHECK_MODULES(LIBASS, libass >= libass_required_version)
|
||||
|
||||
AX_BOOST_BASE([boost_required_version])
|
||||
AX_BOOST_CHRONO
|
||||
AX_BOOST_FILESYSTEM
|
||||
AX_BOOST_LOCALE
|
||||
AX_BOOST_REGEX
|
||||
AX_BOOST_SYSTEM
|
||||
AX_BOOST_THREAD
|
||||
|
||||
cppflags_bak="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
|
||||
AC_CHECK_HEADERS([boost/spirit/home/phoenix/version.hpp])
|
||||
CPPFLAGS=$cppflags_bak
|
||||
|
||||
AC_DEFINE(BOOST_SYSTEM_NO_DEPRECATED, 1,
|
||||
[Disable deprecated parts of boost.system])
|
||||
AC_DEFINE(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION, 1,
|
||||
[Disable boost.serialization support for boost.multi_index])
|
||||
|
||||
PKG_CHECK_MODULES(ICU_UC, icu-uc >= icu_required_version)
|
||||
PKG_CHECK_MODULES(ICU_I18N, icu-i18n >= icu_required_version)
|
||||
|
||||
########
|
||||
## boost
|
||||
########
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_AGI_COMPILE([boost ICU support], [boost_icu], [$BOOST_CPPFLAGS],
|
||||
[$BOOST_LDFLAGS $BOOST_REGEX_LIB $ICU_UC_LIBS $ICU_I18N_LIBS],[
|
||||
#include <boost/regex/icu.hpp>
|
||||
int main() {
|
||||
auto regex = boost::make_u32regex(".", boost::u32regex::perl);
|
||||
boost::smatch result;
|
||||
u32regex_search("a", result, regex, boost::match_default);
|
||||
} ])
|
||||
|
||||
AS_IF([test x$agi_cv_with_boost_icu = xno],
|
||||
[AC_MSG_FAILURE([Aegisub requires that boost be built with ICU support.])])
|
||||
])
|
||||
|
||||
########
|
||||
## iconv
|
||||
########
|
||||
AC_ARG_VAR([ICONV_CFLAGS], [CFLAGS to use for iconv []])
|
||||
AC_ARG_VAR([ICONV_LIBS], [LIBS to use for iconv [-liconv]])
|
||||
|
||||
AS_IF([test -z "$ICONV_LIBS"], AC_SEARCH_LIBS([iconv_open], [iconv]))
|
||||
|
||||
AC_AGI_COMPILE([iconv], [iconv], [$ICONV_CFLAGS], [$ICONV_LIBS],[
|
||||
#include <iconv.h>
|
||||
int main() {
|
||||
return !iconv_open("UTF-8", "UTF-8");
|
||||
} ])
|
||||
|
||||
AC_SUBST(ICONV_LIBS)
|
||||
AC_SUBST(ICONV_CFLAGS)
|
||||
|
||||
AS_IF([test x$agi_cv_with_iconv = xno], [AC_MSG_FAILURE([Please install a working iconv library.])])
|
||||
|
||||
AC_AGI_COMPILE([iconv (const)], [iconv_const], [$ICONV_CFLAGS], [$ICONV_LIBS],[
|
||||
#include <iconv.h>
|
||||
int main(void) {
|
||||
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);
|
||||
return 0;
|
||||
} ])
|
||||
|
||||
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])])
|
||||
|
||||
###############
|
||||
# Audio Players
|
||||
###############
|
||||
#######
|
||||
## ALSA
|
||||
#######
|
||||
AC_ARG_WITH(alsa,
|
||||
AS_HELP_STRING([--without-alsa],
|
||||
[build without ALSA audio player [auto]]))
|
||||
|
||||
AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA []])
|
||||
AC_ARG_VAR([ALSA_LIBS], [LIBS to use for ALSA [-lasound -lrt]])
|
||||
|
||||
ALSA_LIBS=${ALSA_LIBS:--lasound -lrt}
|
||||
|
||||
AS_IF([test x$with_alsa = xno],
|
||||
[alsa_disabled="(disabled)"],
|
||||
[AC_CHECK_LIB([asound], [snd_pcm_open], [with_alsa="yes"], [with_alsa="no"], $ALSA_LIBS)])
|
||||
|
||||
AS_IF([test x$with_alsa = xyes], AC_DEFINE(WITH_ALSA, 1, [Enable ALSA Support]))
|
||||
|
||||
AC_SUBST(ALSA_CFLAGS)
|
||||
AC_SUBST(ALSA_LIBS)
|
||||
AC_SUBST(with_alsa)
|
||||
|
||||
#########
|
||||
## OpenAL
|
||||
#########
|
||||
AC_ARG_WITH(openal,
|
||||
AS_HELP_STRING([--without-openal],
|
||||
[build without OpenAL audio player [auto]]))
|
||||
|
||||
AS_IF([test x$build_darwin = xyes], [
|
||||
OPENAL_LIBS="-framework OpenAL"
|
||||
OPENAL_CFLAGS=""
|
||||
AC_SUBST(OPENAL_LIBS)
|
||||
AC_SUBST(OPENAL_CFLAGS)
|
||||
with_openal="yes"
|
||||
],
|
||||
[test x$with_openal = xno], [openal_disabled="(disabled)"],
|
||||
[PKG_CHECK_MODULES(OPENAL, openal >= 0.0.8, [with_openal=yes], [with_openal=no])])
|
||||
|
||||
AS_IF([test x$with_openal != xno], [
|
||||
AC_AGI_COMPILE([OpenAL], [openal], [$OPENAL_CFLAGS], [$OPENAL_LIBS],[
|
||||
#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;
|
||||
} ])
|
||||
])
|
||||
|
||||
AS_IF([test x$agi_cv_with_openal = xno && test x$with_openal = xyes], [
|
||||
AC_MSG_WARN([OpenAL detected, but it doesn''t work...])
|
||||
with_openal="no"
|
||||
])
|
||||
|
||||
AS_IF([test x$agi_cv_with_openal = xyes && test x$with_openal = xyes],
|
||||
AC_DEFINE(WITH_OPENAL, 1, [Enable OpenAL support]))
|
||||
|
||||
AC_SUBST(with_openal)
|
||||
|
||||
######
|
||||
## OSS
|
||||
######
|
||||
AC_ARG_VAR([OSS_CFLAGS], [CFLAGS to use for OSS [auto]])
|
||||
AC_ARG_WITH(oss,
|
||||
AS_HELP_STRING([--without-oss],
|
||||
[build without OSS audio player [auto]]))
|
||||
|
||||
AS_IF([test x$with_oss = xno], [oss_disabled="(disabled)"], [
|
||||
AS_IF([test -z "$OSS_CFLAGS" && test -f "/etc/oss.conf"], [
|
||||
. /etc/oss.conf
|
||||
OSS_CFLAGS="-I${OSSLIBDIR}/include/sys"
|
||||
])
|
||||
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [with_oss="yes"], [with_oss="no"])
|
||||
])
|
||||
|
||||
AS_IF([test x$with_oss = xyes], AC_DEFINE(WITH_OSS, 1, [Enable OSS support]))
|
||||
|
||||
AC_SUBST(with_oss)
|
||||
|
||||
###################
|
||||
# Simple pkg-config stuff
|
||||
###################
|
||||
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])
|
||||
|
||||
AGI_OPT_PKG(ffms2, [build without ffms2 A/V provider [auto]], [Enable FFMS2 support])
|
||||
|
||||
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])
|
||||
AGI_OPT_PKG(uchardet, [build without automatic character set detection [auto]], [Enable uchardet support])
|
||||
|
||||
########
|
||||
# LuaJIT
|
||||
########
|
||||
system_luajit="bundled"
|
||||
AC_ARG_WITH(system-luajit, AS_HELP_STRING([--without-system-luajit], [Use built-in LuaJIT [auto]]))
|
||||
# Check if it's available at all
|
||||
AS_IF([test x$with_system_luajit = xno], [],
|
||||
[PKG_CHECK_MODULES(LUAJIT, luajit >= 2.0.0, [], [
|
||||
AS_IF([test x$with_system_luajit = xyes],
|
||||
[AC_MSG_FAILURE([--with-sytem-luajit was specified, but luajit could not be found])])
|
||||
with_system_luajit="no"])])
|
||||
|
||||
# Check if it's compiled in Lua 5.2 mode
|
||||
# This check can be skipped by manually setting agi_cv_luajit_is_52
|
||||
AS_IF([test x$with_system_luajit != xno], [
|
||||
aegisub_save_LIBS="$LIBS"
|
||||
aegisub_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $LUAJIT_CFLAGS"
|
||||
LIBS="$LIBS $LUAJIT_LIBS"
|
||||
AC_CACHE_CHECK(
|
||||
[whether LuaJIT is compiled in 5.2 mode], [agi_cv_luajit_is_52],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#include <lauxlib.h>]],
|
||||
[[lua_State *L = luaL_newstate();
|
||||
if (!L) return 1;
|
||||
// This is valid in lua 5.2, but a syntax error in 5.1
|
||||
const char testprogram[] = "function foo() while true do break return end end";
|
||||
return luaL_loadstring(L, testprogram) == LUA_ERRSYNTAX;
|
||||
]])], [agi_cv_luajit_is_52="yes"], [agi_cv_luajit_is_52="no"])])
|
||||
CPPFLAGS="$aegisub_save_CPPFLAGS"
|
||||
LIBS="$aegisub_save_LIBS"
|
||||
|
||||
if test $agi_cv_luajit_is_52 != yes; then
|
||||
AS_IF([test x$with_system_luajit = xyes],
|
||||
[AC_MSG_FAILURE([LuaJIT must be compiled in Lua 5.2 mode])])
|
||||
with_system_luajit="no"
|
||||
else
|
||||
with_system_luajit="yes"
|
||||
system_luajit="system"
|
||||
fi
|
||||
])
|
||||
|
||||
AS_IF([test $with_system_luajit = no],
|
||||
[AC_SUBST([LUAJIT_CFLAGS], ['-I$(TOP)vendor/luajit/include'])
|
||||
AC_SUBST([LUAJIT_LIBS], ['$(TOP)vendor/luajit/src/libluajit.a'])])
|
||||
|
||||
# We also need a Lua binary to run part of the build system
|
||||
# Which version doesn't matter as the scripts are portable between them
|
||||
AC_CHECK_PROGS([LUA], [lua luajit lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1])
|
||||
|
||||
# If the user doesn't have an installed copy of Lua, just use the one built
|
||||
# as part of building LuaJIT
|
||||
AS_IF([test -z $LUA], [LUA='$(TOP)vendor/luajit/src/host/minilua'])
|
||||
|
||||
######################################################
|
||||
# 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.])])
|
||||
|
||||
################
|
||||
# Widget support
|
||||
################
|
||||
WX_CONFIG_OPTIONS
|
||||
WX_STANDARD_OPTIONS([debug])
|
||||
WX_DEBUG=$DEBUG
|
||||
WX_UNICODE=$UNICODE
|
||||
WX_CONFIG_CHECK([wx_required_version],,,[std,gl,stc],[$WXCONFIG_FLAGS])
|
||||
AC_SUBST(WX_CONFIG_PATH)
|
||||
|
||||
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.])])
|
||||
|
||||
AS_IF([test x$enable_sanity_checks != xno], [
|
||||
AC_AGI_LINK([wxWidgets OpenGL support], [wxopengl], [wx/glcanvas.h], [$GL_CFLAGS $WX_CFLAGS], [$GL_LIBS $WX_LIBS],[
|
||||
#include <wx/glcanvas.h>
|
||||
int main(void) {
|
||||
wxGLCanvas *canvas;
|
||||
wxGLContext *context;
|
||||
return 0;
|
||||
} ])
|
||||
AC_AGI_LINK([wxWidgets StyledTextCtrl support], [wxstc], [wx/stc/stc.h], [$WX_CFLAGS], [$WX_LIBS],[
|
||||
#include <wx/stc/stc.h>
|
||||
int main(void) {
|
||||
wxStyledTextCtrl *canvas;
|
||||
return 0;
|
||||
} ])
|
||||
])
|
||||
|
||||
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]))
|
||||
|
||||
# This turns on some internal (to aegisub) debugging features.
|
||||
# A debug version of wxWidgets is required.
|
||||
AS_IF([test x$enable_debug = xyes],
|
||||
[AS_IF([$WX_CONFIG_PATH --debug],[AC_CXX_FLAG([-D_DEBUG])])])
|
||||
|
||||
############################
|
||||
# Precompiled Header Support
|
||||
# Only works with gcc! (and clang)
|
||||
############################
|
||||
AC_MSG_CHECKING([whether to use precompiled headers])
|
||||
AC_ARG_ENABLE(gcc-prec, AS_HELP_STRING([--disable-gcc-prec],[disable GCC precompiled headers]))
|
||||
AC_MSG_RESULT([${enable_gcc_prec:=yes}])
|
||||
AC_SUBST(enable_gcc_prec)
|
||||
AC_PCH_FLAG([-Winvalid-pch])
|
||||
AC_PCH_FLAG([-fpch-deps])
|
||||
AC_PCH_FLAG([-fpch-preprocess])
|
||||
|
||||
##############################
|
||||
# Internationalisation support
|
||||
##############################
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
################
|
||||
# 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])
|
||||
|
||||
####################################################################
|
||||
# Default settings for Providers/Players
|
||||
# * This is done at the end to preserve sanity rather than littering
|
||||
# it above.
|
||||
####################################################################
|
||||
AC_ARG_WITH(player-audio,
|
||||
AS_HELP_STRING([--with-player-audio=(ALSA|OpenAL|PortAudio|PulseAudio|OSS)],
|
||||
[Default Audio Player [Linux/ALSA, Darwin/OpenAL, 1:*/OSS, 2:*/PortAudio]]))
|
||||
|
||||
# Default audio player.
|
||||
AS_IF([test -z "$with_player_audio"], [
|
||||
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)
|
||||
|
||||
# Set some friendly strings if some of the above aren't detected.
|
||||
DEFAULT_PLAYER_AUDIO=${DEFAULT_PLAYER_AUDIO:-NONE}
|
||||
|
||||
###############
|
||||
# Misc settings
|
||||
###############
|
||||
# Files that need substitution.
|
||||
AC_CONFIG_FILES([
|
||||
packages/desktop/aegisub.desktop.template
|
||||
src/libresrc/default_config_platform.json
|
||||
tools/osx-bundle.sed
|
||||
Makefile.inc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
AS_IF([test x"$DEFAULT_PLAYER_AUDIO" = xNONE], 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)
|
||||
* * http://www.alsa-project.org/
|
||||
* - PortAudio (version 19 only)
|
||||
* * http://www.portaudio.com/
|
||||
***********************************************************************
|
||||
]))
|
||||
|
||||
AS_IF([test x$with_ffms2 != xyes], [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:
|
||||
* - FFMS2
|
||||
* * http://github.com/FFMS/ffms2
|
||||
***********************************************************************
|
||||
])])
|
||||
|
||||
AC_MSG_RESULT([
|
||||
Configure settings
|
||||
Install prefix: $prefix
|
||||
Revision: $BUILD_GIT_VERSION_STRING
|
||||
Debug $enable_debug
|
||||
CFLAGS $CFLAGS
|
||||
CXXFLAGS $CXXFLAGS
|
||||
CPPFLAGS $CPPFLAGS
|
||||
LDFLAGS $LDFLAGS
|
||||
LIBS $LIBS
|
||||
|
||||
Default Settings
|
||||
Audio Player: $DEFAULT_PLAYER_AUDIO
|
||||
|
||||
Audio Players
|
||||
ALSA: $with_alsa $alsa_disabled
|
||||
OpenAL: $with_openal $openal_disabled
|
||||
OSS: $with_oss $oss_disabled
|
||||
PortAudio: $with_portaudio $portaudio_disabled
|
||||
PulseAudio: $with_libpulse $libpulse_disabled
|
||||
|
||||
Misc Packages
|
||||
uchardet: $with_uchardet $uchardet_disabled
|
||||
Hunspell: $with_hunspell $hunspell_disabled
|
||||
FFTW3: $with_fftw3 $fftw3_disabled
|
||||
LuaJIT: $system_luajit
|
||||
])
|
43
header.mk
43
header.mk
|
@ -1,43 +0,0 @@
|
|||
d := $(abspath $(dir $(lastword $(filter-out $(lastword $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))))/
|
||||
|
||||
ifndef TOP
|
||||
TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))/
|
||||
include $(TOP)Makefile.inc
|
||||
|
||||
subdirs := \
|
||||
automation \
|
||||
libaegisub \
|
||||
packages/desktop \
|
||||
po \
|
||||
src \
|
||||
tests \
|
||||
tools \
|
||||
vendor/luabins \
|
||||
vendor/luajit
|
||||
|
||||
subdirs := $(addprefix $(TOP),$(addsuffix /Makefile,$(subdirs)))
|
||||
|
||||
INCLUDING_CHILD_MAKEFILES=yes
|
||||
d_save := $d
|
||||
$(foreach dir,$(filter-out $(abspath $(MAKEFILE_LIST)),$(subdirs)), $(eval include $(dir)))
|
||||
d := $(d_save)
|
||||
INCLUDING_CHILD_MAKEFILES=no
|
||||
|
||||
DISTCLEANFILES += \
|
||||
$(TOP)acconf.h \
|
||||
$(TOP)configure \
|
||||
$(TOP)acconf.h.in~ \
|
||||
$(TOP)build/git_version.h \
|
||||
$(TOP)Makefile.inc \
|
||||
$(TOP)config.log \
|
||||
$(TOP)acconf.h.in \
|
||||
$(TOP)config.status \
|
||||
$(TOP)autom4te.cache \
|
||||
$(TOP)aclocal.m4 \
|
||||
|
||||
define MKDIR_INSTALL
|
||||
@$(BIN_MKDIR_P) $(dir $@)
|
||||
$(BIN_INSTALL) -m644 $< $@
|
||||
endef
|
||||
|
||||
endif
|
501
install-sh
501
install-sh
|
@ -1,501 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2016-01-11.22; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1,56 +0,0 @@
|
|||
include $(dir $(lastword $(MAKEFILE_LIST)))../header.mk
|
||||
|
||||
aegisub_OBJ := \
|
||||
$(d)common/parser.o \
|
||||
$(d)ass/dialogue_parser.o \
|
||||
$(d)ass/time.o \
|
||||
$(d)ass/uuencode.o \
|
||||
$(patsubst %.cpp,%.o,$(sort $(wildcard $(d)audio/*.cpp))) \
|
||||
$(patsubst %.cpp,%.o,$(sort $(wildcard $(d)common/cajun/*.cpp))) \
|
||||
$(patsubst %.cpp,%.o,$(sort $(wildcard $(d)lua/modules/*.cpp))) \
|
||||
$(patsubst %.c,%.o,$(sort $(wildcard $(d)lua/modules/*.c))) \
|
||||
$(patsubst %.cpp,%.o,$(sort $(wildcard $(d)lua/*.cpp))) \
|
||||
$(patsubst %.cpp,%.o,$(sort $(wildcard $(d)unix/*.cpp))) \
|
||||
$(d)common/calltip_provider.o \
|
||||
$(d)common/character_count.o \
|
||||
$(d)common/charset.o \
|
||||
$(d)common/charset_6937.o \
|
||||
$(d)common/charset_conv.o \
|
||||
$(d)common/color.o \
|
||||
$(d)common/file_mapping.o \
|
||||
$(d)common/format.o \
|
||||
$(d)common/fs.o \
|
||||
$(d)common/hotkey.o \
|
||||
$(d)common/io.o \
|
||||
$(d)common/json.o \
|
||||
$(d)common/kana_table.o \
|
||||
$(d)common/karaoke_matcher.o \
|
||||
$(d)common/keyframe.o \
|
||||
$(d)common/line_iterator.o \
|
||||
$(d)common/log.o \
|
||||
$(d)common/mru.o \
|
||||
$(d)common/option.o \
|
||||
$(d)common/option_value.o \
|
||||
$(d)common/path.o \
|
||||
$(d)common/thesaurus.o \
|
||||
$(d)common/util.o \
|
||||
$(d)common/vfr.o \
|
||||
$(d)common/ycbcr_conv.o
|
||||
|
||||
ifeq (yes, $(BUILD_DARWIN))
|
||||
aegisub_OBJ += $(patsubst %.mm,%.o,$(sort $(wildcard $(d)osx/*.mm)))
|
||||
else
|
||||
aegisub_OBJ += $(d)common/dispatch.o
|
||||
endif
|
||||
|
||||
aegisub_PCH := $(d)lagi_pre.h
|
||||
aegisub_CPPFLAGS := -I$(d)include -I$(TOP) $(CPPFLAGS_BOOST) $(CFLAGS_LUA) $(CFLAGS_PTHREAD)
|
||||
|
||||
$(d)common/charset.o_FLAGS := $(CFLAGS_UCHARDET)
|
||||
$(d)common/charset_conv.o_FLAGS := $(CFLAGS_ICONV)
|
||||
$(d)common/parser.o_FLAGS := -ftemplate-depth=256
|
||||
$(d)unix/path.o_FLAGS := -DP_DATA=\"$(P_DATA)\"
|
||||
|
||||
LIB += aegisub
|
||||
|
||||
include $(TOP)Makefile.target
|
|
@ -1,51 +0,0 @@
|
|||
AC_DEFUN([AC_AGI_COMPILE],[
|
||||
aegisub_save_LIBS="$LIBS"
|
||||
aegisub_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $3"
|
||||
LIBS="$LIBS $4"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK(
|
||||
[whether $1 works], [agi_cv_with_$2],
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([$5])],
|
||||
[eval agi_cv_with_$2="yes"],
|
||||
[eval agi_cv_with_$2="no"],
|
||||
[AS_IF([test $? -ne 0], [eval agi_cv_with_$2="no"], [eval agi_cv_with_$2="yes"])])])
|
||||
AC_LANG_POP(C++)
|
||||
CPPFLAGS="$aegisub_save_CPPFLAGS"
|
||||
LIBS="$aegisub_save_LIBS"
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_AGI_LINK],[
|
||||
aegisub_save_LIBS="$LIBS"
|
||||
aegisub_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $4"
|
||||
LIBS="$LIBS $5"
|
||||
AC_CHECK_HEADER([$3], [agi_cv_header="yes"], [agi_cv_header="no"])
|
||||
AS_IF([test "x$agi_cv_header" = xyes],
|
||||
[AC_CACHE_CHECK(
|
||||
[whether $1 works], [agi_cv_with_$2],
|
||||
[AC_LINK_IFELSE([AC_LANG_SOURCE([$6])], [eval agi_cv_with_$2="yes"], [eval agi_cv_with_$2="no"])])]
|
||||
[eval agi_cv_with_$2="no"])
|
||||
CPPFLAGS="$aegisub_save_CPPFLAGS"
|
||||
LIBS="$aegisub_save_LIBS"
|
||||
])
|
||||
|
||||
# An optional dependency which requires pkg-config
|
||||
# Args: Name, AC_ARG_WITH help string, AC_DEFINE help string
|
||||
AC_DEFUN([AGI_OPT_PKG], [
|
||||
m4_define([varname], m4_bpatsubst([$1], [-.*], []))dnl
|
||||
m4_define([upper], m4_translit(varname, [a-z], [A-Z]))dnl
|
||||
|
||||
AC_ARG_WITH(varname, AS_HELP_STRING([--without-][varname], [$2]))
|
||||
AS_IF([test x$with_]varname[ = xno],
|
||||
varname[_disabled="(disabled)"],
|
||||
[PKG_CHECK_MODULES(upper, $1 >= varname[]_required_version, [
|
||||
AC_DEFINE([WITH_]upper, 1, $3)
|
||||
with_[]varname="yes"
|
||||
], [
|
||||
AS_IF([test x$with_]varname[ = xyes],
|
||||
[AC_MSG_FAILURE([--with-]varname[ was specified, but ]varname[ could not be found])])
|
||||
with_[]varname="no"
|
||||
])])
|
||||
AC_SUBST([with_]varname)
|
||||
])
|
|
@ -1,56 +0,0 @@
|
|||
AC_DEFUN([AC_C_FLAG], [{
|
||||
AC_LANG_PUSH(C)
|
||||
ac_c_flag_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror $1"
|
||||
AC_MSG_CHECKING([[whether $CC supports $1]])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[
|
||||
CFLAGS="$ac_c_flag_save $1"
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
CFLAGS="$ac_c_flag_save"
|
||||
AC_MSG_RESULT([no])
|
||||
$2
|
||||
])
|
||||
AC_LANG_POP(C)
|
||||
}])
|
||||
AC_DEFUN([AC_CXX_FLAG], [{
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_cxx_flag_save="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -Werror $1"
|
||||
AC_MSG_CHECKING([[whether $CXX supports $1]])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[
|
||||
CXXFLAGS="$ac_cxx_flag_save $1"
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
CXXFLAGS="$ac_cxx_flag_save"
|
||||
AC_MSG_RESULT([no])
|
||||
$2
|
||||
])
|
||||
AC_LANG_POP(C++)
|
||||
}])
|
||||
AC_DEFUN([AC_PCH_FLAG], [{
|
||||
AC_LANG_PUSH(C++)
|
||||
ac_cxx_flag_save="$CXXFLAGS"
|
||||
ac_cxx_werror_flag_save="$ac_cxx_werror_flag"
|
||||
ac_cxx_werror_flag=yes
|
||||
CXXFLAGS="$CXXFLAGS -Werror $1"
|
||||
AC_MSG_CHECKING([[whether $CXX supports $1]])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[]])],
|
||||
[
|
||||
PCHFLAGS="$PCHFLAGS $1"
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no])
|
||||
$2
|
||||
])
|
||||
CXXFLAGS="$ac_cxx_flag_save"
|
||||
ac_cxx_werror_flag="$ac_cxx_werror_flag_save"
|
||||
AC_LANG_POP(C++)
|
||||
}])
|
|
@ -1,58 +0,0 @@
|
|||
AC_DEFUN([AGI_FIND_HEADER],[
|
||||
file=`echo $2 | $as_tr_sh`
|
||||
|
||||
aegisub_save_CPPFLAGS="$CPPFLAGS"
|